@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.
Files changed (427) hide show
  1. package/dist/index.js +10823 -8449
  2. package/dist/kit/builder/form/components/FormBuilder.d.ts.map +1 -1
  3. package/dist/kit/builder/form/components/fields/AutocompleteField.d.ts.map +1 -1
  4. package/dist/kit/builder/form/types.d.ts +1 -2
  5. package/dist/kit/builder/form/types.d.ts.map +1 -1
  6. package/dist/kit/components/autocomplete/Autocomplete.d.ts +6 -33
  7. package/dist/kit/components/autocomplete/Autocomplete.d.ts.map +1 -1
  8. package/dist/kit/themes/clean-slate.css +41 -47
  9. package/dist/kit/themes/default.css +42 -48
  10. package/dist/kit/themes/minimal-modern.css +41 -47
  11. package/dist/kit/themes/spotify.css +41 -47
  12. package/package.json +9 -7
  13. package/src/kit/builder/data-table/components/DataTable.tsx +4 -4
  14. package/src/kit/builder/form/components/FormBuilder.tsx +7 -1
  15. package/src/kit/builder/form/components/fields/AutocompleteField.tsx +1 -2
  16. package/src/kit/builder/form/types.ts +1 -2
  17. package/src/kit/components/autocomplete/Autocomplete.tsx +433 -686
  18. package/src/kit/themes/default.css +1 -1
  19. package/src/shadcn/ui/card.tsx +1 -1
  20. package/src/shadcn/ui/table.tsx +4 -4
  21. package/src/stories/kit/builder/Form.Autocomplete.stories.tsx +2 -4
  22. package/src/stories/kit/components/Autocomplete.stories.tsx +159 -4
  23. package/storybook-static/assets/Accordion.stories-KU4JBR8U.js +52 -0
  24. package/storybook-static/assets/AdminLayout-CPvVCwfY.js +53 -0
  25. package/storybook-static/assets/AdminLayout.Basic.stories-DkP2UVXe.js +4 -0
  26. package/storybook-static/assets/AdminLayout.Collapsible.stories-BuuVjtpW.js +4 -0
  27. package/storybook-static/assets/AdminLayout.Complex.stories-D-k4H0hJ.js +29 -0
  28. package/storybook-static/assets/AdminLayout.CustomSidebarHeaderComponent.stories-B_0IEDd4.js +9 -0
  29. package/storybook-static/assets/AdminLayout.CustomSidebarTitleAndIcon.stories-CvAeXUyA.js +4 -0
  30. package/storybook-static/assets/AdminLayout.HeaderSlots.stories-RBFHoSZK.js +7 -0
  31. package/storybook-static/assets/Alert.stories-DKxKtIc0.js +27 -0
  32. package/storybook-static/assets/AlertDialog.stories-BqTpZ_nG.js +43 -0
  33. package/storybook-static/assets/AspectRatio.stories-DPO9QQ5F.js +22 -0
  34. package/storybook-static/assets/Autocomplete-Cpg4CaJe.js +56 -0
  35. package/storybook-static/assets/Autocomplete.stories-CWj4G5fh.js +56 -0
  36. package/storybook-static/assets/Avatar.stories-DPhov_2g.js +12 -0
  37. package/storybook-static/assets/Badge.stories-DFKrRdXq.js +12 -0
  38. package/storybook-static/assets/Breadcrumb.stories-CTE6CZUC.js +25 -0
  39. package/storybook-static/assets/Button.stories-cbt2InL-.js +26 -0
  40. package/storybook-static/assets/Calendar.stories-DRhTw_43.js +3 -0
  41. package/storybook-static/assets/Card.stories-Isf6n_K3.js +15 -0
  42. package/storybook-static/assets/Carousel.stories-Cmg0I3fR.js +15 -0
  43. package/storybook-static/assets/Chart.stories-aQ-fNijT.js +126 -0
  44. package/storybook-static/assets/Checkbox.stories-B7YMXPDc.js +12 -0
  45. package/storybook-static/assets/Collapsible.stories-BUzl17ZZ.js +18 -0
  46. package/storybook-static/assets/Combination-BdQWAuko.js +41 -0
  47. package/storybook-static/assets/Command.stories-DzBlWQs0.js +30 -0
  48. package/storybook-static/assets/ContextMenu.stories-CJlBQyXc.js +31 -0
  49. package/storybook-static/assets/DataTable.Basic.stories-BWYKFDmK.js +6 -0
  50. package/storybook-static/assets/DataTable.Filters.stories-uZdtJk8t.js +21 -0
  51. package/storybook-static/assets/DataTable.Pagination.stories-C5N1khkp.js +24 -0
  52. package/storybook-static/assets/DataTable.SelectionAndActions.stories-FhCqZKvO.js +26 -0
  53. package/storybook-static/assets/DataTable.Sorting.stories-D-k7EtRj.js +6 -0
  54. package/storybook-static/assets/Dialog.stories-C62AF-Gx.js +54 -0
  55. package/storybook-static/assets/Dialog.stories-lrjRwOus.js +18 -0
  56. package/storybook-static/assets/Drawer.stories-CGjkdJeV.js +24 -0
  57. package/storybook-static/assets/DropdownMenu.stories-DkGClRAA.js +35 -0
  58. package/storybook-static/assets/Form.ArrayLayouts.stories-C5d_062d.js +130 -0
  59. package/storybook-static/assets/Form.Autocomplete.stories-CPZPkk4o.js +142 -0
  60. package/storybook-static/assets/Form.Basic.stories-Bhcu3-3n.js +58 -0
  61. package/storybook-static/assets/Form.Complex.stories-QnXh5a7Q.js +361 -0
  62. package/storybook-static/assets/Form.Dynamic.stories-DFW6wIuT.js +502 -0
  63. package/storybook-static/assets/Form.Simple.stories-BhJcyhbE.js +53 -0
  64. package/storybook-static/assets/Form.stories-PFNsMYxO.js +3 -0
  65. package/storybook-static/assets/FormBuilder-BQBBxo_k.js +5 -0
  66. package/storybook-static/assets/HoverCard.stories-CAlQEVn8.js +21 -0
  67. package/storybook-static/assets/Input.stories-CEhODt0V.js +16 -0
  68. package/storybook-static/assets/InputOtp.stories-DSvNP4dS.js +42 -0
  69. package/storybook-static/assets/Label.stories-B3pa8ZLY.js +14 -0
  70. package/storybook-static/assets/Login.stories-C7KQkmR_.js +37 -0
  71. package/storybook-static/assets/Menubar.stories-CHXhSHxc.js +44 -0
  72. package/storybook-static/assets/MonthPicker.stories-BnrOc4fm.js +99 -0
  73. package/storybook-static/assets/MonthRangePicker.stories-55Gk1t-7.js +134 -0
  74. package/storybook-static/assets/NavigationMenu.stories-CXoS080P.js +30 -0
  75. package/storybook-static/assets/Page.stories-GdSJgZ6-.js +91 -0
  76. package/storybook-static/assets/Pagination.stories-BEBwqH4N.js +29 -0
  77. package/storybook-static/assets/Popover.stories-BICy98Cw.js +15 -0
  78. package/storybook-static/assets/Progress.stories-DECHNOME.js +8 -0
  79. package/storybook-static/assets/RadioGroup.stories-DA7-uKfV.js +16 -0
  80. package/storybook-static/assets/Resizable.stories-B99kWkH7.js +25 -0
  81. package/storybook-static/assets/ScrollArea.stories-BqvUAXqU.js +12 -0
  82. package/storybook-static/assets/Section.stories-lFMlFBQn.js +277 -0
  83. package/storybook-static/assets/SectionBuilder-BQW705x0.js +1 -0
  84. package/storybook-static/assets/Select.stories-BsKyZ6Io.js +17 -0
  85. package/storybook-static/assets/Separator.stories-BTDOaOM2.js +17 -0
  86. package/storybook-static/assets/Sheet.stories-Cam1gR6G.js +24 -0
  87. package/storybook-static/assets/Sidebar.stories-DnOa6G7y.js +106 -0
  88. package/storybook-static/assets/Skeleton.stories-BQNIuIe5.js +9 -0
  89. package/storybook-static/assets/Slider.stories-Bslq7hjq.js +6 -0
  90. package/storybook-static/assets/Sonner.stories-D34pBBtI.js +18 -0
  91. package/storybook-static/assets/Switch.stories-Puyb1-Bx.js +3 -0
  92. package/storybook-static/assets/Table.stories-ClZxAhut.js +35 -0
  93. package/storybook-static/assets/Tabs.stories-CURNTETB.js +10 -0
  94. package/storybook-static/assets/Textarea.stories-Cf1ZBrWw.js +17 -0
  95. package/storybook-static/assets/Toggle.stories-CdMHY_bi.js +3 -0
  96. package/storybook-static/assets/ToggleGroup.stories-BM68m1dX.js +13 -0
  97. package/storybook-static/assets/Tooltip.stories-DiQv64dM.js +10 -0
  98. package/storybook-static/assets/accordion-DVgwQcnw.js +1 -0
  99. package/storybook-static/assets/alert-dialog-DCUEwpqm.js +7 -0
  100. package/storybook-static/assets/avatar-BzwOE-mi.js +1 -0
  101. package/storybook-static/assets/axe-HmUsR1st.js +30 -0
  102. package/storybook-static/assets/badge-BnQWua6u.js +1 -0
  103. package/storybook-static/assets/button-0oMkiryo.js +1 -0
  104. package/storybook-static/assets/card-BJpPOzP8.js +1 -0
  105. package/storybook-static/assets/chart-column-DZGb4ZZS.js +6 -0
  106. package/storybook-static/assets/check-B9hBGj6o.js +6 -0
  107. package/storybook-static/assets/checkbox-CyIeaWHX.js +1 -0
  108. package/storybook-static/assets/chevron-down-D_37S6il.js +6 -0
  109. package/storybook-static/assets/chevron-left-BBoN0vbI.js +6 -0
  110. package/storybook-static/assets/chevron-right-B5vIMLxK.js +6 -0
  111. package/storybook-static/assets/circle-C5Lzx6Nx.js +6 -0
  112. package/storybook-static/assets/clean-slate-D1HmMFJM.css +1 -0
  113. package/storybook-static/assets/command-Csa9p8_a.js +6 -0
  114. package/storybook-static/assets/createLucideIcon-BrHXro7t.js +21 -0
  115. package/storybook-static/assets/default-CN_Fo1GY.css +1 -0
  116. package/storybook-static/assets/dependencies-ctrV69dx.js +1 -0
  117. package/storybook-static/assets/dialog-CsnqITTn.js +1 -0
  118. package/storybook-static/assets/dropdown-menu-BWxxwPHL.js +1 -0
  119. package/storybook-static/assets/ellipsis-BRS038RR.js +6 -0
  120. package/storybook-static/assets/grip-vertical-BxXG8KNA.js +6 -0
  121. package/storybook-static/assets/iframe-C9bogcIc.css +1 -0
  122. package/storybook-static/assets/iframe-v7iAhKit.js +1555 -0
  123. package/storybook-static/assets/index-0-qMRXou.js +1 -0
  124. package/storybook-static/assets/index-AvwFFKJc.js +1 -0
  125. package/storybook-static/assets/index-BVDb4dFc.js +1 -0
  126. package/storybook-static/assets/index-B_qx7A5T.js +1 -0
  127. package/storybook-static/assets/index-BdQq_4o_.js +1 -0
  128. package/storybook-static/assets/index-BfiCOk42.js +1 -0
  129. package/storybook-static/assets/index-Bv9yk470.js +1 -0
  130. package/storybook-static/assets/index-Bw1A27Kp.js +1 -0
  131. package/storybook-static/assets/index-ByqivBWx.js +1 -0
  132. package/storybook-static/assets/index-C9Ta0ZTH.js +1 -0
  133. package/storybook-static/assets/index-CDY5kTx5.js +1 -0
  134. package/storybook-static/assets/index-CGnyVRgB.js +1 -0
  135. package/storybook-static/assets/index-CGrAONsN.js +1 -0
  136. package/storybook-static/assets/index-CWjrGFAQ.js +1 -0
  137. package/storybook-static/assets/index-CwBdPBFz.js +9 -0
  138. package/storybook-static/assets/index-D8RXF03I.js +1 -0
  139. package/storybook-static/assets/index-DLIxT4Z7.js +1 -0
  140. package/storybook-static/assets/index-DW48STyt.js +1 -0
  141. package/storybook-static/assets/index-DbaA6-o1.js +1 -0
  142. package/storybook-static/assets/index-Dph_5COR.js +1 -0
  143. package/storybook-static/assets/index-DrN5n71E.js +1 -0
  144. package/storybook-static/assets/index-Tp9IdbR8.js +1 -0
  145. package/storybook-static/assets/index-WyF3-wTE.js +9 -0
  146. package/storybook-static/assets/index-XSmPROEP.js +1 -0
  147. package/storybook-static/assets/index-Z6wF44KX.js +5 -0
  148. package/storybook-static/assets/index-_RPqOjlQ.js +1 -0
  149. package/storybook-static/assets/index-jrimW4QO.js +1 -0
  150. package/storybook-static/assets/index-nqc17SX4.js +1 -0
  151. package/storybook-static/assets/input-11YRd9gD.js +1 -0
  152. package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +9 -0
  153. package/storybook-static/assets/label-Do8ODIVk.js +1 -0
  154. package/storybook-static/assets/lodash-DDwpuhPG.js +73 -0
  155. package/storybook-static/assets/matchers-7Z3WT2CE-T3xScrR7.js +14 -0
  156. package/storybook-static/assets/minimal-modern-BlYVzfQU.css +1 -0
  157. package/storybook-static/assets/popover-CcciSWAw.js +1 -0
  158. package/storybook-static/assets/preload-helper-Dp1pzeXC.js +1 -0
  159. package/storybook-static/assets/radio-group-DiJ0Y_KQ.js +1 -0
  160. package/storybook-static/assets/react-18-Cr9fq_Ip.js +25 -0
  161. package/storybook-static/assets/react-icons.esm-B_ULMmNU.js +1 -0
  162. package/storybook-static/assets/refresh-cw-BmRDhIV_.js +6 -0
  163. package/storybook-static/assets/schemas-CGNYCiJ6.js +18 -0
  164. package/storybook-static/assets/section-factories-DCCY9R35.js +1 -0
  165. package/storybook-static/assets/select-DDrkxaOg.js +6 -0
  166. package/storybook-static/assets/separator-o5SAUnaJ.js +1 -0
  167. package/storybook-static/assets/settings-2-xWGvvbG6.js +6 -0
  168. package/storybook-static/assets/sheet-C7jhU3XE.js +1 -0
  169. package/storybook-static/assets/shopping-cart-BFlrufvo.js +11 -0
  170. package/storybook-static/assets/sidebar-C8hU1Mxy.js +6 -0
  171. package/storybook-static/assets/skeleton-CjDnQs43.js +1 -0
  172. package/storybook-static/assets/spotify-CUDj7g8m.css +1 -0
  173. package/storybook-static/assets/switch-CKGRuk3u.js +1 -0
  174. package/storybook-static/assets/table-CP3vMqFn.js +1 -0
  175. package/storybook-static/assets/tabs-CopK2m3j.js +1 -0
  176. package/storybook-static/assets/textarea-Dw2vruMl.js +1 -0
  177. package/storybook-static/assets/toggle-DmHbWetf.js +16 -0
  178. package/storybook-static/assets/tooltip-_LqYEYFw.js +1 -0
  179. package/storybook-static/assets/trash-2-xdbApPby.js +11 -0
  180. package/storybook-static/assets/utils-D-KgF5mV.js +1 -0
  181. package/storybook-static/assets/x-B1a4fyWM.js +6 -0
  182. package/storybook-static/favicon-wrapper.svg +46 -0
  183. package/storybook-static/favicon.svg +1 -0
  184. package/storybook-static/iframe.html +687 -0
  185. package/storybook-static/index.d.ts +64 -0
  186. package/storybook-static/index.d.ts.map +1 -0
  187. package/storybook-static/index.html +166 -0
  188. package/storybook-static/index.json +1 -0
  189. package/storybook-static/kit/builder/data-table/components/DataTable.d.ts +37 -0
  190. package/storybook-static/kit/builder/data-table/components/DataTable.d.ts.map +1 -0
  191. package/storybook-static/kit/builder/data-table/components/DataTableColumnHeader.d.ts +8 -0
  192. package/storybook-static/kit/builder/data-table/components/DataTableColumnHeader.d.ts.map +1 -0
  193. package/storybook-static/kit/builder/data-table/components/DataTablePagination.d.ts +6 -0
  194. package/storybook-static/kit/builder/data-table/components/DataTablePagination.d.ts.map +1 -0
  195. package/storybook-static/kit/builder/data-table/components/DataTableViewOptions.d.ts +5 -0
  196. package/storybook-static/kit/builder/data-table/components/DataTableViewOptions.d.ts.map +1 -0
  197. package/storybook-static/kit/builder/data-table/index.d.ts +7 -0
  198. package/storybook-static/kit/builder/data-table/index.d.ts.map +1 -0
  199. package/storybook-static/kit/builder/data-table/types.d.ts +27 -0
  200. package/storybook-static/kit/builder/data-table/types.d.ts.map +1 -0
  201. package/storybook-static/kit/builder/data-table/utils/dotAccessor.d.ts +2 -0
  202. package/storybook-static/kit/builder/data-table/utils/dotAccessor.d.ts.map +1 -0
  203. package/storybook-static/kit/builder/dialog/index.d.ts +3 -0
  204. package/storybook-static/kit/builder/dialog/index.d.ts.map +1 -0
  205. package/storybook-static/kit/builder/dialog/provider.d.ts +26 -0
  206. package/storybook-static/kit/builder/dialog/provider.d.ts.map +1 -0
  207. package/storybook-static/kit/builder/form/components/FormBuilder.d.ts +137 -0
  208. package/storybook-static/kit/builder/form/components/FormBuilder.d.ts.map +1 -0
  209. package/storybook-static/kit/builder/form/components/FormBuilderActions.d.ts +20 -0
  210. package/storybook-static/kit/builder/form/components/FormBuilderActions.d.ts.map +1 -0
  211. package/storybook-static/kit/builder/form/components/FormBuilderField.d.ts +12 -0
  212. package/storybook-static/kit/builder/form/components/FormBuilderField.d.ts.map +1 -0
  213. package/storybook-static/kit/builder/form/components/fields/ArrayField.d.ts +3 -0
  214. package/storybook-static/kit/builder/form/components/fields/ArrayField.d.ts.map +1 -0
  215. package/storybook-static/kit/builder/form/components/fields/AutocompleteField.d.ts +3 -0
  216. package/storybook-static/kit/builder/form/components/fields/AutocompleteField.d.ts.map +1 -0
  217. package/storybook-static/kit/builder/form/components/fields/CheckboxField.d.ts +3 -0
  218. package/storybook-static/kit/builder/form/components/fields/CheckboxField.d.ts.map +1 -0
  219. package/storybook-static/kit/builder/form/components/fields/DateField.d.ts +3 -0
  220. package/storybook-static/kit/builder/form/components/fields/DateField.d.ts.map +1 -0
  221. package/storybook-static/kit/builder/form/components/fields/FileField.d.ts +3 -0
  222. package/storybook-static/kit/builder/form/components/fields/FileField.d.ts.map +1 -0
  223. package/storybook-static/kit/builder/form/components/fields/NumberField.d.ts +3 -0
  224. package/storybook-static/kit/builder/form/components/fields/NumberField.d.ts.map +1 -0
  225. package/storybook-static/kit/builder/form/components/fields/ObjectField.d.ts +3 -0
  226. package/storybook-static/kit/builder/form/components/fields/ObjectField.d.ts.map +1 -0
  227. package/storybook-static/kit/builder/form/components/fields/RadioField.d.ts +3 -0
  228. package/storybook-static/kit/builder/form/components/fields/RadioField.d.ts.map +1 -0
  229. package/storybook-static/kit/builder/form/components/fields/SelectField.d.ts +3 -0
  230. package/storybook-static/kit/builder/form/components/fields/SelectField.d.ts.map +1 -0
  231. package/storybook-static/kit/builder/form/components/fields/SwitchField.d.ts +3 -0
  232. package/storybook-static/kit/builder/form/components/fields/SwitchField.d.ts.map +1 -0
  233. package/storybook-static/kit/builder/form/components/fields/TextField.d.ts +3 -0
  234. package/storybook-static/kit/builder/form/components/fields/TextField.d.ts.map +1 -0
  235. package/storybook-static/kit/builder/form/components/fields/TextareaField.d.ts +3 -0
  236. package/storybook-static/kit/builder/form/components/fields/TextareaField.d.ts.map +1 -0
  237. package/storybook-static/kit/builder/form/components/fields/index.d.ts +14 -0
  238. package/storybook-static/kit/builder/form/components/fields/index.d.ts.map +1 -0
  239. package/storybook-static/kit/builder/form/components/fields/types.d.ts +14 -0
  240. package/storybook-static/kit/builder/form/components/fields/types.d.ts.map +1 -0
  241. package/storybook-static/kit/builder/form/components/index.d.ts +4 -0
  242. package/storybook-static/kit/builder/form/components/index.d.ts.map +1 -0
  243. package/storybook-static/kit/builder/form/index.d.ts +3 -0
  244. package/storybook-static/kit/builder/form/index.d.ts.map +1 -0
  245. package/storybook-static/kit/builder/form/utils/common-forms.d.ts +7 -0
  246. package/storybook-static/kit/builder/form/utils/common-forms.d.ts.map +1 -0
  247. package/storybook-static/kit/builder/form/utils/dependencies.d.ts +41 -0
  248. package/storybook-static/kit/builder/form/utils/dependencies.d.ts.map +1 -0
  249. package/storybook-static/kit/builder/form/utils/field-factories.d.ts +23 -0
  250. package/storybook-static/kit/builder/form/utils/field-factories.d.ts.map +1 -0
  251. package/storybook-static/kit/builder/form/utils/index.d.ts +15 -0
  252. package/storybook-static/kit/builder/form/utils/index.d.ts.map +1 -0
  253. package/storybook-static/kit/builder/form/utils/section-factories.d.ts +7 -0
  254. package/storybook-static/kit/builder/form/utils/section-factories.d.ts.map +1 -0
  255. package/storybook-static/kit/builder/form/utils/transformers.d.ts +6 -0
  256. package/storybook-static/kit/builder/form/utils/transformers.d.ts.map +1 -0
  257. package/storybook-static/kit/builder/form/utils/validations.d.ts +13 -0
  258. package/storybook-static/kit/builder/form/utils/validations.d.ts.map +1 -0
  259. package/storybook-static/kit/builder/form/utils/validators.d.ts +8 -0
  260. package/storybook-static/kit/builder/form/utils/validators.d.ts.map +1 -0
  261. package/storybook-static/kit/builder/page/Page.d.ts +48 -0
  262. package/storybook-static/kit/builder/page/Page.d.ts.map +1 -0
  263. package/storybook-static/kit/builder/page/index.d.ts +2 -0
  264. package/storybook-static/kit/builder/page/index.d.ts.map +1 -0
  265. package/storybook-static/kit/builder/section/SectionBuilder.d.ts +3 -0
  266. package/storybook-static/kit/builder/section/SectionBuilder.d.ts.map +1 -0
  267. package/storybook-static/kit/builder/section/index.d.ts +3 -0
  268. package/storybook-static/kit/builder/section/index.d.ts.map +1 -0
  269. package/storybook-static/kit/builder/section/types.d.ts +70 -0
  270. package/storybook-static/kit/builder/section/types.d.ts.map +1 -0
  271. package/storybook-static/kit/builder/stack-dialog/context.d.ts +3 -0
  272. package/storybook-static/kit/builder/stack-dialog/context.d.ts.map +1 -0
  273. package/storybook-static/kit/builder/stack-dialog/hooks.d.ts +6 -0
  274. package/storybook-static/kit/builder/stack-dialog/hooks.d.ts.map +1 -0
  275. package/storybook-static/kit/builder/stack-dialog/index.d.ts +5 -0
  276. package/storybook-static/kit/builder/stack-dialog/index.d.ts.map +1 -0
  277. package/storybook-static/kit/builder/stack-dialog/provider.d.ts +3 -0
  278. package/storybook-static/kit/builder/stack-dialog/provider.d.ts.map +1 -0
  279. package/storybook-static/kit/builder/stack-dialog/renderer.d.ts +6 -0
  280. package/storybook-static/kit/builder/stack-dialog/renderer.d.ts.map +1 -0
  281. package/storybook-static/kit/builder/stack-dialog/types.d.ts +20 -0
  282. package/storybook-static/kit/builder/stack-dialog/types.d.ts.map +1 -0
  283. package/storybook-static/kit/components/autocomplete/Autocomplete.d.ts +53 -0
  284. package/storybook-static/kit/components/autocomplete/Autocomplete.d.ts.map +1 -0
  285. package/storybook-static/kit/components/autocomplete/index.d.ts +4 -0
  286. package/storybook-static/kit/components/autocomplete/index.d.ts.map +1 -0
  287. package/storybook-static/kit/components/autocomplete/types.d.ts +19 -0
  288. package/storybook-static/kit/components/autocomplete/types.d.ts.map +1 -0
  289. package/storybook-static/kit/components/login/Login.d.ts +29 -0
  290. package/storybook-static/kit/components/login/Login.d.ts.map +1 -0
  291. package/storybook-static/kit/components/login/index.d.ts +2 -0
  292. package/storybook-static/kit/components/login/index.d.ts.map +1 -0
  293. package/storybook-static/kit/components/monthpicker/MonthPicker.d.ts +32 -0
  294. package/storybook-static/kit/components/monthpicker/MonthPicker.d.ts.map +1 -0
  295. package/storybook-static/kit/components/monthpicker/MonthRangePicker.d.ts +48 -0
  296. package/storybook-static/kit/components/monthpicker/MonthRangePicker.d.ts.map +1 -0
  297. package/storybook-static/kit/layouts/admin/components/AdminLayout.d.ts +17 -0
  298. package/storybook-static/kit/layouts/admin/components/AdminLayout.d.ts.map +1 -0
  299. package/storybook-static/kit/layouts/admin/components/ThemeToggle.d.ts +5 -0
  300. package/storybook-static/kit/layouts/admin/components/ThemeToggle.d.ts.map +1 -0
  301. package/storybook-static/kit/layouts/admin/hooks/menu.d.ts +13 -0
  302. package/storybook-static/kit/layouts/admin/hooks/menu.d.ts.map +1 -0
  303. package/storybook-static/kit/layouts/admin/providers/AdminMenuProvider.d.ts +7 -0
  304. package/storybook-static/kit/layouts/admin/providers/AdminMenuProvider.d.ts.map +1 -0
  305. package/storybook-static/kit/layouts/admin/types/index.d.ts +27 -0
  306. package/storybook-static/kit/layouts/admin/types/index.d.ts.map +1 -0
  307. package/storybook-static/kit/providers/ThemeProvider.d.ts +14 -0
  308. package/storybook-static/kit/providers/ThemeProvider.d.ts.map +1 -0
  309. package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
  310. package/storybook-static/nunito-sans-bold.woff2 +0 -0
  311. package/storybook-static/nunito-sans-italic.woff2 +0 -0
  312. package/storybook-static/nunito-sans-regular.woff2 +0 -0
  313. package/storybook-static/project.json +1 -0
  314. package/storybook-static/sb-addons/a11y-5/manager-bundle.js +5 -0
  315. package/storybook-static/sb-addons/essentials-backgrounds-1/manager-bundle.js +3 -0
  316. package/storybook-static/sb-addons/essentials-measure-2/manager-bundle.js +3 -0
  317. package/storybook-static/sb-addons/essentials-outline-3/manager-bundle.js +3 -0
  318. package/storybook-static/sb-addons/interactions-4/manager-bundle.js +57 -0
  319. package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +971 -0
  320. package/storybook-static/sb-addons/storysource-6/manager-bundle.js +3 -0
  321. package/storybook-static/sb-common-assets/favicon-wrapper.svg +46 -0
  322. package/storybook-static/sb-common-assets/favicon.svg +1 -0
  323. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  324. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  325. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  326. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  327. package/storybook-static/sb-manager/globals-module-info.js +797 -0
  328. package/storybook-static/sb-manager/globals-runtime.js +69653 -0
  329. package/storybook-static/sb-manager/globals.js +34 -0
  330. package/storybook-static/sb-manager/runtime.js +13181 -0
  331. package/storybook-static/shadcn/hooks/use-mobile.d.ts +2 -0
  332. package/storybook-static/shadcn/hooks/use-mobile.d.ts.map +1 -0
  333. package/storybook-static/shadcn/lib/utils.d.ts +3 -0
  334. package/storybook-static/shadcn/lib/utils.d.ts.map +1 -0
  335. package/storybook-static/shadcn/ui/accordion.d.ts +8 -0
  336. package/storybook-static/shadcn/ui/accordion.d.ts.map +1 -0
  337. package/storybook-static/shadcn/ui/alert-dialog.d.ts +15 -0
  338. package/storybook-static/shadcn/ui/alert-dialog.d.ts.map +1 -0
  339. package/storybook-static/shadcn/ui/alert.d.ts +10 -0
  340. package/storybook-static/shadcn/ui/alert.d.ts.map +1 -0
  341. package/storybook-static/shadcn/ui/aspect-ratio.d.ts +4 -0
  342. package/storybook-static/shadcn/ui/aspect-ratio.d.ts.map +1 -0
  343. package/storybook-static/shadcn/ui/avatar.d.ts +7 -0
  344. package/storybook-static/shadcn/ui/avatar.d.ts.map +1 -0
  345. package/storybook-static/shadcn/ui/badge.d.ts +10 -0
  346. package/storybook-static/shadcn/ui/badge.d.ts.map +1 -0
  347. package/storybook-static/shadcn/ui/breadcrumb.d.ts +12 -0
  348. package/storybook-static/shadcn/ui/breadcrumb.d.ts.map +1 -0
  349. package/storybook-static/shadcn/ui/button.d.ts +11 -0
  350. package/storybook-static/shadcn/ui/button.d.ts.map +1 -0
  351. package/storybook-static/shadcn/ui/calendar.d.ts +9 -0
  352. package/storybook-static/shadcn/ui/calendar.d.ts.map +1 -0
  353. package/storybook-static/shadcn/ui/card.d.ts +10 -0
  354. package/storybook-static/shadcn/ui/card.d.ts.map +1 -0
  355. package/storybook-static/shadcn/ui/carousel.d.ts +20 -0
  356. package/storybook-static/shadcn/ui/carousel.d.ts.map +1 -0
  357. package/storybook-static/shadcn/ui/chart.d.ts +41 -0
  358. package/storybook-static/shadcn/ui/chart.d.ts.map +1 -0
  359. package/storybook-static/shadcn/ui/checkbox.d.ts +5 -0
  360. package/storybook-static/shadcn/ui/checkbox.d.ts.map +1 -0
  361. package/storybook-static/shadcn/ui/collapsible.d.ts +6 -0
  362. package/storybook-static/shadcn/ui/collapsible.d.ts.map +1 -0
  363. package/storybook-static/shadcn/ui/command.d.ts +19 -0
  364. package/storybook-static/shadcn/ui/command.d.ts.map +1 -0
  365. package/storybook-static/shadcn/ui/context-menu.d.ts +26 -0
  366. package/storybook-static/shadcn/ui/context-menu.d.ts.map +1 -0
  367. package/storybook-static/shadcn/ui/dialog.d.ts +16 -0
  368. package/storybook-static/shadcn/ui/dialog.d.ts.map +1 -0
  369. package/storybook-static/shadcn/ui/drawer.d.ts +14 -0
  370. package/storybook-static/shadcn/ui/drawer.d.ts.map +1 -0
  371. package/storybook-static/shadcn/ui/dropdown-menu.d.ts +26 -0
  372. package/storybook-static/shadcn/ui/dropdown-menu.d.ts.map +1 -0
  373. package/storybook-static/shadcn/ui/form.d.ts +25 -0
  374. package/storybook-static/shadcn/ui/form.d.ts.map +1 -0
  375. package/storybook-static/shadcn/ui/hover-card.d.ts +7 -0
  376. package/storybook-static/shadcn/ui/hover-card.d.ts.map +1 -0
  377. package/storybook-static/shadcn/ui/input-otp.d.ts +12 -0
  378. package/storybook-static/shadcn/ui/input-otp.d.ts.map +1 -0
  379. package/storybook-static/shadcn/ui/input.d.ts +4 -0
  380. package/storybook-static/shadcn/ui/input.d.ts.map +1 -0
  381. package/storybook-static/shadcn/ui/label.d.ts +5 -0
  382. package/storybook-static/shadcn/ui/label.d.ts.map +1 -0
  383. package/storybook-static/shadcn/ui/menubar.d.ts +27 -0
  384. package/storybook-static/shadcn/ui/menubar.d.ts.map +1 -0
  385. package/storybook-static/shadcn/ui/navigation-menu.d.ts +15 -0
  386. package/storybook-static/shadcn/ui/navigation-menu.d.ts.map +1 -0
  387. package/storybook-static/shadcn/ui/pagination.d.ts +14 -0
  388. package/storybook-static/shadcn/ui/pagination.d.ts.map +1 -0
  389. package/storybook-static/shadcn/ui/popover.d.ts +8 -0
  390. package/storybook-static/shadcn/ui/popover.d.ts.map +1 -0
  391. package/storybook-static/shadcn/ui/progress.d.ts +5 -0
  392. package/storybook-static/shadcn/ui/progress.d.ts.map +1 -0
  393. package/storybook-static/shadcn/ui/radio-group.d.ts +6 -0
  394. package/storybook-static/shadcn/ui/radio-group.d.ts.map +1 -0
  395. package/storybook-static/shadcn/ui/resizable.d.ts +9 -0
  396. package/storybook-static/shadcn/ui/resizable.d.ts.map +1 -0
  397. package/storybook-static/shadcn/ui/scroll-area.d.ts +6 -0
  398. package/storybook-static/shadcn/ui/scroll-area.d.ts.map +1 -0
  399. package/storybook-static/shadcn/ui/select.d.ts +16 -0
  400. package/storybook-static/shadcn/ui/select.d.ts.map +1 -0
  401. package/storybook-static/shadcn/ui/separator.d.ts +5 -0
  402. package/storybook-static/shadcn/ui/separator.d.ts.map +1 -0
  403. package/storybook-static/shadcn/ui/sheet.d.ts +14 -0
  404. package/storybook-static/shadcn/ui/sheet.d.ts.map +1 -0
  405. package/storybook-static/shadcn/ui/sidebar.d.ts +70 -0
  406. package/storybook-static/shadcn/ui/sidebar.d.ts.map +1 -0
  407. package/storybook-static/shadcn/ui/skeleton.d.ts +3 -0
  408. package/storybook-static/shadcn/ui/skeleton.d.ts.map +1 -0
  409. package/storybook-static/shadcn/ui/slider.d.ts +5 -0
  410. package/storybook-static/shadcn/ui/slider.d.ts.map +1 -0
  411. package/storybook-static/shadcn/ui/sonner.d.ts +4 -0
  412. package/storybook-static/shadcn/ui/sonner.d.ts.map +1 -0
  413. package/storybook-static/shadcn/ui/switch.d.ts +5 -0
  414. package/storybook-static/shadcn/ui/switch.d.ts.map +1 -0
  415. package/storybook-static/shadcn/ui/table.d.ts +11 -0
  416. package/storybook-static/shadcn/ui/table.d.ts.map +1 -0
  417. package/storybook-static/shadcn/ui/tabs.d.ts +8 -0
  418. package/storybook-static/shadcn/ui/tabs.d.ts.map +1 -0
  419. package/storybook-static/shadcn/ui/textarea.d.ts +4 -0
  420. package/storybook-static/shadcn/ui/textarea.d.ts.map +1 -0
  421. package/storybook-static/shadcn/ui/toggle-group.d.ts +8 -0
  422. package/storybook-static/shadcn/ui/toggle-group.d.ts.map +1 -0
  423. package/storybook-static/shadcn/ui/toggle.d.ts +10 -0
  424. package/storybook-static/shadcn/ui/toggle.d.ts.map +1 -0
  425. package/storybook-static/shadcn/ui/tooltip.d.ts +8 -0
  426. package/storybook-static/shadcn/ui/tooltip.d.ts.map +1 -0
  427. package/storybook-static/vite-inject-mocker-entry.js +18 -0
