liferay / clay

A web implementation of the Lexicon Experience Language
http://clayui.com
Other
207 stars 470 forks source link

feat: Move components to `@clayui/core` #5783

Open matuzalemsteles opened 6 months ago

matuzalemsteles commented 6 months ago

Closes #4191

Well basically this is a WIP to move the components to the same package @clayui/core, there is some care here because we want to keep the current packages working but without code duplication (this is being done in this PR but I'm discussing it further below.) and we will deprecate it and in the future major version we will no longer have support.

Another problem we have here is that the idea would be to slowly move packages to @clayui/core but we have some problems with this due to the dependency between clay packages which causes cyclical dependency, especially packages that depend on @clayui/ icon, @clayui/button and @clayui/drop-dropdown, because it is not enough to move the code to maintain support and avoid code duplication, we add the @clayui/core dependency in this package just by exporting the your component but this can cause a cyclical dependency, so we need to move some packages that do not cause cyclical dependency and at other times we will have to move more than one package at a time to not cause the cyclical dependency, this requires more work especially for the packages mentioned above because we have many packages with co-dependencies.

The commits are still duplicating the code because I still need to add checking if there is a cyclic dependency, I will update later. I'll use this PR to work on it slowly.