@k3-universe/react-kit 0.0.21 → 0.0.23
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/dist/index.js +10823 -8449
- package/dist/kit/builder/form/components/FormBuilder.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/AutocompleteField.d.ts.map +1 -1
- package/dist/kit/builder/form/types.d.ts +1 -2
- package/dist/kit/builder/form/types.d.ts.map +1 -1
- package/dist/kit/components/autocomplete/Autocomplete.d.ts +6 -33
- package/dist/kit/components/autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/kit/themes/clean-slate.css +41 -47
- package/dist/kit/themes/default.css +42 -48
- package/dist/kit/themes/minimal-modern.css +41 -47
- package/dist/kit/themes/spotify.css +41 -47
- package/package.json +9 -7
- package/src/kit/builder/data-table/components/DataTable.tsx +4 -4
- package/src/kit/builder/form/components/FormBuilder.tsx +7 -1
- package/src/kit/builder/form/components/fields/AutocompleteField.tsx +1 -2
- package/src/kit/builder/form/types.ts +1 -2
- package/src/kit/components/autocomplete/Autocomplete.tsx +433 -686
- package/src/kit/themes/default.css +1 -1
- package/src/shadcn/ui/card.tsx +1 -1
- package/src/shadcn/ui/table.tsx +4 -4
- package/src/stories/kit/builder/Form.Autocomplete.stories.tsx +2 -4
- package/src/stories/kit/components/Autocomplete.stories.tsx +159 -4
- 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
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import{j as o}from"./jsx-runtime-D_zvdyIk.js";import{F as h}from"./FormBuilder-BQBBxo_k.js";import{c as s,a as e,b as q}from"./section-factories-DCCY9R35.js";import{c as t,a as l}from"./dependencies-ctrV69dx.js";import{a as y,b as p}from"./schemas-CGNYCiJ6.js";import"./iframe-v7iAhKit.js";import"./preload-helper-Dp1pzeXC.js";import"./utils-D-KgF5mV.js";import"./button-0oMkiryo.js";import"./index-DbaA6-o1.js";import"./index-CGrAONsN.js";import"./label-Do8ODIVk.js";import"./index-Tp9IdbR8.js";import"./index-DrN5n71E.js";import"./index-CwBdPBFz.js";import"./Autocomplete-Cpg4CaJe.js";import"./popover-CcciSWAw.js";import"./index-DW48STyt.js";import"./index-CDY5kTx5.js";import"./index-BVDb4dFc.js";import"./index-0-qMRXou.js";import"./Combination-BdQWAuko.js";import"./index-BfiCOk42.js";import"./index-D8RXF03I.js";import"./index-nqc17SX4.js";import"./index-Bw1A27Kp.js";import"./index-jrimW4QO.js";import"./index-AvwFFKJc.js";import"./index-ByqivBWx.js";import"./command-Csa9p8_a.js";import"./index-Z6wF44KX.js";import"./dialog-CsnqITTn.js";import"./x-B1a4fyWM.js";import"./createLucideIcon-BrHXro7t.js";import"./badge-BnQWua6u.js";import"./check-B9hBGj6o.js";import"./input-11YRd9gD.js";import"./textarea-Dw2vruMl.js";import"./select-DDrkxaOg.js";import"./index-BdQq_4o_.js";import"./index-Bv9yk470.js";import"./index-B_qx7A5T.js";import"./index-_RPqOjlQ.js";import"./index-C9Ta0ZTH.js";import"./chevron-down-D_37S6il.js";import"./checkbox-CyIeaWHX.js";import"./switch-CKGRuk3u.js";import"./radio-group-DiJ0Y_KQ.js";import"./index-CWjrGFAQ.js";import"./circle-C5Lzx6Nx.js";import"./card-BJpPOzP8.js";import"./table-CP3vMqFn.js";import"./trash-2-xdbApPby.js";import"./grip-vertical-BxXG8KNA.js";import"./SectionBuilder-BQW705x0.js";import"./separator-o5SAUnaJ.js";import"./tabs-CopK2m3j.js";const b={when:(a,r)=>p().refine(a,{message:"Condition not met"}).pipe(r),matchField:(a,r)=>d=>d[a]===d[r],minItems:(a,r)=>y(p()).min(a,r||`Must have at least ${a} items`),maxItems:(a,r)=>y(p()).max(a,r||`Must have at most ${a} items`)},Ue={title:"Kit/Builder/Form",component:h,parameters:{controls:{expanded:!0},backgrounds:{disable:!0}}},n={name:"Complex example",render:()=>{const a=i=>{console.log("Complex form submitted:",i)},r=(i,u,m)=>{console.log(`Field ${i} changed to:`,u),console.log("All form values:",m)},d=[s.card("Personal Information",[e.text("firstName","First Name",{required:!0,placeholder:"Enter first name"}),e.text("lastName","Last Name",{required:!0,placeholder:"Enter last name"}),e.email("email","Email Address",{required:!0,placeholder:"Enter email address"}),e.date("dateOfBirth","Date of Birth",{required:!0}),e.select("gender","Gender",[{label:"Male",value:"male"},{label:"Female",value:"female"},{label:"Other",value:"other"},{label:"Prefer not to say",value:"not_specified"}],{placeholder:"Select gender"})]),s.card("Address Information",[e.object("address","Primary Address",[e.text("street","Street Address",{required:!0,placeholder:"123 Main St",gridCols:2}),e.text("city","City",{required:!0,placeholder:"New York"}),e.text("state","State/Province",{required:!0,placeholder:"NY"}),e.text("postalCode","Postal Code",{required:!0,placeholder:"10001"}),e.select("country","Country",[{label:"United States",value:"US"},{label:"Canada",value:"CA"},{label:"United Kingdom",value:"UK"},{label:"Australia",value:"AU"}],{required:!0,defaultValue:"US"})],{gridCols:2}),e.checkbox("sameAsShipping","Billing address same as shipping",{defaultValue:!0,gridCols:2}),e.object("billingAddress","Billing Address",[e.text("street","Street Address",{required:!0,placeholder:"123 Main St",gridCols:2}),e.text("city","City",{required:!0,placeholder:"New York"}),e.text("state","State/Province",{required:!0,placeholder:"NY"}),e.text("postalCode","Postal Code",{required:!0,placeholder:"10001"}),e.select("country","Country",[{label:"United States",value:"US"},{label:"Canada",value:"CA"},{label:"United Kingdom",value:"UK"},{label:"Australia",value:"AU"}],{required:!0,defaultValue:"US"})],{gridCols:2,dependencies:[t.showWhen("sameAsShipping",l.isFalse())]})]),s.card("Employment Information",[e.select("employmentStatus","Employment Status",[{label:"Employed",value:"employed"},{label:"Self-employed",value:"self_employed"},{label:"Unemployed",value:"unemployed"},{label:"Student",value:"student"},{label:"Retired",value:"retired"}],{required:!0,placeholder:"Select employment status"}),e.text("company","Company Name",{required:!0,placeholder:"Enter company name",dependencies:[t.showWhen("employmentStatus",l.equals("employed"))]}),e.text("jobTitle","Job Title",{required:!0,placeholder:"Enter job title",dependencies:[t.showWhen("employmentStatus",l.equals("employed"))]}),e.text("businessName","Business Name",{required:!0,placeholder:"Enter business name",dependencies:[t.showWhen("employmentStatus",l.equals("self_employed"))]}),e.text("businessType","Type of Business",{placeholder:"e.g., Consulting, Retail, etc.",dependencies:[t.showWhen("employmentStatus",l.equals("self_employed"))]}),e.text("school","School/University",{required:!0,placeholder:"Enter school name",dependencies:[t.showWhen("employmentStatus",l.equals("student"))]}),e.text("major","Major/Field of Study",{placeholder:"Enter your major",dependencies:[t.showWhen("employmentStatus",l.equals("student"))]}),e.number("annualIncome","Annual Income",{placeholder:"50000",validation:b.minItems(0,"Income must be positive"),dependencies:[t.showWhen("employmentStatus",i=>["employed","self_employed"].includes(i))]})]),s.card("Skills & Experience",[e.array("skills","Skills",[e.text("name","Skill Name",{required:!0,placeholder:"e.g., JavaScript, Project Management"}),e.select("level","Proficiency Level",[{label:"Beginner",value:"beginner"},{label:"Intermediate",value:"intermediate"},{label:"Advanced",value:"advanced"},{label:"Expert",value:"expert"}],{required:!0,placeholder:"Select level"}),e.number("yearsOfExperience","Years of Experience",{placeholder:"2",validation:b.minItems(0,"Years must be positive")})],{gridCols:2,defaultValue:[{name:"",level:"",yearsOfExperience:0}]})]),s.card("Professional References",[e.checkbox("hasReferences","I have professional references",{defaultValue:!1,gridCols:2}),e.array("references","References",[e.text("name","Full Name",{required:!0,placeholder:"John Doe"}),e.text("title","Job Title",{required:!0,placeholder:"Senior Manager"}),e.text("company","Company",{required:!0,placeholder:"ABC Corporation"}),e.email("email","Email",{required:!0,placeholder:"john.doe@company.com"}),e.text("phone","Phone",{validation:q.phone,placeholder:"+1 (555) 123-4567"}),e.select("relationship","Relationship",[{label:"Direct Supervisor",value:"supervisor"},{label:"Colleague",value:"colleague"},{label:"Client",value:"client"},{label:"Other",value:"other"}],{required:!0,placeholder:"Select relationship"})],{gridCols:2,defaultValue:[],dependencies:[t.showWhen("hasReferences",l.isTrue())]})]),s.card("Additional Information",[e.textarea("additionalInfo","Additional Comments",{placeholder:"Any additional information you'd like to share...",gridCols:2}),e.checkbox("agreeToTerms","I agree to the terms and conditions",{required:!0,gridCols:2}),e.checkbox("allowMarketing","I agree to receive marketing communications",{defaultValue:!1,gridCols:2})])];return o.jsxs("div",{className:"max-w-4xl mx-auto p-6",children:[o.jsxs("div",{className:"mb-8",children:[o.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Professional Profile"}),o.jsx("p",{className:"text-gray-600 mt-2",children:"Complete your professional profile with detailed information. This form demonstrates complex nested structures and field dependencies."})]}),o.jsx(h,{sections:d,onSubmit:a,onFieldChange:r,className:"space-y-8"})]})}},c={name:"Complex example (Tabs)",render:()=>{const a=i=>{console.log("Complex tabs form submitted:",i)},r=(i,u,m)=>{console.log(`[Tabs] Field ${i} changed to:`,u),console.log("[Tabs] All form values:",m)},d=[{title:"Profile Builder",layout:"tabs",variant:"card",defaultTabId:"basic",tabsListClassName:"w-full",tabsContentClassName:"mt-2",tabs:[{id:"basic",label:"Basic Info",sections:[s.card("Basic Information",[e.text("firstName","First Name",{required:!0}),e.text("lastName","Last Name",{required:!0}),e.email("email","Email Address",{required:!0}),e.date("dateOfBirth","Date of Birth",{required:!0})],{grid:{cols:1,mdCols:2,gap:"gap-4"}})]},{id:"address",label:"Addresses",sections:[s.card("Address Information",[e.object("address","Primary Address",[e.text("street","Street Address",{required:!0,gridCols:2}),e.text("city","City",{required:!0}),e.text("state","State/Province",{required:!0}),e.text("postalCode","Postal Code",{required:!0}),e.select("country","Country",[{label:"United States",value:"US"},{label:"Canada",value:"CA"},{label:"United Kingdom",value:"UK"},{label:"Australia",value:"AU"}],{required:!0,defaultValue:"US"})],{gridCols:2}),e.checkbox("sameAsShipping","Billing same as shipping",{defaultValue:!0,gridCols:2}),e.object("billingAddress","Billing Address",[e.text("street","Street Address",{required:!0,gridCols:2}),e.text("city","City",{required:!0}),e.text("state","State/Province",{required:!0}),e.text("postalCode","Postal Code",{required:!0}),e.select("country","Country",[{label:"United States",value:"US"},{label:"Canada",value:"CA"},{label:"United Kingdom",value:"UK"},{label:"Australia",value:"AU"}],{required:!0,defaultValue:"US"})],{gridCols:2,dependencies:[t.showWhen("sameAsShipping",l.isFalse())]})])]},{id:"employment",label:"Employment",sections:[s.card("Employment Information",[e.select("employmentStatus","Employment Status",[{label:"Employed",value:"employed"},{label:"Self-employed",value:"self_employed"},{label:"Unemployed",value:"unemployed"},{label:"Student",value:"student"}],{required:!0}),e.text("company","Company Name",{dependencies:[t.showWhen("employmentStatus",l.equals("employed"))]}),e.text("jobTitle","Job Title",{dependencies:[t.showWhen("employmentStatus",l.equals("employed"))]}),e.text("businessName","Business Name",{dependencies:[t.showWhen("employmentStatus",l.equals("self_employed"))]}),e.text("school","School/University",{dependencies:[t.showWhen("employmentStatus",l.equals("student"))]})])]}]}];return o.jsxs("div",{className:"max-w-4xl mx-auto p-6",children:[o.jsxs("div",{className:"mb-8",children:[o.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Professional Profile (Tabs)"}),o.jsx("p",{className:"text-gray-600 mt-2",children:"This story shows how to organize complex forms into tabs."})]}),o.jsx(h,{sections:d,onSubmit:a,onFieldChange:r,className:"space-y-8"})]})}};var x,f,g;n.parameters={...n.parameters,docs:{...(x=n.parameters)==null?void 0:x.docs,source:{originalSource:`{
|
|
2
|
+
name: 'Complex example',
|
|
3
|
+
render: () => {
|
|
4
|
+
const handleSubmit = (data: unknown) => {
|
|
5
|
+
console.log('Complex form submitted:', data);
|
|
6
|
+
};
|
|
7
|
+
const handleFieldChange = (name: string, value: unknown, allValues: Record<string, unknown>) => {
|
|
8
|
+
console.log(\`Field \${name} changed to:\`, value);
|
|
9
|
+
console.log('All form values:', allValues);
|
|
10
|
+
};
|
|
11
|
+
const sections = [createSection.card('Personal Information', [createField.text('firstName', 'First Name', {
|
|
12
|
+
required: true,
|
|
13
|
+
placeholder: 'Enter first name'
|
|
14
|
+
}), createField.text('lastName', 'Last Name', {
|
|
15
|
+
required: true,
|
|
16
|
+
placeholder: 'Enter last name'
|
|
17
|
+
}), createField.email('email', 'Email Address', {
|
|
18
|
+
required: true,
|
|
19
|
+
placeholder: 'Enter email address'
|
|
20
|
+
}), createField.date('dateOfBirth', 'Date of Birth', {
|
|
21
|
+
required: true
|
|
22
|
+
}), createField.select('gender', 'Gender', [{
|
|
23
|
+
label: 'Male',
|
|
24
|
+
value: 'male'
|
|
25
|
+
}, {
|
|
26
|
+
label: 'Female',
|
|
27
|
+
value: 'female'
|
|
28
|
+
}, {
|
|
29
|
+
label: 'Other',
|
|
30
|
+
value: 'other'
|
|
31
|
+
}, {
|
|
32
|
+
label: 'Prefer not to say',
|
|
33
|
+
value: 'not_specified'
|
|
34
|
+
}], {
|
|
35
|
+
placeholder: 'Select gender'
|
|
36
|
+
})]), createSection.card('Address Information', [createField.object('address', 'Primary Address', [createField.text('street', 'Street Address', {
|
|
37
|
+
required: true,
|
|
38
|
+
placeholder: '123 Main St',
|
|
39
|
+
gridCols: 2
|
|
40
|
+
}), createField.text('city', 'City', {
|
|
41
|
+
required: true,
|
|
42
|
+
placeholder: 'New York'
|
|
43
|
+
}), createField.text('state', 'State/Province', {
|
|
44
|
+
required: true,
|
|
45
|
+
placeholder: 'NY'
|
|
46
|
+
}), createField.text('postalCode', 'Postal Code', {
|
|
47
|
+
required: true,
|
|
48
|
+
placeholder: '10001'
|
|
49
|
+
}), createField.select('country', 'Country', [{
|
|
50
|
+
label: 'United States',
|
|
51
|
+
value: 'US'
|
|
52
|
+
}, {
|
|
53
|
+
label: 'Canada',
|
|
54
|
+
value: 'CA'
|
|
55
|
+
}, {
|
|
56
|
+
label: 'United Kingdom',
|
|
57
|
+
value: 'UK'
|
|
58
|
+
}, {
|
|
59
|
+
label: 'Australia',
|
|
60
|
+
value: 'AU'
|
|
61
|
+
}], {
|
|
62
|
+
required: true,
|
|
63
|
+
defaultValue: 'US'
|
|
64
|
+
})], {
|
|
65
|
+
gridCols: 2
|
|
66
|
+
}), createField.checkbox('sameAsShipping', 'Billing address same as shipping', {
|
|
67
|
+
defaultValue: true,
|
|
68
|
+
gridCols: 2
|
|
69
|
+
}), createField.object('billingAddress', 'Billing Address', [createField.text('street', 'Street Address', {
|
|
70
|
+
required: true,
|
|
71
|
+
placeholder: '123 Main St',
|
|
72
|
+
gridCols: 2
|
|
73
|
+
}), createField.text('city', 'City', {
|
|
74
|
+
required: true,
|
|
75
|
+
placeholder: 'New York'
|
|
76
|
+
}), createField.text('state', 'State/Province', {
|
|
77
|
+
required: true,
|
|
78
|
+
placeholder: 'NY'
|
|
79
|
+
}), createField.text('postalCode', 'Postal Code', {
|
|
80
|
+
required: true,
|
|
81
|
+
placeholder: '10001'
|
|
82
|
+
}), createField.select('country', 'Country', [{
|
|
83
|
+
label: 'United States',
|
|
84
|
+
value: 'US'
|
|
85
|
+
}, {
|
|
86
|
+
label: 'Canada',
|
|
87
|
+
value: 'CA'
|
|
88
|
+
}, {
|
|
89
|
+
label: 'United Kingdom',
|
|
90
|
+
value: 'UK'
|
|
91
|
+
}, {
|
|
92
|
+
label: 'Australia',
|
|
93
|
+
value: 'AU'
|
|
94
|
+
}], {
|
|
95
|
+
required: true,
|
|
96
|
+
defaultValue: 'US'
|
|
97
|
+
})], {
|
|
98
|
+
gridCols: 2,
|
|
99
|
+
dependencies: [createDependency.showWhen('sameAsShipping', conditions.isFalse())]
|
|
100
|
+
})]), createSection.card('Employment Information', [createField.select('employmentStatus', 'Employment Status', [{
|
|
101
|
+
label: 'Employed',
|
|
102
|
+
value: 'employed'
|
|
103
|
+
}, {
|
|
104
|
+
label: 'Self-employed',
|
|
105
|
+
value: 'self_employed'
|
|
106
|
+
}, {
|
|
107
|
+
label: 'Unemployed',
|
|
108
|
+
value: 'unemployed'
|
|
109
|
+
}, {
|
|
110
|
+
label: 'Student',
|
|
111
|
+
value: 'student'
|
|
112
|
+
}, {
|
|
113
|
+
label: 'Retired',
|
|
114
|
+
value: 'retired'
|
|
115
|
+
}], {
|
|
116
|
+
required: true,
|
|
117
|
+
placeholder: 'Select employment status'
|
|
118
|
+
}), createField.text('company', 'Company Name', {
|
|
119
|
+
required: true,
|
|
120
|
+
placeholder: 'Enter company name',
|
|
121
|
+
dependencies: [createDependency.showWhen('employmentStatus', conditions.equals('employed'))]
|
|
122
|
+
}), createField.text('jobTitle', 'Job Title', {
|
|
123
|
+
required: true,
|
|
124
|
+
placeholder: 'Enter job title',
|
|
125
|
+
dependencies: [createDependency.showWhen('employmentStatus', conditions.equals('employed'))]
|
|
126
|
+
}), createField.text('businessName', 'Business Name', {
|
|
127
|
+
required: true,
|
|
128
|
+
placeholder: 'Enter business name',
|
|
129
|
+
dependencies: [createDependency.showWhen('employmentStatus', conditions.equals('self_employed'))]
|
|
130
|
+
}), createField.text('businessType', 'Type of Business', {
|
|
131
|
+
placeholder: 'e.g., Consulting, Retail, etc.',
|
|
132
|
+
dependencies: [createDependency.showWhen('employmentStatus', conditions.equals('self_employed'))]
|
|
133
|
+
}), createField.text('school', 'School/University', {
|
|
134
|
+
required: true,
|
|
135
|
+
placeholder: 'Enter school name',
|
|
136
|
+
dependencies: [createDependency.showWhen('employmentStatus', conditions.equals('student'))]
|
|
137
|
+
}), createField.text('major', 'Major/Field of Study', {
|
|
138
|
+
placeholder: 'Enter your major',
|
|
139
|
+
dependencies: [createDependency.showWhen('employmentStatus', conditions.equals('student'))]
|
|
140
|
+
}), createField.number('annualIncome', 'Annual Income', {
|
|
141
|
+
placeholder: '50000',
|
|
142
|
+
validation: validators.minItems(0, 'Income must be positive'),
|
|
143
|
+
dependencies: [createDependency.showWhen('employmentStatus', value => ['employed', 'self_employed'].includes(value))]
|
|
144
|
+
})]), createSection.card('Skills & Experience', [createField.array('skills', 'Skills', [createField.text('name', 'Skill Name', {
|
|
145
|
+
required: true,
|
|
146
|
+
placeholder: 'e.g., JavaScript, Project Management'
|
|
147
|
+
}), createField.select('level', 'Proficiency Level', [{
|
|
148
|
+
label: 'Beginner',
|
|
149
|
+
value: 'beginner'
|
|
150
|
+
}, {
|
|
151
|
+
label: 'Intermediate',
|
|
152
|
+
value: 'intermediate'
|
|
153
|
+
}, {
|
|
154
|
+
label: 'Advanced',
|
|
155
|
+
value: 'advanced'
|
|
156
|
+
}, {
|
|
157
|
+
label: 'Expert',
|
|
158
|
+
value: 'expert'
|
|
159
|
+
}], {
|
|
160
|
+
required: true,
|
|
161
|
+
placeholder: 'Select level'
|
|
162
|
+
}), createField.number('yearsOfExperience', 'Years of Experience', {
|
|
163
|
+
placeholder: '2',
|
|
164
|
+
validation: validators.minItems(0, 'Years must be positive')
|
|
165
|
+
})], {
|
|
166
|
+
gridCols: 2,
|
|
167
|
+
defaultValue: [{
|
|
168
|
+
name: '',
|
|
169
|
+
level: '',
|
|
170
|
+
yearsOfExperience: 0
|
|
171
|
+
}]
|
|
172
|
+
})]), createSection.card('Professional References', [createField.checkbox('hasReferences', 'I have professional references', {
|
|
173
|
+
defaultValue: false,
|
|
174
|
+
gridCols: 2
|
|
175
|
+
}), createField.array('references', 'References', [createField.text('name', 'Full Name', {
|
|
176
|
+
required: true,
|
|
177
|
+
placeholder: 'John Doe'
|
|
178
|
+
}), createField.text('title', 'Job Title', {
|
|
179
|
+
required: true,
|
|
180
|
+
placeholder: 'Senior Manager'
|
|
181
|
+
}), createField.text('company', 'Company', {
|
|
182
|
+
required: true,
|
|
183
|
+
placeholder: 'ABC Corporation'
|
|
184
|
+
}), createField.email('email', 'Email', {
|
|
185
|
+
required: true,
|
|
186
|
+
placeholder: 'john.doe@company.com'
|
|
187
|
+
}), createField.text('phone', 'Phone', {
|
|
188
|
+
validation: commonValidations.phone,
|
|
189
|
+
placeholder: '+1 (555) 123-4567'
|
|
190
|
+
}), createField.select('relationship', 'Relationship', [{
|
|
191
|
+
label: 'Direct Supervisor',
|
|
192
|
+
value: 'supervisor'
|
|
193
|
+
}, {
|
|
194
|
+
label: 'Colleague',
|
|
195
|
+
value: 'colleague'
|
|
196
|
+
}, {
|
|
197
|
+
label: 'Client',
|
|
198
|
+
value: 'client'
|
|
199
|
+
}, {
|
|
200
|
+
label: 'Other',
|
|
201
|
+
value: 'other'
|
|
202
|
+
}], {
|
|
203
|
+
required: true,
|
|
204
|
+
placeholder: 'Select relationship'
|
|
205
|
+
})], {
|
|
206
|
+
gridCols: 2,
|
|
207
|
+
defaultValue: [],
|
|
208
|
+
dependencies: [createDependency.showWhen('hasReferences', conditions.isTrue())]
|
|
209
|
+
})]), createSection.card('Additional Information', [createField.textarea('additionalInfo', 'Additional Comments', {
|
|
210
|
+
placeholder: "Any additional information you'd like to share...",
|
|
211
|
+
gridCols: 2
|
|
212
|
+
}), createField.checkbox('agreeToTerms', 'I agree to the terms and conditions', {
|
|
213
|
+
required: true,
|
|
214
|
+
gridCols: 2
|
|
215
|
+
}), createField.checkbox('allowMarketing', 'I agree to receive marketing communications', {
|
|
216
|
+
defaultValue: false,
|
|
217
|
+
gridCols: 2
|
|
218
|
+
})])];
|
|
219
|
+
return <div className="max-w-4xl mx-auto p-6">
|
|
220
|
+
<div className="mb-8">
|
|
221
|
+
<h1 className="text-3xl font-bold text-gray-900">Professional Profile</h1>
|
|
222
|
+
<p className="text-gray-600 mt-2">
|
|
223
|
+
Complete your professional profile with detailed information. This form demonstrates complex nested structures and field dependencies.
|
|
224
|
+
</p>
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
<FormBuilder sections={sections} onSubmit={handleSubmit} onFieldChange={handleFieldChange} className="space-y-8" />
|
|
228
|
+
</div>;
|
|
229
|
+
}
|
|
230
|
+
}`,...(g=(f=n.parameters)==null?void 0:f.docs)==null?void 0:g.source}}};var v,S,C;c.parameters={...c.parameters,docs:{...(v=c.parameters)==null?void 0:v.docs,source:{originalSource:`{
|
|
231
|
+
name: 'Complex example (Tabs)',
|
|
232
|
+
render: () => {
|
|
233
|
+
const handleSubmit = (data: unknown) => {
|
|
234
|
+
console.log('Complex tabs form submitted:', data);
|
|
235
|
+
};
|
|
236
|
+
const handleFieldChange = (name: string, value: unknown, allValues: Record<string, unknown>) => {
|
|
237
|
+
console.log(\`[Tabs] Field \${name} changed to:\`, value);
|
|
238
|
+
console.log('[Tabs] All form values:', allValues);
|
|
239
|
+
};
|
|
240
|
+
const sections: FormBuilderSectionConfig[] = [{
|
|
241
|
+
title: 'Profile Builder',
|
|
242
|
+
layout: 'tabs',
|
|
243
|
+
variant: 'card',
|
|
244
|
+
defaultTabId: 'basic',
|
|
245
|
+
tabsListClassName: 'w-full',
|
|
246
|
+
tabsContentClassName: 'mt-2',
|
|
247
|
+
tabs: [{
|
|
248
|
+
id: 'basic',
|
|
249
|
+
label: 'Basic Info',
|
|
250
|
+
sections: [createSection.card('Basic Information', [createField.text('firstName', 'First Name', {
|
|
251
|
+
required: true
|
|
252
|
+
}), createField.text('lastName', 'Last Name', {
|
|
253
|
+
required: true
|
|
254
|
+
}), createField.email('email', 'Email Address', {
|
|
255
|
+
required: true
|
|
256
|
+
}), createField.date('dateOfBirth', 'Date of Birth', {
|
|
257
|
+
required: true
|
|
258
|
+
})], {
|
|
259
|
+
grid: {
|
|
260
|
+
cols: 1,
|
|
261
|
+
mdCols: 2,
|
|
262
|
+
gap: 'gap-4'
|
|
263
|
+
}
|
|
264
|
+
})]
|
|
265
|
+
}, {
|
|
266
|
+
id: 'address',
|
|
267
|
+
label: 'Addresses',
|
|
268
|
+
sections: [createSection.card('Address Information', [createField.object('address', 'Primary Address', [createField.text('street', 'Street Address', {
|
|
269
|
+
required: true,
|
|
270
|
+
gridCols: 2
|
|
271
|
+
}), createField.text('city', 'City', {
|
|
272
|
+
required: true
|
|
273
|
+
}), createField.text('state', 'State/Province', {
|
|
274
|
+
required: true
|
|
275
|
+
}), createField.text('postalCode', 'Postal Code', {
|
|
276
|
+
required: true
|
|
277
|
+
}), createField.select('country', 'Country', [{
|
|
278
|
+
label: 'United States',
|
|
279
|
+
value: 'US'
|
|
280
|
+
}, {
|
|
281
|
+
label: 'Canada',
|
|
282
|
+
value: 'CA'
|
|
283
|
+
}, {
|
|
284
|
+
label: 'United Kingdom',
|
|
285
|
+
value: 'UK'
|
|
286
|
+
}, {
|
|
287
|
+
label: 'Australia',
|
|
288
|
+
value: 'AU'
|
|
289
|
+
}], {
|
|
290
|
+
required: true,
|
|
291
|
+
defaultValue: 'US'
|
|
292
|
+
})], {
|
|
293
|
+
gridCols: 2
|
|
294
|
+
}), createField.checkbox('sameAsShipping', 'Billing same as shipping', {
|
|
295
|
+
defaultValue: true,
|
|
296
|
+
gridCols: 2
|
|
297
|
+
}), createField.object('billingAddress', 'Billing Address', [createField.text('street', 'Street Address', {
|
|
298
|
+
required: true,
|
|
299
|
+
gridCols: 2
|
|
300
|
+
}), createField.text('city', 'City', {
|
|
301
|
+
required: true
|
|
302
|
+
}), createField.text('state', 'State/Province', {
|
|
303
|
+
required: true
|
|
304
|
+
}), createField.text('postalCode', 'Postal Code', {
|
|
305
|
+
required: true
|
|
306
|
+
}), createField.select('country', 'Country', [{
|
|
307
|
+
label: 'United States',
|
|
308
|
+
value: 'US'
|
|
309
|
+
}, {
|
|
310
|
+
label: 'Canada',
|
|
311
|
+
value: 'CA'
|
|
312
|
+
}, {
|
|
313
|
+
label: 'United Kingdom',
|
|
314
|
+
value: 'UK'
|
|
315
|
+
}, {
|
|
316
|
+
label: 'Australia',
|
|
317
|
+
value: 'AU'
|
|
318
|
+
}], {
|
|
319
|
+
required: true,
|
|
320
|
+
defaultValue: 'US'
|
|
321
|
+
})], {
|
|
322
|
+
gridCols: 2,
|
|
323
|
+
dependencies: [createDependency.showWhen('sameAsShipping', conditions.isFalse())]
|
|
324
|
+
})])]
|
|
325
|
+
}, {
|
|
326
|
+
id: 'employment',
|
|
327
|
+
label: 'Employment',
|
|
328
|
+
sections: [createSection.card('Employment Information', [createField.select('employmentStatus', 'Employment Status', [{
|
|
329
|
+
label: 'Employed',
|
|
330
|
+
value: 'employed'
|
|
331
|
+
}, {
|
|
332
|
+
label: 'Self-employed',
|
|
333
|
+
value: 'self_employed'
|
|
334
|
+
}, {
|
|
335
|
+
label: 'Unemployed',
|
|
336
|
+
value: 'unemployed'
|
|
337
|
+
}, {
|
|
338
|
+
label: 'Student',
|
|
339
|
+
value: 'student'
|
|
340
|
+
}], {
|
|
341
|
+
required: true
|
|
342
|
+
}), createField.text('company', 'Company Name', {
|
|
343
|
+
dependencies: [createDependency.showWhen('employmentStatus', conditions.equals('employed'))]
|
|
344
|
+
}), createField.text('jobTitle', 'Job Title', {
|
|
345
|
+
dependencies: [createDependency.showWhen('employmentStatus', conditions.equals('employed'))]
|
|
346
|
+
}), createField.text('businessName', 'Business Name', {
|
|
347
|
+
dependencies: [createDependency.showWhen('employmentStatus', conditions.equals('self_employed'))]
|
|
348
|
+
}), createField.text('school', 'School/University', {
|
|
349
|
+
dependencies: [createDependency.showWhen('employmentStatus', conditions.equals('student'))]
|
|
350
|
+
})])]
|
|
351
|
+
}]
|
|
352
|
+
}];
|
|
353
|
+
return <div className="max-w-4xl mx-auto p-6">
|
|
354
|
+
<div className="mb-8">
|
|
355
|
+
<h1 className="text-3xl font-bold text-gray-900">Professional Profile (Tabs)</h1>
|
|
356
|
+
<p className="text-gray-600 mt-2">This story shows how to organize complex forms into tabs.</p>
|
|
357
|
+
</div>
|
|
358
|
+
<FormBuilder sections={sections} onSubmit={handleSubmit} onFieldChange={handleFieldChange} className="space-y-8" />
|
|
359
|
+
</div>;
|
|
360
|
+
}
|
|
361
|
+
}`,...(C=(S=c.parameters)==null?void 0:S.docs)==null?void 0:C.source}}};const we=["ComplexExample","ComplexTabsExample"];export{n as ComplexExample,c as ComplexTabsExample,we as __namedExportsOrder,Ue as default};
|