@k3-universe/react-kit 0.0.8 → 0.0.10

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 (334) hide show
  1. package/dist/index.js +18655 -16777
  2. package/dist/kit/builder/data-table/components/DataTable.d.ts +2 -2
  3. package/dist/kit/builder/data-table/components/DataTable.d.ts.map +1 -1
  4. package/dist/kit/builder/form/components/FormBuilder.d.ts +42 -14
  5. package/dist/kit/builder/form/components/FormBuilder.d.ts.map +1 -1
  6. package/dist/kit/builder/form/components/FormBuilderField.d.ts.map +1 -1
  7. package/dist/kit/builder/form/components/fields/AutocompleteField.d.ts.map +1 -1
  8. package/dist/kit/builder/form/components/fields/DatePickerField.d.ts +3 -0
  9. package/dist/kit/builder/form/components/fields/DatePickerField.d.ts.map +1 -0
  10. package/dist/kit/builder/form/components/fields/DateRangePickerField.d.ts +3 -0
  11. package/dist/kit/builder/form/components/fields/DateRangePickerField.d.ts.map +1 -0
  12. package/dist/kit/builder/form/components/fields/MonthPickerField.d.ts +3 -0
  13. package/dist/kit/builder/form/components/fields/MonthPickerField.d.ts.map +1 -0
  14. package/dist/kit/builder/form/components/fields/MonthRangePickerField.d.ts +3 -0
  15. package/dist/kit/builder/form/components/fields/MonthRangePickerField.d.ts.map +1 -0
  16. package/dist/kit/builder/form/components/fields/index.d.ts +4 -0
  17. package/dist/kit/builder/form/components/fields/index.d.ts.map +1 -1
  18. package/dist/kit/builder/section/SectionBuilder.d.ts.map +1 -1
  19. package/dist/kit/builder/section/types.d.ts +12 -1
  20. package/dist/kit/builder/section/types.d.ts.map +1 -1
  21. package/dist/kit/builder/stack-dialog/context.d.ts +3 -0
  22. package/dist/kit/builder/stack-dialog/context.d.ts.map +1 -0
  23. package/dist/kit/builder/stack-dialog/hooks.d.ts +6 -0
  24. package/dist/kit/builder/stack-dialog/hooks.d.ts.map +1 -0
  25. package/dist/kit/builder/stack-dialog/index.d.ts +5 -0
  26. package/dist/kit/builder/stack-dialog/index.d.ts.map +1 -0
  27. package/dist/kit/builder/stack-dialog/provider.d.ts +3 -0
  28. package/dist/kit/builder/stack-dialog/provider.d.ts.map +1 -0
  29. package/dist/kit/builder/stack-dialog/renderer.d.ts +6 -0
  30. package/dist/kit/builder/stack-dialog/renderer.d.ts.map +1 -0
  31. package/dist/kit/builder/stack-dialog/types.d.ts +20 -0
  32. package/dist/kit/builder/stack-dialog/types.d.ts.map +1 -0
  33. package/dist/kit/components/autocomplete/Autocomplete.d.ts +35 -3
  34. package/dist/kit/components/autocomplete/Autocomplete.d.ts.map +1 -1
  35. package/dist/kit/components/autocomplete/index.d.ts +1 -0
  36. package/dist/kit/components/autocomplete/index.d.ts.map +1 -1
  37. package/dist/kit/components/datepicker/DatePicker.d.ts +27 -0
  38. package/dist/kit/components/datepicker/DatePicker.d.ts.map +1 -0
  39. package/dist/kit/components/datepicker/DateRangePicker.d.ts +41 -0
  40. package/dist/kit/components/datepicker/DateRangePicker.d.ts.map +1 -0
  41. package/dist/kit/components/monthpicker/MonthInput.d.ts +26 -0
  42. package/dist/kit/components/monthpicker/MonthInput.d.ts.map +1 -0
  43. package/dist/kit/components/monthpicker/MonthPicker.d.ts +32 -0
  44. package/dist/kit/components/monthpicker/MonthPicker.d.ts.map +1 -0
  45. package/dist/kit/components/monthpicker/MonthRangeInput.d.ts +31 -0
  46. package/dist/kit/components/monthpicker/MonthRangeInput.d.ts.map +1 -0
  47. package/dist/kit/components/monthpicker/MonthRangePicker.d.ts +48 -0
  48. package/dist/kit/components/monthpicker/MonthRangePicker.d.ts.map +1 -0
  49. package/dist/kit/themes/clean-slate.css +165 -1
  50. package/dist/kit/themes/default.css +165 -1
  51. package/dist/kit/themes/minimal-modern.css +165 -1
  52. package/dist/kit/themes/spotify.css +165 -1
  53. package/package.json +1 -1
  54. package/src/kit/builder/data-table/components/DataTable.tsx +9 -9
  55. package/src/kit/builder/form/components/FormBuilder.tsx +363 -145
  56. package/src/kit/builder/form/components/FormBuilderField.tsx +52 -3
  57. package/src/kit/builder/form/components/fields/AutocompleteField.tsx +29 -1
  58. package/src/kit/builder/form/components/fields/DatePickerField.tsx +24 -0
  59. package/src/kit/builder/form/components/fields/DateRangePickerField.tsx +41 -0
  60. package/src/kit/builder/form/components/fields/MonthPickerField.tsx +26 -0
  61. package/src/kit/builder/form/components/fields/MonthRangePickerField.tsx +35 -0
  62. package/src/kit/builder/form/components/fields/index.ts +4 -0
  63. package/src/kit/builder/section/SectionBuilder.tsx +24 -2
  64. package/src/kit/builder/section/types.ts +15 -1
  65. package/src/kit/builder/stack-dialog/context.ts +9 -0
  66. package/src/kit/builder/stack-dialog/hooks.ts +11 -0
  67. package/src/kit/builder/stack-dialog/index.ts +13 -0
  68. package/src/kit/builder/stack-dialog/provider.tsx +55 -0
  69. package/src/kit/builder/stack-dialog/renderer.tsx +33 -0
  70. package/src/kit/builder/stack-dialog/types.ts +22 -0
  71. package/src/kit/components/autocomplete/Autocomplete.tsx +783 -233
  72. package/src/kit/components/autocomplete/index.ts +1 -0
  73. package/src/kit/components/datepicker/DatePicker.tsx +149 -0
  74. package/src/kit/components/datepicker/DateRangePicker.tsx +454 -0
  75. package/src/kit/components/monthpicker/MonthInput.tsx +122 -0
  76. package/src/kit/components/monthpicker/MonthPicker.tsx +223 -0
  77. package/src/kit/components/monthpicker/MonthRangeInput.tsx +132 -0
  78. package/src/kit/components/monthpicker/MonthRangePicker.tsx +407 -0
  79. package/src/stories/kit/builder/Form.Autocomplete.stories.tsx +210 -0
  80. package/src/stories/kit/builder/Form.Complex.stories.tsx +101 -0
  81. package/src/stories/kit/builder/Form.Dynamic.stories.tsx +149 -0
  82. package/src/stories/kit/builder/Form.Pickers.stories.tsx +71 -0
  83. package/src/stories/kit/builder/Section.stories.tsx +58 -2
  84. package/src/stories/kit/components/Autocomplete.stories.tsx +27 -0
  85. package/src/stories/kit/components/DatePicker.stories.tsx +128 -0
  86. package/src/stories/kit/components/DateRangePicker.stories.tsx +154 -0
  87. package/src/stories/kit/components/MonthPicker.stories.tsx +80 -0
  88. package/src/stories/kit/components/MonthRangePicker.stories.tsx +98 -0
  89. package/storybook-static/assets/{Accordion.stories-q6yg6wg1.js → Accordion.stories-KU4JBR8U.js} +1 -1
  90. package/storybook-static/assets/{AdminLayout-B9bV4J_6.js → AdminLayout-CPvVCwfY.js} +10 -10
  91. package/storybook-static/assets/AdminLayout.Basic.stories-DkP2UVXe.js +4 -0
  92. package/storybook-static/assets/AdminLayout.Collapsible.stories-BuuVjtpW.js +4 -0
  93. package/storybook-static/assets/AdminLayout.Complex.stories-D-k4H0hJ.js +29 -0
  94. package/storybook-static/assets/AdminLayout.CustomSidebarHeaderComponent.stories-B_0IEDd4.js +9 -0
  95. package/storybook-static/assets/AdminLayout.CustomSidebarTitleAndIcon.stories-CvAeXUyA.js +4 -0
  96. package/storybook-static/assets/AdminLayout.HeaderSlots.stories-RBFHoSZK.js +7 -0
  97. package/storybook-static/assets/{Alert.stories-DXwNfJ3w.js → Alert.stories-DKxKtIc0.js} +1 -1
  98. package/storybook-static/assets/{AlertDialog.stories-I324NsnP.js → AlertDialog.stories-BqTpZ_nG.js} +1 -1
  99. package/storybook-static/assets/{AspectRatio.stories-CghHiX3Z.js → AspectRatio.stories-DPO9QQ5F.js} +1 -1
  100. package/storybook-static/assets/Autocomplete-Cpg4CaJe.js +56 -0
  101. package/storybook-static/assets/Autocomplete.stories-CWj4G5fh.js +56 -0
  102. package/storybook-static/assets/{Avatar.stories-CEF5FVSR.js → Avatar.stories-DPhov_2g.js} +1 -1
  103. package/storybook-static/assets/Badge.stories-DFKrRdXq.js +12 -0
  104. package/storybook-static/assets/{Breadcrumb.stories-DORe9T4b.js → Breadcrumb.stories-CTE6CZUC.js} +1 -1
  105. package/storybook-static/assets/{Button.stories-3nQ6wsBX.js → Button.stories-cbt2InL-.js} +1 -1
  106. package/storybook-static/assets/{Calendar.stories-Dn__djE1.js → Calendar.stories-DRhTw_43.js} +1 -1
  107. package/storybook-static/assets/{Card.stories-BJcbdwCI.js → Card.stories-Isf6n_K3.js} +1 -1
  108. package/storybook-static/assets/{Carousel.stories-CfqbE7Va.js → Carousel.stories-Cmg0I3fR.js} +1 -1
  109. package/storybook-static/assets/{Chart.stories-cGgef3tv.js → Chart.stories-aQ-fNijT.js} +1 -1
  110. package/storybook-static/assets/{Checkbox.stories-BcaxWzCS.js → Checkbox.stories-B7YMXPDc.js} +1 -1
  111. package/storybook-static/assets/{Collapsible.stories-CQ95s7Cs.js → Collapsible.stories-BUzl17ZZ.js} +1 -1
  112. package/storybook-static/assets/{Combination-CeVus13L.js → Combination-BdQWAuko.js} +1 -1
  113. package/storybook-static/assets/{Command.stories-DYflJh8u.js → Command.stories-DzBlWQs0.js} +1 -1
  114. package/storybook-static/assets/{ContextMenu.stories-CU7ehYrE.js → ContextMenu.stories-CJlBQyXc.js} +1 -1
  115. package/storybook-static/assets/DataTable.Basic.stories-BWYKFDmK.js +6 -0
  116. package/storybook-static/assets/DataTable.Filters.stories-uZdtJk8t.js +21 -0
  117. package/storybook-static/assets/DataTable.Pagination.stories-C5N1khkp.js +24 -0
  118. package/storybook-static/assets/DataTable.SelectionAndActions.stories-FhCqZKvO.js +26 -0
  119. package/storybook-static/assets/DataTable.Sorting.stories-D-k7EtRj.js +6 -0
  120. package/storybook-static/assets/{Dialog.stories-DobNZ0Hp.js → Dialog.stories-C62AF-Gx.js} +1 -1
  121. package/storybook-static/assets/{Dialog.stories-Bu6ZJXNH.js → Dialog.stories-lrjRwOus.js} +1 -1
  122. package/storybook-static/assets/{Drawer.stories-BN0idp4u.js → Drawer.stories-CGjkdJeV.js} +1 -1
  123. package/storybook-static/assets/{DropdownMenu.stories-sfsVDTvm.js → DropdownMenu.stories-DkGClRAA.js} +1 -1
  124. package/storybook-static/assets/Form.ArrayLayouts.stories-C5d_062d.js +130 -0
  125. package/storybook-static/assets/Form.Autocomplete.stories-CPZPkk4o.js +142 -0
  126. package/storybook-static/assets/Form.Basic.stories-Bhcu3-3n.js +58 -0
  127. package/storybook-static/assets/Form.Complex.stories-QnXh5a7Q.js +361 -0
  128. package/storybook-static/assets/Form.Dynamic.stories-DFW6wIuT.js +502 -0
  129. package/storybook-static/assets/Form.Simple.stories-BhJcyhbE.js +53 -0
  130. package/storybook-static/assets/{Form.stories-27doU7JS.js → Form.stories-PFNsMYxO.js} +1 -1
  131. package/storybook-static/assets/FormBuilder-BQBBxo_k.js +5 -0
  132. package/storybook-static/assets/{HoverCard.stories-0lted9Zx.js → HoverCard.stories-CAlQEVn8.js} +1 -1
  133. package/storybook-static/assets/{Input.stories-CwsIObFs.js → Input.stories-CEhODt0V.js} +1 -1
  134. package/storybook-static/assets/{InputOtp.stories-DVc086h4.js → InputOtp.stories-DSvNP4dS.js} +1 -1
  135. package/storybook-static/assets/{Label.stories-bJa0rk1A.js → Label.stories-B3pa8ZLY.js} +1 -1
  136. package/storybook-static/assets/{Login.stories-C6X6Kj5B.js → Login.stories-C7KQkmR_.js} +5 -5
  137. package/storybook-static/assets/{Menubar.stories-CuediVp7.js → Menubar.stories-CHXhSHxc.js} +1 -1
  138. package/storybook-static/assets/MonthPicker.stories-BnrOc4fm.js +99 -0
  139. package/storybook-static/assets/MonthRangePicker.stories-55Gk1t-7.js +134 -0
  140. package/storybook-static/assets/{NavigationMenu.stories-CKGZYhKk.js → NavigationMenu.stories-CXoS080P.js} +1 -1
  141. package/storybook-static/assets/{Page.stories-Cf76wtRx.js → Page.stories-GdSJgZ6-.js} +1 -1
  142. package/storybook-static/assets/{Pagination.stories-D7IdL1_4.js → Pagination.stories-BEBwqH4N.js} +1 -1
  143. package/storybook-static/assets/{Popover.stories-1VP_zNY8.js → Popover.stories-BICy98Cw.js} +1 -1
  144. package/storybook-static/assets/{Progress.stories-C35R5YvA.js → Progress.stories-DECHNOME.js} +1 -1
  145. package/storybook-static/assets/{RadioGroup.stories-CjuD3CwD.js → RadioGroup.stories-DA7-uKfV.js} +1 -1
  146. package/storybook-static/assets/{Resizable.stories-Cs8dvdc5.js → Resizable.stories-B99kWkH7.js} +1 -1
  147. package/storybook-static/assets/{ScrollArea.stories-D6_z-5jm.js → ScrollArea.stories-BqvUAXqU.js} +1 -1
  148. package/storybook-static/assets/Section.stories-lFMlFBQn.js +277 -0
  149. package/storybook-static/assets/SectionBuilder-BQW705x0.js +1 -0
  150. package/storybook-static/assets/{Select.stories-w_kbza5k.js → Select.stories-BsKyZ6Io.js} +1 -1
  151. package/storybook-static/assets/{Separator.stories-B5QnaJXb.js → Separator.stories-BTDOaOM2.js} +1 -1
  152. package/storybook-static/assets/{Sheet.stories-CORnEGvV.js → Sheet.stories-Cam1gR6G.js} +1 -1
  153. package/storybook-static/assets/{Sidebar.stories-DVuWTi4j.js → Sidebar.stories-DnOa6G7y.js} +1 -1
  154. package/storybook-static/assets/{Slider.stories-YoS2vvT2.js → Slider.stories-Bslq7hjq.js} +1 -1
  155. package/storybook-static/assets/Sonner.stories-D34pBBtI.js +18 -0
  156. package/storybook-static/assets/Switch.stories-Puyb1-Bx.js +3 -0
  157. package/storybook-static/assets/{Table.stories-BuGU4MUM.js → Table.stories-ClZxAhut.js} +1 -1
  158. package/storybook-static/assets/Tabs.stories-CURNTETB.js +10 -0
  159. package/storybook-static/assets/{Textarea.stories-CHXVobz6.js → Textarea.stories-Cf1ZBrWw.js} +1 -1
  160. package/storybook-static/assets/{Toggle.stories-C4uB4Hkq.js → Toggle.stories-CdMHY_bi.js} +1 -1
  161. package/storybook-static/assets/{ToggleGroup.stories-Cr229wf_.js → ToggleGroup.stories-BM68m1dX.js} +1 -1
  162. package/storybook-static/assets/{Tooltip.stories-DmMYGR3T.js → Tooltip.stories-DiQv64dM.js} +1 -1
  163. package/storybook-static/assets/{accordion-BCfsz_gl.js → accordion-DVgwQcnw.js} +1 -1
  164. package/storybook-static/assets/{alert-dialog-BYt6Z7Kt.js → alert-dialog-DCUEwpqm.js} +1 -1
  165. package/storybook-static/assets/{avatar-CRn1qQsC.js → avatar-BzwOE-mi.js} +1 -1
  166. package/storybook-static/assets/{axe-JCJl60WC.js → axe-HmUsR1st.js} +1 -1
  167. package/storybook-static/assets/badge-BnQWua6u.js +1 -0
  168. package/storybook-static/assets/{button-BObfgcV1.js → button-0oMkiryo.js} +1 -1
  169. package/storybook-static/assets/{chart-column-CplFCmg8.js → chart-column-DZGb4ZZS.js} +1 -1
  170. package/storybook-static/assets/{check-DyecuwP4.js → check-B9hBGj6o.js} +1 -1
  171. package/storybook-static/assets/{checkbox-D5BmNJeL.js → checkbox-CyIeaWHX.js} +1 -1
  172. package/storybook-static/assets/{chevron-down-Bp7zbUB0.js → chevron-down-D_37S6il.js} +1 -1
  173. package/storybook-static/assets/{chevron-left-D1L4J3UW.js → chevron-left-BBoN0vbI.js} +1 -1
  174. package/storybook-static/assets/{chevron-right-oMYqDJ_f.js → chevron-right-B5vIMLxK.js} +1 -1
  175. package/storybook-static/assets/{circle-CyarsADt.js → circle-C5Lzx6Nx.js} +1 -1
  176. package/storybook-static/assets/clean-slate-D1HmMFJM.css +1 -0
  177. package/storybook-static/assets/{command-DCnXmNmT.js → command-Csa9p8_a.js} +1 -1
  178. package/storybook-static/assets/{createLucideIcon-CLBo0iA0.js → createLucideIcon-BrHXro7t.js} +1 -1
  179. package/storybook-static/assets/default-CN_Fo1GY.css +1 -0
  180. package/storybook-static/assets/{dialog-DL0QBIbC.js → dialog-CsnqITTn.js} +1 -1
  181. package/storybook-static/assets/{dropdown-menu-BwL9gQwG.js → dropdown-menu-BWxxwPHL.js} +1 -1
  182. package/storybook-static/assets/{ellipsis-DPg968Rc.js → ellipsis-BRS038RR.js} +1 -1
  183. package/storybook-static/assets/{grip-vertical-CM0GDwvq.js → grip-vertical-BxXG8KNA.js} +1 -1
  184. package/storybook-static/assets/{iframe-BWjPIle6.js → iframe-v7iAhKit.js} +219 -219
  185. package/storybook-static/assets/{index-DschQYGl.js → index-0-qMRXou.js} +1 -1
  186. package/storybook-static/assets/{index-CKwUGXmt.js → index-AvwFFKJc.js} +1 -1
  187. package/storybook-static/assets/{index-BfKpUbCE.js → index-BVDb4dFc.js} +1 -1
  188. package/storybook-static/assets/{index-Dr2xmx-F.js → index-B_qx7A5T.js} +1 -1
  189. package/storybook-static/assets/index-BfiCOk42.js +1 -0
  190. package/storybook-static/assets/{index-C9xvlw_B.js → index-Bv9yk470.js} +1 -1
  191. package/storybook-static/assets/{index-DMk2qc2_.js → index-Bw1A27Kp.js} +1 -1
  192. package/storybook-static/assets/{index-7XoYQV2z.js → index-ByqivBWx.js} +1 -1
  193. package/storybook-static/assets/{index-URSssr5a.js → index-C9Ta0ZTH.js} +1 -1
  194. package/storybook-static/assets/{index-Pk2lGsul.js → index-CDY5kTx5.js} +1 -1
  195. package/storybook-static/assets/{index-3zykFCgl.js → index-CGnyVRgB.js} +1 -1
  196. package/storybook-static/assets/{index-Cw7p-pms.js → index-CWjrGFAQ.js} +1 -1
  197. package/storybook-static/assets/{index-npvyVsxD.js → index-CwBdPBFz.js} +1 -1
  198. package/storybook-static/assets/index-D8RXF03I.js +1 -0
  199. package/storybook-static/assets/{index-DE2OlfDP.js → index-DLIxT4Z7.js} +1 -1
  200. package/storybook-static/assets/{index-BcAKBHrX.js → index-DbaA6-o1.js} +1 -1
  201. package/storybook-static/assets/index-Dph_5COR.js +1 -0
  202. package/storybook-static/assets/index-DrN5n71E.js +1 -0
  203. package/storybook-static/assets/{index-04C4iZwC.js → index-Tp9IdbR8.js} +1 -1
  204. package/storybook-static/assets/{index-Dsg7S8zu.js → index-WyF3-wTE.js} +1 -1
  205. package/storybook-static/assets/{index-A7UzX-Xw.js → index-XSmPROEP.js} +1 -1
  206. package/storybook-static/assets/{index-u70nzfOV.js → index-Z6wF44KX.js} +1 -1
  207. package/storybook-static/assets/{index-Dqw7miiX.js → index-_RPqOjlQ.js} +1 -1
  208. package/storybook-static/assets/{index-Cce91yJQ.js → index-jrimW4QO.js} +1 -1
  209. package/storybook-static/assets/{index-C6O7WofA.js → index-nqc17SX4.js} +1 -1
  210. package/storybook-static/assets/{label-CwntpYJ0.js → label-Do8ODIVk.js} +1 -1
  211. package/storybook-static/assets/lodash-DDwpuhPG.js +73 -0
  212. package/storybook-static/assets/minimal-modern-BlYVzfQU.css +1 -0
  213. package/storybook-static/assets/{popover-ClqrrvjL.js → popover-CcciSWAw.js} +1 -1
  214. package/storybook-static/assets/{radio-group-CvN0LQZp.js → radio-group-DiJ0Y_KQ.js} +1 -1
  215. package/storybook-static/assets/{react-18-Bj31y5Nr.js → react-18-Cr9fq_Ip.js} +1 -1
  216. package/storybook-static/assets/{react-icons.esm-DNr9VcvP.js → react-icons.esm-B_ULMmNU.js} +1 -1
  217. package/storybook-static/assets/{refresh-cw-OZakDsFY.js → refresh-cw-BmRDhIV_.js} +1 -1
  218. package/storybook-static/assets/{schemas-CaLvKjsI.js → schemas-CGNYCiJ6.js} +3 -3
  219. package/storybook-static/assets/{section-factories-DKfKL-5s.js → section-factories-DCCY9R35.js} +1 -1
  220. package/storybook-static/assets/{select-gtXRB92c.js → select-DDrkxaOg.js} +1 -1
  221. package/storybook-static/assets/{separator-CxCWfpZX.js → separator-o5SAUnaJ.js} +1 -1
  222. package/storybook-static/assets/{settings-2-DSSkfF6W.js → settings-2-xWGvvbG6.js} +1 -1
  223. package/storybook-static/assets/{sheet-r0VNiBiN.js → sheet-C7jhU3XE.js} +1 -1
  224. package/storybook-static/assets/{shopping-cart-CJBClF2m.js → shopping-cart-BFlrufvo.js} +1 -1
  225. package/storybook-static/assets/{sidebar-BsMnOE7Y.js → sidebar-C8hU1Mxy.js} +1 -1
  226. package/storybook-static/assets/spotify-CUDj7g8m.css +1 -0
  227. package/storybook-static/assets/switch-CKGRuk3u.js +1 -0
  228. package/storybook-static/assets/tabs-CopK2m3j.js +1 -0
  229. package/storybook-static/assets/{toggle-D08-8sQA.js → toggle-DmHbWetf.js} +1 -1
  230. package/storybook-static/assets/{tooltip-CZ1UAE_e.js → tooltip-_LqYEYFw.js} +1 -1
  231. package/storybook-static/assets/{trash-2-D55eseMQ.js → trash-2-xdbApPby.js} +1 -1
  232. package/storybook-static/assets/{x-n8sFtlI2.js → x-B1a4fyWM.js} +1 -1
  233. package/storybook-static/iframe.html +1 -1
  234. package/storybook-static/index.json +1 -1
  235. package/storybook-static/kit/builder/data-table/components/DataTable.d.ts +6 -3
  236. package/storybook-static/kit/builder/data-table/components/DataTable.d.ts.map +1 -1
  237. package/storybook-static/kit/builder/data-table/index.d.ts +6 -5
  238. package/storybook-static/kit/builder/data-table/index.d.ts.map +1 -1
  239. package/storybook-static/kit/builder/form/components/FormBuilder.d.ts +53 -13
  240. package/storybook-static/kit/builder/form/components/FormBuilder.d.ts.map +1 -1
  241. package/storybook-static/kit/builder/form/components/FormBuilderField.d.ts +5 -5
  242. package/storybook-static/kit/builder/form/components/FormBuilderField.d.ts.map +1 -1
  243. package/storybook-static/kit/builder/form/components/fields/ArrayField.d.ts +3 -0
  244. package/storybook-static/kit/builder/form/components/fields/ArrayField.d.ts.map +1 -0
  245. package/storybook-static/kit/builder/form/components/fields/AutocompleteField.d.ts +3 -0
  246. package/storybook-static/kit/builder/form/components/fields/AutocompleteField.d.ts.map +1 -0
  247. package/storybook-static/kit/builder/form/components/fields/CheckboxField.d.ts +3 -0
  248. package/storybook-static/kit/builder/form/components/fields/CheckboxField.d.ts.map +1 -0
  249. package/storybook-static/kit/builder/form/components/fields/DateField.d.ts +3 -0
  250. package/storybook-static/kit/builder/form/components/fields/DateField.d.ts.map +1 -0
  251. package/storybook-static/kit/builder/form/components/fields/FileField.d.ts +3 -0
  252. package/storybook-static/kit/builder/form/components/fields/FileField.d.ts.map +1 -0
  253. package/storybook-static/kit/builder/form/components/fields/NumberField.d.ts +3 -0
  254. package/storybook-static/kit/builder/form/components/fields/NumberField.d.ts.map +1 -0
  255. package/storybook-static/kit/builder/form/components/fields/ObjectField.d.ts +3 -0
  256. package/storybook-static/kit/builder/form/components/fields/ObjectField.d.ts.map +1 -0
  257. package/storybook-static/kit/builder/form/components/fields/RadioField.d.ts +3 -0
  258. package/storybook-static/kit/builder/form/components/fields/RadioField.d.ts.map +1 -0
  259. package/storybook-static/kit/builder/form/components/fields/SelectField.d.ts +3 -0
  260. package/storybook-static/kit/builder/form/components/fields/SelectField.d.ts.map +1 -0
  261. package/storybook-static/kit/builder/form/components/fields/SwitchField.d.ts +3 -0
  262. package/storybook-static/kit/builder/form/components/fields/SwitchField.d.ts.map +1 -0
  263. package/storybook-static/kit/builder/form/components/fields/TextField.d.ts +3 -0
  264. package/storybook-static/kit/builder/form/components/fields/TextField.d.ts.map +1 -0
  265. package/storybook-static/kit/builder/form/components/fields/TextareaField.d.ts +3 -0
  266. package/storybook-static/kit/builder/form/components/fields/TextareaField.d.ts.map +1 -0
  267. package/storybook-static/kit/builder/form/components/fields/index.d.ts +14 -0
  268. package/storybook-static/kit/builder/form/components/fields/index.d.ts.map +1 -0
  269. package/storybook-static/kit/builder/form/components/fields/types.d.ts +14 -0
  270. package/storybook-static/kit/builder/form/components/fields/types.d.ts.map +1 -0
  271. package/storybook-static/kit/builder/form/utils/field-factories.d.ts +1 -0
  272. package/storybook-static/kit/builder/form/utils/field-factories.d.ts.map +1 -1
  273. package/storybook-static/kit/builder/section/SectionBuilder.d.ts.map +1 -1
  274. package/storybook-static/kit/builder/section/types.d.ts +12 -1
  275. package/storybook-static/kit/builder/section/types.d.ts.map +1 -1
  276. package/storybook-static/kit/builder/stack-dialog/context.d.ts +3 -0
  277. package/storybook-static/kit/builder/stack-dialog/context.d.ts.map +1 -0
  278. package/storybook-static/kit/builder/stack-dialog/hooks.d.ts +6 -0
  279. package/storybook-static/kit/builder/stack-dialog/hooks.d.ts.map +1 -0
  280. package/storybook-static/kit/builder/stack-dialog/index.d.ts +5 -0
  281. package/storybook-static/kit/builder/stack-dialog/index.d.ts.map +1 -0
  282. package/storybook-static/kit/builder/stack-dialog/provider.d.ts +3 -0
  283. package/storybook-static/kit/builder/stack-dialog/provider.d.ts.map +1 -0
  284. package/storybook-static/kit/builder/stack-dialog/renderer.d.ts +6 -0
  285. package/storybook-static/kit/builder/stack-dialog/renderer.d.ts.map +1 -0
  286. package/storybook-static/kit/builder/stack-dialog/types.d.ts +20 -0
  287. package/storybook-static/kit/builder/stack-dialog/types.d.ts.map +1 -0
  288. package/storybook-static/kit/components/autocomplete/Autocomplete.d.ts +35 -3
  289. package/storybook-static/kit/components/autocomplete/Autocomplete.d.ts.map +1 -1
  290. package/storybook-static/kit/components/autocomplete/index.d.ts +1 -0
  291. package/storybook-static/kit/components/autocomplete/index.d.ts.map +1 -1
  292. package/storybook-static/kit/components/autocomplete/types.d.ts +1 -1
  293. package/storybook-static/kit/components/autocomplete/types.d.ts.map +1 -1
  294. package/storybook-static/kit/components/monthpicker/MonthPicker.d.ts +32 -0
  295. package/storybook-static/kit/components/monthpicker/MonthPicker.d.ts.map +1 -0
  296. package/storybook-static/kit/components/monthpicker/MonthRangePicker.d.ts +48 -0
  297. package/storybook-static/kit/components/monthpicker/MonthRangePicker.d.ts.map +1 -0
  298. package/storybook-static/kit/layouts/admin/components/AdminLayout.d.ts.map +1 -1
  299. package/storybook-static/kit/layouts/admin/hooks/menu.d.ts +1 -0
  300. package/storybook-static/kit/layouts/admin/hooks/menu.d.ts.map +1 -1
  301. package/storybook-static/kit/providers/ThemeProvider.d.ts.map +1 -1
  302. package/storybook-static/project.json +1 -1
  303. package/storybook-static/assets/AdminLayout.Basic.stories-C-ZxuH-O.js +0 -4
  304. package/storybook-static/assets/AdminLayout.Collapsible.stories-xcQzkxio.js +0 -4
  305. package/storybook-static/assets/AdminLayout.Complex.stories-DyjkVpvE.js +0 -29
  306. package/storybook-static/assets/AdminLayout.CustomSidebarHeaderComponent.stories-BqhzWCIA.js +0 -9
  307. package/storybook-static/assets/AdminLayout.CustomSidebarTitleAndIcon.stories-aWxyR67T.js +0 -4
  308. package/storybook-static/assets/AdminLayout.HeaderSlots.stories-dNzhUdDt.js +0 -7
  309. package/storybook-static/assets/Autocomplete-B4gV705L.js +0 -35
  310. package/storybook-static/assets/Autocomplete.stories-CyOvjTGN.js +0 -33
  311. package/storybook-static/assets/Badge.stories-_-G3GriP.js +0 -12
  312. package/storybook-static/assets/DataTable.Basic.stories-BQNWUKiw.js +0 -6
  313. package/storybook-static/assets/DataTable.Filters.stories-DPCoeYhK.js +0 -21
  314. package/storybook-static/assets/DataTable.Pagination.stories-8UNqTNgw.js +0 -24
  315. package/storybook-static/assets/DataTable.SelectionAndActions.stories-CDEjgQ6T.js +0 -26
  316. package/storybook-static/assets/DataTable.Sorting.stories-qG7-X_6r.js +0 -6
  317. package/storybook-static/assets/Form.Basic.stories-dE4nbgpr.js +0 -45
  318. package/storybook-static/assets/Form.Complex.stories-BEZufnjb.js +0 -230
  319. package/storybook-static/assets/Form.Dynamic.stories-cJTbd6cV.js +0 -247
  320. package/storybook-static/assets/Form.Simple.stories-DOPzZKhh.js +0 -50
  321. package/storybook-static/assets/FormBuilder-C0S7C69Q.js +0 -5
  322. package/storybook-static/assets/Section.stories-Ce5qYITI.js +0 -196
  323. package/storybook-static/assets/SectionBuilder-Df_lRZkj.js +0 -1
  324. package/storybook-static/assets/Sonner.stories-CXW5e_Qg.js +0 -18
  325. package/storybook-static/assets/Switch.stories-zr6i-aNi.js +0 -3
  326. package/storybook-static/assets/Tabs.stories-jxkJ-AUI.js +0 -10
  327. package/storybook-static/assets/clean-slate-V4nUw2Bm.css +0 -1
  328. package/storybook-static/assets/default-CuTBjDca.css +0 -1
  329. package/storybook-static/assets/index-BN5_W3Yi.js +0 -1
  330. package/storybook-static/assets/index-C5eJ31Z3.js +0 -1
  331. package/storybook-static/assets/index-DWC9SV-P.js +0 -1
  332. package/storybook-static/assets/lodash-BkmSIg_J.js +0 -73
  333. package/storybook-static/assets/minimal-modern-d2yFlFJM.css +0 -1
  334. package/storybook-static/assets/spotify-BuPUgQEa.css +0 -1
