feat: Move components to @clayui/core
#5783
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.