@mbao01/common 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/components/Alert/constants.d.ts +1 -1
- package/dist/types/components/AlertDialog/AlertDialog.d.ts +7 -5
- package/dist/types/components/Anchor/{constant.d.ts → constants.d.ts} +1 -1
- package/dist/types/components/Anchor/types.d.ts +1 -1
- package/dist/types/components/AspectRatio/AspectRatio.d.ts +6 -0
- package/dist/types/components/AspectRatio/constants.d.ts +3 -0
- package/dist/types/components/AspectRatio/index.d.ts +2 -0
- package/dist/types/components/AspectRatio/types.d.ts +5 -0
- package/dist/types/components/Avatar/constants.d.ts +6 -6
- package/dist/types/components/Badge/constants.d.ts +1 -1
- package/dist/types/components/Banner/Banner.d.ts +11 -0
- package/dist/types/components/Banner/constants.d.ts +4 -0
- package/dist/types/components/Banner/index.d.ts +2 -0
- package/dist/types/components/Banner/types.d.ts +9 -0
- package/dist/types/components/Blockquote/Blockquote.d.ts +6 -0
- package/dist/types/components/Blockquote/constants.d.ts +3 -0
- package/dist/types/components/Blockquote/index.d.ts +2 -0
- package/dist/types/components/Blockquote/types.d.ts +5 -0
- package/dist/types/components/Box/Box.d.ts +6 -0
- package/dist/types/components/Box/constants.d.ts +5 -0
- package/dist/types/components/Box/index.d.ts +2 -0
- package/dist/types/components/Box/types.d.ts +3 -0
- package/dist/types/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/types/components/Breadcrumb/types.d.ts +1 -1
- package/dist/types/components/Button/Button.d.ts +3 -2
- package/dist/types/components/Button/constants.d.ts +2 -1
- package/dist/types/components/Carousel/Carousel.d.ts +6 -4
- package/dist/types/components/Center/Center.d.ts +5 -0
- package/dist/types/components/Center/constants.d.ts +4 -0
- package/dist/types/components/Center/index.d.ts +2 -0
- package/dist/types/components/Center/types.d.ts +3 -0
- package/dist/types/components/Chart/constants.d.ts +2 -2
- package/dist/types/components/Code/Code.d.ts +8 -0
- package/dist/types/components/Code/constants.d.ts +4 -0
- package/dist/types/components/Code/helper.d.ts +2 -0
- package/dist/types/components/Code/index.d.ts +2 -0
- package/dist/types/components/Code/types.d.ts +6 -0
- package/dist/types/components/Combobox/Combobox.d.ts +1 -1
- package/dist/types/components/Combobox/types.d.ts +1 -0
- package/dist/types/components/Container/Container.d.ts +6 -0
- package/dist/types/components/Container/constants.d.ts +5 -0
- package/dist/types/components/Container/index.d.ts +2 -0
- package/dist/types/components/Container/types.d.ts +3 -0
- package/dist/types/components/DatetimePicker/DatetimeGrid.d.ts +2 -2
- package/dist/types/components/DatetimePicker/DatetimePicker.d.ts +2 -2
- package/dist/types/components/DatetimePicker/constants.d.ts +1 -1
- package/dist/types/components/Dialog/Dialog.d.ts +1 -1
- package/dist/types/components/Dialog/constants.d.ts +1 -1
- package/dist/types/components/Dock/constants.d.ts +2 -2
- package/dist/types/components/Empty/Empty.d.ts +8 -0
- package/dist/types/components/Empty/constants.d.ts +6 -0
- package/dist/types/components/Empty/index.d.ts +2 -0
- package/dist/types/components/Empty/types.d.ts +3 -0
- package/dist/types/components/Flex/Flex.d.ts +8 -0
- package/dist/types/components/Flex/constants.d.ts +7 -0
- package/dist/types/components/Flex/index.d.ts +2 -0
- package/dist/types/components/Flex/types.d.ts +3 -0
- package/dist/types/components/Footer/Footer.d.ts +6 -0
- package/dist/types/components/Footer/constants.d.ts +4 -0
- package/dist/types/components/Footer/index.d.ts +2 -0
- package/dist/types/components/Footer/types.d.ts +4 -0
- package/dist/types/components/Form/DatetimeInput/DatetimeInput.d.ts +3 -3
- package/dist/types/components/Form/Input/Input.d.ts +4 -4
- package/dist/types/components/Form/Input/constants.d.ts +2 -2
- package/dist/types/components/Form/NativeSelect/NativeSelect.d.ts +8 -0
- package/dist/types/components/Form/NativeSelect/constants.d.ts +7 -0
- package/dist/types/components/Form/NativeSelect/index.d.ts +2 -0
- package/dist/types/components/Form/NativeSelect/types.d.ts +3 -0
- package/dist/types/components/Form/Radio/Radio.d.ts +1 -1
- package/dist/types/components/Form/Range/Range.d.ts +1 -1
- package/dist/types/components/Form/Select/Select.d.ts +4 -4
- package/dist/types/components/Form/Select/constants.d.ts +2 -2
- package/dist/types/components/Form/Switch/Switch.d.ts +1 -1
- package/dist/types/components/Form/TagsInput/TagsInput.d.ts +2 -2
- package/dist/types/components/Form/TextField/TextField.d.ts +4 -4
- package/dist/types/components/Form/Textarea/Textarea.d.ts +3 -3
- package/dist/types/components/Form/Textarea/constants.d.ts +1 -1
- package/dist/types/components/Form/components/Field/Field.d.ts +8 -0
- package/dist/types/components/Form/components/Field/FieldContext.d.ts +2 -0
- package/dist/types/components/Form/components/Field/constants.d.ts +6 -0
- package/dist/types/components/Form/components/Field/hooks/index.d.ts +1 -0
- package/dist/types/components/Form/components/Field/hooks/useField/index.d.ts +1 -0
- package/dist/types/components/Form/components/Field/hooks/useField/useField.d.ts +1 -0
- package/dist/types/components/Form/components/Field/index.d.ts +2 -0
- package/dist/types/components/Form/components/Field/types.d.ts +12 -0
- package/dist/types/components/Form/index.d.ts +2 -0
- package/dist/types/components/Grid/Grid.d.ts +11 -0
- package/dist/types/components/Grid/constants.d.ts +10 -0
- package/dist/types/components/Grid/index.d.ts +2 -0
- package/dist/types/components/Grid/types.d.ts +4 -0
- package/dist/types/components/Header/Header.d.ts +7 -0
- package/dist/types/components/Header/constants.d.ts +3 -0
- package/dist/types/components/Header/index.d.ts +2 -0
- package/dist/types/components/Header/types.d.ts +3 -0
- package/dist/types/components/Heading/Heading.d.ts +7 -0
- package/dist/types/components/Heading/constants.d.ts +4 -0
- package/dist/types/components/Heading/index.d.ts +2 -0
- package/dist/types/components/Heading/types.d.ts +7 -0
- package/dist/types/components/Image/Image.d.ts +7 -0
- package/dist/types/components/Image/constants.d.ts +4 -0
- package/dist/types/components/Image/index.d.ts +2 -0
- package/dist/types/components/Image/types.d.ts +5 -0
- package/dist/types/components/Kbd/constants.d.ts +1 -1
- package/dist/types/components/List/constants.d.ts +1 -1
- package/dist/types/components/Loading/Loading.d.ts +1 -1
- package/dist/types/components/Loading/constants.d.ts +2 -2
- package/dist/types/components/Menu/ContextMenu/ContextMenu.d.ts +4 -4
- package/dist/types/components/Menu/DropdownMenu/DropdownMenu.d.ts +4 -4
- package/dist/types/components/Menu/Menubar/Menubar.d.ts +5 -5
- package/dist/types/components/Menu/Menubar/constants.d.ts +5 -5
- package/dist/types/components/Menu/NavigationMenu/NavigationMenu.d.ts +1 -1
- package/dist/types/components/Menu/NavigationMenu/constants.d.ts +1 -1
- package/dist/types/components/Panel/Panel.d.ts +11 -0
- package/dist/types/components/Panel/constants.d.ts +7 -0
- package/dist/types/components/Panel/index.d.ts +2 -0
- package/dist/types/components/Panel/types.d.ts +8 -0
- package/dist/types/components/Paragraph/Paragraph.d.ts +3 -0
- package/dist/types/components/Paragraph/constants.d.ts +3 -0
- package/dist/types/components/Paragraph/index.d.ts +2 -0
- package/dist/types/components/Paragraph/types.d.ts +5 -0
- package/dist/types/components/Progress/Progress.d.ts +1 -1
- package/dist/types/components/Progress/constants.d.ts +2 -2
- package/dist/types/components/Resizable/Resizable.d.ts +1 -1
- package/dist/types/components/ScrollArea/ScrollArea.d.ts +1 -1
- package/dist/types/components/ScrollArea/constants.d.ts +1 -1
- package/dist/types/components/Sheet/Sheet.d.ts +12 -0
- package/dist/types/components/Sheet/constants.d.ts +7 -0
- package/dist/types/components/Sheet/index.d.ts +2 -0
- package/dist/types/components/Sheet/types.d.ts +5 -0
- package/dist/types/components/Sidebar/Sidebar.d.ts +8 -7
- package/dist/types/components/Sidebar/SidebarMenu.d.ts +3 -2
- package/dist/types/components/Sidebar/constants.d.ts +5 -4
- package/dist/types/components/Sidebar/types.d.ts +1 -1
- package/dist/types/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/types/components/Skeleton/constants.d.ts +3 -3
- package/dist/types/components/Sonner/constants.d.ts +2 -2
- package/dist/types/components/Spacer/Spacer.d.ts +5 -0
- package/dist/types/components/Spacer/constants.d.ts +4 -0
- package/dist/types/components/Spacer/index.d.ts +2 -0
- package/dist/types/components/Spacer/types.d.ts +3 -0
- package/dist/types/components/Spinner/Spinner.d.ts +5 -0
- package/dist/types/components/Spinner/constants.d.ts +4 -0
- package/dist/types/components/Spinner/index.d.ts +2 -0
- package/dist/types/components/Spinner/types.d.ts +3 -0
- package/dist/types/components/Status/constants.d.ts +1 -1
- package/dist/types/components/Stepper/Stepper.d.ts +9 -0
- package/dist/types/components/Stepper/constants.d.ts +6 -0
- package/dist/types/components/Stepper/index.d.ts +2 -0
- package/dist/types/components/Stepper/types.d.ts +6 -0
- package/dist/types/components/Text/constants.d.ts +1 -1
- package/dist/types/components/Timeline/Timeline.d.ts +5 -5
- package/dist/types/components/Timeline/constants.d.ts +5 -5
- package/dist/types/components/Toggle/Toggle.d.ts +5 -3
- package/dist/types/components/Toggle/constants.d.ts +2 -1
- package/dist/types/components/ToggleGroup/ToggleGroup.d.ts +5 -3
- package/dist/types/index.d.ts +24 -0
- package/dist/types/utilities/createVariants/createVariants.d.ts +2 -0
- package/dist/types/utilities/createVariants/index.d.ts +1 -0
- package/dist/types/utilities/createVariants/type.d.ts +10 -0
- package/dist/types/utilities/index.d.ts +1 -0
- package/package.json +41 -41
- package/src/components/Alert/constants.ts +3 -2
- package/src/components/Anchor/Anchor.tsx +1 -1
- package/src/components/Anchor/{constant.ts → constants.ts} +4 -4
- package/src/components/Anchor/types.ts +1 -1
- package/src/components/AspectRatio/AspectRatio.tsx +23 -0
- package/src/components/AspectRatio/constants.ts +17 -0
- package/src/components/AspectRatio/index.ts +2 -0
- package/src/components/AspectRatio/types.ts +7 -0
- package/src/components/Avatar/constants.ts +17 -22
- package/src/components/Badge/constants.ts +3 -2
- package/src/components/Banner/Banner.tsx +36 -0
- package/src/components/Banner/constants.ts +18 -0
- package/src/components/Banner/index.ts +2 -0
- package/src/components/Banner/types.ts +11 -0
- package/src/components/Blockquote/Blockquote.tsx +21 -0
- package/src/components/Blockquote/constants.ts +22 -0
- package/src/components/Blockquote/index.ts +2 -0
- package/src/components/Blockquote/types.ts +7 -0
- package/src/components/Box/Box.tsx +20 -0
- package/src/components/Box/constants.ts +34 -0
- package/src/components/Box/index.ts +2 -0
- package/src/components/Box/types.ts +4 -0
- package/src/components/Breadcrumb/types.ts +1 -1
- package/src/components/Button/Button.tsx +3 -4
- package/src/components/Button/constants.ts +6 -3
- package/src/components/Card/constants.ts +3 -2
- package/src/components/Carousel/constants.ts +9 -8
- package/src/components/Center/Center.tsx +16 -0
- package/src/components/Center/constants.ts +20 -0
- package/src/components/Center/index.ts +2 -0
- package/src/components/Center/types.ts +5 -0
- package/src/components/Chart/constants.ts +9 -8
- package/src/components/Code/Code.tsx +51 -0
- package/src/components/Code/constants.ts +28 -0
- package/src/components/Code/helper.ts +10 -0
- package/src/components/Code/index.ts +2 -0
- package/src/components/Code/types.ts +8 -0
- package/src/components/Combobox/Combobox.tsx +2 -3
- package/src/components/Combobox/types.ts +1 -0
- package/src/components/Container/Container.tsx +20 -0
- package/src/components/Container/constants.ts +31 -0
- package/src/components/Container/index.ts +2 -0
- package/src/components/Container/types.ts +5 -0
- package/src/components/DatetimePicker/constants.ts +5 -4
- package/src/components/Dialog/Dialog.tsx +3 -3
- package/src/components/Dialog/constants.ts +5 -4
- package/src/components/Dock/constants.ts +14 -13
- package/src/components/DragAndDrop/Draggable/constants.ts +5 -4
- package/src/components/DragAndDrop/Droppable/constants.ts +3 -2
- package/src/components/DragAndDrop/Sortable/constants.ts +3 -2
- package/src/components/Empty/Empty.tsx +66 -0
- package/src/components/Empty/constants.ts +30 -0
- package/src/components/Empty/index.ts +2 -0
- package/src/components/Empty/types.ts +5 -0
- package/src/components/Flex/Flex.tsx +20 -0
- package/src/components/Flex/constants.ts +51 -0
- package/src/components/Flex/index.ts +2 -0
- package/src/components/Flex/types.ts +4 -0
- package/src/components/Footer/Footer.tsx +26 -0
- package/src/components/Footer/constants.ts +12 -0
- package/src/components/Footer/index.ts +2 -0
- package/src/components/Footer/types.ts +6 -0
- package/src/components/Form/Checkbox/constants.ts +5 -4
- package/src/components/Form/DatetimeInput/constants.ts +9 -8
- package/src/components/Form/Input/constants.ts +7 -6
- package/src/components/Form/MultiSelect/constants.ts +10 -9
- package/src/components/Form/NativeSelect/NativeSelect.tsx +23 -0
- package/src/components/Form/NativeSelect/constants.ts +39 -0
- package/src/components/Form/NativeSelect/index.ts +2 -0
- package/src/components/Form/NativeSelect/types.ts +5 -0
- package/src/components/Form/Radio/constants.ts +3 -2
- package/src/components/Form/Range/constants.ts +3 -2
- package/src/components/Form/Select/constants.ts +14 -13
- package/src/components/Form/Slider/constants.ts +9 -8
- package/src/components/Form/Switch/constants.ts +3 -2
- package/src/components/Form/TagsInput/TagsInput.tsx +1 -1
- package/src/components/Form/TagsInput/constants.ts +7 -6
- package/src/components/Form/Textarea/constants.ts +3 -2
- package/src/components/Form/Validator/constants.ts +3 -2
- package/src/components/Form/components/Field/Field.tsx +81 -0
- package/src/components/Form/components/Field/FieldContext.tsx +4 -0
- package/src/components/Form/components/Field/constants.ts +20 -0
- package/src/components/Form/components/Field/hooks/index.ts +1 -0
- package/src/components/Form/components/Field/hooks/useField/index.ts +1 -0
- package/src/components/Form/components/Field/hooks/useField/useField.ts +10 -0
- package/src/components/Form/components/Field/index.ts +2 -0
- package/src/components/Form/components/Field/types.ts +19 -0
- package/src/components/Form/index.ts +2 -0
- package/src/components/Grid/Grid.tsx +32 -0
- package/src/components/Grid/constants.ts +84 -0
- package/src/components/Grid/index.ts +2 -0
- package/src/components/Grid/types.ts +7 -0
- package/src/components/Header/Header.tsx +49 -0
- package/src/components/Header/constants.ts +18 -0
- package/src/components/Header/index.ts +2 -0
- package/src/components/Header/types.ts +4 -0
- package/src/components/Heading/Heading.tsx +23 -0
- package/src/components/Heading/constants.ts +25 -0
- package/src/components/Heading/index.ts +2 -0
- package/src/components/Heading/types.ts +10 -0
- package/src/components/Image/Image.tsx +30 -0
- package/src/components/Image/constants.ts +25 -0
- package/src/components/Image/index.ts +2 -0
- package/src/components/Image/types.ts +7 -0
- package/src/components/Kbd/constants.ts +3 -2
- package/src/components/List/constants.ts +3 -2
- package/src/components/Loading/Loading.tsx +2 -4
- package/src/components/Loading/constants.ts +5 -4
- package/src/components/Menu/Menubar/constants.ts +16 -14
- package/src/components/Menu/NavigationMenu/constants.ts +5 -3
- package/src/components/Panel/Panel.tsx +58 -0
- package/src/components/Panel/constants.ts +31 -0
- package/src/components/Panel/index.ts +2 -0
- package/src/components/Panel/types.ts +11 -0
- package/src/components/Paragraph/Paragraph.tsx +17 -0
- package/src/components/Paragraph/constants.ts +18 -0
- package/src/components/Paragraph/index.ts +2 -0
- package/src/components/Paragraph/types.ts +8 -0
- package/src/components/Progress/constants.ts +9 -10
- package/src/components/Resizable/constants.ts +3 -2
- package/src/components/ScrollArea/constants.ts +6 -5
- package/src/components/Separator/constants.ts +3 -2
- package/src/components/Sheet/Sheet.tsx +126 -0
- package/src/components/Sheet/constants.ts +45 -0
- package/src/components/Sheet/index.ts +9 -0
- package/src/components/Sheet/types.ts +7 -0
- package/src/components/Sidebar/Sidebar.tsx +5 -5
- package/src/components/Sidebar/SidebarMenu.tsx +3 -3
- package/src/components/Sidebar/constants.ts +32 -25
- package/src/components/Sidebar/types.ts +1 -1
- package/src/components/Skeleton/Skeleton.tsx +2 -2
- package/src/components/Skeleton/constants.ts +4 -3
- package/src/components/Sonner/Toaster.tsx +1 -1
- package/src/components/Sonner/constants.ts +6 -5
- package/src/components/Sonner/helpers.ts +1 -1
- package/src/components/Spacer/Spacer.tsx +19 -0
- package/src/components/Spacer/constants.ts +55 -0
- package/src/components/Spacer/index.ts +2 -0
- package/src/components/Spacer/types.ts +5 -0
- package/src/components/Spinner/Spinner.tsx +24 -0
- package/src/components/Spinner/constants.ts +29 -0
- package/src/components/Spinner/index.ts +2 -0
- package/src/components/Spinner/types.ts +5 -0
- package/src/components/Stack/constants.ts +3 -2
- package/src/components/Stat/constants.ts +5 -4
- package/src/components/Status/constants.ts +3 -2
- package/src/components/Stepper/Stepper.tsx +30 -0
- package/src/components/Stepper/constants.ts +29 -0
- package/src/components/Stepper/index.ts +2 -0
- package/src/components/Stepper/types.ts +10 -0
- package/src/components/Table/constants.ts +3 -2
- package/src/components/Text/constants.ts +4 -7
- package/src/components/Timeline/Timeline.example.tsx +1 -1
- package/src/components/Timeline/constants.ts +19 -22
- package/src/components/Toggle/Toggle.tsx +3 -3
- package/src/components/Toggle/constants.ts +6 -3
- package/src/components/ToggleGroup/ToggleGroup.tsx +4 -2
- package/src/components/Tooltip/constants.ts +5 -4
- package/src/index.ts +27 -0
- package/src/utilities/createVariants/createVariants.ts +5 -0
- package/src/utilities/createVariants/index.ts +1 -0
- package/src/utilities/createVariants/type.ts +29 -0
- package/src/utilities/index.ts +1 -0
- package/vitest-setup.ts +4 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mbao01/common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Ayomide Bakare",
|
|
7
7
|
"license": "MIT",
|
|
@@ -71,23 +71,23 @@
|
|
|
71
71
|
"@dnd-kit/utilities": "^3.2.2",
|
|
72
72
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
73
73
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
74
|
-
"@radix-ui/react-avatar": "^1.1.
|
|
74
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
75
75
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
76
76
|
"@radix-ui/react-collapsible": "^1.1.12",
|
|
77
77
|
"@radix-ui/react-context-menu": "^2.2.16",
|
|
78
78
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
79
79
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
80
80
|
"@radix-ui/react-hover-card": "^1.1.15",
|
|
81
|
-
"@radix-ui/react-label": "^2.1.
|
|
81
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
82
82
|
"@radix-ui/react-menubar": "^1.1.16",
|
|
83
83
|
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
84
84
|
"@radix-ui/react-popover": "^1.1.15",
|
|
85
|
-
"@radix-ui/react-progress": "^1.1.
|
|
85
|
+
"@radix-ui/react-progress": "^1.1.8",
|
|
86
86
|
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
87
87
|
"@radix-ui/react-select": "^2.2.6",
|
|
88
|
-
"@radix-ui/react-separator": "^1.1.
|
|
88
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
89
89
|
"@radix-ui/react-slider": "^1.3.6",
|
|
90
|
-
"@radix-ui/react-slot": "^1.2.
|
|
90
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
91
91
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
92
92
|
"@radix-ui/react-toggle": "^1.1.10",
|
|
93
93
|
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
@@ -100,63 +100,63 @@
|
|
|
100
100
|
"date-fns": "^4.1.0",
|
|
101
101
|
"embla-carousel-react": "^8.6.0",
|
|
102
102
|
"lucide-react": "^0.546.0",
|
|
103
|
-
"react-day-picker": "^9.
|
|
103
|
+
"react-day-picker": "^9.12.0",
|
|
104
104
|
"react-dropzone": "^14.3.8",
|
|
105
|
-
"react-international-phone": "^4.6.
|
|
105
|
+
"react-international-phone": "^4.6.1",
|
|
106
106
|
"react-otp-input": "^3.1.1",
|
|
107
107
|
"react-resizable-panels": "^3.0.6",
|
|
108
108
|
"sonner": "^2.0.7",
|
|
109
|
-
"tailwind-merge": "^3.
|
|
109
|
+
"tailwind-merge": "^3.4.0",
|
|
110
110
|
"timescape": "^0.8.0",
|
|
111
111
|
"universal-cookie": "^8.0.1",
|
|
112
112
|
"vaul": "^1.1.2"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
|
-
"@eslint/js": "^9.
|
|
115
|
+
"@eslint/js": "^9.39.1",
|
|
116
116
|
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
|
|
117
|
-
"@storybook/addon-a11y": "^
|
|
118
|
-
"@storybook/addon-coverage": "^
|
|
119
|
-
"@storybook/addon-docs": "^
|
|
120
|
-
"@storybook/addon-links": "^
|
|
121
|
-
"@storybook/addon-onboarding": "^
|
|
122
|
-
"@storybook/addon-themes": "^
|
|
123
|
-
"@storybook/react-vite": "^
|
|
124
|
-
"@storybook/test-runner": "^0.
|
|
125
|
-
"@tailwindcss/postcss": "^4.1.
|
|
126
|
-
"@tailwindcss/vite": "^4.1.
|
|
117
|
+
"@storybook/addon-a11y": "^10.1.6",
|
|
118
|
+
"@storybook/addon-coverage": "^3.0.0",
|
|
119
|
+
"@storybook/addon-docs": "^10.1.6",
|
|
120
|
+
"@storybook/addon-links": "^10.1.6",
|
|
121
|
+
"@storybook/addon-onboarding": "^10.1.6",
|
|
122
|
+
"@storybook/addon-themes": "^10.1.6",
|
|
123
|
+
"@storybook/react-vite": "^10.1.6",
|
|
124
|
+
"@storybook/test-runner": "^0.24.2",
|
|
125
|
+
"@tailwindcss/postcss": "^4.1.17",
|
|
126
|
+
"@tailwindcss/vite": "^4.1.17",
|
|
127
127
|
"@testing-library/jest-dom": "^6.9.1",
|
|
128
128
|
"@testing-library/react": "^16.3.0",
|
|
129
129
|
"@testing-library/user-event": "^14.6.1",
|
|
130
130
|
"@types/jest-image-snapshot": "^6.4.0",
|
|
131
|
-
"@types/node": "^24.
|
|
132
|
-
"@types/react": "^19.2.
|
|
133
|
-
"@types/react-dom": "^19.2.
|
|
134
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
135
|
-
"@typescript-eslint/parser": "^8.
|
|
136
|
-
"@vitejs/plugin-react": "^5.
|
|
131
|
+
"@types/node": "^24.10.2",
|
|
132
|
+
"@types/react": "^19.2.7",
|
|
133
|
+
"@types/react-dom": "^19.2.3",
|
|
134
|
+
"@typescript-eslint/eslint-plugin": "^8.49.0",
|
|
135
|
+
"@typescript-eslint/parser": "^8.49.0",
|
|
136
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
137
137
|
"@vitest/coverage-v8": "^3.2.4",
|
|
138
138
|
"@vitest/ui": "^3.2.4",
|
|
139
139
|
"axe-playwright": "^2.2.2",
|
|
140
|
-
"daisyui": "^5.
|
|
141
|
-
"eslint": "^9.
|
|
140
|
+
"daisyui": "^5.5.11",
|
|
141
|
+
"eslint": "^9.39.1",
|
|
142
142
|
"eslint-plugin-react": "^7.37.5",
|
|
143
|
-
"eslint-plugin-react-hooks": "^7.0.
|
|
143
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
144
144
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
145
|
-
"eslint-plugin-storybook": "^
|
|
146
|
-
"globals": "^16.
|
|
145
|
+
"eslint-plugin-storybook": "^10.1.6",
|
|
146
|
+
"globals": "^16.5.0",
|
|
147
147
|
"jest-image-snapshot": "^6.5.1",
|
|
148
|
-
"jsdom": "^27.0
|
|
148
|
+
"jsdom": "^27.3.0",
|
|
149
149
|
"path": "^0.12.7",
|
|
150
150
|
"postcss": "^8.5.6",
|
|
151
|
-
"prettier": "^3.
|
|
152
|
-
"react": "^19.2.
|
|
153
|
-
"react-dom": "^19.2.
|
|
154
|
-
"react-router-dom": "^7.
|
|
155
|
-
"recharts": "^3.
|
|
156
|
-
"storybook": "^
|
|
157
|
-
"tailwindcss": "^4.1.
|
|
151
|
+
"prettier": "^3.7.4",
|
|
152
|
+
"react": "^19.2.1",
|
|
153
|
+
"react-dom": "^19.2.1",
|
|
154
|
+
"react-router-dom": "^7.10.1",
|
|
155
|
+
"recharts": "^3.5.1",
|
|
156
|
+
"storybook": "^10.1.6",
|
|
157
|
+
"tailwindcss": "^4.1.17",
|
|
158
158
|
"typescript": "^5.9.3",
|
|
159
|
-
"typescript-eslint": "^8.
|
|
159
|
+
"typescript-eslint": "^8.49.0",
|
|
160
160
|
"vite": "^6.4.1",
|
|
161
161
|
"vite-plugin-dts": "^4.5.4",
|
|
162
162
|
"vitest": "^3.2.4"
|
|
@@ -168,5 +168,5 @@
|
|
|
168
168
|
"recharts": "2",
|
|
169
169
|
"typescript": "5"
|
|
170
170
|
},
|
|
171
|
-
"gitHead": "
|
|
171
|
+
"gitHead": "8a77b018bca2938c499639bb4e0afa17ae30df87"
|
|
172
172
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { cva } from "../../libs";
|
|
2
|
+
import { createVariants } from "../../utilities";
|
|
2
3
|
|
|
3
4
|
export const getAlertClasses = cva(
|
|
4
5
|
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg]:absolute [&>svg]:left-4 [&>svg]:text-inherit",
|
|
5
6
|
{
|
|
6
|
-
variants: {
|
|
7
|
+
variants: createVariants({
|
|
7
8
|
variant: {
|
|
8
9
|
accent: "bg-accent text-accent-content border-accent",
|
|
9
10
|
default: "bg-default text-default-content border-default",
|
|
@@ -19,7 +20,7 @@ export const getAlertClasses = cva(
|
|
|
19
20
|
outline: {
|
|
20
21
|
true: "border bg-default",
|
|
21
22
|
},
|
|
22
|
-
},
|
|
23
|
+
}),
|
|
23
24
|
compoundVariants: [
|
|
24
25
|
{ outline: true, variant: "accent", className: "text-accent" },
|
|
25
26
|
{ outline: true, variant: "default", className: "text-default" },
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { cva } from "../../libs";
|
|
2
|
+
import { createVariants } from "../../utilities";
|
|
2
3
|
|
|
3
4
|
export const getAnchorClasses = cva("link transition-all", {
|
|
4
|
-
variants: {
|
|
5
|
+
variants: createVariants({
|
|
5
6
|
variant: {
|
|
6
7
|
accent: "link-accent",
|
|
7
|
-
default: "link-default",
|
|
8
8
|
error: "link-error",
|
|
9
9
|
info: "link-info",
|
|
10
|
-
|
|
10
|
+
default: "text-base-content",
|
|
11
11
|
neutral: "link-neutral",
|
|
12
12
|
primary: "link-primary",
|
|
13
13
|
secondary: "link-secondary",
|
|
@@ -20,5 +20,5 @@ export const getAnchorClasses = cva("link transition-all", {
|
|
|
20
20
|
underline: {
|
|
21
21
|
false: "no-underline",
|
|
22
22
|
},
|
|
23
|
-
},
|
|
23
|
+
}),
|
|
24
24
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { cn } from "../../utilities";
|
|
3
|
+
import { getAspectRatioClasses } from "./constants";
|
|
4
|
+
import { type AspectRatioProps } from "./types";
|
|
5
|
+
|
|
6
|
+
export const AspectRatio = React.forwardRef<HTMLDivElement, AspectRatioProps>(
|
|
7
|
+
({ className, ratio, value, style, children, ...props }, ref) => {
|
|
8
|
+
const computedStyle = value ? { aspectRatio: `${value}` } : {};
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<div
|
|
12
|
+
ref={ref}
|
|
13
|
+
className={cn(getAspectRatioClasses({ ratio: value ? undefined : ratio }), className)}
|
|
14
|
+
style={{ ...computedStyle, ...style }}
|
|
15
|
+
{...props}
|
|
16
|
+
>
|
|
17
|
+
{children}
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
AspectRatio.displayName = "AspectRatio";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cva } from "../../libs";
|
|
2
|
+
import { createVariants } from "../../utilities";
|
|
3
|
+
|
|
4
|
+
export const getAspectRatioClasses = cva("relative w-full overflow-hidden", {
|
|
5
|
+
variants: createVariants({
|
|
6
|
+
ratio: {
|
|
7
|
+
"16/9": "aspect-video",
|
|
8
|
+
"4/3": "aspect-[4/3]",
|
|
9
|
+
"1/1": "aspect-square",
|
|
10
|
+
"21/9": "aspect-[21/9]",
|
|
11
|
+
auto: "aspect-auto",
|
|
12
|
+
},
|
|
13
|
+
}),
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
ratio: "16/9",
|
|
16
|
+
},
|
|
17
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type VariantProps } from "../../libs";
|
|
2
|
+
import { getAspectRatioClasses } from "./constants";
|
|
3
|
+
|
|
4
|
+
export type AspectRatioProps = React.HTMLAttributes<HTMLDivElement> &
|
|
5
|
+
VariantProps<typeof getAspectRatioClasses> & {
|
|
6
|
+
value?: number; // Custom ratio value (width/height)
|
|
7
|
+
};
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
import { cva } from "../../libs";
|
|
2
|
+
import { createVariants } from "../../utilities";
|
|
2
3
|
|
|
3
4
|
export const getAvatarClasses = cva("avatar", {
|
|
4
|
-
variants: {
|
|
5
|
+
variants: createVariants({
|
|
5
6
|
size: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
32: "w-32 h-32",
|
|
12
|
-
48: "w-48 h-48",
|
|
13
|
-
64: "w-64 h-64",
|
|
7
|
+
xs: "w-6 h-6",
|
|
8
|
+
sm: "w-12 h-12",
|
|
9
|
+
md: "w-16 h-16",
|
|
10
|
+
lg: "w-24 h-24",
|
|
11
|
+
xl: "w-32 h-32",
|
|
14
12
|
},
|
|
15
13
|
status: {
|
|
16
14
|
online: "avatar-online",
|
|
17
15
|
offline: "avatar-offline",
|
|
18
16
|
},
|
|
19
|
-
},
|
|
17
|
+
}),
|
|
20
18
|
});
|
|
21
19
|
|
|
22
20
|
const classesConfig = {
|
|
23
|
-
variants: {
|
|
21
|
+
variants: createVariants({
|
|
24
22
|
variant: {
|
|
25
23
|
accent: "bg-accent text-accent-content ring-accent",
|
|
26
24
|
default: "bg-base-200 text-base-content ring-default",
|
|
@@ -43,24 +41,21 @@ const classesConfig = {
|
|
|
43
41
|
ring: {
|
|
44
42
|
true: "ring-3 ring-offset-base-100 ring-offset-2",
|
|
45
43
|
},
|
|
46
|
-
},
|
|
44
|
+
}),
|
|
47
45
|
};
|
|
48
46
|
|
|
49
47
|
export const getAvatarImageClasses = cva("", classesConfig);
|
|
50
48
|
|
|
51
49
|
export const getAvatarFallbackClasses = cva("flex items-center justify-center w-full", {
|
|
52
50
|
...classesConfig,
|
|
53
|
-
variants: {
|
|
51
|
+
variants: createVariants({
|
|
54
52
|
...classesConfig.variants,
|
|
55
53
|
size: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
32: "text-3xl",
|
|
62
|
-
48: "text-4xl",
|
|
63
|
-
64: "text-5xl",
|
|
54
|
+
xs: "text-xs",
|
|
55
|
+
sm: "text-sm",
|
|
56
|
+
md: "text-base",
|
|
57
|
+
lg: "text-lg",
|
|
58
|
+
xl: "text-xl",
|
|
64
59
|
},
|
|
65
|
-
},
|
|
60
|
+
}),
|
|
66
61
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { cva } from "../../libs";
|
|
2
|
+
import { createVariants } from "../../utilities";
|
|
2
3
|
|
|
3
4
|
export const getBadgeClasses = cva("badge", {
|
|
4
|
-
variants: {
|
|
5
|
+
variants: createVariants({
|
|
5
6
|
variant: {
|
|
6
7
|
accent: "badge-accent",
|
|
7
8
|
error: "badge-error",
|
|
@@ -28,7 +29,7 @@ export const getBadgeClasses = cva("badge", {
|
|
|
28
29
|
md: "rounded-md",
|
|
29
30
|
lg: "rounded-lg",
|
|
30
31
|
},
|
|
31
|
-
},
|
|
32
|
+
}),
|
|
32
33
|
compoundVariants: [
|
|
33
34
|
{
|
|
34
35
|
size: undefined,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { X } from "lucide-react";
|
|
3
|
+
import { cn } from "../../utilities";
|
|
4
|
+
import { getBannerClasses } from "./constants";
|
|
5
|
+
import { type BannerProps } from "./types";
|
|
6
|
+
|
|
7
|
+
export const Banner = React.forwardRef<HTMLDivElement, BannerProps>(
|
|
8
|
+
(
|
|
9
|
+
{ className, variant, border, icon, title, description, action, onClose, children, ...props },
|
|
10
|
+
ref
|
|
11
|
+
) => {
|
|
12
|
+
return (
|
|
13
|
+
<div
|
|
14
|
+
ref={ref}
|
|
15
|
+
role="alert"
|
|
16
|
+
className={cn(getBannerClasses({ variant, border }), className)}
|
|
17
|
+
{...props}
|
|
18
|
+
>
|
|
19
|
+
{icon && <div className="flex-none">{icon}</div>}
|
|
20
|
+
<div className="flex-1">
|
|
21
|
+
{title && <h3 className="font-bold">{title}</h3>}
|
|
22
|
+
{description && <div className="text-xs">{description}</div>}
|
|
23
|
+
{children}
|
|
24
|
+
</div>
|
|
25
|
+
{action && <div className="flex-none">{action}</div>}
|
|
26
|
+
{onClose && (
|
|
27
|
+
<button onClick={onClose} className="btn btn-sm btn-ghost btn-circle" aria-label="Close">
|
|
28
|
+
<X className="h-4 w-4" />
|
|
29
|
+
</button>
|
|
30
|
+
)}
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
Banner.displayName = "Banner";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cva } from "../../libs";
|
|
2
|
+
import { createVariants } from "../../utilities";
|
|
3
|
+
|
|
4
|
+
export const getBannerClasses = cva("alert alert-vertical sm:alert-horizontal", {
|
|
5
|
+
variants: createVariants({
|
|
6
|
+
variant: {
|
|
7
|
+
info: "alert-info",
|
|
8
|
+
success: "alert-success",
|
|
9
|
+
warning: "alert-warning",
|
|
10
|
+
error: "alert-error",
|
|
11
|
+
},
|
|
12
|
+
border: {
|
|
13
|
+
solid: "alert-outline",
|
|
14
|
+
dashed: "alert-dash",
|
|
15
|
+
none: "alert-soft",
|
|
16
|
+
},
|
|
17
|
+
}),
|
|
18
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VariantProps } from "../../libs";
|
|
2
|
+
import { getBannerClasses } from "./constants";
|
|
3
|
+
|
|
4
|
+
export type BannerProps = React.HTMLAttributes<HTMLDivElement> &
|
|
5
|
+
VariantProps<typeof getBannerClasses> & {
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
action?: React.ReactNode;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { cn } from "../../utilities";
|
|
3
|
+
import { getBlockquoteClasses } from "./constants";
|
|
4
|
+
import { type BlockquoteProps } from "./types";
|
|
5
|
+
|
|
6
|
+
export const Blockquote = React.forwardRef<HTMLQuoteElement, BlockquoteProps>(
|
|
7
|
+
({ className, variant, cite, children, ...props }, ref) => {
|
|
8
|
+
return (
|
|
9
|
+
<blockquote
|
|
10
|
+
ref={ref}
|
|
11
|
+
cite={cite}
|
|
12
|
+
className={cn(getBlockquoteClasses({ variant }), className)}
|
|
13
|
+
{...props}
|
|
14
|
+
>
|
|
15
|
+
{children}
|
|
16
|
+
</blockquote>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
Blockquote.displayName = "Blockquote";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { cva } from "../../libs";
|
|
2
|
+
import { createVariants } from "../../utilities";
|
|
3
|
+
|
|
4
|
+
export const getBlockquoteClasses = cva("border-l-4 pl-4 italic", {
|
|
5
|
+
variants: createVariants({
|
|
6
|
+
variant: {
|
|
7
|
+
default: "border-base-content/20 text-base-content/80",
|
|
8
|
+
primary: "border-primary text-primary/80",
|
|
9
|
+
secondary: "border-secondary text-secondary/80",
|
|
10
|
+
accent: "border-accent text-accent/80",
|
|
11
|
+
error: "border-error text-error/80",
|
|
12
|
+
success: "border-success text-success/80",
|
|
13
|
+
warning: "border-warning text-warning/80",
|
|
14
|
+
ghost: "border-none text-base-content/80",
|
|
15
|
+
info: "border-info text-info/80",
|
|
16
|
+
neutral: "border-neutral text-neutral/80",
|
|
17
|
+
},
|
|
18
|
+
}),
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "default",
|
|
21
|
+
},
|
|
22
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { cn } from "../../utilities";
|
|
3
|
+
import { getBoxClasses } from "./constants";
|
|
4
|
+
import { type BoxProps } from "./types";
|
|
5
|
+
|
|
6
|
+
export const Box = React.forwardRef<HTMLDivElement, BoxProps>(
|
|
7
|
+
({ className, display, position, overflow, children, ...props }, ref) => {
|
|
8
|
+
return (
|
|
9
|
+
<div
|
|
10
|
+
ref={ref}
|
|
11
|
+
className={cn(getBoxClasses({ display, position, overflow }), className)}
|
|
12
|
+
{...props}
|
|
13
|
+
>
|
|
14
|
+
{children}
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
Box.displayName = "Box";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { cva } from "../../libs";
|
|
2
|
+
import { createVariants } from "../../utilities";
|
|
3
|
+
|
|
4
|
+
export const getBoxClasses = cva("", {
|
|
5
|
+
variants: createVariants({
|
|
6
|
+
display: {
|
|
7
|
+
block: "block",
|
|
8
|
+
inline: "inline",
|
|
9
|
+
"inline-block": "inline-block",
|
|
10
|
+
flex: "flex",
|
|
11
|
+
"inline-flex": "inline-flex",
|
|
12
|
+
grid: "grid",
|
|
13
|
+
"inline-grid": "inline-grid",
|
|
14
|
+
hidden: "hidden",
|
|
15
|
+
},
|
|
16
|
+
position: {
|
|
17
|
+
static: "static",
|
|
18
|
+
fixed: "fixed",
|
|
19
|
+
absolute: "absolute",
|
|
20
|
+
relative: "relative",
|
|
21
|
+
sticky: "sticky",
|
|
22
|
+
},
|
|
23
|
+
overflow: {
|
|
24
|
+
auto: "overflow-auto",
|
|
25
|
+
hidden: "overflow-hidden",
|
|
26
|
+
visible: "overflow-visible",
|
|
27
|
+
scroll: "overflow-scroll",
|
|
28
|
+
"x-auto": "overflow-x-auto",
|
|
29
|
+
"y-auto": "overflow-y-auto",
|
|
30
|
+
"x-hidden": "overflow-x-hidden",
|
|
31
|
+
"y-hidden": "overflow-y-hidden",
|
|
32
|
+
},
|
|
33
|
+
}),
|
|
34
|
+
});
|
|
@@ -8,7 +8,7 @@ export type BreadcrumbListProps = React.HTMLAttributes<HTMLUListElement>;
|
|
|
8
8
|
|
|
9
9
|
export type BreadcrumbItemProps = React.HTMLAttributes<HTMLLIElement>;
|
|
10
10
|
|
|
11
|
-
export type BreadcrumbLinkProps = React.
|
|
11
|
+
export type BreadcrumbLinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
12
12
|
asChild?: boolean;
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -14,6 +14,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
14
14
|
children,
|
|
15
15
|
isLoading,
|
|
16
16
|
variant,
|
|
17
|
+
link,
|
|
17
18
|
size,
|
|
18
19
|
wide,
|
|
19
20
|
rounded,
|
|
@@ -29,7 +30,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
29
30
|
ref={ref}
|
|
30
31
|
disabled={disabled}
|
|
31
32
|
className={cn(
|
|
32
|
-
getButtonClasses({ size, wide, outline, variant, rounded, disabled, isLoading }),
|
|
33
|
+
getButtonClasses({ size, wide, link, outline, variant, rounded, disabled, isLoading }),
|
|
33
34
|
className
|
|
34
35
|
)}
|
|
35
36
|
{...props}
|
|
@@ -40,9 +41,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
40
41
|
className="absolute left-0 top-0 flex h-full w-full items-center justify-center bg-[inherit]"
|
|
41
42
|
data-testid="loading"
|
|
42
43
|
>
|
|
43
|
-
<Loading
|
|
44
|
-
intent={!variant || variant === "link" || variant === "ghost" ? "default" : variant}
|
|
45
|
-
/>
|
|
44
|
+
<Loading variant={!variant || variant === "ghost" ? "default" : variant} />
|
|
46
45
|
</span>
|
|
47
46
|
) : null}
|
|
48
47
|
</Comp>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { cva } from "../../libs";
|
|
2
|
+
import { createVariants } from "../../utilities";
|
|
2
3
|
|
|
3
4
|
export const getButtonClasses = cva("btn", {
|
|
4
|
-
variants: {
|
|
5
|
+
variants: createVariants({
|
|
5
6
|
variant: {
|
|
6
7
|
accent: "btn-accent",
|
|
7
8
|
default: "btn-default",
|
|
8
9
|
error: "btn-error",
|
|
9
10
|
ghost: "btn-ghost",
|
|
10
11
|
info: "btn-info",
|
|
11
|
-
link: "btn-link",
|
|
12
12
|
neutral: "btn-neutral",
|
|
13
13
|
primary: "btn-primary",
|
|
14
14
|
secondary: "btn-secondary",
|
|
@@ -18,6 +18,9 @@ export const getButtonClasses = cva("btn", {
|
|
|
18
18
|
outline: {
|
|
19
19
|
true: "btn-outline",
|
|
20
20
|
},
|
|
21
|
+
link: {
|
|
22
|
+
true: "btn-link",
|
|
23
|
+
},
|
|
21
24
|
rounded: {
|
|
22
25
|
xs: "rounded-xs",
|
|
23
26
|
sm: "rounded-sm",
|
|
@@ -39,7 +42,7 @@ export const getButtonClasses = cva("btn", {
|
|
|
39
42
|
disabled: {
|
|
40
43
|
true: "",
|
|
41
44
|
},
|
|
42
|
-
},
|
|
45
|
+
}),
|
|
43
46
|
compoundVariants: [
|
|
44
47
|
{
|
|
45
48
|
size: undefined,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { cva } from "../../libs";
|
|
2
|
+
import { createVariants } from "../../utilities";
|
|
2
3
|
|
|
3
4
|
export const getCardClasses = cva("card", {
|
|
4
|
-
variants: {
|
|
5
|
+
variants: createVariants({
|
|
5
6
|
border: {
|
|
6
7
|
solid: "card-border",
|
|
7
8
|
dash: "card-dash",
|
|
@@ -19,5 +20,5 @@ export const getCardClasses = cva("card", {
|
|
|
19
20
|
overlay: {
|
|
20
21
|
true: "image-full",
|
|
21
22
|
},
|
|
22
|
-
},
|
|
23
|
+
}),
|
|
23
24
|
});
|