@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
|
@@ -5,16 +5,27 @@ declare const meta: {
|
|
|
5
5
|
component: typeof Dropdown;
|
|
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
|
align: {
|
|
12
17
|
control: "select";
|
|
13
18
|
options: string[];
|
|
19
|
+
description: string;
|
|
14
20
|
};
|
|
15
21
|
variant: {
|
|
16
22
|
control: "select";
|
|
17
23
|
options: string[];
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
'aria-label': {
|
|
27
|
+
control: "text";
|
|
28
|
+
description: string;
|
|
18
29
|
};
|
|
19
30
|
};
|
|
20
31
|
};
|
|
@@ -23,3 +34,5 @@ type Story = StoryObj<typeof meta>;
|
|
|
23
34
|
export declare const Default: Story;
|
|
24
35
|
export declare const WithDisabledItem: Story;
|
|
25
36
|
export declare const AlignedLeft: Story;
|
|
37
|
+
export declare const WithAriaLabel: Story;
|
|
38
|
+
export declare const KeyboardNavigation: Story;
|
|
@@ -5,12 +5,34 @@ declare const meta: {
|
|
|
5
5
|
component: typeof EmptyState;
|
|
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
|
+
title: {
|
|
22
|
+
control: "text";
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
message: {
|
|
26
|
+
control: "text";
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
actionLabel: {
|
|
30
|
+
control: "text";
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
onAction: {
|
|
34
|
+
action: string;
|
|
35
|
+
description: string;
|
|
14
36
|
};
|
|
15
37
|
};
|
|
16
38
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface FileUploadFile {
|
|
2
|
+
file: File;
|
|
3
|
+
id: string;
|
|
4
|
+
preview?: string;
|
|
5
|
+
progress?: number;
|
|
6
|
+
error?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface FileUploadProps {
|
|
9
|
+
accept?: string;
|
|
10
|
+
multiple?: boolean;
|
|
11
|
+
maxSize?: number;
|
|
12
|
+
maxFiles?: number;
|
|
13
|
+
onFilesChange?: (files: FileUploadFile[]) => void;
|
|
14
|
+
onFileRemove?: (fileId: string) => void;
|
|
15
|
+
showPreview?: boolean;
|
|
16
|
+
showProgress?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
label?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* FileUpload Component
|
|
24
|
+
*
|
|
25
|
+
* A file upload component with drag and drop, preview, validation, and progress.
|
|
26
|
+
* Follows Atomic Design principles as a Molecule component.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <FileUpload
|
|
31
|
+
* accept="image/*"
|
|
32
|
+
* maxSize={5 * 1024 * 1024} // 5MB
|
|
33
|
+
* onFilesChange={(files) => console.log(files)}
|
|
34
|
+
* />
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export default function FileUpload({ accept, multiple, maxSize, maxFiles, onFilesChange, onFileRemove, showPreview, showProgress, disabled, className, label, description, }: FileUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import FileUpload from './FileUpload';
|
|
3
|
+
declare const meta: Meta<typeof FileUpload>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof FileUpload>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLabel: Story;
|
|
8
|
+
export declare const ImageUpload: Story;
|
|
9
|
+
export declare const MultipleFiles: Story;
|
|
10
|
+
export declare const WithProgress: Story;
|
|
11
|
+
export declare const WithValidation: Story;
|
|
12
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,24 +1,49 @@
|
|
|
1
1
|
import type { FormHTMLAttributes, ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
import type { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
3
|
+
interface SimpleFormProps extends FormHTMLAttributes<HTMLFormElement> {
|
|
3
4
|
children: ReactNode;
|
|
4
5
|
onSubmit?: (e: React.FormEvent<HTMLFormElement>) => void;
|
|
5
6
|
loading?: boolean;
|
|
6
7
|
error?: string | null;
|
|
7
8
|
success?: string | null;
|
|
9
|
+
form?: never;
|
|
8
10
|
}
|
|
11
|
+
interface ReactHookFormProps<TFieldValues extends FieldValues = FieldValues> extends Omit<FormHTMLAttributes<HTMLFormElement>, 'onSubmit'> {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
form: UseFormReturn<TFieldValues>;
|
|
14
|
+
onSubmit: (data: TFieldValues) => void | Promise<void>;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
error?: string | null;
|
|
17
|
+
success?: string | null;
|
|
18
|
+
onSubmitError?: (errors: any) => void;
|
|
19
|
+
}
|
|
20
|
+
type FormProps<TFieldValues extends FieldValues = FieldValues> = SimpleFormProps | ReactHookFormProps<TFieldValues>;
|
|
9
21
|
/**
|
|
10
22
|
* Form Component
|
|
11
23
|
*
|
|
12
|
-
* A
|
|
13
|
-
* Follows Atomic Design principles as a Molecule component.
|
|
24
|
+
* A flexible form component that supports both simple forms and react-hook-form integration.
|
|
14
25
|
*
|
|
15
26
|
* @example
|
|
16
27
|
* ```tsx
|
|
28
|
+
* // Simple form (backward compatible)
|
|
17
29
|
* <Form onSubmit={handleSubmit} loading={isSubmitting}>
|
|
18
30
|
* <Input name="email" />
|
|
19
31
|
* <Button type="submit">Submit</Button>
|
|
20
32
|
* </Form>
|
|
33
|
+
*
|
|
34
|
+
* // With react-hook-form
|
|
35
|
+
* const form = useForm({ resolver: zodResolver(schema) });
|
|
36
|
+
* <Form form={form} onSubmit={handleSubmit}>
|
|
37
|
+
* <FormField name="email">
|
|
38
|
+
* {({ register, error }) => (
|
|
39
|
+
* <>
|
|
40
|
+
* <Input {...register('email')} />
|
|
41
|
+
* {error && <ErrorMessage>{error}</ErrorMessage>}
|
|
42
|
+
* </>
|
|
43
|
+
* )}
|
|
44
|
+
* </FormField>
|
|
45
|
+
* </Form>
|
|
21
46
|
* ```
|
|
22
47
|
*/
|
|
23
|
-
export default function Form({ children, onSubmit, loading, error, success, className, ...props }:
|
|
48
|
+
export default function Form<TFieldValues extends FieldValues = FieldValues>({ children, onSubmit, loading, error, success, className, ...props }: FormProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
24
49
|
export {};
|
|
@@ -6,4 +6,6 @@ export declare const WithError: StoryObj<typeof Form>;
|
|
|
6
6
|
export declare const WithSuccess: StoryObj<typeof Form>;
|
|
7
7
|
export declare const Loading: StoryObj<typeof Form>;
|
|
8
8
|
export declare const CompleteForm: StoryObj<typeof Form>;
|
|
9
|
+
export declare const RegistrationForm: StoryObj<typeof Form>;
|
|
10
|
+
export declare const ContactForm: StoryObj<typeof Form>;
|
|
9
11
|
export default meta;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
2
|
+
export interface FormContextValue<TFieldValues extends FieldValues = FieldValues> {
|
|
3
|
+
form?: UseFormReturn<TFieldValues>;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const FormContext: import("react").Context<FormContextValue<FieldValues> | undefined>;
|
|
7
|
+
/**
|
|
8
|
+
* Hook to access Form context
|
|
9
|
+
*
|
|
10
|
+
* @throws Error if used outside of Form component with react-hook-form
|
|
11
|
+
*/
|
|
12
|
+
export declare function useFormContext<TFieldValues extends FieldValues = FieldValues>(): FormContextValue<TFieldValues>;
|
|
13
|
+
/**
|
|
14
|
+
* Hook to access Form context (optional, returns undefined if not in Form)
|
|
15
|
+
*/
|
|
16
|
+
export declare function useFormContextOptional<TFieldValues extends FieldValues = FieldValues>(): FormContextValue<TFieldValues> | undefined;
|
|
17
|
+
export { FormContext };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface FormFieldProps<TFieldValues extends FieldValues = FieldValues> {
|
|
4
|
+
name: Path<TFieldValues>;
|
|
5
|
+
label?: string;
|
|
6
|
+
children: (props: {
|
|
7
|
+
name: string;
|
|
8
|
+
register: ReturnType<ReturnType<UseFormReturn<TFieldValues>['register']>>;
|
|
9
|
+
error?: string;
|
|
10
|
+
value?: any;
|
|
11
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
|
|
12
|
+
onBlur?: () => void;
|
|
13
|
+
}) => ReactNode;
|
|
14
|
+
rules?: RegisterOptions<TFieldValues>;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* FormField Component
|
|
19
|
+
*
|
|
20
|
+
* A wrapper component for form fields that integrates with react-hook-form.
|
|
21
|
+
* Provides register, error, and validation state to children.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <FormField name="email" label="Email">
|
|
26
|
+
* {({ register, error }) => (
|
|
27
|
+
* <>
|
|
28
|
+
* <Label htmlFor="email">Email</Label>
|
|
29
|
+
* <Input id="email" {...register('email')} />
|
|
30
|
+
* {error && <ErrorMessage>{error}</ErrorMessage>}
|
|
31
|
+
* </>
|
|
32
|
+
* )}
|
|
33
|
+
* </FormField>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare function FormField<TFieldValues extends FieldValues = FieldValues>({ name, label, children, rules, className, }: FormFieldProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
3
|
+
export interface FormProviderProps<TFieldValues extends FieldValues = FieldValues> {
|
|
4
|
+
form?: UseFormReturn<TFieldValues>;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* FormProvider Component
|
|
10
|
+
*
|
|
11
|
+
* Provides react-hook-form context to form children.
|
|
12
|
+
* Used internally by Form component when react-hook-form is integrated.
|
|
13
|
+
*/
|
|
14
|
+
export declare function FormProvider<TFieldValues extends FieldValues = FieldValues>({ form, loading, children, }: FormProviderProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form Components
|
|
3
|
+
*
|
|
4
|
+
* Form components with optional react-hook-form and Zod integration.
|
|
5
|
+
*/
|
|
6
|
+
export { default as Form } from './Form';
|
|
7
|
+
export { FormContext, useFormContext, useFormContextOptional } from './FormContext';
|
|
8
|
+
export type { FormContextValue } from './FormContext';
|
|
9
|
+
export { FormProvider } from './FormProvider';
|
|
10
|
+
export type { FormProviderProps } from './FormProvider';
|
|
11
|
+
export { FormField } from './FormField';
|
|
12
|
+
export type { FormFieldProps } from './FormField';
|
|
13
|
+
export { useFormFieldArray } from './useFormFieldArray';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { FieldValues, Path, UseFieldArrayProps } from 'react-hook-form';
|
|
2
|
+
/**
|
|
3
|
+
* Hook for managing field arrays in forms
|
|
4
|
+
*
|
|
5
|
+
* Wrapper around react-hook-form's useFieldArray that integrates with Form context.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* const { fields, append, remove } = useFormFieldArray({
|
|
10
|
+
* name: 'items',
|
|
11
|
+
* });
|
|
12
|
+
*
|
|
13
|
+
* return (
|
|
14
|
+
* <>
|
|
15
|
+
* {fields.map((field, index) => (
|
|
16
|
+
* <div key={field.id}>
|
|
17
|
+
* <FormField name={`items.${index}.name`}>
|
|
18
|
+
* {({ register }) => <Input {...register(`items.${index}.name`)} />}
|
|
19
|
+
* </FormField>
|
|
20
|
+
* <Button onClick={() => remove(index)}>Remove</Button>
|
|
21
|
+
* </div>
|
|
22
|
+
* ))}
|
|
23
|
+
* <Button onClick={() => append({ name: '' })}>Add Item</Button>
|
|
24
|
+
* </>
|
|
25
|
+
* );
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function useFormFieldArray<TFieldValues extends FieldValues = FieldValues, TFieldArrayName extends Path<TFieldValues> = Path<TFieldValues>>(props: Omit<UseFieldArrayProps<TFieldValues, TFieldArrayName>, 'control'>): import("react-hook-form").UseFieldArrayReturn<TFieldValues, TFieldArrayName, "id">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type RatingSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type RatingVariant = 'filled' | 'outlined';
|
|
4
|
+
export interface RatingProps {
|
|
5
|
+
value?: number;
|
|
6
|
+
defaultValue?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
size?: RatingSize;
|
|
9
|
+
variant?: RatingVariant;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
allowHalf?: boolean;
|
|
12
|
+
showValue?: boolean;
|
|
13
|
+
onChange?: (value: number) => void;
|
|
14
|
+
onHover?: (value: number) => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
icon?: ReactNode;
|
|
17
|
+
emptyIcon?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Rating Component
|
|
21
|
+
*
|
|
22
|
+
* A rating component for displaying and selecting ratings.
|
|
23
|
+
* Supports filled and outlined variants, half ratings, and read-only mode.
|
|
24
|
+
* Follows Atomic Design principles as a Molecule component.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <Rating value={4} max={5} onChange={(value) => console.log(value)} />
|
|
29
|
+
*
|
|
30
|
+
* <Rating value={3.5} readOnly showValue />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export default function Rating({ value: controlledValue, defaultValue, max, size, variant, readOnly, allowHalf, showValue, onChange, onHover, className, icon, emptyIcon, }: RatingProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Rating from './Rating';
|
|
3
|
+
declare const meta: Meta<typeof Rating>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Rating>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithValue: Story;
|
|
8
|
+
export declare const ReadOnly: Story;
|
|
9
|
+
export declare const HalfRatings: Story;
|
|
10
|
+
export declare const Sizes: Story;
|
|
11
|
+
export declare const CustomMax: Story;
|
|
12
|
+
export declare const Variants: Story;
|
|
13
|
+
export declare const InContext: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface SearchInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange'> {
|
|
3
|
+
onSearch?: (value: string) => void;
|
|
4
|
+
onClear?: () => void;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
showClearButton?: boolean;
|
|
7
|
+
debounceMs?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* SearchInput Component
|
|
11
|
+
*
|
|
12
|
+
* A search input component with icon, clear button, and loading state.
|
|
13
|
+
* Follows Atomic Design principles as a Molecule component.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <SearchInput
|
|
18
|
+
* placeholder="Search..."
|
|
19
|
+
* onSearch={(value) => console.log(value)}
|
|
20
|
+
* />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare const SearchInput: import("react").ForwardRefExoticComponent<SearchInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
24
|
+
export default SearchInput;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import SearchInput from './SearchInput';
|
|
3
|
+
declare const meta: Meta<typeof SearchInput>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof SearchInput>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLoading: Story;
|
|
8
|
+
export declare const WithoutClearButton: Story;
|
|
9
|
+
export declare const WithDebounce: Story;
|
|
10
|
+
export declare const InForm: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export interface TableAction<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
3
|
+
label: string;
|
|
4
|
+
onClick: (row: T) => void;
|
|
5
|
+
variant?: 'default' | 'danger';
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface TableActionsProps<T extends Record<string, unknown> = Record<string, unknown>> extends HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
actions: TableAction<T>[];
|
|
11
|
+
row: T;
|
|
12
|
+
align?: 'left' | 'right';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* TableActions Component
|
|
16
|
+
*
|
|
17
|
+
* Dropdown menu for row actions in tables.
|
|
18
|
+
* Follows Atomic Design principles as a Molecule component.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <TableActions
|
|
23
|
+
* row={rowData}
|
|
24
|
+
* actions={[
|
|
25
|
+
* { label: 'Edit', onClick: (row) => handleEdit(row) },
|
|
26
|
+
* { label: 'Delete', onClick: (row) => handleDelete(row), variant: 'danger' },
|
|
27
|
+
* ]}
|
|
28
|
+
* />
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export default function TableActions<T extends Record<string, unknown> = Record<string, unknown>>({ actions, row, align, className, ...props }: TableActionsProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import TableActions from "./TableActions";
|
|
3
|
+
declare const meta: Meta<typeof TableActions>;
|
|
4
|
+
export declare const Default: StoryObj<typeof TableActions>;
|
|
5
|
+
export declare const WithDisabledAction: StoryObj<typeof TableActions>;
|
|
6
|
+
export declare const LeftAligned: StoryObj<typeof TableActions>;
|
|
7
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type FilterType = 'text' | 'select' | 'date';
|
|
3
|
+
export interface FilterConfig {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
type: FilterType;
|
|
7
|
+
options?: Array<{
|
|
8
|
+
value: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}>;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
}
|
|
13
|
+
export type FilterValue = string | number | boolean | null | undefined;
|
|
14
|
+
export interface TableFiltersProps extends HTMLAttributes<HTMLDivElement> {
|
|
15
|
+
filters: FilterConfig[];
|
|
16
|
+
onFilter: (filters: Record<string, FilterValue>) => void;
|
|
17
|
+
initialValues?: Record<string, FilterValue>;
|
|
18
|
+
showClearAll?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* TableFilters Component
|
|
22
|
+
*
|
|
23
|
+
* Filter controls for tables with support for text, select, and date filters.
|
|
24
|
+
* Follows Atomic Design principles as a Molecule component.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <TableFilters
|
|
29
|
+
* filters={[
|
|
30
|
+
* { key: 'status', label: 'Status', type: 'select', options: [...] },
|
|
31
|
+
* { key: 'search', label: 'Search', type: 'text', placeholder: 'Search...' }
|
|
32
|
+
* ]}
|
|
33
|
+
* onFilter={(filters) => handleFilter(filters)}
|
|
34
|
+
* />
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export default function TableFilters({ filters, onFilter, initialValues, showClearAll, className, ...props }: TableFiltersProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import TableFilters from "./TableFilters";
|
|
3
|
+
declare const meta: Meta<typeof TableFilters>;
|
|
4
|
+
export declare const Default: StoryObj<typeof TableFilters>;
|
|
5
|
+
export declare const WithInitialValues: StoryObj<typeof TableFilters>;
|
|
6
|
+
export declare const WithDateFilter: StoryObj<typeof TableFilters>;
|
|
7
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export interface TablePaginationProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
page: number;
|
|
4
|
+
pageSize: number;
|
|
5
|
+
total: number;
|
|
6
|
+
onPageChange: (page: number) => void;
|
|
7
|
+
onPageSizeChange: (size: number) => void;
|
|
8
|
+
pageSizeOptions?: number[];
|
|
9
|
+
showPageSizeSelector?: boolean;
|
|
10
|
+
showPageInfo?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* TablePagination Component
|
|
14
|
+
*
|
|
15
|
+
* Pagination controls for tables with page navigation and page size selection.
|
|
16
|
+
* Follows Atomic Design principles as a Molecule component.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <TablePagination
|
|
21
|
+
* page={1}
|
|
22
|
+
* pageSize={10}
|
|
23
|
+
* total={100}
|
|
24
|
+
* onPageChange={(page) => setPage(page)}
|
|
25
|
+
* onPageSizeChange={(size) => setPageSize(size)}
|
|
26
|
+
* />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export default function TablePagination({ page, pageSize, total, onPageChange, onPageSizeChange, pageSizeOptions, showPageSizeSelector, showPageInfo, className, ...props }: TablePaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import TablePagination from "./TablePagination";
|
|
3
|
+
declare const meta: Meta<typeof TablePagination>;
|
|
4
|
+
export declare const Default: StoryObj<typeof TablePagination>;
|
|
5
|
+
export declare const WithoutPageSizeSelector: StoryObj<typeof TablePagination>;
|
|
6
|
+
export declare const WithoutPageInfo: StoryObj<typeof TablePagination>;
|
|
7
|
+
export declare const LargeDataset: StoryObj<typeof TablePagination>;
|
|
8
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type TabsProviderProps } from './TabsProvider';
|
|
3
|
+
import { TabsList } from './TabsList';
|
|
4
|
+
import { TabsTrigger } from './TabsTrigger';
|
|
5
|
+
import { TabsContent } from './TabsContent';
|
|
6
|
+
export interface TabsProps extends Omit<TabsProviderProps, 'children'> {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface TabsComponentType extends React.FC<TabsProps> {
|
|
10
|
+
List: typeof TabsList;
|
|
11
|
+
Trigger: typeof TabsTrigger;
|
|
12
|
+
Content: typeof TabsContent;
|
|
13
|
+
}
|
|
14
|
+
declare const Tabs: TabsComponentType;
|
|
15
|
+
export default Tabs;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Tabs from './Tabs';
|
|
3
|
+
declare const meta: Meta<typeof Tabs>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Tabs>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Vertical: Story;
|
|
8
|
+
export declare const ManualActivation: Story;
|
|
9
|
+
export declare const WithDisabledTab: Story;
|
|
10
|
+
export declare const Controlled: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface TabsContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
value: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
forceMount?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* TabsContent Component
|
|
9
|
+
*
|
|
10
|
+
* Content panel for a tab.
|
|
11
|
+
* Only renders when the tab is active (unless forceMount is true).
|
|
12
|
+
* Must be used within a Tabs component.
|
|
13
|
+
*/
|
|
14
|
+
export declare function TabsContent({ value, children, forceMount, className, ...props }: TabsContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface TabsContextValue {
|
|
2
|
+
value: string;
|
|
3
|
+
onValueChange: (value: string) => void;
|
|
4
|
+
orientation?: 'horizontal' | 'vertical';
|
|
5
|
+
activationMode?: 'automatic' | 'manual';
|
|
6
|
+
}
|
|
7
|
+
declare const TabsContext: import("react").Context<TabsContextValue | undefined>;
|
|
8
|
+
/**
|
|
9
|
+
* Hook to access Tabs context
|
|
10
|
+
*
|
|
11
|
+
* @throws Error if used outside of Tabs component
|
|
12
|
+
*/
|
|
13
|
+
export declare function useTabsContext(): TabsContextValue;
|
|
14
|
+
/**
|
|
15
|
+
* Hook to access Tabs context (optional, returns undefined if not in Tabs)
|
|
16
|
+
*/
|
|
17
|
+
export declare function useTabsContextOptional(): TabsContextValue | undefined;
|
|
18
|
+
export { TabsContext };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface TabsListProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* TabsList Component
|
|
7
|
+
*
|
|
8
|
+
* Container for tab triggers.
|
|
9
|
+
* Manages keyboard navigation between tabs.
|
|
10
|
+
* Must be used within a Tabs component.
|
|
11
|
+
*/
|
|
12
|
+
export declare function TabsList({ children, className, ...props }: TabsListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface TabsProviderProps {
|
|
3
|
+
defaultValue?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
onValueChange?: (value: string) => void;
|
|
6
|
+
orientation?: 'horizontal' | 'vertical';
|
|
7
|
+
activationMode?: 'automatic' | 'manual';
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* TabsProvider Component
|
|
12
|
+
*
|
|
13
|
+
* Provides Tabs context to children.
|
|
14
|
+
* Manages active tab state and handles controlled/uncontrolled modes.
|
|
15
|
+
*/
|
|
16
|
+
export declare function TabsProvider({ defaultValue, value: controlledValue, onValueChange, orientation, activationMode, children, }: TabsProviderProps): import("react/jsx-runtime").JSX.Element;
|