@k3-universe/react-kit 0.0.28 → 0.0.30
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/.storybook/main.ts +1 -1
- package/.storybook/preview.ts +18 -10
- package/biome.json +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3794 -1426
- package/dist/kit/builder/auth/components/Can.d.ts +13 -0
- package/dist/kit/builder/auth/components/Can.d.ts.map +1 -0
- package/dist/kit/builder/auth/components/RequireAuth.d.ts +45 -0
- package/dist/kit/builder/auth/components/RequireAuth.d.ts.map +1 -0
- package/dist/kit/builder/auth/components/ShowWhenAuthenticated.d.ts +8 -0
- package/dist/kit/builder/auth/components/ShowWhenAuthenticated.d.ts.map +1 -0
- package/dist/kit/builder/auth/components/ShowWhenError.d.ts +8 -0
- package/dist/kit/builder/auth/components/ShowWhenError.d.ts.map +1 -0
- package/dist/kit/builder/auth/components/ShowWhenLoading.d.ts +8 -0
- package/dist/kit/builder/auth/components/ShowWhenLoading.d.ts.map +1 -0
- package/dist/kit/builder/auth/components/ShowWhenUnauthenticated.d.ts +8 -0
- package/dist/kit/builder/auth/components/ShowWhenUnauthenticated.d.ts.map +1 -0
- package/dist/kit/builder/auth/components/withPermission.d.ts +7 -0
- package/dist/kit/builder/auth/components/withPermission.d.ts.map +1 -0
- package/dist/kit/builder/auth/hooks/action-hooks.d.ts +18 -0
- package/dist/kit/builder/auth/hooks/action-hooks.d.ts.map +1 -0
- package/dist/kit/builder/auth/hooks/core-hooks.d.ts +56 -0
- package/dist/kit/builder/auth/hooks/core-hooks.d.ts.map +1 -0
- package/dist/kit/builder/auth/hooks/index.d.ts +5 -0
- package/dist/kit/builder/auth/hooks/index.d.ts.map +1 -0
- package/dist/kit/builder/auth/hooks/permission-hooks.d.ts +18 -0
- package/dist/kit/builder/auth/hooks/permission-hooks.d.ts.map +1 -0
- package/dist/kit/builder/auth/hooks/token-hooks.d.ts +13 -0
- package/dist/kit/builder/auth/hooks/token-hooks.d.ts.map +1 -0
- package/dist/kit/builder/auth/index.d.ts +17 -0
- package/dist/kit/builder/auth/index.d.ts.map +1 -0
- package/dist/kit/builder/auth/providers/AuthProvider.d.ts +36 -0
- package/dist/kit/builder/auth/providers/AuthProvider.d.ts.map +1 -0
- package/dist/kit/builder/auth/types/adapter-config.d.ts +31 -0
- package/dist/kit/builder/auth/types/adapter-config.d.ts.map +1 -0
- package/dist/kit/builder/auth/types/adapter.d.ts +80 -0
- package/dist/kit/builder/auth/types/adapter.d.ts.map +1 -0
- package/dist/kit/builder/auth/types/core.d.ts +16 -0
- package/dist/kit/builder/auth/types/core.d.ts.map +1 -0
- package/dist/kit/builder/auth/types/index.d.ts +10 -0
- package/dist/kit/builder/auth/types/index.d.ts.map +1 -0
- package/dist/kit/builder/auth/types/middleware.d.ts +11 -0
- package/dist/kit/builder/auth/types/middleware.d.ts.map +1 -0
- package/dist/kit/builder/auth/types/permissions.d.ts +17 -0
- package/dist/kit/builder/auth/types/permissions.d.ts.map +1 -0
- package/dist/kit/builder/auth/types/state.d.ts +13 -0
- package/dist/kit/builder/auth/types/state.d.ts.map +1 -0
- package/dist/kit/builder/auth/types/storage.d.ts +20 -0
- package/dist/kit/builder/auth/types/storage.d.ts.map +1 -0
- package/dist/kit/builder/auth/types/token-manager.d.ts +7 -0
- package/dist/kit/builder/auth/types/token-manager.d.ts.map +1 -0
- package/dist/kit/builder/auth/types/utils.d.ts +7 -0
- package/dist/kit/builder/auth/types/utils.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/auth-adapter.d.ts +14 -0
- package/dist/kit/builder/auth/utils/auth-adapter.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/client-adapters/apollo-link.d.ts +4 -0
- package/dist/kit/builder/auth/utils/client-adapters/apollo-link.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/client-adapters/axios.d.ts +6 -0
- package/dist/kit/builder/auth/utils/client-adapters/axios.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/client-adapters/fetch.d.ts +6 -0
- package/dist/kit/builder/auth/utils/client-adapters/fetch.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/client-adapters/graphql.d.ts +9 -0
- package/dist/kit/builder/auth/utils/client-adapters/graphql.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/client-adapters/index.d.ts +7 -0
- package/dist/kit/builder/auth/utils/client-adapters/index.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/client-adapters/rest.d.ts +9 -0
- package/dist/kit/builder/auth/utils/client-adapters/rest.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/client-adapters/urql-exchange.d.ts +14 -0
- package/dist/kit/builder/auth/utils/client-adapters/urql-exchange.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/permission-checker.d.ts +31 -0
- package/dist/kit/builder/auth/utils/permission-checker.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/storage/browser.d.ts +11 -0
- package/dist/kit/builder/auth/utils/storage/browser.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/storage/cookie.d.ts +3 -0
- package/dist/kit/builder/auth/utils/storage/cookie.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/storage/encryption.d.ts +7 -0
- package/dist/kit/builder/auth/utils/storage/encryption.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/storage/env.d.ts +2 -0
- package/dist/kit/builder/auth/utils/storage/env.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/storage/factory.d.ts +6 -0
- package/dist/kit/builder/auth/utils/storage/factory.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/storage/index.d.ts +7 -0
- package/dist/kit/builder/auth/utils/storage/index.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/storage/memory.d.ts +3 -0
- package/dist/kit/builder/auth/utils/storage/memory.d.ts.map +1 -0
- package/dist/kit/builder/auth/utils/token-manager.d.ts +9 -0
- package/dist/kit/builder/auth/utils/token-manager.d.ts.map +1 -0
- package/dist/kit/builder/data-table/components/DataTable.d.ts.map +1 -1
- package/dist/kit/builder/data-table/components/DataTableColumnHeader.d.ts +2 -2
- package/dist/kit/builder/data-table/components/DataTableColumnHeader.d.ts.map +1 -1
- package/dist/kit/builder/data-table/components/DataTablePagination.d.ts +1 -1
- package/dist/kit/builder/data-table/components/DataTablePagination.d.ts.map +1 -1
- package/dist/kit/builder/data-table/components/DataTableViewOptions.d.ts +1 -1
- package/dist/kit/builder/data-table/components/DataTableViewOptions.d.ts.map +1 -1
- package/dist/kit/builder/data-table/types.d.ts.map +1 -1
- package/dist/kit/builder/dialog/index.d.ts +1 -1
- package/dist/kit/builder/dialog/index.d.ts.map +1 -1
- package/dist/kit/builder/dialog/provider.d.ts +0 -1
- package/dist/kit/builder/dialog/provider.d.ts.map +1 -1
- package/dist/kit/builder/form/components/FormBuilder.d.ts.map +1 -1
- package/dist/kit/builder/form/components/FormBuilderActions.d.ts.map +1 -1
- package/dist/kit/builder/form/components/FormBuilderContext.d.ts.map +1 -1
- package/dist/kit/builder/form/components/FormBuilderField.d.ts +1 -1
- package/dist/kit/builder/form/components/FormBuilderField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/ArrayField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/ArrayField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/AutocompleteField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/AutocompleteField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/CheckboxField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/CheckboxField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/DateField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/DateField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/DatePickerField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/DatePickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/DateRangePickerField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/DateRangePickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/DateTimePickerField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/DateTimePickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/DateTimeRangePickerField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/DateTimeRangePickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/FileField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/FileField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/MonthPickerField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/MonthPickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/MonthRangePickerField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/MonthRangePickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/NumberField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/NumberField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/ObjectField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/RadioField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/RadioField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/SelectField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/SelectField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/SwitchField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/SwitchField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/TextField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/TextField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/TextareaField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/TextareaField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/TimePickerField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/TimePickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/TimeRangePickerField.d.ts +1 -1
- package/dist/kit/builder/form/components/fields/TimeRangePickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/index.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/types.d.ts.map +1 -1
- package/dist/kit/builder/form/components/sectionNodes.d.ts.map +1 -1
- package/dist/kit/builder/form/hooks/useFormBuilder.d.ts.map +1 -1
- package/dist/kit/builder/form/types.d.ts.map +1 -1
- package/dist/kit/builder/form/utils/section-factories.d.ts.map +1 -1
- package/dist/kit/builder/page/Page.d.ts.map +1 -1
- package/dist/kit/builder/page/index.d.ts.map +1 -1
- package/dist/kit/builder/section/SectionBuilder.d.ts +1 -1
- package/dist/kit/builder/section/SectionBuilder.d.ts.map +1 -1
- package/dist/kit/builder/section/SectionContainer.d.ts +14 -0
- package/dist/kit/builder/section/SectionContainer.d.ts.map +1 -0
- package/dist/kit/builder/stack-dialog/context.d.ts.map +1 -1
- package/dist/kit/builder/stack-dialog/hooks.d.ts.map +1 -1
- package/dist/kit/builder/stack-dialog/index.d.ts +3 -3
- package/dist/kit/builder/stack-dialog/index.d.ts.map +1 -1
- package/dist/kit/builder/stack-dialog/provider.d.ts.map +1 -1
- package/dist/kit/builder/stack-dialog/renderer.d.ts.map +1 -1
- package/dist/kit/builder/stack-dialog/types.d.ts +1 -1
- package/dist/kit/builder/stack-dialog/types.d.ts.map +1 -1
- package/dist/kit/components/autocomplete/Autocomplete.d.ts +1 -1
- package/dist/kit/components/autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/kit/components/autocomplete/types.d.ts.map +1 -1
- package/dist/kit/components/datepicker/DatePicker.d.ts.map +1 -1
- package/dist/kit/components/datepicker/DateRangePicker.d.ts.map +1 -1
- package/dist/kit/components/datetimepicker/DateTimePicker.d.ts.map +1 -1
- package/dist/kit/components/datetimepicker/DateTimeRangePicker.d.ts.map +1 -1
- package/dist/kit/components/datetimepicker/index.d.ts.map +1 -1
- package/dist/kit/components/fileuploader/FileUploader.d.ts.map +1 -1
- package/dist/kit/components/fileuploader/types.d.ts +2 -2
- package/dist/kit/components/forminfo/FormInfoError.d.ts.map +1 -1
- package/dist/kit/components/login/Login.d.ts +1 -1
- package/dist/kit/components/login/Login.d.ts.map +1 -1
- package/dist/kit/components/monthpicker/MonthInput.d.ts.map +1 -1
- package/dist/kit/components/monthpicker/MonthPicker.d.ts.map +1 -1
- package/dist/kit/components/monthpicker/MonthRangeInput.d.ts.map +1 -1
- package/dist/kit/components/monthpicker/MonthRangePicker.d.ts.map +1 -1
- package/dist/kit/components/timepicker/TimePicker.d.ts.map +1 -1
- package/dist/kit/components/timepicker/TimeRangePicker.d.ts.map +1 -1
- package/dist/kit/components/timepicker/index.d.ts.map +1 -1
- package/dist/kit/layouts/admin/components/AdminLayout.d.ts +2 -1
- package/dist/kit/layouts/admin/components/AdminLayout.d.ts.map +1 -1
- package/dist/kit/layouts/admin/components/ThemeToggle.d.ts.map +1 -1
- package/dist/kit/layouts/admin/hooks/menu.d.ts.map +1 -1
- package/dist/kit/layouts/admin/providers/AdminMenuProvider.d.ts +1 -1
- package/dist/kit/layouts/admin/providers/AdminMenuProvider.d.ts.map +1 -1
- package/dist/kit/themes/base.css +1 -1
- package/dist/kit/themes/clean-slate.css +5 -5
- package/dist/kit/themes/default.css +5 -5
- package/dist/kit/themes/minimal-modern.css +5 -5
- package/dist/kit/themes/spotify.css +5 -5
- package/dist/shadcn/hooks/use-mobile.d.ts.map +1 -1
- package/dist/shadcn/ui/accordion.d.ts +2 -2
- package/dist/shadcn/ui/accordion.d.ts.map +1 -1
- package/dist/shadcn/ui/alert-dialog.d.ts +4 -4
- package/dist/shadcn/ui/alert-dialog.d.ts.map +1 -1
- package/dist/shadcn/ui/alert.d.ts +4 -4
- package/dist/shadcn/ui/alert.d.ts.map +1 -1
- package/dist/shadcn/ui/aspect-ratio.d.ts +1 -1
- package/dist/shadcn/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/shadcn/ui/avatar.d.ts +2 -2
- package/dist/shadcn/ui/avatar.d.ts.map +1 -1
- package/dist/shadcn/ui/badge.d.ts +2 -2
- package/dist/shadcn/ui/badge.d.ts.map +1 -1
- package/dist/shadcn/ui/breadcrumb.d.ts +8 -8
- package/dist/shadcn/ui/breadcrumb.d.ts.map +1 -1
- package/dist/shadcn/ui/button.d.ts +2 -2
- package/dist/shadcn/ui/button.d.ts.map +1 -1
- package/dist/shadcn/ui/calendar.d.ts +2 -2
- package/dist/shadcn/ui/calendar.d.ts.map +1 -1
- package/dist/shadcn/ui/card.d.ts +8 -8
- package/dist/shadcn/ui/card.d.ts.map +1 -1
- package/dist/shadcn/ui/carousel.d.ts +5 -5
- package/dist/shadcn/ui/carousel.d.ts.map +1 -1
- package/dist/shadcn/ui/chart.d.ts +7 -7
- package/dist/shadcn/ui/chart.d.ts.map +1 -1
- package/dist/shadcn/ui/checkbox.d.ts +2 -2
- package/dist/shadcn/ui/checkbox.d.ts.map +1 -1
- package/dist/shadcn/ui/collapsible.d.ts +1 -1
- package/dist/shadcn/ui/collapsible.d.ts.map +1 -1
- package/dist/shadcn/ui/command.d.ts +2 -2
- package/dist/shadcn/ui/command.d.ts.map +1 -1
- package/dist/shadcn/ui/context-menu.d.ts +4 -4
- package/dist/shadcn/ui/context-menu.d.ts.map +1 -1
- package/dist/shadcn/ui/dialog.d.ts +4 -4
- package/dist/shadcn/ui/dialog.d.ts.map +1 -1
- package/dist/shadcn/ui/drawer.d.ts +3 -3
- package/dist/shadcn/ui/drawer.d.ts.map +1 -1
- package/dist/shadcn/ui/dropdown-menu.d.ts +4 -4
- package/dist/shadcn/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/shadcn/ui/form.d.ts +5 -5
- package/dist/shadcn/ui/form.d.ts.map +1 -1
- package/dist/shadcn/ui/hover-card.d.ts +2 -2
- package/dist/shadcn/ui/hover-card.d.ts.map +1 -1
- package/dist/shadcn/ui/input-otp.d.ts +4 -4
- package/dist/shadcn/ui/input-otp.d.ts.map +1 -1
- package/dist/shadcn/ui/input.d.ts +2 -2
- package/dist/shadcn/ui/input.d.ts.map +1 -1
- package/dist/shadcn/ui/label.d.ts +2 -2
- package/dist/shadcn/ui/label.d.ts.map +1 -1
- package/dist/shadcn/ui/menubar.d.ts +4 -4
- package/dist/shadcn/ui/menubar.d.ts.map +1 -1
- package/dist/shadcn/ui/navigation-menu.d.ts +2 -2
- package/dist/shadcn/ui/navigation-menu.d.ts.map +1 -1
- package/dist/shadcn/ui/pagination.d.ts +6 -6
- package/dist/shadcn/ui/pagination.d.ts.map +1 -1
- package/dist/shadcn/ui/popover.d.ts +2 -2
- package/dist/shadcn/ui/popover.d.ts.map +1 -1
- package/dist/shadcn/ui/progress.d.ts +2 -2
- package/dist/shadcn/ui/progress.d.ts.map +1 -1
- package/dist/shadcn/ui/radio-group.d.ts +2 -2
- package/dist/shadcn/ui/radio-group.d.ts.map +1 -1
- package/dist/shadcn/ui/resizable.d.ts +2 -2
- package/dist/shadcn/ui/resizable.d.ts.map +1 -1
- package/dist/shadcn/ui/scroll-area.d.ts +2 -2
- package/dist/shadcn/ui/scroll-area.d.ts.map +1 -1
- package/dist/shadcn/ui/select.d.ts +3 -3
- package/dist/shadcn/ui/select.d.ts.map +1 -1
- package/dist/shadcn/ui/separator.d.ts +2 -2
- package/dist/shadcn/ui/separator.d.ts.map +1 -1
- package/dist/shadcn/ui/sheet.d.ts +5 -5
- package/dist/shadcn/ui/sheet.d.ts.map +1 -1
- package/dist/shadcn/ui/sidebar.d.ts +26 -26
- package/dist/shadcn/ui/sidebar.d.ts.map +1 -1
- package/dist/shadcn/ui/skeleton.d.ts +1 -1
- package/dist/shadcn/ui/skeleton.d.ts.map +1 -1
- package/dist/shadcn/ui/slider.d.ts +2 -2
- package/dist/shadcn/ui/slider.d.ts.map +1 -1
- package/dist/shadcn/ui/sonner.d.ts.map +1 -1
- package/dist/shadcn/ui/switch.d.ts +2 -2
- package/dist/shadcn/ui/switch.d.ts.map +1 -1
- package/dist/shadcn/ui/table.d.ts +9 -9
- package/dist/shadcn/ui/table.d.ts.map +1 -1
- package/dist/shadcn/ui/tabs.d.ts +2 -2
- package/dist/shadcn/ui/tabs.d.ts.map +1 -1
- package/dist/shadcn/ui/textarea.d.ts +2 -2
- package/dist/shadcn/ui/textarea.d.ts.map +1 -1
- package/dist/shadcn/ui/toggle-group.d.ts +2 -2
- package/dist/shadcn/ui/toggle-group.d.ts.map +1 -1
- package/dist/shadcn/ui/toggle.d.ts +2 -2
- package/dist/shadcn/ui/toggle.d.ts.map +1 -1
- package/dist/shadcn/ui/tooltip.d.ts +2 -2
- package/dist/shadcn/ui/tooltip.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +2 -1
- package/src/kit/builder/auth/components/Can.tsx +27 -0
- package/src/kit/builder/auth/components/RequireAuth.tsx +78 -0
- package/src/kit/builder/auth/components/ShowWhenAuthenticated.tsx +10 -0
- package/src/kit/builder/auth/components/ShowWhenError.tsx +10 -0
- package/src/kit/builder/auth/components/ShowWhenLoading.tsx +10 -0
- package/src/kit/builder/auth/components/ShowWhenUnauthenticated.tsx +10 -0
- package/src/kit/builder/auth/components/withPermission.tsx +23 -0
- package/src/kit/builder/auth/hooks/action-hooks.ts +34 -0
- package/src/kit/builder/auth/hooks/core-hooks.ts +65 -0
- package/src/kit/builder/auth/hooks/index.ts +4 -0
- package/src/kit/builder/auth/hooks/permission-hooks.ts +43 -0
- package/src/kit/builder/auth/hooks/token-hooks.ts +25 -0
- package/src/kit/builder/auth/index.ts +132 -0
- package/src/kit/builder/auth/providers/AuthProvider.tsx +131 -0
- package/src/kit/builder/auth/types/adapter-config.ts +44 -0
- package/src/kit/builder/auth/types/adapter.ts +132 -0
- package/src/kit/builder/auth/types/core.ts +27 -0
- package/src/kit/builder/auth/types/index.ts +9 -0
- package/src/kit/builder/auth/types/middleware.ts +20 -0
- package/src/kit/builder/auth/types/permissions.ts +23 -0
- package/src/kit/builder/auth/types/state.ts +16 -0
- package/src/kit/builder/auth/types/storage.ts +21 -0
- package/src/kit/builder/auth/types/token-manager.ts +9 -0
- package/src/kit/builder/auth/types/utils.ts +55 -0
- package/src/kit/builder/auth/utils/auth-adapter.ts +437 -0
- package/src/kit/builder/auth/utils/client-adapters/apollo-link.ts +30 -0
- package/src/kit/builder/auth/utils/client-adapters/axios.ts +61 -0
- package/src/kit/builder/auth/utils/client-adapters/fetch.ts +48 -0
- package/src/kit/builder/auth/utils/client-adapters/graphql.ts +60 -0
- package/src/kit/builder/auth/utils/client-adapters/index.ts +6 -0
- package/src/kit/builder/auth/utils/client-adapters/rest.ts +60 -0
- package/src/kit/builder/auth/utils/client-adapters/urql-exchange.ts +76 -0
- package/src/kit/builder/auth/utils/permission-checker.ts +150 -0
- package/src/kit/builder/auth/utils/storage/browser.ts +99 -0
- package/src/kit/builder/auth/utils/storage/cookie.ts +116 -0
- package/src/kit/builder/auth/utils/storage/encryption.ts +80 -0
- package/src/kit/builder/auth/utils/storage/env.ts +2 -0
- package/src/kit/builder/auth/utils/storage/factory.ts +37 -0
- package/src/kit/builder/auth/utils/storage/index.ts +6 -0
- package/src/kit/builder/auth/utils/storage/memory.ts +15 -0
- package/src/kit/builder/auth/utils/token-manager.ts +55 -0
- package/src/kit/builder/data-table/components/DataTable.tsx +214 -82
- package/src/kit/builder/data-table/components/DataTableColumnHeader.tsx +9 -5
- package/src/kit/builder/data-table/components/DataTablePagination.tsx +19 -5
- package/src/kit/builder/data-table/components/DataTableViewOptions.tsx +13 -4
- package/src/kit/builder/data-table/types.ts +18 -3
- package/src/kit/builder/dialog/index.ts +5 -1
- package/src/kit/builder/dialog/provider.tsx +56 -27
- package/src/kit/builder/form/components/FormBuilder.tsx +10 -14
- package/src/kit/builder/form/components/FormBuilderActions.tsx +1 -1
- package/src/kit/builder/form/components/FormBuilderContext.tsx +13 -6
- package/src/kit/builder/form/components/FormBuilderField.tsx +70 -20
- package/src/kit/builder/form/components/fields/ArrayField.tsx +148 -62
- package/src/kit/builder/form/components/fields/AutocompleteField.tsx +53 -18
- package/src/kit/builder/form/components/fields/CheckboxField.tsx +20 -11
- package/src/kit/builder/form/components/fields/DateField.tsx +17 -6
- package/src/kit/builder/form/components/fields/DatePickerField.tsx +15 -10
- package/src/kit/builder/form/components/fields/DateRangePickerField.tsx +20 -15
- package/src/kit/builder/form/components/fields/DateTimePickerField.tsx +16 -11
- package/src/kit/builder/form/components/fields/DateTimeRangePickerField.tsx +23 -17
- package/src/kit/builder/form/components/fields/FileField.tsx +10 -5
- package/src/kit/builder/form/components/fields/MonthPickerField.tsx +18 -11
- package/src/kit/builder/form/components/fields/MonthRangePickerField.tsx +23 -17
- package/src/kit/builder/form/components/fields/NumberField.tsx +9 -4
- package/src/kit/builder/form/components/fields/ObjectField.tsx +12 -7
- package/src/kit/builder/form/components/fields/RadioField.tsx +32 -14
- package/src/kit/builder/form/components/fields/SelectField.tsx +26 -11
- package/src/kit/builder/form/components/fields/SwitchField.tsx +20 -11
- package/src/kit/builder/form/components/fields/TextField.tsx +11 -5
- package/src/kit/builder/form/components/fields/TextareaField.tsx +9 -4
- package/src/kit/builder/form/components/fields/TimePickerField.tsx +16 -11
- package/src/kit/builder/form/components/fields/TimeRangePickerField.tsx +23 -17
- package/src/kit/builder/form/components/fields/index.ts +21 -21
- package/src/kit/builder/form/components/fields/types.ts +15 -11
- package/src/kit/builder/form/components/sectionNodes.tsx +63 -40
- package/src/kit/builder/form/hooks/useFormBuilder.ts +83 -34
- package/src/kit/builder/form/types.ts +173 -148
- package/src/kit/builder/form/utils/section-factories.ts +4 -1
- package/src/kit/builder/form/utils/transformers.ts +4 -4
- package/src/kit/builder/form/utils/validations.ts +1 -1
- package/src/kit/builder/page/Page.tsx +26 -6
- package/src/kit/builder/page/index.ts +1 -1
- package/src/kit/builder/section/SectionBuilder.tsx +252 -127
- package/src/kit/builder/section/SectionContainer.tsx +85 -0
- package/src/kit/builder/stack-dialog/context.ts +10 -4
- package/src/kit/builder/stack-dialog/hooks.ts +4 -3
- package/src/kit/builder/stack-dialog/index.ts +5 -11
- package/src/kit/builder/stack-dialog/provider.tsx +11 -11
- package/src/kit/builder/stack-dialog/renderer.tsx +23 -26
- package/src/kit/builder/stack-dialog/types.ts +18 -18
- package/src/kit/components/autocomplete/Autocomplete.tsx +631 -549
- package/src/kit/components/autocomplete/types.ts +17 -17
- package/src/kit/components/datepicker/DatePicker.tsx +33 -9
- package/src/kit/components/datepicker/DateRangePicker.tsx +159 -87
- package/src/kit/components/datetimepicker/DateTimePicker.tsx +136 -30
- package/src/kit/components/datetimepicker/DateTimeRangePicker.tsx +257 -67
- package/src/kit/components/datetimepicker/index.ts +3 -3
- package/src/kit/components/fileuploader/FileUploader.tsx +315 -180
- package/src/kit/components/fileuploader/index.ts +3 -3
- package/src/kit/components/fileuploader/types.ts +3 -3
- package/src/kit/components/forminfo/FormInfoError.tsx +26 -11
- package/src/kit/components/login/Login.tsx +22 -11
- package/src/kit/components/monthpicker/MonthInput.tsx +13 -4
- package/src/kit/components/monthpicker/MonthPicker.tsx +12 -11
- package/src/kit/components/monthpicker/MonthRangeInput.tsx +29 -8
- package/src/kit/components/monthpicker/MonthRangePicker.tsx +23 -21
- package/src/kit/components/timepicker/TimePicker.tsx +19 -11
- package/src/kit/components/timepicker/TimeRangePicker.tsx +106 -29
- package/src/kit/components/timepicker/index.ts +3 -3
- package/src/kit/layouts/admin/components/AdminLayout.tsx +74 -38
- package/src/kit/layouts/admin/components/ThemeToggle.tsx +3 -9
- package/src/kit/layouts/admin/hooks/menu.ts +11 -5
- package/src/kit/layouts/admin/providers/AdminMenuProvider.tsx +59 -39
- package/src/kit/layouts/admin/types/index.ts +1 -1
- package/src/kit/themes/base.css +1 -1
- package/src/kit/themes/clean-slate.css +40 -32
- package/src/kit/themes/default.css +34 -24
- package/src/kit/themes/minimal-modern.css +37 -29
- package/src/kit/themes/spotify.css +56 -39
- package/src/shadcn/hooks/use-mobile.ts +13 -11
- package/src/shadcn/lib/utils.ts +2 -2
- package/src/shadcn/ui/accordion.tsx +14 -14
- package/src/shadcn/ui/alert-dialog.tsx +29 -29
- package/src/shadcn/ui/alert.tsx +20 -20
- package/src/shadcn/ui/aspect-ratio.tsx +4 -4
- package/src/shadcn/ui/avatar.tsx +13 -13
- package/src/shadcn/ui/badge.tsx +16 -16
- package/src/shadcn/ui/breadcrumb.tsx +28 -28
- package/src/shadcn/ui/button.tsx +23 -23
- package/src/shadcn/ui/calendar.tsx +82 -78
- package/src/shadcn/ui/card.tsx +27 -27
- package/src/shadcn/ui/carousel.tsx +93 -93
- package/src/shadcn/ui/chart.tsx +103 -103
- package/src/shadcn/ui/checkbox.tsx +9 -9
- package/src/shadcn/ui/collapsible.tsx +6 -6
- package/src/shadcn/ui/command.tsx +36 -36
- package/src/shadcn/ui/context-menu.tsx +40 -40
- package/src/shadcn/ui/dialog.tsx +28 -28
- package/src/shadcn/ui/drawer.tsx +30 -30
- package/src/shadcn/ui/dropdown-menu.tsx +41 -41
- package/src/shadcn/ui/form.tsx +48 -47
- package/src/shadcn/ui/hover-card.tsx +11 -11
- package/src/shadcn/ui/input-otp.tsx +23 -23
- package/src/shadcn/ui/input.tsx +9 -9
- package/src/shadcn/ui/label.tsx +8 -8
- package/src/shadcn/ui/menubar.tsx +47 -47
- package/src/shadcn/ui/navigation-menu.tsx +33 -33
- package/src/shadcn/ui/pagination.tsx +28 -28
- package/src/shadcn/ui/popover.tsx +12 -12
- package/src/shadcn/ui/progress.tsx +8 -8
- package/src/shadcn/ui/radio-group.tsx +11 -11
- package/src/shadcn/ui/resizable.tsx +14 -14
- package/src/shadcn/ui/scroll-area.tsx +15 -15
- package/src/shadcn/ui/select.tsx +34 -34
- package/src/shadcn/ui/separator.tsx +9 -9
- package/src/shadcn/ui/sheet.tsx +36 -36
- package/src/shadcn/ui/sidebar.tsx +227 -227
- package/src/shadcn/ui/skeleton.tsx +5 -5
- package/src/shadcn/ui/slider.tsx +12 -12
- package/src/shadcn/ui/sonner.tsx +11 -11
- package/src/shadcn/ui/switch.tsx +9 -9
- package/src/shadcn/ui/table.tsx +32 -32
- package/src/shadcn/ui/tabs.tsx +14 -14
- package/src/shadcn/ui/textarea.tsx +7 -7
- package/src/shadcn/ui/toggle-group.tsx +17 -17
- package/src/shadcn/ui/toggle.tsx +16 -16
- package/src/shadcn/ui/tooltip.tsx +11 -11
- package/src/stories/FileUploader.stories.tsx +23 -4
- package/src/stories/kit/builder/DataTable.Basic.stories.tsx +14 -4
- package/src/stories/kit/builder/DataTable.Filters.stories.tsx +36 -14
- package/src/stories/kit/builder/DataTable.Pagination.stories.tsx +3 -2
- package/src/stories/kit/builder/DataTable.SelectionAndActions.stories.tsx +18 -4
- package/src/stories/kit/builder/DataTable.Sorting.stories.tsx +18 -7
- package/src/stories/kit/builder/Dialog.stories.tsx +19 -13
- package/src/stories/kit/builder/Form.ArrayLayouts.stories.tsx +40 -16
- package/src/stories/kit/builder/Form.Autocomplete.stories.tsx +34 -22
- package/src/stories/kit/builder/Form.Basic.stories.tsx +38 -6
- package/src/stories/kit/builder/Form.Complex.stories.tsx +356 -111
- package/src/stories/kit/builder/Form.DateTime.stories.tsx +12 -8
- package/src/stories/kit/builder/Form.Dynamic.stories.tsx +695 -132
- package/src/stories/kit/builder/Form.Files.stories.tsx +37 -26
- package/src/stories/kit/builder/Form.MultipleFormBuilder.stories.tsx +46 -42
- package/src/stories/kit/builder/Form.Pickers.stories.tsx +12 -8
- package/src/stories/kit/builder/Form.Simple.stories.tsx +15 -6
- package/src/stories/kit/builder/Form.Time.stories.tsx +12 -8
- package/src/stories/kit/builder/Page.stories.tsx +32 -6
- package/src/stories/kit/builder/Section.stories.tsx +58 -11
- package/src/stories/kit/components/Autocomplete.stories.tsx +55 -22
- package/src/stories/kit/components/DatePicker.stories.tsx +80 -13
- package/src/stories/kit/components/DateRangePicker.stories.tsx +52 -11
- package/src/stories/kit/components/Login.stories.tsx +8 -2
- package/src/stories/kit/components/MonthPicker.stories.tsx +26 -6
- package/src/stories/kit/components/MonthRangePicker.stories.tsx +24 -5
- package/src/stories/kit/components/TimePicker.stories.tsx +18 -16
- package/src/stories/kit/components/TimeRangePicker.stories.tsx +18 -12
- package/src/stories/kit/layouts/admin/AdminLayout.Basic.stories.tsx +29 -6
- package/src/stories/kit/layouts/admin/AdminLayout.Collapsible.stories.tsx +26 -5
- package/src/stories/kit/layouts/admin/AdminLayout.Complex.stories.tsx +101 -18
- package/src/stories/kit/layouts/admin/AdminLayout.CustomSidebarHeaderComponent.stories.tsx +18 -4
- package/src/stories/kit/layouts/admin/AdminLayout.CustomSidebarTitleAndIcon.stories.tsx +17 -4
- package/src/stories/kit/layouts/admin/AdminLayout.HeaderSlots.stories.tsx +28 -6
- package/src/stories/shadcn/ui/Accordion.stories.tsx +33 -10
- package/src/stories/shadcn/ui/AlertDialog.stories.tsx +3 -1
- package/src/stories/shadcn/ui/Button.stories.tsx +3 -1
- package/src/stories/shadcn/ui/Calendar.stories.tsx +6 -1
- package/src/stories/shadcn/ui/Card.stories.tsx +11 -2
- package/src/stories/shadcn/ui/Checkbox.stories.tsx +11 -3
- package/src/stories/shadcn/ui/Collapsible.stories.tsx +12 -5
- package/src/stories/shadcn/ui/ContextMenu.stories.tsx +12 -4
- package/src/stories/shadcn/ui/Dialog.stories.tsx +15 -3
- package/src/stories/shadcn/ui/Drawer.stories.tsx +5 -2
- package/src/stories/shadcn/ui/DropdownMenu.stories.tsx +15 -5
- package/src/stories/shadcn/ui/Form.stories.tsx +5 -2
- package/src/stories/shadcn/ui/HoverCard.stories.tsx +8 -2
- package/src/stories/shadcn/ui/Input.stories.tsx +3 -1
- package/src/stories/shadcn/ui/InputOtp.stories.tsx +9 -2
- package/src/stories/shadcn/ui/Menubar.stories.tsx +21 -7
- package/src/stories/shadcn/ui/NavigationMenu.stories.tsx +30 -5
- package/src/stories/shadcn/ui/Popover.stories.tsx +8 -2
- package/src/stories/shadcn/ui/Resizable.stories.tsx +17 -5
- package/src/stories/shadcn/ui/ScrollArea.stories.tsx +54 -2
- package/src/stories/shadcn/ui/Select.stories.tsx +7 -1
- package/src/stories/shadcn/ui/Sheet.stories.tsx +2 -1
- package/src/stories/shadcn/ui/Sidebar.stories.tsx +13 -2
- package/src/stories/shadcn/ui/Sonner.stories.tsx +12 -2
- package/src/stories/shadcn/ui/Table.stories.tsx +86 -27
- package/src/stories/shadcn/ui/Tabs.stories.tsx +9 -2
- package/src/stories/shadcn/ui/Textarea.stories.tsx +3 -1
- package/src/stories/shadcn/ui/Toggle.stories.tsx +10 -2
- package/src/stories/shadcn/ui/Tooltip.stories.tsx +6 -1
- package/storybook-static/assets/Accordion.stories-KU4JBR8U.js +52 -0
- package/storybook-static/assets/AdminLayout-CPvVCwfY.js +53 -0
- package/storybook-static/assets/AdminLayout.Basic.stories-DkP2UVXe.js +4 -0
- package/storybook-static/assets/AdminLayout.Collapsible.stories-BuuVjtpW.js +4 -0
- package/storybook-static/assets/AdminLayout.Complex.stories-D-k4H0hJ.js +29 -0
- package/storybook-static/assets/AdminLayout.CustomSidebarHeaderComponent.stories-B_0IEDd4.js +9 -0
- package/storybook-static/assets/AdminLayout.CustomSidebarTitleAndIcon.stories-CvAeXUyA.js +4 -0
- package/storybook-static/assets/AdminLayout.HeaderSlots.stories-RBFHoSZK.js +7 -0
- package/storybook-static/assets/Alert.stories-DKxKtIc0.js +27 -0
- package/storybook-static/assets/AlertDialog.stories-BqTpZ_nG.js +43 -0
- package/storybook-static/assets/AspectRatio.stories-DPO9QQ5F.js +22 -0
- package/storybook-static/assets/Autocomplete-Cpg4CaJe.js +56 -0
- package/storybook-static/assets/Autocomplete.stories-CWj4G5fh.js +56 -0
- package/storybook-static/assets/Avatar.stories-DPhov_2g.js +12 -0
- package/storybook-static/assets/Badge.stories-DFKrRdXq.js +12 -0
- package/storybook-static/assets/Breadcrumb.stories-CTE6CZUC.js +25 -0
- package/storybook-static/assets/Button.stories-cbt2InL-.js +26 -0
- package/storybook-static/assets/Calendar.stories-DRhTw_43.js +3 -0
- package/storybook-static/assets/Card.stories-Isf6n_K3.js +15 -0
- package/storybook-static/assets/Carousel.stories-Cmg0I3fR.js +15 -0
- package/storybook-static/assets/Chart.stories-aQ-fNijT.js +126 -0
- package/storybook-static/assets/Checkbox.stories-B7YMXPDc.js +12 -0
- package/storybook-static/assets/Collapsible.stories-BUzl17ZZ.js +18 -0
- package/storybook-static/assets/Combination-BdQWAuko.js +41 -0
- package/storybook-static/assets/Command.stories-DzBlWQs0.js +30 -0
- package/storybook-static/assets/ContextMenu.stories-CJlBQyXc.js +31 -0
- package/storybook-static/assets/DataTable.Basic.stories-BWYKFDmK.js +6 -0
- package/storybook-static/assets/DataTable.Filters.stories-uZdtJk8t.js +21 -0
- package/storybook-static/assets/DataTable.Pagination.stories-C5N1khkp.js +24 -0
- package/storybook-static/assets/DataTable.SelectionAndActions.stories-FhCqZKvO.js +26 -0
- package/storybook-static/assets/DataTable.Sorting.stories-D-k7EtRj.js +6 -0
- package/storybook-static/assets/Dialog.stories-C62AF-Gx.js +54 -0
- package/storybook-static/assets/Dialog.stories-lrjRwOus.js +18 -0
- package/storybook-static/assets/Drawer.stories-CGjkdJeV.js +24 -0
- package/storybook-static/assets/DropdownMenu.stories-DkGClRAA.js +35 -0
- package/storybook-static/assets/Form.ArrayLayouts.stories-C5d_062d.js +130 -0
- package/storybook-static/assets/Form.Autocomplete.stories-CPZPkk4o.js +142 -0
- package/storybook-static/assets/Form.Basic.stories-Bhcu3-3n.js +58 -0
- package/storybook-static/assets/Form.Complex.stories-QnXh5a7Q.js +361 -0
- package/storybook-static/assets/Form.Dynamic.stories-DFW6wIuT.js +502 -0
- package/storybook-static/assets/Form.Simple.stories-BhJcyhbE.js +53 -0
- package/storybook-static/assets/Form.stories-PFNsMYxO.js +3 -0
- package/storybook-static/assets/FormBuilder-BQBBxo_k.js +5 -0
- package/storybook-static/assets/HoverCard.stories-CAlQEVn8.js +21 -0
- package/storybook-static/assets/Input.stories-CEhODt0V.js +16 -0
- package/storybook-static/assets/InputOtp.stories-DSvNP4dS.js +42 -0
- package/storybook-static/assets/Label.stories-B3pa8ZLY.js +14 -0
- package/storybook-static/assets/Login.stories-C7KQkmR_.js +37 -0
- package/storybook-static/assets/Menubar.stories-CHXhSHxc.js +44 -0
- package/storybook-static/assets/MonthPicker.stories-BnrOc4fm.js +99 -0
- package/storybook-static/assets/MonthRangePicker.stories-55Gk1t-7.js +134 -0
- package/storybook-static/assets/NavigationMenu.stories-CXoS080P.js +30 -0
- package/storybook-static/assets/Page.stories-GdSJgZ6-.js +91 -0
- package/storybook-static/assets/Pagination.stories-BEBwqH4N.js +29 -0
- package/storybook-static/assets/Popover.stories-BICy98Cw.js +15 -0
- package/storybook-static/assets/Progress.stories-DECHNOME.js +8 -0
- package/storybook-static/assets/RadioGroup.stories-DA7-uKfV.js +16 -0
- package/storybook-static/assets/Resizable.stories-B99kWkH7.js +25 -0
- package/storybook-static/assets/ScrollArea.stories-BqvUAXqU.js +12 -0
- package/storybook-static/assets/Section.stories-lFMlFBQn.js +277 -0
- package/storybook-static/assets/SectionBuilder-BQW705x0.js +1 -0
- package/storybook-static/assets/Select.stories-BsKyZ6Io.js +17 -0
- package/storybook-static/assets/Separator.stories-BTDOaOM2.js +17 -0
- package/storybook-static/assets/Sheet.stories-Cam1gR6G.js +24 -0
- package/storybook-static/assets/Sidebar.stories-DnOa6G7y.js +106 -0
- package/storybook-static/assets/Skeleton.stories-BQNIuIe5.js +9 -0
- package/storybook-static/assets/Slider.stories-Bslq7hjq.js +6 -0
- package/storybook-static/assets/Sonner.stories-D34pBBtI.js +18 -0
- package/storybook-static/assets/Switch.stories-Puyb1-Bx.js +3 -0
- package/storybook-static/assets/Table.stories-ClZxAhut.js +35 -0
- package/storybook-static/assets/Tabs.stories-CURNTETB.js +10 -0
- package/storybook-static/assets/Textarea.stories-Cf1ZBrWw.js +17 -0
- package/storybook-static/assets/Toggle.stories-CdMHY_bi.js +3 -0
- package/storybook-static/assets/ToggleGroup.stories-BM68m1dX.js +13 -0
- package/storybook-static/assets/Tooltip.stories-DiQv64dM.js +10 -0
- package/storybook-static/assets/accordion-DVgwQcnw.js +1 -0
- package/storybook-static/assets/alert-dialog-DCUEwpqm.js +7 -0
- package/storybook-static/assets/avatar-BzwOE-mi.js +1 -0
- package/storybook-static/assets/axe-HmUsR1st.js +30 -0
- package/storybook-static/assets/badge-BnQWua6u.js +1 -0
- package/storybook-static/assets/button-0oMkiryo.js +1 -0
- package/storybook-static/assets/card-BJpPOzP8.js +1 -0
- package/storybook-static/assets/chart-column-DZGb4ZZS.js +6 -0
- package/storybook-static/assets/check-B9hBGj6o.js +6 -0
- package/storybook-static/assets/checkbox-CyIeaWHX.js +1 -0
- package/storybook-static/assets/chevron-down-D_37S6il.js +6 -0
- package/storybook-static/assets/chevron-left-BBoN0vbI.js +6 -0
- package/storybook-static/assets/chevron-right-B5vIMLxK.js +6 -0
- package/storybook-static/assets/circle-C5Lzx6Nx.js +6 -0
- package/storybook-static/assets/clean-slate-D1HmMFJM.css +1 -0
- package/storybook-static/assets/command-Csa9p8_a.js +6 -0
- package/storybook-static/assets/createLucideIcon-BrHXro7t.js +21 -0
- package/storybook-static/assets/default-CN_Fo1GY.css +1 -0
- package/storybook-static/assets/dependencies-ctrV69dx.js +1 -0
- package/storybook-static/assets/dialog-CsnqITTn.js +1 -0
- package/storybook-static/assets/dropdown-menu-BWxxwPHL.js +1 -0
- package/storybook-static/assets/ellipsis-BRS038RR.js +6 -0
- package/storybook-static/assets/grip-vertical-BxXG8KNA.js +6 -0
- package/storybook-static/assets/iframe-C9bogcIc.css +1 -0
- package/storybook-static/assets/iframe-v7iAhKit.js +1555 -0
- package/storybook-static/assets/index-0-qMRXou.js +1 -0
- package/storybook-static/assets/index-AvwFFKJc.js +1 -0
- package/storybook-static/assets/index-BVDb4dFc.js +1 -0
- package/storybook-static/assets/index-B_qx7A5T.js +1 -0
- package/storybook-static/assets/index-BdQq_4o_.js +1 -0
- package/storybook-static/assets/index-BfiCOk42.js +1 -0
- package/storybook-static/assets/index-Bv9yk470.js +1 -0
- package/storybook-static/assets/index-Bw1A27Kp.js +1 -0
- package/storybook-static/assets/index-ByqivBWx.js +1 -0
- package/storybook-static/assets/index-C9Ta0ZTH.js +1 -0
- package/storybook-static/assets/index-CDY5kTx5.js +1 -0
- package/storybook-static/assets/index-CGnyVRgB.js +1 -0
- package/storybook-static/assets/index-CGrAONsN.js +1 -0
- package/storybook-static/assets/index-CWjrGFAQ.js +1 -0
- package/storybook-static/assets/index-CwBdPBFz.js +9 -0
- package/storybook-static/assets/index-D8RXF03I.js +1 -0
- package/storybook-static/assets/index-DLIxT4Z7.js +1 -0
- package/storybook-static/assets/index-DW48STyt.js +1 -0
- package/storybook-static/assets/index-DbaA6-o1.js +1 -0
- package/storybook-static/assets/index-Dph_5COR.js +1 -0
- package/storybook-static/assets/index-DrN5n71E.js +1 -0
- package/storybook-static/assets/index-Tp9IdbR8.js +1 -0
- package/storybook-static/assets/index-WyF3-wTE.js +9 -0
- package/storybook-static/assets/index-XSmPROEP.js +1 -0
- package/storybook-static/assets/index-Z6wF44KX.js +5 -0
- package/storybook-static/assets/index-_RPqOjlQ.js +1 -0
- package/storybook-static/assets/index-jrimW4QO.js +1 -0
- package/storybook-static/assets/index-nqc17SX4.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-Do8ODIVk.js +1 -0
- package/storybook-static/assets/lodash-DDwpuhPG.js +73 -0
- package/storybook-static/assets/matchers-7Z3WT2CE-T3xScrR7.js +14 -0
- package/storybook-static/assets/minimal-modern-BlYVzfQU.css +1 -0
- package/storybook-static/assets/popover-CcciSWAw.js +1 -0
- package/storybook-static/assets/preload-helper-Dp1pzeXC.js +1 -0
- package/storybook-static/assets/radio-group-DiJ0Y_KQ.js +1 -0
- package/storybook-static/assets/react-18-Cr9fq_Ip.js +25 -0
- package/storybook-static/assets/react-icons.esm-B_ULMmNU.js +1 -0
- package/storybook-static/assets/refresh-cw-BmRDhIV_.js +6 -0
- package/storybook-static/assets/schemas-CGNYCiJ6.js +18 -0
- package/storybook-static/assets/section-factories-DCCY9R35.js +1 -0
- package/storybook-static/assets/select-DDrkxaOg.js +6 -0
- package/storybook-static/assets/separator-o5SAUnaJ.js +1 -0
- package/storybook-static/assets/settings-2-xWGvvbG6.js +6 -0
- package/storybook-static/assets/sheet-C7jhU3XE.js +1 -0
- package/storybook-static/assets/shopping-cart-BFlrufvo.js +11 -0
- package/storybook-static/assets/sidebar-C8hU1Mxy.js +6 -0
- package/storybook-static/assets/skeleton-CjDnQs43.js +1 -0
- package/storybook-static/assets/spotify-CUDj7g8m.css +1 -0
- package/storybook-static/assets/switch-CKGRuk3u.js +1 -0
- package/storybook-static/assets/table-CP3vMqFn.js +1 -0
- package/storybook-static/assets/tabs-CopK2m3j.js +1 -0
- package/storybook-static/assets/textarea-Dw2vruMl.js +1 -0
- package/storybook-static/assets/toggle-DmHbWetf.js +16 -0
- package/storybook-static/assets/tooltip-_LqYEYFw.js +1 -0
- package/storybook-static/assets/trash-2-xdbApPby.js +11 -0
- package/storybook-static/assets/utils-D-KgF5mV.js +1 -0
- package/storybook-static/assets/x-B1a4fyWM.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 +64 -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 +37 -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 +7 -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/FormBuilder.d.ts +137 -0
- package/storybook-static/kit/builder/form/components/FormBuilder.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/FormBuilderActions.d.ts +20 -0
- package/storybook-static/kit/builder/form/components/FormBuilderActions.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/FormBuilderField.d.ts +12 -0
- package/storybook-static/kit/builder/form/components/FormBuilderField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/fields/ArrayField.d.ts +3 -0
- package/storybook-static/kit/builder/form/components/fields/ArrayField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/fields/AutocompleteField.d.ts +3 -0
- package/storybook-static/kit/builder/form/components/fields/AutocompleteField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/fields/CheckboxField.d.ts +3 -0
- package/storybook-static/kit/builder/form/components/fields/CheckboxField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/fields/DateField.d.ts +3 -0
- package/storybook-static/kit/builder/form/components/fields/DateField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/fields/FileField.d.ts +3 -0
- package/storybook-static/kit/builder/form/components/fields/FileField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/fields/NumberField.d.ts +3 -0
- package/storybook-static/kit/builder/form/components/fields/NumberField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/fields/ObjectField.d.ts +3 -0
- package/storybook-static/kit/builder/form/components/fields/ObjectField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/fields/RadioField.d.ts +3 -0
- package/storybook-static/kit/builder/form/components/fields/RadioField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/fields/SelectField.d.ts +3 -0
- package/storybook-static/kit/builder/form/components/fields/SelectField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/fields/SwitchField.d.ts +3 -0
- package/storybook-static/kit/builder/form/components/fields/SwitchField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/fields/TextField.d.ts +3 -0
- package/storybook-static/kit/builder/form/components/fields/TextField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/fields/TextareaField.d.ts +3 -0
- package/storybook-static/kit/builder/form/components/fields/TextareaField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/fields/index.d.ts +14 -0
- package/storybook-static/kit/builder/form/components/fields/index.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/fields/types.d.ts +14 -0
- package/storybook-static/kit/builder/form/components/fields/types.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/index.d.ts +4 -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 +23 -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 +70 -0
- package/storybook-static/kit/builder/section/types.d.ts.map +1 -0
- package/storybook-static/kit/builder/stack-dialog/context.d.ts +3 -0
- package/storybook-static/kit/builder/stack-dialog/context.d.ts.map +1 -0
- package/storybook-static/kit/builder/stack-dialog/hooks.d.ts +6 -0
- package/storybook-static/kit/builder/stack-dialog/hooks.d.ts.map +1 -0
- package/storybook-static/kit/builder/stack-dialog/index.d.ts +5 -0
- package/storybook-static/kit/builder/stack-dialog/index.d.ts.map +1 -0
- package/storybook-static/kit/builder/stack-dialog/provider.d.ts +3 -0
- package/storybook-static/kit/builder/stack-dialog/provider.d.ts.map +1 -0
- package/storybook-static/kit/builder/stack-dialog/renderer.d.ts +6 -0
- package/storybook-static/kit/builder/stack-dialog/renderer.d.ts.map +1 -0
- package/storybook-static/kit/builder/stack-dialog/types.d.ts +20 -0
- package/storybook-static/kit/builder/stack-dialog/types.d.ts.map +1 -0
- package/storybook-static/kit/components/autocomplete/Autocomplete.d.ts +53 -0
- package/storybook-static/kit/components/autocomplete/Autocomplete.d.ts.map +1 -0
- package/storybook-static/kit/components/autocomplete/index.d.ts +4 -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/components/monthpicker/MonthPicker.d.ts +32 -0
- package/storybook-static/kit/components/monthpicker/MonthPicker.d.ts.map +1 -0
- package/storybook-static/kit/components/monthpicker/MonthRangePicker.d.ts +48 -0
- package/storybook-static/kit/components/monthpicker/MonthRangePicker.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 +13 -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 +1 -5
- package/tsconfig.tsbuildinfo +1 -0
- package/eslint.config.mjs +0 -19
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import {
|
|
3
|
+
import type { ColumnDef } from '@tanstack/react-table';
|
|
4
4
|
import { DataTable } from '../../../kit/builder/data-table';
|
|
5
5
|
|
|
6
6
|
// Simple type for demo
|
|
@@ -33,9 +33,19 @@ const columns: ColumnDef<Person>[] = [
|
|
|
33
33
|
];
|
|
34
34
|
|
|
35
35
|
const data: Person[] = [
|
|
36
|
-
{
|
|
36
|
+
{
|
|
37
|
+
id: '1',
|
|
38
|
+
name: 'Alice Johnson',
|
|
39
|
+
email: 'alice@example.com',
|
|
40
|
+
status: 'active',
|
|
41
|
+
},
|
|
37
42
|
{ id: '2', name: 'Bob Smith', email: 'bob@example.com', status: 'inactive' },
|
|
38
|
-
{
|
|
43
|
+
{
|
|
44
|
+
id: '3',
|
|
45
|
+
name: 'Carol White',
|
|
46
|
+
email: 'carol@example.com',
|
|
47
|
+
status: 'active',
|
|
48
|
+
},
|
|
39
49
|
];
|
|
40
50
|
|
|
41
51
|
const meta: Meta<typeof DataTable<Person, unknown>> = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import {
|
|
4
|
+
import type { ColumnDef } from '@tanstack/react-table';
|
|
4
5
|
import { DataTable } from '../../../kit/builder/data-table';
|
|
5
6
|
import { createSection, createField } from '../../../kit/builder/form';
|
|
6
7
|
import { toast } from 'sonner';
|
|
@@ -16,7 +17,11 @@ const columns: ColumnDef<Order>[] = [
|
|
|
16
17
|
{ accessorKey: 'id', header: 'Order #' },
|
|
17
18
|
{ accessorKey: 'customer', header: 'Customer' },
|
|
18
19
|
{ accessorKey: 'status', header: 'Status' },
|
|
19
|
-
{
|
|
20
|
+
{
|
|
21
|
+
accessorKey: 'total',
|
|
22
|
+
header: 'Total',
|
|
23
|
+
cell: ({ getValue }) => `$${(getValue() as number).toFixed(2)}`,
|
|
24
|
+
},
|
|
20
25
|
];
|
|
21
26
|
|
|
22
27
|
const allData: Order[] = [
|
|
@@ -28,15 +33,19 @@ const allData: Order[] = [
|
|
|
28
33
|
];
|
|
29
34
|
|
|
30
35
|
const filterSections = [
|
|
31
|
-
createSection.card(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
createSection.card(
|
|
37
|
+
'Find orders',
|
|
38
|
+
[
|
|
39
|
+
createField.text('customer', 'Customer'),
|
|
40
|
+
createField.select('status', 'Status', [
|
|
41
|
+
{ label: 'Any', value: null },
|
|
42
|
+
{ label: 'Pending', value: 'pending' },
|
|
43
|
+
{ label: 'Paid', value: 'paid' },
|
|
44
|
+
{ label: 'Shipped', value: 'shipped' },
|
|
45
|
+
]),
|
|
46
|
+
],
|
|
47
|
+
{ grid: { cols: 3 } },
|
|
48
|
+
),
|
|
40
49
|
];
|
|
41
50
|
|
|
42
51
|
const meta: Meta<typeof DataTable<Order, unknown>> = {
|
|
@@ -53,7 +62,11 @@ export const WithFilters: Story = {
|
|
|
53
62
|
const [values, setValues] = useState<Record<string, unknown>>({});
|
|
54
63
|
|
|
55
64
|
const filtered = allData.filter((o) => {
|
|
56
|
-
const byCustomer = values.customer
|
|
65
|
+
const byCustomer = values.customer
|
|
66
|
+
? o.customer
|
|
67
|
+
.toLowerCase()
|
|
68
|
+
.includes(String(values.customer).toLowerCase())
|
|
69
|
+
: true;
|
|
57
70
|
const byStatus = values.status ? o.status === values.status : true;
|
|
58
71
|
return byCustomer && byStatus;
|
|
59
72
|
});
|
|
@@ -68,7 +81,16 @@ export const WithFilters: Story = {
|
|
|
68
81
|
formFilters={filterSections}
|
|
69
82
|
formFilterValues={values}
|
|
70
83
|
onFormFilterChange={setValues}
|
|
71
|
-
actions={[
|
|
84
|
+
actions={[
|
|
85
|
+
{
|
|
86
|
+
key: 'export',
|
|
87
|
+
label: 'Export',
|
|
88
|
+
variant: 'outline',
|
|
89
|
+
onClick: () => {
|
|
90
|
+
toast.info('Export...');
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
]}
|
|
72
94
|
/>
|
|
73
95
|
</div>
|
|
74
96
|
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import {
|
|
4
|
+
import type { ColumnDef } from '@tanstack/react-table';
|
|
4
5
|
import { DataTable } from '../../../kit/builder/data-table';
|
|
5
6
|
|
|
6
7
|
interface Person {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import {
|
|
3
|
+
import type { ColumnDef } from '@tanstack/react-table';
|
|
4
4
|
import { Trash2, Plus } from 'lucide-react';
|
|
5
5
|
import { DataTable } from '../../../kit/builder/data-table';
|
|
6
6
|
import { toast } from 'sonner';
|
|
@@ -13,7 +13,13 @@ interface Item {
|
|
|
13
13
|
|
|
14
14
|
const columns: ColumnDef<Item>[] = [
|
|
15
15
|
{ accessorKey: 'name', header: 'Item' },
|
|
16
|
-
{
|
|
16
|
+
{
|
|
17
|
+
accessorKey: 'price',
|
|
18
|
+
header: 'Price',
|
|
19
|
+
cell: ({ getValue }) => (
|
|
20
|
+
<span className="tabular-nums">${(getValue() as number).toFixed(2)}</span>
|
|
21
|
+
),
|
|
22
|
+
},
|
|
17
23
|
];
|
|
18
24
|
|
|
19
25
|
const data: Item[] = [
|
|
@@ -43,7 +49,15 @@ export const SelectableWithActions: Story = {
|
|
|
43
49
|
showStandardActions
|
|
44
50
|
onRefresh={() => new Promise((r) => setTimeout(r, 800))}
|
|
45
51
|
actions={[
|
|
46
|
-
{
|
|
52
|
+
{
|
|
53
|
+
key: 'create',
|
|
54
|
+
label: 'New Item',
|
|
55
|
+
icon: <Plus className="h-4 w-4" />,
|
|
56
|
+
variant: 'outline',
|
|
57
|
+
onClick: () => {
|
|
58
|
+
toast.info('Create clicked');
|
|
59
|
+
},
|
|
60
|
+
},
|
|
47
61
|
]}
|
|
48
62
|
batchActions={[
|
|
49
63
|
{
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { ColumnDef } from '@tanstack/react-table';
|
|
4
|
+
import {
|
|
5
|
+
DataTable,
|
|
6
|
+
DataTableColumnHeader,
|
|
7
|
+
} from '../../../kit/builder/data-table';
|
|
5
8
|
|
|
6
9
|
interface Person {
|
|
7
10
|
id: string;
|
|
@@ -13,16 +16,24 @@ interface Person {
|
|
|
13
16
|
const columns: ColumnDef<Person>[] = [
|
|
14
17
|
{
|
|
15
18
|
accessorKey: 'name',
|
|
16
|
-
header: ({ column }) =>
|
|
19
|
+
header: ({ column }) => (
|
|
20
|
+
<DataTableColumnHeader column={column} title="Name" />
|
|
21
|
+
),
|
|
17
22
|
},
|
|
18
23
|
{
|
|
19
24
|
accessorKey: 'email',
|
|
20
|
-
header: ({ column }) =>
|
|
25
|
+
header: ({ column }) => (
|
|
26
|
+
<DataTableColumnHeader column={column} title="Email" />
|
|
27
|
+
),
|
|
21
28
|
},
|
|
22
29
|
{
|
|
23
30
|
accessorKey: 'age',
|
|
24
|
-
header: ({ column }) =>
|
|
25
|
-
|
|
31
|
+
header: ({ column }) => (
|
|
32
|
+
<DataTableColumnHeader column={column} title="Age" />
|
|
33
|
+
),
|
|
34
|
+
cell: ({ getValue }) => (
|
|
35
|
+
<span className="tabular-nums">{getValue() as number}</span>
|
|
36
|
+
),
|
|
26
37
|
},
|
|
27
38
|
];
|
|
28
39
|
|
|
@@ -58,20 +58,26 @@ export const CustomExample: Story = {
|
|
|
58
58
|
<Button
|
|
59
59
|
variant="secondary"
|
|
60
60
|
onClick={async () => {
|
|
61
|
-
const val = await open<string>(
|
|
62
|
-
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
61
|
+
const val = await open<string>(
|
|
62
|
+
({ close }) => (
|
|
63
|
+
<div className="space-y-4">
|
|
64
|
+
<h3 className="text-lg font-medium text-foreground">
|
|
65
|
+
Custom Modal
|
|
66
|
+
</h3>
|
|
67
|
+
<p className="text-sm text-muted-foreground">
|
|
68
|
+
You can render anything here and call close(value) to
|
|
69
|
+
resolve.
|
|
70
|
+
</p>
|
|
71
|
+
<div className="flex justify-end gap-2">
|
|
72
|
+
<Button variant="outline" onClick={() => close(undefined)}>
|
|
73
|
+
Cancel
|
|
74
|
+
</Button>
|
|
75
|
+
<Button onClick={() => close('done')}>Confirm</Button>
|
|
76
|
+
</div>
|
|
72
77
|
</div>
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
),
|
|
79
|
+
{ preventCloseOnInteractOutside: true },
|
|
80
|
+
);
|
|
75
81
|
// eslint-disable-next-line no-console
|
|
76
82
|
console.log('custom result:', val);
|
|
77
83
|
}}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import {
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import {
|
|
3
|
+
FormBuilder,
|
|
4
|
+
type FormBuilderProps,
|
|
5
|
+
} from '../../../kit/builder/form/components/FormBuilder';
|
|
3
6
|
|
|
4
7
|
const meta: Meta<typeof FormBuilder> = {
|
|
5
8
|
title: 'Kit/Builder/Form',
|
|
@@ -8,11 +11,11 @@ const meta: Meta<typeof FormBuilder> = {
|
|
|
8
11
|
controls: { expanded: true },
|
|
9
12
|
backgrounds: { disable: true },
|
|
10
13
|
},
|
|
11
|
-
}
|
|
14
|
+
};
|
|
12
15
|
|
|
13
|
-
export default meta
|
|
16
|
+
export default meta;
|
|
14
17
|
|
|
15
|
-
type Story = StoryObj<typeof FormBuilder
|
|
18
|
+
type Story = StoryObj<typeof FormBuilder>;
|
|
16
19
|
|
|
17
20
|
export const ArrayCardLayout: Story = {
|
|
18
21
|
name: 'Array - Card layout',
|
|
@@ -44,7 +47,7 @@ export const ArrayCardLayout: Story = {
|
|
|
44
47
|
<FormBuilder {...(args as FormBuilderProps)} />
|
|
45
48
|
</div>
|
|
46
49
|
),
|
|
47
|
-
}
|
|
50
|
+
};
|
|
48
51
|
|
|
49
52
|
export const ArrayTableLayout: Story = {
|
|
50
53
|
name: 'Array - Table layout',
|
|
@@ -52,7 +55,8 @@ export const ArrayTableLayout: Story = {
|
|
|
52
55
|
sections: [
|
|
53
56
|
{
|
|
54
57
|
title: 'Table Layout',
|
|
55
|
-
description:
|
|
58
|
+
description:
|
|
59
|
+
'Array items are displayed in a table with configurable colors',
|
|
56
60
|
layout: 'grid',
|
|
57
61
|
grid: { cols: 1, gap: 'gap-4' },
|
|
58
62
|
fields: [
|
|
@@ -67,7 +71,12 @@ export const ArrayTableLayout: Story = {
|
|
|
67
71
|
rowAltBgClass: 'bg-teal-50',
|
|
68
72
|
},
|
|
69
73
|
fields: [
|
|
70
|
-
{
|
|
74
|
+
{
|
|
75
|
+
name: 'product',
|
|
76
|
+
label: 'Product',
|
|
77
|
+
type: 'text',
|
|
78
|
+
required: true,
|
|
79
|
+
},
|
|
71
80
|
{ name: 'price', label: 'Price', type: 'number', required: true },
|
|
72
81
|
],
|
|
73
82
|
},
|
|
@@ -82,7 +91,7 @@ export const ArrayTableLayout: Story = {
|
|
|
82
91
|
<FormBuilder {...(args as FormBuilderProps)} />
|
|
83
92
|
</div>
|
|
84
93
|
),
|
|
85
|
-
}
|
|
94
|
+
};
|
|
86
95
|
|
|
87
96
|
export const ArrayCustomLayout: Story = {
|
|
88
97
|
name: 'Array - Custom renderer',
|
|
@@ -103,7 +112,13 @@ export const ArrayCustomLayout: Story = {
|
|
|
103
112
|
label: 'Items (custom)',
|
|
104
113
|
defaultValue: [],
|
|
105
114
|
arrayLayout: 'custom',
|
|
106
|
-
arrayRender: ({
|
|
115
|
+
arrayRender: ({
|
|
116
|
+
value: _value = [],
|
|
117
|
+
rows = [],
|
|
118
|
+
addItem,
|
|
119
|
+
removeItem,
|
|
120
|
+
disabled,
|
|
121
|
+
}) => {
|
|
107
122
|
return (
|
|
108
123
|
<div className="space-y-3">
|
|
109
124
|
<div className="flex justify-between items-center">
|
|
@@ -117,11 +132,18 @@ export const ArrayCustomLayout: Story = {
|
|
|
117
132
|
</button>
|
|
118
133
|
</div>
|
|
119
134
|
<div className="space-y-2">
|
|
120
|
-
<div className="text-xs text-muted-foreground">
|
|
135
|
+
<div className="text-xs text-muted-foreground">
|
|
136
|
+
Rows: {rows.length}
|
|
137
|
+
</div>
|
|
121
138
|
{Array.isArray(rows) && rows.length > 0 ? (
|
|
122
139
|
rows.map((row: { id: string }, i: number) => (
|
|
123
|
-
<div
|
|
124
|
-
|
|
140
|
+
<div
|
|
141
|
+
key={row.id ?? i}
|
|
142
|
+
className="flex items-center gap-3 border rounded-md p-3"
|
|
143
|
+
>
|
|
144
|
+
<span className="text-sm text-muted-foreground">
|
|
145
|
+
Row {i + 1}
|
|
146
|
+
</span>
|
|
125
147
|
<button
|
|
126
148
|
type="button"
|
|
127
149
|
className="ml-auto btn btn-destructive"
|
|
@@ -132,11 +154,13 @@ export const ArrayCustomLayout: Story = {
|
|
|
132
154
|
</div>
|
|
133
155
|
))
|
|
134
156
|
) : (
|
|
135
|
-
<p className="text-sm text-muted-foreground">
|
|
157
|
+
<p className="text-sm text-muted-foreground">
|
|
158
|
+
No items. Click Add Item.
|
|
159
|
+
</p>
|
|
136
160
|
)}
|
|
137
161
|
</div>
|
|
138
162
|
</div>
|
|
139
|
-
)
|
|
163
|
+
);
|
|
140
164
|
},
|
|
141
165
|
},
|
|
142
166
|
],
|
|
@@ -150,4 +174,4 @@ export const ArrayCustomLayout: Story = {
|
|
|
150
174
|
<FormBuilder {...(args as FormBuilderProps)} />
|
|
151
175
|
</div>
|
|
152
176
|
),
|
|
153
|
-
}
|
|
177
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { FormBuilder } from '../../../kit/builder/form/components/FormBuilder'
|
|
3
|
-
import {
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { FormBuilder } from '../../../kit/builder/form/components/FormBuilder';
|
|
3
|
+
import type { FormBuilderProps } from '../../../kit/builder/form/types';
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof FormBuilder> = {
|
|
6
6
|
title: 'Kit/Builder/Form',
|
|
@@ -9,11 +9,11 @@ const meta: Meta<typeof FormBuilder> = {
|
|
|
9
9
|
controls: { expanded: true },
|
|
10
10
|
backgrounds: { disable: true },
|
|
11
11
|
},
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
13
|
|
|
14
|
-
export default meta
|
|
14
|
+
export default meta;
|
|
15
15
|
|
|
16
|
-
type Story = StoryObj<typeof FormBuilder
|
|
16
|
+
type Story = StoryObj<typeof FormBuilder>;
|
|
17
17
|
|
|
18
18
|
const CITY_OPTIONS = [
|
|
19
19
|
{ label: 'New York', value: 'nyc' },
|
|
@@ -26,7 +26,7 @@ const CITY_OPTIONS = [
|
|
|
26
26
|
{ label: 'Boston', value: 'bos' },
|
|
27
27
|
{ label: 'Denver', value: 'den' },
|
|
28
28
|
{ label: 'Portland', value: 'pdx' },
|
|
29
|
-
]
|
|
29
|
+
];
|
|
30
30
|
|
|
31
31
|
export const SingleAutocomplete: Story = {
|
|
32
32
|
name: 'Autocomplete - Single select (clearable + custom allowed)',
|
|
@@ -52,7 +52,7 @@ export const SingleAutocomplete: Story = {
|
|
|
52
52
|
},
|
|
53
53
|
],
|
|
54
54
|
onSubmit: (data: unknown) => {
|
|
55
|
-
console.log('Submit (single):', data)
|
|
55
|
+
console.log('Submit (single):', data);
|
|
56
56
|
},
|
|
57
57
|
showActions: true,
|
|
58
58
|
} satisfies Partial<FormBuilderProps>,
|
|
@@ -61,7 +61,7 @@ export const SingleAutocomplete: Story = {
|
|
|
61
61
|
<FormBuilder {...(args as FormBuilderProps)} />
|
|
62
62
|
</div>
|
|
63
63
|
),
|
|
64
|
-
}
|
|
64
|
+
};
|
|
65
65
|
|
|
66
66
|
// ---- Server edit page (prefilled IDs -> fetch labels) ----
|
|
67
67
|
const ALL_SERVER_OPTIONS = Array.from({ length: 100 }).map((_, i) => ({
|
|
@@ -70,22 +70,32 @@ const ALL_SERVER_OPTIONS = Array.from({ length: 100 }).map((_, i) => ({
|
|
|
70
70
|
}));
|
|
71
71
|
|
|
72
72
|
function makeServerFetcher(all = ALL_SERVER_OPTIONS, minLatency = 250) {
|
|
73
|
-
return async ({
|
|
73
|
+
return async ({
|
|
74
|
+
search,
|
|
75
|
+
page = 1,
|
|
76
|
+
pageSize = 10,
|
|
77
|
+
}: {
|
|
78
|
+
search: string;
|
|
79
|
+
page?: number;
|
|
80
|
+
pageSize: number;
|
|
81
|
+
}) => {
|
|
74
82
|
const q = (search || '').toLowerCase();
|
|
75
|
-
const filtered = q
|
|
83
|
+
const filtered = q
|
|
84
|
+
? all.filter((o) => o.label.toLowerCase().includes(q))
|
|
85
|
+
: all;
|
|
76
86
|
const start = (page - 1) * pageSize;
|
|
77
87
|
const slice = filtered.slice(start, start + pageSize);
|
|
78
88
|
const hasMore = start + pageSize < filtered.length;
|
|
79
|
-
await new Promise(r => setTimeout(r, minLatency));
|
|
89
|
+
await new Promise((r) => setTimeout(r, minLatency));
|
|
80
90
|
return { items: slice, hasMore, nextCursor: null };
|
|
81
91
|
};
|
|
82
92
|
}
|
|
83
93
|
|
|
84
94
|
async function loadSelectedByIds(values: Array<string | number>) {
|
|
85
95
|
// Simulate server lookup for labels by ID
|
|
86
|
-
await new Promise(r => setTimeout(r, 150));
|
|
87
|
-
const nums = values.map(v => (typeof v === 'string' ? Number(v) : v));
|
|
88
|
-
return ALL_SERVER_OPTIONS.filter(o => nums.includes(o.value));
|
|
96
|
+
await new Promise((r) => setTimeout(r, 150));
|
|
97
|
+
const nums = values.map((v) => (typeof v === 'string' ? Number(v) : v));
|
|
98
|
+
return ALL_SERVER_OPTIONS.filter((o) => nums.includes(o.value));
|
|
89
99
|
}
|
|
90
100
|
|
|
91
101
|
export const ServerEditPrefilledByIds: Story = {
|
|
@@ -113,7 +123,9 @@ export const ServerEditPrefilledByIds: Story = {
|
|
|
113
123
|
// Provide resolver to fetch labels for the current values
|
|
114
124
|
loadSelected: loadSelectedByIds,
|
|
115
125
|
// Pre-seed labels so chips render labels immediately on load
|
|
116
|
-
initialSelectedOptions: ALL_SERVER_OPTIONS.filter(o =>
|
|
126
|
+
initialSelectedOptions: ALL_SERVER_OPTIONS.filter((o) =>
|
|
127
|
+
[2, 5, 17].includes(o.value),
|
|
128
|
+
),
|
|
117
129
|
},
|
|
118
130
|
],
|
|
119
131
|
},
|
|
@@ -123,7 +135,7 @@ export const ServerEditPrefilledByIds: Story = {
|
|
|
123
135
|
cities: [2, 5, 17],
|
|
124
136
|
},
|
|
125
137
|
onSubmit: (data: unknown) => {
|
|
126
|
-
console.log('Submit (server edit):', data)
|
|
138
|
+
console.log('Submit (server edit):', data);
|
|
127
139
|
},
|
|
128
140
|
showActions: true,
|
|
129
141
|
} satisfies Partial<FormBuilderProps>,
|
|
@@ -132,7 +144,7 @@ export const ServerEditPrefilledByIds: Story = {
|
|
|
132
144
|
<FormBuilder {...(args as FormBuilderProps)} />
|
|
133
145
|
</div>
|
|
134
146
|
),
|
|
135
|
-
}
|
|
147
|
+
};
|
|
136
148
|
|
|
137
149
|
export const MultiAutocompleteChips: Story = {
|
|
138
150
|
name: 'Autocomplete - Multi select with chips',
|
|
@@ -159,7 +171,7 @@ export const MultiAutocompleteChips: Story = {
|
|
|
159
171
|
},
|
|
160
172
|
],
|
|
161
173
|
onSubmit: (data: unknown) => {
|
|
162
|
-
console.log('Submit (multi):', data)
|
|
174
|
+
console.log('Submit (multi):', data);
|
|
163
175
|
},
|
|
164
176
|
showActions: true,
|
|
165
177
|
} satisfies Partial<FormBuilderProps>,
|
|
@@ -168,7 +180,7 @@ export const MultiAutocompleteChips: Story = {
|
|
|
168
180
|
<FormBuilder {...(args as FormBuilderProps)} />
|
|
169
181
|
</div>
|
|
170
182
|
),
|
|
171
|
-
}
|
|
183
|
+
};
|
|
172
184
|
|
|
173
185
|
export const TaggingAutocomplete: Story = {
|
|
174
186
|
name: 'Autocomplete - Tagging (no options, custom values)',
|
|
@@ -196,7 +208,7 @@ export const TaggingAutocomplete: Story = {
|
|
|
196
208
|
},
|
|
197
209
|
],
|
|
198
210
|
onSubmit: (data: unknown) => {
|
|
199
|
-
console.log('Submit (tagging):', data)
|
|
211
|
+
console.log('Submit (tagging):', data);
|
|
200
212
|
},
|
|
201
213
|
showActions: true,
|
|
202
214
|
} satisfies Partial<FormBuilderProps>,
|
|
@@ -205,4 +217,4 @@ export const TaggingAutocomplete: Story = {
|
|
|
205
217
|
<FormBuilder {...(args as FormBuilderProps)} />
|
|
206
218
|
</div>
|
|
207
219
|
),
|
|
208
|
-
}
|
|
220
|
+
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
FormBuilder,
|
|
4
|
+
type FormBuilderProps,
|
|
5
|
+
} from '../../../kit/builder/form/components/FormBuilder';
|
|
3
6
|
|
|
4
7
|
const meta: Meta<typeof FormBuilder> = {
|
|
5
8
|
title: 'Kit/Builder/Form',
|
|
@@ -25,12 +28,41 @@ export const BasicUsage: Story = {
|
|
|
25
28
|
layout: 'grid',
|
|
26
29
|
grid: { cols: 1, mdCols: 2, gap: 'gap-4' },
|
|
27
30
|
fields: [
|
|
28
|
-
{
|
|
29
|
-
|
|
31
|
+
{
|
|
32
|
+
name: 'firstName',
|
|
33
|
+
label: 'First name',
|
|
34
|
+
type: 'text',
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'lastName',
|
|
39
|
+
label: 'Last name',
|
|
40
|
+
type: 'text',
|
|
41
|
+
required: true,
|
|
42
|
+
},
|
|
30
43
|
{ name: 'email', label: 'Email', type: 'email', required: true },
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
44
|
+
{
|
|
45
|
+
name: 'newsletter',
|
|
46
|
+
label: 'Subscribe to newsletter',
|
|
47
|
+
type: 'checkbox',
|
|
48
|
+
defaultValue: false,
|
|
49
|
+
gridCols: 2,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'darkMode',
|
|
53
|
+
label: 'Enable dark mode',
|
|
54
|
+
type: 'switch',
|
|
55
|
+
defaultValue: false,
|
|
56
|
+
gridCols: 2,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'darkModeStacked',
|
|
60
|
+
label: 'Enable dark mode (stacked)',
|
|
61
|
+
type: 'switch',
|
|
62
|
+
defaultValue: true,
|
|
63
|
+
labelPlacement: 'stacked',
|
|
64
|
+
gridCols: 2,
|
|
65
|
+
},
|
|
34
66
|
],
|
|
35
67
|
},
|
|
36
68
|
],
|