@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,23 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type SeparatorOrientation = 'horizontal' | 'vertical';
|
|
3
|
+
export type SeparatorVariant = 'solid' | 'dashed' | 'dotted';
|
|
4
|
+
export interface SeparatorProps extends HTMLAttributes<HTMLHRElement> {
|
|
5
|
+
orientation?: SeparatorOrientation;
|
|
6
|
+
variant?: SeparatorVariant;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Separator Component
|
|
10
|
+
*
|
|
11
|
+
* A visual separator component for dividing content.
|
|
12
|
+
* Follows Atomic Design principles as an Atom component.
|
|
13
|
+
* Optimized with React.memo to prevent unnecessary re-renders.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Separator />
|
|
18
|
+
*
|
|
19
|
+
* <Separator orientation="vertical" variant="dashed" />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare const Separator: import("react").NamedExoticComponent<SeparatorProps>;
|
|
23
|
+
export default Separator;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Separator from './Separator';
|
|
3
|
+
declare const meta: Meta<typeof Separator>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Separator>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Horizontal: Story;
|
|
8
|
+
export declare const Vertical: Story;
|
|
9
|
+
export declare const Variants: Story;
|
|
10
|
+
export declare const InContext: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -17,4 +17,4 @@ export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
17
17
|
* <Skeleton variant="text" lines={3} />
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
export default function Skeleton({ variant, width, height, lines, className, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default function Skeleton({ variant, width, height, lines, className, 'aria-label': ariaLabel, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,12 +5,34 @@ declare const meta: {
|
|
|
5
5
|
component: typeof Skeleton;
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
8
13
|
};
|
|
9
14
|
tags: string[];
|
|
10
15
|
argTypes: {
|
|
11
16
|
variant: {
|
|
12
17
|
control: "select";
|
|
13
18
|
options: string[];
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
width: {
|
|
22
|
+
control: "text";
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
height: {
|
|
26
|
+
control: "text";
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
lines: {
|
|
30
|
+
control: "number";
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
'aria-label': {
|
|
34
|
+
control: "text";
|
|
35
|
+
description: string;
|
|
14
36
|
};
|
|
15
37
|
};
|
|
16
38
|
};
|
|
@@ -22,3 +44,5 @@ export declare const Card: Story;
|
|
|
22
44
|
export declare const List: Story;
|
|
23
45
|
export declare const Circle: Story;
|
|
24
46
|
export declare const CustomSize: Story;
|
|
47
|
+
export declare const WithAriaLabel: Story;
|
|
48
|
+
export declare const LoadingStates: Story;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type SliderVariant = 'single' | 'range';
|
|
3
|
+
export type SliderSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface SliderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
5
|
+
value?: number | [number, number];
|
|
6
|
+
defaultValue?: number | [number, number];
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
step?: number;
|
|
10
|
+
variant?: SliderVariant;
|
|
11
|
+
size?: SliderSize;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
showValue?: boolean;
|
|
14
|
+
marks?: number[];
|
|
15
|
+
onChange?: (value: number | [number, number]) => void;
|
|
16
|
+
onValueChange?: (value: number | [number, number]) => void;
|
|
17
|
+
label?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Slider Component
|
|
21
|
+
*
|
|
22
|
+
* A range input component for selecting numeric values.
|
|
23
|
+
* Supports single and dual thumb (range) modes.
|
|
24
|
+
* Follows Atomic Design principles as an Atom component.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <Slider
|
|
29
|
+
* value={50}
|
|
30
|
+
* min={0}
|
|
31
|
+
* max={100}
|
|
32
|
+
* onChange={(value) => console.log(value)}
|
|
33
|
+
* />
|
|
34
|
+
*
|
|
35
|
+
* <Slider
|
|
36
|
+
* variant="range"
|
|
37
|
+
* value={[20, 80]}
|
|
38
|
+
* min={0}
|
|
39
|
+
* max={100}
|
|
40
|
+
* onChange={(value) => console.log(value)}
|
|
41
|
+
* />
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare const Slider: import("react").ForwardRefExoticComponent<SliderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
45
|
+
export default Slider;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Slider from './Slider';
|
|
3
|
+
declare const meta: Meta<typeof Slider>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Slider>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLabel: Story;
|
|
8
|
+
export declare const Range: Story;
|
|
9
|
+
export declare const Sizes: Story;
|
|
10
|
+
export declare const WithMarks: Story;
|
|
11
|
+
export declare const WithSteps: Story;
|
|
12
|
+
export declare const Disabled: Story;
|
|
13
|
+
export declare const CustomRange: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type SpinnerSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type SpinnerVariant = 'primary' | 'secondary' | 'neutral';
|
|
4
|
+
export interface SpinnerProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
size?: SpinnerSize;
|
|
6
|
+
variant?: SpinnerVariant;
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Spinner Component
|
|
11
|
+
*
|
|
12
|
+
* A loading spinner component for indicating loading states.
|
|
13
|
+
* Follows Atomic Design principles as an Atom component.
|
|
14
|
+
* Uses Strategy Pattern for different size/variant combinations.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <Spinner size="md" variant="primary" label="Loading..." />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare const Spinner: import("react").NamedExoticComponent<SpinnerProps>;
|
|
22
|
+
export default Spinner;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Spinner from './Spinner';
|
|
3
|
+
declare const meta: Meta<typeof Spinner>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Spinner>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Sizes: Story;
|
|
8
|
+
export declare const Variants: Story;
|
|
9
|
+
export declare const WithLabel: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from 'react';
|
|
2
|
+
export type SwitchSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
|
|
4
|
+
size?: SwitchSize;
|
|
5
|
+
label?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
error?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Switch Component
|
|
11
|
+
*
|
|
12
|
+
* A toggle switch component for on/off states.
|
|
13
|
+
* Follows Atomic Design principles as an Atom component.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Switch checked={isEnabled} onChange={(e) => setIsEnabled(e.target.checked)} />
|
|
18
|
+
*
|
|
19
|
+
* <Switch
|
|
20
|
+
* label="Enable notifications"
|
|
21
|
+
* description="Receive email notifications"
|
|
22
|
+
* checked={notifications}
|
|
23
|
+
* onChange={(e) => setNotifications(e.target.checked)}
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
28
|
+
export default Switch;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Switch from './Switch';
|
|
3
|
+
declare const meta: Meta<typeof Switch>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Switch>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLabel: Story;
|
|
8
|
+
export declare const WithDescription: Story;
|
|
9
|
+
export declare const Sizes: Story;
|
|
10
|
+
export declare const States: Story;
|
|
11
|
+
export declare const Accessibility: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,6 +4,7 @@ export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
position?: "top" | "bottom" | "left" | "right";
|
|
6
6
|
delay?: number;
|
|
7
|
+
'aria-label'?: string;
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
9
10
|
* Tooltip Component
|
|
@@ -18,4 +19,4 @@ export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
18
19
|
* </Tooltip>
|
|
19
20
|
* ```
|
|
20
21
|
*/
|
|
21
|
-
export default function Tooltip({ content, children, position, delay, className, ...props }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default function Tooltip({ content, children, position, delay, className, 'aria-label': ariaLabel, ...props }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,12 +5,26 @@ declare const meta: {
|
|
|
5
5
|
component: typeof Tooltip;
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
8
13
|
};
|
|
9
14
|
tags: string[];
|
|
10
15
|
argTypes: {
|
|
11
16
|
position: {
|
|
12
17
|
control: "select";
|
|
13
18
|
options: string[];
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
delay: {
|
|
22
|
+
control: "number";
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
'aria-label': {
|
|
26
|
+
control: "text";
|
|
27
|
+
description: string;
|
|
14
28
|
};
|
|
15
29
|
};
|
|
16
30
|
};
|
|
@@ -21,3 +35,6 @@ export declare const Top: Story;
|
|
|
21
35
|
export declare const Bottom: Story;
|
|
22
36
|
export declare const Left: Story;
|
|
23
37
|
export declare const Right: Story;
|
|
38
|
+
export declare const WithCustomDelay: Story;
|
|
39
|
+
export declare const KeyboardAccessible: Story;
|
|
40
|
+
export declare const WithAriaLabel: Story;
|
package/dist/ui/atoms/index.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
export { default as Info } from "./Info/Info";
|
|
2
|
+
export type { InfoProps } from "./Info/Info";
|
|
2
3
|
export { default as Text } from "./Text/Text";
|
|
3
4
|
export { default as Input } from "./Input/Input";
|
|
4
|
-
export type { InputProps } from "./Input/Input";
|
|
5
|
+
export type { InputProps, InputSize, InputVariant, InputState } from "./Input/Input";
|
|
5
6
|
export { default as Button } from "./Button/Button";
|
|
7
|
+
export type { ButtonProps, ButtonVariant, ButtonSize } from "./Button/Button";
|
|
6
8
|
export { default as BoxWrapper } from "./BoxWrapper/BoxWrapper";
|
|
9
|
+
export type { BoxWrapperProps } from "./BoxWrapper/BoxWrapper";
|
|
7
10
|
export { default as Badge } from "./Badge/Badge";
|
|
8
11
|
export { default as Select } from "./Select/Select";
|
|
12
|
+
export type { SelectProps, SelectOption, SelectOptionGroup, SelectSize } from "./Select/Select";
|
|
9
13
|
export { default as Textarea } from "./Textarea/Textarea";
|
|
10
14
|
export { default as Label } from "./Label/Label";
|
|
11
15
|
export { default as ErrorMessage } from "./ErrorMessage/ErrorMessage";
|
|
@@ -13,12 +17,25 @@ export { default as NavLink } from "./NavLink/NavLink";
|
|
|
13
17
|
export { default as Tooltip } from "./Tooltip/Tooltip";
|
|
14
18
|
export type { TooltipProps } from "./Tooltip/Tooltip";
|
|
15
19
|
export { default as Skeleton } from "./Skeleton/Skeleton";
|
|
20
|
+
export { default as Spinner } from "./Spinner/Spinner";
|
|
21
|
+
export type { SpinnerProps, SpinnerSize, SpinnerVariant } from "./Spinner/Spinner";
|
|
16
22
|
export type { SkeletonProps } from "./Skeleton/Skeleton";
|
|
17
|
-
export { default as SidebarItem } from "./SidebarItem/SidebarItem";
|
|
18
|
-
export type { SidebarItemProps } from "./SidebarItem/SidebarItem";
|
|
19
23
|
export { default as Collapsible } from "./Collapsible/Collapsible";
|
|
20
24
|
export type { CollapsibleProps } from "./Collapsible/Collapsible";
|
|
21
25
|
export { default as Checkbox } from "./Checkbox/Checkbox";
|
|
22
26
|
export type { CheckboxProps } from "./Checkbox/Checkbox";
|
|
23
27
|
export { default as Radio } from "./Radio/Radio";
|
|
24
28
|
export type { RadioProps } from "./Radio/Radio";
|
|
29
|
+
export { default as Progress } from "./Progress/Progress";
|
|
30
|
+
export type { ProgressProps, ProgressVariant, ProgressSize } from "./Progress/Progress";
|
|
31
|
+
export { default as Switch } from "./Switch/Switch";
|
|
32
|
+
export type { SwitchProps, SwitchSize } from "./Switch/Switch";
|
|
33
|
+
export { default as Separator } from "./Separator/Separator";
|
|
34
|
+
export type { SeparatorProps, SeparatorOrientation, SeparatorVariant } from "./Separator/Separator";
|
|
35
|
+
export { default as Accordion } from "./Accordion/Accordion";
|
|
36
|
+
export type { AccordionProps, AccordionItem, AccordionType } from "./Accordion/Accordion";
|
|
37
|
+
export { default as Slider } from "./Slider/Slider";
|
|
38
|
+
export type { SliderProps, SliderVariant, SliderSize } from "./Slider/Slider";
|
|
39
|
+
export { default as Popover } from "./Popover/Popover";
|
|
40
|
+
export type { PopoverProps, PopoverPlacement } from "./Popover/Popover";
|
|
41
|
+
export * from "./Avatar";
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -9,8 +9,13 @@ export * from "./tokens/breakpoints";
|
|
|
9
9
|
export * from "./tokens/tokens.factory";
|
|
10
10
|
export * from "./tokens/themes/light";
|
|
11
11
|
export * from "./tokens/themes/dark";
|
|
12
|
-
export * from "./providers
|
|
12
|
+
export * from "./providers";
|
|
13
|
+
export * from "./themes";
|
|
13
14
|
export { getSpacingClass, getSpacing } from "./tokens/spacing";
|
|
14
15
|
export { getTypographyClasses, getTypography } from "./tokens/typography";
|
|
15
16
|
export { getColorClass, getColor } from "./tokens/colors";
|
|
16
17
|
export { getBreakpoint, getMediaQuery } from "./tokens/breakpoints";
|
|
18
|
+
export { getAnimationClass, getAnimation, getTransitionClass } from "./tokens/animations";
|
|
19
|
+
export { getZIndexClass, getZIndex } from "./tokens/z-index";
|
|
20
|
+
export { getOpacityClass, getOpacity } from "./tokens/opacity";
|
|
21
|
+
export { getGradientClass, getGradient } from "./tokens/gradients";
|
|
@@ -2,6 +2,9 @@ import type { HTMLAttributes } from "react";
|
|
|
2
2
|
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
variant?: "default" | "hover" | "selected";
|
|
4
4
|
padding?: "none" | "small" | "medium" | "large";
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
'aria-label'?: string;
|
|
7
|
+
'aria-labelledby'?: string;
|
|
5
8
|
}
|
|
6
9
|
/**
|
|
7
10
|
* Card Component
|
|
@@ -9,6 +12,7 @@ interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
|
9
12
|
* A versatile card component for displaying content in containers.
|
|
10
13
|
* Follows Atomic Design principles as a Molecule component.
|
|
11
14
|
* Can be used to replace BoxWrapper in many cases with more flexibility.
|
|
15
|
+
* Optimized with React.memo to prevent unnecessary re-renders.
|
|
12
16
|
*
|
|
13
17
|
* @example
|
|
14
18
|
* ```tsx
|
|
@@ -18,5 +22,5 @@ interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
|
18
22
|
* </Card>
|
|
19
23
|
* ```
|
|
20
24
|
*/
|
|
21
|
-
|
|
22
|
-
export
|
|
25
|
+
declare const Card: import("react").NamedExoticComponent<Props>;
|
|
26
|
+
export default Card;
|
|
@@ -8,4 +8,6 @@ export declare const WithPaddingSmall: StoryObj<typeof Card>;
|
|
|
8
8
|
export declare const WithPaddingLarge: StoryObj<typeof Card>;
|
|
9
9
|
export declare const WithActions: StoryObj<typeof Card>;
|
|
10
10
|
export declare const NoPadding: StoryObj<typeof Card>;
|
|
11
|
+
export declare const Interactive: StoryObj<typeof Card>;
|
|
12
|
+
export declare const WithAriaLabel: StoryObj<typeof Card>;
|
|
11
13
|
export default meta;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type ColorFormat = 'hex' | 'rgb' | 'hsl';
|
|
2
|
+
export interface ColorPickerProps {
|
|
3
|
+
value?: string;
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
format?: ColorFormat;
|
|
6
|
+
onChange?: (value: string) => void;
|
|
7
|
+
presets?: string[];
|
|
8
|
+
showInput?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
label?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* ColorPicker Component
|
|
15
|
+
*
|
|
16
|
+
* A color picker component for selecting colors.
|
|
17
|
+
* Supports hex, rgb, and hsl formats with presets.
|
|
18
|
+
* Follows Atomic Design principles as a Molecule component.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <ColorPicker
|
|
23
|
+
* value="#ff0000"
|
|
24
|
+
* onChange={(color) => console.log(color)}
|
|
25
|
+
* />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export default function ColorPicker({ value: controlledValue, defaultValue, format, onChange, presets, showInput, disabled, label, className, }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import ColorPicker from './ColorPicker';
|
|
3
|
+
declare const meta: Meta<typeof ColorPicker>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ColorPicker>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLabel: Story;
|
|
8
|
+
export declare const WithInput: Story;
|
|
9
|
+
export declare const CustomPresets: Story;
|
|
10
|
+
export declare const WithoutInput: Story;
|
|
11
|
+
export declare const Disabled: Story;
|
|
12
|
+
export declare const InForm: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React, { type ReactNode, type RefObject } from 'react';
|
|
2
|
+
import { DatePickerInput } from './DatePickerInput';
|
|
3
|
+
import { DatePickerCalendar } from './DatePickerCalendar';
|
|
4
|
+
export interface DatePickerProps {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
mode?: 'single' | 'range';
|
|
7
|
+
value?: Date | {
|
|
8
|
+
start: Date | null;
|
|
9
|
+
end: Date | null;
|
|
10
|
+
};
|
|
11
|
+
defaultValue?: Date | {
|
|
12
|
+
start: Date | null;
|
|
13
|
+
end: Date | null;
|
|
14
|
+
};
|
|
15
|
+
onValueChange?: (value: Date | {
|
|
16
|
+
start: Date | null;
|
|
17
|
+
end: Date | null;
|
|
18
|
+
} | null) => void;
|
|
19
|
+
minDate?: Date;
|
|
20
|
+
maxDate?: Date;
|
|
21
|
+
disabledDates?: Date[];
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
format?: string;
|
|
24
|
+
showCalendarButton?: boolean;
|
|
25
|
+
'aria-label'?: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* DatePicker Component
|
|
30
|
+
*
|
|
31
|
+
* A flexible date picker component with single date and range selection.
|
|
32
|
+
* Supports keyboard navigation and basic localization.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* // Single date
|
|
37
|
+
* <DatePicker
|
|
38
|
+
* value={selectedDate}
|
|
39
|
+
* onValueChange={setSelectedDate}
|
|
40
|
+
* />
|
|
41
|
+
*
|
|
42
|
+
* // Date range
|
|
43
|
+
* <DatePicker
|
|
44
|
+
* mode="range"
|
|
45
|
+
* value={{ start: rangeStart, end: rangeEnd }}
|
|
46
|
+
* onValueChange={setRange}
|
|
47
|
+
* />
|
|
48
|
+
*
|
|
49
|
+
* // Compound components
|
|
50
|
+
* <DatePicker>
|
|
51
|
+
* <DatePicker.Input />
|
|
52
|
+
* <DatePicker.Calendar />
|
|
53
|
+
* </DatePicker>
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare function DatePickerComponent({ children, mode, value, defaultValue, onValueChange, minDate, maxDate, disabledDates, placeholder, format, showCalendarButton, 'aria-label': ariaLabel, className, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
declare namespace DatePickerComponent {
|
|
58
|
+
var Input: typeof DatePickerInput;
|
|
59
|
+
var Calendar: typeof DatePickerCalendar;
|
|
60
|
+
var Popup: typeof DatePickerPopup;
|
|
61
|
+
}
|
|
62
|
+
declare function DatePickerPopup({ children, containerRef, popupRef: externalPopupRef }: {
|
|
63
|
+
children: ReactNode;
|
|
64
|
+
containerRef?: RefObject<HTMLDivElement>;
|
|
65
|
+
popupRef?: RefObject<HTMLDivElement>;
|
|
66
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
67
|
+
export interface DatePickerComponentType extends React.FC<DatePickerProps> {
|
|
68
|
+
Input: typeof DatePickerInput;
|
|
69
|
+
Calendar: typeof DatePickerCalendar;
|
|
70
|
+
Popup: typeof DatePickerPopup;
|
|
71
|
+
}
|
|
72
|
+
declare const DatePicker: DatePickerComponentType;
|
|
73
|
+
export { DatePickerComponent };
|
|
74
|
+
export default DatePicker;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import DatePicker from './DatePicker';
|
|
3
|
+
declare const meta: Meta<typeof DatePicker>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof DatePicker>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithDefaultValue: Story;
|
|
8
|
+
export declare const DateRange: Story;
|
|
9
|
+
export declare const WithMinMaxDate: Story;
|
|
10
|
+
export declare const WithDisabledDates: Story;
|
|
11
|
+
export declare const CustomFormat: Story;
|
|
12
|
+
export declare const CompoundComponents: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
export interface DatePickerCalendarProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
month?: Date;
|
|
4
|
+
onMonthChange?: (month: Date) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function DatePickerCalendar({ month: controlledMonth, onMonthChange, className, ...props }: DatePickerCalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface DatePickerContextValue {
|
|
2
|
+
selectedDate: Date | null;
|
|
3
|
+
selectedRange: {
|
|
4
|
+
start: Date | null;
|
|
5
|
+
end: Date | null;
|
|
6
|
+
} | null;
|
|
7
|
+
mode: 'single' | 'range';
|
|
8
|
+
onDateChange: (date: Date | null) => void;
|
|
9
|
+
onRangeChange: (range: {
|
|
10
|
+
start: Date | null;
|
|
11
|
+
end: Date | null;
|
|
12
|
+
}) => void;
|
|
13
|
+
minDate?: Date;
|
|
14
|
+
maxDate?: Date;
|
|
15
|
+
disabledDates?: Date[];
|
|
16
|
+
locale?: Locale;
|
|
17
|
+
}
|
|
18
|
+
export declare const DatePickerContext: import("react").Context<DatePickerContextValue | undefined>;
|
|
19
|
+
export declare function useDatePickerContext(): DatePickerContextValue;
|
|
20
|
+
export declare function useDatePickerContextOptional(): DatePickerContextValue | undefined;
|
|
21
|
+
export interface Locale {
|
|
22
|
+
code?: string;
|
|
23
|
+
localize?: any;
|
|
24
|
+
formatLong?: any;
|
|
25
|
+
format?: any;
|
|
26
|
+
match?: any;
|
|
27
|
+
options?: any;
|
|
28
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
export interface DatePickerInputProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'onFocus'> {
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
format?: string;
|
|
5
|
+
showCalendarButton?: boolean;
|
|
6
|
+
'aria-label'?: string;
|
|
7
|
+
onFocus?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function DatePickerInput({ placeholder, format, showCalendarButton, 'aria-label': ariaLabel, onFocus, className, ...props }: DatePickerInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type Locale } from './DatePickerContext';
|
|
3
|
+
export interface DatePickerProviderProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
mode?: 'single' | 'range';
|
|
6
|
+
value?: Date | {
|
|
7
|
+
start: Date | null;
|
|
8
|
+
end: Date | null;
|
|
9
|
+
};
|
|
10
|
+
defaultValue?: Date | {
|
|
11
|
+
start: Date | null;
|
|
12
|
+
end: Date | null;
|
|
13
|
+
};
|
|
14
|
+
onValueChange?: (value: Date | {
|
|
15
|
+
start: Date | null;
|
|
16
|
+
end: Date | null;
|
|
17
|
+
} | null) => void;
|
|
18
|
+
minDate?: Date;
|
|
19
|
+
maxDate?: Date;
|
|
20
|
+
disabledDates?: Date[];
|
|
21
|
+
locale?: Locale;
|
|
22
|
+
}
|
|
23
|
+
export declare function DatePickerProvider({ children, mode, value: controlledValue, defaultValue, onValueChange, minDate, maxDate, disabledDates, locale, }: DatePickerProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DatePicker Components
|
|
3
|
+
*
|
|
4
|
+
* Date picker with single date and range selection support.
|
|
5
|
+
*/
|
|
6
|
+
export { default as DatePicker } from './DatePicker';
|
|
7
|
+
export { DatePickerProvider } from './DatePickerProvider';
|
|
8
|
+
export { DatePickerInput } from './DatePickerInput';
|
|
9
|
+
export { DatePickerCalendar } from './DatePickerCalendar';
|
|
10
|
+
export type { DatePickerProps } from './DatePicker';
|
|
11
|
+
export type { DatePickerProviderProps } from './DatePickerProvider';
|
|
12
|
+
export type { DatePickerInputProps } from './DatePickerInput';
|
|
13
|
+
export type { DatePickerCalendarProps } from './DatePickerCalendar';
|
|
14
|
+
export type { DatePickerContextValue, Locale } from './DatePickerContext';
|
|
@@ -10,6 +10,7 @@ export interface DropdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
items: DropdownItem[];
|
|
11
11
|
align?: "left" | "right";
|
|
12
12
|
variant?: "default" | "minimal";
|
|
13
|
+
'aria-label'?: string;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* Dropdown Component
|
|
@@ -28,4 +29,4 @@ export interface DropdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
28
29
|
* />
|
|
29
30
|
* ```
|
|
30
31
|
*/
|
|
31
|
-
export default function Dropdown({ trigger, items, align, variant, className, ...props }: DropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export default function Dropdown({ trigger, items, align, variant, className, 'aria-label': ariaLabel, ...props }: DropdownProps): import("react/jsx-runtime").JSX.Element;
|