@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
package/README.md
CHANGED
|
@@ -111,14 +111,59 @@ Explore the live documentation and interactive components:
|
|
|
111
111
|
|
|
112
112
|
[Storybook on GitHub Pages](https://fabiocaffarello.github.io/react-design-system)
|
|
113
113
|
|
|
114
|
+
## Features
|
|
115
|
+
|
|
116
|
+
### Accessibility
|
|
117
|
+
|
|
118
|
+
- **WCAG 2.1 AA Compliance**: All components meet accessibility standards
|
|
119
|
+
- **Keyboard Navigation**: Full keyboard support for all interactive components
|
|
120
|
+
- **ARIA Attributes**: Proper ARIA labels, roles, and states
|
|
121
|
+
- **Screen Reader Support**: Optimized for assistive technologies
|
|
122
|
+
- **Focus Management**: Proper focus trapping and restoration
|
|
123
|
+
|
|
124
|
+
### Testing
|
|
125
|
+
|
|
126
|
+
- **High Test Coverage**: > 80% coverage for all components
|
|
127
|
+
- **Accessibility Tests**: Automated a11y testing with @testing-library/jest-dom
|
|
128
|
+
- **Storybook Tests**: Visual regression and interaction testing
|
|
129
|
+
- **Edge Cases**: Comprehensive test coverage including error states
|
|
130
|
+
|
|
131
|
+
### Documentation
|
|
132
|
+
|
|
133
|
+
- **Storybook**: Interactive documentation with live examples
|
|
134
|
+
- **MDX Docs**: Detailed documentation for complex components
|
|
135
|
+
- **JSDoc**: Complete inline documentation
|
|
136
|
+
- **Type Safety**: Full TypeScript support with strict types
|
|
137
|
+
|
|
138
|
+
## Scripts
|
|
139
|
+
|
|
140
|
+
- `npm run dev` - Start development server
|
|
141
|
+
- `npm run build` - Build for production
|
|
142
|
+
- `npm run storybook` - Start Storybook
|
|
143
|
+
- `npm run build-storybook` - Build static Storybook
|
|
144
|
+
- `npm test` - Run tests
|
|
145
|
+
- `npm run test:coverage` - Run tests with coverage report
|
|
146
|
+
- `npm run test:watch` - Run tests in watch mode
|
|
147
|
+
- `npm run lint` - Lint code
|
|
148
|
+
- `npm run plop` - Generate new components
|
|
149
|
+
|
|
150
|
+
## Quality Standards
|
|
151
|
+
|
|
152
|
+
- **Type Safety**: Zero use of `any` (except where absolutely necessary)
|
|
153
|
+
- **Test Coverage**: Minimum 80% coverage required
|
|
154
|
+
- **Accessibility**: WCAG 2.1 AA compliance
|
|
155
|
+
- **Code Quality**: ESLint + Prettier enforced
|
|
156
|
+
- **Documentation**: All components documented in Storybook
|
|
157
|
+
|
|
114
158
|
## Roadmap
|
|
115
159
|
|
|
116
160
|
- [x] Atomic Design structure
|
|
117
161
|
- [x] Storybook integration
|
|
118
162
|
- [x] Automated unit and story testing
|
|
119
163
|
- [x] TailwindCSS theming
|
|
164
|
+
- [x] Accessibility improvements (WCAG 2.1 AA)
|
|
165
|
+
- [x] Comprehensive test coverage
|
|
166
|
+
- [x] MDX documentation for complex components
|
|
120
167
|
- [ ] Create Publish npm package cd step
|
|
121
|
-
- [ ] Improve components design
|
|
122
|
-
- [ ] New components (Cards, Modals, etc.)
|
|
123
168
|
- [ ] Customizable themes and dark mode
|
|
124
|
-
- [ ]
|
|
169
|
+
- [ ] Performance optimizations (code splitting)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface ComponentStatusTableProps {
|
|
2
|
+
components: Array<{
|
|
3
|
+
name: string;
|
|
4
|
+
status: string;
|
|
5
|
+
accessibility: string;
|
|
6
|
+
tests: string;
|
|
7
|
+
docs: boolean;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
export declare function ComponentStatusTable({ components }: ComponentStatusTableProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type AccordionType = 'single' | 'multiple';
|
|
3
|
+
export interface AccordionItem {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface AccordionProps {
|
|
10
|
+
items: AccordionItem[];
|
|
11
|
+
type?: AccordionType;
|
|
12
|
+
defaultOpen?: string | string[];
|
|
13
|
+
onValueChange?: (value: string | string[]) => void;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Accordion Component
|
|
18
|
+
*
|
|
19
|
+
* A collapsible content component that can display multiple items.
|
|
20
|
+
* Supports single and multiple selection modes.
|
|
21
|
+
* Follows Atomic Design principles as an Atom component.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <Accordion
|
|
26
|
+
* type="single"
|
|
27
|
+
* items={[
|
|
28
|
+
* { id: '1', title: 'Item 1', content: 'Content 1' },
|
|
29
|
+
* { id: '2', title: 'Item 2', content: 'Content 2' },
|
|
30
|
+
* ]}
|
|
31
|
+
* />
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export default function Accordion({ items, type, defaultOpen, onValueChange, className, }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Accordion from './Accordion';
|
|
3
|
+
declare const meta: Meta<typeof Accordion>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Accordion>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Multiple: Story;
|
|
8
|
+
export declare const WithDefaultOpen: Story;
|
|
9
|
+
export declare const WithDisabledItems: Story;
|
|
10
|
+
export declare const RichContent: Story;
|
|
11
|
+
export declare const LongContent: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export interface AvatarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
4
|
+
src?: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
fallback?: string | ReactNode;
|
|
7
|
+
size?: AvatarSize;
|
|
8
|
+
variant?: 'circle' | 'square' | 'rounded';
|
|
9
|
+
'aria-label'?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Avatar Component
|
|
13
|
+
*
|
|
14
|
+
* A versatile avatar component for displaying user profile images or initials.
|
|
15
|
+
* Supports fallback display when image fails to load or is not provided.
|
|
16
|
+
* Fully accessible with ARIA attributes.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* // With image
|
|
21
|
+
* <Avatar src="/user.jpg" alt="John Doe" />
|
|
22
|
+
*
|
|
23
|
+
* // With fallback initials
|
|
24
|
+
* <Avatar fallback="JD" alt="John Doe" />
|
|
25
|
+
*
|
|
26
|
+
* // Custom size
|
|
27
|
+
* <Avatar src="/user.jpg" size="lg" />
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export default function Avatar({ src, alt, fallback, size, variant, 'aria-label': ariaLabel, className, ...props }: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Avatar from './Avatar';
|
|
3
|
+
declare const meta: Meta<typeof Avatar>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Avatar>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithImage: Story;
|
|
8
|
+
export declare const Sizes: Story;
|
|
9
|
+
export declare const Variants: Story;
|
|
10
|
+
export declare const WithFallback: Story;
|
|
11
|
+
export declare const ImageError: Story;
|
|
12
|
+
export declare const Group: Story;
|
|
13
|
+
export declare const GroupSpacing: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { type AvatarProps } from './Avatar';
|
|
3
|
+
export interface AvatarGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
max?: number;
|
|
6
|
+
size?: AvatarProps['size'];
|
|
7
|
+
variant?: AvatarProps['variant'];
|
|
8
|
+
spacing?: 'none' | 'sm' | 'md' | 'lg';
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* AvatarGroup Component
|
|
12
|
+
*
|
|
13
|
+
* Container for displaying multiple avatars in a group.
|
|
14
|
+
* Supports collapsing when there are too many avatars.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <AvatarGroup max={3}>
|
|
19
|
+
* <Avatar src="/user1.jpg" alt="User 1" />
|
|
20
|
+
* <Avatar src="/user2.jpg" alt="User 2" />
|
|
21
|
+
* <Avatar src="/user3.jpg" alt="User 3" />
|
|
22
|
+
* <Avatar src="/user4.jpg" alt="User 4" />
|
|
23
|
+
* </AvatarGroup>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function AvatarGroup({ children, max, size, variant, spacing, className, ...props }: AvatarGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Avatar Components
|
|
3
|
+
*
|
|
4
|
+
* Avatar component with fallback, sizes, and group support.
|
|
5
|
+
*/
|
|
6
|
+
export { default as Avatar } from './Avatar';
|
|
7
|
+
export type { AvatarProps, AvatarSize } from './Avatar';
|
|
8
|
+
export { AvatarGroup } from './AvatarGroup';
|
|
9
|
+
export type { AvatarGroupProps } from './AvatarGroup';
|
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import type { HTMLAttributes } from
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type BadgeVariant = 'success' | 'warning' | 'error' | 'info' | 'neutral' | 'primary' | 'secondary';
|
|
3
|
+
export type BadgeSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type BadgeStyle = 'solid' | 'outline';
|
|
5
|
+
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
6
|
+
variant?: BadgeVariant;
|
|
7
|
+
size?: BadgeSize;
|
|
8
|
+
style?: BadgeStyle;
|
|
9
|
+
children: ReactNode;
|
|
4
10
|
}
|
|
5
11
|
/**
|
|
6
12
|
* Badge Component
|
|
7
13
|
*
|
|
8
14
|
* A versatile badge component for displaying status, priority, and other labels.
|
|
9
15
|
* Follows Atomic Design principles as an Atom component.
|
|
16
|
+
* Uses tokens for consistent theming.
|
|
10
17
|
*
|
|
11
18
|
* @example
|
|
12
19
|
* ```tsx
|
|
13
20
|
* <Badge variant="success">Active</Badge>
|
|
14
|
-
* <Badge variant="error">Critical</Badge>
|
|
21
|
+
* <Badge variant="error" size="lg">Critical</Badge>
|
|
22
|
+
* <Badge variant="info" style="outline">New</Badge>
|
|
15
23
|
* ```
|
|
16
24
|
*/
|
|
17
|
-
|
|
18
|
-
export
|
|
25
|
+
declare const Badge: import("react").NamedExoticComponent<BadgeProps>;
|
|
26
|
+
export default Badge;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import Badge from
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Badge from './Badge';
|
|
3
3
|
declare const meta: Meta<typeof Badge>;
|
|
4
|
-
export declare const Success: StoryObj<typeof Badge>;
|
|
5
|
-
export declare const Warning: StoryObj<typeof Badge>;
|
|
6
|
-
export declare const Error: StoryObj<typeof Badge>;
|
|
7
|
-
export declare const Info: StoryObj<typeof Badge>;
|
|
8
|
-
export declare const Neutral: StoryObj<typeof Badge>;
|
|
9
|
-
export declare const AllVariants: StoryObj<typeof Badge>;
|
|
10
|
-
export declare const WithCustomContent: StoryObj<typeof Badge>;
|
|
11
4
|
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Badge>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Variants: Story;
|
|
8
|
+
export declare const Sizes: Story;
|
|
9
|
+
export declare const Styles: Story;
|
|
10
|
+
export declare const AllCombinations: Story;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { HTMLAttributes } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export {};
|
|
2
|
+
export interface BoxWrapperProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
}
|
|
4
|
+
export default function BoxWrapper({ className, ...props }: BoxWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,29 +1,51 @@
|
|
|
1
|
-
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export type ButtonVariant = 'primary' | 'regular' | 'secondary' | 'error' | 'outline' | 'ghost';
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode, ElementType } from 'react';
|
|
2
|
+
export type ButtonVariant = 'primary' | 'regular' | 'secondary' | 'error' | 'outline' | 'ghost' | 'iconOnly';
|
|
3
3
|
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
4
|
-
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'as'> {
|
|
5
5
|
variant?: ButtonVariant;
|
|
6
6
|
size?: ButtonSize;
|
|
7
7
|
isLoading?: boolean;
|
|
8
|
+
loadingText?: string;
|
|
9
|
+
loadingIcon?: ReactNode;
|
|
8
10
|
leftIcon?: ReactNode;
|
|
9
11
|
rightIcon?: ReactNode;
|
|
12
|
+
fullWidth?: boolean;
|
|
13
|
+
as?: ElementType;
|
|
14
|
+
href?: string;
|
|
10
15
|
}
|
|
11
16
|
/**
|
|
12
17
|
* Button Component
|
|
13
18
|
*
|
|
14
|
-
* A styled button component with variants and
|
|
19
|
+
* A styled button component with variants, sizes, and loading states.
|
|
15
20
|
* Follows Atomic Design principles as an Atom component.
|
|
16
21
|
* Uses Builder Pattern for class construction.
|
|
22
|
+
* Supports polymorphic `as` prop for rendering as different elements (Link, NextLink, etc.).
|
|
17
23
|
*
|
|
18
24
|
* @example
|
|
19
25
|
* ```tsx
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* size="md"
|
|
23
|
-
* onClick={handleClick}
|
|
24
|
-
* >
|
|
26
|
+
* // Basic usage
|
|
27
|
+
* <Button variant="primary" size="md" onClick={handleClick}>
|
|
25
28
|
* Click me
|
|
26
29
|
* </Button>
|
|
30
|
+
*
|
|
31
|
+
* // With icons
|
|
32
|
+
* <Button leftIcon={<Icon />} rightIcon={<Icon />}>
|
|
33
|
+
* Action
|
|
34
|
+
* </Button>
|
|
35
|
+
*
|
|
36
|
+
* // Loading state
|
|
37
|
+
* <Button isLoading loadingText="Saving...">
|
|
38
|
+
* Save
|
|
39
|
+
* </Button>
|
|
40
|
+
*
|
|
41
|
+
* // As Link
|
|
42
|
+
* <Button as={Link} href="/page">
|
|
43
|
+
* Navigate
|
|
44
|
+
* </Button>
|
|
45
|
+
*
|
|
46
|
+
* // Icon only
|
|
47
|
+
* <Button variant="iconOnly" leftIcon={<Icon />} aria-label="Close" />
|
|
27
48
|
* ```
|
|
28
49
|
*/
|
|
29
|
-
|
|
50
|
+
declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
51
|
+
export default Button;
|
|
@@ -8,6 +8,13 @@ export declare const Secondary: Story;
|
|
|
8
8
|
export declare const Error: Story;
|
|
9
9
|
export declare const Outline: Story;
|
|
10
10
|
export declare const Ghost: Story;
|
|
11
|
+
export declare const IconOnly: Story;
|
|
11
12
|
export declare const Sizes: Story;
|
|
13
|
+
export declare const WithIcons: Story;
|
|
12
14
|
export declare const Loading: Story;
|
|
15
|
+
export declare const LoadingWithText: Story;
|
|
13
16
|
export declare const Disabled: Story;
|
|
17
|
+
export declare const FullWidth: Story;
|
|
18
|
+
export declare const AllVariants: Story;
|
|
19
|
+
export declare const Accessibility: Story;
|
|
20
|
+
export declare const KeyboardNavigation: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,6 +3,7 @@ export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement
|
|
|
3
3
|
label?: ReactNode;
|
|
4
4
|
error?: boolean;
|
|
5
5
|
helperText?: string;
|
|
6
|
+
indeterminate?: boolean;
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
8
9
|
* Checkbox Component
|
|
@@ -21,4 +22,4 @@ export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement
|
|
|
21
22
|
* />
|
|
22
23
|
* ```
|
|
23
24
|
*/
|
|
24
|
-
export default function Checkbox({ id, label, error, helperText, className, disabled, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default function Checkbox({ id, label, error, helperText, className, disabled, indeterminate, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,4 +6,6 @@ export declare const DefaultClosed: StoryObj<typeof Collapsible>;
|
|
|
6
6
|
export declare const Controlled: StoryObj<typeof Collapsible>;
|
|
7
7
|
export declare const WithStorage: StoryObj<typeof Collapsible>;
|
|
8
8
|
export declare const Disabled: StoryObj<typeof Collapsible>;
|
|
9
|
+
export declare const Accessibility: StoryObj<typeof Collapsible>;
|
|
10
|
+
export declare const KeyboardNavigation: StoryObj<typeof Collapsible>;
|
|
9
11
|
export default meta;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from "react";
|
|
2
|
-
interface
|
|
2
|
+
export interface InfoProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
variant?: "info" | "warning" | "error";
|
|
4
4
|
}
|
|
5
|
-
export default function Info({ variant, className, ...props }:
|
|
6
|
-
export {};
|
|
5
|
+
export default function Info({ variant, className, ...props }: InfoProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import type { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type InputSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type InputVariant = 'default' | 'outlined' | 'filled';
|
|
4
|
+
export type InputState = 'default' | 'error' | 'success';
|
|
2
5
|
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
3
6
|
label?: ReactNode;
|
|
4
7
|
error?: boolean;
|
|
8
|
+
success?: boolean;
|
|
5
9
|
helperText?: string;
|
|
6
|
-
size?:
|
|
7
|
-
variant?:
|
|
10
|
+
size?: InputSize;
|
|
11
|
+
variant?: InputVariant;
|
|
12
|
+
leftIcon?: ReactNode;
|
|
13
|
+
rightIcon?: ReactNode;
|
|
14
|
+
showClearButton?: boolean;
|
|
15
|
+
onClear?: () => void;
|
|
8
16
|
}
|
|
9
17
|
/**
|
|
10
18
|
* Input Component
|
|
11
19
|
*
|
|
12
|
-
* A styled text input component with label and
|
|
20
|
+
* A styled text input component with label, error/success states, icons, and clear button.
|
|
13
21
|
* Follows Atomic Design principles as an Atom component.
|
|
14
22
|
* Uses Composite Pattern when combined with Label and ErrorMessage.
|
|
15
23
|
*
|
|
@@ -22,7 +30,9 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
22
30
|
* placeholder="Enter your email"
|
|
23
31
|
* error={hasError}
|
|
24
32
|
* helperText={errorMessage}
|
|
33
|
+
* leftIcon={<MailIcon />}
|
|
25
34
|
* />
|
|
26
35
|
* ```
|
|
27
36
|
*/
|
|
28
|
-
|
|
37
|
+
declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
38
|
+
export default Input;
|
|
@@ -5,6 +5,12 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof Input>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const WithError: Story;
|
|
8
|
+
export declare const WithSuccess: Story;
|
|
8
9
|
export declare const Sizes: Story;
|
|
9
10
|
export declare const Variants: Story;
|
|
11
|
+
export declare const WithIcons: Story;
|
|
12
|
+
export declare const WithClearButton: Story;
|
|
13
|
+
export declare const Password: Story;
|
|
14
|
+
export declare const PasswordWithIcon: Story;
|
|
10
15
|
export declare const Disabled: Story;
|
|
16
|
+
export declare const AllStates: Story;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type PopoverPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
3
|
+
export interface PopoverProps {
|
|
4
|
+
trigger: ReactNode;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
open?: boolean;
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
|
+
placement?: PopoverPlacement;
|
|
10
|
+
showCloseButton?: boolean;
|
|
11
|
+
title?: string;
|
|
12
|
+
closeOnClickOutside?: boolean;
|
|
13
|
+
closeOnEscape?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
triggerClassName?: string;
|
|
16
|
+
contentClassName?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Popover Component
|
|
20
|
+
*
|
|
21
|
+
* A popover component that displays content in a floating panel.
|
|
22
|
+
* Supports positioning, portal rendering, and keyboard navigation.
|
|
23
|
+
* Follows Atomic Design principles as an Atom component.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <Popover
|
|
28
|
+
* trigger={<Button>Open Popover</Button>}
|
|
29
|
+
* title="Popover Title"
|
|
30
|
+
* >
|
|
31
|
+
* <p>Popover content goes here</p>
|
|
32
|
+
* </Popover>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export default function Popover({ trigger, children, open: controlledOpen, defaultOpen, onOpenChange, placement, showCloseButton, title, closeOnClickOutside, closeOnEscape, className, triggerClassName, contentClassName, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Popover from './Popover';
|
|
3
|
+
declare const meta: Meta<typeof Popover>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Popover>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithTitle: Story;
|
|
8
|
+
export declare const Placements: Story;
|
|
9
|
+
export declare const RichContent: Story;
|
|
10
|
+
export declare const Controlled: Story;
|
|
11
|
+
export declare const WithoutCloseButton: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import './Progress.css';
|
|
3
|
+
export type ProgressVariant = 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info';
|
|
4
|
+
export type ProgressSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
value?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
variant?: ProgressVariant;
|
|
9
|
+
size?: ProgressSize;
|
|
10
|
+
showLabel?: boolean;
|
|
11
|
+
label?: string;
|
|
12
|
+
'aria-label'?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Progress Component
|
|
16
|
+
*
|
|
17
|
+
* A progress bar component for displaying progress or loading states.
|
|
18
|
+
* Supports both determinate (with value) and indeterminate (without value) modes.
|
|
19
|
+
* Fully accessible with ARIA attributes.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* // Determinate progress
|
|
24
|
+
* <Progress value={75} variant="primary" />
|
|
25
|
+
*
|
|
26
|
+
* // Indeterminate progress
|
|
27
|
+
* <Progress variant="primary" />
|
|
28
|
+
*
|
|
29
|
+
* // With label
|
|
30
|
+
* <Progress value={50} showLabel label="Uploading..." />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export default function Progress({ value, max, variant, size, showLabel, label, 'aria-label': ariaLabel, className, ...props }: ProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Progress from './Progress';
|
|
3
|
+
declare const meta: Meta<typeof Progress>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Progress>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLabel: Story;
|
|
8
|
+
export declare const Indeterminate: Story;
|
|
9
|
+
export declare const Variants: Story;
|
|
10
|
+
export declare const Sizes: Story;
|
|
11
|
+
export declare const States: Story;
|
|
12
|
+
export declare const Animated: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,23 +1,35 @@
|
|
|
1
|
-
import type { SelectHTMLAttributes } from
|
|
2
|
-
|
|
1
|
+
import type { SelectHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type SelectSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface SelectOption {
|
|
3
4
|
value: string;
|
|
4
5
|
label: string;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
}
|
|
7
|
-
interface
|
|
8
|
-
|
|
8
|
+
export interface SelectOptionGroup {
|
|
9
|
+
label: string;
|
|
10
|
+
options: SelectOption[];
|
|
11
|
+
}
|
|
12
|
+
export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'children' | 'size'> {
|
|
13
|
+
options: SelectOption[];
|
|
14
|
+
optionGroups?: SelectOptionGroup[];
|
|
9
15
|
placeholder?: string;
|
|
16
|
+
label?: ReactNode;
|
|
10
17
|
error?: boolean;
|
|
18
|
+
success?: boolean;
|
|
19
|
+
helperText?: string;
|
|
20
|
+
size?: SelectSize;
|
|
11
21
|
}
|
|
12
22
|
/**
|
|
13
23
|
* Select Component
|
|
14
24
|
*
|
|
15
25
|
* A styled select dropdown component for forms.
|
|
16
26
|
* Follows Atomic Design principles as an Atom component.
|
|
27
|
+
* Supports both flat options and option groups.
|
|
17
28
|
*
|
|
18
29
|
* @example
|
|
19
30
|
* ```tsx
|
|
20
31
|
* <Select
|
|
32
|
+
* label="Choose option"
|
|
21
33
|
* options={[
|
|
22
34
|
* { value: "1", label: "Option 1" },
|
|
23
35
|
* { value: "2", label: "Option 2" }
|
|
@@ -26,5 +38,5 @@ interface Props extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "children"
|
|
|
26
38
|
* />
|
|
27
39
|
* ```
|
|
28
40
|
*/
|
|
29
|
-
|
|
30
|
-
export
|
|
41
|
+
declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
42
|
+
export default Select;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import Select from
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Select from './Select';
|
|
3
3
|
declare const meta: Meta<typeof Select>;
|
|
4
|
-
export declare const Primary: StoryObj<typeof Select>;
|
|
5
|
-
export declare const WithSelectedValue: StoryObj<typeof Select>;
|
|
6
|
-
export declare const WithError: StoryObj<typeof Select>;
|
|
7
|
-
export declare const WithDisabledOption: StoryObj<typeof Select>;
|
|
8
|
-
export declare const StatusOptions: StoryObj<typeof Select>;
|
|
9
|
-
export declare const PriorityOptions: StoryObj<typeof Select>;
|
|
10
4
|
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Select>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithError: Story;
|
|
8
|
+
export declare const WithSuccess: Story;
|
|
9
|
+
export declare const Sizes: Story;
|
|
10
|
+
export declare const WithOptionGroups: Story;
|
|
11
|
+
export declare const WithManyOptions: Story;
|
|
12
|
+
export declare const Disabled: Story;
|
|
13
|
+
export declare const AllStates: Story;
|