@techzyapp/ui-library 1.0.30 → 1.0.32

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 (560) hide show
  1. package/dist/{Accordion-w-w_WxxV.js → Accordion-ClK2XpD7.js} +3 -3
  2. package/dist/{Accordion-w-w_WxxV.js.map → Accordion-ClK2XpD7.js.map} +1 -1
  3. package/dist/{Accordion-P3PNqSER.cjs → Accordion-CtvAYNKd.cjs} +2 -2
  4. package/dist/{Accordion-P3PNqSER.cjs.map → Accordion-CtvAYNKd.cjs.map} +1 -1
  5. package/dist/AdminRoot-B9A4Hoz0.js +57 -0
  6. package/dist/AdminRoot-B9A4Hoz0.js.map +1 -0
  7. package/dist/AdminRoot-BVUEWczU.cjs +2 -0
  8. package/dist/AdminRoot-BVUEWczU.cjs.map +1 -0
  9. package/dist/{Alert-CJono1TJ.js → Alert-B7w9xD2p.js} +5 -5
  10. package/dist/{Alert-CJono1TJ.js.map → Alert-B7w9xD2p.js.map} +1 -1
  11. package/dist/{Alert-VFQuuII6.cjs → Alert-B9l1VhIr.cjs} +2 -2
  12. package/dist/{Alert-VFQuuII6.cjs.map → Alert-B9l1VhIr.cjs.map} +1 -1
  13. package/dist/{AuthLayout-QAtW2GAT.cjs → AuthLayout-DIcR__vo.cjs} +2 -2
  14. package/dist/{AuthLayout-QAtW2GAT.cjs.map → AuthLayout-DIcR__vo.cjs.map} +1 -1
  15. package/dist/{AuthLayout-DOFYw_z5.js → AuthLayout-m1BQ6Ixx.js} +2 -2
  16. package/dist/{AuthLayout-DOFYw_z5.js.map → AuthLayout-m1BQ6Ixx.js.map} +1 -1
  17. package/dist/{Avatar-DrV_F7Ex.cjs → Avatar-CQ--wGWS.cjs} +2 -2
  18. package/dist/{Avatar-DrV_F7Ex.cjs.map → Avatar-CQ--wGWS.cjs.map} +1 -1
  19. package/dist/{Avatar-DXNPg23a.js → Avatar-MwWIcj8z.js} +3 -3
  20. package/dist/{Avatar-DXNPg23a.js.map → Avatar-MwWIcj8z.js.map} +1 -1
  21. package/dist/{AvatarGroup-CwlYqDCI.js → AvatarGroup-BxYQo0zZ.js} +2 -2
  22. package/dist/{AvatarGroup-CwlYqDCI.js.map → AvatarGroup-BxYQo0zZ.js.map} +1 -1
  23. package/dist/{AvatarGroup-CHesdo-M.cjs → AvatarGroup-Bzu2t6Sd.cjs} +2 -2
  24. package/dist/{AvatarGroup-CHesdo-M.cjs.map → AvatarGroup-Bzu2t6Sd.cjs.map} +1 -1
  25. package/dist/{Breadcrumbs-DCEHxpSi.cjs → Breadcrumbs-B1JMwCjO.cjs} +2 -2
  26. package/dist/{Breadcrumbs-DCEHxpSi.cjs.map → Breadcrumbs-B1JMwCjO.cjs.map} +1 -1
  27. package/dist/{Breadcrumbs-XWU8tRvs.js → Breadcrumbs-Cl1CgKkk.js} +5 -5
  28. package/dist/{Breadcrumbs-XWU8tRvs.js.map → Breadcrumbs-Cl1CgKkk.js.map} +1 -1
  29. package/dist/{Button-CWMNNiia.js → Button-BJ5Xd10u.js} +2 -2
  30. package/dist/{Button-CWMNNiia.js.map → Button-BJ5Xd10u.js.map} +1 -1
  31. package/dist/{Button-CusxDmfq.cjs → Button-BZq1mIUH.cjs} +2 -2
  32. package/dist/{Button-CusxDmfq.cjs.map → Button-BZq1mIUH.cjs.map} +1 -1
  33. package/dist/{Calendar-BEQbZixA.cjs → Calendar-r-dDXWEp.cjs} +2 -2
  34. package/dist/{Calendar-BEQbZixA.cjs.map → Calendar-r-dDXWEp.cjs.map} +1 -1
  35. package/dist/{Calendar-Db3rr1VD.js → Calendar-rRPnaU9M.js} +4 -4
  36. package/dist/{Calendar-Db3rr1VD.js.map → Calendar-rRPnaU9M.js.map} +1 -1
  37. package/dist/Card-Cr3D2bzJ.js +129 -0
  38. package/dist/Card-Cr3D2bzJ.js.map +1 -0
  39. package/dist/Card-KsczbH5c.cjs +2 -0
  40. package/dist/Card-KsczbH5c.cjs.map +1 -0
  41. package/dist/{Chip-D12KcV4_.cjs → Chip-BZ3I4Lbe.cjs} +2 -2
  42. package/dist/{Chip-D12KcV4_.cjs.map → Chip-BZ3I4Lbe.cjs.map} +1 -1
  43. package/dist/{Chip-Zh1OB9nV.js → Chip-DEp1zWh1.js} +3 -3
  44. package/dist/{Chip-Zh1OB9nV.js.map → Chip-DEp1zWh1.js.map} +1 -1
  45. package/dist/{ChoiceCardGroup-CEniY_HJ.js → ChoiceCardGroup-BTbKjJdp.js} +3 -3
  46. package/dist/{ChoiceCardGroup-CEniY_HJ.js.map → ChoiceCardGroup-BTbKjJdp.js.map} +1 -1
  47. package/dist/{ChoiceCardGroup-BSagRbPI.cjs → ChoiceCardGroup-Bg2jtFpe.cjs} +2 -2
  48. package/dist/{ChoiceCardGroup-BSagRbPI.cjs.map → ChoiceCardGroup-Bg2jtFpe.cjs.map} +1 -1
  49. package/dist/{CodeBlock-CkrTnpcj.js → CodeBlock-CMHqvoBJ.js} +5 -5
  50. package/dist/{CodeBlock-CkrTnpcj.js.map → CodeBlock-CMHqvoBJ.js.map} +1 -1
  51. package/dist/{CodeBlock-DAM7BkHK.cjs → CodeBlock-DIkyeG4S.cjs} +2 -2
  52. package/dist/{CodeBlock-DAM7BkHK.cjs.map → CodeBlock-DIkyeG4S.cjs.map} +1 -1
  53. package/dist/{ColorPicker-DqxVgUoD.js → ColorPicker-5SMyU5oh.js} +4 -4
  54. package/dist/{ColorPicker-DqxVgUoD.js.map → ColorPicker-5SMyU5oh.js.map} +1 -1
  55. package/dist/{ColorPicker-BcCozxIe.cjs → ColorPicker-B1riGs1z.cjs} +2 -2
  56. package/dist/{ColorPicker-BcCozxIe.cjs.map → ColorPicker-B1riGs1z.cjs.map} +1 -1
  57. package/dist/{ColorPickerPanel-DZjN8NNn.js → ColorPickerPanel-4Y6oXL7v.js} +3 -3
  58. package/dist/{ColorPickerPanel-DZjN8NNn.js.map → ColorPickerPanel-4Y6oXL7v.js.map} +1 -1
  59. package/dist/{ColorPickerPanel-DAOESLCe.cjs → ColorPickerPanel-CzBlh0zw.cjs} +2 -2
  60. package/dist/{ColorPickerPanel-DAOESLCe.cjs.map → ColorPickerPanel-CzBlh0zw.cjs.map} +1 -1
  61. package/dist/{ColorRamp-_KwlPQ-T.cjs → ColorRamp-D_h-hp7n.cjs} +2 -2
  62. package/dist/{ColorRamp-_KwlPQ-T.cjs.map → ColorRamp-D_h-hp7n.cjs.map} +1 -1
  63. package/dist/{ColorRamp-DS5LVpRF.js → ColorRamp-Qc8ZtPDh.js} +3 -3
  64. package/dist/{ColorRamp-DS5LVpRF.js.map → ColorRamp-Qc8ZtPDh.js.map} +1 -1
  65. package/dist/ConfigProvider-CzAQf_d_.cjs +2 -0
  66. package/dist/ConfigProvider-CzAQf_d_.cjs.map +1 -0
  67. package/dist/ConfigProvider-D2svpXFu.js +347 -0
  68. package/dist/ConfigProvider-D2svpXFu.js.map +1 -0
  69. package/dist/{CopyButton-D4s8aeSE.js → CopyButton-BNcW9-KU.js} +5 -5
  70. package/dist/{CopyButton-D4s8aeSE.js.map → CopyButton-BNcW9-KU.js.map} +1 -1
  71. package/dist/{CopyButton-SFwjKod9.cjs → CopyButton-DUtx2-Gi.cjs} +2 -2
  72. package/dist/{CopyButton-SFwjKod9.cjs.map → CopyButton-DUtx2-Gi.cjs.map} +1 -1
  73. package/dist/{DashedButton-iM7kzopW.js → DashedButton-BpiG8rab.js} +3 -3
  74. package/dist/{DashedButton-iM7kzopW.js.map → DashedButton-BpiG8rab.js.map} +1 -1
  75. package/dist/{DashedButton-B7xodc3N.cjs → DashedButton-DZmgxLMO.cjs} +2 -2
  76. package/dist/{DashedButton-B7xodc3N.cjs.map → DashedButton-DZmgxLMO.cjs.map} +1 -1
  77. package/dist/{DatePicker-DGwjCHfd.js → DatePicker-D2PyGdec.js} +6 -6
  78. package/dist/{DatePicker-DGwjCHfd.js.map → DatePicker-D2PyGdec.js.map} +1 -1
  79. package/dist/{DatePicker-ENbn2Vab.cjs → DatePicker-D_PqDvKt.cjs} +2 -2
  80. package/dist/{DatePicker-ENbn2Vab.cjs.map → DatePicker-D_PqDvKt.cjs.map} +1 -1
  81. package/dist/{DateTimePicker-BQUmsFwX.cjs → DateTimePicker-C3Kq5hKE.cjs} +2 -2
  82. package/dist/{DateTimePicker-BQUmsFwX.cjs.map → DateTimePicker-C3Kq5hKE.cjs.map} +1 -1
  83. package/dist/{DateTimePicker-CwVkQiun.js → DateTimePicker-DdXFzqO_.js} +9 -9
  84. package/dist/{DateTimePicker-CwVkQiun.js.map → DateTimePicker-DdXFzqO_.js.map} +1 -1
  85. package/dist/DescriptionList-C7AOcw_2.cjs +2 -0
  86. package/dist/{DescriptionList-U5z2Faf4.cjs.map → DescriptionList-C7AOcw_2.cjs.map} +1 -1
  87. package/dist/{DescriptionList-0qjKr6GN.js → DescriptionList-DxRgKNEJ.js} +64 -64
  88. package/dist/{DescriptionList-0qjKr6GN.js.map → DescriptionList-DxRgKNEJ.js.map} +1 -1
  89. package/dist/{Dropdown-DNZ9S_zQ.cjs → Dropdown-CMqWq6J_.cjs} +2 -2
  90. package/dist/{Dropdown-DNZ9S_zQ.cjs.map → Dropdown-CMqWq6J_.cjs.map} +1 -1
  91. package/dist/{Dropdown--1mNTVZJ.js → Dropdown-zlv96RLy.js} +2 -2
  92. package/dist/{Dropdown--1mNTVZJ.js.map → Dropdown-zlv96RLy.js.map} +1 -1
  93. package/dist/{EmptyState-DwT9_HW7.js → EmptyState-CvpKSYY4.js} +4 -4
  94. package/dist/{EmptyState-DwT9_HW7.js.map → EmptyState-CvpKSYY4.js.map} +1 -1
  95. package/dist/{EmptyState-B2_4BN4l.cjs → EmptyState-ECc6e_En.cjs} +2 -2
  96. package/dist/{EmptyState-B2_4BN4l.cjs.map → EmptyState-ECc6e_En.cjs.map} +1 -1
  97. package/dist/{ErrorBoundary-CsDHKYB4.js → ErrorBoundary-CJx5E9wJ.js} +6 -6
  98. package/dist/{ErrorBoundary-CsDHKYB4.js.map → ErrorBoundary-CJx5E9wJ.js.map} +1 -1
  99. package/dist/{ErrorBoundary-CYSOAQlB.cjs → ErrorBoundary-DbKRtdgS.cjs} +2 -2
  100. package/dist/{ErrorBoundary-CYSOAQlB.cjs.map → ErrorBoundary-DbKRtdgS.cjs.map} +1 -1
  101. package/dist/{FileCard-zuUYik-F.cjs → FileCard-Bjqsgi7S.cjs} +2 -2
  102. package/dist/{FileCard-zuUYik-F.cjs.map → FileCard-Bjqsgi7S.cjs.map} +1 -1
  103. package/dist/{FileCard-B9f9RoXS.js → FileCard-D4t0-ms2.js} +5 -5
  104. package/dist/{FileCard-B9f9RoXS.js.map → FileCard-D4t0-ms2.js.map} +1 -1
  105. package/dist/{FileUploader-Y8hiyIpp.cjs → FileUploader-DWM8WrY6.cjs} +2 -2
  106. package/dist/{FileUploader-Y8hiyIpp.cjs.map → FileUploader-DWM8WrY6.cjs.map} +1 -1
  107. package/dist/{FileUploader-Dh2zA50t.js → FileUploader-DdcvZoUb.js} +6 -6
  108. package/dist/{FileUploader-Dh2zA50t.js.map → FileUploader-DdcvZoUb.js.map} +1 -1
  109. package/dist/{Flag-CmDXvd7j.js → Flag-BLEBMdb-.js} +2 -2
  110. package/dist/{Flag-CmDXvd7j.js.map → Flag-BLEBMdb-.js.map} +1 -1
  111. package/dist/{Flag-BpTQAgbD.cjs → Flag-D5rqScYG.cjs} +2 -2
  112. package/dist/{Flag-BpTQAgbD.cjs.map → Flag-D5rqScYG.cjs.map} +1 -1
  113. package/dist/FloatingPanel-C5c_eMQ0.js +135 -0
  114. package/dist/{FloatingPanel-CeSOtE_D.js.map → FloatingPanel-C5c_eMQ0.js.map} +1 -1
  115. package/dist/FloatingPanel-tGCG2nhA.cjs +2 -0
  116. package/dist/{FloatingPanel-BIC4WrFa.cjs.map → FloatingPanel-tGCG2nhA.cjs.map} +1 -1
  117. package/dist/{FullscreenToggle-CeGgw3z1.cjs → FullscreenToggle-CZoc5pYg.cjs} +2 -2
  118. package/dist/{FullscreenToggle-CeGgw3z1.cjs.map → FullscreenToggle-CZoc5pYg.cjs.map} +1 -1
  119. package/dist/{FullscreenToggle-2IYIS5KF.js → FullscreenToggle-DZnKK1Lj.js} +4 -4
  120. package/dist/{FullscreenToggle-2IYIS5KF.js.map → FullscreenToggle-DZnKK1Lj.js.map} +1 -1
  121. package/dist/Icon-BUP5_kRs.cjs +2 -0
  122. package/dist/Icon-BUP5_kRs.cjs.map +1 -0
  123. package/dist/{Icon-DaTvzLBu.js → Icon-CGQ5yGSZ.js} +4 -3
  124. package/dist/Icon-CGQ5yGSZ.js.map +1 -0
  125. package/dist/{IconButton-GU3Ud4Zg.js → IconButton-CqFgam3J.js} +2 -2
  126. package/dist/{IconButton-GU3Ud4Zg.js.map → IconButton-CqFgam3J.js.map} +1 -1
  127. package/dist/{IconButton-BNa0yLcv.cjs → IconButton-V8tjArlt.cjs} +2 -2
  128. package/dist/{IconButton-BNa0yLcv.cjs.map → IconButton-V8tjArlt.cjs.map} +1 -1
  129. package/dist/List-CXHlAI5w.js +38 -0
  130. package/dist/List-CXHlAI5w.js.map +1 -0
  131. package/dist/List-DOsh6w-d.cjs +2 -0
  132. package/dist/List-DOsh6w-d.cjs.map +1 -0
  133. package/dist/ListItem-CUeIBhOF.cjs +2 -0
  134. package/dist/ListItem-CUeIBhOF.cjs.map +1 -0
  135. package/dist/ListItem-ehFB7TUW.js +77 -0
  136. package/dist/ListItem-ehFB7TUW.js.map +1 -0
  137. package/dist/{Loader-C1uaCtx6.js → Loader-Bsz0BkGr.js} +2 -2
  138. package/dist/{Loader-C1uaCtx6.js.map → Loader-Bsz0BkGr.js.map} +1 -1
  139. package/dist/{Loader-Cpr9-OOZ.cjs → Loader-CqRaCdzF.cjs} +2 -2
  140. package/dist/{Loader-Cpr9-OOZ.cjs.map → Loader-CqRaCdzF.cjs.map} +1 -1
  141. package/dist/LocationPicker-BRGNcTd_.cjs +2 -0
  142. package/dist/LocationPicker-BRGNcTd_.cjs.map +1 -0
  143. package/dist/LocationPicker-DtMDpPFZ.js +781 -0
  144. package/dist/LocationPicker-DtMDpPFZ.js.map +1 -0
  145. package/dist/{Modal-DFeBHv-Q.cjs → Modal-CcrqM4kn.cjs} +2 -2
  146. package/dist/{Modal-DFeBHv-Q.cjs.map → Modal-CcrqM4kn.cjs.map} +1 -1
  147. package/dist/{Modal-DHP2R3K3.js → Modal-DCee1a9m.js} +5 -5
  148. package/dist/{Modal-DHP2R3K3.js.map → Modal-DCee1a9m.js.map} +1 -1
  149. package/dist/{MultiSelect-S5VG9g3l.cjs → MultiSelect-BJ-qMpA5.cjs} +2 -2
  150. package/dist/{MultiSelect-S5VG9g3l.cjs.map → MultiSelect-BJ-qMpA5.cjs.map} +1 -1
  151. package/dist/{MultiSelect-B-FPQ08c.js → MultiSelect-JQ6iKHyI.js} +5 -5
  152. package/dist/{MultiSelect-B-FPQ08c.js.map → MultiSelect-JQ6iKHyI.js.map} +1 -1
  153. package/dist/{NumberField-CzyvDMRV.js → NumberField-Bf-vDNLy.js} +4 -4
  154. package/dist/{NumberField-CzyvDMRV.js.map → NumberField-Bf-vDNLy.js.map} +1 -1
  155. package/dist/{NumberField-SSGXlF8U.cjs → NumberField-mZjwZB8E.cjs} +2 -2
  156. package/dist/{NumberField-SSGXlF8U.cjs.map → NumberField-mZjwZB8E.cjs.map} +1 -1
  157. package/dist/{OtpField-CMoJqcx1.js → OtpField-DaAIBp6C.js} +2 -2
  158. package/dist/{OtpField-CMoJqcx1.js.map → OtpField-DaAIBp6C.js.map} +1 -1
  159. package/dist/{OtpField-Pr7Ch0El.cjs → OtpField-TdjMkgQi.cjs} +2 -2
  160. package/dist/{OtpField-Pr7Ch0El.cjs.map → OtpField-TdjMkgQi.cjs.map} +1 -1
  161. package/dist/{PageLayout-BIMkjq-q.cjs → PageLayout-BoHvt2cT.cjs} +2 -2
  162. package/dist/{PageLayout-BIMkjq-q.cjs.map → PageLayout-BoHvt2cT.cjs.map} +1 -1
  163. package/dist/{PageLayout-Ctr-IEzX.js → PageLayout-Bwv8Oohb.js} +2 -2
  164. package/dist/{PageLayout-Ctr-IEzX.js.map → PageLayout-Bwv8Oohb.js.map} +1 -1
  165. package/dist/{PageNotFound-KKJTeaRF.js → PageNotFound-CMt8vnky.js} +5 -5
  166. package/dist/{PageNotFound-KKJTeaRF.js.map → PageNotFound-CMt8vnky.js.map} +1 -1
  167. package/dist/{PageNotFound-CnhBheI4.cjs → PageNotFound-DDm6nwQh.cjs} +2 -2
  168. package/dist/{PageNotFound-CnhBheI4.cjs.map → PageNotFound-DDm6nwQh.cjs.map} +1 -1
  169. package/dist/{Pagination-Oyms2ERd.js → Pagination-C0xr3D-g.js} +3 -3
  170. package/dist/{Pagination-Oyms2ERd.js.map → Pagination-C0xr3D-g.js.map} +1 -1
  171. package/dist/{Pagination-BD5WOW98.cjs → Pagination-DzkTjEZL.cjs} +2 -2
  172. package/dist/{Pagination-BD5WOW98.cjs.map → Pagination-DzkTjEZL.cjs.map} +1 -1
  173. package/dist/{PaletteField-CCQGW5LC.cjs → PaletteField-CQV2dll0.cjs} +2 -2
  174. package/dist/{PaletteField-CCQGW5LC.cjs.map → PaletteField-CQV2dll0.cjs.map} +1 -1
  175. package/dist/{PaletteField-BHzzzdou.js → PaletteField-CQv6MBKe.js} +3 -3
  176. package/dist/{PaletteField-BHzzzdou.js.map → PaletteField-CQv6MBKe.js.map} +1 -1
  177. package/dist/{PhoneField-CBfmChPx.js → PhoneField-Bqj5-33G.js} +5 -5
  178. package/dist/{PhoneField-CBfmChPx.js.map → PhoneField-Bqj5-33G.js.map} +1 -1
  179. package/dist/{PhoneField-5zGY4Wko.cjs → PhoneField-Dzdm5hfY.cjs} +2 -2
  180. package/dist/{PhoneField-5zGY4Wko.cjs.map → PhoneField-Dzdm5hfY.cjs.map} +1 -1
  181. package/dist/{Popconfirm-BtGDhqrc.js → Popconfirm-CYkwGTh-.js} +6 -6
  182. package/dist/{Popconfirm-BtGDhqrc.js.map → Popconfirm-CYkwGTh-.js.map} +1 -1
  183. package/dist/{Popconfirm-CkBdntxV.cjs → Popconfirm-DS6tCxV0.cjs} +2 -2
  184. package/dist/{Popconfirm-CkBdntxV.cjs.map → Popconfirm-DS6tCxV0.cjs.map} +1 -1
  185. package/dist/{Popover-DAT6DcM9.cjs → Popover-DsYUT23r.cjs} +2 -2
  186. package/dist/{Popover-DAT6DcM9.cjs.map → Popover-DsYUT23r.cjs.map} +1 -1
  187. package/dist/{Popover-B82Id9Ut.js → Popover-WaVH3jsN.js} +2 -2
  188. package/dist/{Popover-B82Id9Ut.js.map → Popover-WaVH3jsN.js.map} +1 -1
  189. package/dist/{Progress-pTbaOSDd.js → Progress-DZUtn3Sh.js} +2 -2
  190. package/dist/{Progress-pTbaOSDd.js.map → Progress-DZUtn3Sh.js.map} +1 -1
  191. package/dist/{Progress-Bwxx71Ns.cjs → Progress-lf9vIKIk.cjs} +2 -2
  192. package/dist/{Progress-Bwxx71Ns.cjs.map → Progress-lf9vIKIk.cjs.map} +1 -1
  193. package/dist/{QueryError-Bu_MNGek.js → QueryError-Dl8yzdxw.js} +2 -2
  194. package/dist/{QueryError-Bu_MNGek.js.map → QueryError-Dl8yzdxw.js.map} +1 -1
  195. package/dist/{QueryError-C01oichG.cjs → QueryError-RF7Mh5zg.cjs} +2 -2
  196. package/dist/{QueryError-C01oichG.cjs.map → QueryError-RF7Mh5zg.cjs.map} +1 -1
  197. package/dist/RadioGroup-CTAayuMv.js +142 -0
  198. package/dist/RadioGroup-CTAayuMv.js.map +1 -0
  199. package/dist/RadioGroup-CvC2yc4p.cjs +2 -0
  200. package/dist/RadioGroup-CvC2yc4p.cjs.map +1 -0
  201. package/dist/{RemoveDialog-Bm2mJB3l.cjs → RemoveDialog-Csfhv9ve.cjs} +2 -2
  202. package/dist/{RemoveDialog-Bm2mJB3l.cjs.map → RemoveDialog-Csfhv9ve.cjs.map} +1 -1
  203. package/dist/{RemoveDialog-C2uJzWi-.js → RemoveDialog-DaWh4xmW.js} +6 -6
  204. package/dist/{RemoveDialog-C2uJzWi-.js.map → RemoveDialog-DaWh4xmW.js.map} +1 -1
  205. package/dist/{RichTextEditor-BFeJn2lr.js → RichTextEditor-BLEDQq2H.js} +11 -11
  206. package/dist/{RichTextEditor-BFeJn2lr.js.map → RichTextEditor-BLEDQq2H.js.map} +1 -1
  207. package/dist/RichTextEditor-Eo8uLXlI.cjs +2 -0
  208. package/dist/{RichTextEditor-hOfxJEPX.cjs.map → RichTextEditor-Eo8uLXlI.cjs.map} +1 -1
  209. package/dist/RootLayout-BvyeNM9_.cjs +2 -0
  210. package/dist/RootLayout-BvyeNM9_.cjs.map +1 -0
  211. package/dist/RootLayout-D-ZlsTXF.js +604 -0
  212. package/dist/RootLayout-D-ZlsTXF.js.map +1 -0
  213. package/dist/{Select-d9LDI8O3.js → Select-C0UBQXhg.js} +5 -5
  214. package/dist/{Select-d9LDI8O3.js.map → Select-C0UBQXhg.js.map} +1 -1
  215. package/dist/{Select-CVVJKAtS.cjs → Select-CH3mF6y1.cjs} +2 -2
  216. package/dist/{Select-CVVJKAtS.cjs.map → Select-CH3mF6y1.cjs.map} +1 -1
  217. package/dist/{Sidebar-BgCfnZBF.js → Sidebar--rOPtrqa.js} +35 -33
  218. package/dist/Sidebar--rOPtrqa.js.map +1 -0
  219. package/dist/Sidebar-6wu2fuPT.cjs +2 -0
  220. package/dist/Sidebar-6wu2fuPT.cjs.map +1 -0
  221. package/dist/{SpeedDial-CBVwgnFp.js → SpeedDial-BIodC6td.js} +5 -5
  222. package/dist/{SpeedDial-CBVwgnFp.js.map → SpeedDial-BIodC6td.js.map} +1 -1
  223. package/dist/{SpeedDial-CEr2JWQb.cjs → SpeedDial-BtxXH6Ij.cjs} +2 -2
  224. package/dist/{SpeedDial-CEr2JWQb.cjs.map → SpeedDial-BtxXH6Ij.cjs.map} +1 -1
  225. package/dist/Stepper-B38I8PBS.cjs +2 -0
  226. package/dist/Stepper-B38I8PBS.cjs.map +1 -0
  227. package/dist/Stepper-CPBPTxbP.js +169 -0
  228. package/dist/Stepper-CPBPTxbP.js.map +1 -0
  229. package/dist/{SwatchPicker-Bpxk0IOe.js → SwatchPicker-BAKslSY4.js} +2 -2
  230. package/dist/{SwatchPicker-Bpxk0IOe.js.map → SwatchPicker-BAKslSY4.js.map} +1 -1
  231. package/dist/{SwatchPicker-BWXqgsEy.cjs → SwatchPicker-CpwVq0xp.cjs} +2 -2
  232. package/dist/{SwatchPicker-BWXqgsEy.cjs.map → SwatchPicker-CpwVq0xp.cjs.map} +1 -1
  233. package/dist/Table-1RVWzyS6.cjs +2 -0
  234. package/dist/Table-1RVWzyS6.cjs.map +1 -0
  235. package/dist/Table-BV-dr36o.js +1210 -0
  236. package/dist/Table-BV-dr36o.js.map +1 -0
  237. package/dist/Tabs-DIs8iFA-.cjs +2 -0
  238. package/dist/Tabs-DIs8iFA-.cjs.map +1 -0
  239. package/dist/Tabs-RjyUkLTB.js +194 -0
  240. package/dist/Tabs-RjyUkLTB.js.map +1 -0
  241. package/dist/{TagsField-DuQEFHZ3.js → TagsField-B3MtFiFs.js} +5 -5
  242. package/dist/{TagsField-DuQEFHZ3.js.map → TagsField-B3MtFiFs.js.map} +1 -1
  243. package/dist/{TagsField-DcuSn7wL.cjs → TagsField-CJ10-kFr.cjs} +2 -2
  244. package/dist/{TagsField-DcuSn7wL.cjs.map → TagsField-CJ10-kFr.cjs.map} +1 -1
  245. package/dist/{TextField-SGYWviFf.js → TextField-CInaL0FR.js} +4 -4
  246. package/dist/{TextField-SGYWviFf.js.map → TextField-CInaL0FR.js.map} +1 -1
  247. package/dist/{TextField-E85pvJQC.cjs → TextField-D_hzd5Gf.cjs} +2 -2
  248. package/dist/{TextField-E85pvJQC.cjs.map → TextField-D_hzd5Gf.cjs.map} +1 -1
  249. package/dist/ThemeToggle-CWfuK0tZ.js +28 -0
  250. package/dist/{ThemeToggle-C2kjFrD_.js.map → ThemeToggle-CWfuK0tZ.js.map} +1 -1
  251. package/dist/{ThemeToggle-BdlxzYNt.cjs → ThemeToggle-DkhhlH_r.cjs} +2 -2
  252. package/dist/{ThemeToggle-BdlxzYNt.cjs.map → ThemeToggle-DkhhlH_r.cjs.map} +1 -1
  253. package/dist/{TimeColumns-BS1d0qOp.js → TimeColumns-fD6dosYP.js} +2 -2
  254. package/dist/{TimeColumns-BS1d0qOp.js.map → TimeColumns-fD6dosYP.js.map} +1 -1
  255. package/dist/{TimeColumns-D7-O4Qyt.cjs → TimeColumns-t3Pn01v5.cjs} +2 -2
  256. package/dist/{TimeColumns-D7-O4Qyt.cjs.map → TimeColumns-t3Pn01v5.cjs.map} +1 -1
  257. package/dist/{TimePicker-Dzb3gycP.cjs → TimePicker-DOwQF7sX.cjs} +2 -2
  258. package/dist/{TimePicker-Dzb3gycP.cjs.map → TimePicker-DOwQF7sX.cjs.map} +1 -1
  259. package/dist/{TimePicker-DlzYNDN1.js → TimePicker-DypTHDW0.js} +7 -7
  260. package/dist/{TimePicker-DlzYNDN1.js.map → TimePicker-DypTHDW0.js.map} +1 -1
  261. package/dist/{Timeline-CKEosWka.cjs → Timeline-CMP93APm.cjs} +2 -2
  262. package/dist/{Timeline-CKEosWka.cjs.map → Timeline-CMP93APm.cjs.map} +1 -1
  263. package/dist/{Timeline-ufVXmpMY.js → Timeline-Dri2dPsK.js} +3 -3
  264. package/dist/{Timeline-ufVXmpMY.js.map → Timeline-Dri2dPsK.js.map} +1 -1
  265. package/dist/{Toaster-cu5XyKeE.js → Toaster-BwNAKDMc.js} +2 -2
  266. package/dist/{Toaster-cu5XyKeE.js.map → Toaster-BwNAKDMc.js.map} +1 -1
  267. package/dist/{Toaster-Cummylmj.cjs → Toaster-DdUOwi7L.cjs} +2 -2
  268. package/dist/{Toaster-Cummylmj.cjs.map → Toaster-DdUOwi7L.cjs.map} +1 -1
  269. package/dist/{ToggleButtonGroup-D9odYMzD.js → ToggleButtonGroup-BtVDnQIF.js} +3 -3
  270. package/dist/{ToggleButtonGroup-D9odYMzD.js.map → ToggleButtonGroup-BtVDnQIF.js.map} +1 -1
  271. package/dist/{ToggleButtonGroup-M2oj_3mc.cjs → ToggleButtonGroup-UylpGJ16.cjs} +2 -2
  272. package/dist/{ToggleButtonGroup-M2oj_3mc.cjs.map → ToggleButtonGroup-UylpGJ16.cjs.map} +1 -1
  273. package/dist/Tooltip-Bw-1Xk2Z.cjs +2 -0
  274. package/dist/Tooltip-Bw-1Xk2Z.cjs.map +1 -0
  275. package/dist/Tooltip-DsDv4NOq.js +135 -0
  276. package/dist/Tooltip-DsDv4NOq.js.map +1 -0
  277. package/dist/{TranslatedFields-Ccjhq2YL.js → TranslatedFields-C_-qPixE.js} +13 -13
  278. package/dist/{TranslatedFields-Ccjhq2YL.js.map → TranslatedFields-C_-qPixE.js.map} +1 -1
  279. package/dist/{TranslatedFields-CbTlgKnh.cjs → TranslatedFields-D9FQlxiQ.cjs} +2 -2
  280. package/dist/{TranslatedFields-CbTlgKnh.cjs.map → TranslatedFields-D9FQlxiQ.cjs.map} +1 -1
  281. package/dist/{UserCard-BfHHfkDr.cjs → UserCard-C-q2s2Cw.cjs} +2 -2
  282. package/dist/{UserCard-BfHHfkDr.cjs.map → UserCard-C-q2s2Cw.cjs.map} +1 -1
  283. package/dist/{UserCard-Bs8kuV2j.js → UserCard-CwWv0HXD.js} +5 -5
  284. package/dist/{UserCard-Bs8kuV2j.js.map → UserCard-CwWv0HXD.js.map} +1 -1
  285. package/dist/app/AdminRoot.d.cts +7 -2
  286. package/dist/app/AdminRoot.d.ts +7 -2
  287. package/dist/components/Accordion/index.cjs +1 -1
  288. package/dist/components/Accordion/index.js +1 -1
  289. package/dist/components/Alert/index.cjs +1 -1
  290. package/dist/components/Alert/index.js +1 -1
  291. package/dist/components/AuthLayout/index.cjs +1 -1
  292. package/dist/components/AuthLayout/index.js +1 -1
  293. package/dist/components/Avatar/index.cjs +1 -1
  294. package/dist/components/Avatar/index.js +2 -2
  295. package/dist/components/Breadcrumbs/index.cjs +1 -1
  296. package/dist/components/Breadcrumbs/index.js +1 -1
  297. package/dist/components/Button/index.cjs +1 -1
  298. package/dist/components/Button/index.js +1 -1
  299. package/dist/components/Card/Card.d.cts +9 -1
  300. package/dist/components/Card/Card.d.ts +9 -1
  301. package/dist/components/Card/index.cjs +1 -1
  302. package/dist/components/Card/index.js +1 -1
  303. package/dist/components/Chip/index.cjs +1 -1
  304. package/dist/components/Chip/index.js +1 -1
  305. package/dist/components/ChoiceCard/index.cjs +1 -1
  306. package/dist/components/ChoiceCard/index.js +1 -1
  307. package/dist/components/CodeBlock/index.cjs +1 -1
  308. package/dist/components/CodeBlock/index.js +1 -1
  309. package/dist/components/ColorPicker/index.cjs +1 -1
  310. package/dist/components/ColorPicker/index.js +1 -1
  311. package/dist/components/ColorRamp/index.cjs +1 -1
  312. package/dist/components/ColorRamp/index.js +1 -1
  313. package/dist/components/CopyButton/index.cjs +1 -1
  314. package/dist/components/CopyButton/index.js +1 -1
  315. package/dist/components/DashedButton/index.cjs +1 -1
  316. package/dist/components/DashedButton/index.js +1 -1
  317. package/dist/components/DatePicker/index.cjs +1 -1
  318. package/dist/components/DatePicker/index.js +1 -1
  319. package/dist/components/DateTimePicker/index.cjs +1 -1
  320. package/dist/components/DateTimePicker/index.js +1 -1
  321. package/dist/components/DescriptionList/index.cjs +1 -1
  322. package/dist/components/DescriptionList/index.js +1 -1
  323. package/dist/components/Dropdown/index.cjs +1 -1
  324. package/dist/components/Dropdown/index.js +1 -1
  325. package/dist/components/EmptyState/index.cjs +1 -1
  326. package/dist/components/EmptyState/index.js +1 -1
  327. package/dist/components/ErrorState/index.cjs +1 -1
  328. package/dist/components/ErrorState/index.js +2 -2
  329. package/dist/components/FileCard/index.cjs +1 -1
  330. package/dist/components/FileCard/index.js +1 -1
  331. package/dist/components/FileUploader/index.cjs +1 -1
  332. package/dist/components/FileUploader/index.js +1 -1
  333. package/dist/components/Flag/index.cjs +1 -1
  334. package/dist/components/Flag/index.js +1 -1
  335. package/dist/components/FullscreenToggle/index.cjs +1 -1
  336. package/dist/components/FullscreenToggle/index.js +1 -1
  337. package/dist/components/Icon/index.cjs +1 -1
  338. package/dist/components/Icon/index.js +2 -2
  339. package/dist/components/IconButton/index.cjs +1 -1
  340. package/dist/components/IconButton/index.js +1 -1
  341. package/dist/components/List/index.cjs +1 -1
  342. package/dist/components/List/index.js +5 -4
  343. package/dist/components/List/index.js.map +1 -1
  344. package/dist/components/Loader/index.cjs +1 -1
  345. package/dist/components/Loader/index.js +1 -1
  346. package/dist/components/LocationPicker/LocationPicker.d.cts +87 -0
  347. package/dist/components/LocationPicker/LocationPicker.d.ts +87 -0
  348. package/dist/components/LocationPicker/PlaceSearch.d.cts +20 -0
  349. package/dist/components/LocationPicker/PlaceSearch.d.ts +20 -0
  350. package/dist/components/LocationPicker/googleMaps.d.cts +89 -0
  351. package/dist/components/LocationPicker/googleMaps.d.ts +89 -0
  352. package/dist/components/LocationPicker/index.cjs +2 -0
  353. package/dist/components/LocationPicker/index.cjs.map +1 -0
  354. package/dist/components/LocationPicker/index.d.cts +2 -0
  355. package/dist/components/LocationPicker/index.d.ts +2 -0
  356. package/dist/components/LocationPicker/index.js +7 -0
  357. package/dist/components/LocationPicker/index.js.map +1 -0
  358. package/dist/components/Modal/index.cjs +1 -1
  359. package/dist/components/Modal/index.js +1 -1
  360. package/dist/components/MultiSelect/index.cjs +1 -1
  361. package/dist/components/MultiSelect/index.js +1 -1
  362. package/dist/components/NumberField/index.cjs +1 -1
  363. package/dist/components/NumberField/index.js +1 -1
  364. package/dist/components/OtpField/index.cjs +1 -1
  365. package/dist/components/OtpField/index.js +1 -1
  366. package/dist/components/PageLayout/index.cjs +1 -1
  367. package/dist/components/PageLayout/index.js +1 -1
  368. package/dist/components/PageNotFound/index.cjs +1 -1
  369. package/dist/components/PageNotFound/index.js +1 -1
  370. package/dist/components/Pagination/index.cjs +1 -1
  371. package/dist/components/Pagination/index.js +1 -1
  372. package/dist/components/PaletteField/index.cjs +1 -1
  373. package/dist/components/PaletteField/index.js +1 -1
  374. package/dist/components/PhoneField/index.cjs +1 -1
  375. package/dist/components/PhoneField/index.js +1 -1
  376. package/dist/components/Popconfirm/index.cjs +1 -1
  377. package/dist/components/Popconfirm/index.js +1 -1
  378. package/dist/components/Popover/index.cjs +1 -1
  379. package/dist/components/Popover/index.js +1 -1
  380. package/dist/components/Progress/index.cjs +1 -1
  381. package/dist/components/Progress/index.js +1 -1
  382. package/dist/components/Radio/RadioGroup.d.cts +1 -1
  383. package/dist/components/Radio/RadioGroup.d.ts +1 -1
  384. package/dist/components/Radio/index.cjs +1 -1
  385. package/dist/components/Radio/index.js +1 -1
  386. package/dist/components/RemoveDialog/index.cjs +1 -1
  387. package/dist/components/RemoveDialog/index.js +1 -1
  388. package/dist/components/RichTextEditor/index.cjs +1 -1
  389. package/dist/components/RichTextEditor/index.js +1 -1
  390. package/dist/components/RootLayout/RootLayout.d.cts +8 -1
  391. package/dist/components/RootLayout/RootLayout.d.ts +8 -1
  392. package/dist/components/RootLayout/SettingsDrawer.d.cts +4 -1
  393. package/dist/components/RootLayout/SettingsDrawer.d.ts +4 -1
  394. package/dist/components/RootLayout/index.cjs +1 -1
  395. package/dist/components/RootLayout/index.js +1 -1
  396. package/dist/components/Select/index.cjs +1 -1
  397. package/dist/components/Select/index.js +1 -1
  398. package/dist/components/Sidebar/Sidebar.d.cts +2 -0
  399. package/dist/components/Sidebar/Sidebar.d.ts +2 -0
  400. package/dist/components/Sidebar/index.cjs +1 -1
  401. package/dist/components/Sidebar/index.js +1 -1
  402. package/dist/components/SpeedDial/index.cjs +1 -1
  403. package/dist/components/SpeedDial/index.js +1 -1
  404. package/dist/components/Stepper/Stepper.d.cts +8 -1
  405. package/dist/components/Stepper/Stepper.d.ts +8 -1
  406. package/dist/components/Stepper/index.cjs +1 -1
  407. package/dist/components/Stepper/index.js +1 -1
  408. package/dist/components/SwatchPicker/index.cjs +1 -1
  409. package/dist/components/SwatchPicker/index.js +1 -1
  410. package/dist/components/Table/Table.d.cts +20 -3
  411. package/dist/components/Table/Table.d.ts +20 -3
  412. package/dist/components/Table/index.cjs +1 -1
  413. package/dist/components/Table/index.js +1 -1
  414. package/dist/components/Table/tableFilter.d.cts +12 -2
  415. package/dist/components/Table/tableFilter.d.ts +12 -2
  416. package/dist/components/Tabs/Tabs.d.cts +8 -1
  417. package/dist/components/Tabs/Tabs.d.ts +8 -1
  418. package/dist/components/Tabs/index.cjs +1 -1
  419. package/dist/components/Tabs/index.js +1 -1
  420. package/dist/components/TagsField/index.cjs +1 -1
  421. package/dist/components/TagsField/index.js +1 -1
  422. package/dist/components/TextField/index.cjs +1 -1
  423. package/dist/components/TextField/index.js +1 -1
  424. package/dist/components/ThemeToggle/index.cjs +1 -1
  425. package/dist/components/ThemeToggle/index.js +1 -1
  426. package/dist/components/TimePicker/index.cjs +1 -1
  427. package/dist/components/TimePicker/index.js +1 -1
  428. package/dist/components/Timeline/index.cjs +1 -1
  429. package/dist/components/Timeline/index.js +1 -1
  430. package/dist/components/Toast/index.cjs +1 -1
  431. package/dist/components/Toast/index.js +1 -1
  432. package/dist/components/ToggleButton/index.cjs +1 -1
  433. package/dist/components/ToggleButton/index.js +1 -1
  434. package/dist/components/Tooltip/Tooltip.d.cts +10 -3
  435. package/dist/components/Tooltip/Tooltip.d.ts +10 -3
  436. package/dist/components/Tooltip/index.cjs +1 -1
  437. package/dist/components/Tooltip/index.js +1 -1
  438. package/dist/components/TranslatedFields/index.cjs +1 -1
  439. package/dist/components/TranslatedFields/index.js +1 -1
  440. package/dist/components/UserCard/index.cjs +1 -1
  441. package/dist/components/UserCard/index.js +1 -1
  442. package/dist/components/index.d.cts +1 -0
  443. package/dist/components/index.d.ts +1 -0
  444. package/dist/entries/app.cjs +1 -1
  445. package/dist/entries/app.js +1 -1
  446. package/dist/entries/components.cjs +1 -1
  447. package/dist/entries/components.js +142 -138
  448. package/dist/entries/components.js.map +1 -1
  449. package/dist/entries/hooks.cjs +1 -1
  450. package/dist/entries/hooks.d.cts +2 -0
  451. package/dist/entries/hooks.d.ts +2 -0
  452. package/dist/entries/hooks.js +9 -8
  453. package/dist/entries/i18n.cjs +1 -1
  454. package/dist/entries/i18n.js +2 -2
  455. package/dist/entries/icons.cjs +1 -1
  456. package/dist/entries/icons.js +2 -2
  457. package/dist/entries/theme.cjs +1 -1
  458. package/dist/entries/theme.d.cts +2 -2
  459. package/dist/entries/theme.d.ts +2 -2
  460. package/dist/entries/theme.js +15 -13
  461. package/dist/hooks/index.d.cts +2 -0
  462. package/dist/hooks/index.d.ts +2 -0
  463. package/dist/hooks/useClearUrlOnUnmount.d.cts +19 -0
  464. package/dist/hooks/useClearUrlOnUnmount.d.ts +19 -0
  465. package/dist/hooks/useQueryModal.d.cts +40 -0
  466. package/dist/hooks/useQueryModal.d.ts +40 -0
  467. package/dist/i18n/messages.d.cts +54 -0
  468. package/dist/i18n/messages.d.ts +54 -0
  469. package/dist/icons/names.d.cts +3 -3
  470. package/dist/icons/names.d.ts +3 -3
  471. package/dist/index.cjs +1 -1
  472. package/dist/index.css +1 -1
  473. package/dist/index.js +255 -248
  474. package/dist/index.js.map +1 -1
  475. package/dist/{messages-DCefu6Pn.js → messages-BOJsnD0O.js} +222 -33
  476. package/dist/messages-BOJsnD0O.js.map +1 -0
  477. package/dist/{messages-FiUqCKjJ.cjs → messages-ejfYfHwL.cjs} +9 -9
  478. package/dist/messages-ejfYfHwL.cjs.map +1 -0
  479. package/dist/{names-r21QPjcU.js → names-BR1uJs0-.js} +5 -4
  480. package/dist/names-BR1uJs0-.js.map +1 -0
  481. package/dist/names-YOCJ4B5J.cjs +2 -0
  482. package/dist/names-YOCJ4B5J.cjs.map +1 -0
  483. package/dist/theme/ConfigProvider.d.cts +70 -0
  484. package/dist/theme/ConfigProvider.d.ts +70 -0
  485. package/dist/theme/index.d.cts +2 -2
  486. package/dist/theme/index.d.ts +2 -2
  487. package/dist/useClearUrlOnUnmount-Cg7v2y5B.cjs +2 -0
  488. package/dist/useClearUrlOnUnmount-Cg7v2y5B.cjs.map +1 -0
  489. package/dist/useClearUrlOnUnmount-DOeh6CUN.js +37 -0
  490. package/dist/useClearUrlOnUnmount-DOeh6CUN.js.map +1 -0
  491. package/dist/useForm-CGbJ44Gp.js +194 -0
  492. package/dist/useForm-CGbJ44Gp.js.map +1 -0
  493. package/dist/useForm-CSw6r1n1.cjs +2 -0
  494. package/dist/useForm-CSw6r1n1.cjs.map +1 -0
  495. package/dist/useOptionMenu-8hjCTNL4.cjs +2 -0
  496. package/dist/{useOptionMenu-BoWyPgbY.cjs.map → useOptionMenu-8hjCTNL4.cjs.map} +1 -1
  497. package/dist/{useOptionMenu-D7EbYG9A.js → useOptionMenu-C1wOZ9NT.js} +11 -10
  498. package/dist/{useOptionMenu-D7EbYG9A.js.map → useOptionMenu-C1wOZ9NT.js.map} +1 -1
  499. package/package.json +1 -1
  500. package/dist/AdminRoot-9HGp3Mds.js +0 -55
  501. package/dist/AdminRoot-9HGp3Mds.js.map +0 -1
  502. package/dist/AdminRoot-D24UJ-4a.cjs +0 -2
  503. package/dist/AdminRoot-D24UJ-4a.cjs.map +0 -1
  504. package/dist/Card-CUUh4mlB.cjs +0 -2
  505. package/dist/Card-CUUh4mlB.cjs.map +0 -1
  506. package/dist/Card-MxYfQTOY.js +0 -121
  507. package/dist/Card-MxYfQTOY.js.map +0 -1
  508. package/dist/ConfigProvider-BbsI15b-.js +0 -320
  509. package/dist/ConfigProvider-BbsI15b-.js.map +0 -1
  510. package/dist/ConfigProvider-ByLHqXpv.cjs +0 -2
  511. package/dist/ConfigProvider-ByLHqXpv.cjs.map +0 -1
  512. package/dist/DescriptionList-U5z2Faf4.cjs +0 -2
  513. package/dist/FloatingPanel-BIC4WrFa.cjs +0 -2
  514. package/dist/FloatingPanel-CeSOtE_D.js +0 -135
  515. package/dist/Icon-BVULqOJD.cjs +0 -2
  516. package/dist/Icon-BVULqOJD.cjs.map +0 -1
  517. package/dist/Icon-DaTvzLBu.js.map +0 -1
  518. package/dist/List-9lUjapQ5.cjs +0 -2
  519. package/dist/List-9lUjapQ5.cjs.map +0 -1
  520. package/dist/List-CZwNGxuP.js +0 -107
  521. package/dist/List-CZwNGxuP.js.map +0 -1
  522. package/dist/RadioGroup-BcFBdFhh.cjs +0 -2
  523. package/dist/RadioGroup-BcFBdFhh.cjs.map +0 -1
  524. package/dist/RadioGroup-dVx_hMCY.js +0 -141
  525. package/dist/RadioGroup-dVx_hMCY.js.map +0 -1
  526. package/dist/RichTextEditor-hOfxJEPX.cjs +0 -2
  527. package/dist/RootLayout-CxncyjCz.js +0 -515
  528. package/dist/RootLayout-CxncyjCz.js.map +0 -1
  529. package/dist/RootLayout-XEcU_MBs.cjs +0 -2
  530. package/dist/RootLayout-XEcU_MBs.cjs.map +0 -1
  531. package/dist/Sidebar-B8ecHwZr.cjs +0 -2
  532. package/dist/Sidebar-B8ecHwZr.cjs.map +0 -1
  533. package/dist/Sidebar-BgCfnZBF.js.map +0 -1
  534. package/dist/Stepper-DOSc03YV.cjs +0 -2
  535. package/dist/Stepper-DOSc03YV.cjs.map +0 -1
  536. package/dist/Stepper-DtYamv1q.js +0 -165
  537. package/dist/Stepper-DtYamv1q.js.map +0 -1
  538. package/dist/Table-AzNzUAkl.js +0 -1170
  539. package/dist/Table-AzNzUAkl.js.map +0 -1
  540. package/dist/Table-CrpWhZUg.cjs +0 -2
  541. package/dist/Table-CrpWhZUg.cjs.map +0 -1
  542. package/dist/Tabs-CMnLXRjA.cjs +0 -2
  543. package/dist/Tabs-CMnLXRjA.cjs.map +0 -1
  544. package/dist/Tabs-D1RGhKsa.js +0 -190
  545. package/dist/Tabs-D1RGhKsa.js.map +0 -1
  546. package/dist/ThemeToggle-C2kjFrD_.js +0 -28
  547. package/dist/Tooltip-Ao7az09p.cjs +0 -2
  548. package/dist/Tooltip-Ao7az09p.cjs.map +0 -1
  549. package/dist/Tooltip-Cb_FKxT9.js +0 -65
  550. package/dist/Tooltip-Cb_FKxT9.js.map +0 -1
  551. package/dist/messages-DCefu6Pn.js.map +0 -1
  552. package/dist/messages-FiUqCKjJ.cjs.map +0 -1
  553. package/dist/names-BJnFU_5m.cjs +0 -2
  554. package/dist/names-BJnFU_5m.cjs.map +0 -1
  555. package/dist/names-r21QPjcU.js.map +0 -1
  556. package/dist/useForm-CN-qCrP7.js +0 -144
  557. package/dist/useForm-CN-qCrP7.js.map +0 -1
  558. package/dist/useForm-WvV361y6.cjs +0 -2
  559. package/dist/useForm-WvV361y6.cjs.map +0 -1
  560. package/dist/useOptionMenu-BoWyPgbY.cjs +0 -2