@@ -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};
@@ -1,3 +1,3 @@
1
- import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as m}from"./iframe-BWjPIle6.js";import{S as _}from"./index-BcAKBHrX.js";import{F as v,C,k as w,m as D,o as $,s as h,d as P,e as E}from"./schemas-CaLvKjsI.js";import{c as d}from"./utils-D-KgF5mV.js";import{L as M}from"./label-CwntpYJ0.js";import{I as F}from"./input-11YRd9gD.js";import{B as V}from"./button-BObfgcV1.js";import{t as L}from"./index-A7UzX-Xw.js";import"./preload-helper-Dp1pzeXC.js";import"./index-04C4iZwC.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./index-CGrAONsN.js";const y=v,b=m.createContext({}),l=({...o})=>e.jsx(b.Provider,{value:{name:o.name},children:e.jsx(C,{...o})}),c=()=>{const o=m.useContext(b),r=m.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:n}=r;return{id:n,name:o.name,formItemId:`${n}-form-item`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`,...a}},S=m.createContext({});function u({className:o,...r}){const t=m.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 p({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}u.__docgenInfo={description:"",methods:[],displayName:"FormItem"};p.__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(u,{children:[e.jsx(p,{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(u,{children:[e.jsx(p,{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:`{
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
2
  render: () => <ValidatedFormDemo />
3
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};