@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,213 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import {
|
|
5
|
+
ChevronDownIcon,
|
|
6
|
+
ChevronLeftIcon,
|
|
7
|
+
ChevronRightIcon,
|
|
8
|
+
} from "lucide-react"
|
|
9
|
+
import { DayButton, DayPicker, getDefaultClassNames } from "react-day-picker"
|
|
10
|
+
|
|
11
|
+
import { cn } from "../../shadcn/lib/utils"
|
|
12
|
+
import { Button, buttonVariants } from "../../shadcn/ui/button"
|
|
13
|
+
|
|
14
|
+
function Calendar({
|
|
15
|
+
className,
|
|
16
|
+
classNames,
|
|
17
|
+
showOutsideDays = true,
|
|
18
|
+
captionLayout = "label",
|
|
19
|
+
buttonVariant = "ghost",
|
|
20
|
+
formatters,
|
|
21
|
+
components,
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<typeof DayPicker> & {
|
|
24
|
+
buttonVariant?: React.ComponentProps<typeof Button>["variant"]
|
|
25
|
+
}) {
|
|
26
|
+
const defaultClassNames = getDefaultClassNames()
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<DayPicker
|
|
30
|
+
showOutsideDays={showOutsideDays}
|
|
31
|
+
className={cn(
|
|
32
|
+
"bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
33
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
34
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
35
|
+
className
|
|
36
|
+
)}
|
|
37
|
+
captionLayout={captionLayout}
|
|
38
|
+
formatters={{
|
|
39
|
+
formatMonthDropdown: (date) =>
|
|
40
|
+
date.toLocaleString("default", { month: "short" }),
|
|
41
|
+
...formatters,
|
|
42
|
+
}}
|
|
43
|
+
classNames={{
|
|
44
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
45
|
+
months: cn(
|
|
46
|
+
"flex gap-4 flex-col md:flex-row relative",
|
|
47
|
+
defaultClassNames.months
|
|
48
|
+
),
|
|
49
|
+
month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
|
|
50
|
+
nav: cn(
|
|
51
|
+
"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
|
|
52
|
+
defaultClassNames.nav
|
|
53
|
+
),
|
|
54
|
+
button_previous: cn(
|
|
55
|
+
buttonVariants({ variant: buttonVariant }),
|
|
56
|
+
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
57
|
+
defaultClassNames.button_previous
|
|
58
|
+
),
|
|
59
|
+
button_next: cn(
|
|
60
|
+
buttonVariants({ variant: buttonVariant }),
|
|
61
|
+
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
62
|
+
defaultClassNames.button_next
|
|
63
|
+
),
|
|
64
|
+
month_caption: cn(
|
|
65
|
+
"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
|
|
66
|
+
defaultClassNames.month_caption
|
|
67
|
+
),
|
|
68
|
+
dropdowns: cn(
|
|
69
|
+
"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
|
|
70
|
+
defaultClassNames.dropdowns
|
|
71
|
+
),
|
|
72
|
+
dropdown_root: cn(
|
|
73
|
+
"relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
|
|
74
|
+
defaultClassNames.dropdown_root
|
|
75
|
+
),
|
|
76
|
+
dropdown: cn(
|
|
77
|
+
"absolute bg-popover inset-0 opacity-0",
|
|
78
|
+
defaultClassNames.dropdown
|
|
79
|
+
),
|
|
80
|
+
caption_label: cn(
|
|
81
|
+
"select-none font-medium",
|
|
82
|
+
captionLayout === "label"
|
|
83
|
+
? "text-sm"
|
|
84
|
+
: "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
|
|
85
|
+
defaultClassNames.caption_label
|
|
86
|
+
),
|
|
87
|
+
table: "w-full border-collapse",
|
|
88
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
89
|
+
weekday: cn(
|
|
90
|
+
"text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
|
|
91
|
+
defaultClassNames.weekday
|
|
92
|
+
),
|
|
93
|
+
week: cn("flex w-full mt-2", defaultClassNames.week),
|
|
94
|
+
week_number_header: cn(
|
|
95
|
+
"select-none w-(--cell-size)",
|
|
96
|
+
defaultClassNames.week_number_header
|
|
97
|
+
),
|
|
98
|
+
week_number: cn(
|
|
99
|
+
"text-[0.8rem] select-none text-muted-foreground",
|
|
100
|
+
defaultClassNames.week_number
|
|
101
|
+
),
|
|
102
|
+
day: cn(
|
|
103
|
+
"relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
|
|
104
|
+
defaultClassNames.day
|
|
105
|
+
),
|
|
106
|
+
range_start: cn(
|
|
107
|
+
"rounded-l-md bg-accent",
|
|
108
|
+
defaultClassNames.range_start
|
|
109
|
+
),
|
|
110
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
111
|
+
range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
112
|
+
today: cn(
|
|
113
|
+
"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
|
|
114
|
+
defaultClassNames.today
|
|
115
|
+
),
|
|
116
|
+
outside: cn(
|
|
117
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
118
|
+
defaultClassNames.outside
|
|
119
|
+
),
|
|
120
|
+
disabled: cn(
|
|
121
|
+
"text-muted-foreground opacity-50",
|
|
122
|
+
defaultClassNames.disabled
|
|
123
|
+
),
|
|
124
|
+
hidden: cn("invisible", defaultClassNames.hidden),
|
|
125
|
+
...classNames,
|
|
126
|
+
}}
|
|
127
|
+
components={{
|
|
128
|
+
Root: ({ className, rootRef, ...props }) => {
|
|
129
|
+
return (
|
|
130
|
+
<div
|
|
131
|
+
data-slot="calendar"
|
|
132
|
+
ref={rootRef}
|
|
133
|
+
className={cn(className)}
|
|
134
|
+
{...props}
|
|
135
|
+
/>
|
|
136
|
+
)
|
|
137
|
+
},
|
|
138
|
+
Chevron: ({ className, orientation, ...props }) => {
|
|
139
|
+
if (orientation === "left") {
|
|
140
|
+
return (
|
|
141
|
+
<ChevronLeftIcon className={cn("size-4", className)} {...props} />
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (orientation === "right") {
|
|
146
|
+
return (
|
|
147
|
+
<ChevronRightIcon
|
|
148
|
+
className={cn("size-4", className)}
|
|
149
|
+
{...props}
|
|
150
|
+
/>
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return (
|
|
155
|
+
<ChevronDownIcon className={cn("size-4", className)} {...props} />
|
|
156
|
+
)
|
|
157
|
+
},
|
|
158
|
+
DayButton: CalendarDayButton,
|
|
159
|
+
WeekNumber: ({ children, ...props }) => {
|
|
160
|
+
return (
|
|
161
|
+
<td {...props}>
|
|
162
|
+
<div className="flex size-(--cell-size) items-center justify-center text-center">
|
|
163
|
+
{children}
|
|
164
|
+
</div>
|
|
165
|
+
</td>
|
|
166
|
+
)
|
|
167
|
+
},
|
|
168
|
+
...components,
|
|
169
|
+
}}
|
|
170
|
+
{...props}
|
|
171
|
+
/>
|
|
172
|
+
)
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function CalendarDayButton({
|
|
176
|
+
className,
|
|
177
|
+
day,
|
|
178
|
+
modifiers,
|
|
179
|
+
...props
|
|
180
|
+
}: React.ComponentProps<typeof DayButton>) {
|
|
181
|
+
const defaultClassNames = getDefaultClassNames()
|
|
182
|
+
|
|
183
|
+
const ref = React.useRef<HTMLButtonElement>(null)
|
|
184
|
+
React.useEffect(() => {
|
|
185
|
+
if (modifiers.focused) ref.current?.focus()
|
|
186
|
+
}, [modifiers.focused])
|
|
187
|
+
|
|
188
|
+
return (
|
|
189
|
+
<Button
|
|
190
|
+
ref={ref}
|
|
191
|
+
variant="ghost"
|
|
192
|
+
size="icon"
|
|
193
|
+
data-day={day.date.toLocaleDateString()}
|
|
194
|
+
data-selected-single={
|
|
195
|
+
modifiers.selected &&
|
|
196
|
+
!modifiers.range_start &&
|
|
197
|
+
!modifiers.range_end &&
|
|
198
|
+
!modifiers.range_middle
|
|
199
|
+
}
|
|
200
|
+
data-range-start={modifiers.range_start}
|
|
201
|
+
data-range-end={modifiers.range_end}
|
|
202
|
+
data-range-middle={modifiers.range_middle}
|
|
203
|
+
className={cn(
|
|
204
|
+
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
|
|
205
|
+
defaultClassNames.day,
|
|
206
|
+
className
|
|
207
|
+
)}
|
|
208
|
+
{...props}
|
|
209
|
+
/>
|
|
210
|
+
)
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export { Calendar, CalendarDayButton }
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../shadcn/lib/utils"
|
|
4
|
+
|
|
5
|
+
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
6
|
+
return (
|
|
7
|
+
<div
|
|
8
|
+
data-slot="card"
|
|
9
|
+
className={cn(
|
|
10
|
+
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
11
|
+
className
|
|
12
|
+
)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
19
|
+
return (
|
|
20
|
+
<div
|
|
21
|
+
data-slot="card-header"
|
|
22
|
+
className={cn(
|
|
23
|
+
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
24
|
+
className
|
|
25
|
+
)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
32
|
+
return (
|
|
33
|
+
<div
|
|
34
|
+
data-slot="card-title"
|
|
35
|
+
className={cn("leading-none font-semibold", className)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
42
|
+
return (
|
|
43
|
+
<div
|
|
44
|
+
data-slot="card-description"
|
|
45
|
+
className={cn("text-muted-foreground text-sm", className)}
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
52
|
+
return (
|
|
53
|
+
<div
|
|
54
|
+
data-slot="card-action"
|
|
55
|
+
className={cn(
|
|
56
|
+
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
57
|
+
className
|
|
58
|
+
)}
|
|
59
|
+
{...props}
|
|
60
|
+
/>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
65
|
+
return (
|
|
66
|
+
<div
|
|
67
|
+
data-slot="card-content"
|
|
68
|
+
className={cn("px-6", className)}
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
75
|
+
return (
|
|
76
|
+
<div
|
|
77
|
+
data-slot="card-footer"
|
|
78
|
+
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
|
|
79
|
+
{...props}
|
|
80
|
+
/>
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export {
|
|
85
|
+
Card,
|
|
86
|
+
CardHeader,
|
|
87
|
+
CardFooter,
|
|
88
|
+
CardTitle,
|
|
89
|
+
CardAction,
|
|
90
|
+
CardDescription,
|
|
91
|
+
CardContent,
|
|
92
|
+
}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import useEmblaCarousel, {
|
|
5
|
+
type UseEmblaCarouselType,
|
|
6
|
+
} from "embla-carousel-react"
|
|
7
|
+
import { cn } from "../../shadcn/lib/utils"
|
|
8
|
+
import { Button } from "../../shadcn/ui/button"
|
|
9
|
+
import { ArrowLeftIcon, ArrowRightIcon } from "@radix-ui/react-icons"
|
|
10
|
+
|
|
11
|
+
type CarouselApi = UseEmblaCarouselType[1]
|
|
12
|
+
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>
|
|
13
|
+
type CarouselOptions = UseCarouselParameters[0]
|
|
14
|
+
type CarouselPlugin = UseCarouselParameters[1]
|
|
15
|
+
|
|
16
|
+
type CarouselProps = {
|
|
17
|
+
opts?: CarouselOptions
|
|
18
|
+
plugins?: CarouselPlugin
|
|
19
|
+
orientation?: "horizontal" | "vertical"
|
|
20
|
+
setApi?: (api: CarouselApi) => void
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type CarouselContextProps = {
|
|
24
|
+
carouselRef: ReturnType<typeof useEmblaCarousel>[0]
|
|
25
|
+
api: ReturnType<typeof useEmblaCarousel>[1]
|
|
26
|
+
scrollPrev: () => void
|
|
27
|
+
scrollNext: () => void
|
|
28
|
+
canScrollPrev: boolean
|
|
29
|
+
canScrollNext: boolean
|
|
30
|
+
} & CarouselProps
|
|
31
|
+
|
|
32
|
+
const CarouselContext = React.createContext<CarouselContextProps | null>(null)
|
|
33
|
+
|
|
34
|
+
function useCarousel() {
|
|
35
|
+
const context = React.useContext(CarouselContext)
|
|
36
|
+
|
|
37
|
+
if (!context) {
|
|
38
|
+
throw new Error("useCarousel must be used within a <Carousel />")
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return context
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function Carousel({
|
|
45
|
+
orientation = "horizontal",
|
|
46
|
+
opts,
|
|
47
|
+
setApi,
|
|
48
|
+
plugins,
|
|
49
|
+
className,
|
|
50
|
+
children,
|
|
51
|
+
...props
|
|
52
|
+
}: React.ComponentProps<"div"> & CarouselProps) {
|
|
53
|
+
const [carouselRef, api] = useEmblaCarousel(
|
|
54
|
+
{
|
|
55
|
+
...opts,
|
|
56
|
+
axis: orientation === "horizontal" ? "x" : "y",
|
|
57
|
+
},
|
|
58
|
+
plugins
|
|
59
|
+
)
|
|
60
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false)
|
|
61
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false)
|
|
62
|
+
|
|
63
|
+
const onSelect = React.useCallback((api: CarouselApi) => {
|
|
64
|
+
if (!api) return
|
|
65
|
+
setCanScrollPrev(api.canScrollPrev())
|
|
66
|
+
setCanScrollNext(api.canScrollNext())
|
|
67
|
+
}, [])
|
|
68
|
+
|
|
69
|
+
const scrollPrev = React.useCallback(() => {
|
|
70
|
+
api?.scrollPrev()
|
|
71
|
+
}, [api])
|
|
72
|
+
|
|
73
|
+
const scrollNext = React.useCallback(() => {
|
|
74
|
+
api?.scrollNext()
|
|
75
|
+
}, [api])
|
|
76
|
+
|
|
77
|
+
const handleKeyDown = React.useCallback(
|
|
78
|
+
(event: React.KeyboardEvent<HTMLDivElement>) => {
|
|
79
|
+
if (event.key === "ArrowLeft") {
|
|
80
|
+
event.preventDefault()
|
|
81
|
+
scrollPrev()
|
|
82
|
+
} else if (event.key === "ArrowRight") {
|
|
83
|
+
event.preventDefault()
|
|
84
|
+
scrollNext()
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
[scrollPrev, scrollNext]
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
React.useEffect(() => {
|
|
91
|
+
if (!api || !setApi) return
|
|
92
|
+
setApi(api)
|
|
93
|
+
}, [api, setApi])
|
|
94
|
+
|
|
95
|
+
React.useEffect(() => {
|
|
96
|
+
if (!api) return
|
|
97
|
+
onSelect(api)
|
|
98
|
+
api.on("reInit", onSelect)
|
|
99
|
+
api.on("select", onSelect)
|
|
100
|
+
|
|
101
|
+
return () => {
|
|
102
|
+
api?.off("select", onSelect)
|
|
103
|
+
}
|
|
104
|
+
}, [api, onSelect])
|
|
105
|
+
|
|
106
|
+
return (
|
|
107
|
+
<CarouselContext.Provider
|
|
108
|
+
value={{
|
|
109
|
+
carouselRef,
|
|
110
|
+
api: api,
|
|
111
|
+
opts,
|
|
112
|
+
orientation:
|
|
113
|
+
orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
114
|
+
scrollPrev,
|
|
115
|
+
scrollNext,
|
|
116
|
+
canScrollPrev,
|
|
117
|
+
canScrollNext,
|
|
118
|
+
}}
|
|
119
|
+
>
|
|
120
|
+
<div
|
|
121
|
+
onKeyDownCapture={handleKeyDown}
|
|
122
|
+
className={cn("relative", className)}
|
|
123
|
+
role="region"
|
|
124
|
+
aria-roledescription="carousel"
|
|
125
|
+
data-slot="carousel"
|
|
126
|
+
{...props}
|
|
127
|
+
>
|
|
128
|
+
{children}
|
|
129
|
+
</div>
|
|
130
|
+
</CarouselContext.Provider>
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function CarouselContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
135
|
+
const { carouselRef, orientation } = useCarousel()
|
|
136
|
+
|
|
137
|
+
return (
|
|
138
|
+
<div
|
|
139
|
+
ref={carouselRef}
|
|
140
|
+
className="overflow-hidden"
|
|
141
|
+
data-slot="carousel-content"
|
|
142
|
+
>
|
|
143
|
+
<div
|
|
144
|
+
className={cn(
|
|
145
|
+
"flex",
|
|
146
|
+
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
147
|
+
className
|
|
148
|
+
)}
|
|
149
|
+
{...props}
|
|
150
|
+
/>
|
|
151
|
+
</div>
|
|
152
|
+
)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function CarouselItem({ className, ...props }: React.ComponentProps<"div">) {
|
|
156
|
+
const { orientation } = useCarousel()
|
|
157
|
+
|
|
158
|
+
return (
|
|
159
|
+
<div
|
|
160
|
+
role="group"
|
|
161
|
+
aria-roledescription="slide"
|
|
162
|
+
data-slot="carousel-item"
|
|
163
|
+
className={cn(
|
|
164
|
+
"min-w-0 shrink-0 grow-0 basis-full",
|
|
165
|
+
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
166
|
+
className
|
|
167
|
+
)}
|
|
168
|
+
{...props}
|
|
169
|
+
/>
|
|
170
|
+
)
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function CarouselPrevious({
|
|
174
|
+
className,
|
|
175
|
+
variant = "outline",
|
|
176
|
+
size = "icon",
|
|
177
|
+
...props
|
|
178
|
+
}: React.ComponentProps<typeof Button>) {
|
|
179
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel()
|
|
180
|
+
|
|
181
|
+
return (
|
|
182
|
+
<Button
|
|
183
|
+
data-slot="carousel-previous"
|
|
184
|
+
variant={variant}
|
|
185
|
+
size={size}
|
|
186
|
+
className={cn(
|
|
187
|
+
"absolute size-8 rounded-full",
|
|
188
|
+
orientation === "horizontal"
|
|
189
|
+
? "top-1/2 -left-12 -translate-y-1/2"
|
|
190
|
+
: "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
191
|
+
className
|
|
192
|
+
)}
|
|
193
|
+
disabled={!canScrollPrev}
|
|
194
|
+
onClick={scrollPrev}
|
|
195
|
+
{...props}
|
|
196
|
+
>
|
|
197
|
+
<ArrowLeftIcon />
|
|
198
|
+
<span className="sr-only">Previous slide</span>
|
|
199
|
+
</Button>
|
|
200
|
+
)
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function CarouselNext({
|
|
204
|
+
className,
|
|
205
|
+
variant = "outline",
|
|
206
|
+
size = "icon",
|
|
207
|
+
...props
|
|
208
|
+
}: React.ComponentProps<typeof Button>) {
|
|
209
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel()
|
|
210
|
+
|
|
211
|
+
return (
|
|
212
|
+
<Button
|
|
213
|
+
data-slot="carousel-next"
|
|
214
|
+
variant={variant}
|
|
215
|
+
size={size}
|
|
216
|
+
className={cn(
|
|
217
|
+
"absolute size-8 rounded-full",
|
|
218
|
+
orientation === "horizontal"
|
|
219
|
+
? "top-1/2 -right-12 -translate-y-1/2"
|
|
220
|
+
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
221
|
+
className
|
|
222
|
+
)}
|
|
223
|
+
disabled={!canScrollNext}
|
|
224
|
+
onClick={scrollNext}
|
|
225
|
+
{...props}
|
|
226
|
+
>
|
|
227
|
+
<ArrowRightIcon />
|
|
228
|
+
<span className="sr-only">Next slide</span>
|
|
229
|
+
</Button>
|
|
230
|
+
)
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export {
|
|
234
|
+
type CarouselApi,
|
|
235
|
+
Carousel,
|
|
236
|
+
CarouselContent,
|
|
237
|
+
CarouselItem,
|
|
238
|
+
CarouselPrevious,
|
|
239
|
+
CarouselNext,
|
|
240
|
+
}
|