@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,30 @@
|
|
|
1
|
+
export { default as Table } from './Table';
|
|
2
|
+
export type { TableColumn } from './TableTypes';
|
|
3
|
+
export { TableContext, useTableContext, useTableContextOptional } from './TableContext';
|
|
4
|
+
export type { TableContextValue, PaginationMode, PaginationState, SortState, FilterState, SelectionState, } from './TableContext';
|
|
5
|
+
export { TableProvider } from './TableProvider';
|
|
6
|
+
export type { TableProviderProps } from './TableProvider';
|
|
7
|
+
export { default as TableHeader } from './TableHeader';
|
|
8
|
+
export type { TableHeaderProps } from './TableHeader';
|
|
9
|
+
export { default as TableHeaderRow } from './TableHeaderRow';
|
|
10
|
+
export type { TableHeaderRowProps } from './TableHeaderRow';
|
|
11
|
+
export { default as TableHeaderCell } from './TableHeaderCell';
|
|
12
|
+
export type { TableHeaderCellProps } from './TableHeaderCell';
|
|
13
|
+
export { default as TableBody } from './TableBody';
|
|
14
|
+
export type { TableBodyProps } from './TableBody';
|
|
15
|
+
export { default as TableRow } from './TableRow';
|
|
16
|
+
export type { TableRowProps } from './TableRow';
|
|
17
|
+
export { default as TableCell } from './TableCell';
|
|
18
|
+
export type { TableCellProps } from './TableCell';
|
|
19
|
+
export { default as TableFilters } from './TableFilters';
|
|
20
|
+
export type { TableFiltersProps } from './TableFilters';
|
|
21
|
+
export { default as TablePagination } from './TablePagination';
|
|
22
|
+
export type { TablePaginationProps } from './TablePagination';
|
|
23
|
+
export { default as TableEmptyState } from './TableEmptyState';
|
|
24
|
+
export type { TableEmptyStateProps } from './TableEmptyState';
|
|
25
|
+
export { default as TableActions } from './TableActions';
|
|
26
|
+
export type { TableActionsProps } from './TableActions';
|
|
27
|
+
export { useVirtualScrolling } from './useVirtualScrolling';
|
|
28
|
+
export { useColumnResizing } from './useColumnResizing';
|
|
29
|
+
export type { UseVirtualScrollingOptions, VirtualScrollingResult } from './useVirtualScrolling';
|
|
30
|
+
export type { UseColumnResizingOptions, UseColumnResizingResult } from './useColumnResizing';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface ColumnWidth {
|
|
2
|
+
[key: string]: number;
|
|
3
|
+
}
|
|
4
|
+
export interface UseColumnResizingOptions {
|
|
5
|
+
defaultWidths?: ColumnWidth;
|
|
6
|
+
minWidth?: number;
|
|
7
|
+
maxWidth?: number;
|
|
8
|
+
resizable?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface UseColumnResizingResult {
|
|
11
|
+
columnWidths: ColumnWidth;
|
|
12
|
+
setColumnWidth: (columnKey: string, width: number) => void;
|
|
13
|
+
resetColumnWidths: () => void;
|
|
14
|
+
isResizing: boolean;
|
|
15
|
+
resizingColumn: string | null;
|
|
16
|
+
startResize: (columnKey: string, startX: number, startWidth: number) => void;
|
|
17
|
+
handleResize: (currentX: number) => void;
|
|
18
|
+
endResize: () => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* useColumnResizing Hook
|
|
22
|
+
*
|
|
23
|
+
* Hook for managing column resizing in tables.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* const {
|
|
28
|
+
* columnWidths,
|
|
29
|
+
* setColumnWidth,
|
|
30
|
+
* startResize,
|
|
31
|
+
* handleResize,
|
|
32
|
+
* endResize,
|
|
33
|
+
* } = useColumnResizing({
|
|
34
|
+
* defaultWidths: { name: 200, email: 250 },
|
|
35
|
+
* minWidth: 100,
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare function useColumnResizing(options?: UseColumnResizingOptions): UseColumnResizingResult;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface UseVirtualScrollingOptions {
|
|
2
|
+
itemHeight: number;
|
|
3
|
+
containerHeight?: number;
|
|
4
|
+
overscan?: number;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface VirtualScrollingResult {
|
|
8
|
+
virtualItems: Array<{
|
|
9
|
+
index: number;
|
|
10
|
+
start: number;
|
|
11
|
+
end: number;
|
|
12
|
+
size: number;
|
|
13
|
+
}>;
|
|
14
|
+
totalHeight: number;
|
|
15
|
+
scrollOffset: number;
|
|
16
|
+
setScrollOffset: (offset: number) => void;
|
|
17
|
+
scrollToIndex: (index: number) => void;
|
|
18
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* useVirtualScrolling Hook
|
|
22
|
+
*
|
|
23
|
+
* Hook for virtual scrolling to improve performance with large datasets.
|
|
24
|
+
* Only renders visible items plus overscan buffer.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* const { virtualItems, totalHeight, containerRef } = useVirtualScrolling({
|
|
29
|
+
* itemHeight: 50,
|
|
30
|
+
* containerHeight: 400,
|
|
31
|
+
* overscan: 5,
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function useVirtualScrolling<T>(items: T[], options: UseVirtualScrollingOptions): VirtualScrollingResult;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type TimelineOrientation = 'horizontal' | 'vertical';
|
|
3
|
+
export interface TimelineItem {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
content?: ReactNode;
|
|
8
|
+
timestamp?: string;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
status?: 'default' | 'active' | 'completed' | 'error';
|
|
11
|
+
}
|
|
12
|
+
export interface TimelineProps {
|
|
13
|
+
items: TimelineItem[];
|
|
14
|
+
orientation?: TimelineOrientation;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Timeline Component
|
|
19
|
+
*
|
|
20
|
+
* A timeline component for displaying events in chronological order.
|
|
21
|
+
* Supports horizontal and vertical orientations.
|
|
22
|
+
* Follows Atomic Design principles as an Organism component.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <Timeline
|
|
27
|
+
* items={[
|
|
28
|
+
* { id: '1', title: 'Event 1', description: 'Description 1', timestamp: '2024-01-01' },
|
|
29
|
+
* { id: '2', title: 'Event 2', description: 'Description 2', timestamp: '2024-01-02' },
|
|
30
|
+
* ]}
|
|
31
|
+
* />
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export default function Timeline({ items, orientation, className, }: TimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Timeline from './Timeline';
|
|
3
|
+
declare const meta: Meta<typeof Timeline>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Timeline>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Horizontal: Story;
|
|
8
|
+
export declare const WithIcons: Story;
|
|
9
|
+
export declare const WithContent: Story;
|
|
10
|
+
export declare const WithErrors: Story;
|
|
11
|
+
export declare const Simple: Story;
|
|
12
|
+
export declare const LongContent: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
import { type Toast as ToastType } from './ToastContext';
|
|
3
|
+
export interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
4
|
+
toast: ToastType;
|
|
5
|
+
onDismiss: (id: string) => void;
|
|
6
|
+
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
|
|
7
|
+
}
|
|
8
|
+
export declare function Toast({ toast, onDismiss, position, className, style, ...props }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ToastProvider } from './index';
|
|
3
|
+
declare const meta: Meta<typeof ToastProvider>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ToastProvider>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const TopLeft: Story;
|
|
8
|
+
export declare const BottomRight: Story;
|
|
9
|
+
export declare const BottomLeft: Story;
|
|
10
|
+
export declare const TopCenter: Story;
|
|
11
|
+
export declare const BottomCenter: Story;
|
|
12
|
+
export declare const MultipleToasts: Story;
|
|
13
|
+
export declare const WithActions: Story;
|
|
14
|
+
export declare const CustomDuration: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export interface ToastContainerProps {
|
|
2
|
+
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
|
|
3
|
+
maxToasts?: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function ToastContainer({ position, maxToasts, }: ToastContainerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type ToastVariant = 'success' | 'error' | 'warning' | 'info';
|
|
2
|
+
export interface Toast {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
variant: ToastVariant;
|
|
7
|
+
duration?: number;
|
|
8
|
+
action?: {
|
|
9
|
+
label: string;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface ToastContextValue {
|
|
14
|
+
toasts: Toast[];
|
|
15
|
+
addToast: (toast: Omit<Toast, 'id'>) => string;
|
|
16
|
+
removeToast: (id: string) => void;
|
|
17
|
+
clearAll: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const ToastContext: import("react").Context<ToastContextValue | undefined>;
|
|
20
|
+
export declare function useToastContext(): ToastContextValue;
|
|
21
|
+
export declare function useToastContextOptional(): ToastContextValue | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface ToastProviderProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
defaultDuration?: number;
|
|
5
|
+
maxToasts?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function ToastProvider({ children, defaultDuration, maxToasts, }: ToastProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast Components
|
|
3
|
+
*
|
|
4
|
+
* Toast notification system with provider, hook, and container.
|
|
5
|
+
*/
|
|
6
|
+
export { ToastProvider } from './ToastProvider';
|
|
7
|
+
export { ToastContainer } from './ToastContainer';
|
|
8
|
+
export { Toast } from './Toast';
|
|
9
|
+
export { useToast } from './useToast';
|
|
10
|
+
export { useToastContext, useToastContextOptional } from './ToastContext';
|
|
11
|
+
export type { ToastProviderProps } from './ToastProvider';
|
|
12
|
+
export type { ToastContainerProps } from './ToastContainer';
|
|
13
|
+
export type { ToastProps } from './Toast';
|
|
14
|
+
export type { ToastOptions } from './useToast';
|
|
15
|
+
export type { Toast as ToastType, ToastVariant, ToastContextValue } from './ToastContext';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ToastVariant } from './ToastContext';
|
|
2
|
+
export interface ToastOptions {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
variant?: ToastVariant;
|
|
6
|
+
duration?: number;
|
|
7
|
+
action?: {
|
|
8
|
+
label: string;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* useToast Hook
|
|
14
|
+
*
|
|
15
|
+
* Hook for showing toast notifications.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* const toast = useToast();
|
|
20
|
+
*
|
|
21
|
+
* toast.success('Success!', 'Operation completed successfully');
|
|
22
|
+
* toast.error('Error!', 'Something went wrong');
|
|
23
|
+
* toast.info('Info', 'Here is some information');
|
|
24
|
+
* toast.warning('Warning', 'Please be careful');
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function useToast(): {
|
|
28
|
+
show: (options: ToastOptions) => string;
|
|
29
|
+
success: (title: string, description?: string, options?: Omit<ToastOptions, "title" | "description" | "variant">) => string;
|
|
30
|
+
error: (title: string, description?: string, options?: Omit<ToastOptions, "title" | "description" | "variant">) => string;
|
|
31
|
+
warning: (title: string, description?: string, options?: Omit<ToastOptions, "title" | "description" | "variant">) => string;
|
|
32
|
+
info: (title: string, description?: string, options?: Omit<ToastOptions, "title" | "description" | "variant">) => string;
|
|
33
|
+
dismiss: (id: string) => void;
|
|
34
|
+
clearAll: () => void;
|
|
35
|
+
};
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
export { default as LoginBox } from "./LoginBox/LoginBox";
|
|
2
2
|
export { default as Modal } from "./Modal/Modal";
|
|
3
3
|
export { default as Table } from "./Table/Table";
|
|
4
|
-
export
|
|
4
|
+
export * from "./Table";
|
|
5
5
|
export { default as Sidebar } from "./Sidebar/Sidebar";
|
|
6
|
-
export
|
|
6
|
+
export * from "./Sidebar";
|
|
7
|
+
export * from "./Dialog";
|
|
8
|
+
export * from "./Toast";
|
|
9
|
+
export { default as Stepper } from "./Stepper/Stepper";
|
|
10
|
+
export type { StepperProps, StepperStep, StepperStatus } from "./Stepper/Stepper";
|
|
11
|
+
export { default as Timeline } from "./Timeline/Timeline";
|
|
12
|
+
export type { TimelineProps, TimelineItem, TimelineOrientation } from "./Timeline/Timeline";
|
|
13
|
+
export { default as CommandPalette } from "./CommandPalette/CommandPalette";
|
|
14
|
+
export type { CommandPaletteProps, CommandItem } from "./CommandPalette/CommandPalette";
|
|
15
|
+
export { default as DataGrid } from "./DataGrid/DataGrid";
|
|
16
|
+
export type { DataGridProps, DataGridColumn, DataGridGroup } from "./DataGrid/DataGrid";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Advanced Theme Provider
|
|
3
|
+
*
|
|
4
|
+
* Enhanced ThemeProvider with support for:
|
|
5
|
+
* - Multiple themes simultaneously
|
|
6
|
+
* - CSS variables
|
|
7
|
+
* - Theme inheritance
|
|
8
|
+
* - Smooth transitions
|
|
9
|
+
*/
|
|
10
|
+
import { type ReactNode } from 'react';
|
|
11
|
+
import type { Theme, CustomThemeConfig, ThemeBuilderOptions } from '../themes/types';
|
|
12
|
+
export interface AdvancedThemeContextValue {
|
|
13
|
+
currentTheme: string;
|
|
14
|
+
themes: Record<string, Theme>;
|
|
15
|
+
setTheme: (themeName: string) => void;
|
|
16
|
+
registerTheme: (config: CustomThemeConfig) => Theme;
|
|
17
|
+
removeTheme: (themeName: string) => boolean;
|
|
18
|
+
getTheme: (themeName?: string) => Theme | undefined;
|
|
19
|
+
tokens: Theme | null;
|
|
20
|
+
options: ThemeBuilderOptions;
|
|
21
|
+
setOptions: (options: Partial<ThemeBuilderOptions>) => void;
|
|
22
|
+
}
|
|
23
|
+
export interface AdvancedThemeProviderProps {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
defaultTheme?: string;
|
|
26
|
+
options?: ThemeBuilderOptions;
|
|
27
|
+
initialThemes?: CustomThemeConfig[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Advanced ThemeProvider Component
|
|
31
|
+
*
|
|
32
|
+
* Provides advanced theme management with support for multiple themes,
|
|
33
|
+
* CSS variables, inheritance, and smooth transitions.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <AdvancedThemeProvider
|
|
38
|
+
* defaultTheme="light"
|
|
39
|
+
* options={{
|
|
40
|
+
* enableCSSVariables: true,
|
|
41
|
+
* enableTransitions: true,
|
|
42
|
+
* }}
|
|
43
|
+
* >
|
|
44
|
+
* <App />
|
|
45
|
+
* </AdvancedThemeProvider>
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare function AdvancedThemeProvider({ children, defaultTheme, options: initialOptions, initialThemes, }: AdvancedThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
/**
|
|
50
|
+
* Hook to use advanced theme context
|
|
51
|
+
*/
|
|
52
|
+
export declare function useAdvancedTheme(): AdvancedThemeContextValue;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Providers Module
|
|
3
|
+
*
|
|
4
|
+
* Exports for theme and context providers.
|
|
5
|
+
*/
|
|
6
|
+
export { ThemeProvider, useTheme } from './ThemeProvider';
|
|
7
|
+
export type { ThemeContextValue, ThemeProviderProps } from './ThemeProvider';
|
|
8
|
+
export { AdvancedThemeProvider, useAdvancedTheme, } from './AdvancedThemeProvider';
|
|
9
|
+
export type { AdvancedThemeContextValue, AdvancedThemeProviderProps } from './AdvancedThemeProvider';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme Builder
|
|
3
|
+
*
|
|
4
|
+
* Builder Pattern for creating custom themes.
|
|
5
|
+
* Supports theme inheritance and CSS variable generation.
|
|
6
|
+
*/
|
|
7
|
+
import type { CustomThemeConfig, Theme } from './types';
|
|
8
|
+
export declare class ThemeBuilder {
|
|
9
|
+
private config;
|
|
10
|
+
private baseFactory;
|
|
11
|
+
constructor(config: CustomThemeConfig);
|
|
12
|
+
/**
|
|
13
|
+
* Build a complete theme from configuration
|
|
14
|
+
*/
|
|
15
|
+
build(): Theme;
|
|
16
|
+
/**
|
|
17
|
+
* Merge color overrides with base colors
|
|
18
|
+
*/
|
|
19
|
+
private mergeColors;
|
|
20
|
+
/**
|
|
21
|
+
* Generate CSS variables from token set
|
|
22
|
+
*/
|
|
23
|
+
private generateCSSVariables;
|
|
24
|
+
/**
|
|
25
|
+
* Create a theme builder instance
|
|
26
|
+
*/
|
|
27
|
+
static create(config: CustomThemeConfig): ThemeBuilder;
|
|
28
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme Registry
|
|
3
|
+
*
|
|
4
|
+
* Central registry for managing multiple themes.
|
|
5
|
+
* Supports theme registration, retrieval, and switching.
|
|
6
|
+
*/
|
|
7
|
+
import type { CustomThemeConfig, Theme, ThemeRegistry } from './types';
|
|
8
|
+
export declare class ThemeRegistryManager {
|
|
9
|
+
private themes;
|
|
10
|
+
private defaultTheme;
|
|
11
|
+
/**
|
|
12
|
+
* Register a new theme
|
|
13
|
+
*/
|
|
14
|
+
register(config: CustomThemeConfig): Theme;
|
|
15
|
+
/**
|
|
16
|
+
* Register built-in themes (light and dark)
|
|
17
|
+
*/
|
|
18
|
+
registerBuiltInThemes(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Generate CSS variables from token set
|
|
21
|
+
*/
|
|
22
|
+
private generateCSSVariables;
|
|
23
|
+
/**
|
|
24
|
+
* Get a theme by name
|
|
25
|
+
*/
|
|
26
|
+
get(name: string): Theme | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Get all registered themes
|
|
29
|
+
*/
|
|
30
|
+
getAll(): ThemeRegistry;
|
|
31
|
+
/**
|
|
32
|
+
* Check if a theme exists
|
|
33
|
+
*/
|
|
34
|
+
has(name: string): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Remove a theme
|
|
37
|
+
*/
|
|
38
|
+
remove(name: string): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Get default theme name
|
|
41
|
+
*/
|
|
42
|
+
getDefaultTheme(): string;
|
|
43
|
+
/**
|
|
44
|
+
* Set default theme
|
|
45
|
+
*/
|
|
46
|
+
setDefaultTheme(name: string): void;
|
|
47
|
+
/**
|
|
48
|
+
* Get theme names
|
|
49
|
+
*/
|
|
50
|
+
getThemeNames(): string[];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Global theme registry instance
|
|
54
|
+
*/
|
|
55
|
+
export declare const themeRegistry: ThemeRegistryManager;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Themes Module
|
|
3
|
+
*
|
|
4
|
+
* Exports for the advanced theme system.
|
|
5
|
+
*/
|
|
6
|
+
export { ThemeBuilder } from './ThemeBuilder';
|
|
7
|
+
export { ThemeRegistryManager, themeRegistry } from './ThemeRegistry';
|
|
8
|
+
export type { CustomThemeConfig, Theme, ThemeRegistry, ThemeBuilderOptions, } from './types';
|
|
9
|
+
export { mergeDeep, toCSSVariableName, applyCSSVariables, removeCSSVariables, } from './utils';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the advanced theme system.
|
|
5
|
+
*/
|
|
6
|
+
import type { TokenSet, ThemeMode } from '../tokens/tokens.factory';
|
|
7
|
+
import type { ColorRole, SemanticColor } from '../tokens/colors';
|
|
8
|
+
/**
|
|
9
|
+
* Custom theme configuration
|
|
10
|
+
* Allows partial overrides of the default token set
|
|
11
|
+
*/
|
|
12
|
+
export interface CustomThemeConfig {
|
|
13
|
+
name: string;
|
|
14
|
+
base?: ThemeMode;
|
|
15
|
+
colors?: Partial<Record<ColorRole, Partial<SemanticColor>>>;
|
|
16
|
+
spacing?: Partial<TokenSet['spacing']>;
|
|
17
|
+
typography?: Partial<TokenSet['typography']>;
|
|
18
|
+
shadows?: Partial<TokenSet['shadows']>;
|
|
19
|
+
radius?: Partial<TokenSet['radius']>;
|
|
20
|
+
borders?: Partial<TokenSet['borders']>;
|
|
21
|
+
animations?: Partial<TokenSet['animations']>;
|
|
22
|
+
zIndex?: Partial<TokenSet['zIndex']>;
|
|
23
|
+
opacity?: Partial<TokenSet['opacity']>;
|
|
24
|
+
gradients?: Partial<TokenSet['gradients']>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Complete theme definition
|
|
28
|
+
*/
|
|
29
|
+
export interface Theme extends TokenSet {
|
|
30
|
+
name: string;
|
|
31
|
+
mode: ThemeMode;
|
|
32
|
+
cssVariables: Record<string, string>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Theme registry
|
|
36
|
+
*/
|
|
37
|
+
export interface ThemeRegistry {
|
|
38
|
+
[themeName: string]: Theme;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Theme builder options
|
|
42
|
+
*/
|
|
43
|
+
export interface ThemeBuilderOptions {
|
|
44
|
+
enableCSSVariables?: boolean;
|
|
45
|
+
enableTransitions?: boolean;
|
|
46
|
+
transitionDuration?: string;
|
|
47
|
+
storageKey?: string;
|
|
48
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme Utilities
|
|
3
|
+
*
|
|
4
|
+
* Helper functions for theme operations.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Deep merge utility
|
|
8
|
+
*/
|
|
9
|
+
export declare function mergeDeep<T extends Record<string, any>>(target: T, ...sources: Partial<T>[]): T;
|
|
10
|
+
/**
|
|
11
|
+
* Convert CSS variable name to kebab-case
|
|
12
|
+
*/
|
|
13
|
+
export declare function toCSSVariableName(name: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Apply CSS variables to element
|
|
16
|
+
*/
|
|
17
|
+
export declare function applyCSSVariables(element: HTMLElement, variables: Record<string, string>): void;
|
|
18
|
+
/**
|
|
19
|
+
* Remove CSS variables from element
|
|
20
|
+
*/
|
|
21
|
+
export declare function removeCSSVariables(element: HTMLElement, variableNames: string[]): void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token Visualization Components
|
|
3
|
+
*
|
|
4
|
+
* React components for visualizing design tokens in Storybook
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Color Palette Visualization
|
|
8
|
+
*/
|
|
9
|
+
export declare function ColorPalette(): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* Spacing Reference Visualization
|
|
12
|
+
*/
|
|
13
|
+
export declare function SpacingReference(): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Typography Reference Visualization
|
|
16
|
+
*/
|
|
17
|
+
export declare function TypographyReference(): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* Shadow Reference Visualization
|
|
20
|
+
*/
|
|
21
|
+
export declare function ShadowReference(): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
/**
|
|
23
|
+
* Radius Reference Visualization
|
|
24
|
+
*/
|
|
25
|
+
export declare function RadiusReference(): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Animation Reference Visualization
|
|
28
|
+
*/
|
|
29
|
+
export declare function AnimationReference(): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* Z-Index Reference Visualization
|
|
32
|
+
*/
|
|
33
|
+
export declare function ZIndexReference(): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
/**
|
|
35
|
+
* Opacity Reference Visualization
|
|
36
|
+
*/
|
|
37
|
+
export declare function OpacityReference(): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* Gradient Reference Visualization
|
|
40
|
+
*/
|
|
41
|
+
export declare function GradientReference(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Animation Tokens
|
|
3
|
+
*
|
|
4
|
+
* Centralized animation and transition system for consistent timing and easing.
|
|
5
|
+
* Uses Factory Pattern for type-safe token creation.
|
|
6
|
+
*/
|
|
7
|
+
export type AnimationDuration = 'fast' | 'base' | 'slow' | 'slower';
|
|
8
|
+
export type EasingFunction = 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring';
|
|
9
|
+
export interface AnimationToken {
|
|
10
|
+
duration: {
|
|
11
|
+
value: string;
|
|
12
|
+
ms: number;
|
|
13
|
+
tailwind: string;
|
|
14
|
+
};
|
|
15
|
+
easing: {
|
|
16
|
+
value: string;
|
|
17
|
+
tailwind: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface TransitionToken {
|
|
22
|
+
property: string;
|
|
23
|
+
duration: string;
|
|
24
|
+
timingFunction: string;
|
|
25
|
+
tailwind: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Animation Token Factory
|
|
29
|
+
* Creates animation tokens with consistent timing and easing
|
|
30
|
+
*/
|
|
31
|
+
export declare class AnimationTokenFactory {
|
|
32
|
+
/**
|
|
33
|
+
* Create an animation token
|
|
34
|
+
*/
|
|
35
|
+
static create(duration: AnimationDuration, easing?: EasingFunction): AnimationToken;
|
|
36
|
+
/**
|
|
37
|
+
* Create a transition token
|
|
38
|
+
*/
|
|
39
|
+
static createTransition(property: string | string[], duration?: AnimationDuration, easing?: EasingFunction): TransitionToken;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Pre-defined animation tokens
|
|
43
|
+
*/
|
|
44
|
+
export declare const ANIMATION_TOKENS: {
|
|
45
|
+
readonly fast: AnimationToken;
|
|
46
|
+
readonly base: AnimationToken;
|
|
47
|
+
readonly slow: AnimationToken;
|
|
48
|
+
readonly slower: AnimationToken;
|
|
49
|
+
readonly colors: TransitionToken;
|
|
50
|
+
readonly opacity: TransitionToken;
|
|
51
|
+
readonly transform: TransitionToken;
|
|
52
|
+
readonly all: TransitionToken;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Helper function to get animation token
|
|
56
|
+
*/
|
|
57
|
+
export declare function getAnimation(duration: AnimationDuration, easing?: EasingFunction): AnimationToken;
|
|
58
|
+
/**
|
|
59
|
+
* Helper function to get animation classes
|
|
60
|
+
*/
|
|
61
|
+
export declare function getAnimationClass(duration: AnimationDuration, easing?: EasingFunction): string;
|
|
62
|
+
/**
|
|
63
|
+
* Helper function to get transition classes
|
|
64
|
+
*/
|
|
65
|
+
export declare function getTransitionClass(property: string | string[], duration?: AnimationDuration, easing?: EasingFunction): string;
|