@@ -0,0 +1,502 @@
1
+ import{j as a}from"./jsx-runtime-D_zvdyIk.js";import{F as p}from"./FormBuilder-BQBBxo_k.js";import{c as l,a as e}from"./section-factories-DCCY9R35.js";import{c as i,a as t}from"./dependencies-ctrV69dx.js";import"./iframe-v7iAhKit.js";import"./preload-helper-Dp1pzeXC.js";import"./schemas-CGNYCiJ6.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 Se={title:"Kit/Builder/Form",component:p,parameters:{controls:{expanded:!0},backgrounds:{disable:!0}}},d={name:"Dynamic example (Tabs)",render:()=>{const c=r=>{console.log("Dynamic tabs form submitted:",r)},o=(r,n)=>{console.log(`[Tabs] Field ${r} changed to:`,n)},u=[{title:"Product Builder",layout:"tabs",variant:"card",defaultTabId:"product",tabsListClassName:"w-full",tabsContentClassName:"mt-2",tabs:[{id:"product",label:"Product",sections:[l.card("Product Configuration",[e.select("productType","Product Type",[{label:"One-time Purchase",value:"onetime"},{label:"Subscription",value:"subscription"},{label:"Bundle",value:"bundle"},{label:"Digital Download",value:"digital"}],{required:!0,placeholder:"Select product type"}),e.text("productName","Product Name",{required:!0,placeholder:"Enter product name"}),e.number("basePrice","Base Price ($)",{required:!0,placeholder:"29.99"}),e.select("billingCycle","Billing Cycle",[{label:"Monthly",value:"monthly"},{label:"Quarterly",value:"quarterly"},{label:"Yearly",value:"yearly"}],{required:!0,placeholder:"Select billing cycle",dependencies:[i.showWhen("productType",t.equals("subscription"))]}),e.number("trialDays","Free Trial Days",{placeholder:"14",defaultValue:0,dependencies:[i.showWhen("productType",t.equals("subscription"))]}),e.array("bundleItems","Bundle Items",[e.text("itemName","Item Name",{required:!0,placeholder:"Item name"}),e.number("itemPrice","Item Price ($)",{required:!0,placeholder:"9.99"}),e.number("quantity","Quantity",{required:!0,defaultValue:1,placeholder:"1"})],{gridCols:2,defaultValue:[{itemName:"",itemPrice:0,quantity:1}],dependencies:[i.showWhen("productType",t.equals("bundle"))]}),e.select("fileFormat","File Format",[{label:"PDF",value:"pdf"},{label:"ZIP Archive",value:"zip"},{label:"Video (MP4)",value:"mp4"},{label:"Audio (MP3)",value:"mp3"},{label:"Software Installer",value:"exe"}],{required:!0,placeholder:"Select file format",dependencies:[i.showWhen("productType",t.equals("digital"))]}),e.number("fileSizeMB","File Size (MB)",{placeholder:"50",dependencies:[i.showWhen("productType",t.equals("digital"))]})])]},{id:"pricing",label:"Pricing",sections:[l.card("Pricing & Discounts",[e.checkbox("hasDiscount","Apply Discount",{defaultValue:!1,gridCols:2}),e.select("discountType","Discount Type",[{label:"Percentage",value:"percentage"},{label:"Fixed Amount",value:"fixed"},{label:"Buy One Get One",value:"bogo"}],{required:!0,placeholder:"Select discount type",dependencies:[i.showWhen("hasDiscount",t.isTrue())]}),e.number("discountValue","Discount Value",{required:!0,placeholder:"10",dependencies:[i.showWhen("hasDiscount",t.isTrue()),i.showWhen("discountType",r=>r!=="bogo")]}),e.date("discountStartDate","Discount Start Date",{dependencies:[i.showWhen("hasDiscount",t.isTrue())]}),e.date("discountEndDate","Discount End Date",{dependencies:[i.showWhen("hasDiscount",t.isTrue())]}),e.number("minimumQuantity","Minimum Quantity for Discount",{placeholder:"2",defaultValue:1,dependencies:[i.showWhen("hasDiscount",t.isTrue())]})])]},{id:"shipping",label:"Shipping",sections:[l.card("Shipping Configuration",[e.checkbox("requiresShipping","Requires Physical Shipping",{defaultValue:!0,gridCols:2,dependencies:[i.setValueWhen("productType",t.equals("digital"),!1),i.disableWhen("productType",t.equals("digital"))]}),e.number("weight","Weight (lbs)",{placeholder:"1.5",dependencies:[i.showWhen("requiresShipping",t.isTrue())]}),e.object("dimensions","Dimensions (inches)",[e.number("length","Length",{required:!0,placeholder:"10"}),e.number("width","Width",{required:!0,placeholder:"8"}),e.number("height","Height",{required:!0,placeholder:"2"})],{dependencies:[i.showWhen("requiresShipping",t.isTrue())]}),e.select("shippingClass","Shipping Class",[{label:"Standard",value:"standard"},{label:"Express",value:"express"},{label:"Overnight",value:"overnight"},{label:"Fragile",value:"fragile"},{label:"Hazardous",value:"hazardous"}],{required:!0,defaultValue:"standard",placeholder:"Select shipping class",dependencies:[i.showWhen("requiresShipping",t.isTrue())]}),e.checkbox("freeShipping","Offer Free Shipping",{defaultValue:!1,dependencies:[i.showWhen("requiresShipping",t.isTrue())]}),e.number("freeShippingThreshold","Free Shipping Threshold ($)",{placeholder:"50",dependencies:[i.showWhen("requiresShipping",t.isTrue()),i.showWhen("freeShipping",t.isTrue())]})])]},{id:"inventory",label:"Inventory",sections:[l.card("Inventory Management",[e.checkbox("trackInventory","Track Inventory",{defaultValue:!0,gridCols:2,dependencies:[i.setValueWhen("productType",t.equals("digital"),!1)]}),e.number("stockQuantity","Stock Quantity",{required:!0,placeholder:"100",dependencies:[i.showWhen("trackInventory",t.isTrue())]}),e.number("lowStockThreshold","Low Stock Alert Threshold",{placeholder:"10",dependencies:[i.showWhen("trackInventory",t.isTrue())]}),e.checkbox("allowBackorders","Allow Backorders",{defaultValue:!1,dependencies:[i.showWhen("trackInventory",t.isTrue())]}),e.text("sku","SKU (Stock Keeping Unit)",{placeholder:"PROD-001",dependencies:[i.showWhen("trackInventory",t.isTrue())]}),e.text("barcode","Barcode",{placeholder:"123456789012",dependencies:[i.showWhen("trackInventory",t.isTrue())]})])]},{id:"marketing",label:"Marketing",sections:[l.card("Marketing & SEO",[e.text("metaTitle","Meta Title",{placeholder:"SEO-friendly title",gridCols:2}),e.textarea("metaDescription","Meta Description",{placeholder:"SEO-friendly description (150-160 characters)",gridCols:2}),e.array("tags","Product Tags",[e.text("tag","Tag",{required:!0,placeholder:"e.g., electronics, gadgets"})],{gridCols:2,defaultValue:[{tag:""}]}),e.checkbox("featured","Featured Product",{defaultValue:!1}),e.checkbox("newProduct","Mark as New",{defaultValue:!1}),e.select("visibility","Product Visibility",[{label:"Public",value:"public"},{label:"Private",value:"private"},{label:"Password Protected",value:"password"},{label:"Coming Soon",value:"coming_soon"}],{required:!0,defaultValue:"public",placeholder:"Select visibility"}),e.text("password","Access Password",{placeholder:"Enter password",dependencies:[i.showWhen("visibility",t.equals("password"))]}),e.date("launchDate","Launch Date",{dependencies:[i.showWhen("visibility",t.equals("coming_soon"))]})])]}]}];return a.jsxs("div",{className:"max-w-6xl mx-auto p-6",children:[a.jsxs("div",{className:"mb-8",children:[a.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Dynamic Product Configuration (Tabs)"}),a.jsx("p",{className:"text-gray-600 mt-2",children:"The same dynamic form organized into tabs for better navigation."})]}),a.jsx(p,{sections:u,onSubmit:c,onFieldChange:o,submitLabel:"Save Product Configuration",resetLabel:"Reset All",className:"space-y-8"})]})}},s={name:"Dynamic example",render:()=>{const c=r=>{console.log("Dynamic form submitted:",r)},o=(r,n)=>{console.log(`Field ${r} changed to:`,n),r==="productType"&&n==="subscription"&&console.log("Subscription product selected - additional fields will appear"),r==="hasDiscount"&&n===!0&&console.log("Discount enabled - discount fields will appear")},u=[l.card("Product Configuration",[e.select("productType","Product Type",[{label:"One-time Purchase",value:"onetime"},{label:"Subscription",value:"subscription"},{label:"Bundle",value:"bundle"},{label:"Digital Download",value:"digital"}],{required:!0,placeholder:"Select product type"}),e.text("productName","Product Name",{required:!0,placeholder:"Enter product name"}),e.number("basePrice","Base Price ($)",{required:!0,placeholder:"29.99"}),e.select("billingCycle","Billing Cycle",[{label:"Monthly",value:"monthly"},{label:"Quarterly",value:"quarterly"},{label:"Yearly",value:"yearly"}],{required:!0,placeholder:"Select billing cycle",dependencies:[i.showWhen("productType",t.equals("subscription"))]}),e.number("trialDays","Free Trial Days",{placeholder:"14",defaultValue:0,dependencies:[i.showWhen("productType",t.equals("subscription"))]}),e.array("bundleItems","Bundle Items",[e.text("itemName","Item Name",{required:!0,placeholder:"Item name"}),e.number("itemPrice","Item Price ($)",{required:!0,placeholder:"9.99"}),e.number("quantity","Quantity",{required:!0,defaultValue:1,placeholder:"1"})],{gridCols:2,defaultValue:[{itemName:"",itemPrice:0,quantity:1}],dependencies:[i.showWhen("productType",t.equals("bundle"))]}),e.select("fileFormat","File Format",[{label:"PDF",value:"pdf"},{label:"ZIP Archive",value:"zip"},{label:"Video (MP4)",value:"mp4"},{label:"Audio (MP3)",value:"mp3"},{label:"Software Installer",value:"exe"}],{required:!0,placeholder:"Select file format",dependencies:[i.showWhen("productType",t.equals("digital"))]}),e.number("fileSizeMB","File Size (MB)",{placeholder:"50",dependencies:[i.showWhen("productType",t.equals("digital"))]})]),l.card("Pricing & Discounts",[e.checkbox("hasDiscount","Apply Discount",{defaultValue:!1,gridCols:2}),e.select("discountType","Discount Type",[{label:"Percentage",value:"percentage"},{label:"Fixed Amount",value:"fixed"},{label:"Buy One Get One",value:"bogo"}],{required:!0,placeholder:"Select discount type",dependencies:[i.showWhen("hasDiscount",t.isTrue())]}),e.number("discountValue","Discount Value",{required:!0,placeholder:"10",dependencies:[i.showWhen("hasDiscount",t.isTrue()),i.showWhen("discountType",r=>r!=="bogo")]}),e.date("discountStartDate","Discount Start Date",{dependencies:[i.showWhen("hasDiscount",t.isTrue())]}),e.date("discountEndDate","Discount End Date",{dependencies:[i.showWhen("hasDiscount",t.isTrue())]}),e.number("minimumQuantity","Minimum Quantity for Discount",{placeholder:"2",defaultValue:1,dependencies:[i.showWhen("hasDiscount",t.isTrue())]})]),l.card("Shipping Configuration",[e.checkbox("requiresShipping","Requires Physical Shipping",{defaultValue:!0,gridCols:2,dependencies:[i.setValueWhen("productType",t.equals("digital"),!1),i.disableWhen("productType",t.equals("digital"))]}),e.number("weight","Weight (lbs)",{placeholder:"1.5",dependencies:[i.showWhen("requiresShipping",t.isTrue())]}),e.object("dimensions","Dimensions (inches)",[e.number("length","Length",{required:!0,placeholder:"10"}),e.number("width","Width",{required:!0,placeholder:"8"}),e.number("height","Height",{required:!0,placeholder:"2"})],{dependencies:[i.showWhen("requiresShipping",t.isTrue())]}),e.select("shippingClass","Shipping Class",[{label:"Standard",value:"standard"},{label:"Express",value:"express"},{label:"Overnight",value:"overnight"},{label:"Fragile",value:"fragile"},{label:"Hazardous",value:"hazardous"}],{required:!0,defaultValue:"standard",placeholder:"Select shipping class",dependencies:[i.showWhen("requiresShipping",t.isTrue())]}),e.checkbox("freeShipping","Offer Free Shipping",{defaultValue:!1,dependencies:[i.showWhen("requiresShipping",t.isTrue())]}),e.number("freeShippingThreshold","Free Shipping Threshold ($)",{placeholder:"50",dependencies:[i.showWhen("requiresShipping",t.isTrue()),i.showWhen("freeShipping",t.isTrue())]})]),l.card("Inventory Management",[e.checkbox("trackInventory","Track Inventory",{defaultValue:!0,gridCols:2,dependencies:[i.setValueWhen("productType",t.equals("digital"),!1)]}),e.number("stockQuantity","Stock Quantity",{required:!0,placeholder:"100",dependencies:[i.showWhen("trackInventory",t.isTrue())]}),e.number("lowStockThreshold","Low Stock Alert Threshold",{placeholder:"10",dependencies:[i.showWhen("trackInventory",t.isTrue())]}),e.checkbox("allowBackorders","Allow Backorders",{defaultValue:!1,dependencies:[i.showWhen("trackInventory",t.isTrue())]}),e.text("sku","SKU (Stock Keeping Unit)",{placeholder:"PROD-001",dependencies:[i.showWhen("trackInventory",t.isTrue())]}),e.text("barcode","Barcode",{placeholder:"123456789012",dependencies:[i.showWhen("trackInventory",t.isTrue())]})]),l.card("Marketing & SEO",[e.text("metaTitle","Meta Title",{placeholder:"SEO-friendly title",gridCols:2}),e.textarea("metaDescription","Meta Description",{placeholder:"SEO-friendly description (150-160 characters)",gridCols:2}),e.array("tags","Product Tags",[e.text("tag","Tag",{required:!0,placeholder:"e.g., electronics, gadgets"})],{gridCols:2,defaultValue:[{tag:""}]}),e.checkbox("featured","Featured Product",{defaultValue:!1}),e.checkbox("newProduct","Mark as New",{defaultValue:!1}),e.select("visibility","Product Visibility",[{label:"Public",value:"public"},{label:"Private",value:"private"},{label:"Password Protected",value:"password"},{label:"Coming Soon",value:"coming_soon"}],{required:!0,defaultValue:"public",placeholder:"Select visibility"}),e.text("password","Access Password",{placeholder:"Enter password",dependencies:[i.showWhen("visibility",t.equals("password"))]}),e.date("launchDate","Launch Date",{dependencies:[i.showWhen("visibility",t.equals("coming_soon"))]})])];return a.jsxs("div",{className:"max-w-6xl mx-auto p-6",children:[a.jsxs("div",{className:"mb-8",children:[a.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Dynamic Product Configuration"}),a.jsx("p",{className:"text-gray-600 mt-2",children:"This form demonstrates advanced field dependencies and real-time interactions. Watch how fields appear, disappear, and change based on your selections."}),a.jsxs("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[a.jsx("h3",{className:"font-semibold text-blue-900",children:"Try these interactions:"}),a.jsxs("ul",{className:"mt-2 text-sm text-blue-800 space-y-1",children:[a.jsx("li",{children:"• Change Product Type to see different field sets"}),a.jsx("li",{children:'• Enable "Apply Discount" to reveal discount configuration'}),a.jsx("li",{children:'• Toggle "Requires Physical Shipping" for shipping options'}),a.jsx("li",{children:'• Select "Digital Download" to auto-disable shipping'}),a.jsx("li",{children:'• Choose "Password Protected" visibility for password field'})]})]})]}),a.jsx(p,{sections:u,onSubmit:c,onFieldChange:o,submitLabel:"Save Product Configuration",resetLabel:"Reset All",className:"space-y-8"})]})}};var h,m,b;d.parameters={...d.parameters,docs:{...(h=d.parameters)==null?void 0:h.docs,source:{originalSource:`{
2
+ name: 'Dynamic example (Tabs)',
3
+ render: () => {
4
+ const handleSubmit = (data: unknown) => {
5
+ console.log('Dynamic tabs form submitted:', data);
6
+ };
7
+ const handleFieldChange = (name: string, value: unknown) => {
8
+ console.log(\`[Tabs] Field \${name} changed to:\`, value);
9
+ };
10
+ const sections: FormBuilderSectionConfig[] = [{
11
+ title: 'Product Builder',
12
+ layout: 'tabs',
13
+ variant: 'card',
14
+ defaultTabId: 'product',
15
+ tabsListClassName: 'w-full',
16
+ tabsContentClassName: 'mt-2',
17
+ tabs: [{
18
+ id: 'product',
19
+ label: 'Product',
20
+ sections: [createSection.card('Product Configuration', [createField.select('productType', 'Product Type', [{
21
+ label: 'One-time Purchase',
22
+ value: 'onetime'
23
+ }, {
24
+ label: 'Subscription',
25
+ value: 'subscription'
26
+ }, {
27
+ label: 'Bundle',
28
+ value: 'bundle'
29
+ }, {
30
+ label: 'Digital Download',
31
+ value: 'digital'
32
+ }], {
33
+ required: true,
34
+ placeholder: 'Select product type'
35
+ }), createField.text('productName', 'Product Name', {
36
+ required: true,
37
+ placeholder: 'Enter product name'
38
+ }), createField.number('basePrice', 'Base Price ($)', {
39
+ required: true,
40
+ placeholder: '29.99'
41
+ }), createField.select('billingCycle', 'Billing Cycle', [{
42
+ label: 'Monthly',
43
+ value: 'monthly'
44
+ }, {
45
+ label: 'Quarterly',
46
+ value: 'quarterly'
47
+ }, {
48
+ label: 'Yearly',
49
+ value: 'yearly'
50
+ }], {
51
+ required: true,
52
+ placeholder: 'Select billing cycle',
53
+ dependencies: [createDependency.showWhen('productType', conditions.equals('subscription'))]
54
+ }), createField.number('trialDays', 'Free Trial Days', {
55
+ placeholder: '14',
56
+ defaultValue: 0,
57
+ dependencies: [createDependency.showWhen('productType', conditions.equals('subscription'))]
58
+ }), createField.array('bundleItems', 'Bundle Items', [createField.text('itemName', 'Item Name', {
59
+ required: true,
60
+ placeholder: 'Item name'
61
+ }), createField.number('itemPrice', 'Item Price ($)', {
62
+ required: true,
63
+ placeholder: '9.99'
64
+ }), createField.number('quantity', 'Quantity', {
65
+ required: true,
66
+ defaultValue: 1,
67
+ placeholder: '1'
68
+ })], {
69
+ gridCols: 2,
70
+ defaultValue: [{
71
+ itemName: '',
72
+ itemPrice: 0,
73
+ quantity: 1
74
+ }],
75
+ dependencies: [createDependency.showWhen('productType', conditions.equals('bundle'))]
76
+ }), createField.select('fileFormat', 'File Format', [{
77
+ label: 'PDF',
78
+ value: 'pdf'
79
+ }, {
80
+ label: 'ZIP Archive',
81
+ value: 'zip'
82
+ }, {
83
+ label: 'Video (MP4)',
84
+ value: 'mp4'
85
+ }, {
86
+ label: 'Audio (MP3)',
87
+ value: 'mp3'
88
+ }, {
89
+ label: 'Software Installer',
90
+ value: 'exe'
91
+ }], {
92
+ required: true,
93
+ placeholder: 'Select file format',
94
+ dependencies: [createDependency.showWhen('productType', conditions.equals('digital'))]
95
+ }), createField.number('fileSizeMB', 'File Size (MB)', {
96
+ placeholder: '50',
97
+ dependencies: [createDependency.showWhen('productType', conditions.equals('digital'))]
98
+ })])]
99
+ }, {
100
+ id: 'pricing',
101
+ label: 'Pricing',
102
+ sections: [createSection.card('Pricing & Discounts', [createField.checkbox('hasDiscount', 'Apply Discount', {
103
+ defaultValue: false,
104
+ gridCols: 2
105
+ }), createField.select('discountType', 'Discount Type', [{
106
+ label: 'Percentage',
107
+ value: 'percentage'
108
+ }, {
109
+ label: 'Fixed Amount',
110
+ value: 'fixed'
111
+ }, {
112
+ label: 'Buy One Get One',
113
+ value: 'bogo'
114
+ }], {
115
+ required: true,
116
+ placeholder: 'Select discount type',
117
+ dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue())]
118
+ }), createField.number('discountValue', 'Discount Value', {
119
+ required: true,
120
+ placeholder: '10',
121
+ dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue()), createDependency.showWhen('discountType', value => value !== 'bogo')]
122
+ }), createField.date('discountStartDate', 'Discount Start Date', {
123
+ dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue())]
124
+ }), createField.date('discountEndDate', 'Discount End Date', {
125
+ dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue())]
126
+ }), createField.number('minimumQuantity', 'Minimum Quantity for Discount', {
127
+ placeholder: '2',
128
+ defaultValue: 1,
129
+ dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue())]
130
+ })])]
131
+ }, {
132
+ id: 'shipping',
133
+ label: 'Shipping',
134
+ sections: [createSection.card('Shipping Configuration', [createField.checkbox('requiresShipping', 'Requires Physical Shipping', {
135
+ defaultValue: true,
136
+ gridCols: 2,
137
+ dependencies: [createDependency.setValueWhen('productType', conditions.equals('digital'), false), createDependency.disableWhen('productType', conditions.equals('digital'))]
138
+ }), createField.number('weight', 'Weight (lbs)', {
139
+ placeholder: '1.5',
140
+ dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue())]
141
+ }), createField.object('dimensions', 'Dimensions (inches)', [createField.number('length', 'Length', {
142
+ required: true,
143
+ placeholder: '10'
144
+ }), createField.number('width', 'Width', {
145
+ required: true,
146
+ placeholder: '8'
147
+ }), createField.number('height', 'Height', {
148
+ required: true,
149
+ placeholder: '2'
150
+ })], {
151
+ dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue())]
152
+ }), createField.select('shippingClass', 'Shipping Class', [{
153
+ label: 'Standard',
154
+ value: 'standard'
155
+ }, {
156
+ label: 'Express',
157
+ value: 'express'
158
+ }, {
159
+ label: 'Overnight',
160
+ value: 'overnight'
161
+ }, {
162
+ label: 'Fragile',
163
+ value: 'fragile'
164
+ }, {
165
+ label: 'Hazardous',
166
+ value: 'hazardous'
167
+ }], {
168
+ required: true,
169
+ defaultValue: 'standard',
170
+ placeholder: 'Select shipping class',
171
+ dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue())]
172
+ }), createField.checkbox('freeShipping', 'Offer Free Shipping', {
173
+ defaultValue: false,
174
+ dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue())]
175
+ }), createField.number('freeShippingThreshold', 'Free Shipping Threshold ($)', {
176
+ placeholder: '50',
177
+ dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue()), createDependency.showWhen('freeShipping', conditions.isTrue())]
178
+ })])]
179
+ }, {
180
+ id: 'inventory',
181
+ label: 'Inventory',
182
+ sections: [createSection.card('Inventory Management', [createField.checkbox('trackInventory', 'Track Inventory', {
183
+ defaultValue: true,
184
+ gridCols: 2,
185
+ dependencies: [createDependency.setValueWhen('productType', conditions.equals('digital'), false)]
186
+ }), createField.number('stockQuantity', 'Stock Quantity', {
187
+ required: true,
188
+ placeholder: '100',
189
+ dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())]
190
+ }), createField.number('lowStockThreshold', 'Low Stock Alert Threshold', {
191
+ placeholder: '10',
192
+ dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())]
193
+ }), createField.checkbox('allowBackorders', 'Allow Backorders', {
194
+ defaultValue: false,
195
+ dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())]
196
+ }), createField.text('sku', 'SKU (Stock Keeping Unit)', {
197
+ placeholder: 'PROD-001',
198
+ dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())]
199
+ }), createField.text('barcode', 'Barcode', {
200
+ placeholder: '123456789012',
201
+ dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())]
202
+ })])]
203
+ }, {
204
+ id: 'marketing',
205
+ label: 'Marketing',
206
+ sections: [createSection.card('Marketing & SEO', [createField.text('metaTitle', 'Meta Title', {
207
+ placeholder: 'SEO-friendly title',
208
+ gridCols: 2
209
+ }), createField.textarea('metaDescription', 'Meta Description', {
210
+ placeholder: 'SEO-friendly description (150-160 characters)',
211
+ gridCols: 2
212
+ }), createField.array('tags', 'Product Tags', [createField.text('tag', 'Tag', {
213
+ required: true,
214
+ placeholder: 'e.g., electronics, gadgets'
215
+ })], {
216
+ gridCols: 2,
217
+ defaultValue: [{
218
+ tag: ''
219
+ }]
220
+ }), createField.checkbox('featured', 'Featured Product', {
221
+ defaultValue: false
222
+ }), createField.checkbox('newProduct', 'Mark as New', {
223
+ defaultValue: false
224
+ }), createField.select('visibility', 'Product Visibility', [{
225
+ label: 'Public',
226
+ value: 'public'
227
+ }, {
228
+ label: 'Private',
229
+ value: 'private'
230
+ }, {
231
+ label: 'Password Protected',
232
+ value: 'password'
233
+ }, {
234
+ label: 'Coming Soon',
235
+ value: 'coming_soon'
236
+ }], {
237
+ required: true,
238
+ defaultValue: 'public',
239
+ placeholder: 'Select visibility'
240
+ }), createField.text('password', 'Access Password', {
241
+ placeholder: 'Enter password',
242
+ dependencies: [createDependency.showWhen('visibility', conditions.equals('password'))]
243
+ }), createField.date('launchDate', 'Launch Date', {
244
+ dependencies: [createDependency.showWhen('visibility', conditions.equals('coming_soon'))]
245
+ })])]
246
+ }]
247
+ }];
248
+ return <div className="max-w-6xl mx-auto p-6">
249
+ <div className="mb-8">
250
+ <h1 className="text-3xl font-bold text-gray-900">Dynamic Product Configuration (Tabs)</h1>
251
+ <p className="text-gray-600 mt-2">The same dynamic form organized into tabs for better navigation.</p>
252
+ </div>
253
+ <FormBuilder sections={sections} onSubmit={handleSubmit} onFieldChange={handleFieldChange} submitLabel="Save Product Configuration" resetLabel="Reset All" className="space-y-8" />
254
+ </div>;
255
+ }
256
+ }`,...(b=(m=d.parameters)==null?void 0:m.docs)==null?void 0:b.source}}};var g,y,f;s.parameters={...s.parameters,docs:{...(g=s.parameters)==null?void 0:g.docs,source:{originalSource:`{
257
+ name: 'Dynamic example',
258
+ render: () => {
259
+ const handleSubmit = (data: unknown) => {
260
+ console.log('Dynamic form submitted:', data);
261
+ };
262
+ const handleFieldChange = (name: string, value: unknown) => {
263
+ console.log(\`Field \${name} changed to:\`, value);
264
+ if (name === 'productType' && value === 'subscription') {
265
+ console.log('Subscription product selected - additional fields will appear');
266
+ }
267
+ if (name === 'hasDiscount' && value === true) {
268
+ console.log('Discount enabled - discount fields will appear');
269
+ }
270
+ };
271
+ const sections = [createSection.card('Product Configuration', [createField.select('productType', 'Product Type', [{
272
+ label: 'One-time Purchase',
273
+ value: 'onetime'
274
+ }, {
275
+ label: 'Subscription',
276
+ value: 'subscription'
277
+ }, {
278
+ label: 'Bundle',
279
+ value: 'bundle'
280
+ }, {
281
+ label: 'Digital Download',
282
+ value: 'digital'
283
+ }], {
284
+ required: true,
285
+ placeholder: 'Select product type'
286
+ }), createField.text('productName', 'Product Name', {
287
+ required: true,
288
+ placeholder: 'Enter product name'
289
+ }), createField.number('basePrice', 'Base Price ($)', {
290
+ required: true,
291
+ placeholder: '29.99'
292
+ }), createField.select('billingCycle', 'Billing Cycle', [{
293
+ label: 'Monthly',
294
+ value: 'monthly'
295
+ }, {
296
+ label: 'Quarterly',
297
+ value: 'quarterly'
298
+ }, {
299
+ label: 'Yearly',
300
+ value: 'yearly'
301
+ }], {
302
+ required: true,
303
+ placeholder: 'Select billing cycle',
304
+ dependencies: [createDependency.showWhen('productType', conditions.equals('subscription'))]
305
+ }), createField.number('trialDays', 'Free Trial Days', {
306
+ placeholder: '14',
307
+ defaultValue: 0,
308
+ dependencies: [createDependency.showWhen('productType', conditions.equals('subscription'))]
309
+ }), createField.array('bundleItems', 'Bundle Items', [createField.text('itemName', 'Item Name', {
310
+ required: true,
311
+ placeholder: 'Item name'
312
+ }), createField.number('itemPrice', 'Item Price ($)', {
313
+ required: true,
314
+ placeholder: '9.99'
315
+ }), createField.number('quantity', 'Quantity', {
316
+ required: true,
317
+ defaultValue: 1,
318
+ placeholder: '1'
319
+ })], {
320
+ gridCols: 2,
321
+ defaultValue: [{
322
+ itemName: '',
323
+ itemPrice: 0,
324
+ quantity: 1
325
+ }],
326
+ dependencies: [createDependency.showWhen('productType', conditions.equals('bundle'))]
327
+ }), createField.select('fileFormat', 'File Format', [{
328
+ label: 'PDF',
329
+ value: 'pdf'
330
+ }, {
331
+ label: 'ZIP Archive',
332
+ value: 'zip'
333
+ }, {
334
+ label: 'Video (MP4)',
335
+ value: 'mp4'
336
+ }, {
337
+ label: 'Audio (MP3)',
338
+ value: 'mp3'
339
+ }, {
340
+ label: 'Software Installer',
341
+ value: 'exe'
342
+ }], {
343
+ required: true,
344
+ placeholder: 'Select file format',
345
+ dependencies: [createDependency.showWhen('productType', conditions.equals('digital'))]
346
+ }), createField.number('fileSizeMB', 'File Size (MB)', {
347
+ placeholder: '50',
348
+ dependencies: [createDependency.showWhen('productType', conditions.equals('digital'))]
349
+ })]), createSection.card('Pricing & Discounts', [createField.checkbox('hasDiscount', 'Apply Discount', {
350
+ defaultValue: false,
351
+ gridCols: 2
352
+ }), createField.select('discountType', 'Discount Type', [{
353
+ label: 'Percentage',
354
+ value: 'percentage'
355
+ }, {
356
+ label: 'Fixed Amount',
357
+ value: 'fixed'
358
+ }, {
359
+ label: 'Buy One Get One',
360
+ value: 'bogo'
361
+ }], {
362
+ required: true,
363
+ placeholder: 'Select discount type',
364
+ dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue())]
365
+ }), createField.number('discountValue', 'Discount Value', {
366
+ required: true,
367
+ placeholder: '10',
368
+ dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue()), createDependency.showWhen('discountType', value => value !== 'bogo')]
369
+ }), createField.date('discountStartDate', 'Discount Start Date', {
370
+ dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue())]
371
+ }), createField.date('discountEndDate', 'Discount End Date', {
372
+ dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue())]
373
+ }), createField.number('minimumQuantity', 'Minimum Quantity for Discount', {
374
+ placeholder: '2',
375
+ defaultValue: 1,
376
+ dependencies: [createDependency.showWhen('hasDiscount', conditions.isTrue())]
377
+ })]), createSection.card('Shipping Configuration', [createField.checkbox('requiresShipping', 'Requires Physical Shipping', {
378
+ defaultValue: true,
379
+ gridCols: 2,
380
+ dependencies: [createDependency.setValueWhen('productType', conditions.equals('digital'), false), createDependency.disableWhen('productType', conditions.equals('digital'))]
381
+ }), createField.number('weight', 'Weight (lbs)', {
382
+ placeholder: '1.5',
383
+ dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue())]
384
+ }), createField.object('dimensions', 'Dimensions (inches)', [createField.number('length', 'Length', {
385
+ required: true,
386
+ placeholder: '10'
387
+ }), createField.number('width', 'Width', {
388
+ required: true,
389
+ placeholder: '8'
390
+ }), createField.number('height', 'Height', {
391
+ required: true,
392
+ placeholder: '2'
393
+ })], {
394
+ dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue())]
395
+ }), createField.select('shippingClass', 'Shipping Class', [{
396
+ label: 'Standard',
397
+ value: 'standard'
398
+ }, {
399
+ label: 'Express',
400
+ value: 'express'
401
+ }, {
402
+ label: 'Overnight',
403
+ value: 'overnight'
404
+ }, {
405
+ label: 'Fragile',
406
+ value: 'fragile'
407
+ }, {
408
+ label: 'Hazardous',
409
+ value: 'hazardous'
410
+ }], {
411
+ required: true,
412
+ defaultValue: 'standard',
413
+ placeholder: 'Select shipping class',
414
+ dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue())]
415
+ }), createField.checkbox('freeShipping', 'Offer Free Shipping', {
416
+ defaultValue: false,
417
+ dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue())]
418
+ }), createField.number('freeShippingThreshold', 'Free Shipping Threshold ($)', {
419
+ placeholder: '50',
420
+ dependencies: [createDependency.showWhen('requiresShipping', conditions.isTrue()), createDependency.showWhen('freeShipping', conditions.isTrue())]
421
+ })]), createSection.card('Inventory Management', [createField.checkbox('trackInventory', 'Track Inventory', {
422
+ defaultValue: true,
423
+ gridCols: 2,
424
+ dependencies: [createDependency.setValueWhen('productType', conditions.equals('digital'), false)]
425
+ }), createField.number('stockQuantity', 'Stock Quantity', {
426
+ required: true,
427
+ placeholder: '100',
428
+ dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())]
429
+ }), createField.number('lowStockThreshold', 'Low Stock Alert Threshold', {
430
+ placeholder: '10',
431
+ dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())]
432
+ }), createField.checkbox('allowBackorders', 'Allow Backorders', {
433
+ defaultValue: false,
434
+ dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())]
435
+ }), createField.text('sku', 'SKU (Stock Keeping Unit)', {
436
+ placeholder: 'PROD-001',
437
+ dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())]
438
+ }), createField.text('barcode', 'Barcode', {
439
+ placeholder: '123456789012',
440
+ dependencies: [createDependency.showWhen('trackInventory', conditions.isTrue())]
441
+ })]), createSection.card('Marketing & SEO', [createField.text('metaTitle', 'Meta Title', {
442
+ placeholder: 'SEO-friendly title',
443
+ gridCols: 2
444
+ }), createField.textarea('metaDescription', 'Meta Description', {
445
+ placeholder: 'SEO-friendly description (150-160 characters)',
446
+ gridCols: 2
447
+ }), createField.array('tags', 'Product Tags', [createField.text('tag', 'Tag', {
448
+ required: true,
449
+ placeholder: 'e.g., electronics, gadgets'
450
+ })], {
451
+ gridCols: 2,
452
+ defaultValue: [{
453
+ tag: ''
454
+ }]
455
+ }), createField.checkbox('featured', 'Featured Product', {
456
+ defaultValue: false
457
+ }), createField.checkbox('newProduct', 'Mark as New', {
458
+ defaultValue: false
459
+ }), createField.select('visibility', 'Product Visibility', [{
460
+ label: 'Public',
461
+ value: 'public'
462
+ }, {
463
+ label: 'Private',
464
+ value: 'private'
465
+ }, {
466
+ label: 'Password Protected',
467
+ value: 'password'
468
+ }, {
469
+ label: 'Coming Soon',
470
+ value: 'coming_soon'
471
+ }], {
472
+ required: true,
473
+ defaultValue: 'public',
474
+ placeholder: 'Select visibility'
475
+ }), createField.text('password', 'Access Password', {
476
+ placeholder: 'Enter password',
477
+ dependencies: [createDependency.showWhen('visibility', conditions.equals('password'))]
478
+ }), createField.date('launchDate', 'Launch Date', {
479
+ dependencies: [createDependency.showWhen('visibility', conditions.equals('coming_soon'))]
480
+ })])];
481
+ return <div className="max-w-6xl mx-auto p-6">
482
+ <div className="mb-8">
483
+ <h1 className="text-3xl font-bold text-gray-900">Dynamic Product Configuration</h1>
484
+ <p className="text-gray-600 mt-2">
485
+ This form demonstrates advanced field dependencies and real-time interactions. Watch how fields appear, disappear, and change based on your selections.
486
+ </p>
487
+ <div className="mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg">
488
+ <h3 className="font-semibold text-blue-900">Try these interactions:</h3>
489
+ <ul className="mt-2 text-sm text-blue-800 space-y-1">
490
+ <li>• Change Product Type to see different field sets</li>
491
+ <li>• Enable "Apply Discount" to reveal discount configuration</li>
492
+ <li>• Toggle "Requires Physical Shipping" for shipping options</li>
493
+ <li>• Select "Digital Download" to auto-disable shipping</li>
494
+ <li>• Choose "Password Protected" visibility for password field</li>
495
+ </ul>
496
+ </div>
497
+ </div>
498
+
499
+ <FormBuilder sections={sections} onSubmit={handleSubmit} onFieldChange={handleFieldChange} submitLabel="Save Product Configuration" resetLabel="Reset All" className="space-y-8" />
500
+ </div>;
501
+ }
502
+ }`,...(f=(y=s.parameters)==null?void 0:y.docs)==null?void 0:f.source}}};const Te=["DynamicTabsExample","DynamicExample"];export{s as DynamicExample,d as DynamicTabsExample,Te as __namedExportsOrder,Se as default};
@@ -0,0 +1,53 @@
1
+ import{j as t}from"./jsx-runtime-D_zvdyIk.js";import{F as i}from"./FormBuilder-BQBBxo_k.js";import{c,a as e,b as n}from"./section-factories-DCCY9R35.js";import"./iframe-v7iAhKit.js";import"./preload-helper-Dp1pzeXC.js";import"./schemas-CGNYCiJ6.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 be={title:"Kit/Builder/Form",component:i,parameters:{controls:{expanded:!0},backgrounds:{disable:!0}}},r={name:"Simple example",render:()=>{const s=p=>{console.log("Form submitted:",p)},m=[c.card("Contact Information",[e.text("name","Full Name",{required:!0,placeholder:"Enter your full name"}),e.email("email","Email Address",{required:!0,placeholder:"Enter your email address"}),e.text("phone","Phone Number",{validation:n.phone,placeholder:"+1 (555) 123-4567"}),e.select("subject","Subject",[{label:"General Inquiry",value:"general"},{label:"Technical Support",value:"support"},{label:"Sales Question",value:"sales"},{label:"Partnership",value:"partnership"}],{required:!0,placeholder:"Select a subject"}),e.textarea("message","Message",{required:!0,placeholder:"Enter your message here...",gridCols:2}),e.checkbox("subscribe","Subscribe to newsletter",{defaultValue:!1,gridCols:2}),e.switch("contactPermission","Allow contact by phone",{defaultValue:!1,gridCols:2})])];return t.jsxs("div",{className:"max-w-2xl mx-auto p-6",children:[t.jsxs("div",{className:"mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Contact Us"}),t.jsx("p",{className:"text-gray-600 mt-2",children:"Fill out the form below and we'll get back to you as soon as possible."})]}),t.jsx(i,{sections:m,onSubmit:s,className:"space-y-6"})]})}};var o,a,l;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`{
2
+ name: 'Simple example',
3
+ render: () => {
4
+ const handleSubmit = (data: unknown) => {
5
+ console.log('Form submitted:', data);
6
+ };
7
+ const sections = [createSection.card('Contact Information', [createField.text('name', 'Full Name', {
8
+ required: true,
9
+ placeholder: 'Enter your full name'
10
+ }), createField.email('email', 'Email Address', {
11
+ required: true,
12
+ placeholder: 'Enter your email address'
13
+ }), createField.text('phone', 'Phone Number', {
14
+ validation: commonValidations.phone,
15
+ placeholder: '+1 (555) 123-4567'
16
+ }), createField.select('subject', 'Subject', [{
17
+ label: 'General Inquiry',
18
+ value: 'general'
19
+ }, {
20
+ label: 'Technical Support',
21
+ value: 'support'
22
+ }, {
23
+ label: 'Sales Question',
24
+ value: 'sales'
25
+ }, {
26
+ label: 'Partnership',
27
+ value: 'partnership'
28
+ }], {
29
+ required: true,
30
+ placeholder: 'Select a subject'
31
+ }), createField.textarea('message', 'Message', {
32
+ required: true,
33
+ placeholder: 'Enter your message here...',
34
+ gridCols: 2
35
+ }), createField.checkbox('subscribe', 'Subscribe to newsletter', {
36
+ defaultValue: false,
37
+ gridCols: 2
38
+ }), createField.switch('contactPermission', 'Allow contact by phone', {
39
+ defaultValue: false,
40
+ gridCols: 2
41
+ })])];
42
+ return <div className="max-w-2xl mx-auto p-6">
43
+ <div className="mb-6">
44
+ <h1 className="text-2xl font-bold text-gray-900">Contact Us</h1>
45
+ <p className="text-gray-600 mt-2">
46
+ Fill out the form below and we'll get back to you as soon as possible.
47
+ </p>
48
+ </div>
49
+
50
+ <FormBuilder sections={sections} onSubmit={handleSubmit} className="space-y-6" />
51
+ </div>;
52
+ }
53
+ }`,...(l=(a=r.parameters)==null?void 0:a.docs)==null?void 0:l.source}}};const he=["SimpleExample"];export{r as SimpleExample,he as __namedExportsOrder,be as default};
@@ -0,0 +1,3 @@
1
+ import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as n}from"./iframe-v7iAhKit.js";import{S as _}from"./index-DbaA6-o1.js";import{F as v,C,p as w,q as D,o as $,s as h,d as P,e as E}from"./schemas-CGNYCiJ6.js";import{c as d}from"./utils-D-KgF5mV.js";import{L as M}from"./label-Do8ODIVk.js";import{I as F}from"./input-11YRd9gD.js";import{B as V}from"./button-0oMkiryo.js";import{t as L}from"./index-XSmPROEP.js";import"./preload-helper-Dp1pzeXC.js";import"./index-Tp9IdbR8.js";import"./index-DrN5n71E.js";import"./index-CwBdPBFz.js";import"./index-CGrAONsN.js";const y=v,b=n.createContext({}),l=({...o})=>e.jsx(b.Provider,{value:{name:o.name},children:e.jsx(C,{...o})}),c=()=>{const o=n.useContext(b),r=n.useContext(S),{getFieldState:t}=w(),s=D({name:o.name}),a=t(o.name,s);if(!o)throw new Error("useFormField should be used within <FormField>");const{id:m}=r;return{id:m,name:o.name,formItemId:`${m}-form-item`,formDescriptionId:`${m}-form-item-description`,formMessageId:`${m}-form-item-message`,...a}},S=n.createContext({});function p({className:o,...r}){const t=n.useId();return e.jsx(S.Provider,{value:{id:t},children:e.jsx("div",{"data-slot":"form-item",className:d("grid gap-2",o),...r})})}function u({className:o,...r}){const{error:t,formItemId:s}=c();return e.jsx(M,{"data-slot":"form-label","data-error":!!t,className:d("data-[error=true]:text-destructive",o),htmlFor:s,...r})}function f({...o}){const{error:r,formItemId:t,formDescriptionId:s,formMessageId:a}=c();return e.jsx(_,{"data-slot":"form-control",id:t,"aria-describedby":r?`${s} ${a}`:`${s}`,"aria-invalid":!!r,...o})}function N({className:o,...r}){const{formDescriptionId:t}=c();return e.jsx("p",{"data-slot":"form-description",id:t,className:d("text-muted-foreground text-sm",o),...r})}function x({className:o,...r}){const{error:t,formMessageId:s}=c(),a=t?String((t==null?void 0:t.message)??""):r.children;return a?e.jsx("p",{"data-slot":"form-message",id:s,className:d("text-destructive text-sm",o),...r,children:a}):null}p.__docgenInfo={description:"",methods:[],displayName:"FormItem"};u.__docgenInfo={description:"",methods:[],displayName:"FormLabel"};f.__docgenInfo={description:"",methods:[],displayName:"FormControl"};N.__docgenInfo={description:"",methods:[],displayName:"FormDescription"};x.__docgenInfo={description:"",methods:[],displayName:"FormMessage"};l.__docgenInfo={description:"",methods:[],displayName:"FormField"};const X={title:"Shadcn/UI/Form",component:y};function W(){const o=$({email:h().email("Please enter a valid email"),password:h().min(6,"Password must be at least 6 characters")}),r=P({resolver:E(o),defaultValues:{email:"",password:""},mode:"onTouched"});function t(s){L.success(`Submitted: ${JSON.stringify(s,null,2)}`)}return e.jsx("div",{className:"max-w-md space-y-6",children:e.jsx(y,{...r,children:e.jsxs("form",{onSubmit:r.handleSubmit(t),className:"space-y-4",children:[e.jsx(l,{control:r.control,name:"email",render:({field:s})=>e.jsxs(p,{children:[e.jsx(u,{children:"Email"}),e.jsx(f,{children:e.jsx(F,{type:"email",placeholder:"you@example.com",...s})}),e.jsx(N,{children:"We’ll never share your email."}),e.jsx(x,{})]})}),e.jsx(l,{control:r.control,name:"password",render:({field:s})=>e.jsxs(p,{children:[e.jsx(u,{children:"Password"}),e.jsx(f,{children:e.jsx(F,{type:"password",placeholder:"••••••••",...s})}),e.jsx(x,{})]})}),e.jsx(V,{type:"submit",className:"w-full",children:"Sign in"})]})})})}const i={render:()=>e.jsx(W,{})};var j,I,g;i.parameters={...i.parameters,docs:{...(j=i.parameters)==null?void 0:j.docs,source:{originalSource:`{
2
+ render: () => <ValidatedFormDemo />
3
+ }`,...(g=(I=i.parameters)==null?void 0:I.docs)==null?void 0:g.source}}};const Y=["WithValidation"];export{i as WithValidation,Y as __namedExportsOrder,X as default};