@k3-universe/react-kit 0.0.1 → 0.0.2

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 (217) hide show
  1. package/.storybook/preview.ts +1 -1
  2. package/dist/index.d.ts +63 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +91 -0
  5. package/dist/kit/builder/data-table/components/DataTable.d.ts +4 -1
  6. package/dist/kit/builder/data-table/components/DataTable.d.ts.map +1 -1
  7. package/dist/kit/builder/data-table/index.d.ts +6 -5
  8. package/dist/kit/builder/data-table/index.d.ts.map +1 -1
  9. package/dist/kit/builder/form/components/FormBuilder.d.ts +4 -1
  10. package/dist/kit/builder/form/components/FormBuilder.d.ts.map +1 -1
  11. package/dist/kit/builder/form/components/{FormActions.d.ts → FormBuilderActions.d.ts} +3 -3
  12. package/dist/kit/builder/form/components/FormBuilderActions.d.ts.map +1 -0
  13. package/{storybook-static/kit/builder/form/components/FormField.d.ts → dist/kit/builder/form/components/FormBuilderField.d.ts} +4 -4
  14. package/dist/kit/builder/form/components/FormBuilderField.d.ts.map +1 -0
  15. package/dist/kit/builder/form/components/index.d.ts +2 -3
  16. package/dist/kit/builder/form/components/index.d.ts.map +1 -1
  17. package/dist/kit/builder/section/SectionBuilder.d.ts.map +1 -1
  18. package/dist/kit/components/autocomplete/types.d.ts +1 -1
  19. package/dist/kit/components/autocomplete/types.d.ts.map +1 -1
  20. package/dist/kit/layouts/admin/components/AdminLayout.d.ts.map +1 -1
  21. package/dist/kit/layouts/admin/hooks/menu.d.ts +1 -0
  22. package/dist/kit/layouts/admin/hooks/menu.d.ts.map +1 -1
  23. package/dist/kit/providers/ThemeProvider.d.ts.map +1 -1
  24. package/dist/kit/themes/base.css +1 -0
  25. package/dist/kit/themes/clean-slate.css +1 -0
  26. package/dist/kit/themes/default.css +1 -0
  27. package/dist/kit/themes/minimal-modern.css +1 -0
  28. package/dist/kit/themes/spotify.css +1 -0
  29. package/package.json +11 -10
  30. package/src/index.ts +88 -0
  31. package/src/kit/builder/data-table/components/DataTable.tsx +63 -23
  32. package/src/kit/builder/data-table/index.ts +6 -5
  33. package/src/kit/builder/form/components/FormBuilder.tsx +34 -10
  34. package/src/kit/builder/form/components/{FormActions.tsx → FormBuilderActions.tsx} +3 -3
  35. package/src/kit/builder/form/components/{FormField.tsx → FormBuilderField.tsx} +79 -8
  36. package/src/kit/builder/form/components/index.ts +2 -3
  37. package/src/kit/builder/section/SectionBuilder.tsx +67 -10
  38. package/src/kit/components/autocomplete/types.ts +1 -1
  39. package/src/kit/layouts/admin/components/AdminLayout.tsx +1 -2
  40. package/src/kit/layouts/admin/hooks/menu.ts +2 -2
  41. package/src/kit/providers/ThemeProvider.tsx +38 -38
  42. package/src/stories/kit/layouts/admin/AdminLayout.Basic.stories.tsx +2 -0
  43. package/src/stories/kit/layouts/admin/AdminLayout.Collapsible.stories.tsx +2 -0
  44. package/src/stories/kit/layouts/admin/AdminLayout.Complex.stories.tsx +2 -0
  45. package/src/stories/kit/layouts/admin/AdminLayout.CustomSidebarHeaderComponent.stories.tsx +2 -0
  46. package/src/stories/kit/layouts/admin/AdminLayout.CustomSidebarTitleAndIcon.stories.tsx +2 -0
  47. package/src/stories/kit/layouts/admin/AdminLayout.HeaderSlots.stories.tsx +2 -0
  48. package/storybook-static/assets/{Accordion.stories-N1auke5L.js → Accordion.stories-q6yg6wg1.js} +1 -1
  49. package/storybook-static/assets/{AdminLayout-Cxd0-A_L.js → AdminLayout-B9bV4J_6.js} +1 -1
  50. package/storybook-static/assets/{AdminLayout.Basic.stories-C_I6rWuq.js → AdminLayout.Basic.stories-C-ZxuH-O.js} +1 -1
  51. package/storybook-static/assets/AdminLayout.Collapsible.stories-xcQzkxio.js +4 -0
  52. package/storybook-static/assets/{AdminLayout.Complex.stories-BbY1Ue6d.js → AdminLayout.Complex.stories-DyjkVpvE.js} +1 -1
  53. package/storybook-static/assets/{AdminLayout.CustomSidebarHeaderComponent.stories-LFVi-aIv.js → AdminLayout.CustomSidebarHeaderComponent.stories-BqhzWCIA.js} +1 -1
  54. package/storybook-static/assets/AdminLayout.CustomSidebarTitleAndIcon.stories-aWxyR67T.js +4 -0
  55. package/storybook-static/assets/{AdminLayout.HeaderSlots.stories-BactzgkF.js → AdminLayout.HeaderSlots.stories-dNzhUdDt.js} +1 -1
  56. package/storybook-static/assets/{Alert.stories-_FtuixdR.js → Alert.stories-DXwNfJ3w.js} +1 -1
  57. package/storybook-static/assets/{AlertDialog.stories-6NY3BjwR.js → AlertDialog.stories-I324NsnP.js} +1 -1
  58. package/storybook-static/assets/{AspectRatio.stories-DAT11y02.js → AspectRatio.stories-CghHiX3Z.js} +1 -1
  59. package/storybook-static/assets/{Autocomplete-DngjqsCM.js → Autocomplete-B4gV705L.js} +1 -1
  60. package/storybook-static/assets/{Autocomplete.stories-BCaOrgTR.js → Autocomplete.stories-CyOvjTGN.js} +1 -1
  61. package/storybook-static/assets/{Avatar.stories-DlzxSLJ-.js → Avatar.stories-CEF5FVSR.js} +1 -1
  62. package/storybook-static/assets/{Badge.stories-DKHXsoV5.js → Badge.stories-_-G3GriP.js} +1 -1
  63. package/storybook-static/assets/{Breadcrumb.stories-D8eUHpf7.js → Breadcrumb.stories-DORe9T4b.js} +1 -1
  64. package/storybook-static/assets/{Button.stories-kvPdKxdw.js → Button.stories-3nQ6wsBX.js} +1 -1
  65. package/storybook-static/assets/{Calendar.stories-D-hUtQQI.js → Calendar.stories-Dn__djE1.js} +1 -1
  66. package/storybook-static/assets/{Card.stories-y8Z7NgrQ.js → Card.stories-BJcbdwCI.js} +1 -1
  67. package/storybook-static/assets/{Carousel.stories-CFcHYKgp.js → Carousel.stories-CfqbE7Va.js} +1 -1
  68. package/storybook-static/assets/{Chart.stories-BJwLNKfE.js → Chart.stories-cGgef3tv.js} +1 -1
  69. package/storybook-static/assets/{Checkbox.stories-B22Fbwx1.js → Checkbox.stories-BcaxWzCS.js} +1 -1
  70. package/storybook-static/assets/{Collapsible.stories-BgcRp8Rk.js → Collapsible.stories-CQ95s7Cs.js} +1 -1
  71. package/storybook-static/assets/{Combination-BT_gXe1L.js → Combination-CeVus13L.js} +1 -1
  72. package/storybook-static/assets/{Command.stories-Dp4CtSQR.js → Command.stories-DYflJh8u.js} +1 -1
  73. package/storybook-static/assets/{ContextMenu.stories-DnVnIi-T.js → ContextMenu.stories-CU7ehYrE.js} +1 -1
  74. package/storybook-static/assets/DataTable.Basic.stories-BQNWUKiw.js +6 -0
  75. package/storybook-static/assets/{DataTable.Filters.stories-CO0ipuGm.js → DataTable.Filters.stories-DPCoeYhK.js} +1 -1
  76. package/storybook-static/assets/{DataTable.Pagination.stories-DNwCw64e.js → DataTable.Pagination.stories-8UNqTNgw.js} +1 -1
  77. package/storybook-static/assets/{DataTable.SelectionAndActions.stories-DGgdEbsf.js → DataTable.SelectionAndActions.stories-CDEjgQ6T.js} +1 -1
  78. package/storybook-static/assets/DataTable.Sorting.stories-qG7-X_6r.js +6 -0
  79. package/storybook-static/assets/{Dialog.stories-DQkYN8ht.js → Dialog.stories-Bu6ZJXNH.js} +1 -1
  80. package/storybook-static/assets/{Dialog.stories-DXZINEgo.js → Dialog.stories-DobNZ0Hp.js} +1 -1
  81. package/storybook-static/assets/{Drawer.stories-DMH_vZgi.js → Drawer.stories-BN0idp4u.js} +1 -1
  82. package/storybook-static/assets/{DropdownMenu.stories-Dl8y-N7T.js → DropdownMenu.stories-sfsVDTvm.js} +1 -1
  83. package/storybook-static/assets/{Form.Basic.stories-CJugIYsx.js → Form.Basic.stories-dE4nbgpr.js} +1 -1
  84. package/storybook-static/assets/{Form.Complex.stories-BPogRp6F.js → Form.Complex.stories-BEZufnjb.js} +1 -1
  85. package/storybook-static/assets/{Form.Dynamic.stories-Boway5AK.js → Form.Dynamic.stories-cJTbd6cV.js} +1 -1
  86. package/storybook-static/assets/{Form.Simple.stories-_OXGXXpE.js → Form.Simple.stories-DOPzZKhh.js} +1 -1
  87. package/storybook-static/assets/{Form.stories-BoHyR8ho.js → Form.stories-27doU7JS.js} +1 -1
  88. package/storybook-static/assets/{FormBuilder-BGgeY8ik.js → FormBuilder-C0S7C69Q.js} +1 -1
  89. package/storybook-static/assets/{HoverCard.stories-1HM92M79.js → HoverCard.stories-0lted9Zx.js} +1 -1
  90. package/storybook-static/assets/{Input.stories-sQ4EUlWt.js → Input.stories-CwsIObFs.js} +1 -1
  91. package/storybook-static/assets/{InputOtp.stories-Cpk_EmLx.js → InputOtp.stories-DVc086h4.js} +1 -1
  92. package/storybook-static/assets/{Label.stories-MjABHKSw.js → Label.stories-bJa0rk1A.js} +1 -1
  93. package/storybook-static/assets/{Login.stories-BY4OYGk3.js → Login.stories-C6X6Kj5B.js} +1 -1
  94. package/storybook-static/assets/{Menubar.stories-B_60TWNE.js → Menubar.stories-CuediVp7.js} +1 -1
  95. package/storybook-static/assets/{NavigationMenu.stories-DyuaBvvq.js → NavigationMenu.stories-CKGZYhKk.js} +1 -1
  96. package/storybook-static/assets/{Page.stories-DQKMxrPZ.js → Page.stories-Cf76wtRx.js} +1 -1
  97. package/storybook-static/assets/{Pagination.stories-CBo7UrNd.js → Pagination.stories-D7IdL1_4.js} +1 -1
  98. package/storybook-static/assets/{Popover.stories-D98_JrxN.js → Popover.stories-1VP_zNY8.js} +1 -1
  99. package/storybook-static/assets/{Progress.stories-Dejt5v3z.js → Progress.stories-C35R5YvA.js} +1 -1
  100. package/storybook-static/assets/{RadioGroup.stories-Tz2LW6O6.js → RadioGroup.stories-CjuD3CwD.js} +1 -1
  101. package/storybook-static/assets/{Resizable.stories-DhP2GKN7.js → Resizable.stories-Cs8dvdc5.js} +1 -1
  102. package/storybook-static/assets/{ScrollArea.stories-CF7-8wbM.js → ScrollArea.stories-D6_z-5jm.js} +1 -1
  103. package/storybook-static/assets/{Section.stories-BpurjHIQ.js → Section.stories-Ce5qYITI.js} +1 -1
  104. package/storybook-static/assets/SectionBuilder-Df_lRZkj.js +1 -0
  105. package/storybook-static/assets/{Select.stories-DJrU-mi0.js → Select.stories-w_kbza5k.js} +1 -1
  106. package/storybook-static/assets/{Separator.stories-BYH_o8QM.js → Separator.stories-B5QnaJXb.js} +1 -1
  107. package/storybook-static/assets/{Sheet.stories-BNJ7BIb-.js → Sheet.stories-CORnEGvV.js} +1 -1
  108. package/storybook-static/assets/{Sidebar.stories-BbjcJuOg.js → Sidebar.stories-DVuWTi4j.js} +1 -1
  109. package/storybook-static/assets/{Slider.stories-CWOjKHKD.js → Slider.stories-YoS2vvT2.js} +1 -1
  110. package/storybook-static/assets/{Sonner.stories-CXSZs5yN.js → Sonner.stories-CXW5e_Qg.js} +1 -1
  111. package/storybook-static/assets/{Switch.stories-BUQjobWe.js → Switch.stories-zr6i-aNi.js} +1 -1
  112. package/storybook-static/assets/{Table.stories-DJcV7M9R.js → Table.stories-BuGU4MUM.js} +1 -1
  113. package/storybook-static/assets/{Tabs.stories-ByeVrP18.js → Tabs.stories-jxkJ-AUI.js} +1 -1
  114. package/storybook-static/assets/{Textarea.stories-CKsDPHYc.js → Textarea.stories-CHXVobz6.js} +1 -1
  115. package/storybook-static/assets/{Toggle.stories-DutEzZ8k.js → Toggle.stories-C4uB4Hkq.js} +1 -1
  116. package/storybook-static/assets/{ToggleGroup.stories-C9fzJTh-.js → ToggleGroup.stories-Cr229wf_.js} +1 -1
  117. package/storybook-static/assets/{Tooltip.stories-CngnJbP7.js → Tooltip.stories-DmMYGR3T.js} +1 -1
  118. package/storybook-static/assets/{accordion-bQe9Rep4.js → accordion-BCfsz_gl.js} +1 -1
  119. package/storybook-static/assets/{alert-dialog-CypF_yaW.js → alert-dialog-BYt6Z7Kt.js} +1 -1
  120. package/storybook-static/assets/{avatar-CukM9hXu.js → avatar-CRn1qQsC.js} +1 -1
  121. package/storybook-static/assets/{axe-W8QMjM0E.js → axe-JCJl60WC.js} +1 -1
  122. package/storybook-static/assets/{button-BTWmFXop.js → button-BObfgcV1.js} +1 -1
  123. package/storybook-static/assets/{chart-column-Bzh5arua.js → chart-column-CplFCmg8.js} +1 -1
  124. package/storybook-static/assets/{check-BgWXKGqi.js → check-DyecuwP4.js} +1 -1
  125. package/storybook-static/assets/{checkbox-QlugAqJY.js → checkbox-D5BmNJeL.js} +1 -1
  126. package/storybook-static/assets/{chevron-down-BqLjUn1_.js → chevron-down-Bp7zbUB0.js} +1 -1
  127. package/storybook-static/assets/{chevron-left-BR_0lKnE.js → chevron-left-D1L4J3UW.js} +1 -1
  128. package/storybook-static/assets/{chevron-right-DpCIoMaJ.js → chevron-right-oMYqDJ_f.js} +1 -1
  129. package/storybook-static/assets/{circle-DVJTkDI7.js → circle-CyarsADt.js} +1 -1
  130. package/storybook-static/assets/clean-slate-V4nUw2Bm.css +1 -0
  131. package/storybook-static/assets/{command-BERL33lL.js → command-DCnXmNmT.js} +1 -1
  132. package/storybook-static/assets/{createLucideIcon-1ZwIAs_l.js → createLucideIcon-CLBo0iA0.js} +1 -1
  133. package/storybook-static/assets/default-CuTBjDca.css +1 -0
  134. package/storybook-static/assets/{dialog-DM9YJ1JD.js → dialog-DL0QBIbC.js} +1 -1
  135. package/storybook-static/assets/{dropdown-menu-TfFll7G9.js → dropdown-menu-BwL9gQwG.js} +1 -1
  136. package/storybook-static/assets/{ellipsis-BSY8VuLI.js → ellipsis-DPg968Rc.js} +1 -1
  137. package/storybook-static/assets/{grip-vertical-Buja1rv9.js → grip-vertical-CM0GDwvq.js} +1 -1
  138. package/storybook-static/assets/{iframe-G-6sM9Mt.js → iframe-BWjPIle6.js} +4 -4
  139. package/storybook-static/assets/{index-DqWzLCH-.js → index-04C4iZwC.js} +1 -1
  140. package/storybook-static/assets/{index-B-fXBfyD.js → index-3zykFCgl.js} +1 -1
  141. package/storybook-static/assets/{index-CAwQR9Pv.js → index-7XoYQV2z.js} +1 -1
  142. package/storybook-static/assets/{index-DySHPxMy.js → index-A7UzX-Xw.js} +1 -1
  143. package/storybook-static/assets/index-BN5_W3Yi.js +1 -0
  144. package/storybook-static/assets/{index-1v1lhNFD.js → index-BcAKBHrX.js} +1 -1
  145. package/storybook-static/assets/{index-7yNAGow7.js → index-BfKpUbCE.js} +1 -1
  146. package/storybook-static/assets/index-C5eJ31Z3.js +1 -0
  147. package/storybook-static/assets/{index-CayhpKmv.js → index-C6O7WofA.js} +1 -1
  148. package/storybook-static/assets/{index-BDwnENHR.js → index-C9xvlw_B.js} +1 -1
  149. package/storybook-static/assets/{index-Bq6UNRVc.js → index-CKwUGXmt.js} +1 -1
  150. package/storybook-static/assets/{index-d_S6mtzU.js → index-Cce91yJQ.js} +1 -1
  151. package/storybook-static/assets/{index-CMmbDm5O.js → index-Cw7p-pms.js} +1 -1
  152. package/storybook-static/assets/{index-CLmN5G1a.js → index-DE2OlfDP.js} +1 -1
  153. package/storybook-static/assets/{index-ev1RjzGv.js → index-DMk2qc2_.js} +1 -1
  154. package/storybook-static/assets/index-DWC9SV-P.js +1 -0
  155. package/storybook-static/assets/{index-HghBIZeg.js → index-Dqw7miiX.js} +1 -1
  156. package/storybook-static/assets/{index-ClNNG_ys.js → index-Dr2xmx-F.js} +1 -1
  157. package/storybook-static/assets/{index-lH-AZpAn.js → index-DschQYGl.js} +1 -1
  158. package/storybook-static/assets/{index-SxI7_jxe.js → index-Dsg7S8zu.js} +1 -1
  159. package/storybook-static/assets/{index-DvM9azdj.js → index-Pk2lGsul.js} +1 -1
  160. package/storybook-static/assets/{index-DNAxNqEO.js → index-URSssr5a.js} +1 -1
  161. package/storybook-static/assets/{index-CZaD3imo.js → index-npvyVsxD.js} +1 -1
  162. package/storybook-static/assets/{index-CzJf-yyP.js → index-u70nzfOV.js} +1 -1
  163. package/storybook-static/assets/{label-C5vJTTwH.js → label-CwntpYJ0.js} +1 -1
  164. package/storybook-static/assets/{lodash-Q9aGJGMb.js → lodash-BkmSIg_J.js} +1 -1
  165. package/storybook-static/assets/minimal-modern-d2yFlFJM.css +1 -0
  166. package/storybook-static/assets/{popover-DW1K4QCO.js → popover-ClqrrvjL.js} +1 -1
  167. package/storybook-static/assets/{radio-group-iPL-8jvw.js → radio-group-CvN0LQZp.js} +1 -1
  168. package/storybook-static/assets/{react-18-CK1-M7n3.js → react-18-Bj31y5Nr.js} +1 -1
  169. package/storybook-static/assets/{react-icons.esm-n2MUhK0n.js → react-icons.esm-DNr9VcvP.js} +1 -1
  170. package/storybook-static/assets/{refresh-cw-FYEbhX1i.js → refresh-cw-OZakDsFY.js} +1 -1
  171. package/storybook-static/assets/{schemas-S_Tg7JYp.js → schemas-CaLvKjsI.js} +1 -1
  172. package/storybook-static/assets/{section-factories-CC6eFfbk.js → section-factories-DKfKL-5s.js} +1 -1
  173. package/storybook-static/assets/{select-DbLzULCJ.js → select-gtXRB92c.js} +1 -1
  174. package/storybook-static/assets/{separator-DoUX1TNx.js → separator-CxCWfpZX.js} +1 -1
  175. package/storybook-static/assets/{settings-2-CpOcGlDm.js → settings-2-DSSkfF6W.js} +1 -1
  176. package/storybook-static/assets/{sheet-n5VQ25jh.js → sheet-r0VNiBiN.js} +1 -1
  177. package/storybook-static/assets/{shopping-cart-9kOJ1UDd.js → shopping-cart-CJBClF2m.js} +1 -1
  178. package/storybook-static/assets/{sidebar-CvUiZOJe.js → sidebar-BsMnOE7Y.js} +1 -1
  179. package/storybook-static/assets/spotify-BuPUgQEa.css +1 -0
  180. package/storybook-static/assets/{toggle-B-YKWMF8.js → toggle-D08-8sQA.js} +1 -1
  181. package/storybook-static/assets/{tooltip-CNONbPiI.js → tooltip-CZ1UAE_e.js} +1 -1
  182. package/storybook-static/assets/{trash-2-Bt5LMclM.js → trash-2-D55eseMQ.js} +1 -1
  183. package/storybook-static/assets/{x-DG9mLFAg.js → x-n8sFtlI2.js} +1 -1
  184. package/storybook-static/iframe.html +1 -1
  185. package/storybook-static/index.d.ts +63 -0
  186. package/storybook-static/index.d.ts.map +1 -1
  187. package/storybook-static/kit/builder/form/components/{FormActions.d.ts → FormBuilderActions.d.ts} +3 -3
  188. package/storybook-static/kit/builder/form/components/FormBuilderActions.d.ts.map +1 -0
  189. package/{dist/kit/builder/form/components/FormField.d.ts → storybook-static/kit/builder/form/components/FormBuilderField.d.ts} +4 -4
  190. package/storybook-static/kit/builder/form/components/FormBuilderField.d.ts.map +1 -0
  191. package/storybook-static/kit/builder/form/components/index.d.ts +2 -3
  192. package/storybook-static/kit/builder/form/components/index.d.ts.map +1 -1
  193. package/storybook-static/kit/builder/section/SectionBuilder.d.ts.map +1 -1
  194. package/storybook-static/project.json +1 -1
  195. package/vite.config.ts +76 -52
  196. package/dist/kit/builder/form/components/FormActions.d.ts.map +0 -1
  197. package/dist/kit/builder/form/components/FormField.d.ts.map +0 -1
  198. package/dist/kit/builder/form/components/FormSection.d.ts +0 -15
  199. package/dist/kit/builder/form/components/FormSection.d.ts.map +0 -1
  200. package/src/kit/builder/form/components/FormSection.tsx +0 -88
  201. package/storybook-static/assets/AdminLayout.Collapsible.stories-CsU3DwTo.js +0 -4
  202. package/storybook-static/assets/AdminLayout.CustomSidebarTitleAndIcon.stories-BqP6UVc7.js +0 -4
  203. package/storybook-static/assets/DataTable.Basic.stories-DBF5VYq9.js +0 -6
  204. package/storybook-static/assets/DataTable.Sorting.stories-CWpqloAB.js +0 -6
  205. package/storybook-static/assets/SectionBuilder-Bav4WrnT.js +0 -1
  206. package/storybook-static/assets/clean-slate-BR-XvZPt.css +0 -1
  207. package/storybook-static/assets/default-M24vcGB8.css +0 -1
  208. package/storybook-static/assets/index-DhoByIgc.js +0 -1
  209. package/storybook-static/assets/index-I343IfOC.js +0 -1
  210. package/storybook-static/assets/index-_crRFOM5.js +0 -1
  211. package/storybook-static/assets/minimal-modern-BmvR5wyr.css +0 -1
  212. package/storybook-static/assets/spotify-DpbeJq1r.css +0 -1
  213. package/storybook-static/kit/builder/form/components/FormActions.d.ts.map +0 -1
  214. package/storybook-static/kit/builder/form/components/FormField.d.ts.map +0 -1
  215. package/storybook-static/kit/builder/form/components/FormSection.d.ts +0 -15
  216. package/storybook-static/kit/builder/form/components/FormSection.d.ts.map +0 -1
  217. /package/src/{index.css → kit/themes/base.css} +0 -0
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as f}from"./iframe-G-6sM9Mt.js";import{C as n}from"./checkbox-QlugAqJY.js";import{L as m}from"./label-C5vJTTwH.js";import"./preload-helper-Dp1pzeXC.js";import"./index-1v1lhNFD.js";import"./index-DvM9azdj.js";import"./index-DW48STyt.js";import"./index-CAwQR9Pv.js";import"./index-I343IfOC.js";import"./index-HghBIZeg.js";import"./index-ev1RjzGv.js";import"./index-Bq6UNRVc.js";import"./index-DqWzLCH-.js";import"./index-_crRFOM5.js";import"./index-CZaD3imo.js";import"./utils-D-KgF5mV.js";import"./check-BgWXKGqi.js";import"./createLucideIcon-1ZwIAs_l.js";const G={title:"Shadcn/UI/Checkbox",component:n},t={render:()=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(n,{id:"terms"}),e.jsx(m,{htmlFor:"terms",className:"cursor-pointer",children:"Accept terms and conditions"})]})};function k(){const[r,a]=f.useState(!1);return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(n,{id:"controlled",checked:r,onCheckedChange:c=>a(!!c)}),e.jsxs(m,{htmlFor:"controlled",children:["Controlled: ",r?"checked":"unchecked"]})]})}const o={render:()=>e.jsx(k,{})};function S(){const[r,a]=f.useState("indeterminate");return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(n,{id:"indeterminate",checked:r,onCheckedChange:c=>a(c)}),e.jsx(m,{htmlFor:"indeterminate",children:"Indeterminate"})]})}const s={render:()=>e.jsx(S,{})};var i,d,l;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`{
1
+ import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as f}from"./iframe-BWjPIle6.js";import{C as n}from"./checkbox-D5BmNJeL.js";import{L as m}from"./label-CwntpYJ0.js";import"./preload-helper-Dp1pzeXC.js";import"./index-BcAKBHrX.js";import"./index-Pk2lGsul.js";import"./index-DW48STyt.js";import"./index-7XoYQV2z.js";import"./index-DWC9SV-P.js";import"./index-Dqw7miiX.js";import"./index-DMk2qc2_.js";import"./index-CKwUGXmt.js";import"./index-04C4iZwC.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./utils-D-KgF5mV.js";import"./check-DyecuwP4.js";import"./createLucideIcon-CLBo0iA0.js";const G={title:"Shadcn/UI/Checkbox",component:n},t={render:()=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(n,{id:"terms"}),e.jsx(m,{htmlFor:"terms",className:"cursor-pointer",children:"Accept terms and conditions"})]})};function k(){const[r,a]=f.useState(!1);return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(n,{id:"controlled",checked:r,onCheckedChange:c=>a(!!c)}),e.jsxs(m,{htmlFor:"controlled",children:["Controlled: ",r?"checked":"unchecked"]})]})}const o={render:()=>e.jsx(k,{})};function S(){const[r,a]=f.useState("indeterminate");return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(n,{id:"indeterminate",checked:r,onCheckedChange:c=>a(c)}),e.jsx(m,{htmlFor:"indeterminate",children:"Indeterminate"})]})}const s={render:()=>e.jsx(S,{})};var i,d,l;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`{
2
2
  render: () => <div className="flex items-center space-x-2">
3
3
  <Checkbox id="terms" />
4
4
  <Label htmlFor="terms" className="cursor-pointer">
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{R as p,a as d,b as m}from"./index-B-fXBfyD.js";import{B as c}from"./button-BTWmFXop.js";import"./iframe-G-6sM9Mt.js";import"./preload-helper-Dp1pzeXC.js";import"./index-DW48STyt.js";import"./index-DvM9azdj.js";import"./index-CAwQR9Pv.js";import"./index-I343IfOC.js";import"./index-1v1lhNFD.js";import"./index-DqWzLCH-.js";import"./index-_crRFOM5.js";import"./index-CZaD3imo.js";import"./index-Bq6UNRVc.js";import"./index-DhoByIgc.js";import"./index-CGrAONsN.js";import"./utils-D-KgF5mV.js";function a({...t}){return e.jsx(p,{"data-slot":"collapsible",...t})}function i({...t}){return e.jsx(d,{"data-slot":"collapsible-trigger",...t})}function r({...t}){return e.jsx(m,{"data-slot":"collapsible-content",...t})}a.__docgenInfo={description:"",methods:[],displayName:"Collapsible"};i.__docgenInfo={description:"",methods:[],displayName:"CollapsibleTrigger"};r.__docgenInfo={description:"",methods:[],displayName:"CollapsibleContent"};const k={title:"Shadcn/UI/Collapsible",component:a},s={render:()=>e.jsxs(a,{className:"w-[320px]",children:[e.jsx(i,{asChild:!0,children:e.jsx(c,{variant:"outline",className:"w-full",children:"Toggle Details"})}),e.jsx(r,{children:e.jsxs("div",{className:"text-sm text-muted-foreground mt-2 space-y-2",children:[e.jsx("p",{children:"Collapsible content can contain any elements. This example shows a simple paragraph that expands and collapses."}),e.jsx("p",{children:"It uses uncontrolled state managed by Radix. No React hooks are needed in the story."})]})})]})};var o,l,n;s.parameters={...s.parameters,docs:{...(o=s.parameters)==null?void 0:o.docs,source:{originalSource:`{
1
+ import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{R as p,a as d,b as m}from"./index-3zykFCgl.js";import{B as c}from"./button-BObfgcV1.js";import"./iframe-BWjPIle6.js";import"./preload-helper-Dp1pzeXC.js";import"./index-DW48STyt.js";import"./index-Pk2lGsul.js";import"./index-7XoYQV2z.js";import"./index-DWC9SV-P.js";import"./index-BcAKBHrX.js";import"./index-04C4iZwC.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./index-CKwUGXmt.js";import"./index-BN5_W3Yi.js";import"./index-CGrAONsN.js";import"./utils-D-KgF5mV.js";function a({...t}){return e.jsx(p,{"data-slot":"collapsible",...t})}function i({...t}){return e.jsx(d,{"data-slot":"collapsible-trigger",...t})}function r({...t}){return e.jsx(m,{"data-slot":"collapsible-content",...t})}a.__docgenInfo={description:"",methods:[],displayName:"Collapsible"};i.__docgenInfo={description:"",methods:[],displayName:"CollapsibleTrigger"};r.__docgenInfo={description:"",methods:[],displayName:"CollapsibleContent"};const k={title:"Shadcn/UI/Collapsible",component:a},s={render:()=>e.jsxs(a,{className:"w-[320px]",children:[e.jsx(i,{asChild:!0,children:e.jsx(c,{variant:"outline",className:"w-full",children:"Toggle Details"})}),e.jsx(r,{children:e.jsxs("div",{className:"text-sm text-muted-foreground mt-2 space-y-2",children:[e.jsx("p",{children:"Collapsible content can contain any elements. This example shows a simple paragraph that expands and collapses."}),e.jsx("p",{children:"It uses uncontrolled state managed by Radix. No React hooks are needed in the story."})]})})]})};var o,l,n;s.parameters={...s.parameters,docs:{...(o=s.parameters)==null?void 0:o.docs,source:{originalSource:`{
2
2
  render: () => <Collapsible className="w-[320px]">
3
3
  <CollapsibleTrigger asChild>
4
4
  <Button variant="outline" className="w-full">Toggle Details</Button>
@@ -1,4 +1,4 @@
1
- import{r as u}from"./iframe-G-6sM9Mt.js";import{u as he}from"./index-1v1lhNFD.js";import{P as me}from"./index-DqWzLCH-.js";import{u as z}from"./index-lH-AZpAn.js";import{j as pe}from"./jsx-runtime-D_zvdyIk.js";var U=0;function pt(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Z()),document.body.insertAdjacentElement("beforeend",e[1]??Z()),U++,()=>{U===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),U--}},[])}function Z(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var j="focusScope.autoFocusOnMount",_="focusScope.autoFocusOnUnmount",q={bubbles:!1,cancelable:!0},ge="FocusScope",ye=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:c,onUnmountAutoFocus:i,...s}=e,[a,S]=u.useState(null),b=z(c),g=z(i),f=u.useRef(null),v=he(t,o=>S(o)),h=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let o=function(p){if(h.paused||!a)return;const y=p.target;a.contains(y)?f.current=y:k(f.current,{select:!0})},l=function(p){if(h.paused||!a)return;const y=p.relatedTarget;y!==null&&(a.contains(y)||k(f.current,{select:!0}))},d=function(p){if(document.activeElement===document.body)for(const E of p)E.removedNodes.length>0&&k(a)};document.addEventListener("focusin",o),document.addEventListener("focusout",l);const m=new MutationObserver(d);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",o),document.removeEventListener("focusout",l),m.disconnect()}}},[r,a,h.paused]),u.useEffect(()=>{if(a){$.add(h);const o=document.activeElement;if(!a.contains(o)){const d=new CustomEvent(j,q);a.addEventListener(j,b),a.dispatchEvent(d),d.defaultPrevented||(be(Re(oe(a)),{select:!0}),document.activeElement===o&&k(a))}return()=>{a.removeEventListener(j,b),setTimeout(()=>{const d=new CustomEvent(_,q);a.addEventListener(_,g),a.dispatchEvent(d),d.defaultPrevented||k(o??document.body,{select:!0}),a.removeEventListener(_,g),$.remove(h)},0)}}},[a,b,g,h]);const w=u.useCallback(o=>{if(!n&&!r||h.paused)return;const l=o.key==="Tab"&&!o.altKey&&!o.ctrlKey&&!o.metaKey,d=document.activeElement;if(l&&d){const m=o.currentTarget,[p,y]=Ee(m);p&&y?!o.shiftKey&&d===y?(o.preventDefault(),n&&k(p,{select:!0})):o.shiftKey&&d===p&&(o.preventDefault(),n&&k(y,{select:!0})):d===m&&o.preventDefault()}},[n,r,h.paused]);return pe.jsx(me.div,{tabIndex:-1,...s,ref:v,onKeyDown:w})});ye.displayName=ge;function be(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(k(r,{select:t}),document.activeElement!==n)return}function Ee(e){const t=oe(e),n=Q(t,e),r=Q(t.reverse(),e);return[n,r]}function oe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const c=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||c?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Q(e,t){for(const n of e)if(!Se(n,{upTo:t}))return n}function Se(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function we(e){return e instanceof HTMLInputElement&&"select"in e}function k(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&we(e)&&t&&e.select()}}var $=Ce();function Ce(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=J(e,t),e.unshift(t)},remove(t){var n;e=J(e,t),(n=e[0])==null||n.resume()}}}function J(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Re(e){return e.filter(t=>t.tagName!=="A")}var ke=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},T=new WeakMap,F=new WeakMap,L={},K=0,ce=function(e){return e&&(e.host||ce(e.parentNode))},Ae=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ce(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Te=function(e,t,n,r){var c=Ae(t,Array.isArray(e)?e:[e]);L[n]||(L[n]=new WeakMap);var i=L[n],s=[],a=new Set,S=new Set(c),b=function(f){!f||a.has(f)||(a.add(f),b(f.parentNode))};c.forEach(b);var g=function(f){!f||S.has(f)||Array.prototype.forEach.call(f.children,function(v){if(a.has(v))g(v);else try{var h=v.getAttribute(r),w=h!==null&&h!=="false",o=(T.get(v)||0)+1,l=(i.get(v)||0)+1;T.set(v,o),i.set(v,l),s.push(v),o===1&&w&&F.set(v,!0),l===1&&v.setAttribute(n,"true"),w||v.setAttribute(r,"true")}catch(d){console.error("aria-hidden: cannot operate on ",v,d)}})};return g(t),a.clear(),K++,function(){s.forEach(function(f){var v=T.get(f)-1,h=i.get(f)-1;T.set(f,v),i.set(f,h),v||(F.has(f)||f.removeAttribute(r),F.delete(f)),h||f.removeAttribute(n)}),K--,K||(T=new WeakMap,T=new WeakMap,F=new WeakMap,L={})}},gt=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),c=ke(e);return c?(r.push.apply(r,Array.from(c.querySelectorAll("[aria-live], script"))),Te(r,c,n,"aria-hidden")):function(){return null}},C=function(){return C=Object.assign||function(t){for(var n,r=1,c=arguments.length;r<c;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},C.apply(this,arguments)};function ue(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,r=Object.getOwnPropertySymbols(e);c<r.length;c++)t.indexOf(r[c])<0&&Object.prototype.propertyIsEnumerable.call(e,r[c])&&(n[r[c]]=e[r[c]]);return n}function Ne(e,t,n){if(n||arguments.length===2)for(var r=0,c=t.length,i;r<c;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var W="right-scroll-bar-position",B="width-before-scroll-bar",Me="with-scroll-bars-hidden",Pe="--removed-body-scroll-bar-size";function H(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Oe(e,t){var n=u.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var c=n.value;c!==r&&(n.value=r,n.callback(r,c))}}}})[0];return n.callback=t,n.facade}var Fe=typeof window<"u"?u.useLayoutEffect:u.useEffect,ee=new WeakMap;function Le(e,t){var n=Oe(null,function(r){return e.forEach(function(c){return H(c,r)})});return Fe(function(){var r=ee.get(n);if(r){var c=new Set(r),i=new Set(e),s=n.current;c.forEach(function(a){i.has(a)||H(a,null)}),i.forEach(function(a){c.has(a)||H(a,s)})}ee.set(n,e)},[e]),n}function xe(e){return e}function Ie(e,t){t===void 0&&(t=xe);var n=[],r=!1,c={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var S=function(){var g=s;s=[],g.forEach(i)},b=function(){return Promise.resolve().then(S)};b(),n={push:function(g){s.push(g),b()},filter:function(g){return s=s.filter(g),n}}}};return c}function We(e){e===void 0&&(e={});var t=Ie(null);return t.options=C({async:!0,ssr:!1},e),t}var ie=function(e){var t=e.sideCar,n=ue(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return u.createElement(r,C({},n))};ie.isSideCarExport=!0;function Be(e,t){return e.useMedium(t),ie}var le=We(),V=function(){},D=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:V,onWheelCapture:V,onTouchMoveCapture:V}),c=r[0],i=r[1],s=e.forwardProps,a=e.children,S=e.className,b=e.removeScrollBar,g=e.enabled,f=e.shards,v=e.sideCar,h=e.noRelative,w=e.noIsolation,o=e.inert,l=e.allowPinchZoom,d=e.as,m=d===void 0?"div":d,p=e.gapMode,y=ue(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,A=Le([n,t]),R=C(C({},y),c);return u.createElement(u.Fragment,null,g&&u.createElement(E,{sideCar:le,removeScrollBar:b,shards:f,noRelative:h,noIsolation:w,inert:o,setCallbacks:i,allowPinchZoom:!!l,lockRef:n,gapMode:p}),s?u.cloneElement(u.Children.only(a),C(C({},R),{ref:A})):u.createElement(m,C({},R,{className:S,ref:A}),a))});D.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};D.classNames={fullWidth:B,zeroRight:W};var De=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ue(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=De();return t&&e.setAttribute("nonce",t),e}function je(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ke=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ue())&&(je(t,n),_e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},He=function(){var e=Ke();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},se=function(){var e=He(),t=function(n){var r=n.styles,c=n.dynamic;return e(r,c),null};return t},Ve={left:0,top:0,right:0,gap:0},X=function(e){return parseInt(e||"",10)||0},Xe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],c=t[e==="padding"?"paddingRight":"marginRight"];return[X(n),X(r),X(c)]},Ye=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ve;var t=Xe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ge=se(),P="data-scroll-locked",ze=function(e,t,n,r){var c=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
1
+ import{r as u}from"./iframe-BWjPIle6.js";import{u as he}from"./index-BcAKBHrX.js";import{P as me}from"./index-04C4iZwC.js";import{u as z}from"./index-DschQYGl.js";import{j as pe}from"./jsx-runtime-D_zvdyIk.js";var U=0;function pt(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Z()),document.body.insertAdjacentElement("beforeend",e[1]??Z()),U++,()=>{U===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),U--}},[])}function Z(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var j="focusScope.autoFocusOnMount",_="focusScope.autoFocusOnUnmount",q={bubbles:!1,cancelable:!0},ge="FocusScope",ye=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:c,onUnmountAutoFocus:i,...s}=e,[a,S]=u.useState(null),b=z(c),g=z(i),f=u.useRef(null),v=he(t,o=>S(o)),h=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let o=function(p){if(h.paused||!a)return;const y=p.target;a.contains(y)?f.current=y:k(f.current,{select:!0})},l=function(p){if(h.paused||!a)return;const y=p.relatedTarget;y!==null&&(a.contains(y)||k(f.current,{select:!0}))},d=function(p){if(document.activeElement===document.body)for(const E of p)E.removedNodes.length>0&&k(a)};document.addEventListener("focusin",o),document.addEventListener("focusout",l);const m=new MutationObserver(d);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",o),document.removeEventListener("focusout",l),m.disconnect()}}},[r,a,h.paused]),u.useEffect(()=>{if(a){$.add(h);const o=document.activeElement;if(!a.contains(o)){const d=new CustomEvent(j,q);a.addEventListener(j,b),a.dispatchEvent(d),d.defaultPrevented||(be(Re(oe(a)),{select:!0}),document.activeElement===o&&k(a))}return()=>{a.removeEventListener(j,b),setTimeout(()=>{const d=new CustomEvent(_,q);a.addEventListener(_,g),a.dispatchEvent(d),d.defaultPrevented||k(o??document.body,{select:!0}),a.removeEventListener(_,g),$.remove(h)},0)}}},[a,b,g,h]);const w=u.useCallback(o=>{if(!n&&!r||h.paused)return;const l=o.key==="Tab"&&!o.altKey&&!o.ctrlKey&&!o.metaKey,d=document.activeElement;if(l&&d){const m=o.currentTarget,[p,y]=Ee(m);p&&y?!o.shiftKey&&d===y?(o.preventDefault(),n&&k(p,{select:!0})):o.shiftKey&&d===p&&(o.preventDefault(),n&&k(y,{select:!0})):d===m&&o.preventDefault()}},[n,r,h.paused]);return pe.jsx(me.div,{tabIndex:-1,...s,ref:v,onKeyDown:w})});ye.displayName=ge;function be(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(k(r,{select:t}),document.activeElement!==n)return}function Ee(e){const t=oe(e),n=Q(t,e),r=Q(t.reverse(),e);return[n,r]}function oe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const c=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||c?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Q(e,t){for(const n of e)if(!Se(n,{upTo:t}))return n}function Se(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function we(e){return e instanceof HTMLInputElement&&"select"in e}function k(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&we(e)&&t&&e.select()}}var $=Ce();function Ce(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=J(e,t),e.unshift(t)},remove(t){var n;e=J(e,t),(n=e[0])==null||n.resume()}}}function J(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Re(e){return e.filter(t=>t.tagName!=="A")}var ke=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},T=new WeakMap,F=new WeakMap,L={},K=0,ce=function(e){return e&&(e.host||ce(e.parentNode))},Ae=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ce(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Te=function(e,t,n,r){var c=Ae(t,Array.isArray(e)?e:[e]);L[n]||(L[n]=new WeakMap);var i=L[n],s=[],a=new Set,S=new Set(c),b=function(f){!f||a.has(f)||(a.add(f),b(f.parentNode))};c.forEach(b);var g=function(f){!f||S.has(f)||Array.prototype.forEach.call(f.children,function(v){if(a.has(v))g(v);else try{var h=v.getAttribute(r),w=h!==null&&h!=="false",o=(T.get(v)||0)+1,l=(i.get(v)||0)+1;T.set(v,o),i.set(v,l),s.push(v),o===1&&w&&F.set(v,!0),l===1&&v.setAttribute(n,"true"),w||v.setAttribute(r,"true")}catch(d){console.error("aria-hidden: cannot operate on ",v,d)}})};return g(t),a.clear(),K++,function(){s.forEach(function(f){var v=T.get(f)-1,h=i.get(f)-1;T.set(f,v),i.set(f,h),v||(F.has(f)||f.removeAttribute(r),F.delete(f)),h||f.removeAttribute(n)}),K--,K||(T=new WeakMap,T=new WeakMap,F=new WeakMap,L={})}},gt=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),c=ke(e);return c?(r.push.apply(r,Array.from(c.querySelectorAll("[aria-live], script"))),Te(r,c,n,"aria-hidden")):function(){return null}},C=function(){return C=Object.assign||function(t){for(var n,r=1,c=arguments.length;r<c;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},C.apply(this,arguments)};function ue(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,r=Object.getOwnPropertySymbols(e);c<r.length;c++)t.indexOf(r[c])<0&&Object.prototype.propertyIsEnumerable.call(e,r[c])&&(n[r[c]]=e[r[c]]);return n}function Ne(e,t,n){if(n||arguments.length===2)for(var r=0,c=t.length,i;r<c;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var W="right-scroll-bar-position",B="width-before-scroll-bar",Me="with-scroll-bars-hidden",Pe="--removed-body-scroll-bar-size";function H(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Oe(e,t){var n=u.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var c=n.value;c!==r&&(n.value=r,n.callback(r,c))}}}})[0];return n.callback=t,n.facade}var Fe=typeof window<"u"?u.useLayoutEffect:u.useEffect,ee=new WeakMap;function Le(e,t){var n=Oe(null,function(r){return e.forEach(function(c){return H(c,r)})});return Fe(function(){var r=ee.get(n);if(r){var c=new Set(r),i=new Set(e),s=n.current;c.forEach(function(a){i.has(a)||H(a,null)}),i.forEach(function(a){c.has(a)||H(a,s)})}ee.set(n,e)},[e]),n}function xe(e){return e}function Ie(e,t){t===void 0&&(t=xe);var n=[],r=!1,c={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var S=function(){var g=s;s=[],g.forEach(i)},b=function(){return Promise.resolve().then(S)};b(),n={push:function(g){s.push(g),b()},filter:function(g){return s=s.filter(g),n}}}};return c}function We(e){e===void 0&&(e={});var t=Ie(null);return t.options=C({async:!0,ssr:!1},e),t}var ie=function(e){var t=e.sideCar,n=ue(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return u.createElement(r,C({},n))};ie.isSideCarExport=!0;function Be(e,t){return e.useMedium(t),ie}var le=We(),V=function(){},D=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:V,onWheelCapture:V,onTouchMoveCapture:V}),c=r[0],i=r[1],s=e.forwardProps,a=e.children,S=e.className,b=e.removeScrollBar,g=e.enabled,f=e.shards,v=e.sideCar,h=e.noRelative,w=e.noIsolation,o=e.inert,l=e.allowPinchZoom,d=e.as,m=d===void 0?"div":d,p=e.gapMode,y=ue(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,A=Le([n,t]),R=C(C({},y),c);return u.createElement(u.Fragment,null,g&&u.createElement(E,{sideCar:le,removeScrollBar:b,shards:f,noRelative:h,noIsolation:w,inert:o,setCallbacks:i,allowPinchZoom:!!l,lockRef:n,gapMode:p}),s?u.cloneElement(u.Children.only(a),C(C({},R),{ref:A})):u.createElement(m,C({},R,{className:S,ref:A}),a))});D.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};D.classNames={fullWidth:B,zeroRight:W};var De=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ue(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=De();return t&&e.setAttribute("nonce",t),e}function je(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ke=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ue())&&(je(t,n),_e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},He=function(){var e=Ke();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},se=function(){var e=He(),t=function(n){var r=n.styles,c=n.dynamic;return e(r,c),null};return t},Ve={left:0,top:0,right:0,gap:0},X=function(e){return parseInt(e||"",10)||0},Xe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],c=t[e==="padding"?"paddingRight":"marginRight"];return[X(n),X(r),X(c)]},Ye=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ve;var t=Xe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ge=se(),P="data-scroll-locked",ze=function(e,t,n,r){var c=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
2
  .`.concat(Me,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(a,"px ").concat(r,`;
