@mbao01/common 0.0.41 → 0.0.43
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/Accordion/Accordion.d.ts +1 -1
- package/dist/types/components/Accordion/constants.d.ts +3 -3
- package/dist/types/components/Accordion/index.d.ts +1 -1
- package/dist/types/components/Accordion/types.d.ts +0 -1
- package/dist/types/components/Alert/Alert.d.ts +1 -1
- package/dist/types/components/Alert/constants.d.ts +1 -1
- package/dist/types/components/Alert/index.d.ts +1 -1
- package/dist/types/components/Alert/types.d.ts +2 -3
- package/dist/types/components/AlertDialog/AlertDialog.d.ts +3 -3
- package/dist/types/components/AlertDialog/constants.d.ts +1 -1
- package/dist/types/components/AlertDialog/index.d.ts +1 -1
- package/dist/types/components/AlertDialog/types.d.ts +3 -4
- package/dist/types/components/Anchor/Anchor.d.ts +1 -1
- package/dist/types/components/Anchor/constant.d.ts +1 -1
- package/dist/types/components/Anchor/index.d.ts +1 -1
- package/dist/types/components/Anchor/types.d.ts +2 -3
- package/dist/types/components/Avatar/Avatar.d.ts +1 -1
- package/dist/types/components/Avatar/constants.d.ts +3 -3
- package/dist/types/components/Avatar/index.d.ts +1 -1
- package/dist/types/components/Avatar/types.d.ts +2 -3
- package/dist/types/components/Badge/Badge.d.ts +1 -1
- package/dist/types/components/Badge/constants.d.ts +1 -1
- package/dist/types/components/Badge/types.d.ts +2 -3
- package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/types/components/Breadcrumbs/index.d.ts +1 -1
- package/dist/types/components/Breadcrumbs/types.d.ts +0 -1
- package/dist/types/components/Button/Button.d.ts +3 -3
- package/dist/types/components/Button/constants.d.ts +1 -1
- package/dist/types/components/Button/index.d.ts +1 -1
- package/dist/types/components/Button/types.d.ts +3 -3
- package/dist/types/components/Calendar/Calendar.d.ts +1 -1
- package/dist/types/components/Calendar/index.d.ts +1 -1
- package/dist/types/components/Calendar/types.d.ts +1 -2
- package/dist/types/components/Card/Card.d.ts +1 -1
- package/dist/types/components/Card/constants.d.ts +1 -1
- package/dist/types/components/Card/index.d.ts +1 -1
- package/dist/types/components/Card/types.d.ts +3 -3
- package/dist/types/components/Carousel/Carousel.d.ts +11 -12
- package/dist/types/components/Carousel/CarouselContext.d.ts +2 -3
- package/dist/types/components/Carousel/constants.d.ts +4 -4
- package/dist/types/components/Carousel/index.d.ts +1 -1
- package/dist/types/components/Carousel/types.d.ts +1 -2
- package/dist/types/components/Carousel/useCarousel.d.ts +1 -1
- package/dist/types/components/Collapsible/Collapsible.d.ts +3 -4
- package/dist/types/components/Collapsible/index.d.ts +1 -1
- package/dist/types/components/Collapsible/types.d.ts +0 -1
- package/dist/types/components/Combobox/Combobox.d.ts +1 -1
- package/dist/types/components/Combobox/index.d.ts +1 -1
- package/dist/types/components/Command/Command.d.ts +24 -24
- package/dist/types/components/Command/constants.d.ts +11 -11
- package/dist/types/components/Command/index.d.ts +1 -1
- package/dist/types/components/Command/types.d.ts +4 -5
- package/dist/types/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/types/components/DatePicker/DateRangePicker.d.ts +1 -1
- package/dist/types/components/DatePicker/MultipleDatesPicker.d.ts +1 -1
- package/dist/types/components/DatePicker/index.d.ts +3 -3
- package/dist/types/components/DatePicker/types.d.ts +6 -7
- package/dist/types/components/Description/Description.d.ts +1 -1
- package/dist/types/components/Description/index.d.ts +1 -1
- package/dist/types/components/Description/types.d.ts +0 -1
- package/dist/types/components/Dialog/Dialog.d.ts +3 -3
- package/dist/types/components/Dialog/constants.d.ts +7 -7
- package/dist/types/components/Dialog/index.d.ts +1 -1
- package/dist/types/components/Dialog/types.d.ts +2 -3
- package/dist/types/components/Drawer/Drawer.d.ts +15 -20
- package/dist/types/components/Drawer/constants.d.ts +6 -6
- package/dist/types/components/Drawer/index.d.ts +1 -1
- package/dist/types/components/Drawer/types.d.ts +1 -2
- package/dist/types/components/FileUploader/FileUploader.d.ts +4 -5
- package/dist/types/components/FileUploader/FileUploaderContext.d.ts +2 -3
- package/dist/types/components/FileUploader/index.d.ts +1 -1
- package/dist/types/components/FileUploader/types.d.ts +2 -2
- package/dist/types/components/FileUploader/useFileUpload.d.ts +1 -1
- package/dist/types/components/Form/Checkbox/constants.d.ts +1 -1
- package/dist/types/components/Form/Checkbox/index.d.ts +1 -1
- package/dist/types/components/Form/Checkbox/types.d.ts +2 -3
- package/dist/types/components/Form/Input/Input.d.ts +2 -2
- package/dist/types/components/Form/Input/constants.d.ts +1 -1
- package/dist/types/components/Form/Input/index.d.ts +1 -1
- package/dist/types/components/Form/Input/types.d.ts +2 -3
- package/dist/types/components/Form/OtpInput/OtpInput.d.ts +1 -1
- package/dist/types/components/Form/OtpInput/index.d.ts +1 -1
- package/dist/types/components/Form/OtpInput/types.d.ts +2 -2
- package/dist/types/components/Form/Phone/Phone.d.ts +2 -2
- package/dist/types/components/Form/Phone/constants.d.ts +2 -2
- package/dist/types/components/Form/Phone/index.d.ts +1 -1
- package/dist/types/components/Form/Phone/types.d.ts +1 -1
- package/dist/types/components/Form/Radio/constants.d.ts +1 -1
- package/dist/types/components/Form/Radio/index.d.ts +1 -1
- package/dist/types/components/Form/Radio/types.d.ts +2 -3
- package/dist/types/components/Form/Range/Range.d.ts +1 -1
- package/dist/types/components/Form/Range/constants.d.ts +1 -1
- package/dist/types/components/Form/Range/index.d.ts +1 -1
- package/dist/types/components/Form/Range/types.d.ts +2 -3
- package/dist/types/components/Form/Select/Select.d.ts +2 -2
- package/dist/types/components/Form/Select/constants.d.ts +6 -6
- package/dist/types/components/Form/Select/index.d.ts +1 -1
- package/dist/types/components/Form/Select/types.d.ts +2 -3
- package/dist/types/components/Form/Slider/constants.d.ts +4 -4
- package/dist/types/components/Form/Slider/index.d.ts +1 -1
- package/dist/types/components/Form/Slider/types.d.ts +2 -3
- package/dist/types/components/Form/Switch/constants.d.ts +1 -1
- package/dist/types/components/Form/Switch/index.d.ts +1 -1
- package/dist/types/components/Form/Switch/types.d.ts +2 -3
- package/dist/types/components/Form/TextField/TextField.d.ts +3 -3
- package/dist/types/components/Form/TextField/constants.d.ts +1 -1
- package/dist/types/components/Form/TextField/index.d.ts +1 -1
- package/dist/types/components/Form/TextField/types.d.ts +2 -2
- package/dist/types/components/Form/Textarea/Textarea.d.ts +1 -1
- package/dist/types/components/Form/Textarea/constants.d.ts +1 -1
- package/dist/types/components/Form/Textarea/index.d.ts +1 -1
- package/dist/types/components/Form/Textarea/types.d.ts +2 -3
- package/dist/types/components/Form/components/FormControl/FormControl.d.ts +1 -1
- package/dist/types/components/Form/components/FormControl/constants.d.ts +1 -1
- package/dist/types/components/Form/components/FormControl/index.d.ts +1 -1
- package/dist/types/components/Form/components/FormControl/types.d.ts +2 -3
- package/dist/types/components/Form/components/Label/Label.d.ts +1 -1
- package/dist/types/components/Form/components/Label/constants.d.ts +1 -1
- package/dist/types/components/Form/components/Label/index.d.ts +1 -1
- package/dist/types/components/Form/components/Label/types.d.ts +3 -4
- package/dist/types/components/Form/index.d.ts +13 -13
- package/dist/types/components/HoverCard/HoverCard.d.ts +3 -4
- package/dist/types/components/HoverCard/constants.d.ts +1 -1
- package/dist/types/components/HoverCard/index.d.ts +1 -1
- package/dist/types/components/HoverCard/types.d.ts +0 -1
- package/dist/types/components/Loading/Loading.d.ts +1 -1
- package/dist/types/components/Loading/constants.d.ts +1 -1
- package/dist/types/components/Loading/index.d.ts +1 -1
- package/dist/types/components/Loading/types.d.ts +2 -3
- package/dist/types/components/Menu/ContextMenu/ContextMenu.d.ts +19 -20
- package/dist/types/components/Menu/ContextMenu/index.d.ts +1 -1
- package/dist/types/components/Menu/ContextMenu/types.d.ts +2 -3
- package/dist/types/components/Menu/DropdownMenu/DropdownMenu.d.ts +19 -20
- package/dist/types/components/Menu/DropdownMenu/index.d.ts +1 -1
- package/dist/types/components/Menu/DropdownMenu/types.d.ts +2 -3
- package/dist/types/components/Menu/Menubar/constants.d.ts +11 -11
- package/dist/types/components/Menu/Menubar/index.d.ts +1 -1
- package/dist/types/components/Menu/Menubar/types.d.ts +2 -3
- package/dist/types/components/Menu/NavigationMenu/NavigationMenu.d.ts +9 -10
- package/dist/types/components/Menu/NavigationMenu/constants.d.ts +6 -6
- package/dist/types/components/Menu/NavigationMenu/index.d.ts +1 -1
- package/dist/types/components/Menu/NavigationMenu/types.d.ts +2 -3
- package/dist/types/components/Menu/index.d.ts +4 -4
- package/dist/types/components/Pagination/Pagination.d.ts +3 -4
- package/dist/types/components/Pagination/constants.d.ts +5 -5
- package/dist/types/components/Pagination/index.d.ts +1 -1
- package/dist/types/components/Pagination/types.d.ts +2 -3
- package/dist/types/components/Popover/Popover.d.ts +1 -1
- package/dist/types/components/Popover/constants.d.ts +1 -1
- package/dist/types/components/Popover/index.d.ts +1 -1
- package/dist/types/components/Popover/types.d.ts +2 -3
- package/dist/types/components/Progress/Progress.d.ts +1 -1
- package/dist/types/components/Progress/constants.d.ts +2 -2
- package/dist/types/components/Progress/index.d.ts +1 -1
- package/dist/types/components/Progress/types.d.ts +2 -3
- package/dist/types/components/ScrollArea/ScrollArea.d.ts +3 -4
- package/dist/types/components/ScrollArea/constants.d.ts +4 -4
- package/dist/types/components/ScrollArea/index.d.ts +1 -1
- package/dist/types/components/ScrollArea/types.d.ts +2 -3
- package/dist/types/components/Separator/Separator.d.ts +1 -1
- package/dist/types/components/Separator/constants.d.ts +1 -1
- package/dist/types/components/Separator/index.d.ts +1 -1
- package/dist/types/components/Separator/types.d.ts +0 -1
- package/dist/types/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/types/components/Skeleton/constants.d.ts +1 -1
- package/dist/types/components/Skeleton/index.d.ts +1 -1
- package/dist/types/components/Skeleton/types.d.ts +2 -3
- package/dist/types/components/Slot/Slot.d.ts +1 -1
- package/dist/types/components/Slot/index.d.ts +1 -1
- package/dist/types/components/Sonner/Toaster.d.ts +1 -1
- package/dist/types/components/Sonner/constants.d.ts +2 -2
- package/dist/types/components/Sonner/index.d.ts +2 -2
- package/dist/types/components/Sonner/types.d.ts +3 -4
- package/dist/types/components/Table/Table.d.ts +8 -9
- package/dist/types/components/Table/constants.d.ts +2 -2
- package/dist/types/components/Table/index.d.ts +1 -1
- package/dist/types/components/Table/types.d.ts +2 -3
- package/dist/types/components/Tabs/Tabs.d.ts +1 -1
- package/dist/types/components/Tabs/constants.d.ts +3 -3
- package/dist/types/components/Tabs/index.d.ts +1 -1
- package/dist/types/components/Tabs/types.d.ts +2 -3
- package/dist/types/components/Text/Text.d.ts +1 -1
- package/dist/types/components/Text/constants.d.ts +1 -1
- package/dist/types/components/Text/types.d.ts +2 -3
- package/dist/types/components/ThemeSwitch/ThemeSwitch.d.ts +1 -1
- package/dist/types/components/ThemeSwitch/constants.d.ts +1 -1
- package/dist/types/components/ThemeSwitch/index.d.ts +1 -1
- package/dist/types/components/ThemeSwitch/types.d.ts +1 -2
- package/dist/types/components/Toggle/Toggle.d.ts +1 -1
- package/dist/types/components/Toggle/constants.d.ts +1 -1
- package/dist/types/components/Toggle/index.d.ts +1 -1
- package/dist/types/components/Toggle/types.d.ts +3 -4
- package/dist/types/components/ToggleGroup/ToggleGroup.d.ts +4 -5
- package/dist/types/components/ToggleGroup/constants.d.ts +1 -1
- package/dist/types/components/ToggleGroup/index.d.ts +1 -1
- package/dist/types/components/ToggleGroup/types.d.ts +1 -2
- package/dist/types/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/types/components/Tooltip/constants.d.ts +2 -2
- package/dist/types/components/Tooltip/index.d.ts +1 -1
- package/dist/types/components/Tooltip/types.d.ts +2 -3
- package/dist/types/index.d.ts +36 -36
- package/dist/types/libs/cva.d.ts +2 -2
- package/dist/types/libs/index.d.ts +1 -1
- package/dist/types/utilities/cn.d.ts +1 -1
- package/dist/types/utilities/getSubpaths/getSubpaths.d.ts +1 -1
- package/dist/types/utilities/getSubpaths/index.d.ts +1 -1
- package/dist/types/utilities/index.d.ts +3 -3
- package/package.json +82 -73
- package/src/components/Accordion/Accordion.tsx +3 -9
- package/src/components/Accordion/types.ts +2 -6
- package/src/components/Alert/Alert.tsx +3 -14
- package/src/components/AlertDialog/AlertDialog.tsx +3 -6
- package/src/components/AlertDialog/types.ts +3 -5
- package/src/components/Anchor/Anchor.tsx +3 -5
- package/src/components/Avatar/Avatar.tsx +5 -25
- package/src/components/Avatar/constants.ts +15 -18
- package/src/components/Avatar/types.ts +1 -5
- package/src/components/Badge/Badge.tsx +2 -12
- package/src/components/Badge/index.ts +1 -1
- package/src/components/Button/Button.tsx +5 -21
- package/src/components/Button/constants.ts +1 -1
- package/src/components/Button/types.ts +1 -1
- package/src/components/Calendar/Calendar.tsx +40 -34
- package/src/components/Card/Card.tsx +4 -14
- package/src/components/Card/types.ts +1 -2
- package/src/components/Carousel/Carousel.tsx +68 -73
- package/src/components/Carousel/constants.ts +10 -13
- package/src/components/Carousel/types.ts +1 -1
- package/src/components/Collapsible/Collapsible.tsx +2 -4
- package/src/components/Collapsible/types.ts +1 -3
- package/src/components/Combobox/Combobox.tsx +3 -8
- package/src/components/Command/Command.tsx +11 -28
- package/src/components/Command/constants.ts +2 -6
- package/src/components/Command/types.ts +3 -7
- package/src/components/DatePicker/DatePicker.tsx +5 -9
- package/src/components/DatePicker/DateRangePicker.tsx +5 -9
- package/src/components/DatePicker/MultipleDatesPicker.tsx +6 -10
- package/src/components/DatePicker/types.ts +12 -23
- package/src/components/Description/Description.tsx +4 -19
- package/src/components/Dialog/Dialog.tsx +5 -9
- package/src/components/Dialog/constants.ts +2 -6
- package/src/components/Dialog/types.ts +5 -15
- package/src/components/Drawer/Drawer.tsx +6 -19
- package/src/components/Drawer/constants.ts +2 -6
- package/src/components/FileUploader/FileUploader.tsx +31 -53
- package/src/components/FileUploader/FileUploaderContext.tsx +1 -2
- package/src/components/FileUploader/types.ts +1 -1
- package/src/components/Form/Checkbox/Checkbox.tsx +2 -2
- package/src/components/Form/Checkbox/types.ts +1 -4
- package/src/components/Form/Input/Input.tsx +3 -9
- package/src/components/Form/Input/constants.ts +47 -50
- package/src/components/Form/Input/types.ts +1 -4
- package/src/components/Form/OtpInput/OtpInput.tsx +5 -12
- package/src/components/Form/Phone/Phone.tsx +6 -15
- package/src/components/Form/Radio/Radio.tsx +2 -2
- package/src/components/Form/Radio/types.ts +1 -4
- package/src/components/Form/Range/Range.tsx +3 -6
- package/src/components/Form/Range/types.ts +1 -4
- package/src/components/Form/Select/Select.tsx +26 -49
- package/src/components/Form/Select/types.ts +3 -9
- package/src/components/Form/Slider/Slider.tsx +39 -25
- package/src/components/Form/Slider/constants.ts +21 -24
- package/src/components/Form/Slider/types.ts +2 -4
- package/src/components/Form/Switch/Switch.tsx +2 -3
- package/src/components/Form/Switch/types.ts +1 -4
- package/src/components/Form/TextField/TextField.tsx +2 -2
- package/src/components/Form/Textarea/Textarea.tsx +2 -5
- package/src/components/Form/Textarea/constants.ts +42 -45
- package/src/components/Form/components/FormControl/FormControl.tsx +1 -1
- package/src/components/Form/components/Label/Label.tsx +2 -5
- package/src/components/Form/components/Label/types.ts +2 -4
- package/src/components/HoverCard/HoverCard.tsx +2 -4
- package/src/components/HoverCard/types.ts +1 -3
- package/src/components/Loading/Loading.tsx +3 -12
- package/src/components/Menu/ContextMenu/ContextMenu.tsx +5 -17
- package/src/components/Menu/ContextMenu/types.ts +1 -3
- package/src/components/Menu/DropdownMenu/DropdownMenu.tsx +7 -21
- package/src/components/Menu/DropdownMenu/types.ts +1 -3
- package/src/components/Menu/Menubar/Menubar.tsx +33 -49
- package/src/components/Menu/Menubar/types.ts +5 -15
- package/src/components/Menu/NavigationMenu/NavigationMenu.tsx +4 -13
- package/src/components/Pagination/Pagination.tsx +18 -42
- package/src/components/Pagination/constants.ts +2 -6
- package/src/components/Popover/Popover.tsx +1 -1
- package/src/components/Popover/types.ts +2 -6
- package/src/components/Progress/Progress.tsx +2 -4
- package/src/components/Progress/constants.ts +38 -44
- package/src/components/ScrollArea/ScrollArea.tsx +4 -16
- package/src/components/ScrollArea/constants.ts +8 -13
- package/src/components/ScrollArea/types.ts +1 -3
- package/src/components/Separator/Separator.tsx +2 -2
- package/src/components/Separator/types.ts +1 -3
- package/src/components/Skeleton/Skeleton.tsx +4 -14
- package/src/components/Sonner/Toaster.tsx +2 -4
- package/src/components/Sonner/constants.ts +10 -20
- package/src/components/Sonner/types.ts +4 -10
- package/src/components/Table/Table.tsx +23 -38
- package/src/components/Tabs/Tabs.tsx +9 -31
- package/src/components/Tabs/types.ts +5 -17
- package/src/components/Text/Text.tsx +3 -6
- package/src/components/Text/index.ts +1 -1
- package/src/components/Text/types.ts +1 -3
- package/src/components/ThemeSwitch/ThemeSwitch.tsx +3 -2
- package/src/components/Toggle/Toggle.tsx +15 -16
- package/src/components/Toggle/types.ts +2 -7
- package/src/components/ToggleGroup/ToggleGroup.tsx +5 -19
- package/src/components/ToggleGroup/constants.ts +1 -3
- package/src/components/ToggleGroup/types.ts +1 -3
- package/src/components/Tooltip/Tooltip.tsx +2 -4
- package/src/components/Tooltip/types.ts +1 -1
- package/src/libs/cva.ts +1 -3
- package/src/typography/TypographyDemo.tsx +119 -188
- package/src/typography/TypographyScale.tsx +7 -8
- package/src/utilities/cn.ts +2 -1
- package/src/utilities/getSubpaths/getSubpaths.ts +2 -4
- package/tsconfig.node.json +1 -1
- package/vitest-setup.ts +17 -1
- package/vitest.config.ts +2 -1
- package/dist/types/components/Menu/Menubar/Menubar.d.ts +0 -43
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mbao01/common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.43",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Ayomide Bakare",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,110 +49,119 @@
|
|
|
49
49
|
"*.css"
|
|
50
50
|
],
|
|
51
51
|
"scripts": {
|
|
52
|
+
"clean": "pnpx rimraf node_modules",
|
|
52
53
|
"dev": "storybook dev -p 6006",
|
|
53
54
|
"build": "tsc && vite build",
|
|
54
55
|
"build-storybook": "storybook build -o ../../docs/storybook/common",
|
|
55
56
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
57
|
+
"prettier": "prettier --check \"**/*.{ts,tsx}\"",
|
|
58
|
+
"prettier:write": "prettier --write \"**/*.{ts,tsx}\"",
|
|
56
59
|
"preview": "vite preview",
|
|
57
60
|
"prod": "pnpx http-server ../../docs/storybook/common --port 6006",
|
|
58
61
|
"test": "vitest run",
|
|
59
62
|
"test:coverage": "vitest run --coverage",
|
|
60
63
|
"test:ui": "vitest --ui",
|
|
61
64
|
"test:visual": "test-storybook --url http://127.0.0.1:6006",
|
|
65
|
+
"test:visual:coverage": "test-storybook --coverage",
|
|
62
66
|
"test:visual:ci": "test-storybook --ci --verbose --url http://127.0.0.1:6006",
|
|
63
67
|
"test:visual:watch": "test-storybook --watch",
|
|
64
68
|
"test:watch": "vitest"
|
|
65
69
|
},
|
|
66
70
|
"dependencies": {
|
|
67
|
-
"@radix-ui/react-accordion": "^1.
|
|
68
|
-
"@radix-ui/react-alert-dialog": "^1.
|
|
69
|
-
"@radix-ui/react-avatar": "^1.0
|
|
70
|
-
"@radix-ui/react-checkbox": "^1.
|
|
71
|
-
"@radix-ui/react-collapsible": "^1.0
|
|
72
|
-
"@radix-ui/react-context-menu": "^2.1
|
|
73
|
-
"@radix-ui/react-dialog": "^1.
|
|
74
|
-
"@radix-ui/react-dropdown-menu": "^2.
|
|
75
|
-
"@radix-ui/react-hover-card": "^1.
|
|
71
|
+
"@radix-ui/react-accordion": "^1.2.0",
|
|
72
|
+
"@radix-ui/react-alert-dialog": "^1.1.1",
|
|
73
|
+
"@radix-ui/react-avatar": "^1.1.0",
|
|
74
|
+
"@radix-ui/react-checkbox": "^1.1.1",
|
|
75
|
+
"@radix-ui/react-collapsible": "^1.1.0",
|
|
76
|
+
"@radix-ui/react-context-menu": "^2.2.1",
|
|
77
|
+
"@radix-ui/react-dialog": "^1.1.1",
|
|
78
|
+
"@radix-ui/react-dropdown-menu": "^2.1.1",
|
|
79
|
+
"@radix-ui/react-hover-card": "^1.1.1",
|
|
76
80
|
"@radix-ui/react-icons": "^1.3.0",
|
|
77
|
-
"@radix-ui/react-label": "^2.0
|
|
78
|
-
"@radix-ui/react-menubar": "^1.
|
|
79
|
-
"@radix-ui/react-navigation-menu": "^1.
|
|
80
|
-
"@radix-ui/react-popover": "^1.
|
|
81
|
-
"@radix-ui/react-progress": "^1.0
|
|
82
|
-
"@radix-ui/react-scroll-area": "^1.0
|
|
83
|
-
"@radix-ui/react-select": "^2.
|
|
84
|
-
"@radix-ui/react-separator": "^1.0
|
|
85
|
-
"@radix-ui/react-slider": "^1.
|
|
86
|
-
"@radix-ui/react-slot": "^1.0
|
|
87
|
-
"@radix-ui/react-tabs": "^1.0
|
|
88
|
-
"@radix-ui/react-toggle": "^1.0
|
|
89
|
-
"@radix-ui/react-toggle-group": "^1.0
|
|
90
|
-
"@radix-ui/react-tooltip": "^1.
|
|
91
|
-
"@tailwindcss/typography": "^0.5.
|
|
81
|
+
"@radix-ui/react-label": "^2.1.0",
|
|
82
|
+
"@radix-ui/react-menubar": "^1.1.1",
|
|
83
|
+
"@radix-ui/react-navigation-menu": "^1.2.0",
|
|
84
|
+
"@radix-ui/react-popover": "^1.1.1",
|
|
85
|
+
"@radix-ui/react-progress": "^1.1.0",
|
|
86
|
+
"@radix-ui/react-scroll-area": "^1.1.0",
|
|
87
|
+
"@radix-ui/react-select": "^2.1.1",
|
|
88
|
+
"@radix-ui/react-separator": "^1.1.0",
|
|
89
|
+
"@radix-ui/react-slider": "^1.2.0",
|
|
90
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
91
|
+
"@radix-ui/react-tabs": "^1.1.0",
|
|
92
|
+
"@radix-ui/react-toggle": "^1.1.0",
|
|
93
|
+
"@radix-ui/react-toggle-group": "^1.1.0",
|
|
94
|
+
"@radix-ui/react-tooltip": "^1.1.2",
|
|
95
|
+
"@tailwindcss/typography": "^0.5.15",
|
|
92
96
|
"class-variance-authority": "^0.7.0",
|
|
93
|
-
"clsx": "^2.1.
|
|
97
|
+
"clsx": "^2.1.1",
|
|
94
98
|
"cmdk": "^1.0.0",
|
|
95
|
-
"daisyui": "^4.
|
|
96
|
-
"
|
|
97
|
-
"embla-carousel-react": "^8.0.2",
|
|
98
|
-
"react-day-picker": "^8.10.0",
|
|
99
|
+
"daisyui": "^4.12.10",
|
|
100
|
+
"embla-carousel-react": "^8.3.0",
|
|
99
101
|
"react-dropzone": "^14.2.3",
|
|
100
|
-
"react-international-phone": "^4.
|
|
102
|
+
"react-international-phone": "^4.3.0",
|
|
101
103
|
"react-otp-input": "^3.1.1",
|
|
102
|
-
"sonner": "^1.
|
|
103
|
-
"tailwind-merge": "^2.2
|
|
104
|
+
"sonner": "^1.5.0",
|
|
105
|
+
"tailwind-merge": "^2.5.2",
|
|
104
106
|
"tailwindcss-animate": "^1.0.7",
|
|
105
|
-
"universal-cookie": "^7.
|
|
106
|
-
"vaul": "^0.
|
|
107
|
+
"universal-cookie": "^7.2.0",
|
|
108
|
+
"vaul": "^1.0.0"
|
|
107
109
|
},
|
|
108
110
|
"devDependencies": {
|
|
109
|
-
"@
|
|
110
|
-
"@storybook/addon-
|
|
111
|
-
"@storybook/addon-
|
|
112
|
-
"@storybook/addon-
|
|
113
|
-
"@storybook/addon-
|
|
114
|
-
"@storybook/addon-
|
|
115
|
-
"@storybook/
|
|
116
|
-
"@storybook/
|
|
117
|
-
"@storybook/
|
|
118
|
-
"@storybook/
|
|
111
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.3.1",
|
|
112
|
+
"@storybook/addon-a11y": "^8.3.4",
|
|
113
|
+
"@storybook/addon-coverage": "^1.0.4",
|
|
114
|
+
"@storybook/addon-essentials": "^8.3.4",
|
|
115
|
+
"@storybook/addon-interactions": "^8.3.4",
|
|
116
|
+
"@storybook/addon-links": "^8.3.4",
|
|
117
|
+
"@storybook/addon-onboarding": "^8.3.4",
|
|
118
|
+
"@storybook/addon-themes": "^8.3.4",
|
|
119
|
+
"@storybook/addon-viewport": "^8.3.4",
|
|
120
|
+
"@storybook/blocks": "^8.3.4",
|
|
121
|
+
"@storybook/react": "^8.3.4",
|
|
122
|
+
"@storybook/react-vite": "^8.3.4",
|
|
123
|
+
"@storybook/test": "^8.3.4",
|
|
119
124
|
"@storybook/test-runner": "^0.19.1",
|
|
120
|
-
"@testing-library/jest-dom": "^6.
|
|
121
|
-
"@testing-library/react": "^
|
|
125
|
+
"@testing-library/jest-dom": "^6.5.0",
|
|
126
|
+
"@testing-library/react": "^16.0.1",
|
|
122
127
|
"@testing-library/user-event": "^14.5.2",
|
|
123
128
|
"@types/jest-image-snapshot": "^6.4.0",
|
|
124
|
-
"@types/node": "^
|
|
125
|
-
"@types/react": "^18.
|
|
126
|
-
"@types/react-dom": "^18.
|
|
127
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
128
|
-
"@typescript-eslint/parser": "^
|
|
129
|
-
"@vitejs/plugin-react": "^4.
|
|
130
|
-
"@vitest/coverage-v8": "^1.
|
|
131
|
-
"@vitest/ui": "^1.
|
|
132
|
-
"autoprefixer": "^10.4.
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"eslint
|
|
136
|
-
"eslint-plugin-react
|
|
137
|
-
"eslint-plugin-
|
|
129
|
+
"@types/node": "^22.7.4",
|
|
130
|
+
"@types/react": "^18.3.10",
|
|
131
|
+
"@types/react-dom": "^18.3.0",
|
|
132
|
+
"@typescript-eslint/eslint-plugin": "^8.7.0",
|
|
133
|
+
"@typescript-eslint/parser": "^8.7.0",
|
|
134
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
135
|
+
"@vitest/coverage-v8": "^2.1.1",
|
|
136
|
+
"@vitest/ui": "^2.1.1",
|
|
137
|
+
"autoprefixer": "^10.4.20",
|
|
138
|
+
"axe-playwright": "^2.0.3",
|
|
139
|
+
"date-fns": "^4.1.0",
|
|
140
|
+
"eslint": "^8.57.1",
|
|
141
|
+
"eslint-plugin-react": "^7.37.0",
|
|
142
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
143
|
+
"eslint-plugin-react-refresh": "^0.4.12",
|
|
144
|
+
"eslint-plugin-storybook": "^0.9.0",
|
|
138
145
|
"jest-image-snapshot": "^6.4.0",
|
|
139
|
-
"jsdom": "^
|
|
146
|
+
"jsdom": "^25.0.1",
|
|
140
147
|
"path": "^0.12.7",
|
|
141
|
-
"postcss": "^8.4.
|
|
142
|
-
"
|
|
143
|
-
"react
|
|
144
|
-
"react-
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
148
|
+
"postcss": "^8.4.47",
|
|
149
|
+
"prettier": "^3.3.3",
|
|
150
|
+
"react": "^18.3.1",
|
|
151
|
+
"react-day-picker": "^9.1.3",
|
|
152
|
+
"react-dom": "^18.3.1",
|
|
153
|
+
"react-router-dom": "^6.26.2",
|
|
154
|
+
"storybook": "^8.3.4",
|
|
155
|
+
"tailwindcss": "^3.4.13",
|
|
156
|
+
"typescript": "^5.6.2",
|
|
157
|
+
"vite": "^5.4.8",
|
|
158
|
+
"vite-plugin-dts": "^4.2.2",
|
|
159
|
+
"vitest": "^2.1.1"
|
|
151
160
|
},
|
|
152
161
|
"peerDependencies": {
|
|
153
162
|
"react": "^18.2.0",
|
|
154
163
|
"react-dom": "^18.2.0",
|
|
155
164
|
"typescript": "^5.2.2"
|
|
156
165
|
},
|
|
157
|
-
"gitHead": "
|
|
166
|
+
"gitHead": "a1d0e5c38ce829a3fcf38487bee6bfffba27e2b8"
|
|
158
167
|
}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
5
5
|
import type {
|
|
6
|
-
AccordionProps,
|
|
7
6
|
AccordionContentProps,
|
|
8
7
|
AccordionItemProps,
|
|
8
|
+
AccordionProps,
|
|
9
9
|
AccordionTriggerProps,
|
|
10
10
|
} from "./types";
|
|
11
11
|
import { cn } from "../../utilities";
|
|
@@ -15,9 +15,7 @@ import {
|
|
|
15
15
|
getAccordionTriggerClasses,
|
|
16
16
|
} from "./constants";
|
|
17
17
|
|
|
18
|
-
const Accordion = (props: AccordionProps) =>
|
|
19
|
-
<AccordionPrimitive.Root {...props} />
|
|
20
|
-
);
|
|
18
|
+
const Accordion = (props: AccordionProps) => <AccordionPrimitive.Root {...props} />;
|
|
21
19
|
|
|
22
20
|
const AccordionItem = React.forwardRef<
|
|
23
21
|
React.ElementRef<typeof AccordionPrimitive.Item>,
|
|
@@ -51,11 +49,7 @@ const AccordionContent = React.forwardRef<
|
|
|
51
49
|
React.ElementRef<typeof AccordionPrimitive.Content>,
|
|
52
50
|
AccordionContentProps
|
|
53
51
|
>(({ className, children, ...props }, ref) => (
|
|
54
|
-
<AccordionPrimitive.Content
|
|
55
|
-
ref={ref}
|
|
56
|
-
className={cn(getAccordionContentClasses())}
|
|
57
|
-
{...props}
|
|
58
|
-
>
|
|
52
|
+
<AccordionPrimitive.Content ref={ref} className={cn(getAccordionContentClasses())} {...props}>
|
|
59
53
|
<div className={cn("pb-4 pt-0", className)}>{children}</div>
|
|
60
54
|
</AccordionPrimitive.Content>
|
|
61
55
|
));
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
2
2
|
|
|
3
|
-
export type AccordionProps = React.ComponentPropsWithoutRef<
|
|
4
|
-
typeof AccordionPrimitive.Root
|
|
5
|
-
>;
|
|
3
|
+
export type AccordionProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>;
|
|
6
4
|
|
|
7
5
|
export type AccordionContentProps = React.ComponentPropsWithoutRef<
|
|
8
6
|
typeof AccordionPrimitive.Content
|
|
9
7
|
>;
|
|
10
8
|
|
|
11
|
-
export type AccordionItemProps = React.ComponentPropsWithoutRef<
|
|
12
|
-
typeof AccordionPrimitive.Item
|
|
13
|
-
>;
|
|
9
|
+
export type AccordionItemProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>;
|
|
14
10
|
|
|
15
11
|
export type AccordionTriggerProps = React.ComponentPropsWithoutRef<
|
|
16
12
|
typeof AccordionPrimitive.Trigger
|
|
@@ -1,24 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
AlertDescriptionProps,
|
|
3
|
-
AlertTitleProps,
|
|
4
|
-
AlertProps,
|
|
5
|
-
} from "./types";
|
|
1
|
+
import type { AlertDescriptionProps, AlertProps, AlertTitleProps } from "./types";
|
|
6
2
|
import { cn } from "../../utilities";
|
|
7
3
|
import { getAlertClasses } from "./constants";
|
|
8
4
|
|
|
9
5
|
const Alert = ({ variant, outline, className, ...props }: AlertProps) => (
|
|
10
|
-
<div
|
|
11
|
-
role="alert"
|
|
12
|
-
className={cn(getAlertClasses({ variant, outline }), className)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
6
|
+
<div role="alert" className={cn(getAlertClasses({ variant, outline }), className)} {...props} />
|
|
15
7
|
);
|
|
16
8
|
|
|
17
9
|
const AlertTitle = ({ className, ...props }: AlertTitleProps) => (
|
|
18
|
-
<h5
|
|
19
|
-
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
10
|
+
<h5 className={cn("mb-1 font-medium leading-none tracking-tight", className)} {...props} />
|
|
22
11
|
);
|
|
23
12
|
|
|
24
13
|
const AlertDescription = ({ className, ...props }: AlertDescriptionProps) => (
|
|
@@ -14,6 +14,7 @@ import type {
|
|
|
14
14
|
AlertDialogTitleProps,
|
|
15
15
|
} from "./types";
|
|
16
16
|
import { cn } from "../../utilities";
|
|
17
|
+
import { Button } from "../Button";
|
|
17
18
|
import {
|
|
18
19
|
getDialogContentClasses,
|
|
19
20
|
getDialogDescriptionClasses,
|
|
@@ -22,11 +23,8 @@ import {
|
|
|
22
23
|
getDialogOverlayClasses,
|
|
23
24
|
getDialogTitleClasses,
|
|
24
25
|
} from "../Dialog/constants";
|
|
25
|
-
import { Button } from "../Button";
|
|
26
26
|
|
|
27
|
-
const AlertDialog = (props: AlertDialogProps) =>
|
|
28
|
-
<AlertDialogPrimitive.Root {...props} />
|
|
29
|
-
);
|
|
27
|
+
const AlertDialog = (props: AlertDialogProps) => <AlertDialogPrimitive.Root {...props} />;
|
|
30
28
|
|
|
31
29
|
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
32
30
|
|
|
@@ -91,8 +89,7 @@ const AlertDialogDescription = React.forwardRef<
|
|
|
91
89
|
{...props}
|
|
92
90
|
/>
|
|
93
91
|
));
|
|
94
|
-
AlertDialogDescription.displayName =
|
|
95
|
-
AlertDialogPrimitive.Description.displayName;
|
|
92
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
96
93
|
|
|
97
94
|
const AlertDialogAction = React.forwardRef<
|
|
98
95
|
React.ElementRef<typeof AlertDialogPrimitive.Action>,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
2
2
|
import { type VariantProps } from "../../libs";
|
|
3
|
+
import { getButtonClasses } from "../Button/constants";
|
|
3
4
|
import {
|
|
4
5
|
getDialogContentClasses,
|
|
5
6
|
getDialogDescriptionClasses,
|
|
@@ -8,11 +9,8 @@ import {
|
|
|
8
9
|
getDialogOverlayClasses,
|
|
9
10
|
getDialogTitleClasses,
|
|
10
11
|
} from "../Dialog/constants";
|
|
11
|
-
import { getButtonClasses } from "../Button/constants";
|
|
12
12
|
|
|
13
|
-
export type AlertDialogProps = React.ComponentPropsWithoutRef<
|
|
14
|
-
typeof AlertDialogPrimitive.Root
|
|
15
|
-
>;
|
|
13
|
+
export type AlertDialogProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Root>;
|
|
16
14
|
|
|
17
15
|
export type AlertDialogOverlayProps = React.ComponentPropsWithoutRef<
|
|
18
16
|
typeof AlertDialogPrimitive.Overlay
|
|
@@ -43,7 +41,7 @@ export type AlertDialogDescriptionProps = React.ComponentPropsWithoutRef<
|
|
|
43
41
|
export type AlertDialogActionProps = React.ComponentPropsWithoutRef<
|
|
44
42
|
typeof AlertDialogPrimitive.Cancel
|
|
45
43
|
> &
|
|
46
|
-
VariantProps<typeof getButtonClasses>;
|
|
44
|
+
VariantProps<typeof getButtonClasses>;
|
|
47
45
|
|
|
48
46
|
export type AlertDialogCancelProps = React.ComponentPropsWithoutRef<
|
|
49
47
|
typeof AlertDialogPrimitive.Cancel
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExternalLinkIcon } from "@radix-ui/react-icons";
|
|
2
|
-
import { type AnchorProps } from "./types";
|
|
3
|
-
import { getAnchorClasses } from "./constant";
|
|
4
2
|
import { cn } from "../../utilities";
|
|
3
|
+
import { getAnchorClasses } from "./constant";
|
|
4
|
+
import { type AnchorProps } from "./types";
|
|
5
5
|
|
|
6
6
|
export const Anchor = ({
|
|
7
7
|
href,
|
|
@@ -21,9 +21,7 @@ export const Anchor = ({
|
|
|
21
21
|
{...(isExternal && { rel: "noopener noreferrer" })}
|
|
22
22
|
>
|
|
23
23
|
{children}
|
|
24
|
-
{isExternal ?
|
|
25
|
-
<ExternalLinkIcon name="external" className="ml-[2px] inline" />
|
|
26
|
-
) : null}
|
|
24
|
+
{isExternal ? <ExternalLinkIcon name="external" className="ml-[2px] inline" /> : null}
|
|
27
25
|
</a>
|
|
28
26
|
);
|
|
29
27
|
};
|
|
@@ -1,33 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
4
|
-
import type {
|
|
5
|
-
AvatarProps,
|
|
6
|
-
AvatarImageProps,
|
|
7
|
-
AvatarFallbackProps,
|
|
8
|
-
} from "./types";
|
|
4
|
+
import type { AvatarFallbackProps, AvatarImageProps, AvatarProps } from "./types";
|
|
9
5
|
import { cn } from "../../utilities";
|
|
10
|
-
import {
|
|
11
|
-
getAvatarClasses,
|
|
12
|
-
getAvatarImageClasses,
|
|
13
|
-
getAvatarFallbackClasses,
|
|
14
|
-
} from "./constants";
|
|
6
|
+
import { getAvatarClasses, getAvatarFallbackClasses, getAvatarImageClasses } from "./constants";
|
|
15
7
|
|
|
16
8
|
const Avatar = ({ className, size, status, ...props }: AvatarProps) => (
|
|
17
|
-
<AvatarPrimitive.Root
|
|
18
|
-
className={cn(getAvatarClasses({ size, status }), className)}
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
9
|
+
<AvatarPrimitive.Root className={cn(getAvatarClasses({ size, status }), className)} {...props} />
|
|
21
10
|
);
|
|
22
11
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
23
12
|
|
|
24
|
-
const AvatarImage = ({
|
|
25
|
-
className,
|
|
26
|
-
ring,
|
|
27
|
-
shape,
|
|
28
|
-
variant,
|
|
29
|
-
...props
|
|
30
|
-
}: AvatarImageProps) => (
|
|
13
|
+
const AvatarImage = ({ className, ring, shape, variant, ...props }: AvatarImageProps) => (
|
|
31
14
|
<AvatarPrimitive.Image
|
|
32
15
|
className={cn(getAvatarImageClasses({ ring, shape, variant }), className)}
|
|
33
16
|
{...props}
|
|
@@ -44,10 +27,7 @@ const AvatarFallback = ({
|
|
|
44
27
|
...props
|
|
45
28
|
}: AvatarFallbackProps) => (
|
|
46
29
|
<AvatarPrimitive.Fallback
|
|
47
|
-
className={cn(
|
|
48
|
-
getAvatarFallbackClasses({ ring, size, shape, variant }),
|
|
49
|
-
className
|
|
50
|
-
)}
|
|
30
|
+
className={cn(getAvatarFallbackClasses({ ring, size, shape, variant }), className)}
|
|
51
31
|
{...props}
|
|
52
32
|
/>
|
|
53
33
|
);
|
|
@@ -48,22 +48,19 @@ const classesConfig = {
|
|
|
48
48
|
|
|
49
49
|
export const getAvatarImageClasses = cva("", classesConfig);
|
|
50
50
|
|
|
51
|
-
export const getAvatarFallbackClasses = cva(
|
|
52
|
-
|
|
53
|
-
{
|
|
54
|
-
...classesConfig,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
48: "text-4xl",
|
|
65
|
-
64: "text-5xl",
|
|
66
|
-
},
|
|
51
|
+
export const getAvatarFallbackClasses = cva("flex items-center justify-center w-full", {
|
|
52
|
+
...classesConfig,
|
|
53
|
+
variants: {
|
|
54
|
+
...classesConfig.variants,
|
|
55
|
+
size: {
|
|
56
|
+
4: "text-[4px]",
|
|
57
|
+
8: "text-base",
|
|
58
|
+
12: "text-lg",
|
|
59
|
+
16: "text-xl",
|
|
60
|
+
24: "text-2xl",
|
|
61
|
+
32: "text-3xl",
|
|
62
|
+
48: "text-4xl",
|
|
63
|
+
64: "text-5xl",
|
|
67
64
|
},
|
|
68
|
-
}
|
|
69
|
-
);
|
|
65
|
+
},
|
|
66
|
+
});
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
2
2
|
import { type VariantProps } from "../../libs";
|
|
3
|
-
import {
|
|
4
|
-
getAvatarClasses,
|
|
5
|
-
getAvatarFallbackClasses,
|
|
6
|
-
getAvatarImageClasses,
|
|
7
|
-
} from "./constants";
|
|
3
|
+
import { getAvatarClasses, getAvatarFallbackClasses, getAvatarImageClasses } from "./constants";
|
|
8
4
|
|
|
9
5
|
export type AvatarProps = Omit<
|
|
10
6
|
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>,
|
|
@@ -2,20 +2,10 @@ import { cn } from "../../utilities";
|
|
|
2
2
|
import { getBadgeClasses } from "./constants";
|
|
3
3
|
import { type BadgeProps } from "./types";
|
|
4
4
|
|
|
5
|
-
export const Badge = ({
|
|
6
|
-
size,
|
|
7
|
-
outline,
|
|
8
|
-
rounded,
|
|
9
|
-
variant,
|
|
10
|
-
className,
|
|
11
|
-
...props
|
|
12
|
-
}: BadgeProps) => {
|
|
5
|
+
export const Badge = ({ size, outline, rounded, variant, className, ...props }: BadgeProps) => {
|
|
13
6
|
return (
|
|
14
7
|
<span
|
|
15
|
-
className={cn(
|
|
16
|
-
getBadgeClasses({ size, variant, outline, rounded }),
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
8
|
+
className={cn(getBadgeClasses({ size, variant, outline, rounded }), className)}
|
|
19
9
|
{...props}
|
|
20
10
|
/>
|
|
21
11
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Badge } from
|
|
1
|
+
export { Badge } from "./Badge";
|
|
@@ -1,34 +1,18 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Slot, Slottable } from "@radix-ui/react-slot";
|
|
3
|
-
import { type ButtonProps } from "./types";
|
|
4
|
-
import { getButtonClasses } from "./constants";
|
|
5
|
-
import { Loading } from "../Loading";
|
|
6
3
|
import { cn } from "../../utilities";
|
|
4
|
+
import { Loading } from "../Loading";
|
|
5
|
+
import { getButtonClasses } from "./constants";
|
|
6
|
+
import { type ButtonProps } from "./types";
|
|
7
7
|
|
|
8
8
|
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
9
|
-
(
|
|
10
|
-
{
|
|
11
|
-
asChild,
|
|
12
|
-
className,
|
|
13
|
-
outline,
|
|
14
|
-
children,
|
|
15
|
-
isLoading,
|
|
16
|
-
variant,
|
|
17
|
-
size,
|
|
18
|
-
wide,
|
|
19
|
-
...props
|
|
20
|
-
},
|
|
21
|
-
ref
|
|
22
|
-
) => {
|
|
9
|
+
({ asChild, className, outline, children, isLoading, variant, size, wide, ...props }, ref) => {
|
|
23
10
|
const Comp = asChild ? Slot : "button";
|
|
24
11
|
|
|
25
12
|
return (
|
|
26
13
|
<Comp
|
|
27
14
|
ref={ref}
|
|
28
|
-
className={cn(
|
|
29
|
-
getButtonClasses({ size, wide, outline, variant, isLoading }),
|
|
30
|
-
className
|
|
31
|
-
)}
|
|
15
|
+
className={cn(getButtonClasses({ size, wide, outline, variant, isLoading }), className)}
|
|
32
16
|
{...props}
|
|
33
17
|
>
|
|
34
18
|
<Slottable>{children}</Slottable>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type VariantProps } from "../../libs";
|
|
2
1
|
import { type ButtonHTMLAttributes } from "react";
|
|
2
|
+
import { type VariantProps } from "../../libs";
|
|
3
3
|
import { getButtonClasses } from "./constants";
|
|
4
4
|
|
|
5
5
|
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &
|