@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,13 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface TabsTriggerProps extends HTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
value: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* TabsTrigger Component
|
|
9
|
+
*
|
|
10
|
+
* Individual tab trigger button.
|
|
11
|
+
* Must be used within a TabsList component.
|
|
12
|
+
*/
|
|
13
|
+
export declare function TabsTrigger({ value, children, disabled, className, onClick, onKeyDown, ...props }: TabsTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tabs Components
|
|
3
|
+
*
|
|
4
|
+
* Tabs component with compound components pattern and full accessibility support.
|
|
5
|
+
*/
|
|
6
|
+
export { default as Tabs } from './Tabs';
|
|
7
|
+
export type { TabsProps } from './Tabs';
|
|
8
|
+
export { TabsList } from './TabsList';
|
|
9
|
+
export type { TabsListProps } from './TabsList';
|
|
10
|
+
export { TabsTrigger } from './TabsTrigger';
|
|
11
|
+
export type { TabsTriggerProps } from './TabsTrigger';
|
|
12
|
+
export { TabsContent } from './TabsContent';
|
|
13
|
+
export type { TabsContentProps } from './TabsContent';
|
|
14
|
+
export { TabsProvider } from './TabsProvider';
|
|
15
|
+
export type { TabsProviderProps } from './TabsProvider';
|
|
16
|
+
export { TabsContext, useTabsContext, useTabsContextOptional } from './TabsContext';
|
|
17
|
+
export type { TabsContextValue } from './TabsContext';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type TimeFormat = '12h' | '24h';
|
|
2
|
+
export interface TimePickerProps {
|
|
3
|
+
value?: string;
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
format?: TimeFormat;
|
|
6
|
+
onChange?: (value: string) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
label?: string;
|
|
9
|
+
error?: boolean;
|
|
10
|
+
helperText?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* TimePicker Component
|
|
15
|
+
*
|
|
16
|
+
* A time picker component for selecting time values.
|
|
17
|
+
* Supports 12h and 24h formats.
|
|
18
|
+
* Follows Atomic Design principles as a Molecule component.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <TimePicker
|
|
23
|
+
* value="14:30"
|
|
24
|
+
* format="24h"
|
|
25
|
+
* onChange={(value) => console.log(value)}
|
|
26
|
+
* />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export default function TimePicker({ value: controlledValue, defaultValue, format, onChange, disabled, label, error, helperText, className, }: TimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import TimePicker from './TimePicker';
|
|
3
|
+
declare const meta: Meta<typeof TimePicker>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof TimePicker>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Format24h: Story;
|
|
8
|
+
export declare const Format12h: Story;
|
|
9
|
+
export declare const WithLabel: Story;
|
|
10
|
+
export declare const WithError: Story;
|
|
11
|
+
export declare const Disabled: Story;
|
|
12
|
+
export declare const InForm: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as InputWithLabel } from "./InputWithLabel/InputWithLabel";
|
|
2
2
|
export { default as Card } from "./Card/Card";
|
|
3
|
-
export
|
|
3
|
+
export * from "./Form";
|
|
4
4
|
export { default as Breadcrumb } from "./Breadcrumb/Breadcrumb";
|
|
5
5
|
export type { BreadcrumbItem } from "./Breadcrumb/Breadcrumb";
|
|
6
6
|
export { default as Pagination } from "./Pagination/Pagination";
|
|
@@ -8,9 +8,17 @@ export { default as EmptyState } from "./EmptyState/EmptyState";
|
|
|
8
8
|
export type { EmptyStateProps } from "./EmptyState/EmptyState";
|
|
9
9
|
export { default as Dropdown } from "./Dropdown/Dropdown";
|
|
10
10
|
export type { DropdownProps, DropdownItem } from "./Dropdown/Dropdown";
|
|
11
|
-
export { default as SidebarGroup } from "./SidebarGroup/SidebarGroup";
|
|
12
|
-
export type { SidebarGroupProps } from "./SidebarGroup/SidebarGroup";
|
|
13
|
-
export { default as SidebarHeader } from "./SidebarHeader/SidebarHeader";
|
|
14
|
-
export type { SidebarHeaderProps } from "./SidebarHeader/SidebarHeader";
|
|
15
11
|
export { default as NavbarGroup } from "./NavbarGroup/NavbarGroup";
|
|
16
12
|
export type { NavbarGroupProps } from "./NavbarGroup/NavbarGroup";
|
|
13
|
+
export * from "./DatePicker";
|
|
14
|
+
export * from "./Tabs";
|
|
15
|
+
export { default as SearchInput } from "./SearchInput/SearchInput";
|
|
16
|
+
export type { SearchInputProps } from "./SearchInput/SearchInput";
|
|
17
|
+
export { default as Rating } from "./Rating/Rating";
|
|
18
|
+
export type { RatingProps, RatingSize, RatingVariant } from "./Rating/Rating";
|
|
19
|
+
export { default as FileUpload } from "./FileUpload/FileUpload";
|
|
20
|
+
export type { FileUploadProps, FileUploadFile } from "./FileUpload/FileUpload";
|
|
21
|
+
export { default as TimePicker } from "./TimePicker/TimePicker";
|
|
22
|
+
export type { TimePickerProps, TimeFormat } from "./TimePicker/TimePicker";
|
|
23
|
+
export { default as ColorPicker } from "./ColorPicker/ColorPicker";
|
|
24
|
+
export type { ColorPickerProps, ColorFormat } from "./ColorPicker/ColorPicker";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface CommandItem {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
keywords?: string[];
|
|
7
|
+
group?: string;
|
|
8
|
+
action: () => void;
|
|
9
|
+
}
|
|
10
|
+
export interface CommandPaletteProps {
|
|
11
|
+
items: CommandItem[];
|
|
12
|
+
open?: boolean;
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
trigger?: React.ReactNode;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
emptyMessage?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* CommandPalette Component
|
|
22
|
+
*
|
|
23
|
+
* A command palette component for quick command search and execution.
|
|
24
|
+
* Supports keyboard navigation, grouping, and filtering.
|
|
25
|
+
* Follows Atomic Design principles as an Organism component.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <CommandPalette
|
|
30
|
+
* items={[
|
|
31
|
+
* { id: '1', label: 'New File', action: () => console.log('New File') },
|
|
32
|
+
* { id: '2', label: 'Save', action: () => console.log('Save') },
|
|
33
|
+
* ]}
|
|
34
|
+
* />
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export default function CommandPalette({ items, open: controlledOpen, defaultOpen, onOpenChange, trigger, placeholder, emptyMessage, className, }: CommandPaletteProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import CommandPalette from './CommandPalette';
|
|
3
|
+
declare const meta: Meta<typeof CommandPalette>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof CommandPalette>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithIcons: Story;
|
|
8
|
+
export declare const WithGroups: Story;
|
|
9
|
+
export declare const WithDescriptions: Story;
|
|
10
|
+
export declare const WithKeywords: Story;
|
|
11
|
+
export declare const ManyCommands: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type TableColumn } from '../Table/Table';
|
|
3
|
+
import type { TableAction } from '../Table/TableActions/TableActions';
|
|
4
|
+
export type DataGridColumn<T = any> = TableColumn<T> & {
|
|
5
|
+
groupable?: boolean;
|
|
6
|
+
exportable?: boolean;
|
|
7
|
+
defaultWidth?: number;
|
|
8
|
+
minWidth?: number;
|
|
9
|
+
maxWidth?: number;
|
|
10
|
+
};
|
|
11
|
+
export interface DataGridGroup {
|
|
12
|
+
column: string;
|
|
13
|
+
expanded?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface DataGridProps<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
16
|
+
columns: DataGridColumn<T>[];
|
|
17
|
+
data: T[];
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
onSort?: (columnKey: string, direction: 'asc' | 'desc') => void;
|
|
20
|
+
sortColumn?: string;
|
|
21
|
+
sortDirection?: 'asc' | 'desc';
|
|
22
|
+
multiSort?: boolean;
|
|
23
|
+
groups?: DataGridGroup[];
|
|
24
|
+
onGroupChange?: (groups: DataGridGroup[]) => void;
|
|
25
|
+
groupable?: boolean;
|
|
26
|
+
resizable?: boolean;
|
|
27
|
+
reorderable?: boolean;
|
|
28
|
+
onColumnReorder?: (columns: DataGridColumn<T>[]) => void;
|
|
29
|
+
columnWidths?: Record<string, number>;
|
|
30
|
+
onColumnResize?: (columnKey: string, width: number) => void;
|
|
31
|
+
selectable?: boolean;
|
|
32
|
+
selectedRows?: string[];
|
|
33
|
+
onSelectionChange?: (selected: string[]) => void;
|
|
34
|
+
rowId?: (row: T) => string;
|
|
35
|
+
exportable?: boolean;
|
|
36
|
+
onExport?: (format: 'csv' | 'xlsx' | 'json') => void;
|
|
37
|
+
exportFormats?: ('csv' | 'xlsx' | 'json')[];
|
|
38
|
+
pagination?: {
|
|
39
|
+
page: number;
|
|
40
|
+
pageSize: number;
|
|
41
|
+
total: number;
|
|
42
|
+
onPageChange: (page: number) => void;
|
|
43
|
+
onPageSizeChange: (size: number) => void;
|
|
44
|
+
pageSizeOptions?: number[];
|
|
45
|
+
};
|
|
46
|
+
filters?: {
|
|
47
|
+
config: any[];
|
|
48
|
+
onFilter: (filters: Record<string, any>) => void;
|
|
49
|
+
initialValues?: Record<string, any>;
|
|
50
|
+
};
|
|
51
|
+
actions?: (row: T) => TableAction<T>[];
|
|
52
|
+
toolbarActions?: ReactNode;
|
|
53
|
+
virtualScrolling?: boolean;
|
|
54
|
+
virtualScrollingOptions?: {
|
|
55
|
+
itemHeight?: number;
|
|
56
|
+
containerHeight?: number;
|
|
57
|
+
overscan?: number;
|
|
58
|
+
};
|
|
59
|
+
emptyMessage?: string;
|
|
60
|
+
emptyStateTitle?: string;
|
|
61
|
+
emptyStateMessage?: string;
|
|
62
|
+
emptyStateIllustration?: ReactNode;
|
|
63
|
+
emptyStateAction?: ReactNode;
|
|
64
|
+
className?: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* DataGrid Component
|
|
68
|
+
*
|
|
69
|
+
* An advanced data grid component with sorting, filtering, grouping, column management, and export.
|
|
70
|
+
* Extends the Table component with additional enterprise features.
|
|
71
|
+
* Follows Atomic Design principles as an Organism component.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```tsx
|
|
75
|
+
* <DataGrid
|
|
76
|
+
* columns={columns}
|
|
77
|
+
* data={data}
|
|
78
|
+
* groupable
|
|
79
|
+
* exportable
|
|
80
|
+
* onExport={(format) => console.log('Export as', format)}
|
|
81
|
+
* />
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
export default function DataGrid<T extends Record<string, unknown> = Record<string, unknown>>({ columns, data, loading, onSort, sortColumn, sortDirection, multiSort, groups, onGroupChange, groupable, resizable, reorderable, onColumnReorder, columnWidths, onColumnResize, selectable, selectedRows, onSelectionChange, rowId, exportable, onExport, exportFormats, pagination, filters, actions, toolbarActions, virtualScrolling, virtualScrollingOptions, emptyMessage, emptyStateTitle, emptyStateMessage, emptyStateIllustration, emptyStateAction, className, }: DataGridProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import DataGrid from './DataGrid';
|
|
3
|
+
declare const meta: Meta<typeof DataGrid>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof DataGrid>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithExport: Story;
|
|
8
|
+
export declare const WithPagination: Story;
|
|
9
|
+
export declare const WithSelection: Story;
|
|
10
|
+
export declare const WithFilters: Story;
|
|
11
|
+
export declare const WithToolbar: Story;
|
|
12
|
+
export declare const WithGrouping: Story;
|
|
13
|
+
export declare const Loading: Story;
|
|
14
|
+
export declare const Empty: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface AlertDialogProps {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
onOpenChange?: (open: boolean) => void;
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
confirmLabel?: string;
|
|
9
|
+
cancelLabel?: string;
|
|
10
|
+
variant?: 'default' | 'destructive';
|
|
11
|
+
onConfirm?: () => void;
|
|
12
|
+
onCancel?: () => void;
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* AlertDialog Component
|
|
17
|
+
*
|
|
18
|
+
* A specialized dialog for confirmations and alerts.
|
|
19
|
+
* Built on top of Dialog with pre-configured layout.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <AlertDialog
|
|
24
|
+
* open={isOpen}
|
|
25
|
+
* onOpenChange={setIsOpen}
|
|
26
|
+
* title="Delete Item"
|
|
27
|
+
* description="Are you sure? This action cannot be undone."
|
|
28
|
+
* variant="destructive"
|
|
29
|
+
* onConfirm={handleDelete}
|
|
30
|
+
* />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function AlertDialog({ open, defaultOpen, onOpenChange, title, description, confirmLabel, cancelLabel, variant, onConfirm, onCancel, children, }: AlertDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export default AlertDialog;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { DialogTrigger } from './DialogTrigger';
|
|
3
|
+
import { DialogContent } from './DialogContent';
|
|
4
|
+
import { DialogHeader } from './DialogHeader';
|
|
5
|
+
import { DialogTitle } from './DialogTitle';
|
|
6
|
+
import { DialogDescription } from './DialogDescription';
|
|
7
|
+
import { DialogFooter } from './DialogFooter';
|
|
8
|
+
import { DialogClose } from './DialogClose';
|
|
9
|
+
export interface DialogProps {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
open?: boolean;
|
|
12
|
+
defaultOpen?: boolean;
|
|
13
|
+
onOpenChange?: (open: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Dialog Component
|
|
17
|
+
*
|
|
18
|
+
* A flexible dialog component using compound components pattern.
|
|
19
|
+
* Supports both controlled and uncontrolled modes.
|
|
20
|
+
* Includes portal rendering, focus trap, and full accessibility.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* // Uncontrolled
|
|
25
|
+
* <Dialog>
|
|
26
|
+
* <Dialog.Trigger>Open Dialog</Dialog.Trigger>
|
|
27
|
+
* <Dialog.Content>
|
|
28
|
+
* <Dialog.Header>
|
|
29
|
+
* <Dialog.Title>Dialog Title</Dialog.Title>
|
|
30
|
+
* <Dialog.Description>Dialog description</Dialog.Description>
|
|
31
|
+
* </Dialog.Header>
|
|
32
|
+
* <Dialog.Footer>
|
|
33
|
+
* <Button onClick={handleClose}>Close</Button>
|
|
34
|
+
* </Dialog.Footer>
|
|
35
|
+
* </Dialog.Content>
|
|
36
|
+
* </Dialog>
|
|
37
|
+
*
|
|
38
|
+
* // Controlled
|
|
39
|
+
* <Dialog open={isOpen} onOpenChange={setIsOpen}>
|
|
40
|
+
* <Dialog.Content>
|
|
41
|
+
* <Dialog.Header>
|
|
42
|
+
* <Dialog.Title>Dialog Title</Dialog.Title>
|
|
43
|
+
* </Dialog.Header>
|
|
44
|
+
* </Dialog.Content>
|
|
45
|
+
* </Dialog>
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
declare function Dialog({ children, open, defaultOpen, onOpenChange }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
declare namespace Dialog {
|
|
50
|
+
var Trigger: typeof DialogTrigger;
|
|
51
|
+
var Content: typeof DialogContent;
|
|
52
|
+
var Header: typeof DialogHeader;
|
|
53
|
+
var Title: typeof DialogTitle;
|
|
54
|
+
var Description: typeof DialogDescription;
|
|
55
|
+
var Footer: typeof DialogFooter;
|
|
56
|
+
var Close: typeof DialogClose;
|
|
57
|
+
}
|
|
58
|
+
export default Dialog;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Dialog from './Dialog';
|
|
3
|
+
import AlertDialog from './AlertDialog';
|
|
4
|
+
declare const meta: Meta<typeof Dialog>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof Dialog>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Uncontrolled: Story;
|
|
9
|
+
export declare const WithForm: Story;
|
|
10
|
+
export declare const Sizes: Story;
|
|
11
|
+
export declare const WithoutOverlayClose: Story;
|
|
12
|
+
export declare const AlertDialogDefault: StoryObj<typeof AlertDialog>;
|
|
13
|
+
export declare const AlertDialogDestructive: StoryObj<typeof AlertDialog>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
export interface DialogCloseProps {
|
|
3
|
+
'aria-label'?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
children?: ReactElement;
|
|
7
|
+
}
|
|
8
|
+
export declare function DialogClose({ 'aria-label': ariaLabel, className, asChild, children, }: DialogCloseProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
export interface DialogContentProps extends Omit<HTMLAttributes<HTMLDivElement>, 'role'> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen';
|
|
5
|
+
closeOnOverlayClick?: boolean;
|
|
6
|
+
closeOnEscape?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function DialogContent({ children, size, closeOnOverlayClick, closeOnEscape, className, ...props }: DialogContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface DialogContextValue {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
onOpenChange: (open: boolean) => void;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
titleId?: string;
|
|
6
|
+
descriptionId?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const DialogContext: import("react").Context<DialogContextValue | undefined>;
|
|
9
|
+
export declare function useDialogContext(): DialogContextValue;
|
|
10
|
+
export declare function useDialogContextOptional(): DialogContextValue | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
export interface DialogDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
3
|
+
}
|
|
4
|
+
export declare function DialogDescription({ children, className, id, ...props }: DialogDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
export interface DialogFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare function DialogFooter({ children, className, ...props }: DialogFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
export interface DialogHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare function DialogHeader({ children, className, ...props }: DialogHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface DialogProviderProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
open?: boolean;
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
|
+
titleId?: string;
|
|
8
|
+
descriptionId?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function DialogProvider({ children, open: controlledOpen, defaultOpen, onOpenChange, titleId, descriptionId, }: DialogProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
export interface DialogTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
3
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4
|
+
}
|
|
5
|
+
export declare function DialogTitle({ as: Component, children, className, id, ...props }: DialogTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dialog Components
|
|
3
|
+
*
|
|
4
|
+
* Compound component pattern for flexible dialogs.
|
|
5
|
+
*/
|
|
6
|
+
export { default as Dialog } from './Dialog';
|
|
7
|
+
export { DialogTrigger } from './DialogTrigger';
|
|
8
|
+
export { DialogContent } from './DialogContent';
|
|
9
|
+
export { DialogHeader } from './DialogHeader';
|
|
10
|
+
export { DialogTitle } from './DialogTitle';
|
|
11
|
+
export { DialogDescription } from './DialogDescription';
|
|
12
|
+
export { DialogFooter } from './DialogFooter';
|
|
13
|
+
export { DialogClose } from './DialogClose';
|
|
14
|
+
export { default as AlertDialog } from './AlertDialog';
|
|
15
|
+
export type { DialogProps } from './Dialog';
|
|
16
|
+
export type { DialogTriggerProps } from './DialogTrigger';
|
|
17
|
+
export type { DialogContentProps } from './DialogContent';
|
|
18
|
+
export type { DialogHeaderProps } from './DialogHeader';
|
|
19
|
+
export type { DialogTitleProps } from './DialogTitle';
|
|
20
|
+
export type { DialogDescriptionProps } from './DialogDescription';
|
|
21
|
+
export type { DialogFooterProps } from './DialogFooter';
|
|
22
|
+
export type { AlertDialogProps } from './AlertDialog';
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
-
import SidebarHeader from "
|
|
3
|
-
import SidebarGroup from "
|
|
4
|
-
import SidebarItem from "
|
|
2
|
+
import SidebarHeader from "./SidebarHeader/SidebarHeader";
|
|
3
|
+
import SidebarGroup from "./SidebarGroup/SidebarGroup";
|
|
4
|
+
import SidebarItem from "./SidebarItem/SidebarItem";
|
|
5
5
|
export interface SidebarProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
6
|
variant?: "default" | "collapsed";
|
|
7
7
|
title?: string;
|
|
8
8
|
showHeader?: boolean;
|
|
9
9
|
onClose?: () => void;
|
|
10
10
|
children: ReactNode;
|
|
11
|
+
'aria-label'?: string;
|
|
12
|
+
'aria-labelledby'?: string;
|
|
13
|
+
role?: 'navigation' | 'complementary';
|
|
11
14
|
}
|
|
12
15
|
/**
|
|
13
16
|
* Sidebar Component
|
|
@@ -26,7 +29,7 @@ export interface SidebarProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
26
29
|
* </Sidebar>
|
|
27
30
|
* ```
|
|
28
31
|
*/
|
|
29
|
-
declare function SidebarComponent({ variant, title, showHeader, onClose, children, className, ...props }: SidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare function SidebarComponent({ variant, title, showHeader, onClose, children, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, role, ...props }: SidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
30
33
|
declare namespace SidebarComponent {
|
|
31
34
|
var Group: typeof SidebarGroup;
|
|
32
35
|
var Item: typeof SidebarItem;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface SidebarGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleIcon?: ReactNode;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
collapsible?: boolean;
|
|
7
|
+
defaultCollapsed?: boolean;
|
|
8
|
+
collapsed?: boolean;
|
|
9
|
+
onCollapseChange?: (collapsed: boolean) => void;
|
|
10
|
+
storageKey?: string;
|
|
11
|
+
showChevron?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* SidebarGroup Component
|
|
15
|
+
*
|
|
16
|
+
* A group container for sidebar items with optional title.
|
|
17
|
+
* Follows Atomic Design principles as a Molecule component.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <SidebarGroup title="Agile">
|
|
22
|
+
* <SidebarItem href="/epics">Epics</SidebarItem>
|
|
23
|
+
* <SidebarItem href="/stories">Stories</SidebarItem>
|
|
24
|
+
* </SidebarGroup>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export default function SidebarGroup({ title, titleIcon, children, collapsible, defaultCollapsed, collapsed, onCollapseChange, storageKey, showChevron, className, ...props }: SidebarGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import SidebarGroup from "./SidebarGroup";
|
|
3
|
+
declare const meta: Meta<typeof SidebarGroup>;
|
|
4
|
+
export declare const Default: StoryObj<typeof SidebarGroup>;
|
|
5
|
+
export declare const WithoutTitle: StoryObj<typeof SidebarGroup>;
|
|
6
|
+
export declare const Collapsible: StoryObj<typeof SidebarGroup>;
|
|
7
|
+
export declare const CollapsibleDefaultCollapsed: StoryObj<typeof SidebarGroup>;
|
|
8
|
+
export declare const ControlledCollapsible: StoryObj<typeof SidebarGroup>;
|
|
9
|
+
export declare const WithNestedItems: StoryObj<typeof SidebarGroup>;
|
|
10
|
+
export declare const MultipleGroups: StoryObj<typeof SidebarGroup>;
|
|
11
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface SidebarHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
title: string;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
showCloseButton?: boolean;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* SidebarHeader Component
|
|
10
|
+
*
|
|
11
|
+
* Header section of a sidebar with title and optional close button.
|
|
12
|
+
* Follows Atomic Design principles as a Molecule component.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <SidebarHeader title="Navigation" onClose={handleClose} />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export default function SidebarHeader({ title, onClose, showCloseButton, children, className, ...props }: SidebarHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface SidebarItemProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
|
|
3
|
+
href: string;
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
nested?: boolean | number;
|
|
7
|
+
iconSize?: 'sm' | 'md' | 'lg';
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* SidebarItem Component
|
|
12
|
+
*
|
|
13
|
+
* An individual navigation item within a sidebar.
|
|
14
|
+
* Follows Atomic Design principles as an Atom component.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <SidebarItem href="/epics" isActive={true} icon={<EpicIcon />}>
|
|
19
|
+
* Epics
|
|
20
|
+
* </SidebarItem>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export default function SidebarItem({ href, isActive, icon, nested, iconSize, children, className, ...props }: SidebarItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import SidebarItem from "./SidebarItem";
|
|
3
|
+
declare const meta: Meta<typeof SidebarItem>;
|
|
4
|
+
export declare const Default: StoryObj<typeof SidebarItem>;
|
|
5
|
+
export declare const Active: StoryObj<typeof SidebarItem>;
|
|
6
|
+
export declare const WithIcon: StoryObj<typeof SidebarItem>;
|
|
7
|
+
export declare const Nested: StoryObj<typeof SidebarItem>;
|
|
8
|
+
export declare const NestedLevel2: StoryObj<typeof SidebarItem>;
|
|
9
|
+
export declare const DifferentIconSizes: StoryObj<typeof SidebarItem>;
|
|
10
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Sidebar } from './Sidebar';
|
|
2
|
+
export type { SidebarProps } from './Sidebar';
|
|
3
|
+
export { default as SidebarItem } from './SidebarItem/SidebarItem';
|
|
4
|
+
export type { SidebarItemProps } from './SidebarItem/SidebarItem';
|
|
5
|
+
export { default as SidebarGroup } from './SidebarGroup/SidebarGroup';
|
|
6
|
+
export type { SidebarGroupProps } from './SidebarGroup/SidebarGroup';
|
|
7
|
+
export { default as SidebarHeader } from './SidebarHeader/SidebarHeader';
|
|
8
|
+
export type { SidebarHeaderProps } from './SidebarHeader/SidebarHeader';
|