@k3-universe/react-kit 0.0.1
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/.babelrc +12 -0
- package/.storybook/main.ts +22 -0
- package/.storybook/preview.ts +190 -0
- package/Dockerfile.storybook +43 -0
- package/README.md +7 -0
- package/components.json +20 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/kit/builder/data-table/components/DataTable.d.ts +34 -0
- package/dist/kit/builder/data-table/components/DataTable.d.ts.map +1 -0
- package/dist/kit/builder/data-table/components/DataTableColumnHeader.d.ts +8 -0
- package/dist/kit/builder/data-table/components/DataTableColumnHeader.d.ts.map +1 -0
- package/dist/kit/builder/data-table/components/DataTablePagination.d.ts +6 -0
- package/dist/kit/builder/data-table/components/DataTablePagination.d.ts.map +1 -0
- package/dist/kit/builder/data-table/components/DataTableViewOptions.d.ts +5 -0
- package/dist/kit/builder/data-table/components/DataTableViewOptions.d.ts.map +1 -0
- package/dist/kit/builder/data-table/index.d.ts +6 -0
- package/dist/kit/builder/data-table/index.d.ts.map +1 -0
- package/dist/kit/builder/data-table/types.d.ts +27 -0
- package/dist/kit/builder/data-table/types.d.ts.map +1 -0
- package/dist/kit/builder/data-table/utils/dotAccessor.d.ts +2 -0
- package/dist/kit/builder/data-table/utils/dotAccessor.d.ts.map +1 -0
- package/dist/kit/builder/dialog/index.d.ts +3 -0
- package/dist/kit/builder/dialog/index.d.ts.map +1 -0
- package/dist/kit/builder/dialog/provider.d.ts +26 -0
- package/dist/kit/builder/dialog/provider.d.ts.map +1 -0
- package/dist/kit/builder/form/components/FormActions.d.ts +20 -0
- package/dist/kit/builder/form/components/FormActions.d.ts.map +1 -0
- package/dist/kit/builder/form/components/FormBuilder.d.ts +97 -0
- package/dist/kit/builder/form/components/FormBuilder.d.ts.map +1 -0
- package/dist/kit/builder/form/components/FormField.d.ts +12 -0
- package/dist/kit/builder/form/components/FormField.d.ts.map +1 -0
- package/dist/kit/builder/form/components/FormSection.d.ts +15 -0
- package/dist/kit/builder/form/components/FormSection.d.ts.map +1 -0
- package/dist/kit/builder/form/components/index.d.ts +5 -0
- package/dist/kit/builder/form/components/index.d.ts.map +1 -0
- package/dist/kit/builder/form/index.d.ts +3 -0
- package/dist/kit/builder/form/index.d.ts.map +1 -0
- package/dist/kit/builder/form/utils/common-forms.d.ts +7 -0
- package/dist/kit/builder/form/utils/common-forms.d.ts.map +1 -0
- package/dist/kit/builder/form/utils/dependencies.d.ts +41 -0
- package/dist/kit/builder/form/utils/dependencies.d.ts.map +1 -0
- package/dist/kit/builder/form/utils/field-factories.d.ts +22 -0
- package/dist/kit/builder/form/utils/field-factories.d.ts.map +1 -0
- package/dist/kit/builder/form/utils/index.d.ts +15 -0
- package/dist/kit/builder/form/utils/index.d.ts.map +1 -0
- package/dist/kit/builder/form/utils/section-factories.d.ts +7 -0
- package/dist/kit/builder/form/utils/section-factories.d.ts.map +1 -0
- package/dist/kit/builder/form/utils/transformers.d.ts +6 -0
- package/dist/kit/builder/form/utils/transformers.d.ts.map +1 -0
- package/dist/kit/builder/form/utils/validations.d.ts +13 -0
- package/dist/kit/builder/form/utils/validations.d.ts.map +1 -0
- package/dist/kit/builder/form/utils/validators.d.ts +8 -0
- package/dist/kit/builder/form/utils/validators.d.ts.map +1 -0
- package/dist/kit/builder/page/Page.d.ts +48 -0
- package/dist/kit/builder/page/Page.d.ts.map +1 -0
- package/dist/kit/builder/page/index.d.ts +2 -0
- package/dist/kit/builder/page/index.d.ts.map +1 -0
- package/dist/kit/builder/section/SectionBuilder.d.ts +3 -0
- package/dist/kit/builder/section/SectionBuilder.d.ts.map +1 -0
- package/dist/kit/builder/section/index.d.ts +3 -0
- package/dist/kit/builder/section/index.d.ts.map +1 -0
- package/dist/kit/builder/section/types.d.ts +59 -0
- package/dist/kit/builder/section/types.d.ts.map +1 -0
- package/dist/kit/components/autocomplete/Autocomplete.d.ts +21 -0
- package/dist/kit/components/autocomplete/Autocomplete.d.ts.map +1 -0
- package/dist/kit/components/autocomplete/index.d.ts +3 -0
- package/dist/kit/components/autocomplete/index.d.ts.map +1 -0
- package/dist/kit/components/autocomplete/types.d.ts +19 -0
- package/dist/kit/components/autocomplete/types.d.ts.map +1 -0
- package/dist/kit/components/login/Login.d.ts +29 -0
- package/dist/kit/components/login/Login.d.ts.map +1 -0
- package/dist/kit/components/login/index.d.ts +2 -0
- package/dist/kit/components/login/index.d.ts.map +1 -0
- package/dist/kit/layouts/admin/components/AdminLayout.d.ts +17 -0
- package/dist/kit/layouts/admin/components/AdminLayout.d.ts.map +1 -0
- package/dist/kit/layouts/admin/components/ThemeToggle.d.ts +5 -0
- package/dist/kit/layouts/admin/components/ThemeToggle.d.ts.map +1 -0
- package/dist/kit/layouts/admin/hooks/menu.d.ts +12 -0
- package/dist/kit/layouts/admin/hooks/menu.d.ts.map +1 -0
- package/dist/kit/layouts/admin/providers/AdminMenuProvider.d.ts +7 -0
- package/dist/kit/layouts/admin/providers/AdminMenuProvider.d.ts.map +1 -0
- package/dist/kit/layouts/admin/types/index.d.ts +27 -0
- package/dist/kit/layouts/admin/types/index.d.ts.map +1 -0
- package/dist/kit/providers/ThemeProvider.d.ts +14 -0
- package/dist/kit/providers/ThemeProvider.d.ts.map +1 -0
- package/dist/shadcn/hooks/use-mobile.d.ts +2 -0
- package/dist/shadcn/hooks/use-mobile.d.ts.map +1 -0
- package/dist/shadcn/lib/utils.d.ts +3 -0
- package/dist/shadcn/lib/utils.d.ts.map +1 -0
- package/dist/shadcn/ui/accordion.d.ts +8 -0
- package/dist/shadcn/ui/accordion.d.ts.map +1 -0
- package/dist/shadcn/ui/alert-dialog.d.ts +15 -0
- package/dist/shadcn/ui/alert-dialog.d.ts.map +1 -0
- package/dist/shadcn/ui/alert.d.ts +10 -0
- package/dist/shadcn/ui/alert.d.ts.map +1 -0
- package/dist/shadcn/ui/aspect-ratio.d.ts +4 -0
- package/dist/shadcn/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/shadcn/ui/avatar.d.ts +7 -0
- package/dist/shadcn/ui/avatar.d.ts.map +1 -0
- package/dist/shadcn/ui/badge.d.ts +10 -0
- package/dist/shadcn/ui/badge.d.ts.map +1 -0
- package/dist/shadcn/ui/breadcrumb.d.ts +12 -0
- package/dist/shadcn/ui/breadcrumb.d.ts.map +1 -0
- package/dist/shadcn/ui/button.d.ts +11 -0
- package/dist/shadcn/ui/button.d.ts.map +1 -0
- package/dist/shadcn/ui/calendar.d.ts +9 -0
- package/dist/shadcn/ui/calendar.d.ts.map +1 -0
- package/dist/shadcn/ui/card.d.ts +10 -0
- package/dist/shadcn/ui/card.d.ts.map +1 -0
- package/dist/shadcn/ui/carousel.d.ts +20 -0
- package/dist/shadcn/ui/carousel.d.ts.map +1 -0
- package/dist/shadcn/ui/chart.d.ts +41 -0
- package/dist/shadcn/ui/chart.d.ts.map +1 -0
- package/dist/shadcn/ui/checkbox.d.ts +5 -0
- package/dist/shadcn/ui/checkbox.d.ts.map +1 -0
- package/dist/shadcn/ui/collapsible.d.ts +6 -0
- package/dist/shadcn/ui/collapsible.d.ts.map +1 -0
- package/dist/shadcn/ui/command.d.ts +19 -0
- package/dist/shadcn/ui/command.d.ts.map +1 -0
- package/dist/shadcn/ui/context-menu.d.ts +26 -0
- package/dist/shadcn/ui/context-menu.d.ts.map +1 -0
- package/dist/shadcn/ui/dialog.d.ts +16 -0
- package/dist/shadcn/ui/dialog.d.ts.map +1 -0
- package/dist/shadcn/ui/drawer.d.ts +14 -0
- package/dist/shadcn/ui/drawer.d.ts.map +1 -0
- package/dist/shadcn/ui/dropdown-menu.d.ts +26 -0
- package/dist/shadcn/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/shadcn/ui/form.d.ts +25 -0
- package/dist/shadcn/ui/form.d.ts.map +1 -0
- package/dist/shadcn/ui/hover-card.d.ts +7 -0
- package/dist/shadcn/ui/hover-card.d.ts.map +1 -0
- package/dist/shadcn/ui/input-otp.d.ts +12 -0
- package/dist/shadcn/ui/input-otp.d.ts.map +1 -0
- package/dist/shadcn/ui/input.d.ts +4 -0
- package/dist/shadcn/ui/input.d.ts.map +1 -0
- package/dist/shadcn/ui/label.d.ts +5 -0
- package/dist/shadcn/ui/label.d.ts.map +1 -0
- package/dist/shadcn/ui/menubar.d.ts +27 -0
- package/dist/shadcn/ui/menubar.d.ts.map +1 -0
- package/dist/shadcn/ui/navigation-menu.d.ts +15 -0
- package/dist/shadcn/ui/navigation-menu.d.ts.map +1 -0
- package/dist/shadcn/ui/pagination.d.ts +14 -0
- package/dist/shadcn/ui/pagination.d.ts.map +1 -0
- package/dist/shadcn/ui/popover.d.ts +8 -0
- package/dist/shadcn/ui/popover.d.ts.map +1 -0
- package/dist/shadcn/ui/progress.d.ts +5 -0
- package/dist/shadcn/ui/progress.d.ts.map +1 -0
- package/dist/shadcn/ui/radio-group.d.ts +6 -0
- package/dist/shadcn/ui/radio-group.d.ts.map +1 -0
- package/dist/shadcn/ui/resizable.d.ts +9 -0
- package/dist/shadcn/ui/resizable.d.ts.map +1 -0
- package/dist/shadcn/ui/scroll-area.d.ts +6 -0
- package/dist/shadcn/ui/scroll-area.d.ts.map +1 -0
- package/dist/shadcn/ui/select.d.ts +16 -0
- package/dist/shadcn/ui/select.d.ts.map +1 -0
- package/dist/shadcn/ui/separator.d.ts +5 -0
- package/dist/shadcn/ui/separator.d.ts.map +1 -0
- package/dist/shadcn/ui/sheet.d.ts +14 -0
- package/dist/shadcn/ui/sheet.d.ts.map +1 -0
- package/dist/shadcn/ui/sidebar.d.ts +70 -0
- package/dist/shadcn/ui/sidebar.d.ts.map +1 -0
- package/dist/shadcn/ui/skeleton.d.ts +3 -0
- package/dist/shadcn/ui/skeleton.d.ts.map +1 -0
- package/dist/shadcn/ui/slider.d.ts +5 -0
- package/dist/shadcn/ui/slider.d.ts.map +1 -0
- package/dist/shadcn/ui/sonner.d.ts +4 -0
- package/dist/shadcn/ui/sonner.d.ts.map +1 -0
- package/dist/shadcn/ui/switch.d.ts +5 -0
- package/dist/shadcn/ui/switch.d.ts.map +1 -0
- package/dist/shadcn/ui/table.d.ts +11 -0
- package/dist/shadcn/ui/table.d.ts.map +1 -0
- package/dist/shadcn/ui/tabs.d.ts +8 -0
- package/dist/shadcn/ui/tabs.d.ts.map +1 -0
- package/dist/shadcn/ui/textarea.d.ts +4 -0
- package/dist/shadcn/ui/textarea.d.ts.map +1 -0
- package/dist/shadcn/ui/toggle-group.d.ts +8 -0
- package/dist/shadcn/ui/toggle-group.d.ts.map +1 -0
- package/dist/shadcn/ui/toggle.d.ts +10 -0
- package/dist/shadcn/ui/toggle.d.ts.map +1 -0
- package/dist/shadcn/ui/tooltip.d.ts +8 -0
- package/dist/shadcn/ui/tooltip.d.ts.map +1 -0
- package/eslint.config.mjs +19 -0
- package/package.json +82 -0
- package/src/index.css +11 -0
- package/src/index.ts +0 -0
- package/src/kit/builder/data-table/components/DataTable.tsx +375 -0
- package/src/kit/builder/data-table/components/DataTableColumnHeader.tsx +63 -0
- package/src/kit/builder/data-table/components/DataTablePagination.tsx +86 -0
- package/src/kit/builder/data-table/components/DataTableViewOptions.tsx +42 -0
- package/src/kit/builder/data-table/index.ts +5 -0
- package/src/kit/builder/data-table/types.ts +29 -0
- package/src/kit/builder/data-table/utils/dotAccessor.ts +6 -0
- package/src/kit/builder/dialog/index.ts +2 -0
- package/src/kit/builder/dialog/provider.tsx +141 -0
- package/src/kit/builder/form/components/FormActions.tsx +78 -0
- package/src/kit/builder/form/components/FormBuilder.tsx +456 -0
- package/src/kit/builder/form/components/FormField.tsx +395 -0
- package/src/kit/builder/form/components/FormSection.tsx +88 -0
- package/src/kit/builder/form/components/index.ts +4 -0
- package/src/kit/builder/form/index.ts +2 -0
- package/src/kit/builder/form/utils/common-forms.ts +68 -0
- package/src/kit/builder/form/utils/dependencies.ts +56 -0
- package/src/kit/builder/form/utils/field-factories.ts +164 -0
- package/src/kit/builder/form/utils/index.ts +17 -0
- package/src/kit/builder/form/utils/section-factories.ts +35 -0
- package/src/kit/builder/form/utils/transformers.ts +100 -0
- package/src/kit/builder/form/utils/validations.ts +22 -0
- package/src/kit/builder/form/utils/validators.ts +20 -0
- package/src/kit/builder/page/Page.tsx +182 -0
- package/src/kit/builder/page/index.ts +1 -0
- package/src/kit/builder/section/SectionBuilder.tsx +213 -0
- package/src/kit/builder/section/index.ts +2 -0
- package/src/kit/builder/section/types.ts +66 -0
- package/src/kit/components/autocomplete/Autocomplete.tsx +247 -0
- package/src/kit/components/autocomplete/index.ts +2 -0
- package/src/kit/components/autocomplete/types.ts +24 -0
- package/src/kit/components/login/Login.tsx +119 -0
- package/src/kit/components/login/index.ts +1 -0
- package/src/kit/layouts/admin/components/AdminLayout.tsx +251 -0
- package/src/kit/layouts/admin/components/ThemeToggle.tsx +60 -0
- package/src/kit/layouts/admin/hooks/menu.ts +26 -0
- package/src/kit/layouts/admin/providers/AdminMenuProvider.tsx +58 -0
- package/src/kit/layouts/admin/types/index.ts +26 -0
- package/src/kit/providers/ThemeProvider.tsx +90 -0
- package/src/kit/themes/clean-slate.css +147 -0
- package/src/kit/themes/default.css +182 -0
- package/src/kit/themes/minimal-modern.css +147 -0
- package/src/kit/themes/spotify.css +147 -0
- package/src/shadcn/hooks/use-mobile.ts +19 -0
- package/src/shadcn/lib/utils.ts +6 -0
- package/src/shadcn/ui/accordion.tsx +66 -0
- package/src/shadcn/ui/alert-dialog.tsx +157 -0
- package/src/shadcn/ui/alert.tsx +66 -0
- package/src/shadcn/ui/aspect-ratio.tsx +11 -0
- package/src/shadcn/ui/avatar.tsx +53 -0
- package/src/shadcn/ui/badge.tsx +46 -0
- package/src/shadcn/ui/breadcrumb.tsx +108 -0
- package/src/shadcn/ui/button.tsx +59 -0
- package/src/shadcn/ui/calendar.tsx +213 -0
- package/src/shadcn/ui/card.tsx +92 -0
- package/src/shadcn/ui/carousel.tsx +240 -0
- package/src/shadcn/ui/chart.tsx +353 -0
- package/src/shadcn/ui/checkbox.tsx +32 -0
- package/src/shadcn/ui/collapsible.tsx +33 -0
- package/src/shadcn/ui/command.tsx +184 -0
- package/src/shadcn/ui/context-menu.tsx +252 -0
- package/src/shadcn/ui/dialog.tsx +143 -0
- package/src/shadcn/ui/drawer.tsx +135 -0
- package/src/shadcn/ui/dropdown-menu.tsx +257 -0
- package/src/shadcn/ui/form.tsx +167 -0
- package/src/shadcn/ui/hover-card.tsx +44 -0
- package/src/shadcn/ui/input-otp.tsx +77 -0
- package/src/shadcn/ui/input.tsx +21 -0
- package/src/shadcn/ui/label.tsx +24 -0
- package/src/shadcn/ui/menubar.tsx +276 -0
- package/src/shadcn/ui/navigation-menu.tsx +168 -0
- package/src/shadcn/ui/pagination.tsx +127 -0
- package/src/shadcn/ui/popover.tsx +48 -0
- package/src/shadcn/ui/progress.tsx +31 -0
- package/src/shadcn/ui/radio-group.tsx +45 -0
- package/src/shadcn/ui/resizable.tsx +56 -0
- package/src/shadcn/ui/scroll-area.tsx +58 -0
- package/src/shadcn/ui/select.tsx +185 -0
- package/src/shadcn/ui/separator.tsx +28 -0
- package/src/shadcn/ui/sheet.tsx +139 -0
- package/src/shadcn/ui/sidebar.tsx +726 -0
- package/src/shadcn/ui/skeleton.tsx +13 -0
- package/src/shadcn/ui/slider.tsx +63 -0
- package/src/shadcn/ui/sonner.tsx +25 -0
- package/src/shadcn/ui/switch.tsx +31 -0
- package/src/shadcn/ui/table.tsx +116 -0
- package/src/shadcn/ui/tabs.tsx +66 -0
- package/src/shadcn/ui/textarea.tsx +18 -0
- package/src/shadcn/ui/toggle-group.tsx +73 -0
- package/src/shadcn/ui/toggle.tsx +47 -0
- package/src/shadcn/ui/tooltip.tsx +61 -0
- package/src/stories/kit/builder/DataTable.Basic.stories.tsx +61 -0
- package/src/stories/kit/builder/DataTable.Filters.stories.tsx +76 -0
- package/src/stories/kit/builder/DataTable.Pagination.stories.tsx +72 -0
- package/src/stories/kit/builder/DataTable.SelectionAndActions.stories.tsx +63 -0
- package/src/stories/kit/builder/DataTable.Sorting.stories.tsx +56 -0
- package/src/stories/kit/builder/Dialog.stories.tsx +84 -0
- package/src/stories/kit/builder/Form.Basic.stories.tsx +45 -0
- package/src/stories/kit/builder/Form.Complex.stories.tsx +223 -0
- package/src/stories/kit/builder/Form.Dynamic.stories.tsx +214 -0
- package/src/stories/kit/builder/Form.Simple.stories.tsx +78 -0
- package/src/stories/kit/builder/Page.stories.tsx +89 -0
- package/src/stories/kit/builder/Section.stories.tsx +179 -0
- package/src/stories/kit/components/Autocomplete.stories.tsx +98 -0
- package/src/stories/kit/components/Login.stories.tsx +161 -0
- package/src/stories/kit/layouts/admin/AdminLayout.Basic.stories.tsx +93 -0
- package/src/stories/kit/layouts/admin/AdminLayout.Collapsible.stories.tsx +58 -0
- package/src/stories/kit/layouts/admin/AdminLayout.Complex.stories.tsx +166 -0
- package/src/stories/kit/layouts/admin/AdminLayout.CustomSidebarHeaderComponent.stories.tsx +64 -0
- package/src/stories/kit/layouts/admin/AdminLayout.CustomSidebarTitleAndIcon.stories.tsx +55 -0
- package/src/stories/kit/layouts/admin/AdminLayout.HeaderSlots.stories.tsx +63 -0
- package/src/stories/shadcn/ui/Accordion.stories.tsx +94 -0
- package/src/stories/shadcn/ui/Alert.stories.tsx +36 -0
- package/src/stories/shadcn/ui/AlertDialog.stories.tsx +71 -0
- package/src/stories/shadcn/ui/AspectRatio.stories.tsx +58 -0
- package/src/stories/shadcn/ui/Avatar.stories.tsx +26 -0
- package/src/stories/shadcn/ui/Badge.stories.tsx +28 -0
- package/src/stories/shadcn/ui/Breadcrumb.stories.tsx +47 -0
- package/src/stories/shadcn/ui/Button.stories.tsx +49 -0
- package/src/stories/shadcn/ui/Calendar.stories.tsx +28 -0
- package/src/stories/shadcn/ui/Card.stories.tsx +30 -0
- package/src/stories/shadcn/ui/Carousel.stories.tsx +37 -0
- package/src/stories/shadcn/ui/Chart.stories.tsx +72 -0
- package/src/stories/shadcn/ui/Checkbox.stories.tsx +56 -0
- package/src/stories/shadcn/ui/Collapsible.stories.tsx +33 -0
- package/src/stories/shadcn/ui/Command.stories.tsx +53 -0
- package/src/stories/shadcn/ui/ContextMenu.stories.tsx +59 -0
- package/src/stories/shadcn/ui/Dialog.stories.tsx +33 -0
- package/src/stories/shadcn/ui/Drawer.stories.tsx +46 -0
- package/src/stories/shadcn/ui/DropdownMenu.stories.tsx +65 -0
- package/src/stories/shadcn/ui/Form.stories.tsx +90 -0
- package/src/stories/shadcn/ui/HoverCard.stories.tsx +37 -0
- package/src/stories/shadcn/ui/Input.stories.tsx +39 -0
- package/src/stories/shadcn/ui/InputOtp.stories.tsx +32 -0
- package/src/stories/shadcn/ui/Label.stories.tsx +29 -0
- package/src/stories/shadcn/ui/Menubar.stories.tsx +73 -0
- package/src/stories/shadcn/ui/NavigationMenu.stories.tsx +53 -0
- package/src/stories/shadcn/ui/Pagination.stories.tsx +51 -0
- package/src/stories/shadcn/ui/Popover.stories.tsx +47 -0
- package/src/stories/shadcn/ui/Progress.stories.tsx +30 -0
- package/src/stories/shadcn/ui/RadioGroup.stories.tsx +31 -0
- package/src/stories/shadcn/ui/Resizable.stories.tsx +43 -0
- package/src/stories/shadcn/ui/ScrollArea.stories.tsx +32 -0
- package/src/stories/shadcn/ui/Select.stories.tsx +55 -0
- package/src/stories/shadcn/ui/Separator.stories.tsx +35 -0
- package/src/stories/shadcn/ui/Sheet.stories.tsx +47 -0
- package/src/stories/shadcn/ui/Sidebar.stories.tsx +120 -0
- package/src/stories/shadcn/ui/Skeleton.stories.tsx +23 -0
- package/src/stories/shadcn/ui/Slider.stories.tsx +21 -0
- package/src/stories/shadcn/ui/Sonner.stories.tsx +39 -0
- package/src/stories/shadcn/ui/Switch.stories.tsx +28 -0
- package/src/stories/shadcn/ui/Table.stories.tsx +315 -0
- package/src/stories/shadcn/ui/Tabs.stories.tsx +24 -0
- package/src/stories/shadcn/ui/Textarea.stories.tsx +40 -0
- package/src/stories/shadcn/ui/Toggle.stories.tsx +36 -0
- package/src/stories/shadcn/ui/ToggleGroup.stories.tsx +28 -0
- package/src/stories/shadcn/ui/Tooltip.stories.tsx +25 -0
- package/storybook-static/assets/Accordion.stories-N1auke5L.js +52 -0
- package/storybook-static/assets/AdminLayout-Cxd0-A_L.js +53 -0
- package/storybook-static/assets/AdminLayout.Basic.stories-C_I6rWuq.js +4 -0
- package/storybook-static/assets/AdminLayout.Collapsible.stories-CsU3DwTo.js +4 -0
- package/storybook-static/assets/AdminLayout.Complex.stories-BbY1Ue6d.js +29 -0
- package/storybook-static/assets/AdminLayout.CustomSidebarHeaderComponent.stories-LFVi-aIv.js +9 -0
- package/storybook-static/assets/AdminLayout.CustomSidebarTitleAndIcon.stories-BqP6UVc7.js +4 -0
- package/storybook-static/assets/AdminLayout.HeaderSlots.stories-BactzgkF.js +7 -0
- package/storybook-static/assets/Alert.stories-_FtuixdR.js +27 -0
- package/storybook-static/assets/AlertDialog.stories-6NY3BjwR.js +43 -0
- package/storybook-static/assets/AspectRatio.stories-DAT11y02.js +22 -0
- package/storybook-static/assets/Autocomplete-DngjqsCM.js +35 -0
- package/storybook-static/assets/Autocomplete.stories-BCaOrgTR.js +33 -0
- package/storybook-static/assets/Avatar.stories-DlzxSLJ-.js +12 -0
- package/storybook-static/assets/Badge.stories-DKHXsoV5.js +12 -0
- package/storybook-static/assets/Breadcrumb.stories-D8eUHpf7.js +25 -0
- package/storybook-static/assets/Button.stories-kvPdKxdw.js +26 -0
- package/storybook-static/assets/Calendar.stories-D-hUtQQI.js +3 -0
- package/storybook-static/assets/Card.stories-y8Z7NgrQ.js +15 -0
- package/storybook-static/assets/Carousel.stories-CFcHYKgp.js +15 -0
- package/storybook-static/assets/Chart.stories-BJwLNKfE.js +126 -0
- package/storybook-static/assets/Checkbox.stories-B22Fbwx1.js +12 -0
- package/storybook-static/assets/Collapsible.stories-BgcRp8Rk.js +18 -0
- package/storybook-static/assets/Combination-BT_gXe1L.js +41 -0
- package/storybook-static/assets/Command.stories-Dp4CtSQR.js +30 -0
- package/storybook-static/assets/ContextMenu.stories-DnVnIi-T.js +31 -0
- package/storybook-static/assets/DataTable.Basic.stories-DBF5VYq9.js +6 -0
- package/storybook-static/assets/DataTable.Filters.stories-CO0ipuGm.js +21 -0
- package/storybook-static/assets/DataTable.Pagination.stories-DNwCw64e.js +24 -0
- package/storybook-static/assets/DataTable.SelectionAndActions.stories-DGgdEbsf.js +26 -0
- package/storybook-static/assets/DataTable.Sorting.stories-CWpqloAB.js +6 -0
- package/storybook-static/assets/Dialog.stories-DQkYN8ht.js +18 -0
- package/storybook-static/assets/Dialog.stories-DXZINEgo.js +54 -0
- package/storybook-static/assets/Drawer.stories-DMH_vZgi.js +24 -0
- package/storybook-static/assets/DropdownMenu.stories-Dl8y-N7T.js +35 -0
- package/storybook-static/assets/Form.Basic.stories-CJugIYsx.js +45 -0
- package/storybook-static/assets/Form.Complex.stories-BPogRp6F.js +230 -0
- package/storybook-static/assets/Form.Dynamic.stories-Boway5AK.js +247 -0
- package/storybook-static/assets/Form.Simple.stories-_OXGXXpE.js +50 -0
- package/storybook-static/assets/Form.stories-BoHyR8ho.js +3 -0
- package/storybook-static/assets/FormBuilder-BGgeY8ik.js +5 -0
- package/storybook-static/assets/HoverCard.stories-1HM92M79.js +21 -0
- package/storybook-static/assets/Input.stories-sQ4EUlWt.js +16 -0
- package/storybook-static/assets/InputOtp.stories-Cpk_EmLx.js +42 -0
- package/storybook-static/assets/Label.stories-MjABHKSw.js +14 -0
- package/storybook-static/assets/Login.stories-BY4OYGk3.js +37 -0
- package/storybook-static/assets/Menubar.stories-B_60TWNE.js +44 -0
- package/storybook-static/assets/NavigationMenu.stories-DyuaBvvq.js +30 -0
- package/storybook-static/assets/Page.stories-DQKMxrPZ.js +91 -0
- package/storybook-static/assets/Pagination.stories-CBo7UrNd.js +29 -0
- package/storybook-static/assets/Popover.stories-D98_JrxN.js +15 -0
- package/storybook-static/assets/Progress.stories-Dejt5v3z.js +8 -0
- package/storybook-static/assets/RadioGroup.stories-Tz2LW6O6.js +16 -0
- package/storybook-static/assets/Resizable.stories-DhP2GKN7.js +25 -0
- package/storybook-static/assets/ScrollArea.stories-CF7-8wbM.js +12 -0
- package/storybook-static/assets/Section.stories-BpurjHIQ.js +196 -0
- package/storybook-static/assets/SectionBuilder-Bav4WrnT.js +1 -0
- package/storybook-static/assets/Select.stories-DJrU-mi0.js +17 -0
- package/storybook-static/assets/Separator.stories-BYH_o8QM.js +17 -0
- package/storybook-static/assets/Sheet.stories-BNJ7BIb-.js +24 -0
- package/storybook-static/assets/Sidebar.stories-BbjcJuOg.js +106 -0
- package/storybook-static/assets/Skeleton.stories-BQNIuIe5.js +9 -0
- package/storybook-static/assets/Slider.stories-CWOjKHKD.js +6 -0
- package/storybook-static/assets/Sonner.stories-CXSZs5yN.js +18 -0
- package/storybook-static/assets/Switch.stories-BUQjobWe.js +3 -0
- package/storybook-static/assets/Table.stories-DJcV7M9R.js +35 -0
- package/storybook-static/assets/Tabs.stories-ByeVrP18.js +10 -0
- package/storybook-static/assets/Textarea.stories-CKsDPHYc.js +17 -0
- package/storybook-static/assets/Toggle.stories-DutEzZ8k.js +3 -0
- package/storybook-static/assets/ToggleGroup.stories-C9fzJTh-.js +13 -0
- package/storybook-static/assets/Tooltip.stories-CngnJbP7.js +10 -0
- package/storybook-static/assets/accordion-bQe9Rep4.js +1 -0
- package/storybook-static/assets/alert-dialog-CypF_yaW.js +7 -0
- package/storybook-static/assets/avatar-CukM9hXu.js +1 -0
- package/storybook-static/assets/axe-W8QMjM0E.js +30 -0
- package/storybook-static/assets/button-BTWmFXop.js +1 -0
- package/storybook-static/assets/card-BJpPOzP8.js +1 -0
- package/storybook-static/assets/chart-column-Bzh5arua.js +6 -0
- package/storybook-static/assets/check-BgWXKGqi.js +6 -0
- package/storybook-static/assets/checkbox-QlugAqJY.js +1 -0
- package/storybook-static/assets/chevron-down-BqLjUn1_.js +6 -0
- package/storybook-static/assets/chevron-left-BR_0lKnE.js +6 -0
- package/storybook-static/assets/chevron-right-DpCIoMaJ.js +6 -0
- package/storybook-static/assets/circle-DVJTkDI7.js +6 -0
- package/storybook-static/assets/clean-slate-BR-XvZPt.css +1 -0
- package/storybook-static/assets/command-BERL33lL.js +6 -0
- package/storybook-static/assets/createLucideIcon-1ZwIAs_l.js +21 -0
- package/storybook-static/assets/default-M24vcGB8.css +1 -0
- package/storybook-static/assets/dependencies-ctrV69dx.js +1 -0
- package/storybook-static/assets/dialog-DM9YJ1JD.js +1 -0
- package/storybook-static/assets/dropdown-menu-TfFll7G9.js +1 -0
- package/storybook-static/assets/ellipsis-BSY8VuLI.js +6 -0
- package/storybook-static/assets/grip-vertical-Buja1rv9.js +6 -0
- package/storybook-static/assets/iframe-C9bogcIc.css +1 -0
- package/storybook-static/assets/iframe-G-6sM9Mt.js +1555 -0
- package/storybook-static/assets/index-1v1lhNFD.js +1 -0
- package/storybook-static/assets/index-7yNAGow7.js +1 -0
- package/storybook-static/assets/index-B-fXBfyD.js +1 -0
- package/storybook-static/assets/index-BDwnENHR.js +1 -0
- package/storybook-static/assets/index-BdQq_4o_.js +1 -0
- package/storybook-static/assets/index-Bq6UNRVc.js +1 -0
- package/storybook-static/assets/index-CAwQR9Pv.js +1 -0
- package/storybook-static/assets/index-CGrAONsN.js +1 -0
- package/storybook-static/assets/index-CLmN5G1a.js +1 -0
- package/storybook-static/assets/index-CMmbDm5O.js +1 -0
- package/storybook-static/assets/index-CZaD3imo.js +9 -0
- package/storybook-static/assets/index-CayhpKmv.js +1 -0
- package/storybook-static/assets/index-ClNNG_ys.js +1 -0
- package/storybook-static/assets/index-CzJf-yyP.js +5 -0
- package/storybook-static/assets/index-DNAxNqEO.js +1 -0
- package/storybook-static/assets/index-DW48STyt.js +1 -0
- package/storybook-static/assets/index-DhoByIgc.js +1 -0
- package/storybook-static/assets/index-DqWzLCH-.js +1 -0
- package/storybook-static/assets/index-DvM9azdj.js +1 -0
- package/storybook-static/assets/index-DySHPxMy.js +1 -0
- package/storybook-static/assets/index-HghBIZeg.js +1 -0
- package/storybook-static/assets/index-I343IfOC.js +1 -0
- package/storybook-static/assets/index-SxI7_jxe.js +9 -0
- package/storybook-static/assets/index-_crRFOM5.js +1 -0
- package/storybook-static/assets/index-d_S6mtzU.js +1 -0
- package/storybook-static/assets/index-ev1RjzGv.js +1 -0
- package/storybook-static/assets/index-lH-AZpAn.js +1 -0
- package/storybook-static/assets/input-11YRd9gD.js +1 -0
- package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +9 -0
- package/storybook-static/assets/label-C5vJTTwH.js +1 -0
- package/storybook-static/assets/lodash-Q9aGJGMb.js +73 -0
- package/storybook-static/assets/matchers-7Z3WT2CE-T3xScrR7.js +14 -0
- package/storybook-static/assets/minimal-modern-BmvR5wyr.css +1 -0
- package/storybook-static/assets/popover-DW1K4QCO.js +1 -0
- package/storybook-static/assets/preload-helper-Dp1pzeXC.js +1 -0
- package/storybook-static/assets/radio-group-iPL-8jvw.js +1 -0
- package/storybook-static/assets/react-18-CK1-M7n3.js +25 -0
- package/storybook-static/assets/react-icons.esm-n2MUhK0n.js +1 -0
- package/storybook-static/assets/refresh-cw-FYEbhX1i.js +6 -0
- package/storybook-static/assets/schemas-S_Tg7JYp.js +18 -0
- package/storybook-static/assets/section-factories-CC6eFfbk.js +1 -0
- package/storybook-static/assets/select-DbLzULCJ.js +6 -0
- package/storybook-static/assets/separator-DoUX1TNx.js +1 -0
- package/storybook-static/assets/settings-2-CpOcGlDm.js +6 -0
- package/storybook-static/assets/sheet-n5VQ25jh.js +1 -0
- package/storybook-static/assets/shopping-cart-9kOJ1UDd.js +11 -0
- package/storybook-static/assets/sidebar-CvUiZOJe.js +6 -0
- package/storybook-static/assets/skeleton-CjDnQs43.js +1 -0
- package/storybook-static/assets/spotify-DpbeJq1r.css +1 -0
- package/storybook-static/assets/table-CP3vMqFn.js +1 -0
- package/storybook-static/assets/textarea-Dw2vruMl.js +1 -0
- package/storybook-static/assets/toggle-B-YKWMF8.js +16 -0
- package/storybook-static/assets/tooltip-CNONbPiI.js +1 -0
- package/storybook-static/assets/trash-2-Bt5LMclM.js +11 -0
- package/storybook-static/assets/utils-D-KgF5mV.js +1 -0
- package/storybook-static/assets/x-DG9mLFAg.js +6 -0
- package/storybook-static/favicon-wrapper.svg +46 -0
- package/storybook-static/favicon.svg +1 -0
- package/storybook-static/iframe.html +687 -0
- package/storybook-static/index.d.ts +1 -0
- package/storybook-static/index.d.ts.map +1 -0
- package/storybook-static/index.html +166 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/kit/builder/data-table/components/DataTable.d.ts +34 -0
- package/storybook-static/kit/builder/data-table/components/DataTable.d.ts.map +1 -0
- package/storybook-static/kit/builder/data-table/components/DataTableColumnHeader.d.ts +8 -0
- package/storybook-static/kit/builder/data-table/components/DataTableColumnHeader.d.ts.map +1 -0
- package/storybook-static/kit/builder/data-table/components/DataTablePagination.d.ts +6 -0
- package/storybook-static/kit/builder/data-table/components/DataTablePagination.d.ts.map +1 -0
- package/storybook-static/kit/builder/data-table/components/DataTableViewOptions.d.ts +5 -0
- package/storybook-static/kit/builder/data-table/components/DataTableViewOptions.d.ts.map +1 -0
- package/storybook-static/kit/builder/data-table/index.d.ts +6 -0
- package/storybook-static/kit/builder/data-table/index.d.ts.map +1 -0
- package/storybook-static/kit/builder/data-table/types.d.ts +27 -0
- package/storybook-static/kit/builder/data-table/types.d.ts.map +1 -0
- package/storybook-static/kit/builder/data-table/utils/dotAccessor.d.ts +2 -0
- package/storybook-static/kit/builder/data-table/utils/dotAccessor.d.ts.map +1 -0
- package/storybook-static/kit/builder/dialog/index.d.ts +3 -0
- package/storybook-static/kit/builder/dialog/index.d.ts.map +1 -0
- package/storybook-static/kit/builder/dialog/provider.d.ts +26 -0
- package/storybook-static/kit/builder/dialog/provider.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/FormActions.d.ts +20 -0
- package/storybook-static/kit/builder/form/components/FormActions.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/FormBuilder.d.ts +97 -0
- package/storybook-static/kit/builder/form/components/FormBuilder.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/FormField.d.ts +12 -0
- package/storybook-static/kit/builder/form/components/FormField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/FormSection.d.ts +15 -0
- package/storybook-static/kit/builder/form/components/FormSection.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/index.d.ts +5 -0
- package/storybook-static/kit/builder/form/components/index.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/index.d.ts +3 -0
- package/storybook-static/kit/builder/form/index.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/utils/common-forms.d.ts +7 -0
- package/storybook-static/kit/builder/form/utils/common-forms.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/utils/dependencies.d.ts +41 -0
- package/storybook-static/kit/builder/form/utils/dependencies.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/utils/field-factories.d.ts +22 -0
- package/storybook-static/kit/builder/form/utils/field-factories.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/utils/index.d.ts +15 -0
- package/storybook-static/kit/builder/form/utils/index.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/utils/section-factories.d.ts +7 -0
- package/storybook-static/kit/builder/form/utils/section-factories.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/utils/transformers.d.ts +6 -0
- package/storybook-static/kit/builder/form/utils/transformers.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/utils/validations.d.ts +13 -0
- package/storybook-static/kit/builder/form/utils/validations.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/utils/validators.d.ts +8 -0
- package/storybook-static/kit/builder/form/utils/validators.d.ts.map +1 -0
- package/storybook-static/kit/builder/page/Page.d.ts +48 -0
- package/storybook-static/kit/builder/page/Page.d.ts.map +1 -0
- package/storybook-static/kit/builder/page/index.d.ts +2 -0
- package/storybook-static/kit/builder/page/index.d.ts.map +1 -0
- package/storybook-static/kit/builder/section/SectionBuilder.d.ts +3 -0
- package/storybook-static/kit/builder/section/SectionBuilder.d.ts.map +1 -0
- package/storybook-static/kit/builder/section/index.d.ts +3 -0
- package/storybook-static/kit/builder/section/index.d.ts.map +1 -0
- package/storybook-static/kit/builder/section/types.d.ts +59 -0
- package/storybook-static/kit/builder/section/types.d.ts.map +1 -0
- package/storybook-static/kit/components/autocomplete/Autocomplete.d.ts +21 -0
- package/storybook-static/kit/components/autocomplete/Autocomplete.d.ts.map +1 -0
- package/storybook-static/kit/components/autocomplete/index.d.ts +3 -0
- package/storybook-static/kit/components/autocomplete/index.d.ts.map +1 -0
- package/storybook-static/kit/components/autocomplete/types.d.ts +19 -0
- package/storybook-static/kit/components/autocomplete/types.d.ts.map +1 -0
- package/storybook-static/kit/components/login/Login.d.ts +29 -0
- package/storybook-static/kit/components/login/Login.d.ts.map +1 -0
- package/storybook-static/kit/components/login/index.d.ts +2 -0
- package/storybook-static/kit/components/login/index.d.ts.map +1 -0
- package/storybook-static/kit/layouts/admin/components/AdminLayout.d.ts +17 -0
- package/storybook-static/kit/layouts/admin/components/AdminLayout.d.ts.map +1 -0
- package/storybook-static/kit/layouts/admin/components/ThemeToggle.d.ts +5 -0
- package/storybook-static/kit/layouts/admin/components/ThemeToggle.d.ts.map +1 -0
- package/storybook-static/kit/layouts/admin/hooks/menu.d.ts +12 -0
- package/storybook-static/kit/layouts/admin/hooks/menu.d.ts.map +1 -0
- package/storybook-static/kit/layouts/admin/providers/AdminMenuProvider.d.ts +7 -0
- package/storybook-static/kit/layouts/admin/providers/AdminMenuProvider.d.ts.map +1 -0
- package/storybook-static/kit/layouts/admin/types/index.d.ts +27 -0
- package/storybook-static/kit/layouts/admin/types/index.d.ts.map +1 -0
- package/storybook-static/kit/providers/ThemeProvider.d.ts +14 -0
- package/storybook-static/kit/providers/ThemeProvider.d.ts.map +1 -0
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/sb-addons/a11y-5/manager-bundle.js +5 -0
- package/storybook-static/sb-addons/essentials-backgrounds-1/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-measure-2/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-outline-3/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/interactions-4/manager-bundle.js +57 -0
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +971 -0
- package/storybook-static/sb-addons/storysource-6/manager-bundle.js +3 -0
- package/storybook-static/sb-common-assets/favicon-wrapper.svg +46 -0
- package/storybook-static/sb-common-assets/favicon.svg +1 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-module-info.js +797 -0
- package/storybook-static/sb-manager/globals-runtime.js +69653 -0
- package/storybook-static/sb-manager/globals.js +34 -0
- package/storybook-static/sb-manager/runtime.js +13181 -0
- package/storybook-static/shadcn/hooks/use-mobile.d.ts +2 -0
- package/storybook-static/shadcn/hooks/use-mobile.d.ts.map +1 -0
- package/storybook-static/shadcn/lib/utils.d.ts +3 -0
- package/storybook-static/shadcn/lib/utils.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/accordion.d.ts +8 -0
- package/storybook-static/shadcn/ui/accordion.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/alert-dialog.d.ts +15 -0
- package/storybook-static/shadcn/ui/alert-dialog.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/alert.d.ts +10 -0
- package/storybook-static/shadcn/ui/alert.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/aspect-ratio.d.ts +4 -0
- package/storybook-static/shadcn/ui/aspect-ratio.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/avatar.d.ts +7 -0
- package/storybook-static/shadcn/ui/avatar.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/badge.d.ts +10 -0
- package/storybook-static/shadcn/ui/badge.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/breadcrumb.d.ts +12 -0
- package/storybook-static/shadcn/ui/breadcrumb.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/button.d.ts +11 -0
- package/storybook-static/shadcn/ui/button.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/calendar.d.ts +9 -0
- package/storybook-static/shadcn/ui/calendar.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/card.d.ts +10 -0
- package/storybook-static/shadcn/ui/card.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/carousel.d.ts +20 -0
- package/storybook-static/shadcn/ui/carousel.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/chart.d.ts +41 -0
- package/storybook-static/shadcn/ui/chart.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/checkbox.d.ts +5 -0
- package/storybook-static/shadcn/ui/checkbox.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/collapsible.d.ts +6 -0
- package/storybook-static/shadcn/ui/collapsible.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/command.d.ts +19 -0
- package/storybook-static/shadcn/ui/command.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/context-menu.d.ts +26 -0
- package/storybook-static/shadcn/ui/context-menu.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/dialog.d.ts +16 -0
- package/storybook-static/shadcn/ui/dialog.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/drawer.d.ts +14 -0
- package/storybook-static/shadcn/ui/drawer.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/dropdown-menu.d.ts +26 -0
- package/storybook-static/shadcn/ui/dropdown-menu.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/form.d.ts +25 -0
- package/storybook-static/shadcn/ui/form.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/hover-card.d.ts +7 -0
- package/storybook-static/shadcn/ui/hover-card.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/input-otp.d.ts +12 -0
- package/storybook-static/shadcn/ui/input-otp.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/input.d.ts +4 -0
- package/storybook-static/shadcn/ui/input.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/label.d.ts +5 -0
- package/storybook-static/shadcn/ui/label.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/menubar.d.ts +27 -0
- package/storybook-static/shadcn/ui/menubar.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/navigation-menu.d.ts +15 -0
- package/storybook-static/shadcn/ui/navigation-menu.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/pagination.d.ts +14 -0
- package/storybook-static/shadcn/ui/pagination.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/popover.d.ts +8 -0
- package/storybook-static/shadcn/ui/popover.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/progress.d.ts +5 -0
- package/storybook-static/shadcn/ui/progress.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/radio-group.d.ts +6 -0
- package/storybook-static/shadcn/ui/radio-group.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/resizable.d.ts +9 -0
- package/storybook-static/shadcn/ui/resizable.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/scroll-area.d.ts +6 -0
- package/storybook-static/shadcn/ui/scroll-area.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/select.d.ts +16 -0
- package/storybook-static/shadcn/ui/select.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/separator.d.ts +5 -0
- package/storybook-static/shadcn/ui/separator.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/sheet.d.ts +14 -0
- package/storybook-static/shadcn/ui/sheet.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/sidebar.d.ts +70 -0
- package/storybook-static/shadcn/ui/sidebar.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/skeleton.d.ts +3 -0
- package/storybook-static/shadcn/ui/skeleton.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/slider.d.ts +5 -0
- package/storybook-static/shadcn/ui/slider.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/sonner.d.ts +4 -0
- package/storybook-static/shadcn/ui/sonner.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/switch.d.ts +5 -0
- package/storybook-static/shadcn/ui/switch.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/table.d.ts +11 -0
- package/storybook-static/shadcn/ui/table.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/tabs.d.ts +8 -0
- package/storybook-static/shadcn/ui/tabs.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/textarea.d.ts +4 -0
- package/storybook-static/shadcn/ui/textarea.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/toggle-group.d.ts +8 -0
- package/storybook-static/shadcn/ui/toggle-group.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/toggle.d.ts +10 -0
- package/storybook-static/shadcn/ui/toggle.d.ts.map +1 -0
- package/storybook-static/shadcn/ui/tooltip.d.ts +8 -0
- package/storybook-static/shadcn/ui/tooltip.d.ts.map +1 -0
- package/storybook-static/vite-inject-mocker-entry.js +18 -0
- package/tsconfig.json +24 -0
- package/tsconfig.lib.json +52 -0
- package/tsconfig.spec.json +38 -0
- package/vite.config.ts +63 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { FormBuilder } from '../../../kit/builder/form/components/FormBuilder';
|
|
3
|
+
import { createSection, createField, createDependency, conditions } from '../../../kit/builder/form/utils';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof FormBuilder> = {
|
|
6
|
+
title: 'Kit/Builder/Form',
|
|
7
|
+
component: FormBuilder,
|
|
8
|
+
parameters: {
|
|
9
|
+
controls: { expanded: true },
|
|
10
|
+
backgrounds: { disable: true },
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
type Story = StoryObj<typeof FormBuilder>;
|
|
17
|
+
|
|
18
|
+
export const DynamicExample: Story = {
|
|
19
|
+
name: 'Dynamic example',
|
|
20
|
+
render: () => {
|
|
21
|
+
const handleSubmit = (data: unknown) => {
|
|
22
|
+
console.log('Dynamic form submitted:', data);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const handleFieldChange = (name: string, value: unknown) => {
|
|
26
|
+
console.log(`Field ${name} changed to:`, value);
|
|
27
|
+
if (name === 'productType' && value === 'subscription') {
|
|
28
|
+
console.log('Subscription product selected - additional fields will appear');
|
|
29
|
+
}
|
|
30
|
+
if (name === 'hasDiscount' && value === true) {
|
|
31
|
+
console.log('Discount enabled - discount fields will appear');
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const sections = [
|
|
36
|
+
createSection.card('Product Configuration', [
|
|
37
|
+
createField.select(
|
|
38
|
+
'productType',
|
|
39
|
+
'Product Type',
|
|
40
|
+
[
|
|
41
|
+
{ label: 'One-time Purchase', value: 'onetime' },
|
|
42
|
+
{ label: 'Subscription', value: 'subscription' },
|
|
43
|
+
{ label: 'Bundle', value: 'bundle' },
|
|
44
|
+
{ label: 'Digital Download', value: 'digital' },
|
|
45
|
+
],
|
|
46
|
+
{ required: true, placeholder: 'Select product type' },
|
|
47
|
+
),
|
|
48
|
+
createField.text('productName', 'Product Name', { required: true, placeholder: 'Enter product name' }),
|
|
49
|
+
createField.number('basePrice', 'Base Price ($)', { required: true, placeholder: '29.99' }),
|
|
50
|
+
createField.select(
|
|
51
|
+
'billingCycle',
|
|
52
|
+
'Billing Cycle',
|
|
53
|
+
[
|
|
54
|
+
{ label: 'Monthly', value: 'monthly' },
|
|
55
|
+
{ label: 'Quarterly', value: 'quarterly' },
|
|
56
|
+
{ label: 'Yearly', value: 'yearly' },
|
|
57
|
+
],
|
|
58
|
+
{
|
|
59
|
+
required: true,
|
|
60
|
+
placeholder: 'Select billing cycle',
|
|
61
|
+
dependencies: [createDependency.showWhen('productType', conditions.equals('subscription'))],
|
|
62
|
+
},
|
|
63
|
+
),
|
|
64
|
+
createField.number('trialDays', 'Free Trial Days', {
|
|
65
|
+
placeholder: '14',
|
|
66
|
+
defaultValue: 0,
|
|
67
|
+
dependencies: [createDependency.showWhen('productType', conditions.equals('subscription'))],
|
|
68
|
+
}),
|
|
69
|
+
createField.array(
|
|
70
|
+
'bundleItems',
|
|
71
|
+
'Bundle Items',
|
|
72
|
+
[
|
|
73
|
+
createField.text('itemName', 'Item Name', { required: true, placeholder: 'Item name' }),
|
|
74
|
+
createField.number('itemPrice', 'Item Price ($)', { required: true, placeholder: '9.99' }),
|
|
75
|
+
createField.number('quantity', 'Quantity', { required: true, defaultValue: 1, placeholder: '1' }),
|
|
76
|
+
],
|
|
77
|
+
{
|
|
78
|
+
gridCols: 2,
|
|
79
|
+
defaultValue: [{ itemName: '', itemPrice: 0, quantity: 1 }],
|
|
80
|
+
dependencies: [createDependency.showWhen('productType', conditions.equals('bundle'))],
|
|
81
|
+
},
|
|
82
|
+
),
|
|
83
|
+
createField.select(
|
|
84
|
+
'fileFormat',
|
|
85
|
+
'File Format',
|
|
86
|
+
[
|
|
87
|
+
{ label: 'PDF', value: 'pdf' },
|
|
88
|
+
{ label: 'ZIP Archive', value: 'zip' },
|
|
89
|
+
{ label: 'Video (MP4)', value: 'mp4' },
|
|
90
|
+
{ label: 'Audio (MP3)', value: 'mp3' },
|
|
91
|
+
{ label: 'Software Installer', value: 'exe' },
|
|
92
|
+
],
|
|
93
|
+
{ required: true, placeholder: 'Select file format', dependencies: [createDependency.showWhen('productType', conditions.equals('digital'))] },
|
|
94
|
+
),
|
|
95
|
+
createField.number('fileSizeMB', 'File Size (MB)', { placeholder: '50', dependencies: [createDependency.showWhen('productType', conditions.equals('digital'))] }),
|
|
96
|
+
]),
|
|
97
|
+
|
|
98
|
+
createSection.card('Pricing & Discounts', [
|
|
99
|
+
createField.checkbox('hasDiscount', 'Apply Discount', { defaultValue: false, gridCols: 2 }),
|
|
100
|
+
createField.select(
|
|
101
|
+
'discountType',
|
|
102
|
+
'Discount Type',
|
|
103
|
+
[
|
|
104
|
+
{ label: 'Percentage', value: 'percentage' },
|
|
105
|
+
{ label: 'Fixed Amount', value: 'fixed' },
|
|
106
|
+
{ label: 'Buy One Get One', value: 'bogo' },
|
|
107
|
+
],
|
|
108
|
+
{ required: true, placeholder: 'Select discount type', dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue())] },
|
|
109
|
+
),
|
|
110
|
+
createField.number('discountValue', 'Discount Value', {
|
|
111
|
+
required: true,
|
|
112
|
+
placeholder: '10',
|
|
113
|
+
dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue()), createDependency.showWhen('discountType', value => value !== 'bogo')],
|
|
114
|
+
}),
|
|
115
|
+
createField.date('discountStartDate', 'Discount Start Date', { dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue())] }),
|
|
116
|
+
createField.date('discountEndDate', 'Discount End Date', { dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue())] }),
|
|
117
|
+
createField.number('minimumQuantity', 'Minimum Quantity for Discount', { placeholder: '2', defaultValue: 1, dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue())] }),
|
|
118
|
+
]),
|
|
119
|
+
|
|
120
|
+
createSection.card('Shipping Configuration', [
|
|
121
|
+
createField.checkbox('requiresShipping', 'Requires Physical Shipping', {
|
|
122
|
+
defaultValue: true,
|
|
123
|
+
gridCols: 2,
|
|
124
|
+
dependencies: [
|
|
125
|
+
createDependency.setValueWhen('productType', conditions.equals('digital'), false),
|
|
126
|
+
createDependency.disableWhen('productType', conditions.equals('digital')),
|
|
127
|
+
],
|
|
128
|
+
}),
|
|
129
|
+
createField.number('weight', 'Weight (lbs)', { placeholder: '1.5', dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue())] }),
|
|
130
|
+
createField.object(
|
|
131
|
+
'dimensions',
|
|
132
|
+
'Dimensions (inches)',
|
|
133
|
+
[
|
|
134
|
+
createField.number('length', 'Length', { required: true, placeholder: '10' }),
|
|
135
|
+
createField.number('width', 'Width', { required: true, placeholder: '8' }),
|
|
136
|
+
createField.number('height', 'Height', { required: true, placeholder: '2' }),
|
|
137
|
+
],
|
|
138
|
+
{ dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue())] },
|
|
139
|
+
),
|
|
140
|
+
createField.select(
|
|
141
|
+
'shippingClass',
|
|
142
|
+
'Shipping Class',
|
|
143
|
+
[
|
|
144
|
+
{ label: 'Standard', value: 'standard' },
|
|
145
|
+
{ label: 'Express', value: 'express' },
|
|
146
|
+
{ label: 'Overnight', value: 'overnight' },
|
|
147
|
+
{ label: 'Fragile', value: 'fragile' },
|
|
148
|
+
{ label: 'Hazardous', value: 'hazardous' },
|
|
149
|
+
],
|
|
150
|
+
{ required: true, defaultValue: 'standard', placeholder: 'Select shipping class', dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue())] },
|
|
151
|
+
),
|
|
152
|
+
createField.checkbox('freeShipping', 'Offer Free Shipping', { defaultValue: false, dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue())] }),
|
|
153
|
+
createField.number('freeShippingThreshold', 'Free Shipping Threshold ($)', { placeholder: '50', dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue()), createDependency.showWhen('freeShipping', conditions.isTrue())] }),
|
|
154
|
+
]),
|
|
155
|
+
|
|
156
|
+
createSection.card('Inventory Management', [
|
|
157
|
+
createField.checkbox('trackInventory', 'Track Inventory', {
|
|
158
|
+
defaultValue: true,
|
|
159
|
+
gridCols: 2,
|
|
160
|
+
dependencies: [createDependency.setValueWhen('productType', conditions.equals('digital'), false)],
|
|
161
|
+
}),
|
|
162
|
+
createField.number('stockQuantity', 'Stock Quantity', { required: true, placeholder: '100', dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())] }),
|
|
163
|
+
createField.number('lowStockThreshold', 'Low Stock Alert Threshold', { placeholder: '10', dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())] }),
|
|
164
|
+
createField.checkbox('allowBackorders', 'Allow Backorders', { defaultValue: false, dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())] }),
|
|
165
|
+
createField.text('sku', 'SKU (Stock Keeping Unit)', { placeholder: 'PROD-001', dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())] }),
|
|
166
|
+
createField.text('barcode', 'Barcode', { placeholder: '123456789012', dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())] }),
|
|
167
|
+
]),
|
|
168
|
+
|
|
169
|
+
createSection.card('Marketing & SEO', [
|
|
170
|
+
createField.text('metaTitle', 'Meta Title', { placeholder: 'SEO-friendly title', gridCols: 2 }),
|
|
171
|
+
createField.textarea('metaDescription', 'Meta Description', { placeholder: 'SEO-friendly description (150-160 characters)', gridCols: 2 }),
|
|
172
|
+
createField.array('tags', 'Product Tags', [createField.text('tag', 'Tag', { required: true, placeholder: 'e.g., electronics, gadgets' })], { gridCols: 2, defaultValue: [{ tag: '' }] }),
|
|
173
|
+
createField.checkbox('featured', 'Featured Product', { defaultValue: false }),
|
|
174
|
+
createField.checkbox('newProduct', 'Mark as New', { defaultValue: false }),
|
|
175
|
+
createField.select(
|
|
176
|
+
'visibility',
|
|
177
|
+
'Product Visibility',
|
|
178
|
+
[
|
|
179
|
+
{ label: 'Public', value: 'public' },
|
|
180
|
+
{ label: 'Private', value: 'private' },
|
|
181
|
+
{ label: 'Password Protected', value: 'password' },
|
|
182
|
+
{ label: 'Coming Soon', value: 'coming_soon' },
|
|
183
|
+
],
|
|
184
|
+
{ required: true, defaultValue: 'public', placeholder: 'Select visibility' },
|
|
185
|
+
),
|
|
186
|
+
createField.text('password', 'Access Password', { placeholder: 'Enter password', dependencies: [createDependency.showWhen('visibility', conditions.equals('password'))] }),
|
|
187
|
+
createField.date('launchDate', 'Launch Date', { dependencies: [createDependency.showWhen('visibility', conditions.equals('coming_soon'))] }),
|
|
188
|
+
]),
|
|
189
|
+
];
|
|
190
|
+
|
|
191
|
+
return (
|
|
192
|
+
<div className="max-w-6xl mx-auto p-6">
|
|
193
|
+
<div className="mb-8">
|
|
194
|
+
<h1 className="text-3xl font-bold text-gray-900">Dynamic Product Configuration</h1>
|
|
195
|
+
<p className="text-gray-600 mt-2">
|
|
196
|
+
This form demonstrates advanced field dependencies and real-time interactions. Watch how fields appear, disappear, and change based on your selections.
|
|
197
|
+
</p>
|
|
198
|
+
<div className="mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg">
|
|
199
|
+
<h3 className="font-semibold text-blue-900">Try these interactions:</h3>
|
|
200
|
+
<ul className="mt-2 text-sm text-blue-800 space-y-1">
|
|
201
|
+
<li>• Change Product Type to see different field sets</li>
|
|
202
|
+
<li>• Enable "Apply Discount" to reveal discount configuration</li>
|
|
203
|
+
<li>• Toggle "Requires Physical Shipping" for shipping options</li>
|
|
204
|
+
<li>• Select "Digital Download" to auto-disable shipping</li>
|
|
205
|
+
<li>• Choose "Password Protected" visibility for password field</li>
|
|
206
|
+
</ul>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
<FormBuilder sections={sections} onSubmit={handleSubmit} onFieldChange={handleFieldChange} submitLabel="Save Product Configuration" resetLabel="Reset All" className="space-y-8" />
|
|
211
|
+
</div>
|
|
212
|
+
);
|
|
213
|
+
},
|
|
214
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { FormBuilder } from '../../../kit/builder/form/components/FormBuilder';
|
|
3
|
+
import { createSection, createField, commonValidations } from '../../../kit/builder/form/utils';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof FormBuilder> = {
|
|
6
|
+
title: 'Kit/Builder/Form',
|
|
7
|
+
component: FormBuilder,
|
|
8
|
+
parameters: {
|
|
9
|
+
controls: { expanded: true },
|
|
10
|
+
backgrounds: { disable: true },
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
type Story = StoryObj<typeof FormBuilder>;
|
|
17
|
+
|
|
18
|
+
export const SimpleExample: Story = {
|
|
19
|
+
name: 'Simple example',
|
|
20
|
+
render: () => {
|
|
21
|
+
const handleSubmit = (data: unknown) => {
|
|
22
|
+
console.log('Form submitted:', data);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const sections = [
|
|
26
|
+
createSection.card('Contact Information', [
|
|
27
|
+
createField.text('name', 'Full Name', {
|
|
28
|
+
required: true,
|
|
29
|
+
placeholder: 'Enter your full name',
|
|
30
|
+
}),
|
|
31
|
+
createField.email('email', 'Email Address', {
|
|
32
|
+
required: true,
|
|
33
|
+
placeholder: 'Enter your email address',
|
|
34
|
+
}),
|
|
35
|
+
createField.text('phone', 'Phone Number', {
|
|
36
|
+
validation: commonValidations.phone,
|
|
37
|
+
placeholder: '+1 (555) 123-4567',
|
|
38
|
+
}),
|
|
39
|
+
createField.select(
|
|
40
|
+
'subject',
|
|
41
|
+
'Subject',
|
|
42
|
+
[
|
|
43
|
+
{ label: 'General Inquiry', value: 'general' },
|
|
44
|
+
{ label: 'Technical Support', value: 'support' },
|
|
45
|
+
{ label: 'Sales Question', value: 'sales' },
|
|
46
|
+
{ label: 'Partnership', value: 'partnership' },
|
|
47
|
+
],
|
|
48
|
+
{
|
|
49
|
+
required: true,
|
|
50
|
+
placeholder: 'Select a subject',
|
|
51
|
+
},
|
|
52
|
+
),
|
|
53
|
+
createField.textarea('message', 'Message', {
|
|
54
|
+
required: true,
|
|
55
|
+
placeholder: 'Enter your message here...',
|
|
56
|
+
gridCols: 2,
|
|
57
|
+
}),
|
|
58
|
+
createField.checkbox('subscribe', 'Subscribe to newsletter', {
|
|
59
|
+
defaultValue: false,
|
|
60
|
+
gridCols: 2,
|
|
61
|
+
}),
|
|
62
|
+
]),
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<div className="max-w-2xl mx-auto p-6">
|
|
67
|
+
<div className="mb-6">
|
|
68
|
+
<h1 className="text-2xl font-bold text-gray-900">Contact Us</h1>
|
|
69
|
+
<p className="text-gray-600 mt-2">
|
|
70
|
+
Fill out the form below and we'll get back to you as soon as possible.
|
|
71
|
+
</p>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<FormBuilder sections={sections} onSubmit={handleSubmit} className="space-y-6" />
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
},
|
|
78
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Page, type PageAction } from '../../../kit/builder/page';
|
|
3
|
+
import { Button } from '../../../shadcn/ui/button';
|
|
4
|
+
import { Plus, Download, MoreHorizontal, RefreshCw, Trash2 } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Page> = {
|
|
7
|
+
title: 'kit/Builder/Page',
|
|
8
|
+
component: Page,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default meta;
|
|
12
|
+
|
|
13
|
+
type Story = StoryObj<typeof Page>;
|
|
14
|
+
|
|
15
|
+
export const Basic: Story = {
|
|
16
|
+
name: 'Basic',
|
|
17
|
+
render: () => (
|
|
18
|
+
<Page title="Orders" subtitle="Manage and review customer orders" containerWidth="lg">
|
|
19
|
+
<div className="rounded-md border bg-card p-6 text-sm text-muted-foreground">
|
|
20
|
+
Page content goes here.
|
|
21
|
+
</div>
|
|
22
|
+
</Page>
|
|
23
|
+
),
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const WithActions: Story = {
|
|
27
|
+
name: 'With actions',
|
|
28
|
+
render: () => {
|
|
29
|
+
const actions: PageAction[] = [
|
|
30
|
+
{
|
|
31
|
+
type: 'button',
|
|
32
|
+
label: 'New Order',
|
|
33
|
+
variant: 'default',
|
|
34
|
+
leftIcon: <Plus className="h-4 w-4" />,
|
|
35
|
+
onClick: () => console.log('new'),
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: 'button',
|
|
39
|
+
label: 'Export',
|
|
40
|
+
variant: 'outline',
|
|
41
|
+
leftIcon: <Download className="h-4 w-4" />,
|
|
42
|
+
onClick: () => console.log('export'),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: 'dropdown',
|
|
46
|
+
trigger: {
|
|
47
|
+
label: 'More',
|
|
48
|
+
variant: 'ghost',
|
|
49
|
+
leftIcon: <MoreHorizontal className="h-4 w-4" />,
|
|
50
|
+
},
|
|
51
|
+
items: [
|
|
52
|
+
{ label: 'Refresh', leftIcon: <RefreshCw className="h-4 w-4" />, onSelect: () => console.log('refresh') },
|
|
53
|
+
{ type: 'separator' },
|
|
54
|
+
{ label: 'Delete selected', leftIcon: <Trash2 className="h-4 w-4" />, destructive: true, onSelect: () => console.log('delete') },
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<Page title="Orders" subtitle="Manage and review customer orders" actions={actions} containerWidth="xl">
|
|
61
|
+
<div className="rounded-md border bg-card p-6 text-sm text-muted-foreground">
|
|
62
|
+
Content with actions.
|
|
63
|
+
</div>
|
|
64
|
+
</Page>
|
|
65
|
+
);
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const WithFooter: Story = {
|
|
70
|
+
name: 'With footer',
|
|
71
|
+
render: () => (
|
|
72
|
+
<Page
|
|
73
|
+
title="Settings"
|
|
74
|
+
subtitle="Configure your workspace"
|
|
75
|
+
containerWidth="md"
|
|
76
|
+
footerLeft={<span className="text-xs">Last updated 2 hours ago</span>}
|
|
77
|
+
footerRight={
|
|
78
|
+
<div className="flex gap-2">
|
|
79
|
+
<Button variant="outline" onClick={() => console.log('cancel')}>Cancel</Button>
|
|
80
|
+
<Button onClick={() => console.log('save')}>Save changes</Button>
|
|
81
|
+
</div>
|
|
82
|
+
}
|
|
83
|
+
>
|
|
84
|
+
<div className="rounded-md border bg-card p-6 text-sm text-muted-foreground">
|
|
85
|
+
Settings content here.
|
|
86
|
+
</div>
|
|
87
|
+
</Page>
|
|
88
|
+
),
|
|
89
|
+
};
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import SectionBuilder from '../../../kit/builder/section/SectionBuilder';
|
|
3
|
+
import type { SectionLeaf, SectionNode } from '../../../kit/builder/section/types';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof SectionBuilder> = {
|
|
6
|
+
title: 'Kit/Builder/Section',
|
|
7
|
+
component: SectionBuilder,
|
|
8
|
+
parameters: {
|
|
9
|
+
controls: { expanded: true },
|
|
10
|
+
backgrounds: { disable: true },
|
|
11
|
+
},
|
|
12
|
+
render: (args) => <SectionBuilder {...args} />,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
|
|
17
|
+
type Story = StoryObj<typeof SectionBuilder>;
|
|
18
|
+
|
|
19
|
+
function demoBox(text: string, className?: string) {
|
|
20
|
+
return (
|
|
21
|
+
<div className={['rounded border p-3 text-sm', className].filter(Boolean).join(' ')}>
|
|
22
|
+
{text}
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const gridLeaves: SectionLeaf[] = [
|
|
28
|
+
{ key: 'a', content: demoBox('A'), span: { md: 6 } },
|
|
29
|
+
{ key: 'b', content: demoBox('B'), span: { md: 6 } },
|
|
30
|
+
{ key: 'c', content: demoBox('C'), span: { md: 4 } },
|
|
31
|
+
{ key: 'd', content: demoBox('D'), span: { md: 4 } },
|
|
32
|
+
{ key: 'e', content: demoBox('E'), span: { md: 4 } },
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
export const GridLayout: Story = {
|
|
36
|
+
name: 'Grid layout',
|
|
37
|
+
args: {
|
|
38
|
+
sections: [
|
|
39
|
+
{
|
|
40
|
+
id: 'grid-1',
|
|
41
|
+
title: 'Grid (responsive spans)',
|
|
42
|
+
subtitle: 'Uses md column spans 6/6 then 4/4/4',
|
|
43
|
+
variant: 'card',
|
|
44
|
+
layout: 'grid',
|
|
45
|
+
grid: { cols: 1, mdCols: 12, gap: 'gap-4' },
|
|
46
|
+
children: gridLeaves,
|
|
47
|
+
},
|
|
48
|
+
] satisfies SectionNode[],
|
|
49
|
+
},
|
|
50
|
+
render: (args) => <SectionBuilder {...args} />,
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const WithLabels: Story = {
|
|
54
|
+
name: 'Leaves with labels',
|
|
55
|
+
args: {
|
|
56
|
+
sections: [
|
|
57
|
+
{
|
|
58
|
+
id: 'labels-1',
|
|
59
|
+
title: 'Label layouts',
|
|
60
|
+
variant: 'card',
|
|
61
|
+
layout: 'grid',
|
|
62
|
+
grid: { cols: 1, mdCols: 12 },
|
|
63
|
+
children: [
|
|
64
|
+
{
|
|
65
|
+
key: 'l1',
|
|
66
|
+
label: 'Inline label',
|
|
67
|
+
labelLayout: 'inline',
|
|
68
|
+
inlineLabelWidthClass: 'w-40',
|
|
69
|
+
content: demoBox('Value content inline'),
|
|
70
|
+
span: { md: 12 },
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
key: 'l2',
|
|
74
|
+
label: 'Stacked label',
|
|
75
|
+
labelLayout: 'stacked',
|
|
76
|
+
description: 'Optional description appears under value',
|
|
77
|
+
content: demoBox('Value content stacked'),
|
|
78
|
+
span: { md: 6 },
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
key: 'l3',
|
|
82
|
+
label: 'No description',
|
|
83
|
+
labelLayout: 'stacked',
|
|
84
|
+
content: demoBox('Another value'),
|
|
85
|
+
span: { md: 6 },
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
] satisfies SectionNode[],
|
|
90
|
+
},
|
|
91
|
+
render: (args) => <SectionBuilder {...args} />,
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const FlexLayout: Story = {
|
|
95
|
+
name: 'Flex layout',
|
|
96
|
+
args: {
|
|
97
|
+
sections: [
|
|
98
|
+
{
|
|
99
|
+
id: 'flex-1',
|
|
100
|
+
title: 'Horizontal flex with wrap',
|
|
101
|
+
variant: 'card',
|
|
102
|
+
layout: 'flex',
|
|
103
|
+
flex: { direction: 'row', wrap: true, gap: 'gap-3', align: 'start', justify: 'start' },
|
|
104
|
+
children: [
|
|
105
|
+
{ key: 'f1', content: demoBox('Item 1'), className: 'w-56' },
|
|
106
|
+
{ key: 'f2', content: demoBox('Item 2'), className: 'w-56' },
|
|
107
|
+
{ key: 'f3', content: demoBox('Item 3'), className: 'w-56' },
|
|
108
|
+
{ key: 'f4', content: demoBox('Item 4'), className: 'w-56' },
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
] satisfies SectionNode[],
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const NestedSections: Story = {
|
|
116
|
+
name: 'Nested sections',
|
|
117
|
+
args: {
|
|
118
|
+
sections: [
|
|
119
|
+
{
|
|
120
|
+
id: 'outer',
|
|
121
|
+
title: 'Outer section',
|
|
122
|
+
variant: 'card',
|
|
123
|
+
layout: 'grid',
|
|
124
|
+
grid: { cols: 1, mdCols: 12 },
|
|
125
|
+
children: [
|
|
126
|
+
{
|
|
127
|
+
id: 'inner-1',
|
|
128
|
+
title: 'Inner A',
|
|
129
|
+
variant: 'separator',
|
|
130
|
+
layout: 'grid',
|
|
131
|
+
grid: { cols: 1, mdCols: 12 },
|
|
132
|
+
children: [
|
|
133
|
+
{ key: 'ia', content: demoBox('Inner A1'), span: { md: 6 } },
|
|
134
|
+
{ key: 'ib', content: demoBox('Inner A2'), span: { md: 6 } },
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: 'inner-2',
|
|
139
|
+
title: 'Inner B',
|
|
140
|
+
variant: 'plain',
|
|
141
|
+
layout: 'grid',
|
|
142
|
+
grid: { cols: 1, mdCols: 12 },
|
|
143
|
+
children: [
|
|
144
|
+
{ key: 'ic', content: demoBox('Inner B1'), span: { md: 4 } },
|
|
145
|
+
{ key: 'id', content: demoBox('Inner B2'), span: { md: 4 } },
|
|
146
|
+
{ key: 'ie', content: demoBox('Inner B3'), span: { md: 4 } },
|
|
147
|
+
],
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
} as unknown as SectionNode,
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
render: (args) => <SectionBuilder {...args} />,
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export const CustomLeafRenderer: Story = {
|
|
157
|
+
name: 'Custom leaf renderer',
|
|
158
|
+
args: {
|
|
159
|
+
sections: [
|
|
160
|
+
{
|
|
161
|
+
id: 'custom-1',
|
|
162
|
+
title: 'Custom renderer',
|
|
163
|
+
layout: 'grid',
|
|
164
|
+
grid: { cols: 1, mdCols: 12 },
|
|
165
|
+
children: [
|
|
166
|
+
{ key: 'x', label: 'Name', labelLayout: 'inline', content: 'Jane Doe', span: { md: 6 } },
|
|
167
|
+
{ key: 'y', label: 'Email', labelLayout: 'inline', content: 'jane@example.com', span: { md: 6 } },
|
|
168
|
+
],
|
|
169
|
+
},
|
|
170
|
+
] satisfies SectionNode[],
|
|
171
|
+
renderLeaf: (leaf) => (
|
|
172
|
+
<div className="rounded border p-3">
|
|
173
|
+
<div className="text-[10px] uppercase tracking-wide text-muted-foreground">{leaf.label ?? 'Field'}</div>
|
|
174
|
+
<div className="text-sm">{leaf.content}</div>
|
|
175
|
+
</div>
|
|
176
|
+
),
|
|
177
|
+
},
|
|
178
|
+
render: (args) => <SectionBuilder {...args} />,
|
|
179
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Autocomplete, type AutocompleteProps } from '../../../kit/components/autocomplete/Autocomplete';
|
|
3
|
+
import type { AutocompleteOption, AutocompleteFetchResult } from '../../../kit/components/autocomplete/types';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof Autocomplete> = {
|
|
6
|
+
title: 'Kit/Components/Autocomplete',
|
|
7
|
+
component: Autocomplete,
|
|
8
|
+
parameters: {
|
|
9
|
+
controls: { expanded: true },
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
mode: {
|
|
13
|
+
control: 'select',
|
|
14
|
+
options: ['client', 'server'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default meta;
|
|
20
|
+
|
|
21
|
+
type Story = StoryObj<typeof Autocomplete>;
|
|
22
|
+
|
|
23
|
+
// Client-side options
|
|
24
|
+
const CITY_OPTIONS: AutocompleteOption[] = [
|
|
25
|
+
{ label: 'New York', value: 'nyc' },
|
|
26
|
+
{ label: 'San Francisco', value: 'sf' },
|
|
27
|
+
{ label: 'Los Angeles', value: 'la' },
|
|
28
|
+
{ label: 'Seattle', value: 'sea' },
|
|
29
|
+
{ label: 'Austin', value: 'aus' },
|
|
30
|
+
{ label: 'Chicago', value: 'chi' },
|
|
31
|
+
{ label: 'Miami', value: 'mia' },
|
|
32
|
+
{ label: 'Boston', value: 'bos' },
|
|
33
|
+
{ label: 'Denver', value: 'den' },
|
|
34
|
+
{ label: 'Portland', value: 'pdx' },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
export const ClientMode: Story = {
|
|
38
|
+
name: 'Client mode',
|
|
39
|
+
args: {
|
|
40
|
+
mode: 'client',
|
|
41
|
+
options: CITY_OPTIONS,
|
|
42
|
+
placeholder: 'Select a city...',
|
|
43
|
+
searchPlaceholder: 'Search cities...',
|
|
44
|
+
pageSize: 5,
|
|
45
|
+
defaultOpen: false,
|
|
46
|
+
} satisfies Partial<AutocompleteProps>,
|
|
47
|
+
render: (args) => <Autocomplete {...args} />,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// Mock server fetcher
|
|
51
|
+
function makeServerFetcher(all: AutocompleteOption[], minLatency = 350) {
|
|
52
|
+
return async ({ search, page, pageSize }: {
|
|
53
|
+
search: string;
|
|
54
|
+
page?: number;
|
|
55
|
+
pageSize: number;
|
|
56
|
+
}): Promise<AutocompleteFetchResult> => {
|
|
57
|
+
const q = (search || '').toLowerCase();
|
|
58
|
+
const resolvedPage = page ?? 1;
|
|
59
|
+
const filtered = q ? all.filter(o => o.label.toLowerCase().includes(q)) : all;
|
|
60
|
+
const start = (resolvedPage - 1) * pageSize;
|
|
61
|
+
const slice = filtered.slice(start, start + pageSize);
|
|
62
|
+
const hasMore = start + pageSize < filtered.length;
|
|
63
|
+
await new Promise(r => setTimeout(r, minLatency));
|
|
64
|
+
return { items: slice, hasMore, nextCursor: null };
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const MANY_OPTIONS: AutocompleteOption[] = Array.from({ length: 100 }).map((_, i) => ({
|
|
69
|
+
label: `Option ${i + 1}`,
|
|
70
|
+
value: i + 1,
|
|
71
|
+
}));
|
|
72
|
+
|
|
73
|
+
export const ServerMode: Story = {
|
|
74
|
+
name: 'Server mode (infinite scroll)',
|
|
75
|
+
args: {
|
|
76
|
+
mode: 'server',
|
|
77
|
+
fetcher: makeServerFetcher(MANY_OPTIONS),
|
|
78
|
+
placeholder: 'Pick an option...',
|
|
79
|
+
searchPlaceholder: 'Search options...',
|
|
80
|
+
pageSize: 10,
|
|
81
|
+
} satisfies Partial<AutocompleteProps>,
|
|
82
|
+
render: (args) => <Autocomplete {...args} />,
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const CustomRender: Story = {
|
|
86
|
+
name: 'Custom option rendering',
|
|
87
|
+
args: {
|
|
88
|
+
mode: 'client',
|
|
89
|
+
options: CITY_OPTIONS,
|
|
90
|
+
renderOption: (option, selected) => (
|
|
91
|
+
<div className="flex items-center gap-2">
|
|
92
|
+
<span className="inline-block h-2 w-2 rounded-full bg-primary" />
|
|
93
|
+
<span className={selected ? 'font-medium' : undefined}>{option.label}</span>
|
|
94
|
+
</div>
|
|
95
|
+
),
|
|
96
|
+
} satisfies Partial<AutocompleteProps>,
|
|
97
|
+
render: (args) => <Autocomplete {...args} />,
|
|
98
|
+
};
|