@@ -171,6 +171,31 @@ export interface HeaderMenuItem {
171
171
  /** Tint, e.g. `'error'` for a destructive item. Default: inherit. */
172
172
  color?: ThemeColor;
173
173
  }
174
+ /**
175
+ * An app action button in the shell header — rendered as an `IconButton` in the same style as the built-in
176
+ * header controls (with a `Tooltip` and an optional count / dot badge), left of them. On narrow screens
177
+ * (`xs`) the actions move into the account menu (when there is one).
178
+ */
179
+ export interface HeaderAction {
180
+ /** Icon on the button (`IconName`). */
181
+ icon: IconName;
182
+ /** Accessible name + tooltip text (and the item label once it moves into the account menu). */
183
+ label: string;
184
+ /** Runs on click. */
185
+ onClick?: () => void;
186
+ /** Router path to navigate to on click (instead of / as well as `onClick`). */
187
+ to?: string;
188
+ /** Count / text badge pinned to the button (e.g. unread notifications). A numeric `0` is hidden. */
189
+ badge?: number | string;
190
+ /** A plain indicator dot instead of a count. */
191
+ dot?: boolean;
192
+ /** Badge / dot tint. Defaults to `error`. */
193
+ badgeColor?: ThemeColor;
194
+ /** Icon tint. Defaults to the header controls' tint (`accent`). */
195
+ color?: ThemeColor;
196
+ /** Renders the button disabled. */
197
+ disabled?: boolean;
198
+ }
174
199
  /**
175
200
  * `RootLayout` header configuration — the shell's top-bar controls. Set it once app-wide in
176
201
  * `config.header`, or per shell via the `RootLayout` `header` prop (the prop wins, merged over config).
@@ -211,6 +236,18 @@ export interface HeaderConfig {
211
236
  * prop's `menu` array **replaces** the config's — arrays don't concatenate.)
212
237
  */
