@fabio.caffarello/react-design-system 1.7.0 → 1.8.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/README.md +48 -3
- package/dist/docs/components/ComponentStatusTable.d.ts +11 -0
- package/dist/ui/atoms/Accordion/Accordion.d.ts +34 -0
- package/dist/ui/atoms/Accordion/Accordion.stories.d.ts +11 -0
- package/dist/ui/atoms/Accordion/Accordion.test.d.ts +1 -0
- package/dist/ui/atoms/Accordion/index.d.ts +2 -0
- package/dist/ui/atoms/Avatar/Avatar.d.ts +30 -0
- package/dist/ui/atoms/Avatar/Avatar.stories.d.ts +13 -0
- package/dist/ui/atoms/Avatar/Avatar.test.d.ts +1 -0
- package/dist/ui/atoms/Avatar/AvatarGroup.d.ts +26 -0
- package/dist/ui/atoms/Avatar/index.d.ts +9 -0
- package/dist/ui/atoms/Badge/Badge.d.ts +14 -6
- package/dist/ui/atoms/Badge/Badge.stories.d.ts +8 -9
- package/dist/ui/atoms/BoxWrapper/BoxWrapper.d.ts +3 -3
- package/dist/ui/atoms/BoxWrapper/BoxWrapper.test.d.ts +1 -0
- package/dist/ui/atoms/Button/Button.d.ts +32 -10
- package/dist/ui/atoms/Button/Button.stories.d.ts +7 -0
- package/dist/ui/atoms/Button/Button.test.d.ts +1 -0
- package/dist/ui/atoms/Checkbox/Checkbox.d.ts +2 -1
- package/dist/ui/atoms/Collapsible/Collapsible.stories.d.ts +2 -0
- package/dist/ui/atoms/Info/Info.d.ts +2 -3
- package/dist/ui/atoms/Info/Info.test.d.ts +1 -0
- package/dist/ui/atoms/Input/Input.d.ts +14 -4
- package/dist/ui/atoms/Input/Input.stories.d.ts +6 -0
- package/dist/ui/atoms/Popover/Popover.d.ts +35 -0
- package/dist/ui/atoms/Popover/Popover.stories.d.ts +11 -0
- package/dist/ui/atoms/Popover/Popover.test.d.ts +1 -0
- package/dist/ui/atoms/Popover/index.d.ts +2 -0
- package/dist/ui/atoms/Progress/Progress.d.ts +33 -0
- package/dist/ui/atoms/Progress/Progress.stories.d.ts +12 -0
- package/dist/ui/atoms/Progress/Progress.test.d.ts +1 -0
- package/dist/ui/atoms/Select/Select.d.ts +18 -6
- package/dist/ui/atoms/Select/Select.stories.d.ts +11 -8
- package/dist/ui/atoms/Separator/Separator.d.ts +23 -0
- package/dist/ui/atoms/Separator/Separator.stories.d.ts +10 -0
- package/dist/ui/atoms/Separator/Separator.test.d.ts +1 -0
- package/dist/ui/atoms/Separator/index.d.ts +2 -0
- package/dist/ui/atoms/Skeleton/Skeleton.d.ts +1 -1
- package/dist/ui/atoms/Skeleton/Skeleton.stories.d.ts +24 -0
- package/dist/ui/atoms/Slider/Slider.d.ts +45 -0
- package/dist/ui/atoms/Slider/Slider.stories.d.ts +13 -0
- package/dist/ui/atoms/Slider/Slider.test.d.ts +1 -0
- package/dist/ui/atoms/Slider/index.d.ts +2 -0
- package/dist/ui/atoms/Spinner/Spinner.d.ts +22 -0
- package/dist/ui/atoms/Spinner/Spinner.stories.d.ts +9 -0
- package/dist/ui/atoms/Spinner/Spinner.test.d.ts +1 -0
- package/dist/ui/atoms/Switch/Switch.d.ts +28 -0
- package/dist/ui/atoms/Switch/Switch.stories.d.ts +11 -0
- package/dist/ui/atoms/Switch/Switch.test.d.ts +1 -0
- package/dist/ui/atoms/Switch/index.d.ts +2 -0
- package/dist/ui/atoms/Tooltip/Tooltip.d.ts +2 -1
- package/dist/ui/atoms/Tooltip/Tooltip.stories.d.ts +17 -0
- package/dist/ui/atoms/index.d.ts +20 -3
- package/dist/ui/index.d.ts +6 -1
- package/dist/ui/molecules/Card/Card.d.ts +6 -2
- package/dist/ui/molecules/Card/Card.stories.d.ts +2 -0
- package/dist/ui/molecules/ColorPicker/ColorPicker.d.ts +28 -0
- package/dist/ui/molecules/ColorPicker/ColorPicker.stories.d.ts +12 -0
- package/dist/ui/molecules/ColorPicker/ColorPicker.test.d.ts +1 -0
- package/dist/ui/molecules/ColorPicker/index.d.ts +2 -0
- package/dist/ui/molecules/DatePicker/DatePicker.d.ts +74 -0
- package/dist/ui/molecules/DatePicker/DatePicker.stories.d.ts +12 -0
- package/dist/ui/molecules/DatePicker/DatePicker.test.d.ts +1 -0
- package/dist/ui/molecules/DatePicker/DatePickerCalendar.d.ts +6 -0
- package/dist/ui/molecules/DatePicker/DatePickerContext.d.ts +28 -0
- package/dist/ui/molecules/DatePicker/DatePickerInput.d.ts +9 -0
- package/dist/ui/molecules/DatePicker/DatePickerProvider.d.ts +23 -0
- package/dist/ui/molecules/DatePicker/index.d.ts +14 -0
- package/dist/ui/molecules/Dropdown/Dropdown.d.ts +2 -1
- package/dist/ui/molecules/Dropdown/Dropdown.stories.d.ts +13 -0
- package/dist/ui/molecules/EmptyState/EmptyState.stories.d.ts +22 -0
- package/dist/ui/molecules/FileUpload/FileUpload.d.ts +37 -0
- package/dist/ui/molecules/FileUpload/FileUpload.stories.d.ts +12 -0
- package/dist/ui/molecules/FileUpload/FileUpload.test.d.ts +1 -0
- package/dist/ui/molecules/FileUpload/index.d.ts +2 -0
- package/dist/ui/molecules/Form/Form.d.ts +29 -4
- package/dist/ui/molecules/Form/Form.stories.d.ts +2 -0
- package/dist/ui/molecules/Form/FormContext.d.ts +17 -0
- package/dist/ui/molecules/Form/FormField.d.ts +36 -0
- package/dist/ui/molecules/Form/FormProvider.d.ts +14 -0
- package/dist/ui/molecules/Form/index.d.ts +13 -0
- package/dist/ui/molecules/Form/useFormFieldArray.d.ts +28 -0
- package/dist/ui/molecules/InputWithLabel/InputWithLabel.test.d.ts +1 -0
- package/dist/ui/molecules/Rating/Rating.d.ts +33 -0
- package/dist/ui/molecules/Rating/Rating.stories.d.ts +13 -0
- package/dist/ui/molecules/Rating/Rating.test.d.ts +1 -0
- package/dist/ui/molecules/Rating/index.d.ts +2 -0
- package/dist/ui/molecules/SearchInput/SearchInput.d.ts +24 -0
- package/dist/ui/molecules/SearchInput/SearchInput.stories.d.ts +10 -0
- package/dist/ui/molecules/SearchInput/SearchInput.test.d.ts +1 -0
- package/dist/ui/molecules/SearchInput/index.d.ts +2 -0
- package/dist/ui/molecules/SidebarHeader/SidebarHeader.test.d.ts +1 -0
- package/dist/ui/molecules/TableActions/TableActions.d.ts +31 -0
- package/dist/ui/molecules/TableActions/TableActions.stories.d.ts +7 -0
- package/dist/ui/molecules/TableActions/TableActions.test.d.ts +1 -0
- package/dist/ui/molecules/TableFilters/TableFilters.d.ts +37 -0
- package/dist/ui/molecules/TableFilters/TableFilters.stories.d.ts +7 -0
- package/dist/ui/molecules/TableFilters/TableFilters.test.d.ts +1 -0
- package/dist/ui/molecules/TablePagination/TablePagination.d.ts +29 -0
- package/dist/ui/molecules/TablePagination/TablePagination.stories.d.ts +8 -0
- package/dist/ui/molecules/TablePagination/TablePagination.test.d.ts +1 -0
- package/dist/ui/molecules/Tabs/Tabs.d.ts +15 -0
- package/dist/ui/molecules/Tabs/Tabs.stories.d.ts +10 -0
- package/dist/ui/molecules/Tabs/Tabs.test.d.ts +1 -0
- package/dist/ui/molecules/Tabs/TabsContent.d.ts +14 -0
- package/dist/ui/molecules/Tabs/TabsContext.d.ts +18 -0
- package/dist/ui/molecules/Tabs/TabsList.d.ts +12 -0
- package/dist/ui/molecules/Tabs/TabsProvider.d.ts +16 -0
- package/dist/ui/molecules/Tabs/TabsTrigger.d.ts +13 -0
- package/dist/ui/molecules/Tabs/index.d.ts +17 -0
- package/dist/ui/molecules/TimePicker/TimePicker.d.ts +29 -0
- package/dist/ui/molecules/TimePicker/TimePicker.stories.d.ts +12 -0
- package/dist/ui/molecules/TimePicker/TimePicker.test.d.ts +1 -0
- package/dist/ui/molecules/TimePicker/index.d.ts +2 -0
- package/dist/ui/molecules/index.d.ts +13 -5
- package/dist/ui/organisms/CommandPalette/CommandPalette.d.ts +37 -0
- package/dist/ui/organisms/CommandPalette/CommandPalette.stories.d.ts +11 -0
- package/dist/ui/organisms/CommandPalette/CommandPalette.test.d.ts +1 -0
- package/dist/ui/organisms/CommandPalette/index.d.ts +2 -0
- package/dist/ui/organisms/DataGrid/DataGrid.d.ts +84 -0
- package/dist/ui/organisms/DataGrid/DataGrid.stories.d.ts +14 -0
- package/dist/ui/organisms/DataGrid/DataGrid.test.d.ts +1 -0
- package/dist/ui/organisms/DataGrid/index.d.ts +2 -0
- package/dist/ui/organisms/Dialog/AlertDialog.d.ts +34 -0
- package/dist/ui/organisms/Dialog/Dialog.d.ts +58 -0
- package/dist/ui/organisms/Dialog/Dialog.stories.d.ts +13 -0
- package/dist/ui/organisms/Dialog/Dialog.test.d.ts +1 -0
- package/dist/ui/organisms/Dialog/DialogClose.d.ts +8 -0
- package/dist/ui/organisms/Dialog/DialogContent.d.ts +8 -0
- package/dist/ui/organisms/Dialog/DialogContext.d.ts +10 -0
- package/dist/ui/organisms/Dialog/DialogDescription.d.ts +4 -0
- package/dist/ui/organisms/Dialog/DialogFooter.d.ts +5 -0
- package/dist/ui/organisms/Dialog/DialogHeader.d.ts +5 -0
- package/dist/ui/organisms/Dialog/DialogProvider.d.ts +10 -0
- package/dist/ui/organisms/Dialog/DialogTitle.d.ts +5 -0
- package/dist/ui/organisms/Dialog/DialogTrigger.d.ts +6 -0
- package/dist/ui/organisms/Dialog/index.d.ts +22 -0
- package/dist/ui/organisms/Sidebar/Sidebar.d.ts +7 -4
- package/dist/ui/organisms/Sidebar/SidebarGroup/SidebarGroup.d.ts +27 -0
- package/dist/ui/organisms/Sidebar/SidebarGroup/SidebarGroup.stories.d.ts +11 -0
- package/dist/ui/organisms/Sidebar/SidebarGroup/SidebarGroup.test.d.ts +1 -0
- package/dist/ui/organisms/Sidebar/SidebarHeader/SidebarHeader.d.ts +19 -0
- package/dist/ui/organisms/Sidebar/SidebarHeader/SidebarHeader.test.d.ts +1 -0
- package/dist/ui/organisms/Sidebar/SidebarItem/SidebarItem.d.ts +23 -0
- package/dist/ui/organisms/Sidebar/SidebarItem/SidebarItem.stories.d.ts +10 -0
- package/dist/ui/organisms/Sidebar/SidebarItem/SidebarItem.test.d.ts +1 -0
- package/dist/ui/organisms/Sidebar/index.d.ts +8 -0
- package/dist/ui/organisms/Stepper/Stepper.d.ts +40 -0
- package/dist/ui/organisms/Stepper/Stepper.stories.d.ts +12 -0
- package/dist/ui/organisms/Stepper/Stepper.test.d.ts +1 -0
- package/dist/ui/organisms/Stepper/index.d.ts +2 -0
- package/dist/ui/organisms/Table/Table.d.ts +84 -16
- package/dist/ui/organisms/Table/Table.stories.d.ts +15 -0
- package/dist/ui/organisms/Table/TableActions/TableActions.d.ts +31 -0
- package/dist/ui/organisms/Table/TableActions/TableActions.stories.d.ts +7 -0
- package/dist/ui/organisms/Table/TableActions/TableActions.test.d.ts +1 -0
- package/dist/ui/organisms/Table/TableActions.d.ts +13 -0
- package/dist/ui/organisms/Table/TableBody.d.ts +12 -0
- package/dist/ui/organisms/Table/TableCell.d.ts +14 -0
- package/dist/ui/organisms/Table/TableContext.d.ts +75 -0
- package/dist/ui/organisms/Table/TableEmptyState.d.ts +11 -0
- package/dist/ui/organisms/Table/TableFilters/TableFilters.d.ts +37 -0
- package/dist/ui/organisms/Table/TableFilters/TableFilters.stories.d.ts +7 -0
- package/dist/ui/organisms/Table/TableFilters/TableFilters.test.d.ts +1 -0
- package/dist/ui/organisms/Table/TableFilters.d.ts +12 -0
- package/dist/ui/organisms/Table/TableHeader.d.ts +10 -0
- package/dist/ui/organisms/Table/TableHeaderCell.d.ts +18 -0
- package/dist/ui/organisms/Table/TableHeaderRow.d.ts +10 -0
- package/dist/ui/organisms/Table/TablePagination/TablePagination.d.ts +29 -0
- package/dist/ui/organisms/Table/TablePagination/TablePagination.stories.d.ts +8 -0
- package/dist/ui/organisms/Table/TablePagination/TablePagination.test.d.ts +1 -0
- package/dist/ui/organisms/Table/TablePagination.d.ts +14 -0
- package/dist/ui/organisms/Table/TableProvider.d.ts +55 -0
- package/dist/ui/organisms/Table/TableRow.d.ts +14 -0
- package/dist/ui/organisms/Table/TableTypes.d.ts +8 -0
- package/dist/ui/organisms/Table/index.d.ts +30 -0
- package/dist/ui/organisms/Table/useColumnResizing.d.ts +39 -0
- package/dist/ui/organisms/Table/useVirtualScrolling.d.ts +35 -0
- package/dist/ui/organisms/Timeline/Timeline.d.ts +34 -0
- package/dist/ui/organisms/Timeline/Timeline.stories.d.ts +12 -0
- package/dist/ui/organisms/Timeline/Timeline.test.d.ts +1 -0
- package/dist/ui/organisms/Timeline/index.d.ts +2 -0
- package/dist/ui/organisms/Toast/Toast.d.ts +8 -0
- package/dist/ui/organisms/Toast/Toast.stories.d.ts +14 -0
- package/dist/ui/organisms/Toast/Toast.test.d.ts +1 -0
- package/dist/ui/organisms/Toast/ToastContainer.d.ts +5 -0
- package/dist/ui/organisms/Toast/ToastContext.d.ts +21 -0
- package/dist/ui/organisms/Toast/ToastProvider.d.ts +7 -0
- package/dist/ui/organisms/Toast/index.d.ts +15 -0
- package/dist/ui/organisms/Toast/useToast.d.ts +35 -0
- package/dist/ui/organisms/index.d.ts +12 -2
- package/dist/ui/providers/AdvancedThemeProvider.d.ts +52 -0
- package/dist/ui/providers/index.d.ts +9 -0
- package/dist/ui/themes/ThemeBuilder.d.ts +28 -0
- package/dist/ui/themes/ThemeRegistry.d.ts +55 -0
- package/dist/ui/themes/index.d.ts +9 -0
- package/dist/ui/themes/types.d.ts +48 -0
- package/dist/ui/themes/utils.d.ts +21 -0
- package/dist/ui/tokens/TokenVisualizations.d.ts +41 -0
- package/dist/ui/tokens/animations.d.ts +65 -0
- package/dist/ui/tokens/borders.d.ts +61 -0
- package/dist/ui/tokens/gradients.d.ts +55 -0
- package/dist/ui/tokens/index.d.ts +31 -0
- package/dist/ui/tokens/opacity.d.ts +51 -0
- package/dist/ui/tokens/radius.d.ts +45 -0
- package/dist/ui/tokens/shadows.d.ts +42 -0
- package/dist/ui/tokens/themes/dark.d.ts +26 -26
- package/dist/ui/tokens/themes/light.d.ts +26 -26
- package/dist/ui/tokens/tokens.factory.d.ts +42 -0
- package/dist/ui/tokens/z-index.d.ts +44 -0
- package/dist/ui/utils/index.d.ts +6 -0
- package/package.json +50 -6
- package/src/docs/Accessibility.mdx +402 -0
- package/src/docs/BestPractices.mdx +315 -0
- package/src/docs/ComponentComposition.mdx +381 -0
- package/src/docs/ComponentStatus.mdx +177 -0
- package/src/docs/DesignSystem.mdx +121 -0
- package/src/docs/GettingStarted.mdx +284 -0
- package/src/docs/MigrationGuide.mdx +297 -0
- package/src/docs/Performance.mdx +206 -0
- package/src/docs/components/ComponentStatusTable.tsx +184 -0
- package/src/setupTests.ts +32 -0
- package/src/ui/atoms/Accordion/Accordion.stories.tsx +147 -0
- package/src/ui/atoms/Accordion/Accordion.test.tsx +86 -0
- package/src/ui/atoms/Accordion/Accordion.tsx +147 -0
- package/src/ui/atoms/Accordion/index.ts +2 -0
- package/src/ui/atoms/Avatar/Avatar.stories.tsx +226 -0
- package/src/ui/atoms/Avatar/Avatar.test.tsx +233 -0
- package/src/ui/atoms/Avatar/Avatar.tsx +128 -0
- package/src/ui/atoms/Avatar/AvatarGroup.tsx +96 -0
- package/src/ui/atoms/Avatar/index.ts +11 -0
- package/src/ui/atoms/Badge/Badge.stories.tsx +65 -56
- package/src/ui/atoms/Badge/Badge.test.tsx +27 -50
- package/src/ui/atoms/Badge/Badge.tsx +70 -27
- package/src/ui/atoms/BoxWrapper/BoxWrapper.stories.tsx +1 -1
- package/src/ui/atoms/BoxWrapper/BoxWrapper.test.tsx +27 -0
- package/src/ui/atoms/BoxWrapper/BoxWrapper.tsx +5 -2
- package/src/ui/atoms/Button/Button.stories.tsx +130 -1
- package/src/ui/atoms/Button/Button.test.tsx +233 -0
- package/src/ui/atoms/Button/Button.tsx +160 -53
- package/src/ui/atoms/Checkbox/Checkbox.tsx +14 -1
- package/src/ui/atoms/Collapsible/Collapsible.stories.tsx +47 -1
- package/src/ui/atoms/Collapsible/Collapsible.test.tsx +36 -24
- package/src/ui/atoms/Collapsible/Collapsible.tsx +9 -1
- package/src/ui/atoms/ErrorMessage/ErrorMessage.stories.tsx +1 -1
- package/src/ui/atoms/Info/Info.stories.tsx +1 -1
- package/src/ui/atoms/Info/Info.test.tsx +45 -0
- package/src/ui/atoms/Info/Info.tsx +2 -2
- package/src/ui/atoms/Input/Input.stories.tsx +80 -0
- package/src/ui/atoms/Input/Input.test.tsx +190 -36
- package/src/ui/atoms/Input/Input.tsx +144 -25
- package/src/ui/atoms/Label/Label.stories.tsx +1 -1
- package/src/ui/atoms/NavLink/NavLink.stories.tsx +1 -1
- package/src/ui/atoms/Popover/Popover.stories.tsx +157 -0
- package/src/ui/atoms/Popover/Popover.test.tsx +80 -0
- package/src/ui/atoms/Popover/Popover.tsx +256 -0
- package/src/ui/atoms/Popover/index.ts +2 -0
- package/src/ui/atoms/Progress/Progress.css +17 -0
- package/src/ui/atoms/Progress/Progress.stories.tsx +170 -0
- package/src/ui/atoms/Progress/Progress.test.tsx +134 -0
- package/src/ui/atoms/Progress/Progress.tsx +138 -0
- package/src/ui/atoms/Radio/Radio.tsx +1 -1
- package/src/ui/atoms/Select/Select.stories.tsx +93 -58
- package/src/ui/atoms/Select/Select.test.tsx +162 -46
- package/src/ui/atoms/Select/Select.tsx +142 -44
- package/src/ui/atoms/Separator/Separator.stories.tsx +88 -0
- package/src/ui/atoms/Separator/Separator.test.tsx +34 -0
- package/src/ui/atoms/Separator/Separator.tsx +81 -0
- package/src/ui/atoms/Separator/index.ts +2 -0
- package/src/ui/atoms/Skeleton/Skeleton.stories.tsx +62 -0
- package/src/ui/atoms/Skeleton/Skeleton.tsx +19 -2
- package/src/ui/atoms/Slider/Slider.stories.tsx +205 -0
- package/src/ui/atoms/Slider/Slider.test.tsx +53 -0
- package/src/ui/atoms/Slider/Slider.tsx +307 -0
- package/src/ui/atoms/Slider/index.ts +2 -0
- package/src/ui/atoms/Spinner/Spinner.stories.tsx +56 -0
- package/src/ui/atoms/Spinner/Spinner.test.tsx +35 -0
- package/src/ui/atoms/Spinner/Spinner.tsx +88 -0
- package/src/ui/atoms/Switch/Switch.stories.tsx +182 -0
- package/src/ui/atoms/Switch/Switch.test.tsx +90 -0
- package/src/ui/atoms/Switch/Switch.tsx +181 -0
- package/src/ui/atoms/Switch/index.ts +2 -0
- package/src/ui/atoms/Text/Text.stories.tsx +1 -1
- package/src/ui/atoms/Text/Text.test.tsx +48 -32
- package/src/ui/atoms/Textarea/Textarea.stories.tsx +1 -1
- package/src/ui/atoms/Tooltip/Tooltip.stories.tsx +44 -0
- package/src/ui/atoms/Tooltip/Tooltip.tsx +94 -6
- package/src/ui/atoms/index.ts +27 -4
- package/src/ui/index.ts +6 -1
- package/src/ui/molecules/Breadcrumb/Breadcrumb.stories.tsx +1 -1
- package/src/ui/molecules/Breadcrumb/Breadcrumb.tsx +1 -1
- package/src/ui/molecules/Card/Card.stories.tsx +49 -1
- package/src/ui/molecules/Card/Card.tsx +40 -5
- package/src/ui/molecules/ColorPicker/ColorPicker.stories.tsx +156 -0
- package/src/ui/molecules/ColorPicker/ColorPicker.test.tsx +47 -0
- package/src/ui/molecules/ColorPicker/ColorPicker.tsx +271 -0
- package/src/ui/molecules/ColorPicker/index.ts +2 -0
- package/src/ui/molecules/DatePicker/DatePicker.mdx +150 -0
- package/src/ui/molecules/DatePicker/DatePicker.stories.tsx +188 -0
- package/src/ui/molecules/DatePicker/DatePicker.test.tsx +381 -0
- package/src/ui/molecules/DatePicker/DatePicker.tsx +231 -0
- package/src/ui/molecules/DatePicker/DatePickerCalendar.tsx +277 -0
- package/src/ui/molecules/DatePicker/DatePickerContext.tsx +39 -0
- package/src/ui/molecules/DatePicker/DatePickerInput.tsx +147 -0
- package/src/ui/molecules/DatePicker/DatePickerProvider.tsx +100 -0
- package/src/ui/molecules/DatePicker/index.ts +16 -0
- package/src/ui/molecules/Dropdown/Dropdown.stories.tsx +50 -8
- package/src/ui/molecules/Dropdown/Dropdown.test.tsx +272 -12
- package/src/ui/molecules/Dropdown/Dropdown.tsx +176 -10
- package/src/ui/molecules/EmptyState/EmptyState.stories.tsx +24 -2
- package/src/ui/molecules/EmptyState/EmptyState.tsx +9 -3
- package/src/ui/molecules/FileUpload/FileUpload.stories.tsx +177 -0
- package/src/ui/molecules/FileUpload/FileUpload.test.tsx +114 -0
- package/src/ui/molecules/FileUpload/FileUpload.tsx +312 -0
- package/src/ui/molecules/FileUpload/index.ts +2 -0
- package/src/ui/molecules/Form/Form.mdx +145 -0
- package/src/ui/molecules/Form/Form.stories.tsx +121 -1
- package/src/ui/molecules/Form/Form.test.tsx +1 -3
- package/src/ui/molecules/Form/Form.tsx +95 -15
- package/src/ui/molecules/Form/FormContext.tsx +35 -0
- package/src/ui/molecules/Form/FormField.tsx +83 -0
- package/src/ui/molecules/Form/FormProvider.tsx +34 -0
- package/src/ui/molecules/Form/index.ts +21 -0
- package/src/ui/molecules/Form/useFormFieldArray.ts +46 -0
- package/src/ui/molecules/InputWithLabel/InputWithLabel.stories.tsx +1 -1
- package/src/ui/molecules/InputWithLabel/InputWithLabel.test.tsx +44 -0
- package/src/ui/molecules/InputWithLabel/InputWithLabel.tsx +3 -1
- package/src/ui/molecules/NavbarGroup/NavbarGroup.stories.tsx +1 -1
- package/src/ui/molecules/Pagination/Pagination.stories.tsx +1 -1
- package/src/ui/molecules/Rating/Rating.stories.tsx +206 -0
- package/src/ui/molecules/Rating/Rating.test.tsx +60 -0
- package/src/ui/molecules/Rating/Rating.tsx +173 -0
- package/src/ui/molecules/Rating/index.ts +2 -0
- package/src/ui/molecules/SearchInput/SearchInput.stories.tsx +146 -0
- package/src/ui/molecules/SearchInput/SearchInput.test.tsx +82 -0
- package/src/ui/molecules/SearchInput/SearchInput.tsx +133 -0
- package/src/ui/molecules/SearchInput/index.ts +2 -0
- package/src/ui/molecules/Tabs/Tabs.stories.tsx +229 -0
- package/src/ui/molecules/Tabs/Tabs.test.tsx +497 -0
- package/src/ui/molecules/Tabs/Tabs.tsx +58 -0
- package/src/ui/molecules/Tabs/TabsContent.tsx +50 -0
- package/src/ui/molecules/Tabs/TabsContext.tsx +36 -0
- package/src/ui/molecules/Tabs/TabsList.tsx +98 -0
- package/src/ui/molecules/Tabs/TabsProvider.tsx +53 -0
- package/src/ui/molecules/Tabs/TabsTrigger.tsx +111 -0
- package/src/ui/molecules/Tabs/index.ts +23 -0
- package/src/ui/molecules/TimePicker/TimePicker.stories.tsx +145 -0
- package/src/ui/molecules/TimePicker/TimePicker.test.tsx +41 -0
- package/src/ui/molecules/TimePicker/TimePicker.tsx +264 -0
- package/src/ui/molecules/TimePicker/index.ts +2 -0
- package/src/ui/molecules/index.ts +20 -7
- package/src/ui/organisms/CommandPalette/CommandPalette.stories.tsx +218 -0
- package/src/ui/organisms/CommandPalette/CommandPalette.test.tsx +85 -0
- package/src/ui/organisms/CommandPalette/CommandPalette.tsx +333 -0
- package/src/ui/organisms/CommandPalette/index.ts +2 -0
- package/src/ui/organisms/DataGrid/DataGrid.stories.tsx +196 -0
- package/src/ui/organisms/DataGrid/DataGrid.test.tsx +53 -0
- package/src/ui/organisms/DataGrid/DataGrid.tsx +294 -0
- package/src/ui/organisms/DataGrid/index.ts +2 -0
- package/src/ui/organisms/Dialog/AlertDialog.tsx +92 -0
- package/src/ui/organisms/Dialog/Dialog.mdx +200 -0
- package/src/ui/organisms/Dialog/Dialog.stories.tsx +226 -0
- package/src/ui/organisms/Dialog/Dialog.test.tsx +435 -0
- package/src/ui/organisms/Dialog/Dialog.tsx +79 -0
- package/src/ui/organisms/Dialog/DialogClose.tsx +45 -0
- package/src/ui/organisms/Dialog/DialogContent.tsx +149 -0
- package/src/ui/organisms/Dialog/DialogContext.tsx +25 -0
- package/src/ui/organisms/Dialog/DialogDescription.tsx +28 -0
- package/src/ui/organisms/Dialog/DialogFooter.tsx +18 -0
- package/src/ui/organisms/Dialog/DialogHeader.tsx +18 -0
- package/src/ui/organisms/Dialog/DialogProvider.tsx +73 -0
- package/src/ui/organisms/Dialog/DialogTitle.tsx +31 -0
- package/src/ui/organisms/Dialog/DialogTrigger.tsx +34 -0
- package/src/ui/organisms/Dialog/index.ts +24 -0
- package/src/ui/organisms/LoginBox/LoginBox.stories.tsx +1 -1
- package/src/ui/organisms/Modal/Modal.stories.tsx +2 -2
- package/src/ui/organisms/Modal/Modal.test.tsx +1 -1
- package/src/ui/organisms/Sidebar/Sidebar.stories.tsx +1 -1
- package/src/ui/organisms/Sidebar/Sidebar.test.tsx +5 -3
- package/src/ui/organisms/Sidebar/Sidebar.tsx +21 -6
- package/src/ui/{molecules → organisms/Sidebar}/SidebarGroup/SidebarGroup.stories.tsx +2 -2
- package/src/ui/{molecules → organisms/Sidebar}/SidebarGroup/SidebarGroup.test.tsx +32 -9
- package/src/ui/{molecules → organisms/Sidebar}/SidebarGroup/SidebarGroup.tsx +7 -7
- package/src/ui/organisms/Sidebar/SidebarHeader/SidebarHeader.test.tsx +66 -0
- package/src/ui/{molecules → organisms/Sidebar}/SidebarHeader/SidebarHeader.tsx +1 -2
- package/src/ui/{atoms → organisms/Sidebar}/SidebarItem/SidebarItem.stories.tsx +1 -1
- package/src/ui/{atoms → organisms/Sidebar}/SidebarItem/SidebarItem.test.tsx +9 -8
- package/src/ui/{atoms → organisms/Sidebar}/SidebarItem/SidebarItem.tsx +9 -3
- package/src/ui/organisms/Sidebar/index.ts +13 -0
- package/src/ui/organisms/Stepper/Stepper.stories.tsx +253 -0
- package/src/ui/organisms/Stepper/Stepper.test.tsx +76 -0
- package/src/ui/organisms/Stepper/Stepper.tsx +323 -0
- package/src/ui/organisms/Stepper/index.ts +2 -0
- package/src/ui/organisms/Table/Table.mdx +154 -0
- package/src/ui/organisms/Table/Table.stories.tsx +614 -4
- package/src/ui/organisms/Table/Table.test.tsx +86 -4
- package/src/ui/organisms/Table/Table.tsx +215 -99
- package/src/ui/organisms/Table/TableActions/TableActions.stories.tsx +88 -0
- package/src/ui/organisms/Table/TableActions/TableActions.test.tsx +64 -0
- package/src/ui/organisms/Table/TableActions/TableActions.tsx +71 -0
- package/src/ui/organisms/Table/TableActions.tsx +46 -0
- package/src/ui/organisms/Table/TableBody.tsx +137 -0
- package/src/ui/organisms/Table/TableCell.tsx +36 -0
- package/src/ui/organisms/Table/TableContext.tsx +111 -0
- package/src/ui/organisms/Table/TableEmptyState.tsx +51 -0
- package/src/ui/organisms/Table/TableFilters/TableFilters.stories.tsx +111 -0
- package/src/ui/organisms/Table/TableFilters/TableFilters.test.tsx +104 -0
- package/src/ui/organisms/Table/TableFilters/TableFilters.tsx +191 -0
- package/src/ui/organisms/Table/TableFilters.tsx +39 -0
- package/src/ui/organisms/Table/TableHeader.tsx +29 -0
- package/src/ui/organisms/Table/TableHeaderCell.tsx +142 -0
- package/src/ui/organisms/Table/TableHeaderRow.tsx +72 -0
- package/src/ui/organisms/Table/TablePagination/TablePagination.stories.tsx +87 -0
- package/src/ui/organisms/Table/TablePagination/TablePagination.test.tsx +90 -0
- package/src/ui/organisms/Table/TablePagination/TablePagination.tsx +207 -0
- package/src/ui/organisms/Table/TablePagination.tsx +48 -0
- package/src/ui/organisms/Table/TableProvider.tsx +429 -0
- package/src/ui/organisms/Table/TableRow.tsx +85 -0
- package/src/ui/organisms/Table/TableTypes.ts +11 -0
- package/src/ui/organisms/Table/index.ts +55 -0
- package/src/ui/organisms/Table/useColumnResizing.ts +134 -0
- package/src/ui/organisms/Table/useVirtualScrolling.ts +116 -0
- package/src/ui/organisms/Timeline/Timeline.stories.tsx +230 -0
- package/src/ui/organisms/Timeline/Timeline.test.tsx +47 -0
- package/src/ui/organisms/Timeline/Timeline.tsx +179 -0
- package/src/ui/organisms/Timeline/index.ts +2 -0
- package/src/ui/organisms/Toast/Toast.stories.tsx +169 -0
- package/src/ui/organisms/Toast/Toast.test.tsx +537 -0
- package/src/ui/organisms/Toast/Toast.tsx +144 -0
- package/src/ui/organisms/Toast/ToastContainer.tsx +54 -0
- package/src/ui/organisms/Toast/ToastContext.tsx +38 -0
- package/src/ui/organisms/Toast/ToastProvider.tsx +56 -0
- package/src/ui/organisms/Toast/index.ts +17 -0
- package/src/ui/organisms/Toast/useToast.ts +70 -0
- package/src/ui/organisms/index.ts +17 -2
- package/src/ui/providers/AdvancedThemeProvider.tsx +229 -0
- package/src/ui/providers/index.ts +14 -0
- package/src/ui/themes/README.md +281 -0
- package/src/ui/themes/ThemeBuilder.ts +149 -0
- package/src/ui/themes/ThemeRegistry.ts +187 -0
- package/src/ui/themes/index.ts +20 -0
- package/src/ui/themes/types.ts +53 -0
- package/src/ui/themes/utils.ts +70 -0
- package/src/ui/tokens/README.md +212 -0
- package/src/ui/tokens/TokenVisualizations.tsx +273 -0
- package/src/ui/tokens/Tokens.mdx +348 -0
- package/src/ui/tokens/animations.ts +157 -0
- package/src/ui/tokens/borders.ts +121 -0
- package/src/ui/tokens/gradients.ts +154 -0
- package/src/ui/tokens/index.ts +57 -0
- package/src/ui/tokens/opacity.ts +107 -0
- package/src/ui/tokens/radius.ts +107 -0
- package/src/ui/tokens/shadows.ts +92 -0
- package/src/ui/tokens/tokens.factory.ts +124 -0
- package/src/ui/tokens/z-index.ts +113 -0
- package/src/ui/utils/index.ts +10 -0
- package/src/App.css +0 -42
- package/src/App.tsx +0 -35
- package/src/index.css +0 -68
- package/src/main.tsx +0 -15
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Border Tokens
|
|
3
|
+
*
|
|
4
|
+
* Centralized border system for consistent borders and dividers.
|
|
5
|
+
* Uses Factory Pattern for type-safe token creation.
|
|
6
|
+
*/
|
|
7
|
+
export type BorderWidth = 'none' | 'thin' | 'base' | 'medium' | 'thick';
|
|
8
|
+
export type BorderStyle = 'solid' | 'dashed' | 'dotted';
|
|
9
|
+
export interface BorderToken {
|
|
10
|
+
width: {
|
|
11
|
+
value: number;
|
|
12
|
+
px: string;
|
|
13
|
+
tailwind: string;
|
|
14
|
+
};
|
|
15
|
+
style: BorderStyle;
|
|
16
|
+
description: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Border Token Factory
|
|
20
|
+
* Creates border tokens with consistent values
|
|
21
|
+
*/
|
|
22
|
+
export declare class BorderTokenFactory {
|
|
23
|
+
/**
|
|
24
|
+
* Create a border width token
|
|
25
|
+
*/
|
|
26
|
+
static createWidth(width: BorderWidth): BorderToken['width'];
|
|
27
|
+
/**
|
|
28
|
+
* Create a complete border token
|
|
29
|
+
*/
|
|
30
|
+
static create(width: BorderWidth, style?: BorderStyle): BorderToken;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Pre-defined border tokens
|
|
34
|
+
*/
|
|
35
|
+
export declare const BORDER_TOKENS: {
|
|
36
|
+
readonly none: BorderToken;
|
|
37
|
+
readonly thin: BorderToken;
|
|
38
|
+
readonly base: BorderToken;
|
|
39
|
+
readonly medium: BorderToken;
|
|
40
|
+
readonly thick: BorderToken;
|
|
41
|
+
readonly thinDashed: BorderToken;
|
|
42
|
+
readonly baseDashed: BorderToken;
|
|
43
|
+
readonly thinDotted: BorderToken;
|
|
44
|
+
readonly baseDotted: BorderToken;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Helper function to get border token
|
|
48
|
+
*/
|
|
49
|
+
export declare function getBorder(size: keyof typeof BORDER_TOKENS): BorderToken;
|
|
50
|
+
/**
|
|
51
|
+
* Helper function to get border width as Tailwind class
|
|
52
|
+
*/
|
|
53
|
+
export declare function getBorderWidthClass(width: BorderWidth): string;
|
|
54
|
+
/**
|
|
55
|
+
* Helper function to get border style as Tailwind class
|
|
56
|
+
*/
|
|
57
|
+
export declare function getBorderStyleClass(style: BorderStyle): string;
|
|
58
|
+
/**
|
|
59
|
+
* Helper function to get complete border classes
|
|
60
|
+
*/
|
|
61
|
+
export declare function getBorderClasses(width: BorderWidth, style?: BorderStyle): string;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gradient Tokens
|
|
3
|
+
*
|
|
4
|
+
* Centralized gradient system for consistent color gradients.
|
|
5
|
+
* Uses Factory Pattern for type-safe token creation.
|
|
6
|
+
*/
|
|
7
|
+
export type GradientDirection = 'to-r' | 'to-l' | 'to-t' | 'to-b' | 'to-tr' | 'to-tl' | 'to-br' | 'to-bl';
|
|
8
|
+
export type GradientRole = 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
|
9
|
+
export interface GradientToken {
|
|
10
|
+
value: string;
|
|
11
|
+
tailwind: string;
|
|
12
|
+
description: string;
|
|
13
|
+
from: string;
|
|
14
|
+
via?: string;
|
|
15
|
+
to: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Gradient Token Factory
|
|
19
|
+
* Creates gradient tokens with consistent color schemes
|
|
20
|
+
*/
|
|
21
|
+
export declare class GradientTokenFactory {
|
|
22
|
+
/**
|
|
23
|
+
* Create a gradient token
|
|
24
|
+
*/
|
|
25
|
+
static create(role: GradientRole, direction?: GradientDirection): GradientToken;
|
|
26
|
+
/**
|
|
27
|
+
* Convert hex color to approximate Tailwind color class
|
|
28
|
+
* This is a helper for documentation, actual implementation uses arbitrary values
|
|
29
|
+
*/
|
|
30
|
+
private static hexToTailwindColor;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Pre-defined gradient tokens
|
|
34
|
+
*/
|
|
35
|
+
export declare const GRADIENT_TOKENS: {
|
|
36
|
+
readonly primary: GradientToken;
|
|
37
|
+
readonly secondary: GradientToken;
|
|
38
|
+
readonly success: GradientToken;
|
|
39
|
+
readonly error: GradientToken;
|
|
40
|
+
readonly info: GradientToken;
|
|
41
|
+
readonly warning: GradientToken;
|
|
42
|
+
readonly 'primary-to-r': GradientToken;
|
|
43
|
+
readonly 'primary-to-b': GradientToken;
|
|
44
|
+
readonly 'secondary-to-r': GradientToken;
|
|
45
|
+
readonly 'success-to-r': GradientToken;
|
|
46
|
+
readonly 'error-to-r': GradientToken;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Helper function to get gradient token
|
|
50
|
+
*/
|
|
51
|
+
export declare function getGradient(role: GradientRole, direction?: GradientDirection): GradientToken;
|
|
52
|
+
/**
|
|
53
|
+
* Helper function to get gradient as Tailwind classes
|
|
54
|
+
*/
|
|
55
|
+
export declare function getGradientClass(role: GradientRole, direction?: GradientDirection): string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design Tokens Index
|
|
3
|
+
*
|
|
4
|
+
* Centralized exports for all design tokens.
|
|
5
|
+
*/
|
|
6
|
+
export * from './colors';
|
|
7
|
+
export { COLOR_TOKENS, COLOR_TOKENS_LIGHT, COLOR_TOKENS_DARK, getColor, getColorClass } from './colors';
|
|
8
|
+
export * from './spacing';
|
|
9
|
+
export { SPACING_TOKENS, getSpacing, getSpacingClass } from './spacing';
|
|
10
|
+
export * from './typography';
|
|
11
|
+
export { TYPOGRAPHY_TOKENS, FONT_FAMILY_TOKENS, FONT_WEIGHT_TOKENS, getTypography, getTypographyClasses } from './typography';
|
|
12
|
+
export * from './shadows';
|
|
13
|
+
export { SHADOW_TOKENS, getShadow, getShadowClass } from './shadows';
|
|
14
|
+
export * from './radius';
|
|
15
|
+
export { RADIUS_TOKENS, getRadius, getRadiusClass } from './radius';
|
|
16
|
+
export * from './borders';
|
|
17
|
+
export { BORDER_TOKENS, getBorder, getBorderWidthClass, getBorderStyleClass, getBorderClasses } from './borders';
|
|
18
|
+
export * from './breakpoints';
|
|
19
|
+
export { BREAKPOINT_TOKENS, getBreakpoint, getMediaQuery } from './breakpoints';
|
|
20
|
+
export * from './animations';
|
|
21
|
+
export { ANIMATION_TOKENS, getAnimation, getAnimationClass, getTransitionClass } from './animations';
|
|
22
|
+
export * from './z-index';
|
|
23
|
+
export { Z_INDEX_TOKENS, getZIndex, getZIndexClass } from './z-index';
|
|
24
|
+
export * from './opacity';
|
|
25
|
+
export { OPACITY_TOKENS, getOpacity, getOpacityClass } from './opacity';
|
|
26
|
+
export * from './gradients';
|
|
27
|
+
export { GRADIENT_TOKENS, getGradient, getGradientClass } from './gradients';
|
|
28
|
+
export * from './sidebar';
|
|
29
|
+
export { SIDEBAR_TOKENS, getNestedIndentClass } from './sidebar';
|
|
30
|
+
export * from './tokens.factory';
|
|
31
|
+
export { TokensFactory, defaultTokensFactory, createTokenSet } from './tokens.factory';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Opacity Tokens
|
|
3
|
+
*
|
|
4
|
+
* Centralized opacity system for consistent transparency values.
|
|
5
|
+
* Uses Factory Pattern for type-safe token creation.
|
|
6
|
+
*/
|
|
7
|
+
export type OpacityValue = 0 | 5 | 10 | 20 | 25 | 30 | 40 | 50 | 60 | 70 | 75 | 80 | 90 | 95 | 100;
|
|
8
|
+
export interface OpacityToken {
|
|
9
|
+
value: OpacityValue;
|
|
10
|
+
decimal: number;
|
|
11
|
+
tailwind: string;
|
|
12
|
+
description: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Opacity Token Factory
|
|
16
|
+
* Creates opacity tokens with consistent values
|
|
17
|
+
*/
|
|
18
|
+
export declare class OpacityTokenFactory {
|
|
19
|
+
/**
|
|
20
|
+
* Create an opacity token
|
|
21
|
+
*/
|
|
22
|
+
static create(value: OpacityValue): OpacityToken;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Pre-defined opacity tokens
|
|
26
|
+
*/
|
|
27
|
+
export declare const OPACITY_TOKENS: {
|
|
28
|
+
readonly transparent: OpacityToken;
|
|
29
|
+
readonly '5': OpacityToken;
|
|
30
|
+
readonly '10': OpacityToken;
|
|
31
|
+
readonly '20': OpacityToken;
|
|
32
|
+
readonly '25': OpacityToken;
|
|
33
|
+
readonly '30': OpacityToken;
|
|
34
|
+
readonly '40': OpacityToken;
|
|
35
|
+
readonly '50': OpacityToken;
|
|
36
|
+
readonly '60': OpacityToken;
|
|
37
|
+
readonly '70': OpacityToken;
|
|
38
|
+
readonly '75': OpacityToken;
|
|
39
|
+
readonly '80': OpacityToken;
|
|
40
|
+
readonly '90': OpacityToken;
|
|
41
|
+
readonly '95': OpacityToken;
|
|
42
|
+
readonly opaque: OpacityToken;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Helper function to get opacity token
|
|
46
|
+
*/
|
|
47
|
+
export declare function getOpacity(value: OpacityValue): OpacityToken;
|
|
48
|
+
/**
|
|
49
|
+
* Helper function to get opacity as Tailwind class
|
|
50
|
+
*/
|
|
51
|
+
export declare function getOpacityClass(value: OpacityValue): string;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Border Radius Tokens
|
|
3
|
+
*
|
|
4
|
+
* Centralized border radius system for consistent rounded corners.
|
|
5
|
+
* Uses Factory Pattern for type-safe token creation.
|
|
6
|
+
*/
|
|
7
|
+
export type RadiusSize = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
|
|
8
|
+
export interface RadiusToken {
|
|
9
|
+
value: number;
|
|
10
|
+
rem: string;
|
|
11
|
+
px: string;
|
|
12
|
+
tailwind: string;
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Radius Token Factory
|
|
17
|
+
* Creates radius tokens with consistent values
|
|
18
|
+
*/
|
|
19
|
+
export declare class RadiusTokenFactory {
|
|
20
|
+
/**
|
|
21
|
+
* Create a radius token
|
|
22
|
+
*/
|
|
23
|
+
static create(size: RadiusSize): RadiusToken;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Pre-defined radius tokens
|
|
27
|
+
*/
|
|
28
|
+
export declare const RADIUS_TOKENS: {
|
|
29
|
+
readonly none: RadiusToken;
|
|
30
|
+
readonly sm: RadiusToken;
|
|
31
|
+
readonly md: RadiusToken;
|
|
32
|
+
readonly lg: RadiusToken;
|
|
33
|
+
readonly xl: RadiusToken;
|
|
34
|
+
readonly '2xl': RadiusToken;
|
|
35
|
+
readonly '3xl': RadiusToken;
|
|
36
|
+
readonly full: RadiusToken;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Helper function to get radius token
|
|
40
|
+
*/
|
|
41
|
+
export declare function getRadius(size: keyof typeof RADIUS_TOKENS): RadiusToken;
|
|
42
|
+
/**
|
|
43
|
+
* Helper function to get radius as Tailwind class
|
|
44
|
+
*/
|
|
45
|
+
export declare function getRadiusClass(size: keyof typeof RADIUS_TOKENS): string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shadow Tokens
|
|
3
|
+
*
|
|
4
|
+
* Centralized shadow system for consistent elevation and depth.
|
|
5
|
+
* Uses Factory Pattern for type-safe token creation.
|
|
6
|
+
*/
|
|
7
|
+
export type ShadowSize = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'inner';
|
|
8
|
+
export interface ShadowToken {
|
|
9
|
+
value: string;
|
|
10
|
+
tailwind: string;
|
|
11
|
+
description: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Shadow Token Factory
|
|
15
|
+
* Creates shadow tokens with consistent values
|
|
16
|
+
*/
|
|
17
|
+
export declare class ShadowTokenFactory {
|
|
18
|
+
/**
|
|
19
|
+
* Create a shadow token
|
|
20
|
+
*/
|
|
21
|
+
static create(size: ShadowSize): ShadowToken;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Pre-defined shadow tokens
|
|
25
|
+
*/
|
|
26
|
+
export declare const SHADOW_TOKENS: {
|
|
27
|
+
readonly none: ShadowToken;
|
|
28
|
+
readonly sm: ShadowToken;
|
|
29
|
+
readonly md: ShadowToken;
|
|
30
|
+
readonly lg: ShadowToken;
|
|
31
|
+
readonly xl: ShadowToken;
|
|
32
|
+
readonly '2xl': ShadowToken;
|
|
33
|
+
readonly inner: ShadowToken;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Helper function to get shadow token
|
|
37
|
+
*/
|
|
38
|
+
export declare function getShadow(size: keyof typeof SHADOW_TOKENS): ShadowToken;
|
|
39
|
+
/**
|
|
40
|
+
* Helper function to get shadow as Tailwind class
|
|
41
|
+
*/
|
|
42
|
+
export declare function getShadowClass(size: keyof typeof SHADOW_TOKENS): string;
|
|
@@ -4,35 +4,35 @@
|
|
|
4
4
|
* Dark theme color palette and tokens.
|
|
5
5
|
*/
|
|
6
6
|
export declare const DARK_THEME: {
|
|
7
|
-
readonly colors: Record<import("
|
|
7
|
+
readonly colors: Record<import("..").ColorRole, import("..").SemanticColor>;
|
|
8
8
|
readonly spacing: {
|
|
9
|
-
readonly none: import("
|
|
10
|
-
readonly xs: import("
|
|
11
|
-
readonly sm: import("
|
|
12
|
-
readonly md: import("
|
|
13
|
-
readonly base: import("
|
|
14
|
-
readonly lg: import("
|
|
15
|
-
readonly xl: import("
|
|
16
|
-
readonly '2xl': import("
|
|
17
|
-
readonly '3xl': import("
|
|
18
|
-
readonly '4xl': import("
|
|
19
|
-
readonly '5xl': import("
|
|
20
|
-
readonly '6xl': import("
|
|
9
|
+
readonly none: import("..").SpacingToken;
|
|
10
|
+
readonly xs: import("..").SpacingToken;
|
|
11
|
+
readonly sm: import("..").SpacingToken;
|
|
12
|
+
readonly md: import("..").SpacingToken;
|
|
13
|
+
readonly base: import("..").SpacingToken;
|
|
14
|
+
readonly lg: import("..").SpacingToken;
|
|
15
|
+
readonly xl: import("..").SpacingToken;
|
|
16
|
+
readonly '2xl': import("..").SpacingToken;
|
|
17
|
+
readonly '3xl': import("..").SpacingToken;
|
|
18
|
+
readonly '4xl': import("..").SpacingToken;
|
|
19
|
+
readonly '5xl': import("..").SpacingToken;
|
|
20
|
+
readonly '6xl': import("..").SpacingToken;
|
|
21
21
|
};
|
|
22
22
|
readonly typography: {
|
|
23
|
-
readonly h1: import("
|
|
24
|
-
readonly h2: import("
|
|
25
|
-
readonly h3: import("
|
|
26
|
-
readonly h4: import("
|
|
27
|
-
readonly h5: import("
|
|
28
|
-
readonly h6: import("
|
|
29
|
-
readonly body: import("
|
|
30
|
-
readonly bodySmall: import("
|
|
31
|
-
readonly bodyLarge: import("
|
|
32
|
-
readonly label: import("
|
|
33
|
-
readonly caption: import("
|
|
34
|
-
readonly button: import("
|
|
23
|
+
readonly h1: import("..").TypographyToken;
|
|
24
|
+
readonly h2: import("..").TypographyToken;
|
|
25
|
+
readonly h3: import("..").TypographyToken;
|
|
26
|
+
readonly h4: import("..").TypographyToken;
|
|
27
|
+
readonly h5: import("..").TypographyToken;
|
|
28
|
+
readonly h6: import("..").TypographyToken;
|
|
29
|
+
readonly body: import("..").TypographyToken;
|
|
30
|
+
readonly bodySmall: import("..").TypographyToken;
|
|
31
|
+
readonly bodyLarge: import("..").TypographyToken;
|
|
32
|
+
readonly label: import("..").TypographyToken;
|
|
33
|
+
readonly caption: import("..").TypographyToken;
|
|
34
|
+
readonly button: import("..").TypographyToken;
|
|
35
35
|
};
|
|
36
|
-
readonly breakpoints: Record<import("
|
|
36
|
+
readonly breakpoints: Record<import("..").BreakpointName, import("..").BreakpointToken>;
|
|
37
37
|
readonly mode: "dark";
|
|
38
38
|
};
|
|
@@ -4,35 +4,35 @@
|
|
|
4
4
|
* Light theme color palette and tokens.
|
|
5
5
|
*/
|
|
6
6
|
export declare const LIGHT_THEME: {
|
|
7
|
-
readonly colors: Record<import("
|
|
7
|
+
readonly colors: Record<import("..").ColorRole, import("..").SemanticColor>;
|
|
8
8
|
readonly spacing: {
|
|
9
|
-
readonly none: import("
|
|
10
|
-
readonly xs: import("
|
|
11
|
-
readonly sm: import("
|
|
12
|
-
readonly md: import("
|
|
13
|
-
readonly base: import("
|
|
14
|
-
readonly lg: import("
|
|
15
|
-
readonly xl: import("
|
|
16
|
-
readonly '2xl': import("
|
|
17
|
-
readonly '3xl': import("
|
|
18
|
-
readonly '4xl': import("
|
|
19
|
-
readonly '5xl': import("
|
|
20
|
-
readonly '6xl': import("
|
|
9
|
+
readonly none: import("..").SpacingToken;
|
|
10
|
+
readonly xs: import("..").SpacingToken;
|
|
11
|
+
readonly sm: import("..").SpacingToken;
|
|
12
|
+
readonly md: import("..").SpacingToken;
|
|
13
|
+
readonly base: import("..").SpacingToken;
|
|
14
|
+
readonly lg: import("..").SpacingToken;
|
|
15
|
+
readonly xl: import("..").SpacingToken;
|
|
16
|
+
readonly '2xl': import("..").SpacingToken;
|
|
17
|
+
readonly '3xl': import("..").SpacingToken;
|
|
18
|
+
readonly '4xl': import("..").SpacingToken;
|
|
19
|
+
readonly '5xl': import("..").SpacingToken;
|
|
20
|
+
readonly '6xl': import("..").SpacingToken;
|
|
21
21
|
};
|
|
22
22
|
readonly typography: {
|
|
23
|
-
readonly h1: import("
|
|
24
|
-
readonly h2: import("
|
|
25
|
-
readonly h3: import("
|
|
26
|
-
readonly h4: import("
|
|
27
|
-
readonly h5: import("
|
|
28
|
-
readonly h6: import("
|
|
29
|
-
readonly body: import("
|
|
30
|
-
readonly bodySmall: import("
|
|
31
|
-
readonly bodyLarge: import("
|
|
32
|
-
readonly label: import("
|
|
33
|
-
readonly caption: import("
|
|
34
|
-
readonly button: import("
|
|
23
|
+
readonly h1: import("..").TypographyToken;
|
|
24
|
+
readonly h2: import("..").TypographyToken;
|
|
25
|
+
readonly h3: import("..").TypographyToken;
|
|
26
|
+
readonly h4: import("..").TypographyToken;
|
|
27
|
+
readonly h5: import("..").TypographyToken;
|
|
28
|
+
readonly h6: import("..").TypographyToken;
|
|
29
|
+
readonly body: import("..").TypographyToken;
|
|
30
|
+
readonly bodySmall: import("..").TypographyToken;
|
|
31
|
+
readonly bodyLarge: import("..").TypographyToken;
|
|
32
|
+
readonly label: import("..").TypographyToken;
|
|
33
|
+
readonly caption: import("..").TypographyToken;
|
|
34
|
+
readonly button: import("..").TypographyToken;
|
|
35
35
|
};
|
|
36
|
-
readonly breakpoints: Record<import("
|
|
36
|
+
readonly breakpoints: Record<import("..").BreakpointName, import("..").BreakpointToken>;
|
|
37
37
|
readonly mode: "light";
|
|
38
38
|
};
|
|
@@ -8,12 +8,26 @@ import { type SpacingScale, type SpacingToken } from './spacing';
|
|
|
8
8
|
import { type TypographyToken, type FontSize, type LineHeight, type FontWeight } from './typography';
|
|
9
9
|
import { type ColorRole, type SemanticColor } from './colors';
|
|
10
10
|
import { type BreakpointName, type BreakpointToken } from './breakpoints';
|
|
11
|
+
import { type ShadowSize, type ShadowToken } from './shadows';
|
|
12
|
+
import { type RadiusSize, type RadiusToken } from './radius';
|
|
13
|
+
import { type BorderWidth, type BorderToken } from './borders';
|
|
14
|
+
import { type AnimationDuration, type EasingFunction, type AnimationToken } from './animations';
|
|
15
|
+
import { type ZIndexLayer, type ZIndexToken } from './z-index';
|
|
16
|
+
import { type OpacityValue, type OpacityToken } from './opacity';
|
|
17
|
+
import { type GradientRole, type GradientDirection, type GradientToken } from './gradients';
|
|
11
18
|
export type ThemeMode = 'light' | 'dark';
|
|
12
19
|
export interface TokenSet {
|
|
13
20
|
spacing: Record<string, SpacingToken>;
|
|
14
21
|
typography: Record<string, TypographyToken>;
|
|
15
22
|
colors: Record<ColorRole, SemanticColor>;
|
|
16
23
|
breakpoints: Record<BreakpointName, BreakpointToken>;
|
|
24
|
+
shadows: Record<string, ShadowToken>;
|
|
25
|
+
radius: Record<string, RadiusToken>;
|
|
26
|
+
borders: Record<string, BorderToken>;
|
|
27
|
+
animations: Record<string, AnimationToken>;
|
|
28
|
+
zIndex: Record<string, ZIndexToken>;
|
|
29
|
+
opacity: Record<string, OpacityToken>;
|
|
30
|
+
gradients: Record<string, GradientToken>;
|
|
17
31
|
}
|
|
18
32
|
/**
|
|
19
33
|
* Tokens Factory
|
|
@@ -38,6 +52,34 @@ export declare class TokensFactory {
|
|
|
38
52
|
* Create breakpoint token
|
|
39
53
|
*/
|
|
40
54
|
createBreakpoint(name: BreakpointName): BreakpointToken;
|
|
55
|
+
/**
|
|
56
|
+
* Create shadow token
|
|
57
|
+
*/
|
|
58
|
+
createShadow(size: ShadowSize): ShadowToken;
|
|
59
|
+
/**
|
|
60
|
+
* Create radius token
|
|
61
|
+
*/
|
|
62
|
+
createRadius(size: RadiusSize): RadiusToken;
|
|
63
|
+
/**
|
|
64
|
+
* Create border token
|
|
65
|
+
*/
|
|
66
|
+
createBorder(width: BorderWidth): BorderToken;
|
|
67
|
+
/**
|
|
68
|
+
* Create animation token
|
|
69
|
+
*/
|
|
70
|
+
createAnimation(duration: AnimationDuration, easing?: EasingFunction): AnimationToken;
|
|
71
|
+
/**
|
|
72
|
+
* Create z-index token
|
|
73
|
+
*/
|
|
74
|
+
createZIndex(layer: ZIndexLayer): ZIndexToken;
|
|
75
|
+
/**
|
|
76
|
+
* Create opacity token
|
|
77
|
+
*/
|
|
78
|
+
createOpacity(value: OpacityValue): OpacityToken;
|
|
79
|
+
/**
|
|
80
|
+
* Create gradient token
|
|
81
|
+
*/
|
|
82
|
+
createGradient(role: GradientRole, direction?: GradientDirection): GradientToken;
|
|
41
83
|
/**
|
|
42
84
|
* Create complete token set for a theme
|
|
43
85
|
*/
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Z-Index Tokens
|
|
3
|
+
*
|
|
4
|
+
* Centralized z-index system for consistent layering.
|
|
5
|
+
* Uses Factory Pattern for type-safe token creation.
|
|
6
|
+
*/
|
|
7
|
+
export type ZIndexLayer = 'base' | 'dropdown' | 'sticky' | 'fixed' | 'modal-backdrop' | 'modal' | 'popover' | 'tooltip' | 'toast';
|
|
8
|
+
export interface ZIndexToken {
|
|
9
|
+
value: number;
|
|
10
|
+
tailwind: string;
|
|
11
|
+
description: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Z-Index Token Factory
|
|
15
|
+
* Creates z-index tokens with consistent layering
|
|
16
|
+
*/
|
|
17
|
+
export declare class ZIndexTokenFactory {
|
|
18
|
+
/**
|
|
19
|
+
* Create a z-index token
|
|
20
|
+
*/
|
|
21
|
+
static create(layer: ZIndexLayer): ZIndexToken;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Pre-defined z-index tokens
|
|
25
|
+
*/
|
|
26
|
+
export declare const Z_INDEX_TOKENS: {
|
|
27
|
+
readonly base: ZIndexToken;
|
|
28
|
+
readonly dropdown: ZIndexToken;
|
|
29
|
+
readonly sticky: ZIndexToken;
|
|
30
|
+
readonly fixed: ZIndexToken;
|
|
31
|
+
readonly 'modal-backdrop': ZIndexToken;
|
|
32
|
+
readonly modal: ZIndexToken;
|
|
33
|
+
readonly popover: ZIndexToken;
|
|
34
|
+
readonly tooltip: ZIndexToken;
|
|
35
|
+
readonly toast: ZIndexToken;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Helper function to get z-index token
|
|
39
|
+
*/
|
|
40
|
+
export declare function getZIndex(layer: ZIndexLayer): ZIndexToken;
|
|
41
|
+
/**
|
|
42
|
+
* Helper function to get z-index as Tailwind class
|
|
43
|
+
*/
|
|
44
|
+
export declare function getZIndexClass(layer: ZIndexLayer): string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabio.caffarello/react-design-system",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.8.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -14,6 +14,38 @@
|
|
|
14
14
|
"default": "./dist/index.js"
|
|
15
15
|
},
|
|
16
16
|
"require": "./dist/index.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./atoms": {
|
|
19
|
+
"types": "./dist/ui/atoms/index.d.ts",
|
|
20
|
+
"import": {
|
|
21
|
+
"development": "./src/ui/atoms/index.ts",
|
|
22
|
+
"default": "./dist/atoms/index.js"
|
|
23
|
+
},
|
|
24
|
+
"require": "./dist/atoms/index.cjs"
|
|
25
|
+
},
|
|
26
|
+
"./molecules": {
|
|
27
|
+
"types": "./dist/ui/molecules/index.d.ts",
|
|
28
|
+
"import": {
|
|
29
|
+
"development": "./src/ui/molecules/index.ts",
|
|
30
|
+
"default": "./dist/molecules/index.js"
|
|
31
|
+
},
|
|
32
|
+
"require": "./dist/molecules/index.cjs"
|
|
33
|
+
},
|
|
34
|
+
"./organisms": {
|
|
35
|
+
"types": "./dist/ui/organisms/index.d.ts",
|
|
36
|
+
"import": {
|
|
37
|
+
"development": "./src/ui/organisms/index.ts",
|
|
38
|
+
"default": "./dist/organisms/index.js"
|
|
39
|
+
},
|
|
40
|
+
"require": "./dist/organisms/index.cjs"
|
|
41
|
+
},
|
|
42
|
+
"./tokens": {
|
|
43
|
+
"types": "./dist/ui/tokens/index.d.ts",
|
|
44
|
+
"import": {
|
|
45
|
+
"development": "./src/ui/tokens/index.ts",
|
|
46
|
+
"default": "./dist/tokens/index.js"
|
|
47
|
+
},
|
|
48
|
+
"require": "./dist/tokens/index.cjs"
|
|
17
49
|
}
|
|
18
50
|
},
|
|
19
51
|
"files": [
|
|
@@ -32,27 +64,39 @@
|
|
|
32
64
|
"build-storybook": "storybook build",
|
|
33
65
|
"plop": "plop",
|
|
34
66
|
"postplop": "prettier -w './src/ui/**/*.{ts,tsx}'",
|
|
35
|
-
"test": "vitest run"
|
|
67
|
+
"test": "vitest run",
|
|
68
|
+
"test:coverage": "vitest run --coverage",
|
|
69
|
+
"test:watch": "vitest watch",
|
|
70
|
+
"audit:tokens": "node scripts/audit-tokens.js"
|
|
36
71
|
},
|
|
37
72
|
"peerDependencies": {
|
|
73
|
+
"@hookform/resolvers": "^3.0.0",
|
|
74
|
+
"lucide-react": "^0.552.0",
|
|
38
75
|
"react": ">=19",
|
|
39
76
|
"react-dom": ">=19",
|
|
40
|
-
"
|
|
77
|
+
"react-hook-form": "^7.71.0",
|
|
78
|
+
"zod": "^3.0.0"
|
|
41
79
|
},
|
|
42
80
|
"dependencies": {
|
|
43
81
|
"@tailwindcss/postcss": "^4.1.16",
|
|
44
|
-
"react": "
|
|
45
|
-
"react-dom": "
|
|
82
|
+
"react": ">=19",
|
|
83
|
+
"react-dom": ">=19"
|
|
46
84
|
},
|
|
47
85
|
"devDependencies": {
|
|
48
86
|
"@chromatic-com/storybook": "^4.1.2",
|
|
49
87
|
"@eslint/js": "^9.36.0",
|
|
88
|
+
"@hookform/resolvers": "^3.0.0",
|
|
50
89
|
"@storybook/addon-a11y": "^10.0.3",
|
|
51
90
|
"@storybook/addon-docs": "^10.0.3",
|
|
91
|
+
"@storybook/addon-mcp": "^0.1.8",
|
|
52
92
|
"@storybook/addon-vitest": "^10.0.3",
|
|
53
93
|
"@storybook/react-vite": "^10.0.3",
|
|
94
|
+
"@testing-library/dom": "^10.4.1",
|
|
54
95
|
"@testing-library/jest-dom": "^6.9.1",
|
|
55
96
|
"@testing-library/react": "^16.3.0",
|
|
97
|
+
"lucide-react": "^0.552.0",
|
|
98
|
+
"react-hook-form": "^7.71.0",
|
|
99
|
+
"zod": "^3.0.0",
|
|
56
100
|
"@types/node": "^24.6.0",
|
|
57
101
|
"@types/react": "^19.1.16",
|
|
58
102
|
"@types/react-dom": "^19.1.9",
|
|
@@ -83,4 +127,4 @@
|
|
|
83
127
|
"plugin:storybook/recommended"
|
|
84
128
|
]
|
|
85
129
|
}
|
|
86
|
-
}
|
|
130
|
+
}
|