@@ -1,4 +1,4 @@
1
- import{j as m}from"./jsx-runtime-D_zvdyIk.js";import{C as s,a as i,b as c,c as p,d as r,e as n,g as a,f as C}from"./command-BERL33lL.js";import"./index-CzJf-yyP.js";import"./iframe-G-6sM9Mt.js";import"./preload-helper-Dp1pzeXC.js";import"./index-DW48STyt.js";import"./index-1v1lhNFD.js";import"./index-DvM9azdj.js";import"./index-DhoByIgc.js";import"./index-I343IfOC.js";import"./index-CAwQR9Pv.js";import"./index-7yNAGow7.js";import"./index-DqWzLCH-.js";import"./index-_crRFOM5.js";import"./index-CZaD3imo.js";import"./index-lH-AZpAn.js";import"./Combination-BT_gXe1L.js";import"./index-d_S6mtzU.js";import"./index-Bq6UNRVc.js";import"./utils-D-KgF5mV.js";import"./dialog-DM9YJ1JD.js";import"./x-DG9mLFAg.js";import"./createLucideIcon-1ZwIAs_l.js";const R={title:"Shadcn/UI/Command",component:s},o={render:()=>m.jsx("div",{className:"max-w-md",children:m.jsxs(s,{children:[m.jsx(i,{placeholder:"Type a command or search..."}),m.jsxs(c,{children:[m.jsx(p,{children:"No results found."}),m.jsxs(r,{heading:"Suggestions",children:[m.jsxs(n,{children:["Calendar",m.jsx(a,{children:"⌘C"})]}),m.jsxs(n,{children:["Search Emoji",m.jsx(a,{children:"⌘E"})]}),m.jsxs(n,{children:["Calculator",m.jsx(a,{children:"⌘K"})]})]}),m.jsx(C,{}),m.jsxs(r,{heading:"Settings",children:[m.jsx(n,{children:"Profile"}),m.jsx(n,{children:"Billing"}),m.jsx(n,{children:"Settings"})]})]})]})})};var t,e,d;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`{
1
+ import{j as m}from"./jsx-runtime-D_zvdyIk.js";import{C as s,a as i,b as c,c as p,d as r,e as n,g as a,f as C}from"./command-DCnXmNmT.js";import"./index-u70nzfOV.js";import"./iframe-BWjPIle6.js";import"./preload-helper-Dp1pzeXC.js";import"./index-DW48STyt.js";import"./index-BcAKBHrX.js";import"./index-Pk2lGsul.js";import"./index-BN5_W3Yi.js";import"./index-DWC9SV-P.js";import"./index-7XoYQV2z.js";import"./index-BfKpUbCE.js";import"./index-04C4iZwC.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./index-DschQYGl.js";import"./Combination-CeVus13L.js";import"./index-Cce91yJQ.js";import"./index-CKwUGXmt.js";import"./utils-D-KgF5mV.js";import"./dialog-DL0QBIbC.js";import"./x-n8sFtlI2.js";import"./createLucideIcon-CLBo0iA0.js";const R={title:"Shadcn/UI/Command",component:s},o={render:()=>m.jsx("div",{className:"max-w-md",children:m.jsxs(s,{children:[m.jsx(i,{placeholder:"Type a command or search..."}),m.jsxs(c,{children:[m.jsx(p,{children:"No results found."}),m.jsxs(r,{heading:"Suggestions",children:[m.jsxs(n,{children:["Calendar",m.jsx(a,{children:"⌘C"})]}),m.jsxs(n,{children:["Search Emoji",m.jsx(a,{children:"⌘E"})]}),m.jsxs(n,{children:["Calculator",m.jsx(a,{children:"⌘K"})]})]}),m.jsx(C,{}),m.jsxs(r,{heading:"Settings",children:[m.jsx(n,{children:"Profile"}),m.jsx(n,{children:"Billing"}),m.jsx(n,{children:"Settings"})]})]})]})})};var t,e,d;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`{
2
2
  render: () => <div className="max-w-md">
3
3
  <Command>
4
4
  <CommandInput placeholder="Type a command or search..." />
@@ -1,4 +1,4 @@
1
- import{j as t}from"./jsx-runtime-D_zvdyIk.js";import{r as s}from"./iframe-G-6sM9Mt.js";import{c as h}from"./index-DW48STyt.js";import{c as oe}from"./index-DvM9azdj.js";import{P as re}from"./index-DqWzLCH-.js";import{c as T,R as ae,A as se,P as ie,C as ue,I as de,f as ce,g as le,h as xe,S as me,L as pe,a as Ce,b as fe,d as ge,e as he,G as Me,i as ve}from"./index-CLmN5G1a.js";import{u as be}from"./index-lH-AZpAn.js";import{u as _e}from"./index-CAwQR9Pv.js";import{c as m}from"./utils-D-KgF5mV.js";import{C as Se}from"./chevron-right-DpCIoMaJ.js";import{C as Ie}from"./check-BgWXKGqi.js";import{C as je}from"./circle-DVJTkDI7.js";import"./preload-helper-Dp1pzeXC.js";import"./index-_crRFOM5.js";import"./index-CZaD3imo.js";import"./index-1v1lhNFD.js";import"./index-BDwnENHR.js";import"./index-ClNNG_ys.js";import"./index-7yNAGow7.js";import"./Combination-BT_gXe1L.js";import"./index-DhoByIgc.js";import"./index-I343IfOC.js";import"./index-CayhpKmv.js";import"./index-ev1RjzGv.js";import"./index-d_S6mtzU.js";import"./index-Bq6UNRVc.js";import"./index-CMmbDm5O.js";import"./createLucideIcon-1ZwIAs_l.js";var N="ContextMenu",[Ne,wt]=oe(N,[T]),i=T(),[Re,A]=Ne(N),E=e=>{const{__scopeContextMenu:n,children:r,onOpenChange:o,dir:a,modal:x=!0}=e,[l,u]=s.useState(!1),c=i(n),f=be(o),d=s.useCallback(g=>{u(g),f(g)},[f]);return t.jsx(Re,{scope:n,open:l,onOpenChange:d,modal:x,children:t.jsx(ae,{...c,dir:a,open:l,onOpenChange:d,modal:x,children:r})})};E.displayName=N;var k="ContextMenuTrigger",O=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,disabled:o=!1,...a}=e,x=A(k,r),l=i(r),u=s.useRef({x:0,y:0}),c=s.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...u.current})}),f=s.useRef(0),d=s.useCallback(()=>window.clearTimeout(f.current),[]),g=p=>{u.current={x:p.clientX,y:p.clientY},x.onOpenChange(!0)};return s.useEffect(()=>d,[d]),s.useEffect(()=>void(o&&d()),[o,d]),t.jsxs(t.Fragment,{children:[t.jsx(se,{...l,virtualRef:c}),t.jsx(re.span,{"data-state":x.open?"open":"closed","data-disabled":o?"":void 0,...a,ref:n,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:o?e.onContextMenu:h(e.onContextMenu,p=>{d(),g(p),p.preventDefault()}),onPointerDown:o?e.onPointerDown:h(e.onPointerDown,M(p=>{d(),f.current=window.setTimeout(()=>g(p),700)})),onPointerMove:o?e.onPointerMove:h(e.onPointerMove,M(d)),onPointerCancel:o?e.onPointerCancel:h(e.onPointerCancel,M(d)),onPointerUp:o?e.onPointerUp:h(e.onPointerUp,M(d))})]})});O.displayName=k;var ye="ContextMenuPortal",G=e=>{const{__scopeContextMenu:n,...r}=e,o=i(n);return t.jsx(ie,{...o,...r})};G.displayName=ye;var z="ContextMenuContent",L=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=A(z,r),x=i(r),l=s.useRef(!1);return t.jsx(ue,{...x,...o,ref:n,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:u=>{var c;(c=e.onCloseAutoFocus)==null||c.call(e,u),!u.defaultPrevented&&l.current&&u.preventDefault(),l.current=!1},onInteractOutside:u=>{var c;(c=e.onInteractOutside)==null||c.call(e,u),!u.defaultPrevented&&!a.modal&&(l.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});L.displayName=z;var we="ContextMenuGroup",Pe=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(Me,{...a,...o,ref:n})});Pe.displayName=we;var Te="ContextMenuLabel",B=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(pe,{...a,...o,ref:n})});B.displayName=Te;var Ae="ContextMenuItem",$=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(de,{...a,...o,ref:n})});$.displayName=Ae;var Ee="ContextMenuCheckboxItem",U=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(Ce,{...a,...o,ref:n})});U.displayName=Ee;var ke="ContextMenuRadioGroup",D=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(ge,{...a,...o,ref:n})});D.displayName=ke;var Oe="ContextMenuRadioItem",F=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(he,{...a,...o,ref:n})});F.displayName=Oe;var Ge="ContextMenuItemIndicator",q=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(fe,{...a,...o,ref:n})});q.displayName=Ge;var ze="ContextMenuSeparator",X=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(me,{...a,...o,ref:n})});X.displayName=ze;var Le="ContextMenuArrow",Be=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(ve,{...a,...o,ref:n})});Be.displayName=Le;var H="ContextMenuSub",W=e=>{const{__scopeContextMenu:n,children:r,onOpenChange:o,open:a,defaultOpen:x}=e,l=i(n),[u,c]=_e({prop:a,defaultProp:x??!1,onChange:o,caller:H});return t.jsx(ce,{...l,open:u,onOpenChange:c,children:r})};W.displayName=H;var $e="ContextMenuSubTrigger",K=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(le,{...a,...o,ref:n})});K.displayName=$e;var Ue="ContextMenuSubContent",V=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(xe,{...a,...o,ref:n,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});V.displayName=Ue;function M(e){return n=>n.pointerType!=="mouse"?e(n):void 0}var De=E,Fe=O,qe=G,Xe=L,He=B,We=$,Ke=U,Ve=D,Ye=F,Y=q,Je=X,Qe=W,Ze=K,et=V;function R({...e}){return t.jsx(De,{"data-slot":"context-menu",...e})}function J({...e}){return t.jsx(Fe,{"data-slot":"context-menu-trigger",...e})}function Q({...e}){return t.jsx(Qe,{"data-slot":"context-menu-sub",...e})}function Z({...e}){return t.jsx(Ve,{"data-slot":"context-menu-radio-group",...e})}function ee({className:e,inset:n,children:r,...o}){return t.jsxs(Ze,{"data-slot":"context-menu-sub-trigger","data-inset":n,className:m("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[r,t.jsx(Se,{className:"ml-auto"})]})}function te({className:e,...n}){return t.jsx(et,{"data-slot":"context-menu-sub-content",className:m("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...n})}function ne({className:e,...n}){return t.jsx(qe,{children:t.jsx(Xe,{"data-slot":"context-menu-content",className:m("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function C({className:e,inset:n,variant:r="default",...o}){return t.jsx(We,{"data-slot":"context-menu-item","data-inset":n,"data-variant":r,className:m("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}function _({className:e,children:n,checked:r,...o}){return t.jsxs(Ke,{"data-slot":"context-menu-checkbox-item",className:m("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:r,...o,children:[t.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:t.jsx(Y,{children:t.jsx(Ie,{className:"size-4"})})}),n]})}function S({className:e,children:n,...r}){return t.jsxs(Ye,{"data-slot":"context-menu-radio-item",className:m("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[t.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:t.jsx(Y,{children:t.jsx(je,{className:"size-2 fill-current"})})}),n]})}function I({className:e,inset:n,...r}){return t.jsx(He,{"data-slot":"context-menu-label","data-inset":n,className:m("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}function j({className:e,...n}){return t.jsx(Je,{"data-slot":"context-menu-separator",className:m("bg-border -mx-1 my-1 h-px",e),...n})}function b({className:e,...n}){return t.jsx("span",{"data-slot":"context-menu-shortcut",className:m("text-muted-foreground ml-auto text-xs tracking-widest",e),...n})}R.__docgenInfo={description:"",methods:[],displayName:"ContextMenu"};J.__docgenInfo={description:"",methods:[],displayName:"ContextMenuTrigger"};ne.__docgenInfo={description:"",methods:[],displayName:"ContextMenuContent"};C.__docgenInfo={description:"",methods:[],displayName:"ContextMenuItem",props:{inset:{required:!1,tsType:{name:"boolean"},description:""},variant:{required:!1,tsType:{name:"union",raw:'"default" | "destructive"',elements:[{name:"literal",value:'"default"'},{name:"literal",value:'"destructive"'}]},description:"",defaultValue:{value:'"default"',computed:!1}}}};_.__docgenInfo={description:"",methods:[],displayName:"ContextMenuCheckboxItem"};S.__docgenInfo={description:"",methods:[],displayName:"ContextMenuRadioItem"};I.__docgenInfo={description:"",methods:[],displayName:"ContextMenuLabel",props:{inset:{required:!1,tsType:{name:"boolean"},description:""}}};j.__docgenInfo={description:"",methods:[],displayName:"ContextMenuSeparator"};b.__docgenInfo={description:"",methods:[],displayName:"ContextMenuShortcut"};Q.__docgenInfo={description:"",methods:[],displayName:"ContextMenuSub"};te.__docgenInfo={description:"",methods:[],displayName:"ContextMenuSubContent"};ee.__docgenInfo={description:"",methods:[],displayName:"ContextMenuSubTrigger",props:{inset:{required:!1,tsType:{name:"boolean"},description:""}}};Z.__docgenInfo={description:"",methods:[],displayName:"ContextMenuRadioGroup"};const Pt={title:"Shadcn/UI/ContextMenu",component:R},v={render:()=>t.jsxs(R,{children:[t.jsx(J,{asChild:!0,children:t.jsx("div",{className:"flex h-40 w-full max-w-md items-center justify-center rounded-md border text-muted-foreground",children:"Right-click here"})}),t.jsxs(ne,{className:"w-64",children:[t.jsxs(C,{children:["Back ",t.jsx(b,{children:"⌘["})]}),t.jsxs(C,{disabled:!0,children:["Forward ",t.jsx(b,{children:"⌘]"})]}),t.jsxs(C,{children:["Reload ",t.jsx(b,{children:"⌘R"})]}),t.jsxs(Q,{children:[t.jsx(ee,{children:"More Tools"}),t.jsxs(te,{children:[t.jsx(C,{children:"Save Page As…"}),t.jsx(C,{children:"Create Shortcut…"})]})]}),t.jsx(j,{}),t.jsx(I,{children:"Appearance"}),t.jsx(_,{checked:!0,children:"Always Show Bookmarks Bar"}),t.jsx(_,{children:"Show Full URLs"}),t.jsx(j,{}),t.jsx(I,{children:"Search Engine"}),t.jsxs(Z,{value:"google",children:[t.jsx(S,{value:"google",children:"Google"}),t.jsx(S,{value:"bing",children:"Bing"})]})]})]})};var y,w,P;v.parameters={...v.parameters,docs:{...(y=v.parameters)==null?void 0:y.docs,source:{originalSource:`{
1
+ import{j as t}from"./jsx-runtime-D_zvdyIk.js";import{r as s}from"./iframe-BWjPIle6.js";import{c as h}from"./index-DW48STyt.js";import{c as oe}from"./index-Pk2lGsul.js";import{P as re}from"./index-04C4iZwC.js";import{c as T,R as ae,A as se,P as ie,C as ue,I as de,f as ce,g as le,h as xe,S as me,L as pe,a as Ce,b as fe,d as ge,e as he,G as Me,i as ve}from"./index-DE2OlfDP.js";import{u as be}from"./index-DschQYGl.js";import{u as _e}from"./index-7XoYQV2z.js";import{c as m}from"./utils-D-KgF5mV.js";import{C as Se}from"./chevron-right-oMYqDJ_f.js";import{C as Ie}from"./check-DyecuwP4.js";import{C as je}from"./circle-CyarsADt.js";import"./preload-helper-Dp1pzeXC.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./index-BcAKBHrX.js";import"./index-C9xvlw_B.js";import"./index-Dr2xmx-F.js";import"./index-BfKpUbCE.js";import"./Combination-CeVus13L.js";import"./index-BN5_W3Yi.js";import"./index-DWC9SV-P.js";import"./index-C6O7WofA.js";import"./index-DMk2qc2_.js";import"./index-Cce91yJQ.js";import"./index-CKwUGXmt.js";import"./index-Cw7p-pms.js";import"./createLucideIcon-CLBo0iA0.js";var N="ContextMenu",[Ne,wt]=oe(N,[T]),i=T(),[Re,A]=Ne(N),E=e=>{const{__scopeContextMenu:n,children:r,onOpenChange:o,dir:a,modal:x=!0}=e,[l,u]=s.useState(!1),c=i(n),f=be(o),d=s.useCallback(g=>{u(g),f(g)},[f]);return t.jsx(Re,{scope:n,open:l,onOpenChange:d,modal:x,children:t.jsx(ae,{...c,dir:a,open:l,onOpenChange:d,modal:x,children:r})})};E.displayName=N;var k="ContextMenuTrigger",O=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,disabled:o=!1,...a}=e,x=A(k,r),l=i(r),u=s.useRef({x:0,y:0}),c=s.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...u.current})}),f=s.useRef(0),d=s.useCallback(()=>window.clearTimeout(f.current),[]),g=p=>{u.current={x:p.clientX,y:p.clientY},x.onOpenChange(!0)};return s.useEffect(()=>d,[d]),s.useEffect(()=>void(o&&d()),[o,d]),t.jsxs(t.Fragment,{children:[t.jsx(se,{...l,virtualRef:c}),t.jsx(re.span,{"data-state":x.open?"open":"closed","data-disabled":o?"":void 0,...a,ref:n,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:o?e.onContextMenu:h(e.onContextMenu,p=>{d(),g(p),p.preventDefault()}),onPointerDown:o?e.onPointerDown:h(e.onPointerDown,M(p=>{d(),f.current=window.setTimeout(()=>g(p),700)})),onPointerMove:o?e.onPointerMove:h(e.onPointerMove,M(d)),onPointerCancel:o?e.onPointerCancel:h(e.onPointerCancel,M(d)),onPointerUp:o?e.onPointerUp:h(e.onPointerUp,M(d))})]})});O.displayName=k;var ye="ContextMenuPortal",G=e=>{const{__scopeContextMenu:n,...r}=e,o=i(n);return t.jsx(ie,{...o,...r})};G.displayName=ye;var z="ContextMenuContent",L=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=A(z,r),x=i(r),l=s.useRef(!1);return t.jsx(ue,{...x,...o,ref:n,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:u=>{var c;(c=e.onCloseAutoFocus)==null||c.call(e,u),!u.defaultPrevented&&l.current&&u.preventDefault(),l.current=!1},onInteractOutside:u=>{var c;(c=e.onInteractOutside)==null||c.call(e,u),!u.defaultPrevented&&!a.modal&&(l.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});L.displayName=z;var we="ContextMenuGroup",Pe=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(Me,{...a,...o,ref:n})});Pe.displayName=we;var Te="ContextMenuLabel",B=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(pe,{...a,...o,ref:n})});B.displayName=Te;var Ae="ContextMenuItem",$=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(de,{...a,...o,ref:n})});$.displayName=Ae;var Ee="ContextMenuCheckboxItem",U=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(Ce,{...a,...o,ref:n})});U.displayName=Ee;var ke="ContextMenuRadioGroup",D=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(ge,{...a,...o,ref:n})});D.displayName=ke;var Oe="ContextMenuRadioItem",F=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(he,{...a,...o,ref:n})});F.displayName=Oe;var Ge="ContextMenuItemIndicator",q=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(fe,{...a,...o,ref:n})});q.displayName=Ge;var ze="ContextMenuSeparator",X=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(me,{...a,...o,ref:n})});X.displayName=ze;var Le="ContextMenuArrow",Be=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(ve,{...a,...o,ref:n})});Be.displayName=Le;var H="ContextMenuSub",W=e=>{const{__scopeContextMenu:n,children:r,onOpenChange:o,open:a,defaultOpen:x}=e,l=i(n),[u,c]=_e({prop:a,defaultProp:x??!1,onChange:o,caller:H});return t.jsx(ce,{...l,open:u,onOpenChange:c,children:r})};W.displayName=H;var $e="ContextMenuSubTrigger",K=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(le,{...a,...o,ref:n})});K.displayName=$e;var Ue="ContextMenuSubContent",V=s.forwardRef((e,n)=>{const{__scopeContextMenu:r,...o}=e,a=i(r);return t.jsx(xe,{...a,...o,ref:n,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});V.displayName=Ue;function M(e){return n=>n.pointerType!=="mouse"?e(n):void 0}var De=E,Fe=O,qe=G,Xe=L,He=B,We=$,Ke=U,Ve=D,Ye=F,Y=q,Je=X,Qe=W,Ze=K,et=V;function R({...e}){return t.jsx(De,{"data-slot":"context-menu",...e})}function J({...e}){return t.jsx(Fe,{"data-slot":"context-menu-trigger",...e})}function Q({...e}){return t.jsx(Qe,{"data-slot":"context-menu-sub",...e})}function Z({...e}){return t.jsx(Ve,{"data-slot":"context-menu-radio-group",...e})}function ee({className:e,inset:n,children:r,...o}){return t.jsxs(Ze,{"data-slot":"context-menu-sub-trigger","data-inset":n,className:m("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[r,t.jsx(Se,{className:"ml-auto"})]})}function te({className:e,...n}){return t.jsx(et,{"data-slot":"context-menu-sub-content",className:m("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...n})}function ne({className:e,...n}){return t.jsx(qe,{children:t.jsx(Xe,{"data-slot":"context-menu-content",className:m("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function C({className:e,inset:n,variant:r="default",...o}){return t.jsx(We,{"data-slot":"context-menu-item","data-inset":n,"data-variant":r,className:m("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}function _({className:e,children:n,checked:r,...o}){return t.jsxs(Ke,{"data-slot":"context-menu-checkbox-item",className:m("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:r,...o,children:[t.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:t.jsx(Y,{children:t.jsx(Ie,{className:"size-4"})})}),n]})}function S({className:e,children:n,...r}){return t.jsxs(Ye,{"data-slot":"context-menu-radio-item",className:m("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[t.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:t.jsx(Y,{children:t.jsx(je,{className:"size-2 fill-current"})})}),n]})}function I({className:e,inset:n,...r}){return t.jsx(He,{"data-slot":"context-menu-label","data-inset":n,className:m("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}function j({className:e,...n}){return t.jsx(Je,{"data-slot":"context-menu-separator",className:m("bg-border -mx-1 my-1 h-px",e),...n})}function b({className:e,...n}){return t.jsx("span",{"data-slot":"context-menu-shortcut",className:m("text-muted-foreground ml-auto text-xs tracking-widest",e),...n})}R.__docgenInfo={description:"",methods:[],displayName:"ContextMenu"};J.__docgenInfo={description:"",methods:[],displayName:"ContextMenuTrigger"};ne.__docgenInfo={description:"",methods:[],displayName:"ContextMenuContent"};C.__docgenInfo={description:"",methods:[],displayName:"ContextMenuItem",props:{inset:{required:!1,tsType:{name:"boolean"},description:""},variant:{required:!1,tsType:{name:"union",raw:'"default" | "destructive"',elements:[{name:"literal",value:'"default"'},{name:"literal",value:'"destructive"'}]},description:"",defaultValue:{value:'"default"',computed:!1}}}};_.__docgenInfo={description:"",methods:[],displayName:"ContextMenuCheckboxItem"};S.__docgenInfo={description:"",methods:[],displayName:"ContextMenuRadioItem"};I.__docgenInfo={description:"",methods:[],displayName:"ContextMenuLabel",props:{inset:{required:!1,tsType:{name:"boolean"},description:""}}};j.__docgenInfo={description:"",methods:[],displayName:"ContextMenuSeparator"};b.__docgenInfo={description:"",methods:[],displayName:"ContextMenuShortcut"};Q.__docgenInfo={description:"",methods:[],displayName:"ContextMenuSub"};te.__docgenInfo={description:"",methods:[],displayName:"ContextMenuSubContent"};ee.__docgenInfo={description:"",methods:[],displayName:"ContextMenuSubTrigger",props:{inset:{required:!1,tsType:{name:"boolean"},description:""}}};Z.__docgenInfo={description:"",methods:[],displayName:"ContextMenuRadioGroup"};const Pt={title:"Shadcn/UI/ContextMenu",component:R},v={render:()=>t.jsxs(R,{children:[t.jsx(J,{asChild:!0,children:t.jsx("div",{className:"flex h-40 w-full max-w-md items-center justify-center rounded-md border text-muted-foreground",children:"Right-click here"})}),t.jsxs(ne,{className:"w-64",children:[t.jsxs(C,{children:["Back ",t.jsx(b,{children:"⌘["})]}),t.jsxs(C,{disabled:!0,children:["Forward ",t.jsx(b,{children:"⌘]"})]}),t.jsxs(C,{children:["Reload ",t.jsx(b,{children:"⌘R"})]}),t.jsxs(Q,{children:[t.jsx(ee,{children:"More Tools"}),t.jsxs(te,{children:[t.jsx(C,{children:"Save Page As…"}),t.jsx(C,{children:"Create Shortcut…"})]})]}),t.jsx(j,{}),t.jsx(I,{children:"Appearance"}),t.jsx(_,{checked:!0,children:"Always Show Bookmarks Bar"}),t.jsx(_,{children:"Show Full URLs"}),t.jsx(j,{}),t.jsx(I,{children:"Search Engine"}),t.jsxs(Z,{value:"google",children:[t.jsx(S,{value:"google",children:"Google"}),t.jsx(S,{value:"bing",children:"Bing"})]})]})]})};var y,w,P;v.parameters={...v.parameters,docs:{...(y=v.parameters)==null?void 0:y.docs,source:{originalSource:`{
2
2
  render: () => <ContextMenu>
3
3
  <ContextMenuTrigger asChild>
4
4
  <div className="flex h-40 w-full max-w-md items-center justify-center rounded-md border text-muted-foreground">
@@ -0,0 +1,6 @@
1
+ import{j as o}from"./jsx-runtime-D_zvdyIk.js";import{D as a}from"./lodash-BkmSIg_J.js";import"./iframe-BWjPIle6.js";import"./preload-helper-Dp1pzeXC.js";import"./table-CP3vMqFn.js";import"./utils-D-KgF5mV.js";import"./checkbox-D5BmNJeL.js";import"./index-BcAKBHrX.js";import"./index-Pk2lGsul.js";import"./index-DW48STyt.js";import"./index-7XoYQV2z.js";import"./index-DWC9SV-P.js";import"./index-Dqw7miiX.js";import"./index-DMk2qc2_.js";import"./index-CKwUGXmt.js";import"./index-04C4iZwC.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./check-DyecuwP4.js";import"./createLucideIcon-CLBo0iA0.js";import"./button-BObfgcV1.js";import"./index-CGrAONsN.js";import"./skeleton-CjDnQs43.js";import"./FormBuilder-C0S7C69Q.js";import"./schemas-CaLvKjsI.js";import"./input-11YRd9gD.js";import"./textarea-Dw2vruMl.js";import"./select-gtXRB92c.js";import"./index-BdQq_4o_.js";import"./index-C9xvlw_B.js";import"./index-Dr2xmx-F.js";import"./index-BfKpUbCE.js";import"./index-DschQYGl.js";import"./Combination-CeVus13L.js";import"./index-BN5_W3Yi.js";import"./index-C6O7WofA.js";import"./index-Cce91yJQ.js";import"./index-URSssr5a.js";import"./chevron-down-Bp7zbUB0.js";import"./radio-group-CvN0LQZp.js";import"./index-Cw7p-pms.js";import"./circle-CyarsADt.js";import"./label-CwntpYJ0.js";import"./card-BJpPOzP8.js";import"./Autocomplete-B4gV705L.js";import"./popover-ClqrrvjL.js";import"./command-DCnXmNmT.js";import"./index-u70nzfOV.js";import"./dialog-DL0QBIbC.js";import"./x-n8sFtlI2.js";import"./trash-2-D55eseMQ.js";import"./grip-vertical-CM0GDwvq.js";import"./SectionBuilder-Df_lRZkj.js";import"./separator-CxCWfpZX.js";import"./accordion-BCfsz_gl.js";import"./index-3zykFCgl.js";import"./chevron-left-D1L4J3UW.js";import"./chevron-right-oMYqDJ_f.js";import"./dropdown-menu-BwL9gQwG.js";import"./index-DE2OlfDP.js";import"./settings-2-DSSkfF6W.js";import"./refresh-cw-OZakDsFY.js";const p=[{accessorKey:"name",header:"Name",cell:({row:m})=>o.jsx("span",{className:"font-medium",children:m.original.name})},{accessorKey:"email",header:"Email"},{accessorKey:"status",header:"Status",cell:({getValue:m})=>o.jsx("span",{className:"inline-flex items-center rounded px-2 py-0.5 text-xs ring-1 ring-border",children:String(m())})}],s=[{id:"1",name:"Alice Johnson",email:"alice@example.com",status:"active"},{id:"2",name:"Bob Smith",email:"bob@example.com",status:"inactive"},{id:"3",name:"Carol White",email:"carol@example.com",status:"active"}],bt={title:"Kit/Builder/DataTable",component:a},t={name:"Basic",render:()=>o.jsx("div",{className:"max-w-3xl mx-auto p-6",children:o.jsx(a,{columns:p,data:s,loading:!1,emptyText:"No people found."})})};var r,i,e;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`{
2
+ name: 'Basic',
3
+ render: () => <div className="max-w-3xl mx-auto p-6">
4
+ <DataTable<Person, unknown> columns={columns} data={data} loading={false} emptyText="No people found." />
5
+ </div>
6
+ }`,...(e=(i=t.parameters)==null?void 0:i.docs)==null?void 0:e.source}}};const gt=["Basic"];export{t as Basic,gt as __namedExportsOrder,bt as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as d}from"./iframe-G-6sM9Mt.js";import{D as l}from"./lodash-Q9aGJGMb.js";import"./button-BTWmFXop.js";import"./FormBuilder-BGgeY8ik.js";import"./SectionBuilder-Bav4WrnT.js";import{c as f,a as i}from"./section-factories-CC6eFfbk.js";import{t as x}from"./index-DySHPxMy.js";import"./preload-helper-Dp1pzeXC.js";import"./table-CP3vMqFn.js";import"./utils-D-KgF5mV.js";import"./checkbox-QlugAqJY.js";import"./index-1v1lhNFD.js";import"./index-DvM9azdj.js";import"./index-DW48STyt.js";import"./index-CAwQR9Pv.js";import"./index-I343IfOC.js";import"./index-HghBIZeg.js";import"./index-ev1RjzGv.js";import"./index-Bq6UNRVc.js";import"./index-DqWzLCH-.js";import"./index-_crRFOM5.js";import"./index-CZaD3imo.js";import"./check-BgWXKGqi.js";import"./createLucideIcon-1ZwIAs_l.js";import"./skeleton-CjDnQs43.js";import"./accordion-bQe9Rep4.js";import"./index-BDwnENHR.js";import"./index-B-fXBfyD.js";import"./index-DhoByIgc.js";import"./index-ClNNG_ys.js";import"./chevron-down-BqLjUn1_.js";import"./select-DbLzULCJ.js";import"./index-BdQq_4o_.js";import"./index-7yNAGow7.js";import"./index-lH-AZpAn.js";import"./Combination-BT_gXe1L.js";import"./index-CayhpKmv.js";import"./index-d_S6mtzU.js";import"./index-DNAxNqEO.js";import"./chevron-left-BR_0lKnE.js";import"./chevron-right-DpCIoMaJ.js";import"./dropdown-menu-TfFll7G9.js";import"./index-CLmN5G1a.js";import"./index-CMmbDm5O.js";import"./circle-DVJTkDI7.js";import"./settings-2-CpOcGlDm.js";import"./refresh-cw-FYEbhX1i.js";import"./Autocomplete-DngjqsCM.js";import"./popover-DW1K4QCO.js";import"./command-BERL33lL.js";import"./index-CzJf-yyP.js";import"./dialog-DM9YJ1JD.js";import"./x-DG9mLFAg.js";import"./index-CGrAONsN.js";import"./schemas-S_Tg7JYp.js";import"./input-11YRd9gD.js";import"./textarea-Dw2vruMl.js";import"./radio-group-iPL-8jvw.js";import"./label-C5vJTTwH.js";import"./card-BJpPOzP8.js";import"./trash-2-Bt5LMclM.js";import"./grip-vertical-Buja1rv9.js";import"./separator-DoUX1TNx.js";const b=[{accessorKey:"id",header:"Order #"},{accessorKey:"customer",header:"Customer"},{accessorKey:"status",header:"Status"},{accessorKey:"total",header:"Total",cell:({getValue:t})=>`$${t().toFixed(2)}`}],v=[{id:"1001",customer:"Alice",status:"pending",total:120.4},{id:"1002",customer:"Bob",status:"paid",total:59},{id:"1003",customer:"Carol",status:"shipped",total:220.75},{id:"1004",customer:"Alice",status:"paid",total:18},{id:"1005",customer:"Dan",status:"pending",total:44.99}],y=[f.card("Find orders",[i.text("customer","Customer"),i.select("status","Status",[{label:"Any",value:null},{label:"Pending",value:"pending"},{label:"Paid",value:"paid"},{label:"Shipped",value:"shipped"}])],{grid:{cols:3}})],Kt={title:"Kit/Builder/DataTable",component:l},r={name:"With filters (FormBuilder)",render:()=>{const[t,p]=d.useState({}),u=v.filter(o=>{const n=t.customer?o.customer.toLowerCase().includes(String(t.customer).toLowerCase()):!0,c=t.status?o.status===t.status:!0;return n&&c});return e.jsx("div",{className:"max-w-5xl mx-auto p-6",children:e.jsx(l,{columns:b,data:u,loading:!1,columnVisibility:!0,formFilters:y,formFilterValues:t,onFormFilterChange:p,actions:[{key:"export",label:"Export",variant:"outline",onClick:()=>{x.info("Export...")}}]})})}};var s,a,m;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`{
1
+ import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as d}from"./iframe-BWjPIle6.js";import{D as l}from"./lodash-BkmSIg_J.js";import"./button-BObfgcV1.js";import"./FormBuilder-C0S7C69Q.js";import{c as f,a as i}from"./section-factories-DKfKL-5s.js";import{t as x}from"./index-A7UzX-Xw.js";import"./preload-helper-Dp1pzeXC.js";import"./table-CP3vMqFn.js";import"./utils-D-KgF5mV.js";import"./checkbox-D5BmNJeL.js";import"./index-BcAKBHrX.js";import"./index-Pk2lGsul.js";import"./index-DW48STyt.js";import"./index-7XoYQV2z.js";import"./index-DWC9SV-P.js";import"./index-Dqw7miiX.js";import"./index-DMk2qc2_.js";import"./index-CKwUGXmt.js";import"./index-04C4iZwC.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./check-DyecuwP4.js";import"./createLucideIcon-CLBo0iA0.js";import"./skeleton-CjDnQs43.js";import"./accordion-BCfsz_gl.js";import"./index-C9xvlw_B.js";import"./index-3zykFCgl.js";import"./index-BN5_W3Yi.js";import"./index-Dr2xmx-F.js";import"./chevron-down-Bp7zbUB0.js";import"./select-gtXRB92c.js";import"./index-BdQq_4o_.js";import"./index-BfKpUbCE.js";import"./index-DschQYGl.js";import"./Combination-CeVus13L.js";import"./index-C6O7WofA.js";import"./index-Cce91yJQ.js";import"./index-URSssr5a.js";import"./chevron-left-D1L4J3UW.js";import"./chevron-right-oMYqDJ_f.js";import"./dropdown-menu-BwL9gQwG.js";import"./index-DE2OlfDP.js";import"./index-Cw7p-pms.js";import"./circle-CyarsADt.js";import"./settings-2-DSSkfF6W.js";import"./refresh-cw-OZakDsFY.js";import"./Autocomplete-B4gV705L.js";import"./popover-ClqrrvjL.js";import"./command-DCnXmNmT.js";import"./index-u70nzfOV.js";import"./dialog-DL0QBIbC.js";import"./x-n8sFtlI2.js";import"./index-CGrAONsN.js";import"./schemas-CaLvKjsI.js";import"./input-11YRd9gD.js";import"./textarea-Dw2vruMl.js";import"./radio-group-CvN0LQZp.js";import"./label-CwntpYJ0.js";import"./card-BJpPOzP8.js";import"./trash-2-D55eseMQ.js";import"./grip-vertical-CM0GDwvq.js";import"./SectionBuilder-Df_lRZkj.js";import"./separator-CxCWfpZX.js";const b=[{accessorKey:"id",header:"Order #"},{accessorKey:"customer",header:"Customer"},{accessorKey:"status",header:"Status"},{accessorKey:"total",header:"Total",cell:({getValue:t})=>`$${t().toFixed(2)}`}],v=[{id:"1001",customer:"Alice",status:"pending",total:120.4},{id:"1002",customer:"Bob",status:"paid",total:59},{id:"1003",customer:"Carol",status:"shipped",total:220.75},{id:"1004",customer:"Alice",status:"paid",total:18},{id:"1005",customer:"Dan",status:"pending",total:44.99}],y=[f.card("Find orders",[i.text("customer","Customer"),i.select("status","Status",[{label:"Any",value:null},{label:"Pending",value:"pending"},{label:"Paid",value:"paid"},{label:"Shipped",value:"shipped"}])],{grid:{cols:3}})],Kt={title:"Kit/Builder/DataTable",component:l},r={name:"With filters (FormBuilder)",render:()=>{const[t,p]=d.useState({}),u=v.filter(o=>{const n=t.customer?o.customer.toLowerCase().includes(String(t.customer).toLowerCase()):!0,c=t.status?o.status===t.status:!0;return n&&c});return e.jsx("div",{className:"max-w-5xl mx-auto p-6",children:e.jsx(l,{columns:b,data:u,loading:!1,columnVisibility:!0,formFilters:y,formFilterValues:t,onFormFilterChange:p,actions:[{key:"export",label:"Export",variant:"outline",onClick:()=>{x.info("Export...")}}]})})}};var s,a,m;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`{
2
2
  name: 'With filters (FormBuilder)',
3
3
  render: () => {
4
4
  const [values, setValues] = useState<Record<string, unknown>>({});
@@ -1,4 +1,4 @@
1
- import{j as o}from"./jsx-runtime-D_zvdyIk.js";import{r as l}from"./iframe-G-6sM9Mt.js";import{D as m}from"./lodash-Q9aGJGMb.js";import"./preload-helper-Dp1pzeXC.js";import"./table-CP3vMqFn.js";import"./utils-D-KgF5mV.js";import"./checkbox-QlugAqJY.js";import"./index-1v1lhNFD.js";import"./index-DvM9azdj.js";import"./index-DW48STyt.js";import"./index-CAwQR9Pv.js";import"./index-I343IfOC.js";import"./index-HghBIZeg.js";import"./index-ev1RjzGv.js";import"./index-Bq6UNRVc.js";import"./index-DqWzLCH-.js";import"./index-_crRFOM5.js";import"./index-CZaD3imo.js";import"./check-BgWXKGqi.js";import"./createLucideIcon-1ZwIAs_l.js";import"./button-BTWmFXop.js";import"./index-CGrAONsN.js";import"./skeleton-CjDnQs43.js";import"./FormBuilder-BGgeY8ik.js";import"./schemas-S_Tg7JYp.js";import"./input-11YRd9gD.js";import"./textarea-Dw2vruMl.js";import"./select-DbLzULCJ.js";import"./index-BdQq_4o_.js";import"./index-BDwnENHR.js";import"./index-ClNNG_ys.js";import"./index-7yNAGow7.js";import"./index-lH-AZpAn.js";import"./Combination-BT_gXe1L.js";import"./index-DhoByIgc.js";import"./index-CayhpKmv.js";import"./index-d_S6mtzU.js";import"./index-DNAxNqEO.js";import"./chevron-down-BqLjUn1_.js";import"./radio-group-iPL-8jvw.js";import"./index-CMmbDm5O.js";import"./circle-DVJTkDI7.js";import"./label-C5vJTTwH.js";import"./card-BJpPOzP8.js";import"./Autocomplete-DngjqsCM.js";import"./popover-DW1K4QCO.js";import"./command-BERL33lL.js";import"./index-CzJf-yyP.js";import"./dialog-DM9YJ1JD.js";import"./x-DG9mLFAg.js";import"./trash-2-Bt5LMclM.js";import"./grip-vertical-Buja1rv9.js";import"./SectionBuilder-Bav4WrnT.js";import"./separator-DoUX1TNx.js";import"./accordion-bQe9Rep4.js";import"./index-B-fXBfyD.js";import"./chevron-left-BR_0lKnE.js";import"./chevron-right-DpCIoMaJ.js";import"./dropdown-menu-TfFll7G9.js";import"./index-CLmN5G1a.js";import"./settings-2-CpOcGlDm.js";import"./refresh-cw-FYEbhX1i.js";const h=[{accessorKey:"name",header:"Name"},{accessorKey:"email",header:"Email"}],n=Array.from({length:48},(i,t)=>({id:String(t+1),name:`User ${t+1}`,email:`user${t+1}@example.com`})),bt={title:"Kit/Builder/DataTable",component:m},e={name:"With pagination (client)",render:()=>o.jsx("div",{className:"max-w-4xl mx-auto p-6",children:o.jsx(m,{columns:h,data:n,loading:!1,pagination:!0})})},a={name:"With pagination (controlled/server-like)",render:()=>{const[i,t]=l.useState(0),[r,P]=l.useState(10),p=i*r,z=p+r,f=n.slice(p,z);return o.jsx("div",{className:"max-w-4xl mx-auto p-6",children:o.jsx(m,{columns:h,data:f,loading:!1,pagination:!0,rowCount:n.length,paginationState:{pageIndex:i,pageSize:r},onPaginationChange:s=>{t(s.pageIndex),P(s.pageSize)}})})}};var c,d,g;e.parameters={...e.parameters,docs:{...(c=e.parameters)==null?void 0:c.docs,source:{originalSource:`{
1
+ import{j as o}from"./jsx-runtime-D_zvdyIk.js";import{r as l}from"./iframe-BWjPIle6.js";import{D as m}from"./lodash-BkmSIg_J.js";import"./preload-helper-Dp1pzeXC.js";import"./table-CP3vMqFn.js";import"./utils-D-KgF5mV.js";import"./checkbox-D5BmNJeL.js";import"./index-BcAKBHrX.js";import"./index-Pk2lGsul.js";import"./index-DW48STyt.js";import"./index-7XoYQV2z.js";import"./index-DWC9SV-P.js";import"./index-Dqw7miiX.js";import"./index-DMk2qc2_.js";import"./index-CKwUGXmt.js";import"./index-04C4iZwC.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./check-DyecuwP4.js";import"./createLucideIcon-CLBo0iA0.js";import"./button-BObfgcV1.js";import"./index-CGrAONsN.js";import"./skeleton-CjDnQs43.js";import"./FormBuilder-C0S7C69Q.js";import"./schemas-CaLvKjsI.js";import"./input-11YRd9gD.js";import"./textarea-Dw2vruMl.js";import"./select-gtXRB92c.js";import"./index-BdQq_4o_.js";import"./index-C9xvlw_B.js";import"./index-Dr2xmx-F.js";import"./index-BfKpUbCE.js";import"./index-DschQYGl.js";import"./Combination-CeVus13L.js";import"./index-BN5_W3Yi.js";import"./index-C6O7WofA.js";import"./index-Cce91yJQ.js";import"./index-URSssr5a.js";import"./chevron-down-Bp7zbUB0.js";import"./radio-group-CvN0LQZp.js";import"./index-Cw7p-pms.js";import"./circle-CyarsADt.js";import"./label-CwntpYJ0.js";import"./card-BJpPOzP8.js";import"./Autocomplete-B4gV705L.js";import"./popover-ClqrrvjL.js";import"./command-DCnXmNmT.js";import"./index-u70nzfOV.js";import"./dialog-DL0QBIbC.js";import"./x-n8sFtlI2.js";import"./trash-2-D55eseMQ.js";import"./grip-vertical-CM0GDwvq.js";import"./SectionBuilder-Df_lRZkj.js";import"./separator-CxCWfpZX.js";import"./accordion-BCfsz_gl.js";import"./index-3zykFCgl.js";import"./chevron-left-D1L4J3UW.js";import"./chevron-right-oMYqDJ_f.js";import"./dropdown-menu-BwL9gQwG.js";import"./index-DE2OlfDP.js";import"./settings-2-DSSkfF6W.js";import"./refresh-cw-OZakDsFY.js";const h=[{accessorKey:"name",header:"Name"},{accessorKey:"email",header:"Email"}],n=Array.from({length:48},(i,t)=>({id:String(t+1),name:`User ${t+1}`,email:`user${t+1}@example.com`})),bt={title:"Kit/Builder/DataTable",component:m},e={name:"With pagination (client)",render:()=>o.jsx("div",{className:"max-w-4xl mx-auto p-6",children:o.jsx(m,{columns:h,data:n,loading:!1,pagination:!0})})},a={name:"With pagination (controlled/server-like)",render:()=>{const[i,t]=l.useState(0),[r,P]=l.useState(10),p=i*r,z=p+r,f=n.slice(p,z);return o.jsx("div",{className:"max-w-4xl mx-auto p-6",children:o.jsx(m,{columns:h,data:f,loading:!1,pagination:!0,rowCount:n.length,paginationState:{pageIndex:i,pageSize:r},onPaginationChange:s=>{t(s.pageIndex),P(s.pageSize)}})})}};var c,d,g;e.parameters={...e.parameters,docs:{...(c=e.parameters)==null?void 0:c.docs,source:{originalSource:`{
2
2
  name: 'With pagination (client)',
3
3
  render: () => <div className="max-w-4xl mx-auto p-6">
4
4
  <DataTable<Person, unknown> columns={columns} data={data} loading={false} pagination />
@@ -1,4 +1,4 @@
1
- import{j as t}from"./jsx-runtime-D_zvdyIk.js";import{D as s}from"./lodash-Q9aGJGMb.js";import{t as i}from"./index-DySHPxMy.js";import{T as p,P as l}from"./trash-2-Bt5LMclM.js";import"./iframe-G-6sM9Mt.js";import"./preload-helper-Dp1pzeXC.js";import"./table-CP3vMqFn.js";import"./utils-D-KgF5mV.js";import"./checkbox-QlugAqJY.js";import"./index-1v1lhNFD.js";import"./index-DvM9azdj.js";import"./index-DW48STyt.js";import"./index-CAwQR9Pv.js";import"./index-I343IfOC.js";import"./index-HghBIZeg.js";import"./index-ev1RjzGv.js";import"./index-Bq6UNRVc.js";import"./index-DqWzLCH-.js";import"./index-_crRFOM5.js";import"./index-CZaD3imo.js";import"./check-BgWXKGqi.js";import"./createLucideIcon-1ZwIAs_l.js";import"./button-BTWmFXop.js";import"./index-CGrAONsN.js";import"./skeleton-CjDnQs43.js";import"./FormBuilder-BGgeY8ik.js";import"./schemas-S_Tg7JYp.js";import"./input-11YRd9gD.js";import"./textarea-Dw2vruMl.js";import"./select-DbLzULCJ.js";import"./index-BdQq_4o_.js";import"./index-BDwnENHR.js";import"./index-ClNNG_ys.js";import"./index-7yNAGow7.js";import"./index-lH-AZpAn.js";import"./Combination-BT_gXe1L.js";import"./index-DhoByIgc.js";import"./index-CayhpKmv.js";import"./index-d_S6mtzU.js";import"./index-DNAxNqEO.js";import"./chevron-down-BqLjUn1_.js";import"./radio-group-iPL-8jvw.js";import"./index-CMmbDm5O.js";import"./circle-DVJTkDI7.js";import"./label-C5vJTTwH.js";import"./card-BJpPOzP8.js";import"./Autocomplete-DngjqsCM.js";import"./popover-DW1K4QCO.js";import"./command-BERL33lL.js";import"./index-CzJf-yyP.js";import"./dialog-DM9YJ1JD.js";import"./x-DG9mLFAg.js";import"./grip-vertical-Buja1rv9.js";import"./SectionBuilder-Bav4WrnT.js";import"./separator-DoUX1TNx.js";import"./accordion-bQe9Rep4.js";import"./index-B-fXBfyD.js";import"./chevron-left-BR_0lKnE.js";import"./chevron-right-DpCIoMaJ.js";import"./dropdown-menu-TfFll7G9.js";import"./index-CLmN5G1a.js";import"./settings-2-CpOcGlDm.js";import"./refresh-cw-FYEbhX1i.js";const n=[{accessorKey:"name",header:"Item"},{accessorKey:"price",header:"Price",cell:({getValue:e})=>t.jsxs("span",{className:"tabular-nums",children:["$",e().toFixed(2)]})}],d=[{id:"1",name:"Keyboard",price:49.99},{id:"2",name:"Mouse",price:24.5},{id:"3",name:"Headset",price:79},{id:"4",name:"Monitor",price:199}],ye={title:"Kit/Builder/DataTable",component:s},o={name:"Selectable + actions",render:()=>t.jsx("div",{className:"max-w-4xl mx-auto p-6",children:t.jsx(s,{columns:n,data:d,loading:!1,selectable:!0,showStandardActions:!0,onRefresh:()=>new Promise(e=>setTimeout(e,800)),actions:[{key:"create",label:"New Item",icon:t.jsx(l,{className:"h-4 w-4"}),variant:"outline",onClick:()=>{i.info("Create clicked")}}],batchActions:[{key:"delete",label:"Delete Selected",icon:t.jsx(p,{className:"h-4 w-4"}),variant:"destructive",onClick:async({selectedRows:e,clearSelection:c})=>{i.info(`Would delete ${e.length} items`),c()}}]})})};var r,a,m;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`{
1
+ import{j as t}from"./jsx-runtime-D_zvdyIk.js";import{D as s}from"./lodash-BkmSIg_J.js";import{t as i}from"./index-A7UzX-Xw.js";import{T as p,P as l}from"./trash-2-D55eseMQ.js";import"./iframe-BWjPIle6.js";import"./preload-helper-Dp1pzeXC.js";import"./table-CP3vMqFn.js";import"./utils-D-KgF5mV.js";import"./checkbox-D5BmNJeL.js";import"./index-BcAKBHrX.js";import"./index-Pk2lGsul.js";import"./index-DW48STyt.js";import"./index-7XoYQV2z.js";import"./index-DWC9SV-P.js";import"./index-Dqw7miiX.js";import"./index-DMk2qc2_.js";import"./index-CKwUGXmt.js";import"./index-04C4iZwC.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./check-DyecuwP4.js";import"./createLucideIcon-CLBo0iA0.js";import"./button-BObfgcV1.js";import"./index-CGrAONsN.js";import"./skeleton-CjDnQs43.js";import"./FormBuilder-C0S7C69Q.js";import"./schemas-CaLvKjsI.js";import"./input-11YRd9gD.js";import"./textarea-Dw2vruMl.js";import"./select-gtXRB92c.js";import"./index-BdQq_4o_.js";import"./index-C9xvlw_B.js";import"./index-Dr2xmx-F.js";import"./index-BfKpUbCE.js";import"./index-DschQYGl.js";import"./Combination-CeVus13L.js";import"./index-BN5_W3Yi.js";import"./index-C6O7WofA.js";import"./index-Cce91yJQ.js";import"./index-URSssr5a.js";import"./chevron-down-Bp7zbUB0.js";import"./radio-group-CvN0LQZp.js";import"./index-Cw7p-pms.js";import"./circle-CyarsADt.js";import"./label-CwntpYJ0.js";import"./card-BJpPOzP8.js";import"./Autocomplete-B4gV705L.js";import"./popover-ClqrrvjL.js";import"./command-DCnXmNmT.js";import"./index-u70nzfOV.js";import"./dialog-DL0QBIbC.js";import"./x-n8sFtlI2.js";import"./grip-vertical-CM0GDwvq.js";import"./SectionBuilder-Df_lRZkj.js";import"./separator-CxCWfpZX.js";import"./accordion-BCfsz_gl.js";import"./index-3zykFCgl.js";import"./chevron-left-D1L4J3UW.js";import"./chevron-right-oMYqDJ_f.js";import"./dropdown-menu-BwL9gQwG.js";import"./index-DE2OlfDP.js";import"./settings-2-DSSkfF6W.js";import"./refresh-cw-OZakDsFY.js";const n=[{accessorKey:"name",header:"Item"},{accessorKey:"price",header:"Price",cell:({getValue:e})=>t.jsxs("span",{className:"tabular-nums",children:["$",e().toFixed(2)]})}],d=[{id:"1",name:"Keyboard",price:49.99},{id:"2",name:"Mouse",price:24.5},{id:"3",name:"Headset",price:79},{id:"4",name:"Monitor",price:199}],ye={title:"Kit/Builder/DataTable",component:s},o={name:"Selectable + actions",render:()=>t.jsx("div",{className:"max-w-4xl mx-auto p-6",children:t.jsx(s,{columns:n,data:d,loading:!1,selectable:!0,showStandardActions:!0,onRefresh:()=>new Promise(e=>setTimeout(e,800)),actions:[{key:"create",label:"New Item",icon:t.jsx(l,{className:"h-4 w-4"}),variant:"outline",onClick:()=>{i.info("Create clicked")}}],batchActions:[{key:"delete",label:"Delete Selected",icon:t.jsx(p,{className:"h-4 w-4"}),variant:"destructive",onClick:async({selectedRows:e,clearSelection:c})=>{i.info(`Would delete ${e.length} items`),c()}}]})})};var r,a,m;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`{
2
2
  name: 'Selectable + actions',
3
3
  render: () => <div className="max-w-4xl mx-auto p-6">
4
4
  <DataTable<Item, unknown> columns={columns} data={data} loading={false} selectable showStandardActions onRefresh={() => new Promise(r => setTimeout(r, 800))} actions={[{
@@ -0,0 +1,6 @@
1
+ import{j as m}from"./jsx-runtime-D_zvdyIk.js";import{D as p,a as o}from"./lodash-BkmSIg_J.js";import"./iframe-BWjPIle6.js";import"./preload-helper-Dp1pzeXC.js";import"./table-CP3vMqFn.js";import"./utils-D-KgF5mV.js";import"./checkbox-D5BmNJeL.js";import"./index-BcAKBHrX.js";import"./index-Pk2lGsul.js";import"./index-DW48STyt.js";import"./index-7XoYQV2z.js";import"./index-DWC9SV-P.js";import"./index-Dqw7miiX.js";import"./index-DMk2qc2_.js";import"./index-CKwUGXmt.js";import"./index-04C4iZwC.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./check-DyecuwP4.js";import"./createLucideIcon-CLBo0iA0.js";import"./button-BObfgcV1.js";import"./index-CGrAONsN.js";import"./skeleton-CjDnQs43.js";import"./FormBuilder-C0S7C69Q.js";import"./schemas-CaLvKjsI.js";import"./input-11YRd9gD.js";import"./textarea-Dw2vruMl.js";import"./select-gtXRB92c.js";import"./index-BdQq_4o_.js";import"./index-C9xvlw_B.js";import"./index-Dr2xmx-F.js";import"./index-BfKpUbCE.js";import"./index-DschQYGl.js";import"./Combination-CeVus13L.js";import"./index-BN5_W3Yi.js";import"./index-C6O7WofA.js";import"./index-Cce91yJQ.js";import"./index-URSssr5a.js";import"./chevron-down-Bp7zbUB0.js";import"./radio-group-CvN0LQZp.js";import"./index-Cw7p-pms.js";import"./circle-CyarsADt.js";import"./label-CwntpYJ0.js";import"./card-BJpPOzP8.js";import"./Autocomplete-B4gV705L.js";import"./popover-ClqrrvjL.js";import"./command-DCnXmNmT.js";import"./index-u70nzfOV.js";import"./dialog-DL0QBIbC.js";import"./x-n8sFtlI2.js";import"./trash-2-D55eseMQ.js";import"./grip-vertical-CM0GDwvq.js";import"./SectionBuilder-Df_lRZkj.js";import"./separator-CxCWfpZX.js";import"./accordion-BCfsz_gl.js";import"./index-3zykFCgl.js";import"./chevron-left-D1L4J3UW.js";import"./chevron-right-oMYqDJ_f.js";import"./dropdown-menu-BwL9gQwG.js";import"./index-DE2OlfDP.js";import"./settings-2-DSSkfF6W.js";import"./refresh-cw-OZakDsFY.js";const s=[{accessorKey:"name",header:({column:t})=>m.jsx(o,{column:t,title:"Name"})},{accessorKey:"email",header:({column:t})=>m.jsx(o,{column:t,title:"Email"})},{accessorKey:"age",header:({column:t})=>m.jsx(o,{column:t,title:"Age"}),cell:({getValue:t})=>m.jsx("span",{className:"tabular-nums",children:t()})}],n=[{id:"1",name:"Zara",email:"zara@example.com",age:29},{id:"2",name:"Mike",email:"mike@example.com",age:41},{id:"3",name:"Anna",email:"anna@example.com",age:22},{id:"4",name:"Ben",email:"ben@example.com",age:35}],bt={title:"Kit/Builder/DataTable",component:p},r={name:"With sorting",render:()=>m.jsx("div",{className:"max-w-4xl mx-auto p-6",children:m.jsx(p,{columns:s,data:n,loading:!1,sorting:!0})})};var i,a,e;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`{
2
+ name: 'With sorting',
3
+ render: () => <div className="max-w-4xl mx-auto p-6">
4
+ <DataTable<Person, unknown> columns={columns} data={data} loading={false} sorting />
5
+ </div>
6
+ }`,...(e=(a=r.parameters)==null?void 0:a.docs)==null?void 0:e.source}}};const ft=["WithSorting"];export{r as WithSorting,ft as __namedExportsOrder,bt as default};
@@ -1,4 +1,4 @@
1
- import{j as o}from"./jsx-runtime-D_zvdyIk.js";import{D as n,b as l,a as s,c as d,d as p,e as m,f as c}from"./dialog-DM9YJ1JD.js";import{B as i}from"./button-BTWmFXop.js";import"./index-CzJf-yyP.js";import"./iframe-G-6sM9Mt.js";import"./preload-helper-Dp1pzeXC.js";import"./index-DW48STyt.js";import"./index-1v1lhNFD.js";import"./index-DvM9azdj.js";import"./index-DhoByIgc.js";import"./index-I343IfOC.js";import"./index-CAwQR9Pv.js";import"./index-7yNAGow7.js";import"./index-DqWzLCH-.js";import"./index-_crRFOM5.js";import"./index-CZaD3imo.js";import"./index-lH-AZpAn.js";import"./Combination-BT_gXe1L.js";import"./index-d_S6mtzU.js";import"./index-Bq6UNRVc.js";import"./utils-D-KgF5mV.js";import"./x-DG9mLFAg.js";import"./createLucideIcon-1ZwIAs_l.js";import"./index-CGrAONsN.js";const R={title:"Shadcn/UI/Dialog",component:n},e={render:()=>o.jsxs(n,{children:[o.jsx(l,{asChild:!0,children:o.jsx(i,{variant:"default",children:"Open dialog"})}),o.jsxs(s,{children:[o.jsxs(d,{children:[o.jsx(p,{children:"Edit profile"}),o.jsx(m,{children:"Make changes to your profile here. Click save when you're done."})]}),o.jsx("div",{className:"py-2 text-sm text-muted-foreground",children:"Dialog body content..."}),o.jsxs(c,{children:[o.jsx(i,{variant:"outline",children:"Cancel"}),o.jsx(i,{children:"Save changes"})]})]})]})};var t,r,a;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`{
1
+ import{j as o}from"./jsx-runtime-D_zvdyIk.js";import{D as n,b as l,a as s,c as d,d as p,e as m,f as c}from"./dialog-DL0QBIbC.js";import{B as i}from"./button-BObfgcV1.js";import"./index-u70nzfOV.js";import"./iframe-BWjPIle6.js";import"./preload-helper-Dp1pzeXC.js";import"./index-DW48STyt.js";import"./index-BcAKBHrX.js";import"./index-Pk2lGsul.js";import"./index-BN5_W3Yi.js";import"./index-DWC9SV-P.js";import"./index-7XoYQV2z.js";import"./index-BfKpUbCE.js";import"./index-04C4iZwC.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./index-DschQYGl.js";import"./Combination-CeVus13L.js";import"./index-Cce91yJQ.js";import"./index-CKwUGXmt.js";import"./utils-D-KgF5mV.js";import"./x-n8sFtlI2.js";import"./createLucideIcon-CLBo0iA0.js";import"./index-CGrAONsN.js";const R={title:"Shadcn/UI/Dialog",component:n},e={render:()=>o.jsxs(n,{children:[o.jsx(l,{asChild:!0,children:o.jsx(i,{variant:"default",children:"Open dialog"})}),o.jsxs(s,{children:[o.jsxs(d,{children:[o.jsx(p,{children:"Edit profile"}),o.jsx(m,{children:"Make changes to your profile here. Click save when you're done."})]}),o.jsx("div",{className:"py-2 text-sm text-muted-foreground",children:"Dialog body content..."}),o.jsxs(c,{children:[o.jsx(i,{variant:"outline",children:"Cancel"}),o.jsx(i,{children:"Save changes"})]})]})]})};var t,r,a;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`{
2
2
  render: () => <Dialog>
3
3
  <DialogTrigger asChild>
4
4
  <Button variant="default">Open dialog</Button>
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as o}from"./iframe-G-6sM9Mt.js";import{A as Y,a as q,b as F,c as H,d as z,e as G,f as J,g as L}from"./alert-dialog-CypF_yaW.js";import{D as Q,a as U}from"./dialog-DM9YJ1JD.js";import{B as d}from"./button-BTWmFXop.js";import"./preload-helper-Dp1pzeXC.js";import"./index-DvM9azdj.js";import"./index-1v1lhNFD.js";import"./index-CzJf-yyP.js";import"./index-DW48STyt.js";import"./index-DhoByIgc.js";import"./index-I343IfOC.js";import"./index-CAwQR9Pv.js";import"./index-7yNAGow7.js";import"./index-DqWzLCH-.js";import"./index-_crRFOM5.js";import"./index-CZaD3imo.js";import"./index-lH-AZpAn.js";import"./Combination-BT_gXe1L.js";import"./index-d_S6mtzU.js";import"./index-Bq6UNRVc.js";import"./utils-D-KgF5mV.js";import"./x-DG9mLFAg.js";import"./createLucideIcon-1ZwIAs_l.js";import"./index-CGrAONsN.js";const b=o.createContext(null);function V(){const n=o.use(b);if(!n)throw new Error("useDialogController must be used within DialogProvider");return n}function O({children:n}){const[r,s]=o.useState(!1),a=o.useRef(null),[x,m]=o.useState(null),[w,A]=o.useState({}),[f,B]=o.useState(null),[i,E]=o.useState(void 0),g=o.useCallback(t=>(A(t??{}),m("confirm"),s(!0),new Promise(p=>{a.current=p})),[]),C=o.useCallback((t,p)=>(B(()=>t),E(p),m("custom"),s(!0),new Promise(K=>{a.current=K})),[]),l=o.useCallback(t=>{s(!1),a.current&&(a.current(t),a.current=null),m(null)},[]),R=o.useMemo(()=>({confirm:g,open:C}),[g,C]),{title:S="Are you sure?",description:h="This action cannot be undone.",confirmText:I="Continue",cancelText:P="Cancel",destructive:M=!1}=w,_=M?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"";return e.jsxs(b,{value:R,children:[n,x==="confirm"&&e.jsx(Y,{open:r,onOpenChange:t=>!t&&l(!1),children:e.jsxs(q,{children:[e.jsxs(F,{children:[e.jsx(H,{className:"text-foreground",children:S}),h?e.jsx(z,{className:"text-muted-foreground",children:h}):null]}),e.jsxs(G,{children:[e.jsx(J,{className:"text-foreground",onClick:()=>l(!1),children:P}),e.jsx(L,{className:_,onClick:()=>l(!0),children:I})]})]})}),x==="custom"&&f&&e.jsx(Q,{open:r,onOpenChange:t=>!t&&l(void 0),children:e.jsx(U,{onEscapeKeyDown:t=>{i!=null&&i.preventCloseOnEscape&&t.preventDefault()},onInteractOutside:t=>{i!=null&&i.preventCloseOnInteractOutside&&t.preventDefault()},children:f({close:t=>l(t)})})})]})}const T=V;O.__docgenInfo={description:"",methods:[],displayName:"DialogProvider",props:{children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};const je={title:"Kit/Builder/Dialog",decorators:[n=>e.jsx(O,{children:e.jsx("div",{className:"space-y-6",children:e.jsx(n,{})})})],parameters:{controls:{expanded:!0},backgrounds:{disable:!0}}},c={render:()=>{const{confirm:n}=T();return e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(d,{onClick:async()=>{const r=await n({title:"Delete item?",description:"This action cannot be undone.",destructive:!0,confirmText:"Delete",cancelText:"Cancel"});console.log("confirm result:",r)},children:"Open Confirm"})})}},u={render:()=>{const{open:n}=T();return e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(d,{variant:"secondary",onClick:async()=>{const r=await n(({close:s})=>e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Custom Modal"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"You can render anything here and call close(value) to resolve."}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(d,{variant:"outline",onClick:()=>s(void 0),children:"Cancel"}),e.jsx(d,{onClick:()=>s("done"),children:"Confirm"})]})]}),{preventCloseOnInteractOutside:!0});console.log("custom result:",r)},children:"Open Custom"})})}};var v,D,j;c.parameters={...c.parameters,docs:{...(v=c.parameters)==null?void 0:v.docs,source:{originalSource:`{
1
+ import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as o}from"./iframe-BWjPIle6.js";import{A as Y,a as q,b as F,c as H,d as z,e as G,f as J,g as L}from"./alert-dialog-BYt6Z7Kt.js";import{D as Q,a as U}from"./dialog-DL0QBIbC.js";import{B as d}from"./button-BObfgcV1.js";import"./preload-helper-Dp1pzeXC.js";import"./index-Pk2lGsul.js";import"./index-BcAKBHrX.js";import"./index-u70nzfOV.js";import"./index-DW48STyt.js";import"./index-BN5_W3Yi.js";import"./index-DWC9SV-P.js";import"./index-7XoYQV2z.js";import"./index-BfKpUbCE.js";import"./index-04C4iZwC.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./index-DschQYGl.js";import"./Combination-CeVus13L.js";import"./index-Cce91yJQ.js";import"./index-CKwUGXmt.js";import"./utils-D-KgF5mV.js";import"./x-n8sFtlI2.js";import"./createLucideIcon-CLBo0iA0.js";import"./index-CGrAONsN.js";const b=o.createContext(null);function V(){const n=o.use(b);if(!n)throw new Error("useDialogController must be used within DialogProvider");return n}function O({children:n}){const[r,s]=o.useState(!1),a=o.useRef(null),[x,m]=o.useState(null),[w,A]=o.useState({}),[f,B]=o.useState(null),[i,E]=o.useState(void 0),g=o.useCallback(t=>(A(t??{}),m("confirm"),s(!0),new Promise(p=>{a.current=p})),[]),C=o.useCallback((t,p)=>(B(()=>t),E(p),m("custom"),s(!0),new Promise(K=>{a.current=K})),[]),l=o.useCallback(t=>{s(!1),a.current&&(a.current(t),a.current=null),m(null)},[]),R=o.useMemo(()=>({confirm:g,open:C}),[g,C]),{title:S="Are you sure?",description:h="This action cannot be undone.",confirmText:I="Continue",cancelText:P="Cancel",destructive:M=!1}=w,_=M?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"";return e.jsxs(b,{value:R,children:[n,x==="confirm"&&e.jsx(Y,{open:r,onOpenChange:t=>!t&&l(!1),children:e.jsxs(q,{children:[e.jsxs(F,{children:[e.jsx(H,{className:"text-foreground",children:S}),h?e.jsx(z,{className:"text-muted-foreground",children:h}):null]}),e.jsxs(G,{children:[e.jsx(J,{className:"text-foreground",onClick:()=>l(!1),children:P}),e.jsx(L,{className:_,onClick:()=>l(!0),children:I})]})]})}),x==="custom"&&f&&e.jsx(Q,{open:r,onOpenChange:t=>!t&&l(void 0),children:e.jsx(U,{onEscapeKeyDown:t=>{i!=null&&i.preventCloseOnEscape&&t.preventDefault()},onInteractOutside:t=>{i!=null&&i.preventCloseOnInteractOutside&&t.preventDefault()},children:f({close:t=>l(t)})})})]})}const T=V;O.__docgenInfo={description:"",methods:[],displayName:"DialogProvider",props:{children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};const je={title:"Kit/Builder/Dialog",decorators:[n=>e.jsx(O,{children:e.jsx("div",{className:"space-y-6",children:e.jsx(n,{})})})],parameters:{controls:{expanded:!0},backgrounds:{disable:!0}}},c={render:()=>{const{confirm:n}=T();return e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(d,{onClick:async()=>{const r=await n({title:"Delete item?",description:"This action cannot be undone.",destructive:!0,confirmText:"Delete",cancelText:"Cancel"});console.log("confirm result:",r)},children:"Open Confirm"})})}},u={render:()=>{const{open:n}=T();return e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(d,{variant:"secondary",onClick:async()=>{const r=await n(({close:s})=>e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Custom Modal"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"You can render anything here and call close(value) to resolve."}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(d,{variant:"outline",onClick:()=>s(void 0),children:"Cancel"}),e.jsx(d,{onClick:()=>s("done"),children:"Confirm"})]})]}),{preventCloseOnInteractOutside:!0});console.log("custom result:",r)},children:"Open Custom"})})}};var v,D,j;c.parameters={...c.parameters,docs:{...(v=c.parameters)==null?void 0:v.docs,source:{originalSource:`{
2
2
  render: () => {
3
3
  // eslint-disable-next-line react-hooks/rules-of-hooks
4
4
  const {
@@ -1,4 +1,4 @@
1
- import{j as T}from"./jsx-runtime-D_zvdyIk.js";import{R as Me,T as Ne,a as Ie,D as Pe,b as Be,C as He,P as ke,O as je}from"./index-CzJf-yyP.js";import{R as r,r as bt}from"./iframe-G-6sM9Mt.js";import{c as ot}from"./utils-D-KgF5mV.js";import{B as Et}from"./button-BTWmFXop.js";import"./index-DW48STyt.js";import"./index-1v1lhNFD.js";import"./index-DvM9azdj.js";import"./index-DhoByIgc.js";import"./index-I343IfOC.js";import"./index-CAwQR9Pv.js";import"./index-7yNAGow7.js";import"./index-DqWzLCH-.js";import"./index-_crRFOM5.js";import"./index-CZaD3imo.js";import"./index-lH-AZpAn.js";import"./Combination-BT_gXe1L.js";import"./index-d_S6mtzU.js";import"./index-Bq6UNRVc.js";import"./preload-helper-Dp1pzeXC.js";import"./index-CGrAONsN.js";function Le(t){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",n.appendChild(e),e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}const Qt=r.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),mt=()=>{const t=r.useContext(Qt);if(!t)throw new Error("useDrawerContext must be used within a Drawer.Root");return t};Le(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
1
+ import{j as T}from"./jsx-runtime-D_zvdyIk.js";import{R as Me,T as Ne,a as Ie,D as Pe,b as Be,C as He,P as ke,O as je}from"./index-u70nzfOV.js";import{R as r,r as bt}from"./iframe-BWjPIle6.js";import{c as ot}from"./utils-D-KgF5mV.js";import{B as Et}from"./button-BObfgcV1.js";import"./index-DW48STyt.js";import"./index-BcAKBHrX.js";import"./index-Pk2lGsul.js";import"./index-BN5_W3Yi.js";import"./index-DWC9SV-P.js";import"./index-7XoYQV2z.js";import"./index-BfKpUbCE.js";import"./index-04C4iZwC.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./index-DschQYGl.js";import"./Combination-CeVus13L.js";import"./index-Cce91yJQ.js";import"./index-CKwUGXmt.js";import"./preload-helper-Dp1pzeXC.js";import"./index-CGrAONsN.js";function Le(t){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",n.appendChild(e),e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}const Qt=r.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),mt=()=>{const t=r.useContext(Qt);if(!t)throw new Error("useDrawerContext must be used within a Drawer.Root");return t};Le(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
2
2
  [data-state=closed]
3
3
  ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function Fe(){const t=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(t)&&/Mobile/.test(t)||/FxiOS/.test(t))}function Ue(){return Nt(/^Mac/)}function We(){return Nt(/^iPhone/)}function Vt(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function ze(){return Nt(/^iPad/)||Ue()&&navigator.maxTouchPoints>1}function Zt(){return We()||ze()}function Nt(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.platform):void 0}const Ve=24,Ye=typeof window<"u"?bt.useLayoutEffect:bt.useEffect;function Yt(...t){return(...n)=>{for(let e of t)typeof e=="function"&&e(...n)}}const Ct=typeof document<"u"&&window.visualViewport;function qt(t){let n=window.getComputedStyle(t);return/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY)}function te(t){for(qt(t)&&(t=t.parentElement);t&&!qt(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}const qe=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let gt=0,Ot;function Xe(t={}){let{isDisabled:n}=t;Ye(()=>{if(!n)return gt++,gt===1&&Zt()&&(Ot=Ke()),()=>{gt--,gt===0&&(Ot==null||Ot())}},[n])}function Ke(){let t,n=0,e=f=>{t=te(f.target),!(t===document.documentElement&&t===document.body)&&(n=f.changedTouches[0].pageY)},o=f=>{if(!t||t===document.documentElement||t===document.body){f.preventDefault();return}let m=f.changedTouches[0].pageY,L=t.scrollTop,k=t.scrollHeight-t.clientHeight;k!==0&&((L<=0&&m>n||L>=k&&m<n)&&f.preventDefault(),n=m)},i=f=>{let m=f.target;At(m)&&m!==document.activeElement&&(f.preventDefault(),m.style.transform="translateY(-2000px)",m.focus(),requestAnimationFrame(()=>{m.style.transform=""}))},a=f=>{let m=f.target;At(m)&&(m.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{m.style.transform="",Ct&&(Ct.height<window.innerHeight?requestAnimationFrame(()=>{Xt(m)}):Ct.addEventListener("resize",()=>Xt(m),{once:!0}))}))},v=()=>{window.scrollTo(0,0)},w=window.pageXOffset,x=window.pageYOffset,R=Yt(Ge(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let h=Yt(dt(document,"touchstart",e,{passive:!1,capture:!0}),dt(document,"touchmove",o,{passive:!1,capture:!0}),dt(document,"touchend",i,{passive:!1,capture:!0}),dt(document,"focus",a,!0),dt(window,"scroll",v));return()=>{R(),h(),window.scrollTo(w,x)}}function Ge(t,n,e){let o=t.style[n];return t.style[n]=e,()=>{t.style[n]=o}}function dt(t,n,e,o){return t.addEventListener(n,e,o),()=>{t.removeEventListener(n,e,o)}}function Xt(t){let n=document.scrollingElement||document.documentElement;for(;t&&t!==n;){let e=te(t);if(e!==document.documentElement&&e!==document.body&&e!==t){let o=e.getBoundingClientRect().top,i=t.getBoundingClientRect().top,a=t.getBoundingClientRect().bottom;const v=e.getBoundingClientRect().bottom+Ve;a>v&&(e.scrollTop+=i-o)}t=e.parentElement}}function At(t){return t instanceof HTMLInputElement&&!qe.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}function Je(t,n){typeof t=="function"?t(n):t!=null&&(t.current=n)}function Qe(...t){return n=>t.forEach(e=>Je(e,n))}function ee(...t){return bt.useCallback(Qe(...t),t)}const ne=new WeakMap;function _(t,n,e=!1){if(!t||!(t instanceof HTMLElement))return;let o={};Object.entries(n).forEach(([i,a])=>{if(i.startsWith("--")){t.style.setProperty(i,a);return}o[i]=t.style[i],t.style[i]=a}),!e&&ne.set(t,o)}function Ze(t,n){if(!t||!(t instanceof HTMLElement))return;let e=ne.get(t);e&&(t.style[n]=e[n])}const $=t=>{switch(t){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return t}};function vt(t,n){if(!t)return null;const e=window.getComputedStyle(t),o=e.transform||e.webkitTransform||e.mozTransform;let i=o.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[$(n)?13:12]):(i=o.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(", ")[$(n)?5:4]):null)}function tn(t){return 8*(Math.log(t+1)-2)}function $t(t,n){if(!t)return()=>{};const e=t.style.cssText;return Object.assign(t.style,n),()=>{t.style.cssText=e}}function en(...t){return(...n)=>{for(const e of t)typeof e=="function"&&e(...n)}}const C={DURATION:.5,EASE:[.32,.72,0,1]},re=.4,nn=.25,rn=100,ae=8,et=16,Mt=26,_t="vaul-dragging";function oe(t){const n=r.useRef(t);return r.useEffect(()=>{n.current=t}),r.useMemo(()=>(...e)=>n.current==null?void 0:n.current.call(n,...e),[])}function an({defaultProp:t,onChange:n}){const e=r.useState(t),[o]=e,i=r.useRef(o),a=oe(n);return r.useEffect(()=>{i.current!==o&&(a(o),i.current=o)},[o,i,a]),e}function ie({prop:t,defaultProp:n,onChange:e=()=>{}}){const[o,i]=an({defaultProp:n,onChange:e}),a=t!==void 0,v=a?t:o,w=oe(e),x=r.useCallback(R=>{if(a){const f=typeof R=="function"?R(t):R;f!==t&&w(f)}else i(R)},[a,t,i,w]);return[v,x]}function on({activeSnapPointProp:t,setActiveSnapPointProp:n,snapPoints:e,drawerRef:o,overlayRef:i,fadeFromIndex:a,onSnapPointChange:v,direction:w="bottom",container:x,snapToSequentialPoint:R}){const[h,f]=ie({prop:t,defaultProp:e==null?void 0:e[0],onChange:n}),[m,L]=r.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);r.useEffect(()=>{function u(){L({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[]);const k=r.useMemo(()=>h===(e==null?void 0:e[e.length-1])||null,[e,h]),E=r.useMemo(()=>{var u;return(u=e==null?void 0:e.findIndex(b=>b===h))!=null?u:null},[e,h]),F=e&&e.length>0&&(a||a===0)&&!Number.isNaN(a)&&e[a]===h||!e,p=r.useMemo(()=>{const u=x?{width:x.getBoundingClientRect().width,height:x.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var b;return(b=e==null?void 0:e.map(y=>{const P=typeof y=="string";let N=0;if(P&&(N=parseInt(y,10)),$(w)){const l=P?N:m?y*u.height:0;return m?w==="bottom"?u.height-l:-u.height+l:l}const W=P?N:m?y*u.width:0;return m?w==="right"?u.width-W:-u.width+W:W}))!=null?b:[]},[e,m,x]),M=r.useMemo(()=>E!==null?p==null?void 0:p[E]:null,[p,E]),A=r.useCallback(u=>{var b;const y=(b=p==null?void 0:p.findIndex(P=>P===u))!=null?b:null;v(y),_(o.current,{transition:`transform ${C.DURATION}s cubic-bezier(${C.EASE.join(",")})`,transform:$(w)?`translate3d(0, ${u}px, 0)`:`translate3d(${u}px, 0, 0)`}),p&&y!==p.length-1&&a!==void 0&&y!==a&&y<a?_(i.current,{transition:`opacity ${C.DURATION}s cubic-bezier(${C.EASE.join(",")})`,opacity:"0"}):_(i.current,{transition:`opacity ${C.DURATION}s cubic-bezier(${C.EASE.join(",")})`,opacity:"1"}),f(e==null?void 0:e[Math.max(y,0)])},[o.current,e,p,a,i,f]);r.useEffect(()=>{if(h||t){var u;const b=(u=e==null?void 0:e.findIndex(y=>y===t||y===h))!=null?u:-1;p&&b!==-1&&typeof p[b]=="number"&&A(p[b])}},[h,t,e,p,A]);function c({draggedDistance:u,closeDrawer:b,velocity:y,dismissible:P}){if(a===void 0)return;const N=w==="bottom"||w==="right"?(M??0)-u:(M??0)+u,W=E===a-1,l=E===0,U=u>0;if(W&&_(i.current,{transition:`opacity ${C.DURATION}s cubic-bezier(${C.EASE.join(",")})`}),!R&&y>2&&!U){P?b():A(p[0]);return}if(!R&&y>2&&U&&p&&e){A(p[e.length-1]);return}const B=p==null?void 0:p.reduce((I,X)=>typeof I!="number"||typeof X!="number"?I:Math.abs(X-N)<Math.abs(I-N)?X:I),z=$(w)?window.innerHeight:window.innerWidth;if(y>re&&Math.abs(u)<z*.4){const I=U?1:-1;if(I>0&&k&&e){A(p[e.length-1]);return}if(l&&I<0&&P&&b(),E===null)return;A(p[E+I]);return}A(B)}function Y({draggedDistance:u}){if(M===null)return;const b=w==="bottom"||w==="right"?M-u:M+u;(w==="bottom"||w==="right")&&b<p[p.length-1]||(w==="top"||w==="left")&&b>p[p.length-1]||_(o.current,{transform:$(w)?`translate3d(0, ${b}px, 0)`:`translate3d(${b}px, 0, 0)`})}function Z(u,b){if(!e||typeof E!="number"||!p||a===void 0)return null;const y=E===a-1;if(E>=a&&b)return 0;if(y&&!b)return 1;if(!F&&!y)return null;const N=y?E+1:E-1,W=y?p[N]-p[N-1]:p[N+1]-p[N],l=u/Math.abs(W);return y?1-l:l}return{isLastSnapPoint:k,activeSnapPoint:h,shouldFade:F,getPercentageDragged:Z,setActiveSnapPoint:f,activeSnapPointIndex:E,onRelease:c,onDrag:Y,snapPointsOffset:p}}const sn=()=>()=>{};function ln(){const{direction:t,isOpen:n,shouldScaleBackground:e,setBackgroundColorOnScale:o,noBodyStyles:i}=mt(),a=r.useRef(null),v=bt.useMemo(()=>document.body.style.backgroundColor,[]);function w(){return(window.innerWidth-Mt)/window.innerWidth}r.useEffect(()=>{if(n&&e){a.current&&clearTimeout(a.current);const x=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!x)return;en(o&&!i?$t(document.body,{background:"black"}):sn,$t(x,{transformOrigin:$(t)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${C.DURATION}s`,transitionTimingFunction:`cubic-bezier(${C.EASE.join(",")})`}));const R=$t(x,{borderRadius:`${ae}px`,overflow:"hidden",...$(t)?{transform:`scale(${w()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${w()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{R(),a.current=window.setTimeout(()=>{v?document.body.style.background=v:document.body.style.removeProperty("background")},C.DURATION*1e3)}}},[n,e,v])}let ft=null;function un({isOpen:t,modal:n,nested:e,hasBeenOpened:o,preventScrollRestoration:i,noBodyStyles:a}){const[v,w]=r.useState(()=>typeof window<"u"?window.location.href:""),x=r.useRef(0),R=r.useCallback(()=>{if(Vt()&&ft===null&&t&&!a){ft={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:f,innerHeight:m}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-x.current}px`,left:`${-f}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const L=m-window.innerHeight;L&&x.current>=m&&(document.body.style.top=`${-(x.current+L)}px`)}),300)}},[t]),h=r.useCallback(()=>{if(Vt()&&ft!==null&&!a){const f=-parseInt(document.body.style.top,10),m=-parseInt(document.body.style.left,10);Object.assign(document.body.style,ft),window.requestAnimationFrame(()=>{if(i&&v!==window.location.href){w(window.location.href);return}window.scrollTo(m,f)}),ft=null}},[v]);return r.useEffect(()=>{function f(){x.current=window.scrollY}return f(),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}},[]),r.useEffect(()=>{if(n)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||h()}},[n,h]),r.useEffect(()=>{e||!o||(t?(!window.matchMedia("(display-mode: standalone)").matches&&R(),n||window.setTimeout(()=>{h()},500)):h())},[t,o,v,n,e,R,h]),{restorePositionSetting:h}}function cn({open:t,onOpenChange:n,children:e,onDrag:o,onRelease:i,snapPoints:a,shouldScaleBackground:v=!1,setBackgroundColorOnScale:w=!0,closeThreshold:x=nn,scrollLockTimeout:R=rn,dismissible:h=!0,handleOnly:f=!1,fadeFromIndex:m=a&&a.length-1,activeSnapPoint:L,setActiveSnapPoint:k,fixed:E,modal:F=!0,onClose:p,nested:M,noBodyStyles:A=!1,direction:c="bottom",defaultOpen:Y=!1,disablePreventScroll:Z=!0,snapToSequentialPoint:u=!1,preventScrollRestoration:b=!1,repositionInputs:y=!0,onAnimationEnd:P,container:N,autoFocus:W=!1}){var l,U;const[B=!1,z]=ie({defaultProp:Y,prop:t,onChange:s=>{n==null||n(s),!s&&!M&&Te(),setTimeout(()=>{P==null||P(s)},C.DURATION*1e3),s&&!F&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),s||(document.body.style.pointerEvents="auto")}}),[I,X]=r.useState(!1),[K,it]=r.useState(!1),[ve,Pt]=r.useState(!1),nt=r.useRef(null),pt=r.useRef(null),Dt=r.useRef(null),xt=r.useRef(null),st=r.useRef(null),lt=r.useRef(!1),St=r.useRef(null),Tt=r.useRef(0),rt=r.useRef(!1),Bt=r.useRef(!Y),Ht=r.useRef(0),d=r.useRef(null),kt=r.useRef(((l=d.current)==null?void 0:l.getBoundingClientRect().height)||0),jt=r.useRef(((U=d.current)==null?void 0:U.getBoundingClientRect().width)||0),Rt=r.useRef(0),ye=r.useCallback(s=>{a&&s===ut.length-1&&(pt.current=new Date)},[]),{activeSnapPoint:be,activeSnapPointIndex:at,setActiveSnapPoint:Lt,onRelease:De,snapPointsOffset:ut,onDrag:xe,shouldFade:Ft,getPercentageDragged:Se}=on({snapPoints:a,activeSnapPointProp:L,setActiveSnapPointProp:k,drawerRef:d,fadeFromIndex:m,overlayRef:nt,onSnapPointChange:ye,direction:c,container:N,snapToSequentialPoint:u});Xe({isDisabled:!B||K||!F||ve||!I||!y||!Z});const{restorePositionSetting:Te}=un({isOpen:B,modal:F,nested:M??!1,hasBeenOpened:I,preventScrollRestoration:b,noBodyStyles:A});function wt(){return(window.innerWidth-Mt)/window.innerWidth}function Re(s){var D,S;!h&&!a||d.current&&!d.current.contains(s.target)||(kt.current=((D=d.current)==null?void 0:D.getBoundingClientRect().height)||0,jt.current=((S=d.current)==null?void 0:S.getBoundingClientRect().width)||0,it(!0),Dt.current=new Date,Zt()&&window.addEventListener("touchend",()=>lt.current=!1,{once:!0}),s.target.setPointerCapture(s.pointerId),Tt.current=$(c)?s.pageY:s.pageX)}function Ut(s,D){var S;let g=s;const O=(S=window.getSelection())==null?void 0:S.toString(),j=d.current?vt(d.current,c):null,H=new Date;if(g.tagName==="SELECT"||g.hasAttribute("data-vaul-no-drag")||g.closest("[data-vaul-no-drag]"))return!1;if(c==="right"||c==="left")return!0;if(pt.current&&H.getTime()-pt.current.getTime()<500)return!1;if(j!==null&&(c==="bottom"?j>0:j<0))return!0;if(O&&O.length>0)return!1;if(st.current&&H.getTime()-st.current.getTime()<R&&j===0||D)return st.current=H,!1;for(;g;){if(g.scrollHeight>g.clientHeight){if(g.scrollTop!==0)return st.current=new Date,!1;if(g.getAttribute("role")==="dialog")return!0}g=g.parentNode}return!0}function Ee(s){if(d.current&&K){const D=c==="bottom"||c==="right"?1:-1,S=(Tt.current-($(c)?s.pageY:s.pageX))*D,g=S>0,O=a&&!h&&!g;if(O&&at===0)return;const j=Math.abs(S),H=document.querySelector("[data-vaul-drawer-wrapper]"),G=c==="bottom"||c==="top"?kt.current:jt.current;let V=j/G;const tt=Se(j,g);if(tt!==null&&(V=tt),O&&V>=1||!lt.current&&!Ut(s.target,g))return;if(d.current.classList.add(_t),lt.current=!0,_(d.current,{transition:"none"}),_(nt.current,{transition:"none"}),a&&xe({draggedDistance:S}),g&&!a){const q=tn(S),ht=Math.min(q*-1,0)*D;_(d.current,{transform:$(c)?`translate3d(0, ${ht}px, 0)`:`translate3d(${ht}px, 0, 0)`});return}const J=1-V;if((Ft||m&&at===m-1)&&(o==null||o(s,V),_(nt.current,{opacity:`${J}`,transition:"none"},!0)),H&&nt.current&&v){const q=Math.min(wt()+V*(1-wt()),1),ht=8-V*8,zt=Math.max(0,14-V*14);_(H,{borderRadius:`${ht}px`,transform:$(c)?`scale(${q}) translate3d(0, ${zt}px, 0)`:`scale(${q}) translate3d(${zt}px, 0, 0)`,transition:"none"},!0)}if(!a){const q=j*D;_(d.current,{transform:$(c)?`translate3d(0, ${q}px, 0)`:`translate3d(${q}px, 0, 0)`})}}}r.useEffect(()=>{window.requestAnimationFrame(()=>{Bt.current=!0})},[]),r.useEffect(()=>{var s;function D(){if(!d.current||!y)return;const S=document.activeElement;if(At(S)||rt.current){var g;const O=((g=window.visualViewport)==null?void 0:g.height)||0,j=window.innerHeight;let H=j-O;const G=d.current.getBoundingClientRect().height||0,V=G>j*.8;Rt.current||(Rt.current=G);const tt=d.current.getBoundingClientRect().top;if(Math.abs(Ht.current-H)>60&&(rt.current=!rt.current),a&&a.length>0&&ut&&at){const J=ut[at]||0;H+=J}if(Ht.current=H,G>O||rt.current){const J=d.current.getBoundingClientRect().height;let q=J;J>O&&(q=O-(V?tt:Mt)),E?d.current.style.height=`${J-Math.max(H,0)}px`:d.current.style.height=`${Math.max(q,O-tt)}px`}else Fe()||(d.current.style.height=`${Rt.current}px`);a&&a.length>0&&!rt.current?d.current.style.bottom="0px":d.current.style.bottom=`${Math.max(H,0)}px`}}return(s=window.visualViewport)==null||s.addEventListener("resize",D),()=>{var S;return(S=window.visualViewport)==null?void 0:S.removeEventListener("resize",D)}},[at,a,ut]);function ct(s){Ce(),p==null||p(),s||z(!1),setTimeout(()=>{a&&Lt(a[0])},C.DURATION*1e3)}function Wt(){if(!d.current)return;const s=document.querySelector("[data-vaul-drawer-wrapper]"),D=vt(d.current,c);_(d.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${C.DURATION}s cubic-bezier(${C.EASE.join(",")})`}),_(nt.current,{transition:`opacity ${C.DURATION}s cubic-bezier(${C.EASE.join(",")})`,opacity:"1"}),v&&D&&D>0&&B&&_(s,{borderRadius:`${ae}px`,overflow:"hidden",...$(c)?{transform:`scale(${wt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${wt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${C.DURATION}s`,transitionTimingFunction:`cubic-bezier(${C.EASE.join(",")})`},!0)}function Ce(){!K||!d.current||(d.current.classList.remove(_t),lt.current=!1,it(!1),xt.current=new Date)}function Oe(s){if(!K||!d.current)return;d.current.classList.remove(_t),lt.current=!1,it(!1),xt.current=new Date;const D=vt(d.current,c);if(!s||!Ut(s.target,!1)||!D||Number.isNaN(D)||Dt.current===null)return;const S=xt.current.getTime()-Dt.current.getTime(),g=Tt.current-($(c)?s.pageY:s.pageX),O=Math.abs(g)/S;if(O>.05&&(Pt(!0),setTimeout(()=>{Pt(!1)},200)),a){De({draggedDistance:g*(c==="bottom"||c==="right"?1:-1),closeDrawer:ct,velocity:O,dismissible:h}),i==null||i(s,!0);return}if(c==="bottom"||c==="right"?g>0:g<0){Wt(),i==null||i(s,!0);return}if(O>re){ct(),i==null||i(s,!1);return}var j;const H=Math.min((j=d.current.getBoundingClientRect().height)!=null?j:0,window.innerHeight);var G;const V=Math.min((G=d.current.getBoundingClientRect().width)!=null?G:0,window.innerWidth),tt=c==="left"||c==="right";if(Math.abs(D)>=(tt?V:H)*x){ct(),i==null||i(s,!1);return}i==null||i(s,!0),Wt()}r.useEffect(()=>(B&&(_(document.documentElement,{scrollBehavior:"auto"}),pt.current=new Date),()=>{Ze(document.documentElement,"scrollBehavior")}),[B]);function $e(s){const D=s?(window.innerWidth-et)/window.innerWidth:1,S=s?-et:0;St.current&&window.clearTimeout(St.current),_(d.current,{transition:`transform ${C.DURATION}s cubic-bezier(${C.EASE.join(",")})`,transform:$(c)?`scale(${D}) translate3d(0, ${S}px, 0)`:`scale(${D}) translate3d(${S}px, 0, 0)`}),!s&&d.current&&(St.current=setTimeout(()=>{const g=vt(d.current,c);_(d.current,{transition:"none",transform:$(c)?`translate3d(0, ${g}px, 0)`:`translate3d(${g}px, 0, 0)`})},500))}function _e(s,D){if(D<0)return;const S=(window.innerWidth-et)/window.innerWidth,g=S+D*(1-S),O=-et+D*et;_(d.current,{transform:$(c)?`scale(${g}) translate3d(0, ${O}px, 0)`:`scale(${g}) translate3d(${O}px, 0, 0)`,transition:"none"})}function Ae(s,D){const S=$(c)?window.innerHeight:window.innerWidth,g=D?(S-et)/S:1,O=D?-et:0;D&&_(d.current,{transition:`transform ${C.DURATION}s cubic-bezier(${C.EASE.join(",")})`,transform:$(c)?`scale(${g}) translate3d(0, ${O}px, 0)`:`scale(${g}) translate3d(${O}px, 0, 0)`})}return r.useEffect(()=>{F||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[F]),r.createElement(Me,{defaultOpen:Y,onOpenChange:s=>{!h&&!s||(s?X(!0):ct(!0),z(s))},open:B},r.createElement(Qt.Provider,{value:{activeSnapPoint:be,snapPoints:a,setActiveSnapPoint:Lt,drawerRef:d,overlayRef:nt,onOpenChange:n,onPress:Re,onRelease:Oe,onDrag:Ee,dismissible:h,shouldAnimate:Bt,handleOnly:f,isOpen:B,isDragging:K,shouldFade:Ft,closeDrawer:ct,onNestedDrag:_e,onNestedOpenChange:$e,onNestedRelease:Ae,keyboardIsOpen:rt,modal:F,snapPointsOffset:ut,activeSnapPointIndex:at,direction:c,shouldScaleBackground:v,setBackgroundColorOnScale:w,noBodyStyles:A,container:N,autoFocus:W}},e))}const se=r.forwardRef(function({...t},n){const{overlayRef:e,snapPoints:o,onRelease:i,shouldFade:a,isOpen:v,modal:w,shouldAnimate:x}=mt(),R=ee(n,e),h=o&&o.length>0;if(!w)return null;const f=r.useCallback(m=>i(m),[i]);return r.createElement(je,{onMouseUp:f,ref:R,"data-vaul-overlay":"","data-vaul-snap-points":v&&h?"true":"false","data-vaul-snap-points-overlay":v&&a?"true":"false","data-vaul-animate":x!=null&&x.current?"true":"false",...t})});se.displayName="Drawer.Overlay";const le=r.forwardRef(function({onPointerDownOutside:t,style:n,onOpenAutoFocus:e,...o},i){const{drawerRef:a,onPress:v,onRelease:w,onDrag:x,keyboardIsOpen:R,snapPointsOffset:h,activeSnapPointIndex:f,modal:m,isOpen:L,direction:k,snapPoints:E,container:F,handleOnly:p,shouldAnimate:M,autoFocus:A}=mt(),[c,Y]=r.useState(!1),Z=ee(i,a),u=r.useRef(null),b=r.useRef(null),y=r.useRef(!1),P=E&&E.length>0;ln();const N=(l,U,B=0)=>{if(y.current)return!0;const z=Math.abs(l.y),I=Math.abs(l.x),X=I>z,K=["bottom","right"].includes(U)?1:-1;if(U==="left"||U==="right"){if(!(l.x*K<0)&&I>=0&&I<=B)return X}else if(!(l.y*K<0)&&z>=0&&z<=B)return!X;return y.current=!0,!0};r.useEffect(()=>{P&&window.requestAnimationFrame(()=>{Y(!0)})},[]);function W(l){u.current=null,y.current=!1,w(l)}return r.createElement(He,{"data-vaul-drawer-direction":k,"data-vaul-drawer":"","data-vaul-delayed-snap-points":c?"true":"false","data-vaul-snap-points":L&&P?"true":"false","data-vaul-custom-container":F?"true":"false","data-vaul-animate":M!=null&&M.current?"true":"false",...o,ref:Z,style:h&&h.length>0?{"--snap-point-height":`${h[f??0]}px`,...n}:n,onPointerDown:l=>{p||(o.onPointerDown==null||o.onPointerDown.call(o,l),u.current={x:l.pageX,y:l.pageY},v(l))},onOpenAutoFocus:l=>{e==null||e(l),A||l.preventDefault()},onPointerDownOutside:l=>{if(t==null||t(l),!m||l.defaultPrevented){l.preventDefault();return}R.current&&(R.current=!1)},onFocusOutside:l=>{if(!m){l.preventDefault();return}},onPointerMove:l=>{if(b.current=l,p||(o.onPointerMove==null||o.onPointerMove.call(o,l),!u.current))return;const U=l.pageY-u.current.y,B=l.pageX-u.current.x,z=l.pointerType==="touch"?10:2;N({x:B,y:U},k,z)?x(l):(Math.abs(B)>z||Math.abs(U)>z)&&(u.current=null)},onPointerUp:l=>{o.onPointerUp==null||o.onPointerUp.call(o,l),u.current=null,y.current=!1,w(l)},onPointerOut:l=>{o.onPointerOut==null||o.onPointerOut.call(o,l),W(b.current)},onContextMenu:l=>{o.onContextMenu==null||o.onContextMenu.call(o,l),b.current&&W(b.current)}})});le.displayName="Drawer.Content";const dn=250,fn=120,mn=r.forwardRef(function({preventCycle:t=!1,children:n,...e},o){const{closeDrawer:i,isDragging:a,snapPoints:v,activeSnapPoint:w,setActiveSnapPoint:x,dismissible:R,handleOnly:h,isOpen:f,onPress:m,onDrag:L}=mt(),k=r.useRef(null),E=r.useRef(!1);function F(){if(E.current){A();return}window.setTimeout(()=>{p()},fn)}function p(){if(a||t||E.current){A();return}if(A(),!v||v.length===0){R||i();return}if(w===v[v.length-1]&&R){i();return}const Y=v.findIndex(u=>u===w);if(Y===-1)return;const Z=v[Y+1];x(Z)}function M(){k.current=window.setTimeout(()=>{E.current=!0},dn)}function A(){k.current&&window.clearTimeout(k.current),E.current=!1}return r.createElement("div",{onClick:F,onPointerCancel:A,onPointerDown:c=>{h&&m(c),M()},onPointerMove:c=>{h&&L(c)},ref:o,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...e},r.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},n))});mn.displayName="Drawer.Handle";function pn(t){const n=mt(),{container:e=n.container,...o}=t;return r.createElement(ke,{container:e,...o})}const Q={Root:cn,Content:le,Overlay:se,Trigger:Ne,Portal:pn,Close:Be,Title:Ie,Description:Pe};function It({...t}){return T.jsx(Q.Root,{"data-slot":"drawer",...t})}function ue({...t}){return T.jsx(Q.Trigger,{"data-slot":"drawer-trigger",...t})}function ce({...t}){return T.jsx(Q.Portal,{"data-slot":"drawer-portal",...t})}function de({...t}){return T.jsx(Q.Close,{"data-slot":"drawer-close",...t})}function fe({className:t,...n}){return T.jsx(Q.Overlay,{"data-slot":"drawer-overlay",className:ot("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...n})}function me({className:t,children:n,...e}){return T.jsxs(ce,{"data-slot":"drawer-portal",children:[T.jsx(fe,{}),T.jsxs(Q.Content,{"data-slot":"drawer-content",className:ot("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",t),...e,children:[T.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),n]})]})}function pe({className:t,...n}){return T.jsx("div",{"data-slot":"drawer-header",className:ot("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",t),...n})}function we({className:t,...n}){return T.jsx("div",{"data-slot":"drawer-footer",className:ot("mt-auto flex flex-col gap-2 p-4",t),...n})}function he({className:t,...n}){return T.jsx(Q.Title,{"data-slot":"drawer-title",className:ot("text-foreground font-semibold",t),...n})}function ge({className:t,...n}){return T.jsx(Q.Description,{"data-slot":"drawer-description",className:ot("text-muted-foreground text-sm",t),...n})}It.__docgenInfo={description:"",methods:[],displayName:"Drawer"};ce.__docgenInfo={description:"",methods:[],displayName:"DrawerPortal"};fe.__docgenInfo={description:"",methods:[],displayName:"DrawerOverlay"};ue.__docgenInfo={description:"",methods:[],displayName:"DrawerTrigger"};de.__docgenInfo={description:"",methods:[],displayName:"DrawerClose"};me.__docgenInfo={description:"",methods:[],displayName:"DrawerContent"};pe.__docgenInfo={description:"",methods:[],displayName:"DrawerHeader"};we.__docgenInfo={description:"",methods:[],displayName:"DrawerFooter"};he.__docgenInfo={description:"",methods:[],displayName:"DrawerTitle"};ge.__docgenInfo={description:"",methods:[],displayName:"DrawerDescription"};const Bn={title:"Shadcn/UI/Drawer",component:It},yt={render:()=>T.jsxs(It,{children:[T.jsx(ue,{asChild:!0,children:T.jsx(Et,{children:"Open Drawer"})}),T.jsxs(me,{children:[T.jsxs(pe,{children:[T.jsx(he,{children:"Edit profile"}),T.jsx(ge,{children:"Make changes to your profile here. Click save when you're done."})]}),T.jsxs("div",{className:"px-4 pb-4 text-sm text-muted-foreground",children:["This is a bottom sheet drawer powered by ",T.jsx("code",{children:"vaul"})," with shadcn styles."]}),T.jsxs(we,{children:[T.jsx(Et,{type:"button",children:"Save changes"}),T.jsx(de,{asChild:!0,children:T.jsx(Et,{variant:"outline",children:"Cancel"})})]})]})]})};var Kt,Gt,Jt;yt.parameters={...yt.parameters,docs:{...(Kt=yt.parameters)==null?void 0:Kt.docs,source:{originalSource:`{
4
4
  render: () => <Drawer>
@@ -1,4 +1,4 @@
1
- import{j as o}from"./jsx-runtime-D_zvdyIk.js";import{D as m,a as M,b as w,c as p,d as e,g as c,f as n,h as r,e as u,i as D,j as d,k as l,l as h,m as x}from"./dropdown-menu-TfFll7G9.js";import{B as j}from"./button-BTWmFXop.js";import"./iframe-G-6sM9Mt.js";import"./preload-helper-Dp1pzeXC.js";import"./index-DW48STyt.js";import"./index-1v1lhNFD.js";import"./index-DvM9azdj.js";import"./index-CAwQR9Pv.js";import"./index-I343IfOC.js";import"./index-DqWzLCH-.js";import"./index-_crRFOM5.js";import"./index-CZaD3imo.js";import"./index-CLmN5G1a.js";import"./index-BDwnENHR.js";import"./index-ClNNG_ys.js";import"./index-7yNAGow7.js";import"./index-lH-AZpAn.js";import"./Combination-BT_gXe1L.js";import"./index-DhoByIgc.js";import"./index-CayhpKmv.js";import"./index-ev1RjzGv.js";import"./index-d_S6mtzU.js";import"./index-Bq6UNRVc.js";import"./index-CMmbDm5O.js";import"./utils-D-KgF5mV.js";import"./check-BgWXKGqi.js";import"./createLucideIcon-1ZwIAs_l.js";import"./circle-DVJTkDI7.js";import"./chevron-right-DpCIoMaJ.js";import"./index-CGrAONsN.js";const Y={title:"Shadcn/UI/DropdownMenu",component:m},t={render:()=>o.jsxs(m,{children:[o.jsx(M,{asChild:!0,children:o.jsx(j,{variant:"outline",children:"Open menu"})}),o.jsxs(w,{className:"w-56",children:[o.jsx(p,{children:"My Account"}),o.jsx(e,{}),o.jsxs(c,{children:[o.jsxs(n,{children:["Profile ",o.jsx(r,{children:"⇧⌘P"})]}),o.jsxs(n,{children:["Billing ",o.jsx(r,{children:"⌘B"})]}),o.jsxs(n,{children:["Settings ",o.jsx(r,{children:"⌘S"})]})]}),o.jsx(e,{}),o.jsx(u,{checked:!0,children:"Email notifications"}),o.jsx(u,{children:"SMS notifications"}),o.jsx(e,{}),o.jsx(p,{children:"Team"}),o.jsxs(D,{value:"a",children:[o.jsx(d,{value:"a",children:"Team A"}),o.jsx(d,{value:"b",children:"Team B"})]}),o.jsx(e,{}),o.jsxs(l,{children:[o.jsx(h,{children:"More"}),o.jsxs(x,{children:[o.jsx(n,{children:"Invite user"}),o.jsx(n,{children:"New project"})]})]}),o.jsx(e,{}),o.jsxs(n,{children:["Log out ",o.jsx(r,{children:"⇧⌘Q"})]})]})]})};var i,a,s;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`{
1
+ import{j as o}from"./jsx-runtime-D_zvdyIk.js";import{D as m,a as M,b as w,c as p,d as e,g as c,f as n,h as r,e as u,i as D,j as d,k as l,l as h,m as x}from"./dropdown-menu-BwL9gQwG.js";import{B as j}from"./button-BObfgcV1.js";import"./iframe-BWjPIle6.js";import"./preload-helper-Dp1pzeXC.js";import"./index-DW48STyt.js";import"./index-BcAKBHrX.js";import"./index-Pk2lGsul.js";import"./index-7XoYQV2z.js";import"./index-DWC9SV-P.js";import"./index-04C4iZwC.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./index-DE2OlfDP.js";import"./index-C9xvlw_B.js";import"./index-Dr2xmx-F.js";import"./index-BfKpUbCE.js";import"./index-DschQYGl.js";import"./Combination-CeVus13L.js";import"./index-BN5_W3Yi.js";import"./index-C6O7WofA.js";import"./index-DMk2qc2_.js";import"./index-Cce91yJQ.js";import"./index-CKwUGXmt.js";import"./index-Cw7p-pms.js";import"./utils-D-KgF5mV.js";import"./check-DyecuwP4.js";import"./createLucideIcon-CLBo0iA0.js";import"./circle-CyarsADt.js";import"./chevron-right-oMYqDJ_f.js";import"./index-CGrAONsN.js";const Y={title:"Shadcn/UI/DropdownMenu",component:m},t={render:()=>o.jsxs(m,{children:[o.jsx(M,{asChild:!0,children:o.jsx(j,{variant:"outline",children:"Open menu"})}),o.jsxs(w,{className:"w-56",children:[o.jsx(p,{children:"My Account"}),o.jsx(e,{}),o.jsxs(c,{children:[o.jsxs(n,{children:["Profile ",o.jsx(r,{children:"⇧⌘P"})]}),o.jsxs(n,{children:["Billing ",o.jsx(r,{children:"⌘B"})]}),o.jsxs(n,{children:["Settings ",o.jsx(r,{children:"⌘S"})]})]}),o.jsx(e,{}),o.jsx(u,{checked:!0,children:"Email notifications"}),o.jsx(u,{children:"SMS notifications"}),o.jsx(e,{}),o.jsx(p,{children:"Team"}),o.jsxs(D,{value:"a",children:[o.jsx(d,{value:"a",children:"Team A"}),o.jsx(d,{value:"b",children:"Team B"})]}),o.jsx(e,{}),o.jsxs(l,{children:[o.jsx(h,{children:"More"}),o.jsxs(x,{children:[o.jsx(n,{children:"Invite user"}),o.jsx(n,{children:"New project"})]})]}),o.jsx(e,{}),o.jsxs(n,{children:["Log out ",o.jsx(r,{children:"⇧⌘Q"})]})]})]})};var i,a,s;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`{
2
2
  render: () => <DropdownMenu>
3
3
  <DropdownMenuTrigger asChild>
4
4
  <Button variant="outline">Open menu</Button>
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{F as m}from"./FormBuilder-BGgeY8ik.js";import"./iframe-G-6sM9Mt.js";import"./preload-helper-Dp1pzeXC.js";import"./schemas-S_Tg7JYp.js";import"./utils-D-KgF5mV.js";import"./button-BTWmFXop.js";import"./index-1v1lhNFD.js";import"./index-CGrAONsN.js";import"./input-11YRd9gD.js";import"./textarea-Dw2vruMl.js";import"./select-DbLzULCJ.js";import"./index-_crRFOM5.js";import"./index-CZaD3imo.js";import"./index-BdQq_4o_.js";import"./index-DW48STyt.js";import"./index-BDwnENHR.js";import"./index-DvM9azdj.js";import"./index-ClNNG_ys.js";import"./index-7yNAGow7.js";import"./index-DqWzLCH-.js";import"./index-lH-AZpAn.js";import"./Combination-BT_gXe1L.js";import"./index-DhoByIgc.js";import"./index-I343IfOC.js";import"./index-CayhpKmv.js";import"./index-ev1RjzGv.js";import"./index-d_S6mtzU.js";import"./index-CAwQR9Pv.js";import"./index-HghBIZeg.js";import"./index-DNAxNqEO.js";import"./chevron-down-BqLjUn1_.js";import"./createLucideIcon-1ZwIAs_l.js";import"./check-BgWXKGqi.js";import"./checkbox-QlugAqJY.js";import"./index-Bq6UNRVc.js";import"./radio-group-iPL-8jvw.js";import"./index-CMmbDm5O.js";import"./circle-DVJTkDI7.js";import"./label-C5vJTTwH.js";import"./card-BJpPOzP8.js";import"./Autocomplete-DngjqsCM.js";import"./popover-DW1K4QCO.js";import"./command-BERL33lL.js";import"./index-CzJf-yyP.js";import"./dialog-DM9YJ1JD.js";import"./x-DG9mLFAg.js";import"./trash-2-Bt5LMclM.js";import"./grip-vertical-Buja1rv9.js";import"./SectionBuilder-Bav4WrnT.js";import"./separator-DoUX1TNx.js";const or={title:"Kit/Builder/Form",component:m,parameters:{controls:{expanded:!0},backgrounds:{disable:!0}}},r={name:"Basic usage",args:{sections:[{title:"User Info",description:"A minimal configuration using grid layout",variant:"card",layout:"grid",grid:{cols:1,mdCols:2,gap:"gap-4"},fields:[{name:"firstName",label:"First name",type:"text",required:!0},{name:"lastName",label:"Last name",type:"text",required:!0},{name:"email",label:"Email",type:"email",required:!0},{name:"newsletter",label:"Subscribe to newsletter",type:"checkbox",defaultValue:!1,gridCols:2}]}],onSubmit:t=>{console.log("Submit (basic):",t)},showActions:!0},render:t=>e.jsx("div",{className:"max-w-3xl mx-auto p-6",children:e.jsx(m,{...t})})};var i,o,a;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`{
1
+ import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{F as m}from"./FormBuilder-C0S7C69Q.js";import"./iframe-BWjPIle6.js";import"./preload-helper-Dp1pzeXC.js";import"./schemas-CaLvKjsI.js";import"./utils-D-KgF5mV.js";import"./button-BObfgcV1.js";import"./index-BcAKBHrX.js";import"./index-CGrAONsN.js";import"./input-11YRd9gD.js";import"./textarea-Dw2vruMl.js";import"./select-gtXRB92c.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./index-BdQq_4o_.js";import"./index-DW48STyt.js";import"./index-C9xvlw_B.js";import"./index-Pk2lGsul.js";import"./index-Dr2xmx-F.js";import"./index-BfKpUbCE.js";import"./index-04C4iZwC.js";import"./index-DschQYGl.js";import"./Combination-CeVus13L.js";import"./index-BN5_W3Yi.js";import"./index-DWC9SV-P.js";import"./index-C6O7WofA.js";import"./index-DMk2qc2_.js";import"./index-Cce91yJQ.js";import"./index-7XoYQV2z.js";import"./index-Dqw7miiX.js";import"./index-URSssr5a.js";import"./chevron-down-Bp7zbUB0.js";import"./createLucideIcon-CLBo0iA0.js";import"./check-DyecuwP4.js";import"./checkbox-D5BmNJeL.js";import"./index-CKwUGXmt.js";import"./radio-group-CvN0LQZp.js";import"./index-Cw7p-pms.js";import"./circle-CyarsADt.js";import"./label-CwntpYJ0.js";import"./card-BJpPOzP8.js";import"./Autocomplete-B4gV705L.js";import"./popover-ClqrrvjL.js";import"./command-DCnXmNmT.js";import"./index-u70nzfOV.js";import"./dialog-DL0QBIbC.js";import"./x-n8sFtlI2.js";import"./trash-2-D55eseMQ.js";import"./grip-vertical-CM0GDwvq.js";import"./SectionBuilder-Df_lRZkj.js";import"./separator-CxCWfpZX.js";const or={title:"Kit/Builder/Form",component:m,parameters:{controls:{expanded:!0},backgrounds:{disable:!0}}},r={name:"Basic usage",args:{sections:[{title:"User Info",description:"A minimal configuration using grid layout",variant:"card",layout:"grid",grid:{cols:1,mdCols:2,gap:"gap-4"},fields:[{name:"firstName",label:"First name",type:"text",required:!0},{name:"lastName",label:"Last name",type:"text",required:!0},{name:"email",label:"Email",type:"email",required:!0},{name:"newsletter",label:"Subscribe to newsletter",type:"checkbox",defaultValue:!1,gridCols:2}]}],onSubmit:t=>{console.log("Submit (basic):",t)},showActions:!0},render:t=>e.jsx("div",{className:"max-w-3xl mx-auto p-6",children:e.jsx(m,{...t})})};var i,o,a;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`{
2
2
  name: 'Basic usage',
3
3
  args: {
4
4
  sections: [{
@@ -1,4 +1,4 @@
1
- import{j as n}from"./jsx-runtime-D_zvdyIk.js";import{F as f}from"./FormBuilder-BGgeY8ik.js";import{c as o,a as e,b as x}from"./section-factories-CC6eFfbk.js";import{c as a,a as r}from"./dependencies-ctrV69dx.js";import{a as m,b as c}from"./schemas-S_Tg7JYp.js";import"./iframe-G-6sM9Mt.js";import"./preload-helper-Dp1pzeXC.js";import"./utils-D-KgF5mV.js";import"./button-BTWmFXop.js";import"./index-1v1lhNFD.js";import"./index-CGrAONsN.js";import"./input-11YRd9gD.js";import"./textarea-Dw2vruMl.js";import"./select-DbLzULCJ.js";import"./index-_crRFOM5.js";import"./index-CZaD3imo.js";import"./index-BdQq_4o_.js";import"./index-DW48STyt.js";import"./index-BDwnENHR.js";import"./index-DvM9azdj.js";import"./index-ClNNG_ys.js";import"./index-7yNAGow7.js";import"./index-DqWzLCH-.js";import"./index-lH-AZpAn.js";import"./Combination-BT_gXe1L.js";import"./index-DhoByIgc.js";import"./index-I343IfOC.js";import"./index-CayhpKmv.js";import"./index-ev1RjzGv.js";import"./index-d_S6mtzU.js";import"./index-CAwQR9Pv.js";import"./index-HghBIZeg.js";import"./index-DNAxNqEO.js";import"./chevron-down-BqLjUn1_.js";import"./createLucideIcon-1ZwIAs_l.js";import"./check-BgWXKGqi.js";import"./checkbox-QlugAqJY.js";import"./index-Bq6UNRVc.js";import"./radio-group-iPL-8jvw.js";import"./index-CMmbDm5O.js";import"./circle-DVJTkDI7.js";import"./label-C5vJTTwH.js";import"./card-BJpPOzP8.js";import"./Autocomplete-DngjqsCM.js";import"./popover-DW1K4QCO.js";import"./command-BERL33lL.js";import"./index-CzJf-yyP.js";import"./dialog-DM9YJ1JD.js";import"./x-DG9mLFAg.js";import"./trash-2-Bt5LMclM.js";import"./grip-vertical-Buja1rv9.js";import"./SectionBuilder-Bav4WrnT.js";import"./separator-DoUX1TNx.js";const u={when:(t,l)=>c().refine(t,{message:"Condition not met"}).pipe(l),matchField:(t,l)=>d=>d[t]===d[l],minItems:(t,l)=>m(c()).min(t,l||`Must have at least ${t} items`),maxItems:(t,l)=>m(c()).max(t,l||`Must have at most ${t} items`)},xe={title:"Kit/Builder/Form",component:f,parameters:{controls:{expanded:!0},backgrounds:{disable:!0}}},s={name:"Complex example",render:()=>{const t=i=>{console.log("Complex form submitted:",i)},l=(i,v,b)=>{console.log(`Field ${i} changed to:`,v),console.log("All form values:",b)},d=[o.card("Personal Information",[e.text("firstName","First Name",{required:!0,placeholder:"Enter first name"}),e.text("lastName","Last Name",{required:!0,placeholder:"Enter last name"}),e.email("email","Email Address",{required:!0,placeholder:"Enter email address"}),e.date("dateOfBirth","Date of Birth",{required:!0}),e.select("gender","Gender",[{label:"Male",value:"male"},{label:"Female",value:"female"},{label:"Other",value:"other"},{label:"Prefer not to say",value:"not_specified"}],{placeholder:"Select gender"})]),o.card("Address Information",[e.object("address","Primary Address",[e.text("street","Street Address",{required:!0,placeholder:"123 Main St",gridCols:2}),e.text("city","City",{required:!0,placeholder:"New York"}),e.text("state","State/Province",{required:!0,placeholder:"NY"}),e.text("postalCode","Postal Code",{required:!0,placeholder:"10001"}),e.select("country","Country",[{label:"United States",value:"US"},{label:"Canada",value:"CA"},{label:"United Kingdom",value:"UK"},{label:"Australia",value:"AU"}],{required:!0,defaultValue:"US"})],{gridCols:2}),e.checkbox("sameAsShipping","Billing address same as shipping",{defaultValue:!0,gridCols:2}),e.object("billingAddress","Billing Address",[e.text("street","Street Address",{required:!0,placeholder:"123 Main St",gridCols:2}),e.text("city","City",{required:!0,placeholder:"New York"}),e.text("state","State/Province",{required:!0,placeholder:"NY"}),e.text("postalCode","Postal Code",{required:!0,placeholder:"10001"}),e.select("country","Country",[{label:"United States",value:"US"},{label:"Canada",value:"CA"},{label:"United Kingdom",value:"UK"},{label:"Australia",value:"AU"}],{required:!0,defaultValue:"US"})],{gridCols:2,dependencies:[a.showWhen("sameAsShipping",r.isFalse())]})]),o.card("Employment Information",[e.select("employmentStatus","Employment Status",[{label:"Employed",value:"employed"},{label:"Self-employed",value:"self_employed"},{label:"Unemployed",value:"unemployed"},{label:"Student",value:"student"},{label:"Retired",value:"retired"}],{required:!0,placeholder:"Select employment status"}),e.text("company","Company Name",{required:!0,placeholder:"Enter company name",dependencies:[a.showWhen("employmentStatus",r.equals("employed"))]}),e.text("jobTitle","Job Title",{required:!0,placeholder:"Enter job title",dependencies:[a.showWhen("employmentStatus",r.equals("employed"))]}),e.text("businessName","Business Name",{required:!0,placeholder:"Enter business name",dependencies:[a.showWhen("employmentStatus",r.equals("self_employed"))]}),e.text("businessType","Type of Business",{placeholder:"e.g., Consulting, Retail, etc.",dependencies:[a.showWhen("employmentStatus",r.equals("self_employed"))]}),e.text("school","School/University",{required:!0,placeholder:"Enter school name",dependencies:[a.showWhen("employmentStatus",r.equals("student"))]}),e.text("major","Major/Field of Study",{placeholder:"Enter your major",dependencies:[a.showWhen("employmentStatus",r.equals("student"))]}),e.number("annualIncome","Annual Income",{placeholder:"50000",validation:u.minItems(0,"Income must be positive"),dependencies:[a.showWhen("employmentStatus",i=>["employed","self_employed"].includes(i))]})]),o.card("Skills & Experience",[e.array("skills","Skills",[e.text("name","Skill Name",{required:!0,placeholder:"e.g., JavaScript, Project Management"}),e.select("level","Proficiency Level",[{label:"Beginner",value:"beginner"},{label:"Intermediate",value:"intermediate"},{label:"Advanced",value:"advanced"},{label:"Expert",value:"expert"}],{required:!0,placeholder:"Select level"}),e.number("yearsOfExperience","Years of Experience",{placeholder:"2",validation:u.minItems(0,"Years must be positive")})],{gridCols:2,defaultValue:[{name:"",level:"",yearsOfExperience:0}]})]),o.card("Professional References",[e.checkbox("hasReferences","I have professional references",{defaultValue:!1,gridCols:2}),e.array("references","References",[e.text("name","Full Name",{required:!0,placeholder:"John Doe"}),e.text("title","Job Title",{required:!0,placeholder:"Senior Manager"}),e.text("company","Company",{required:!0,placeholder:"ABC Corporation"}),e.email("email","Email",{required:!0,placeholder:"john.doe@company.com"}),e.text("phone","Phone",{validation:x.phone,placeholder:"+1 (555) 123-4567"}),e.select("relationship","Relationship",[{label:"Direct Supervisor",value:"supervisor"},{label:"Colleague",value:"colleague"},{label:"Client",value:"client"},{label:"Other",value:"other"}],{required:!0,placeholder:"Select relationship"})],{gridCols:2,defaultValue:[],dependencies:[a.showWhen("hasReferences",r.isTrue())]})]),o.card("Additional Information",[e.textarea("additionalInfo","Additional Comments",{placeholder:"Any additional information you'd like to share...",gridCols:2}),e.checkbox("agreeToTerms","I agree to the terms and conditions",{required:!0,gridCols:2}),e.checkbox("allowMarketing","I agree to receive marketing communications",{defaultValue:!1,gridCols:2})])];return n.jsxs("div",{className:"max-w-4xl mx-auto p-6",children:[n.jsxs("div",{className:"mb-8",children:[n.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Professional Profile"}),n.jsx("p",{className:"text-gray-600 mt-2",children:"Complete your professional profile with detailed information. This form demonstrates complex nested structures and field dependencies."})]}),n.jsx(f,{sections:d,onSubmit:t,onFieldChange:l,className:"space-y-8"})]})}};var p,h,y;s.parameters={...s.parameters,docs:{...(p=s.parameters)==null?void 0:p.docs,source:{originalSource:`{
1
+ import{j as n}from"./jsx-runtime-D_zvdyIk.js";import{F as f}from"./FormBuilder-C0S7C69Q.js";import{c as o,a as e,b as x}from"./section-factories-DKfKL-5s.js";import{c as a,a as r}from"./dependencies-ctrV69dx.js";import{a as m,b as c}from"./schemas-CaLvKjsI.js";import"./iframe-BWjPIle6.js";import"./preload-helper-Dp1pzeXC.js";import"./utils-D-KgF5mV.js";import"./button-BObfgcV1.js";import"./index-BcAKBHrX.js";import"./index-CGrAONsN.js";import"./input-11YRd9gD.js";import"./textarea-Dw2vruMl.js";import"./select-gtXRB92c.js";import"./index-C5eJ31Z3.js";import"./index-npvyVsxD.js";import"./index-BdQq_4o_.js";import"./index-DW48STyt.js";import"./index-C9xvlw_B.js";import"./index-Pk2lGsul.js";import"./index-Dr2xmx-F.js";import"./index-BfKpUbCE.js";import"./index-04C4iZwC.js";import"./index-DschQYGl.js";import"./Combination-CeVus13L.js";import"./index-BN5_W3Yi.js";import"./index-DWC9SV-P.js";import"./index-C6O7WofA.js";import"./index-DMk2qc2_.js";import"./index-Cce91yJQ.js";import"./index-7XoYQV2z.js";import"./index-Dqw7miiX.js";import"./index-URSssr5a.js";import"./chevron-down-Bp7zbUB0.js";import"./createLucideIcon-CLBo0iA0.js";import"./check-DyecuwP4.js";import"./checkbox-D5BmNJeL.js";import"./index-CKwUGXmt.js";import"./radio-group-CvN0LQZp.js";import"./index-Cw7p-pms.js";import"./circle-CyarsADt.js";import"./label-CwntpYJ0.js";import"./card-BJpPOzP8.js";import"./Autocomplete-B4gV705L.js";import"./popover-ClqrrvjL.js";import"./command-DCnXmNmT.js";import"./index-u70nzfOV.js";import"./dialog-DL0QBIbC.js";import"./x-n8sFtlI2.js";import"./trash-2-D55eseMQ.js";import"./grip-vertical-CM0GDwvq.js";import"./SectionBuilder-Df_lRZkj.js";import"./separator-CxCWfpZX.js";const u={when:(t,l)=>c().refine(t,{message:"Condition not met"}).pipe(l),matchField:(t,l)=>d=>d[t]===d[l],minItems:(t,l)=>m(c()).min(t,l||`Must have at least ${t} items`),maxItems:(t,l)=>m(c()).max(t,l||`Must have at most ${t} items`)},xe={title:"Kit/Builder/Form",component:f,parameters:{controls:{expanded:!0},backgrounds:{disable:!0}}},s={name:"Complex example",render:()=>{const t=i=>{console.log("Complex form submitted:",i)},l=(i,v,b)=>{console.log(`Field ${i} changed to:`,v),console.log("All form values:",b)},d=[o.card("Personal Information",[e.text("firstName","First Name",{required:!0,placeholder:"Enter first name"}),e.text("lastName","Last Name",{required:!0,placeholder:"Enter last name"}),e.email("email","Email Address",{required:!0,placeholder:"Enter email address"}),e.date("dateOfBirth","Date of Birth",{required:!0}),e.select("gender","Gender",[{label:"Male",value:"male"},{label:"Female",value:"female"},{label:"Other",value:"other"},{label:"Prefer not to say",value:"not_specified"}],{placeholder:"Select gender"})]),o.card("Address Information",[e.object("address","Primary Address",[e.text("street","Street Address",{required:!0,placeholder:"123 Main St",gridCols:2}),e.text("city","City",{required:!0,placeholder:"New York"}),e.text("state","State/Province",{required:!0,placeholder:"NY"}),e.text("postalCode","Postal Code",{required:!0,placeholder:"10001"}),e.select("country","Country",[{label:"United States",value:"US"},{label:"Canada",value:"CA"},{label:"United Kingdom",value:"UK"},{label:"Australia",value:"AU"}],{required:!0,defaultValue:"US"})],{gridCols:2}),e.checkbox("sameAsShipping","Billing address same as shipping",{defaultValue:!0,gridCols:2}),e.object("billingAddress","Billing Address",[e.text("street","Street Address",{required:!0,placeholder:"123 Main St",gridCols:2}),e.text("city","City",{required:!0,placeholder:"New York"}),e.text("state","State/Province",{required:!0,placeholder:"NY"}),e.text("postalCode","Postal Code",{required:!0,placeholder:"10001"}),e.select("country","Country",[{label:"United States",value:"US"},{label:"Canada",value:"CA"},{label:"United Kingdom",value:"UK"},{label:"Australia",value:"AU"}],{required:!0,defaultValue:"US"})],{gridCols:2,dependencies:[a.showWhen("sameAsShipping",r.isFalse())]})]),o.card("Employment Information",[e.select("employmentStatus","Employment Status",[{label:"Employed",value:"employed"},{label:"Self-employed",value:"self_employed"},{label:"Unemployed",value:"unemployed"},{label:"Student",value:"student"},{label:"Retired",value:"retired"}],{required:!0,placeholder:"Select employment status"}),e.text("company","Company Name",{required:!0,placeholder:"Enter company name",dependencies:[a.showWhen("employmentStatus",r.equals("employed"))]}),e.text("jobTitle","Job Title",{required:!0,placeholder:"Enter job title",dependencies:[a.showWhen("employmentStatus",r.equals("employed"))]}),e.text("businessName","Business Name",{required:!0,placeholder:"Enter business name",dependencies:[a.showWhen("employmentStatus",r.equals("self_employed"))]}),e.text("businessType","Type of Business",{placeholder:"e.g., Consulting, Retail, etc.",dependencies:[a.showWhen("employmentStatus",r.equals("self_employed"))]}),e.text("school","School/University",{required:!0,placeholder:"Enter school name",dependencies:[a.showWhen("employmentStatus",r.equals("student"))]}),e.text("major","Major/Field of Study",{placeholder:"Enter your major",dependencies:[a.showWhen("employmentStatus",r.equals("student"))]}),e.number("annualIncome","Annual Income",{placeholder:"50000",validation:u.minItems(0,"Income must be positive"),dependencies:[a.showWhen("employmentStatus",i=>["employed","self_employed"].includes(i))]})]),o.card("Skills & Experience",[e.array("skills","Skills",[e.text("name","Skill Name",{required:!0,placeholder:"e.g., JavaScript, Project Management"}),e.select("level","Proficiency Level",[{label:"Beginner",value:"beginner"},{label:"Intermediate",value:"intermediate"},{label:"Advanced",value:"advanced"},{label:"Expert",value:"expert"}],{required:!0,placeholder:"Select level"}),e.number("yearsOfExperience","Years of Experience",{placeholder:"2",validation:u.minItems(0,"Years must be positive")})],{gridCols:2,defaultValue:[{name:"",level:"",yearsOfExperience:0}]})]),o.card("Professional References",[e.checkbox("hasReferences","I have professional references",{defaultValue:!1,gridCols:2}),e.array("references","References",[e.text("name","Full Name",{required:!0,placeholder:"John Doe"}),e.text("title","Job Title",{required:!0,placeholder:"Senior Manager"}),e.text("company","Company",{required:!0,placeholder:"ABC Corporation"}),e.email("email","Email",{required:!0,placeholder:"john.doe@company.com"}),e.text("phone","Phone",{validation:x.phone,placeholder:"+1 (555) 123-4567"}),e.select("relationship","Relationship",[{label:"Direct Supervisor",value:"supervisor"},{label:"Colleague",value:"colleague"},{label:"Client",value:"client"},{label:"Other",value:"other"}],{required:!0,placeholder:"Select relationship"})],{gridCols:2,defaultValue:[],dependencies:[a.showWhen("hasReferences",r.isTrue())]})]),o.card("Additional Information",[e.textarea("additionalInfo","Additional Comments",{placeholder:"Any additional information you'd like to share...",gridCols:2}),e.checkbox("agreeToTerms","I agree to the terms and conditions",{required:!0,gridCols:2}),e.checkbox("allowMarketing","I agree to receive marketing communications",{defaultValue:!1,gridCols:2})])];return n.jsxs("div",{className:"max-w-4xl mx-auto p-6",children:[n.jsxs("div",{className:"mb-8",children:[n.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Professional Profile"}),n.jsx("p",{className:"text-gray-600 mt-2",children:"Complete your professional profile with detailed information. This form demonstrates complex nested structures and field dependencies."})]}),n.jsx(f,{sections:d,onSubmit:t,onFieldChange:l,className:"space-y-8"})]})}};var p,h,y;s.parameters={...s.parameters,docs:{...(p=s.parameters)==null?void 0:p.docs,source:{originalSource:`{
2
2
  name: 'Complex example',
3
3
  render: () => {
4
4
  const handleSubmit = (data: unknown) => {