213
238
  menu?: HeaderMenuItem[];
239
+ /**
240
+ * App action buttons, left of the built-in controls (theme / language / settings / account), in order —
241
+ * styled like them, each with a tooltip and an optional badge. On `xs` they move into the account menu
242
+ * (above the `menu` items) when `onLogout` is set; otherwise they stay in the header. Like `menu`, a
243
+ * `header` prop's `actions` **replaces** the config's.
244
+ */
245
+ actions?: HeaderAction[];
246
+ /**
247
+ * Free-form header content for what `actions` can't express — a text `Button` ("New Order"), a `Dropdown`,
248
+ * an environment `Chip`. Rendered left of `actions`; hidden on `xs` (the header has no room there).
249
+ */
250
+ extra?: ReactNode;
214
251
  }
215
252
  /**
216
253
  * UI-language config for the admin panel's **own** static strings (labels, placeholders, aria-labels).
@@ -271,6 +308,22 @@ export interface Config {
271
308
  * `header` prop is merged over this (the prop wins), so a specific shell can override.
272
309
  */
273
310
  header?: HeaderConfig;
311
+ /** Google Maps settings for `LocationPicker` (the API key etc.), app-wide. See `MapsConfig`. */
312
+ maps?: MapsConfig;
313
+ }
314
+ /**
315
+ * Google Maps settings, app-wide — read by `LocationPicker` (its own `apiKey` / `mapId` props win). The key is the
316
+ * app's **browser** key (restrict it by HTTP referrer in the Google Cloud console); the Maps JavaScript API is
317
+ * loaded on demand the first time a map renders, so a panel that never shows one never loads it.
318
+ */
319
+ export interface MapsConfig {
320
+ /** The Google Maps JavaScript API key. */
321
+ apiKey?: string;
322
+ /**
323
+ * A Map ID (Google Cloud → Map Management). Optional — with one the pin is an `AdvancedMarkerElement` and the
324
+ * map uses its cloud style; without it a classic marker + the library's light / dark styling are used.
325
+ */
326
+ mapId?: string;
274
327
  }
