Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sparkle] - enh:
Checkbox
(dust-tt#8001)
* [sparkle] - refactor: streamline Checkbox component with Radix UI and improved styles - Refactored Checkbox component to use Radix UI primitives for improved accessibility and functionality - Simplified Checkbox props and removed unnecessary code for clarity and maintainability - Created new Checkbox variants with text and description for better UX in different contexts - Updated Checkbox stories to reflect the new API and component structure - Organized exports to include new Checkbox variants in the component library index * [sparkle] - feature: add radix-ui checkbox and class variance dependency - Implemented @radix-ui/react-checkbox for better checkbox functionality and UI consistency - Integrated class-variance-authority for handling class composition logic * [sparkle] - refactor: streamline Checkbox component and usage in Tree stories - Add `checked` prop directly to `Checkbox` component logic to handle partial and fully checked states - Simplify checkbox prop usage by removing `variant` field and utilizing boolean for `checked` state in Tree stories - Export `CheckboxProps` type from Checkbox component for external type usage - Update `TreeExample` and `SelectDataSourceExample` in stories to align with Checkbox component changes * [sparkle] - refactor: simplify Checkbox component props - Remove `isPartial` prop interface from Checkbox component, simplifying the component's API and prop handling * [sparkle] - refactor: remove default props from Checkbox component - Default properties for size and isPartial are now expected to be explicitly provided - Ensures more clarity and control over Checkbox usage by requiring specific prop values * [sparkle] - refactor: update Checkbox component to support 'partial' state - Refactored the `Checkbox` component's styles to replace the `isPartial` variant with a more versatile `checked` variant - Introduced a new type `CheckBoxStateType` to support 'partial' along with boolean states - Updated stories and related components to use the new 'partial' state checker instead of the 'indeterminate' or `isPartial` props - Cleaned up props by using an Omit type to exclude the old `checked` prop and swap it for the new `checked` state type * [sparkle] - feature: update partial state color and add disabled state to Checkbox - Changed the background color for partial state of Checkbox to 's-bg-muted-foreground' - Added disabled variants for all sizes and states of Checkbox in story examples * [sparkle] - fix: update Checkbox to handle 'partial' checked state - Remove "defaultChecked" from the props being passed to CheckboxPrimitive.Root to prevent conflicts with controlled behavior - Modify the "checked" prop handling to support "indeterminate" state when Checkbox is given a "partial" value * [sparkle] - feature: bump package version to 0.2.267 - Package version updated to reflect new changes and features introduced - Synchronized package-lock.json version to match package.json for consistency --------- Co-authored-by: Jules <[email protected]>
- Loading branch information