275
328
  interface ThemeContextValue {
276
329
  mode: ThemeMode;
@@ -295,6 +348,8 @@ interface ThemeContextValue {
295
348
  tableQuery: TableQueryConfig;
296
349
  /** App-wide `RootLayout` header config (`config.header` ?? `{}`); the `RootLayout` prop merges over it. */
297
350
  header: HeaderConfig;
351
+ /** App-wide Google Maps settings (`config.maps` ?? `{}`). */
352
+ maps: MapsConfig;
298
353
  /** Whether the shell header sticks to the top on scroll (fixed) vs scrolls away (static). Persisted. */
299
354
  headerSticky: boolean;
300
355
  /** Set + persist the header sticky/static preference (overrides `config.header.sticky`). */
@@ -307,6 +362,17 @@ interface ThemeContextValue {
307
362
  shape: ThemeShape;
308
363
  /** Set + persist the corner shape (overrides `config.theme.shape`). */
309
364
  setShape: (shape: ThemeShape) => void;
365
+ /**
366
+ * `true` while any appearance preference differs from the app's configured default — the mode, either
367
+ * mode's accent, the font, the header sticky choice or the shape. Drives the Settings drawer's Reset.
368
+ */
369
+ hasCustomPreferences: boolean;
370
+ /**
371
+ * Reset every appearance preference to the app's configured default (`config.theme.mode` / `fontFamily` /
372
+ * `shape`, `config.header.sticky`, no accent override) and forget the saved choices, so the configured
373
+ * defaults apply again on the next visit. The UI language is not touched (it isn't an appearance setting).
374
+ */
375
+ resetPreferences: () => void;
310
376
  /** Active UI language code (drives `t`). Persisted; seeded from `config.i18n.language` (default English). */
311
377
  language: string;
312
378
  /** Set + persist the active UI language (must be one of `languages`). */
@@ -408,4 +474,8 @@ export declare function useTableQueryConfig(): TableQueryConfig;
408
474
  * a specific shell can override the app-wide defaults.
409
475
  */
410
476
  export declare function useHeaderConfig(): HeaderConfig;
477
+ /** The app-wide Google Maps settings (`config.maps`; `{}` when unset / outside a provider). */
478
+ export declare function useMapsConfig(): MapsConfig;
479
+ /** The active light / dark mode — lenient (`'light'` outside a provider), for components that only read it. */
480
+ export declare function useColorMode(): ThemeMode;
411
481
  export {};
@@ -2,6 +2,6 @@ export { applyTheme } from './applyTheme';
2
2
  export type { ThemePalette, ThemeColor } from './applyTheme';
3
3
  export { BREAKPOINTS, BREAKPOINT_ORDER, breakpointQuery, resolveResponsive } from './breakpoints';
4
4
  export type { Breakpoint, Responsive } from './breakpoints';
5
- export { ConfigProvider, useTheme, useLocales, useTranslationsNamespace, useTabsQueryKey, useNestedTabQueryKey, useStepQueryKey, useTableQueryConfig, useHeaderConfig, useT, useTranslations, useLanguage, DEFAULT_TABS_QUERY_KEY, DEFAULT_NESTED_TAB_QUERY_KEY, DEFAULT_STEP_QUERY_KEY, DEFAULT_FONT_FAMILY, } from './ConfigProvider';
6
- export type { Config, ThemeConfig, ThemeColors, ThemeMode, ThemeShape, ConfigProviderProps, LocaleConfig, KeysConfig, TableConfig, TableQueryConfig, HeaderConfig, HeaderUser, HeaderMenuItem, I18nConfig, } from './ConfigProvider';
5
+ export { ConfigProvider, useTheme, useLocales, useTranslationsNamespace, useTabsQueryKey, useNestedTabQueryKey, useStepQueryKey, useTableQueryConfig, useHeaderConfig, useMapsConfig, useColorMode, useT, useTranslations, useLanguage, DEFAULT_TABS_QUERY_KEY, DEFAULT_NESTED_TAB_QUERY_KEY, DEFAULT_STEP_QUERY_KEY, DEFAULT_FONT_FAMILY, } from './ConfigProvider';
6
+ export type { Config, ThemeConfig, ThemeColors, ThemeMode, ThemeShape, ConfigProviderProps, LocaleConfig, KeysConfig, TableConfig, TableQueryConfig, HeaderConfig, HeaderUser, HeaderMenuItem, HeaderAction, MapsConfig, I18nConfig, } from './ConfigProvider';
7
7
  export type { Messages, MessageKey, MessageCatalog, MessageOverrides, Translator, AppMessages, AppTranslator, } from '../i18n/messages';
@@ -2,6 +2,6 @@ export { applyTheme } from './applyTheme';
2
2
  export type { ThemePalette, ThemeColor } from './applyTheme';
3
3
  export { BREAKPOINTS, BREAKPOINT_ORDER, breakpointQuery, resolveResponsive } from './breakpoints';
4
4
  export type { Breakpoint, Responsive } from './breakpoints';
5
- export { ConfigProvider, useTheme, useLocales, useTranslationsNamespace, useTabsQueryKey, useNestedTabQueryKey, useStepQueryKey, useTableQueryConfig, useHeaderConfig, useT, useTranslations, useLanguage, DEFAULT_TABS_QUERY_KEY, DEFAULT_NESTED_TAB_QUERY_KEY, DEFAULT_STEP_QUERY_KEY, DEFAULT_FONT_FAMILY, } from './ConfigProvider';
6
- export type { Config, ThemeConfig, ThemeColors, ThemeMode, ThemeShape, ConfigProviderProps, LocaleConfig, KeysConfig, TableConfig, TableQueryConfig, HeaderConfig, HeaderUser, HeaderMenuItem, I18nConfig, } from './ConfigProvider';
5
+ export { ConfigProvider, useTheme, useLocales, useTranslationsNamespace, useTabsQueryKey, useNestedTabQueryKey, useStepQueryKey, useTableQueryConfig, useHeaderConfig, useMapsConfig, useColorMode, useT, useTranslations, useLanguage, DEFAULT_TABS_QUERY_KEY, DEFAULT_NESTED_TAB_QUERY_KEY, DEFAULT_STEP_QUERY_KEY, DEFAULT_FONT_FAMILY, } from './ConfigProvider';
6
+ export type { Config, ThemeConfig, ThemeColors, ThemeMode, ThemeShape, ConfigProviderProps, LocaleConfig, KeysConfig, TableConfig, TableQueryConfig, HeaderConfig, HeaderUser, HeaderMenuItem, HeaderAction, MapsConfig, I18nConfig, } from './ConfigProvider';
7
7
  export type { Messages, MessageKey, MessageCatalog, MessageOverrides, Translator, AppMessages, AppTranslator, } from '../i18n/messages';
@@ -0,0 +1,2 @@
1
+ "use strict";const r=require("react"),o=new Map;function c(e,u,t){const n=r.useRef(u);n.current=u;const a=r.useRef(t);a.current=t;const i=r.useRef(null);r.useEffect(()=>{typeof window<"u"&&(i.current=window.location.pathname)}),r.useEffect(()=>{if(!(!e||typeof window>"u"))return o.set(e,(o.get(e)??0)+1),()=>{if(o.set(e,(o.get(e)??1)-1),!n.current)return;const s=i.current;window.setTimeout(()=>{(o.get(e)??0)>0||window.location.pathname===s&&a.current()},0)}},[e])}function f(e,u=window.history.state){const t=new URLSearchParams(window.location.search);if(!t.has(e))return!1;t.delete(e);const n=t.toString();return window.history.replaceState(u,"",`${window.location.pathname}${n?`?${n}`:""}${window.location.hash}`),!0}exports.removeQueryParam=f;exports.useClearUrlOnUnmount=c;
2
+ //# sourceMappingURL=useClearUrlOnUnmount-Cg7v2y5B.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useClearUrlOnUnmount-Cg7v2y5B.cjs","sources":["../src/hooks/useClearUrlOnUnmount.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\n/** Live owners per param — a param is only cleared once nothing mounted uses it any more. */\nconst owners = new Map<string, number>()\n\n/**\n * Internal: run `clear` when the component unmounts **while the page it was on is still showing** — the\n * shared \"remove my URL param on unmount\" rule behind `Tabs`, `Stepper` and `useQueryModal` (`clearUrlOnUnmount`).\n *\n * - Same pathname (a tab switch, a closing modal / sheet, a conditional render) → `clear()` runs.\n * - Another pathname (the user navigated away) → nothing: the URL already belongs to the next page. The\n * pathname compared is the one of the component's latest render, so one inside a layout that survives\n * child-route changes still clears on the page it's actually on.\n * - Deferred one tick, and skipped while **any** mounted component still uses the same param — so\n * StrictMode's simulated unmount → remount never wipes a deep-linked param, and a replacement that mounts\n * in the same commit (the new nested `Tabs` in the panel you switched to, a second `useQueryModal` on the\n * same key) keeps it.\n *\n * `key` scopes the effect (the cleanup is armed only while there is a key; a key change re-arms it).\n * `enabled` is read at unmount time, so flipping it never clears a live component's param.\n */\nexport function useClearUrlOnUnmount(\n key: string | undefined,\n enabled: boolean,\n clear: () => void,\n): void {\n const enabledRef = useRef(enabled)\n enabledRef.current = enabled\n const clearRef = useRef(clear)\n clearRef.current = clear\n // the pathname as of the latest render — a component in a layout that stays mounted across child routes\n // re-renders on the new path, while one torn down BY a navigation last rendered on the old one\n const pathRef = useRef<string | null>(null)\n useEffect(() => {\n if (typeof window !== 'undefined') pathRef.current = window.location.pathname\n })\n\n useEffect(() => {\n if (!key || typeof window === 'undefined') return\n owners.set(key, (owners.get(key) ?? 0) + 1)\n return () => {\n owners.set(key, (owners.get(key) ?? 1) - 1)\n if (!enabledRef.current) return\n const path = pathRef.current\n window.setTimeout(() => {\n if ((owners.get(key) ?? 0) > 0) return // still (or again) in use\n if (window.location.pathname !== path) return\n clearRef.current()\n }, 0)\n }\n }, [key])\n}\n\n/** Remove `key` from the current URL query with `replaceState` (path, other params and hash kept). */\nexport function removeQueryParam(key: string, state: unknown = window.history.state): boolean {\n const params = new URLSearchParams(window.location.search)\n if (!params.has(key)) return false\n params.delete(key)\n const query = params.toString()\n window.history.replaceState(\n state,\n '',\n `${window.location.pathname}${query ? `?${query}` : ''}${window.location.hash}`,\n )\n return true\n}\n"],"names":["owners","useClearUrlOnUnmount","key","enabled","clear","enabledRef","useRef","clearRef","pathRef","useEffect","path","removeQueryParam","state","params","query"],"mappings":"sCAGMA,MAAa,IAkBZ,SAASC,EACdC,EACAC,EACAC,EACM,CACN,MAAMC,EAAaC,EAAAA,OAAOH,CAAO,EACjCE,EAAW,QAAUF,EACrB,MAAMI,EAAWD,EAAAA,OAAOF,CAAK,EAC7BG,EAAS,QAAUH,EAGnB,MAAMI,EAAUF,EAAAA,OAAsB,IAAI,EAC1CG,EAAAA,UAAU,IAAM,CACV,OAAO,OAAW,MAAaD,EAAQ,QAAU,OAAO,SAAS,SACvE,CAAC,EAEDC,EAAAA,UAAU,IAAM,CACd,GAAI,GAACP,GAAO,OAAO,OAAW,KAC9B,OAAAF,EAAO,IAAIE,GAAMF,EAAO,IAAIE,CAAG,GAAK,GAAK,CAAC,EACnC,IAAM,CAEX,GADAF,EAAO,IAAIE,GAAMF,EAAO,IAAIE,CAAG,GAAK,GAAK,CAAC,EACtC,CAACG,EAAW,QAAS,OACzB,MAAMK,EAAOF,EAAQ,QACrB,OAAO,WAAW,IAAM,EACjBR,EAAO,IAAIE,CAAG,GAAK,GAAK,GACzB,OAAO,SAAS,WAAaQ,GACjCH,EAAS,QAAA,CACX,EAAG,CAAC,CACN,CACF,EAAG,CAACL,CAAG,CAAC,CACV,CAGO,SAASS,EAAiBT,EAAaU,EAAiB,OAAO,QAAQ,MAAgB,CAC5F,MAAMC,EAAS,IAAI,gBAAgB,OAAO,SAAS,MAAM,EACzD,GAAI,CAACA,EAAO,IAAIX,CAAG,EAAG,MAAO,GAC7BW,EAAO,OAAOX,CAAG,EACjB,MAAMY,EAAQD,EAAO,SAAA,EACrB,cAAO,QAAQ,aACbD,EACA,GACA,GAAG,OAAO,SAAS,QAAQ,GAAGE,EAAQ,IAAIA,CAAK,GAAK,EAAE,GAAG,OAAO,SAAS,IAAI,EAAA,EAExE,EACT"}
@@ -0,0 +1,37 @@
1
+ import { useRef as a, useEffect as s } from "react";
2
+ const r = /* @__PURE__ */ new Map();
3
+ function f(t, o, n) {
4
+ const e = a(o);
5
+ e.current = o;
6
+ const i = a(n);
7
+ i.current = n;
8
+ const u = a(null);
9
+ s(() => {
10
+ typeof window < "u" && (u.current = window.location.pathname);
11
+ }), s(() => {
12
+ if (!(!t || typeof window > "u"))
13
+ return r.set(t, (r.get(t) ?? 0) + 1), () => {
14
+ if (r.set(t, (r.get(t) ?? 1) - 1), !e.current) return;
15
+ const c = u.current;
16
+ window.setTimeout(() => {
17
+ (r.get(t) ?? 0) > 0 || window.location.pathname === c && i.current();
18
+ }, 0);
19
+ };
20
+ }, [t]);
21
+ }
22
+ function d(t, o = window.history.state) {
23
+ const n = new URLSearchParams(window.location.search);
24
+ if (!n.has(t)) return !1;
25
+ n.delete(t);
26
+ const e = n.toString();
27
+ return window.history.replaceState(
28
+ o,
29
+ "",
30
+ `${window.location.pathname}${e ? `?${e}` : ""}${window.location.hash}`
31
+ ), !0;
32
+ }
33
+ export {
34
+ d as r,
35
+ f as u
36
+ };
37
+ //# sourceMappingURL=useClearUrlOnUnmount-DOeh6CUN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useClearUrlOnUnmount-DOeh6CUN.js","sources":["../src/hooks/useClearUrlOnUnmount.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\n/** Live owners per param — a param is only cleared once nothing mounted uses it any more. */\nconst owners = new Map<string, number>()\n\n/**\n * Internal: run `clear` when the component unmounts **while the page it was on is still showing** — the\n * shared \"remove my URL param on unmount\" rule behind `Tabs`, `Stepper` and `useQueryModal` (`clearUrlOnUnmount`).\n *\n * - Same pathname (a tab switch, a closing modal / sheet, a conditional render) → `clear()` runs.\n * - Another pathname (the user navigated away) → nothing: the URL already belongs to the next page. The\n * pathname compared is the one of the component's latest render, so one inside a layout that survives\n * child-route changes still clears on the page it's actually on.\n * - Deferred one tick, and skipped while **any** mounted component still uses the same param — so\n * StrictMode's simulated unmount → remount never wipes a deep-linked param, and a replacement that mounts\n * in the same commit (the new nested `Tabs` in the panel you switched to, a second `useQueryModal` on the\n * same key) keeps it.\n *\n * `key` scopes the effect (the cleanup is armed only while there is a key; a key change re-arms it).\n * `enabled` is read at unmount time, so flipping it never clears a live component's param.\n */\nexport function useClearUrlOnUnmount(\n key: string | undefined,\n enabled: boolean,\n clear: () => void,\n): void {\n const enabledRef = useRef(enabled)\n enabledRef.current = enabled\n const clearRef = useRef(clear)\n clearRef.current = clear\n // the pathname as of the latest render — a component in a layout that stays mounted across child routes\n // re-renders on the new path, while one torn down BY a navigation last rendered on the old one\n const pathRef = useRef<string | null>(null)\n useEffect(() => {\n if (typeof window !== 'undefined') pathRef.current = window.location.pathname\n })\n\n useEffect(() => {\n if (!key || typeof window === 'undefined') return\n owners.set(key, (owners.get(key) ?? 0) + 1)\n return () => {\n owners.set(key, (owners.get(key) ?? 1) - 1)\n if (!enabledRef.current) return\n const path = pathRef.current\n window.setTimeout(() => {\n if ((owners.get(key) ?? 0) > 0) return // still (or again) in use\n if (window.location.pathname !== path) return\n clearRef.current()\n }, 0)\n }\n }, [key])\n}\n\n/** Remove `key` from the current URL query with `replaceState` (path, other params and hash kept). */\nexport function removeQueryParam(key: string, state: unknown = window.history.state): boolean {\n const params = new URLSearchParams(window.location.search)\n if (!params.has(key)) return false\n params.delete(key)\n const query = params.toString()\n window.history.replaceState(\n state,\n '',\n `${window.location.pathname}${query ? `?${query}` : ''}${window.location.hash}`,\n )\n return true\n}\n"],"names":["owners","useClearUrlOnUnmount","key","enabled","clear","enabledRef","useRef","clearRef","pathRef","useEffect","path","removeQueryParam","state","params","query"],"mappings":";AAGA,MAAMA,wBAAa,IAAA;AAkBZ,SAASC,EACdC,GACAC,GACAC,GACM;AACN,QAAMC,IAAaC,EAAOH,CAAO;AACjC,EAAAE,EAAW,UAAUF;AACrB,QAAMI,IAAWD,EAAOF,CAAK;AAC7B,EAAAG,EAAS,UAAUH;AAGnB,QAAMI,IAAUF,EAAsB,IAAI;AAC1C,EAAAG,EAAU,MAAM;AACd,IAAI,OAAO,SAAW,QAAaD,EAAQ,UAAU,OAAO,SAAS;AAAA,EACvE,CAAC,GAEDC,EAAU,MAAM;AACd,QAAI,GAACP,KAAO,OAAO,SAAW;AAC9B,aAAAF,EAAO,IAAIE,IAAMF,EAAO,IAAIE,CAAG,KAAK,KAAK,CAAC,GACnC,MAAM;AAEX,YADAF,EAAO,IAAIE,IAAMF,EAAO,IAAIE,CAAG,KAAK,KAAK,CAAC,GACtC,CAACG,EAAW,QAAS;AACzB,cAAMK,IAAOF,EAAQ;AACrB,eAAO,WAAW,MAAM;AACtB,WAAKR,EAAO,IAAIE,CAAG,KAAK,KAAK,KACzB,OAAO,SAAS,aAAaQ,KACjCH,EAAS,QAAA;AAAA,QACX,GAAG,CAAC;AAAA,MACN;AAAA,EACF,GAAG,CAACL,CAAG,CAAC;AACV;AAGO,SAASS,EAAiBT,GAAaU,IAAiB,OAAO,QAAQ,OAAgB;AAC5F,QAAMC,IAAS,IAAI,gBAAgB,OAAO,SAAS,MAAM;AACzD,MAAI,CAACA,EAAO,IAAIX,CAAG,EAAG,QAAO;AAC7B,EAAAW,EAAO,OAAOX,CAAG;AACjB,QAAMY,IAAQD,EAAO,SAAA;AACrB,gBAAO,QAAQ;AAAA,IACbD;AAAA,IACA;AAAA,IACA,GAAG,OAAO,SAAS,QAAQ,GAAGE,IAAQ,IAAIA,CAAK,KAAK,EAAE,GAAG,OAAO,SAAS,IAAI;AAAA,EAAA,GAExE;AACT;"}
@@ -0,0 +1,194 @@
1
+ import { useState as h, useCallback as l, useSyncExternalStore as A, useRef as $, useMemo as q } from "react";
2
+ import { u as D, r as j } from "./useClearUrlOnUnmount-DOeh6CUN.js";
3
+ function Z(t = !1) {
4
+ const [s, e] = h(t), n = l(() => e(!0), []), i = l(() => e(!1), []), r = l(() => e((c) => !c), []);
5
+ return { isOpen: s, open: n, close: i, toggle: r };
6
+ }
7
+ function k() {
8
+ const [t, s] = h(null), e = l((n) => s(n), []);
9
+ return {
10
+ query: t ? t.query : null,
11
+ state: t,
12
+ props: (n) => {
13
+ var i, r;
14
+ return {
15
+ manualPagination: !0,
16
+ data: ((i = n.data) == null ? void 0 : i.items) ?? [],
17
+ rowCount: ((r = n.data) == null ? void 0 : r.totalCount) ?? 0,
18
+ loading: !!n.isFetching,
19
+ onChange: e
20
+ };
21
+ }
22
+ };
23
+ }
24
+ const L = "tz:querymodal", v = "__tzQueryModal", x = Math.random().toString(36).slice(2), U = /* @__PURE__ */ new Set(), z = "1", Y = (t) => typeof window > "u" ? null : new URLSearchParams(window.location.search).get(t), G = (t) => (window.addEventListener("popstate", t), window.addEventListener(L, t), () => {
25
+ window.removeEventListener("popstate", t), window.removeEventListener(L, t);
26
+ });
27
+ function b(t, s, e) {
28
+ const n = t.toString(), i = `${window.location.pathname}${n ? `?${n}` : ""}${window.location.hash}`;
29
+ window.history[s === "push" ? "pushState" : "replaceState"](e, "", i), window.dispatchEvent(new Event(L));
30
+ }
31
+ const B = (t) => `${x}:${t}`, K = (t, s) => t != null && typeof t == "object" && t[v] === B(s), P = (t) => {
32
+ if (t == null || typeof t != "object" || !(v in t)) return t;
33
+ const s = { ...t };
34
+ return delete s[v], s;
35
+ };
36
+ function tt(t, s = {}) {
37
+ const { push: e = !0, clearUrlOnUnmount: n = !0 } = s, i = A(
38
+ G,
39
+ () => Y(t),
40
+ () => null
41
+ ), r = l(
42
+ (a = z) => {
43
+ if (typeof window > "u") return;
44
+ const u = new URLSearchParams(window.location.search), f = u.get(t);
45
+ f !== a && (u.set(t, a), f == null && e ? b(u, "push", {
46
+ ...window.history.state ?? {},
47
+ [v]: B(t)
48
+ }) : b(u, "replace", window.history.state));
49
+ },
50
+ [t, e]
51
+ ), c = l(() => {
52
+ if (typeof window > "u" || U.has(t)) return;
53
+ const a = new URLSearchParams(window.location.search);
54
+ if (a.has(t)) {
55
+ if (K(window.history.state, t)) {
56
+ U.add(t);
57
+ const u = () => {
58
+ window.removeEventListener("popstate", u), U.delete(t);
59
+ const f = new URLSearchParams(window.location.search);
60
+ f.has(t) && (f.delete(t), b(f, "replace", P(window.history.state)));
61
+ };
62
+ window.addEventListener("popstate", u), window.history.back();
63
+ return;
64
+ }
65
+ a.delete(t), b(a, "replace", P(window.history.state));
66
+ }
67
+ }, [t]);
68
+ return D(t, n, () => {
69
+ j(t, P(window.history.state)) && window.dispatchEvent(new Event(L));
70
+ }), { isOpen: i != null, value: i, open: r, close: c };
71
+ }
72
+ function H(t, s) {
73
+ let e = null, n = Number.POSITIVE_INFINITY;
74
+ for (const i of s) {
75
+ const r = typeof CSS < "u" && CSS.escape ? CSS.escape(i) : i, c = t.querySelector(`[name="${r}"]`);
76
+ if (!c) continue;
77
+ const a = c.getBoundingClientRect().top;
78
+ a < n && (n = a, e = c);
79
+ }
80
+ e && (typeof e.scrollIntoView == "function" && e.scrollIntoView({ behavior: "smooth", block: "center" }), e.focus({ preventScroll: !0 }));
81
+ }
82
+ function J(t, s) {
83
+ const e = t.safeParse(s);
84
+ if (e.success) return {};
85
+ const n = {};
86
+ for (const i of e.error.issues) {
87
+ const r = String(i.path[0] ?? "_form");
88
+ r in n || (n[r] = i.message);
89
+ }
90
+ return n;
91
+ }
92
+ function et({
93
+ schema: t,
94
+ defaultValues: s,
95
+ onSubmit: e,
96
+ mode: n = "blurThenLive",
97
+ scrollToError: i = !0
98
+ }) {
99
+ const [r, c] = h(s), a = $(s), [u, f] = h({}), [g, R] = h(!1), [C, I] = h(0), [O, V] = h(!1), y = $(!1), m = q(() => J(t, r), [t, r]), _ = Object.keys(m).length === 0, T = l(
100
+ (o) => n === "change" ? !0 : n === "submit" ? g : g || u[o] === !0,
101
+ [n, g, u]
102
+ ), S = l((o, w) => {
103
+ c((d) => ({ ...d, [o]: w }));
104
+ }, []), F = l(
105
+ (o) => {
106
+ const w = r[o];
107
+ return {
108
+ name: o,
109
+ value: w == null ? "" : String(w),
110
+ onChange: (d) => S(o, d.target.value),
111
+ onBlur: () => {
112
+ f((d) => d[o] ? d : { ...d, [o]: !0 });
113
+ },
114
+ error: T(o) && !!m[o],
115
+ helperText: T(o) ? m[o] : void 0
116
+ };
117
+ },
118
+ [r, m, T, S, n]
119
+ ), E = l((o) => {
120
+ c(o ?? a.current), f({}), R(!1), I(0);
121
+ }, []), M = l(
122
+ (o) => {
123
+ if (o == null || o.preventDefault(), y.current) return;
124
+ R(!0), I((p) => p + 1);
125
+ const w = t.safeParse(r);
126
+ if (!w.success) {
127
+ const p = o == null ? void 0 : o.currentTarget;
128
+ if (i && p instanceof Element) {
129
+ const N = w.error.issues.map((Q) => String(Q.path[0] ?? "")).filter(Boolean);
130
+ H(p, N);
131
+ }
132
+ return;
133
+ }
134
+ const d = e == null ? void 0 : e(w.data, { reset: E, setValue: S, setValues: c });
135
+ if (d instanceof Promise) {
136
+ y.current = !0, V(!0);
137
+ const p = () => {
138
+ y.current = !1, V(!1);
139
+ };
140
+ d.then(p, p);
141
+ }
142
+ },
143
+ [t, r, e, E, S, i]
144
+ );
145
+ return q(
146
+ () => ({
147
+ /** Current form values. */
148
+ values: r,
149
+ /** `{ field: firstErrorMessage }` for every invalid field (regardless of visibility). */
150
+ errors: m,
151
+ /** Which fields have been blurred. */
152
+ touched: u,
153
+ /** True when the whole form passes the schema. */
154
+ isValid: _,
155
+ /** True once a submit has been attempted. */
156
+ isSubmitted: g,
157
+ /** Number of submit attempts (increments on every `handleSubmit`). */
158
+ submitCount: C,
159
+ /** True while an async `onSubmit` is in flight. */
160
+ isSubmitting: O,
161
+ /** Spread onto a `<TextField />`: wires value/onChange/onBlur and shows the field's error. */
162
+ field: F,
163
+ /** Imperatively set one field's value. */
164
+ setValue: S,
165
+ /** Replace all values. */
166
+ setValues: c,
167
+ /** Reset to `defaultValues` (or the given values) and clear touched/submitted state. */
168
+ reset: E,
169
+ /** Form `onSubmit` handler — validates, then calls `onSubmit` with parsed values when valid. */
170
+ handleSubmit: M
171
+ }),
172
+ [
173
+ r,
174
+ m,
175
+ u,
176
+ _,
177
+ g,
178
+ C,
179
+ O,
180
+ F,
181
+ S,
182
+ c,
183
+ E,
184
+ M
185
+ ]
186
+ );
187
+ }
188
+ export {
189
+ et as a,
190
+ tt as b,
191
+ k as c,
192
+ Z as u
193
+ };
194
+ //# sourceMappingURL=useForm-CGbJ44Gp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useForm-CGbJ44Gp.js","sources":["../src/hooks/useDisclosure.ts","../src/hooks/useTableQuery.ts","../src/hooks/useQueryModal.ts","../src/form/useForm.ts"],"sourcesContent":["import { useCallback, useState } from 'react'\n\nexport interface UseDisclosureReturn {\n isOpen: boolean\n open: () => void\n close: () => void\n toggle: () => void\n}\n\nexport function useDisclosure(initial = false): UseDisclosureReturn {\n const [isOpen, setIsOpen] = useState(initial)\n const open = useCallback(() => setIsOpen(true), [])\n const close = useCallback(() => setIsOpen(false), [])\n const toggle = useCallback(() => setIsOpen((v) => !v), [])\n return { isOpen, open, close, toggle }\n}\n","import { useCallback, useState } from 'react'\nimport type { TableChangeState } from '../components/Table'\n\n/** A page of rows + the total the server counted (after filters, before paging). */\nexport interface TablePage<T> {\n items: T[]\n totalCount: number\n}\n\n/**\n * The slice of a data-fetching result a server-driven table needs — matches TanStack Query's\n * `useQuery` result (`data`, `isFetching`), SWR's (`data`, `isValidating` → pass it as `isFetching`), or\n * any hand-rolled state.\n */\nexport interface TableQueryResult<T> {\n data?: TablePage<T> | null\n /** A request is in flight (the first load or a refetch). */\n isFetching?: boolean\n}\n\nexport interface UseTableQueryReturn {\n /**\n * The request's query string the table built from its page / size / search / sort / filters (via the\n * app's `config.table.query` mapping + the table's `queryMapping`) — `null` until the table has reported\n * its first state. Put it in the query key and gate the request on it: `enabled: query !== null`.\n */\n query: string | null\n /** The full state from the table's last `onChange` (page, size, search, sort, filters, params). */\n state: TableChangeState | null\n /**\n * The server-mode `<Table>` props for a fetch result — spread them on: `manualPagination`, `data`,\n * `rowCount`, `loading` and `onChange`.\n */\n props: <T>(result: TableQueryResult<T>) => {\n manualPagination: true\n data: T[]\n rowCount: number\n loading: boolean\n onChange: (state: TableChangeState) => void\n }\n}\n\n/**\n * Removes the boilerplate from a **server-driven `<Table>`**: it holds the request query string the table\n * builds on every change, and maps a fetch result back onto the table's server-mode props. The fetch stays\n * yours (TanStack Query, SWR, …) — call it at the top level with `query`:\n *\n * ```tsx\n * const table = useTableQuery()\n * const users = useQuery({\n * queryKey: ['users', table.query],\n * queryFn: () => api.users(table.query!), // → { items, totalCount }\n * enabled: table.query !== null, // wait for the table's first state — no unparameterised request\n * placeholderData: (previous) => previous, // keep the old page on screen while the next loads\n * })\n * <Table {...table.props(users)} columns={columns} searchable getRowId={(u) => u.id} />\n * ```\n *\n * `totalCount` must be the **server's** total (never `items.length`), or the pager shows a single page.\n */\nexport function useTableQuery(): UseTableQueryReturn {\n const [state, setState] = useState<TableChangeState | null>(null)\n const onChange = useCallback((next: TableChangeState) => setState(next), [])\n return {\n query: state ? state.query : null,\n state,\n props: <T>(result: TableQueryResult<T>) => ({\n manualPagination: true as const,\n data: result.data?.items ?? [],\n rowCount: result.data?.totalCount ?? 0,\n loading: Boolean(result.isFetching),\n onChange,\n }),\n }\n}\n","import { useCallback, useSyncExternalStore } from 'react'\nimport { removeQueryParam, useClearUrlOnUnmount } from './useClearUrlOnUnmount'\n\n/** Fired after every `useQueryModal` URL write, so other instances watching the same key re-read the URL. */\nconst QUERY_EVENT = 'tz:querymodal'\n/** Marker stored in `history.state` on the entry an `open()` pushed — lets `close()` step Back over it. */\nconst STATE_MARKER = '__tzQueryModal'\n\n/**\n * Identifies THIS document's pushes. `history.state` survives a reload, but the entry before a pushed one then\n * belongs to the discarded document — stepping Back into it would be a full page load, so a marker from another\n * document is treated like no marker (close just drops the param).\n */\nconst DOCUMENT_ID = Math.random().toString(36).slice(2)\n/** Keys whose `close()` has stepped Back and is waiting for the popstate — a second close is a no-op. */\nconst closing = new Set<string>()\n\n/** The value an `open()` without an argument writes (`?create=1`). */\nconst FLAG_VALUE = '1'\n\nexport interface UseQueryModalOptions {\n /**\n * Push a browser-history entry when the modal opens, so **Back closes it** (instead of leaving the page).\n * Defaults to `true`; `false` replaces the current entry instead (no history step).\n */\n push?: boolean\n /**\n * Remove the param when the component using the hook unmounts **on the same page** (the pathname it was\n * opened on is still showing) — so a modal that goes away with its page section doesn't leave a stale\n * `?customer=…` behind. After a navigation to another pathname nothing is touched. Defaults to `true`.\n */\n clearUrlOnUnmount?: boolean\n}\n\nexport interface UseQueryModalReturn {\n /** Whether the param is in the URL — pass it as the modal's `open`. */\n isOpen: boolean\n /** The param's value (e.g. the record id from `open(id)`), or `null` while closed. `'1'` for `open()`. */\n value: string | null\n /** Open: write `?<key>=<value>` (value defaults to `'1'`). Re-opening with another value swaps it in place. */\n open: (value?: string) => void\n /** Close: step Back over the entry `open()` pushed, else remove the param (e.g. after a shared link). */\n close: () => void\n}\n\nconst readParam = (key: string): string | null =>\n typeof window === 'undefined' ? null : new URLSearchParams(window.location.search).get(key)\n\nconst subscribe = (onChange: () => void) => {\n window.addEventListener('popstate', onChange)\n window.addEventListener(QUERY_EVENT, onChange)\n return () => {\n window.removeEventListener('popstate', onChange)\n window.removeEventListener(QUERY_EVENT, onChange)\n }\n}\n\n/** Write `params` into the current URL (keeping the path + hash), via push or replace, then notify. */\nfunction writeUrl(params: URLSearchParams, mode: 'push' | 'replace', state: unknown) {\n const query = params.toString()\n const url = `${window.location.pathname}${query ? `?${query}` : ''}${window.location.hash}`\n window.history[mode === 'push' ? 'pushState' : 'replaceState'](state, '', url)\n window.dispatchEvent(new Event(QUERY_EVENT))\n}\n\nconst markerFor = (key: string) => `${DOCUMENT_ID}:${key}`\nconst markedFor = (state: unknown, key: string) =>\n state != null &&\n typeof state === 'object' &&\n (state as Record<string, unknown>)[STATE_MARKER] === markerFor(key)\n\nconst withoutMarker = (state: unknown) => {\n if (state == null || typeof state !== 'object' || !(STATE_MARKER in state)) return state\n const rest = { ...(state as Record<string, unknown>) }\n delete rest[STATE_MARKER]\n return rest\n}\n\n/**\n * A modal / drawer / dialog whose **open state lives in the URL query** — `?customer=242a…` — so the page can\n * be shared or reloaded, or opened in a new tab, with the modal already open (and showing the right record).\n * Pair it with any overlay: `<Modal open={m.isOpen} onClose={m.close}>…{m.value}</Modal>`. Opening pushes a\n * history entry (Back closes the modal); closing steps back over it, or just removes the param when the modal\n * was opened from a link. Other params (`?tab=…`, a `Table`'s page / size) and the hash are kept; every\n * instance using the same `key` stays in sync. Purely opt-in — a plain `Modal` is unaffected.\n *\n * ```tsx\n * const sheet = useQueryModal('customer')\n * <Button onClick={() => sheet.open(row.id)}>View</Button>\n * <Modal open={sheet.isOpen} onClose={sheet.close} placement=\"right\" title=\"Customer\">\n * {sheet.value && <CustomerDetails id={sheet.value} />}\n * </Modal>\n * ```\n */\nexport function useQueryModal(\n key: string,\n options: UseQueryModalOptions = {},\n): UseQueryModalReturn {\n const { push = true, clearUrlOnUnmount = true } = options\n const value = useSyncExternalStore(\n subscribe,\n () => readParam(key),\n () => null,\n )\n\n const open = useCallback(\n (next: string = FLAG_VALUE) => {\n if (typeof window === 'undefined') return\n const params = new URLSearchParams(window.location.search)\n const current = params.get(key)\n if (current === next) return\n params.set(key, next)\n // already open (another record): swap in place; otherwise a new entry (Back closes) unless push=false\n if (current == null && push) {\n writeUrl(params, 'push', {\n ...((window.history.state as object | null) ?? {}),\n [STATE_MARKER]: markerFor(key),\n })\n } else {\n writeUrl(params, 'replace', window.history.state)\n }\n },\n [key, push],\n )\n\n const close = useCallback(() => {\n if (typeof window === 'undefined' || closing.has(key)) return\n const params = new URLSearchParams(window.location.search)\n if (!params.has(key)) return\n // we pushed this entry (in this document) → step Back over it (the popstate re-reads the URL); else (a\n // shared link, a reload, push=false) there is nothing of ours to go back to — just drop the param\n if (markedFor(window.history.state, key)) {\n // …and if the entry we land on still carries the param (something inside the modal — e.g. its own\n // Tabs — pushed further entries), drop it there, so Close always closes. `closing` makes a second\n // close() before the popstate a no-op (it would step Back twice and leave the page).\n closing.add(key)\n const settle = () => {\n window.removeEventListener('popstate', settle)\n closing.delete(key)\n const landed = new URLSearchParams(window.location.search)\n if (!landed.has(key)) return\n landed.delete(key)\n writeUrl(landed, 'replace', withoutMarker(window.history.state))\n }\n window.addEventListener('popstate', settle)\n window.history.back()\n return\n }\n params.delete(key)\n writeUrl(params, 'replace', withoutMarker(window.history.state))\n }, [key])\n\n // unmount on the same page → drop the param (the shared rule; deferred so StrictMode keeps a deep link)\n useClearUrlOnUnmount(key, clearUrlOnUnmount, () => {\n if (removeQueryParam(key, withoutMarker(window.history.state))) {\n window.dispatchEvent(new Event(QUERY_EVENT))\n }\n })\n\n return { isOpen: value != null, value, open, close }\n}\n","import {\n useCallback,\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n type Dispatch,\n type FocusEvent,\n type SetStateAction,\n type SyntheticEvent,\n} from 'react'\nimport type { TypeOf, ZodType } from 'zod'\n\n/**\n * When validation errors start showing for a field:\n * - `blurThenLive` (default) — after the field is blurred (or the form is submitted), then live on every change.\n * - `change` — from the very first keystroke.\n * - `submit` — only after a submit attempt.\n */\nexport type FormValidationMode = 'blurThenLive' | 'change' | 'submit'\n\nexport interface UseFormOptions<S extends ZodType> {\n /** Zod schema describing the whole form. Field names match the schema's top-level keys. */\n schema: S\n /** Initial values — the controlled source of truth for every field. */\n defaultValues: TypeOf<S>\n /**\n * Called with the parsed (schema-validated) values when a submit passes validation. The second\n * argument carries helpers — e.g. `reset` to clear the form on success: `(values, { reset }) => {…}`.\n */\n onSubmit?: (values: TypeOf<S>, helpers: FormHelpers<TypeOf<S>>) => void | Promise<void>\n /** When errors begin to show per field. Defaults to `blurThenLive`. */\n mode?: FormValidationMode\n /**\n * On a failed submit, smooth-scroll to (and focus) the first invalid field — the one that sits\n * **highest** on the page. Needs the submit event's form element (works with `<Form>` or any\n * `<form onSubmit={form.handleSubmit}>`). Defaults to `true`.\n */\n scrollToError?: boolean\n}\n\n/** Helpers handed to `onSubmit` (Formik-style), so you can clear or tweak the form on success. */\nexport interface FormHelpers<Values> {\n /** Reset to `defaultValues` (or the given values), clearing touched/submitted state. */\n reset: (next?: Values) => void\n /** Set one field's value. */\n setValue: <K extends keyof Values & string>(name: K, value: Values[K]) => void\n /** Replace all values. */\n setValues: Dispatch<SetStateAction<Values>>\n}\n\n/** Props returned by `field(name)` — spread directly onto a `<TextField />`. */\nexport interface FieldProps {\n name: string\n value: string\n onChange: (event: ChangeEvent<HTMLInputElement>) => void\n onBlur: (event: FocusEvent<HTMLInputElement>) => void\n error: boolean\n helperText?: string\n}\n\n/** Everything `useForm` returns — also the value carried by `<Form>`'s context. */\nexport interface FormApi<Values> {\n /** Current form values. */\n values: Values\n /** `{ field: firstErrorMessage }` for every invalid field (regardless of visibility). */\n errors: Record<string, string>\n /** Which fields have been blurred. */\n touched: Record<string, boolean>\n /** True when the whole form passes the schema. */\n isValid: boolean\n /** True once a submit has been attempted. */\n isSubmitted: boolean\n /** Number of submit attempts (increments on every `handleSubmit`) — watch it to react to each submit. */\n submitCount: number\n /** True while an async `onSubmit` is in flight. */\n isSubmitting: boolean\n /** Spread onto a `<TextField />` (or let `<Form>` + a `name` prop wire it for you). */\n field: (name: keyof Values & string) => FieldProps\n /** Imperatively set one field's value. */\n setValue: <K extends keyof Values & string>(name: K, value: Values[K]) => void\n /** Replace all values. */\n setValues: Dispatch<SetStateAction<Values>>\n /** Reset to `defaultValues` (or the given values) and clear touched/submitted state. */\n reset: (next?: Values) => void\n /** Form `onSubmit` handler — validates, then calls `onSubmit` with parsed values when valid. */\n handleSubmit: (event?: SyntheticEvent) => void\n}\n\n/**\n * Smooth-scroll to (and focus) the highest invalid field inside `scope`, matched by its `name`\n * attribute. \"Highest\" = smallest viewport `top`, so it lands on the first red field regardless of\n * DOM vs. visual order. No-op if none of the names resolve to an element.\n */\nfunction scrollToFirstError(scope: Element, names: string[]) {\n let target: HTMLElement | null = null\n let top = Number.POSITIVE_INFINITY\n for (const name of names) {\n const selector = typeof CSS !== 'undefined' && CSS.escape ? CSS.escape(name) : name\n const el = scope.querySelector<HTMLElement>(`[name=\"${selector}\"]`)\n if (!el) continue\n const elTop = el.getBoundingClientRect().top\n if (elTop < top) {\n top = elTop\n target = el\n }\n }\n if (!target) return\n if (typeof target.scrollIntoView === 'function') {\n target.scrollIntoView({ behavior: 'smooth', block: 'center' })\n }\n target.focus({ preventScroll: true })\n}\n\n/** Runs the schema and reduces Zod issues to a `{ field: firstMessage }` map. */\nfunction collectErrors(schema: ZodType, values: unknown): Record<string, string> {\n const result = schema.safeParse(values)\n if (result.success) return {}\n const errors: Record<string, string> = {}\n for (const issue of result.error.issues) {\n // path-less issues (a root `.refine()` / `.superRefine()`, e.g. password-confirm) land under a\n // reserved `_form` key so `isValid` reflects them and the message is surfaceable — instead of\n // being silently dropped (which made the form look valid while submit no-op'd).\n const key = String(issue.path[0] ?? '_form')\n if (!(key in errors)) errors[key] = issue.message // keep the first issue per field\n }\n return errors\n}\n\n/**\n * A tiny, Zod-powered form helper — the dependency-light alternative to bundling Formik in\n * every app. Give it a schema and initial values; spread `field(name)` onto a `<TextField />`\n * and it wires up `value`/`onChange`/`onBlur` and surfaces the field's validation error as\n * `error` + `helperText`. Validation follows `mode` (default: validate on blur, then live).\n * `handleSubmit` validates the whole form and calls `onSubmit` with the parsed values only when valid.\n */\nexport function useForm<S extends ZodType>({\n schema,\n defaultValues,\n onSubmit,\n mode = 'blurThenLive',\n scrollToError = true,\n}: UseFormOptions<S>): FormApi<TypeOf<S>> {\n type Values = TypeOf<S>\n\n const [values, setValues] = useState<Values>(defaultValues)\n // hold the initial values in a first-render ref so `reset`'s identity doesn't churn when the caller\n // passes an inline `defaultValues` literal (a fresh object every render)\n const defaultValuesRef = useRef(defaultValues)\n const [touched, setTouched] = useState<Record<string, boolean>>({})\n const [submitted, setSubmitted] = useState(false)\n const [submitCount, setSubmitCount] = useState(0)\n const [isSubmitting, setIsSubmitting] = useState(false)\n // synchronous re-entrancy guard — blocks a double-click before the `isSubmitting` re-render lands\n const submittingRef = useRef(false)\n\n const errors = useMemo(() => collectErrors(schema, values), [schema, values])\n const isValid = Object.keys(errors).length === 0\n\n /** Whether a field's error should currently be visible, per the chosen mode. */\n const isShown = useCallback(\n (name: string) => {\n if (mode === 'change') return true\n if (mode === 'submit') return submitted\n return submitted || touched[name] === true // blurThenLive\n },\n [mode, submitted, touched],\n )\n\n const setValue = useCallback(<K extends keyof Values & string>(name: K, value: Values[K]) => {\n setValues((prev) => ({ ...prev, [name]: value }))\n }, [])\n\n const field = useCallback(\n (name: keyof Values & string): FieldProps => {\n const raw = values[name]\n return {\n name,\n value: raw == null ? '' : String(raw),\n onChange: (event) => setValue(name, event.target.value as Values[typeof name]),\n onBlur: () => {\n // always record touched (so `FormApi.touched` is accurate in every mode); when a field's\n // error becomes *visible* is governed separately by `isShown`/`mode`\n setTouched((prev) => (prev[name] ? prev : { ...prev, [name]: true }))\n },\n error: isShown(name) && Boolean(errors[name]),\n helperText: isShown(name) ? errors[name] : undefined,\n }\n },\n [values, errors, isShown, setValue, mode],\n )\n\n const reset = useCallback((next?: Values) => {\n setValues(next ?? defaultValuesRef.current)\n setTouched({})\n setSubmitted(false)\n setSubmitCount(0)\n }, [])\n\n const handleSubmit = useCallback(\n (event?: SyntheticEvent) => {\n event?.preventDefault()\n if (submittingRef.current) return // ignore re-entrant submits while an async onSubmit is in flight\n setSubmitted(true)\n setSubmitCount((c) => c + 1)\n\n const result = schema.safeParse(values)\n if (!result.success) {\n // errors are derived + now shown (submitted); jump to the first red field if we have the form\n const scope = event?.currentTarget\n if (scrollToError && scope instanceof Element) {\n const names = result.error.issues\n .map((issue) => String(issue.path[0] ?? ''))\n .filter(Boolean)\n scrollToFirstError(scope, names)\n }\n return\n }\n\n const outcome = onSubmit?.(result.data as Values, { reset, setValue, setValues })\n if (outcome instanceof Promise) {\n submittingRef.current = true\n setIsSubmitting(true)\n const done = () => {\n submittingRef.current = false\n setIsSubmitting(false)\n }\n // clear on resolve OR reject — `.then(done, done)` also marks the rejection handled\n // (a bare `.finally` would re-throw into a discarded chain → unhandled promise rejection)\n outcome.then(done, done)\n }\n },\n [schema, values, onSubmit, reset, setValue, scrollToError],\n )\n\n // memoized so `<Form>` (which feeds this straight into context) doesn't re-render every bound field\n // on each render of the form-owning component — only when a real piece of state/identity changes\n return useMemo(\n () => ({\n /** Current form values. */\n values,\n /** `{ field: firstErrorMessage }` for every invalid field (regardless of visibility). */\n errors,\n /** Which fields have been blurred. */\n touched,\n /** True when the whole form passes the schema. */\n isValid,\n /** True once a submit has been attempted. */\n isSubmitted: submitted,\n /** Number of submit attempts (increments on every `handleSubmit`). */\n submitCount,\n /** True while an async `onSubmit` is in flight. */\n isSubmitting,\n /** Spread onto a `<TextField />`: wires value/onChange/onBlur and shows the field's error. */\n field,\n /** Imperatively set one field's value. */\n setValue,\n /** Replace all values. */\n setValues,\n /** Reset to `defaultValues` (or the given values) and clear touched/submitted state. */\n reset,\n /** Form `onSubmit` handler — validates, then calls `onSubmit` with parsed values when valid. */\n handleSubmit,\n }),\n [\n values,\n errors,\n touched,\n isValid,\n submitted,\n submitCount,\n isSubmitting,\n field,\n setValue,\n setValues,\n reset,\n handleSubmit,\n ],\n )\n}\n"],"names":["useDisclosure","initial","isOpen","setIsOpen","useState","open","useCallback","close","toggle","v","useTableQuery","state","setState","onChange","next","result","_a","_b","QUERY_EVENT","STATE_MARKER","DOCUMENT_ID","closing","FLAG_VALUE","readParam","key","subscribe","writeUrl","params","mode","query","url","markerFor","markedFor","withoutMarker","rest","useQueryModal","options","push","clearUrlOnUnmount","value","useSyncExternalStore","current","settle","landed","useClearUrlOnUnmount","removeQueryParam","scrollToFirstError","scope","names","target","top","name","selector","el","elTop","collectErrors","schema","values","errors","issue","useForm","defaultValues","onSubmit","scrollToError","setValues","defaultValuesRef","useRef","touched","setTouched","submitted","setSubmitted","submitCount","setSubmitCount","isSubmitting","setIsSubmitting","submittingRef","useMemo","isValid","isShown","setValue","prev","field","raw","event","reset","handleSubmit","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MACAS;AAAA,MACAU;AAAA,MACAR;AAAA,MACAE;AAAA,MACAE;AAAA,MACAQ;AAAA,MACAF;AAAA,MACAf;AAAA,MACAoB;AAAA,MACAC;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const s=require("react"),_=require("./useClearUrlOnUnmount-Cg7v2y5B.cjs");function B(e=!1){const[u,t]=s.useState(e),n=s.useCallback(()=>t(!0),[]),a=s.useCallback(()=>t(!1),[]),r=s.useCallback(()=>t(c=>!c),[]);return{isOpen:u,open:n,close:a,toggle:r}}function D(){const[e,u]=s.useState(null),t=s.useCallback(n=>u(n),[]);return{query:e?e.query:null,state:e,props:n=>{var a,r;return{manualPagination:!0,data:((a=n.data)==null?void 0:a.items)??[],rowCount:((r=n.data)==null?void 0:r.totalCount)??0,loading:!!n.isFetching,onChange:t}}}}const C="tz:querymodal",E="__tzQueryModal",N=Math.random().toString(36).slice(2),L=new Set,A="1",j=e=>typeof window>"u"?null:new URLSearchParams(window.location.search).get(e),k=e=>(window.addEventListener("popstate",e),window.addEventListener(C,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(C,e)});function g(e,u,t){const n=e.toString(),a=`${window.location.pathname}${n?`?${n}`:""}${window.location.hash}`;window.history[u==="push"?"pushState":"replaceState"](t,"",a),window.dispatchEvent(new Event(C))}const q=e=>`${N}:${e}`,z=(e,u)=>e!=null&&typeof e=="object"&&e[E]===q(u),T=e=>{if(e==null||typeof e!="object"||!(E in e))return e;const u={...e};return delete u[E],u};function Y(e,u={}){const{push:t=!0,clearUrlOnUnmount:n=!0}=u,a=s.useSyncExternalStore(k,()=>j(e),()=>null),r=s.useCallback((l=A)=>{if(typeof window>"u")return;const i=new URLSearchParams(window.location.search),f=i.get(e);f!==l&&(i.set(e,l),f==null&&t?g(i,"push",{...window.history.state??{},[E]:q(e)}):g(i,"replace",window.history.state))},[e,t]),c=s.useCallback(()=>{if(typeof window>"u"||L.has(e))return;const l=new URLSearchParams(window.location.search);if(l.has(e)){if(z(window.history.state,e)){L.add(e);const i=()=>{window.removeEventListener("popstate",i),L.delete(e);const f=new URLSearchParams(window.location.search);f.has(e)&&(f.delete(e),g(f,"replace",T(window.history.state)))};window.addEventListener("popstate",i),window.history.back();return}l.delete(e),g(l,"replace",T(window.history.state))}},[e]);return _.useClearUrlOnUnmount(e,n,()=>{_.removeQueryParam(e,T(window.history.state))&&window.dispatchEvent(new Event(C))}),{isOpen:a!=null,value:a,open:r,close:c}}function x(e,u){let t=null,n=Number.POSITIVE_INFINITY;for(const a of u){const r=typeof CSS<"u"&&CSS.escape?CSS.escape(a):a,c=e.querySelector(`[name="${r}"]`);if(!c)continue;const l=c.getBoundingClientRect().top;l<n&&(n=l,t=c)}t&&(typeof t.scrollIntoView=="function"&&t.scrollIntoView({behavior:"smooth",block:"center"}),t.focus({preventScroll:!0}))}function G(e,u){const t=e.safeParse(u);if(t.success)return{};const n={};for(const a of t.error.issues){const r=String(a.path[0]??"_form");r in n||(n[r]=a.message)}return n}function K({schema:e,defaultValues:u,onSubmit:t,mode:n="blurThenLive",scrollToError:a=!0}){const[r,c]=s.useState(u),l=s.useRef(u),[i,f]=s.useState({}),[b,v]=s.useState(!1),[R,P]=s.useState(0),[I,M]=s.useState(!1),y=s.useRef(!1),h=s.useMemo(()=>G(e,r),[e,r]),O=Object.keys(h).length===0,U=s.useCallback(o=>n==="change"?!0:n==="submit"?b:b||i[o]===!0,[n,b,i]),S=s.useCallback((o,w)=>{c(d=>({...d,[o]:w}))},[]),F=s.useCallback(o=>{const w=r[o];return{name:o,value:w==null?"":String(w),onChange:d=>S(o,d.target.value),onBlur:()=>{f(d=>d[o]?d:{...d,[o]:!0})},error:U(o)&&!!h[o],helperText:U(o)?h[o]:void 0}},[r,h,U,S,n]),m=s.useCallback(o=>{c(o??l.current),f({}),v(!1),P(0)},[]),V=s.useCallback(o=>{if(o==null||o.preventDefault(),y.current)return;v(!0),P(p=>p+1);const w=e.safeParse(r);if(!w.success){const p=o==null?void 0:o.currentTarget;if(a&&p instanceof Element){const Q=w.error.issues.map($=>String($.path[0]??"")).filter(Boolean);x(p,Q)}return}const d=t==null?void 0:t(w.data,{reset:m,setValue:S,setValues:c});if(d instanceof Promise){y.current=!0,M(!0);const p=()=>{y.current=!1,M(!1)};d.then(p,p)}},[e,r,t,m,S,a]);return s.useMemo(()=>({values:r,errors:h,touched:i,isValid:O,isSubmitted:b,submitCount:R,isSubmitting:I,field:F,setValue:S,setValues:c,reset:m,handleSubmit:V}),[r,h,i,O,b,R,I,F,S,c,m,V])}exports.useDisclosure=B;exports.useForm=K;exports.useQueryModal=Y;exports.useTableQuery=D;
2
+ //# sourceMappingURL=useForm-CSw6r1n1.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useForm-CSw6r1n1.cjs","sources":["../src/hooks/useDisclosure.ts","../src/hooks/useTableQuery.ts","../src/hooks/useQueryModal.ts","../src/form/useForm.ts"],"sourcesContent":["import { useCallback, useState } from 'react'\n\nexport interface UseDisclosureReturn {\n isOpen: boolean\n open: () => void\n close: () => void\n toggle: () => void\n}\n\nexport function useDisclosure(initial = false): UseDisclosureReturn {\n const [isOpen, setIsOpen] = useState(initial)\n const open = useCallback(() => setIsOpen(true), [])\n const close = useCallback(() => setIsOpen(false), [])\n const toggle = useCallback(() => setIsOpen((v) => !v), [])\n return { isOpen, open, close, toggle }\n}\n","import { useCallback, useState } from 'react'\nimport type { TableChangeState } from '../components/Table'\n\n/** A page of rows + the total the server counted (after filters, before paging). */\nexport interface TablePage<T> {\n items: T[]\n totalCount: number\n}\n\n/**\n * The slice of a data-fetching result a server-driven table needs — matches TanStack Query's\n * `useQuery` result (`data`, `isFetching`), SWR's (`data`, `isValidating` → pass it as `isFetching`), or\n * any hand-rolled state.\n */\nexport interface TableQueryResult<T> {\n data?: TablePage<T> | null\n /** A request is in flight (the first load or a refetch). */\n isFetching?: boolean\n}\n\nexport interface UseTableQueryReturn {\n /**\n * The request's query string the table built from its page / size / search / sort / filters (via the\n * app's `config.table.query` mapping + the table's `queryMapping`) — `null` until the table has reported\n * its first state. Put it in the query key and gate the request on it: `enabled: query !== null`.\n */\n query: string | null\n /** The full state from the table's last `onChange` (page, size, search, sort, filters, params). */\n state: TableChangeState | null\n /**\n * The server-mode `<Table>` props for a fetch result — spread them on: `manualPagination`, `data`,\n * `rowCount`, `loading` and `onChange`.\n */\n props: <T>(result: TableQueryResult<T>) => {\n manualPagination: true\n data: T[]\n rowCount: number\n loading: boolean\n onChange: (state: TableChangeState) => void\n }\n}\n\n/**\n * Removes the boilerplate from a **server-driven `<Table>`**: it holds the request query string the table\n * builds on every change, and maps a fetch result back onto the table's server-mode props. The fetch stays\n * yours (TanStack Query, SWR, …) — call it at the top level with `query`:\n *\n * ```tsx\n * const table = useTableQuery()\n * const users = useQuery({\n * queryKey: ['users', table.query],\n * queryFn: () => api.users(table.query!), // → { items, totalCount }\n * enabled: table.query !== null, // wait for the table's first state — no unparameterised request\n * placeholderData: (previous) => previous, // keep the old page on screen while the next loads\n * })\n * <Table {...table.props(users)} columns={columns} searchable getRowId={(u) => u.id} />\n * ```\n *\n * `totalCount` must be the **server's** total (never `items.length`), or the pager shows a single page.\n */\nexport function useTableQuery(): UseTableQueryReturn {\n const [state, setState] = useState<TableChangeState | null>(null)\n const onChange = useCallback((next: TableChangeState) => setState(next), [])\n return {\n query: state ? state.query : null,\n state,\n props: <T>(result: TableQueryResult<T>) => ({\n manualPagination: true as const,\n data: result.data?.items ?? [],\n rowCount: result.data?.totalCount ?? 0,\n loading: Boolean(result.isFetching),\n onChange,\n }),\n }\n}\n","import { useCallback, useSyncExternalStore } from 'react'\nimport { removeQueryParam, useClearUrlOnUnmount } from './useClearUrlOnUnmount'\n\n/** Fired after every `useQueryModal` URL write, so other instances watching the same key re-read the URL. */\nconst QUERY_EVENT = 'tz:querymodal'\n/** Marker stored in `history.state` on the entry an `open()` pushed — lets `close()` step Back over it. */\nconst STATE_MARKER = '__tzQueryModal'\n\n/**\n * Identifies THIS document's pushes. `history.state` survives a reload, but the entry before a pushed one then\n * belongs to the discarded document — stepping Back into it would be a full page load, so a marker from another\n * document is treated like no marker (close just drops the param).\n */\nconst DOCUMENT_ID = Math.random().toString(36).slice(2)\n/** Keys whose `close()` has stepped Back and is waiting for the popstate — a second close is a no-op. */\nconst closing = new Set<string>()\n\n/** The value an `open()` without an argument writes (`?create=1`). */\nconst FLAG_VALUE = '1'\n\nexport interface UseQueryModalOptions {\n /**\n * Push a browser-history entry when the modal opens, so **Back closes it** (instead of leaving the page).\n * Defaults to `true`; `false` replaces the current entry instead (no history step).\n */\n push?: boolean\n /**\n * Remove the param when the component using the hook unmounts **on the same page** (the pathname it was\n * opened on is still showing) — so a modal that goes away with its page section doesn't leave a stale\n * `?customer=…` behind. After a navigation to another pathname nothing is touched. Defaults to `true`.\n */\n clearUrlOnUnmount?: boolean\n}\n\nexport interface UseQueryModalReturn {\n /** Whether the param is in the URL — pass it as the modal's `open`. */\n isOpen: boolean\n /** The param's value (e.g. the record id from `open(id)`), or `null` while closed. `'1'` for `open()`. */\n value: string | null\n /** Open: write `?<key>=<value>` (value defaults to `'1'`). Re-opening with another value swaps it in place. */\n open: (value?: string) => void\n /** Close: step Back over the entry `open()` pushed, else remove the param (e.g. after a shared link). */\n close: () => void\n}\n\nconst readParam = (key: string): string | null =>\n typeof window === 'undefined' ? null : new URLSearchParams(window.location.search).get(key)\n\nconst subscribe = (onChange: () => void) => {\n window.addEventListener('popstate', onChange)\n window.addEventListener(QUERY_EVENT, onChange)\n return () => {\n window.removeEventListener('popstate', onChange)\n window.removeEventListener(QUERY_EVENT, onChange)\n }\n}\n\n/** Write `params` into the current URL (keeping the path + hash), via push or replace, then notify. */\nfunction writeUrl(params: URLSearchParams, mode: 'push' | 'replace', state: unknown) {\n const query = params.toString()\n const url = `${window.location.pathname}${query ? `?${query}` : ''}${window.location.hash}`\n window.history[mode === 'push' ? 'pushState' : 'replaceState'](state, '', url)\n window.dispatchEvent(new Event(QUERY_EVENT))\n}\n\nconst markerFor = (key: string) => `${DOCUMENT_ID}:${key}`\nconst markedFor = (state: unknown, key: string) =>\n state != null &&\n typeof state === 'object' &&\n (state as Record<string, unknown>)[STATE_MARKER] === markerFor(key)\n\nconst withoutMarker = (state: unknown) => {\n if (state == null || typeof state !== 'object' || !(STATE_MARKER in state)) return state\n const rest = { ...(state as Record<string, unknown>) }\n delete rest[STATE_MARKER]\n return rest\n}\n\n/**\n * A modal / drawer / dialog whose **open state lives in the URL query** — `?customer=242a…` — so the page can\n * be shared or reloaded, or opened in a new tab, with the modal already open (and showing the right record).\n * Pair it with any overlay: `<Modal open={m.isOpen} onClose={m.close}>…{m.value}</Modal>`. Opening pushes a\n * history entry (Back closes the modal); closing steps back over it, or just removes the param when the modal\n * was opened from a link. Other params (`?tab=…`, a `Table`'s page / size) and the hash are kept; every\n * instance using the same `key` stays in sync. Purely opt-in — a plain `Modal` is unaffected.\n *\n * ```tsx\n * const sheet = useQueryModal('customer')\n * <Button onClick={() => sheet.open(row.id)}>View</Button>\n * <Modal open={sheet.isOpen} onClose={sheet.close} placement=\"right\" title=\"Customer\">\n * {sheet.value && <CustomerDetails id={sheet.value} />}\n * </Modal>\n * ```\n */\nexport function useQueryModal(\n key: string,\n options: UseQueryModalOptions = {},\n): UseQueryModalReturn {\n const { push = true, clearUrlOnUnmount = true } = options\n const value = useSyncExternalStore(\n subscribe,\n () => readParam(key),\n () => null,\n )\n\n const open = useCallback(\n (next: string = FLAG_VALUE) => {\n if (typeof window === 'undefined') return\n const params = new URLSearchParams(window.location.search)\n const current = params.get(key)\n if (current === next) return\n params.set(key, next)\n // already open (another record): swap in place; otherwise a new entry (Back closes) unless push=false\n if (current == null && push) {\n writeUrl(params, 'push', {\n ...((window.history.state as object | null) ?? {}),\n [STATE_MARKER]: markerFor(key),\n })\n } else {\n writeUrl(params, 'replace', window.history.state)\n }\n },\n [key, push],\n )\n\n const close = useCallback(() => {\n if (typeof window === 'undefined' || closing.has(key)) return\n const params = new URLSearchParams(window.location.search)\n if (!params.has(key)) return\n // we pushed this entry (in this document) → step Back over it (the popstate re-reads the URL); else (a\n // shared link, a reload, push=false) there is nothing of ours to go back to — just drop the param\n if (markedFor(window.history.state, key)) {\n // …and if the entry we land on still carries the param (something inside the modal — e.g. its own\n // Tabs — pushed further entries), drop it there, so Close always closes. `closing` makes a second\n // close() before the popstate a no-op (it would step Back twice and leave the page).\n closing.add(key)\n const settle = () => {\n window.removeEventListener('popstate', settle)\n closing.delete(key)\n const landed = new URLSearchParams(window.location.search)\n if (!landed.has(key)) return\n landed.delete(key)\n writeUrl(landed, 'replace', withoutMarker(window.history.state))\n }\n window.addEventListener('popstate', settle)\n window.history.back()\n return\n }\n params.delete(key)\n writeUrl(params, 'replace', withoutMarker(window.history.state))\n }, [key])\n\n // unmount on the same page → drop the param (the shared rule; deferred so StrictMode keeps a deep link)\n useClearUrlOnUnmount(key, clearUrlOnUnmount, () => {\n if (removeQueryParam(key, withoutMarker(window.history.state))) {\n window.dispatchEvent(new Event(QUERY_EVENT))\n }\n })\n\n return { isOpen: value != null, value, open, close }\n}\n","import {\n useCallback,\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n type Dispatch,\n type FocusEvent,\n type SetStateAction,\n type SyntheticEvent,\n} from 'react'\nimport type { TypeOf, ZodType } from 'zod'\n\n/**\n * When validation errors start showing for a field:\n * - `blurThenLive` (default) — after the field is blurred (or the form is submitted), then live on every change.\n * - `change` — from the very first keystroke.\n * - `submit` — only after a submit attempt.\n */\nexport type FormValidationMode = 'blurThenLive' | 'change' | 'submit'\n\nexport interface UseFormOptions<S extends ZodType> {\n /** Zod schema describing the whole form. Field names match the schema's top-level keys. */\n schema: S\n /** Initial values — the controlled source of truth for every field. */\n defaultValues: TypeOf<S>\n /**\n * Called with the parsed (schema-validated) values when a submit passes validation. The second\n * argument carries helpers — e.g. `reset` to clear the form on success: `(values, { reset }) => {…}`.\n */\n onSubmit?: (values: TypeOf<S>, helpers: FormHelpers<TypeOf<S>>) => void | Promise<void>\n /** When errors begin to show per field. Defaults to `blurThenLive`. */\n mode?: FormValidationMode\n /**\n * On a failed submit, smooth-scroll to (and focus) the first invalid field — the one that sits\n * **highest** on the page. Needs the submit event's form element (works with `<Form>` or any\n * `<form onSubmit={form.handleSubmit}>`). Defaults to `true`.\n */\n scrollToError?: boolean\n}\n\n/** Helpers handed to `onSubmit` (Formik-style), so you can clear or tweak the form on success. */\nexport interface FormHelpers<Values> {\n /** Reset to `defaultValues` (or the given values), clearing touched/submitted state. */\n reset: (next?: Values) => void\n /** Set one field's value. */\n setValue: <K extends keyof Values & string>(name: K, value: Values[K]) => void\n /** Replace all values. */\n setValues: Dispatch<SetStateAction<Values>>\n}\n\n/** Props returned by `field(name)` — spread directly onto a `<TextField />`. */\nexport interface FieldProps {\n name: string\n value: string\n onChange: (event: ChangeEvent<HTMLInputElement>) => void\n onBlur: (event: FocusEvent<HTMLInputElement>) => void\n error: boolean\n helperText?: string\n}\n\n/** Everything `useForm` returns — also the value carried by `<Form>`'s context. */\nexport interface FormApi<Values> {\n /** Current form values. */\n values: Values\n /** `{ field: firstErrorMessage }` for every invalid field (regardless of visibility). */\n errors: Record<string, string>\n /** Which fields have been blurred. */\n touched: Record<string, boolean>\n /** True when the whole form passes the schema. */\n isValid: boolean\n /** True once a submit has been attempted. */\n isSubmitted: boolean\n /** Number of submit attempts (increments on every `handleSubmit`) — watch it to react to each submit. */\n submitCount: number\n /** True while an async `onSubmit` is in flight. */\n isSubmitting: boolean\n /** Spread onto a `<TextField />` (or let `<Form>` + a `name` prop wire it for you). */\n field: (name: keyof Values & string) => FieldProps\n /** Imperatively set one field's value. */\n setValue: <K extends keyof Values & string>(name: K, value: Values[K]) => void\n /** Replace all values. */\n setValues: Dispatch<SetStateAction<Values>>\n /** Reset to `defaultValues` (or the given values) and clear touched/submitted state. */\n reset: (next?: Values) => void\n /** Form `onSubmit` handler — validates, then calls `onSubmit` with parsed values when valid. */\n handleSubmit: (event?: SyntheticEvent) => void\n}\n\n/**\n * Smooth-scroll to (and focus) the highest invalid field inside `scope`, matched by its `name`\n * attribute. \"Highest\" = smallest viewport `top`, so it lands on the first red field regardless of\n * DOM vs. visual order. No-op if none of the names resolve to an element.\n */\nfunction scrollToFirstError(scope: Element, names: string[]) {\n let target: HTMLElement | null = null\n let top = Number.POSITIVE_INFINITY\n for (const name of names) {\n const selector = typeof CSS !== 'undefined' && CSS.escape ? CSS.escape(name) : name\n const el = scope.querySelector<HTMLElement>(`[name=\"${selector}\"]`)\n if (!el) continue\n const elTop = el.getBoundingClientRect().top\n if (elTop < top) {\n top = elTop\n target = el\n }\n }\n if (!target) return\n if (typeof target.scrollIntoView === 'function') {\n target.scrollIntoView({ behavior: 'smooth', block: 'center' })\n }\n target.focus({ preventScroll: true })\n}\n\n/** Runs the schema and reduces Zod issues to a `{ field: firstMessage }` map. */\nfunction collectErrors(schema: ZodType, values: unknown): Record<string, string> {\n const result = schema.safeParse(values)\n if (result.success) return {}\n const errors: Record<string, string> = {}\n for (const issue of result.error.issues) {\n // path-less issues (a root `.refine()` / `.superRefine()`, e.g. password-confirm) land under a\n // reserved `_form` key so `isValid` reflects them and the message is surfaceable — instead of\n // being silently dropped (which made the form look valid while submit no-op'd).\n const key = String(issue.path[0] ?? '_form')\n if (!(key in errors)) errors[key] = issue.message // keep the first issue per field\n }\n return errors\n}\n\n/**\n * A tiny, Zod-powered form helper — the dependency-light alternative to bundling Formik in\n * every app. Give it a schema and initial values; spread `field(name)` onto a `<TextField />`\n * and it wires up `value`/`onChange`/`onBlur` and surfaces the field's validation error as\n * `error` + `helperText`. Validation follows `mode` (default: validate on blur, then live).\n * `handleSubmit` validates the whole form and calls `onSubmit` with the parsed values only when valid.\n */\nexport function useForm<S extends ZodType>({\n schema,\n defaultValues,\n onSubmit,\n mode = 'blurThenLive',\n scrollToError = true,\n}: UseFormOptions<S>): FormApi<TypeOf<S>> {\n type Values = TypeOf<S>\n\n const [values, setValues] = useState<Values>(defaultValues)\n // hold the initial values in a first-render ref so `reset`'s identity doesn't churn when the caller\n // passes an inline `defaultValues` literal (a fresh object every render)\n const defaultValuesRef = useRef(defaultValues)\n const [touched, setTouched] = useState<Record<string, boolean>>({})\n const [submitted, setSubmitted] = useState(false)\n const [submitCount, setSubmitCount] = useState(0)\n const [isSubmitting, setIsSubmitting] = useState(false)\n // synchronous re-entrancy guard — blocks a double-click before the `isSubmitting` re-render lands\n const submittingRef = useRef(false)\n\n const errors = useMemo(() => collectErrors(schema, values), [schema, values])\n const isValid = Object.keys(errors).length === 0\n\n /** Whether a field's error should currently be visible, per the chosen mode. */\n const isShown = useCallback(\n (name: string) => {\n if (mode === 'change') return true\n if (mode === 'submit') return submitted\n return submitted || touched[name] === true // blurThenLive\n },\n [mode, submitted, touched],\n )\n\n const setValue = useCallback(<K extends keyof Values & string>(name: K, value: Values[K]) => {\n setValues((prev) => ({ ...prev, [name]: value }))\n }, [])\n\n const field = useCallback(\n (name: keyof Values & string): FieldProps => {\n const raw = values[name]\n return {\n name,\n value: raw == null ? '' : String(raw),\n onChange: (event) => setValue(name, event.target.value as Values[typeof name]),\n onBlur: () => {\n // always record touched (so `FormApi.touched` is accurate in every mode); when a field's\n // error becomes *visible* is governed separately by `isShown`/`mode`\n setTouched((prev) => (prev[name] ? prev : { ...prev, [name]: true }))\n },\n error: isShown(name) && Boolean(errors[name]),\n helperText: isShown(name) ? errors[name] : undefined,\n }\n },\n [values, errors, isShown, setValue, mode],\n )\n\n const reset = useCallback((next?: Values) => {\n setValues(next ?? defaultValuesRef.current)\n setTouched({})\n setSubmitted(false)\n setSubmitCount(0)\n }, [])\n\n const handleSubmit = useCallback(\n (event?: SyntheticEvent) => {\n event?.preventDefault()\n if (submittingRef.current) return // ignore re-entrant submits while an async onSubmit is in flight\n setSubmitted(true)\n setSubmitCount((c) => c + 1)\n\n const result = schema.safeParse(values)\n if (!result.success) {\n // errors are derived + now shown (submitted); jump to the first red field if we have the form\n const scope = event?.currentTarget\n if (scrollToError && scope instanceof Element) {\n const names = result.error.issues\n .map((issue) => String(issue.path[0] ?? ''))\n .filter(Boolean)\n scrollToFirstError(scope, names)\n }\n return\n }\n\n const outcome = onSubmit?.(result.data as Values, { reset, setValue, setValues })\n if (outcome instanceof Promise) {\n submittingRef.current = true\n setIsSubmitting(true)\n const done = () => {\n submittingRef.current = false\n setIsSubmitting(false)\n }\n // clear on resolve OR reject — `.then(done, done)` also marks the rejection handled\n // (a bare `.finally` would re-throw into a discarded chain → unhandled promise rejection)\n outcome.then(done, done)\n }\n },\n [schema, values, onSubmit, reset, setValue, scrollToError],\n )\n\n // memoized so `<Form>` (which feeds this straight into context) doesn't re-render every bound field\n // on each render of the form-owning component — only when a real piece of state/identity changes\n return useMemo(\n () => ({\n /** Current form values. */\n values,\n /** `{ field: firstErrorMessage }` for every invalid field (regardless of visibility). */\n errors,\n /** Which fields have been blurred. */\n touched,\n /** True when the whole form passes the schema. */\n isValid,\n /** True once a submit has been attempted. */\n isSubmitted: submitted,\n /** Number of submit attempts (increments on every `handleSubmit`). */\n submitCount,\n /** True while an async `onSubmit` is in flight. */\n isSubmitting,\n /** Spread onto a `<TextField />`: wires value/onChange/onBlur and shows the field's error. */\n field,\n /** Imperatively set one field's value. */\n setValue,\n /** Replace all values. */\n setValues,\n /** Reset to `defaultValues` (or the given values) and clear touched/submitted state. */\n reset,\n /** Form `onSubmit` handler — validates, then calls `onSubmit` with parsed values when valid. */\n handleSubmit,\n }),\n [\n values,\n errors,\n touched,\n isValid,\n submitted,\n submitCount,\n isSubmitting,\n field,\n setValue,\n setValues,\n reset,\n handleSubmit,\n ],\n )\n}\n"],"names":["useDisclosure","initial","isOpen","setIsOpen","useState","open","useCallback","close","toggle","v","useTableQuery","state","setState","onChange","next","result","_a","_b","QUERY_EVENT","STATE_MARKER","DOCUMENT_ID","closing","FLAG_VALUE","readParam","key","subscribe","writeUrl","params","mode","query","url","markerFor","markedFor","withoutMarker","rest","useQueryModal","options","push","clearUrlOnUnmount","value","useSyncExternalStore","current","settle","landed","useClearUrlOnUnmount","removeQueryParam","scrollToFirstError","scope","names","target","top","name","selector","el","elTop","collectErrors","schema","values","errors","issue","useForm","defaultValues","onSubmit","scrollToError","setValues","defaultValuesRef","useRef","touched","setTouched","submitted","setSubmitted","submitCount","setSubmitCount","isSubmitting","setIsSubmitting","submittingRef","useMemo","isValid","isShown","setValue","prev","field","raw","event","reset","handleSubmit","c","outcome","done"],"mappings":"uFASO,SAASA,EAAcC,EAAU,GAA4B,CAClE,KAAM,CAACC,EAAQC,CAAS,EAAIC,EAAAA,SAASH,CAAO,EACtCI,EAAOC,EAAAA,YAAY,IAAMH,EAAU,EAAI,EAAG,CAAA,CAAE,EAC5CI,EAAQD,EAAAA,YAAY,IAAMH,EAAU,EAAK,EAAG,CAAA,CAAE,EAC9CK,EAASF,EAAAA,YAAY,IAAMH,EAAWM,GAAM,CAACA,CAAC,EAAG,EAAE,EACzD,MAAO,CAAE,OAAAP,EAAQ,KAAAG,EAAM,MAAAE,EAAO,OAAAC,CAAA,CAChC,CC6CO,SAASE,GAAqC,CACnD,KAAM,CAACC,EAAOC,CAAQ,EAAIR,EAAAA,SAAkC,IAAI,EAC1DS,EAAWP,EAAAA,YAAaQ,GAA2BF,EAASE,CAAI,EAAG,EAAE,EAC3E,MAAO,CACL,MAAOH,EAAQA,EAAM,MAAQ,KAC7B,MAAAA,EACA,MAAWI,GAAA,SAAiC,OAC1C,iBAAkB,GAClB,OAAMC,EAAAD,EAAO,OAAP,YAAAC,EAAa,QAAS,CAAA,EAC5B,WAAUC,EAAAF,EAAO,OAAP,YAAAE,EAAa,aAAc,EACrC,QAAS,EAAQF,EAAO,WACxB,SAAAF,CAAA,EACF,CAEJ,CCtEA,MAAMK,EAAc,gBAEdC,EAAe,iBAOfC,EAAc,KAAK,OAAA,EAAS,SAAS,EAAE,EAAE,MAAM,CAAC,EAEhDC,MAAc,IAGdC,EAAa,IA2BbC,EAAaC,GACjB,OAAO,OAAW,IAAc,KAAO,IAAI,gBAAg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GAAMA,EAAI,CAAC,EAE3B,MAAMvE,EAASyC,EAAO,UAAUC,CAAM,EACtC,GAAI,CAAC1C,EAAO,QAAS,CAEnB,MAAMgC,EAAQoC,GAAA,YAAAA,EAAO,cACrB,GAAIpB,GAAiBhB,aAAiB,QAAS,CAC7C,MAAMC,EAAQjC,EAAO,MAAM,OACxB,IAAK4C,GAAU,OAAOA,EAAM,KAAK,CAAC,GAAK,EAAE,CAAC,EAC1C,OAAO,OAAO,EACjBb,EAAmBC,EAAOC,CAAK,CACjC,CACA,MACF,CAEA,MAAMuC,EAAUzB,GAAA,YAAAA,EAAW/C,EAAO,KAAgB,CAAE,MAAAqE,EAAO,SAAAL,EAAU,UAAAf,IACrE,GAAIuB,aAAmB,QAAS,CAC9BZ,EAAc,QAAU,GACxBD,EAAgB,EAAI,EACpB,MAAMc,EAAO,IAAM,CACjBb,EAAc,QAAU,GACxBD,EAAgB,EAAK,CACvB,EAGAa,EAAQ,KAAKC,EAAMA,CAAI,CACzB,CACF,EACA,CAAChC,EAAQC,EAAQK,EAAUsB,EAAOL,EAAUhB,CAAa,CAAA,EAK3D,OAAOa,EAAAA,QACL,KAAO,CAEL,OAAAnB,EAEA,OAAAC,EAEA,QAAAS,EAEA,QAAAU,EAEA,YAAaR,EAEb,YAAAE,EAEA,aAAAE,EAEA,MAAAQ,EAEA,SAAAF,EAEA,UAAAf,EAEA,MAAAoB,EAEA,aAAAC,CAAA,GAEF,CACE5B,EACAC,EACAS,EACAU,EACAR,EACAE,EACAE,EACAQ,EACAF,EACAf,EACAoB,EACAC,CAAA,CACF,CAEJ"}
@@ -0,0 +1,2 @@
1
+ "use strict";const c=require("react/jsx-runtime"),Q=require("clsx"),W=require("./FloatingPanel-tGCG2nhA.cjs"),$=require("./Icon-BUP5_kRs.cjs"),U=require("./List-DOsh6w-d.cjs"),V=require("./ListItem-CUeIBhOF.cjs"),G=require("./Loader-CqRaCdzF.cjs"),C=require("./Typography-B6ASPrzT.cjs"),J=require("./ConfigProvider-CzAQf_d_.cjs"),l=require("react"),X="_popover_rf9kn_3",Y="_search_rf9kn_11",Z="_searchIcon_rf9kn_20",B="_searchInput_rf9kn_24",ee="_listbox_rf9kn_40",te="_active_rf9kn_48",re="_noOptions_rf9kn_52",se="_loading_rf9kn_58",oe="_group_rf9kn_68",ne="_groupLabel_rf9kn_80",ae="_trailing_rf9kn_86",h={popover:X,search:Y,searchIcon:Z,searchInput:B,listbox:ee,active:te,noOptions:re,loading:se,group:oe,groupLabel:ne,trailing:ae};function ie({menu:t,anchorRef:m,size:g,searchPlaceholder:_,loading:O=!1,loadingText:E,noOptionsText:d,showSelectedTick:x=!0,multiselectable:M=!1,labelledBy:j,ariaLabel:N,onSearchKeyDown:R,className:y}){const r=J.useT(),L=_??r("common.search"),{filteredOptions:I,highlightedIndex:q}=t,f=({opt:o,index:p})=>{const n=t.isSelected(o),u=n&&x;return c.jsx(V.ListItem,{id:t.optionId(p),role:"option",tabIndex:-1,"aria-selected":n,"aria-current":void 0,clickable:!0,selected:n,disabled:o.disabled,icon:o.icon,className:Q.clsx(p===q&&h.active),trailing:o.trailing!=null||u?c.jsxs("span",{className:h.trailing,children:[o.trailing,u&&c.jsx($.Icon,{name:"TickCircle",size:"sm"})]}):void 0,onMouseEnter:()=>!o.disabled&&t.setHighlightedIndex(p),onMouseDown:a=>a.preventDefault(),onClick:()=>t.pick(o),children:o.label},o.value)},b=o=>{if(!o.some(n=>n.opt.group!=null))return o.map(f);const p=[];for(const n of o){const u=p[p.length-1];u&&u.group===n.opt.group?u.rows.push(n):p.push({group:n.opt.group,rows:[n]})}return p.map((n,u)=>{if(n.group==null)return n.rows.map(f);const a=`${t.listboxId}-group-${u}`;return c.jsxs("div",{role:"group","aria-labelledby":a,className:h.group,children:[c.jsx(C.Typography,{as:"div",id:a,role:"presentation",variant:"caption",color:"muted",uppercase:!0,className:h.groupLabel,children:n.group}),n.rows.map(f)]},`group-${u}`)})};return c.jsxs(W.FloatingPanel,{ref:t.popoverRef,open:t.open,triggerRef:m,onClose:t.closeMenu,matchTriggerWidth:!0,className:Q.clsx(h.popover,y),children:[t.searchable&&c.jsxs("div",{className:h.search,children:[c.jsx($.Icon,{name:"SearchNormal",size:"sm",className:h.searchIcon,"aria-hidden":"true"}),c.jsx("input",{ref:t.searchInputRef,className:h.searchInput,type:"text",role:"combobox","aria-expanded":"true","aria-controls":t.listboxId,"aria-activedescendant":t.activeId,"aria-autocomplete":"list","aria-label":L,placeholder:L,value:t.searchQuery,spellCheck:!1,autoComplete:"off",onChange:o=>t.setSearchQuery(o.target.value),onKeyDown:R??t.handleKeyDown})]}),c.jsx(U.List,{role:"listbox",id:t.listboxId,"aria-labelledby":j,"aria-label":j?void 0:N,"aria-multiselectable":M||void 0,size:g,className:h.listbox,onMouseLeave:()=>t.setHighlightedIndex(-1),children:O?c.jsxs("div",{className:h.loading,children:[c.jsx(G.Loader,{size:"sm"}),c.jsx(C.Typography,{as:"span",variant:"bodySmall",color:"muted",children:E??r("common.loading")})]}):I.length===0?c.jsx("div",{className:h.noOptions,children:c.jsx(C.Typography,{as:"span",variant:"bodySmall",color:"muted",children:d==null?r("select.noOptions"):typeof d=="function"?d(t.searchQuery):d})}):b(I.map((o,p)=>({opt:o,index:p})))})]})}function ce(t){if(!t.some(g=>g.group!=null))return t;const m=new Map;for(const g of t){const _=m.get(g.group);_?_.push(g):m.set(g.group,[g])}return[...m.values()].flat()}function le({idBase:t,options:m,isSelected:g,onPick:_,closeOnPick:O=!0,highlightSelected:E=!0,searchable:d=!1,onSearchChange:x,disabled:M=!1,focusRef:j,onClose:N}){const R=`${t}-listbox`,y=l.useCallback(e=>`${t}-opt-${e}`,[t]),[r,L]=l.useState(!1),[I,q]=l.useState(""),[f,b]=l.useState(-1),o=l.useRef(null),p=l.useRef(null),n=l.useRef({buffer:"",timer:0}),u=l.useRef(N);u.current=N;const a=l.useMemo(()=>{const e=I.trim().toLowerCase(),s=!d||x||!e?m:m.filter(i=>{var k;return i.label.toLowerCase().includes(e)||((k=i.keywords)==null?void 0:k.some(F=>F.toLowerCase().includes(e)))});return ce(s)},[d,x,I,m]),v=l.useCallback((e,s)=>{let i=e;for(;i>=0&&i<a.length;){if(!a[i].disabled)return i;i+=s}return-1},[a]),D=l.useCallback(e=>{var s,i;L(!1),q(""),window.clearTimeout(n.current.timer),n.current.buffer="",(s=u.current)==null||s.call(u),e&&((i=j.current)==null||i.focus())},[j]);l.useEffect(()=>{if(!r)return;const e=E?a.findIndex(g):-1;b(e>=0&&!a[e].disabled?e:v(0,1)),d&&requestAnimationFrame(()=>{var s;return(s=o.current)==null?void 0:s.focus()})},[r]),l.useEffect(()=>{var e,s;!r||f<0||(s=(e=document.getElementById(y(f)))==null?void 0:e.scrollIntoView)==null||s.call(e,{block:"nearest"})},[r,f,y]),l.useEffect(()=>{r&&d&&b(v(0,1))},[I]),l.useEffect(()=>{r&&b(e=>e<a.length?e:v(0,1))},[a.length]);const w=()=>{M||L(!0)},H=()=>r?D(!1):w(),P=e=>{q(e),x==null||x(e)},T=e=>{!e||e.disabled||(_(e),O&&D(!0))},K=e=>{b(s=>{const i=s<0?e>0?0:a.length-1:s+e,k=v(i,e);return k===-1?s:k})},S=e=>{const s=n.current;window.clearTimeout(s.timer),s.buffer+=e.toLowerCase(),s.timer=window.setTimeout(()=>s.buffer="",500);const i=a.findIndex(k=>!k.disabled&&k.label.toLowerCase().startsWith(s.buffer));i>=0&&b(i)},z=e=>{if(!M)switch(e.key){case"ArrowDown":e.preventDefault(),r?K(1):w();break;case"ArrowUp":e.preventDefault(),r?K(-1):w();break;case"Enter":e.preventDefault(),r?T(a[f]):w();break;case" ":r?d||(e.preventDefault(),T(a[f])):(e.preventDefault(),w());break;case"Escape":r&&(e.preventDefault(),e.stopPropagation(),D(!0));break;case"Tab":r&&D(!0);break;case"Home":r&&(e.preventDefault(),b(v(0,1)));break;case"End":r&&(e.preventDefault(),b(v(a.length-1,-1)));break;default:!d&&r&&e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&S(e.key)}},A=r&&f>=0?y(f):void 0;return{open:r,openMenu:w,closeMenu:D,toggleMenu:H,searchable:d,searchQuery:I,setSearchQuery:P,filteredOptions:a,highlightedIndex:f,setHighlightedIndex:b,isSelected:g,pick:T,handleKeyDown:z,listboxId:R,optionId:y,activeId:A,searchInputRef:o,popoverRef:p}}exports.OptionMenu=ie;exports.useOptionMenu=le;
2
+ //# sourceMappingURL=useOptionMenu-8hjCTNL4.cjs.map