@techzyapp/ui-library 1.0.29 → 1.0.31

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 (534) 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-BYkmCGNx.js +57 -0
  6. package/dist/AdminRoot-BYkmCGNx.js.map +1 -0
  7. package/dist/AdminRoot-BbkfFQEn.cjs +2 -0
  8. package/dist/AdminRoot-BbkfFQEn.cjs.map +1 -0
  9. package/dist/{Alert-CJono1TJ.js → Alert-BLqAcEoT.js} +5 -5
  10. package/dist/{Alert-CJono1TJ.js.map → Alert-BLqAcEoT.js.map} +1 -1
  11. package/dist/{Alert-VFQuuII6.cjs → Alert-BM5WOI_u.cjs} +2 -2
  12. package/dist/{Alert-VFQuuII6.cjs.map → Alert-BM5WOI_u.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-XWU8tRvs.js → Breadcrumbs-CzHGbN2c.js} +5 -5
  26. package/dist/{Breadcrumbs-XWU8tRvs.js.map → Breadcrumbs-CzHGbN2c.js.map} +1 -1
  27. package/dist/{Breadcrumbs-DCEHxpSi.cjs → Breadcrumbs-Di4-Acfb.cjs} +2 -2
  28. package/dist/{Breadcrumbs-DCEHxpSi.cjs.map → Breadcrumbs-Di4-Acfb.cjs.map} +1 -1
  29. package/dist/{Button-CWMNNiia.js → Button-9Qcdkw-y.js} +2 -2
  30. package/dist/{Button-CWMNNiia.js.map → Button-9Qcdkw-y.js.map} +1 -1
  31. package/dist/{Button-CusxDmfq.cjs → Button-BQhiJq8e.cjs} +2 -2
  32. package/dist/{Button-CusxDmfq.cjs.map → Button-BQhiJq8e.cjs.map} +1 -1
  33. package/dist/{Calendar-Db3rr1VD.js → Calendar-BB-C0qXO.js} +4 -4
  34. package/dist/{Calendar-Db3rr1VD.js.map → Calendar-BB-C0qXO.js.map} +1 -1
  35. package/dist/{Calendar-BEQbZixA.cjs → Calendar-dXhLgOUH.cjs} +2 -2
  36. package/dist/{Calendar-BEQbZixA.cjs.map → Calendar-dXhLgOUH.cjs.map} +1 -1
  37. package/dist/Card-BERQfyhJ.js +129 -0
  38. package/dist/Card-BERQfyhJ.js.map +1 -0
  39. package/dist/Card-DULpoOfj.cjs +2 -0
  40. package/dist/Card-DULpoOfj.cjs.map +1 -0
  41. package/dist/{Chip-D12KcV4_.cjs → Chip-BuydTI6V.cjs} +2 -2
  42. package/dist/{Chip-D12KcV4_.cjs.map → Chip-BuydTI6V.cjs.map} +1 -1
  43. package/dist/{Chip-Zh1OB9nV.js → Chip-DZ5Fz7jx.js} +3 -3
  44. package/dist/{Chip-Zh1OB9nV.js.map → Chip-DZ5Fz7jx.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-DAM7BkHK.cjs → CodeBlock-BPraYPoS.cjs} +2 -2
  50. package/dist/{CodeBlock-DAM7BkHK.cjs.map → CodeBlock-BPraYPoS.cjs.map} +1 -1
  51. package/dist/{CodeBlock-CkrTnpcj.js → CodeBlock-BySsTAtY.js} +5 -5
  52. package/dist/{CodeBlock-CkrTnpcj.js.map → CodeBlock-BySsTAtY.js.map} +1 -1
  53. package/dist/{ColorPicker-BcCozxIe.cjs → ColorPicker-BTBTQD39.cjs} +2 -2
  54. package/dist/{ColorPicker-BcCozxIe.cjs.map → ColorPicker-BTBTQD39.cjs.map} +1 -1
  55. package/dist/{ColorPicker-DqxVgUoD.js → ColorPicker-DJow7m2v.js} +4 -4
  56. package/dist/{ColorPicker-DqxVgUoD.js.map → ColorPicker-DJow7m2v.js.map} +1 -1
  57. package/dist/{ColorPickerPanel-DZjN8NNn.js → ColorPickerPanel-D6agWM6y.js} +3 -3
  58. package/dist/{ColorPickerPanel-DZjN8NNn.js.map → ColorPickerPanel-D6agWM6y.js.map} +1 -1
  59. package/dist/{ColorPickerPanel-DAOESLCe.cjs → ColorPickerPanel-DXIYwUoE.cjs} +2 -2
  60. package/dist/{ColorPickerPanel-DAOESLCe.cjs.map → ColorPickerPanel-DXIYwUoE.cjs.map} +1 -1
  61. package/dist/{ColorRamp-_KwlPQ-T.cjs → ColorRamp-B45Rtwgw.cjs} +2 -2
  62. package/dist/{ColorRamp-_KwlPQ-T.cjs.map → ColorRamp-B45Rtwgw.cjs.map} +1 -1
  63. package/dist/{ColorRamp-DS5LVpRF.js → ColorRamp-Bhj28c_6.js} +3 -3
  64. package/dist/{ColorRamp-DS5LVpRF.js.map → ColorRamp-Bhj28c_6.js.map} +1 -1
  65. package/dist/ConfigProvider-Ct0Pe3Ku.js +335 -0
  66. package/dist/ConfigProvider-Ct0Pe3Ku.js.map +1 -0
  67. package/dist/ConfigProvider-CtpfSy1i.cjs +2 -0
  68. package/dist/ConfigProvider-CtpfSy1i.cjs.map +1 -0
  69. package/dist/{CopyButton-SFwjKod9.cjs → CopyButton-Bfte6TJF.cjs} +2 -2
  70. package/dist/{CopyButton-SFwjKod9.cjs.map → CopyButton-Bfte6TJF.cjs.map} +1 -1
  71. package/dist/{CopyButton-D4s8aeSE.js → CopyButton-CBk85MQ7.js} +5 -5
  72. package/dist/{CopyButton-D4s8aeSE.js.map → CopyButton-CBk85MQ7.js.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-ENbn2Vab.cjs → DatePicker-DBiU4Mb6.cjs} +2 -2
  78. package/dist/{DatePicker-ENbn2Vab.cjs.map → DatePicker-DBiU4Mb6.cjs.map} +1 -1
  79. package/dist/{DatePicker-DGwjCHfd.js → DatePicker-eAzDnO2Y.js} +6 -6
  80. package/dist/{DatePicker-DGwjCHfd.js.map → DatePicker-eAzDnO2Y.js.map} +1 -1
  81. package/dist/{DateTimePicker-BQUmsFwX.cjs → DateTimePicker-CvaD8IkF.cjs} +2 -2
  82. package/dist/{DateTimePicker-BQUmsFwX.cjs.map → DateTimePicker-CvaD8IkF.cjs.map} +1 -1
  83. package/dist/{DateTimePicker-CwVkQiun.js → DateTimePicker-M2UBjFVc.js} +9 -9
  84. package/dist/{DateTimePicker-CwVkQiun.js.map → DateTimePicker-M2UBjFVc.js.map} +1 -1
  85. package/dist/{DescriptionList-0qjKr6GN.js → DescriptionList-BhsmdtS1.js} +64 -64
  86. package/dist/{DescriptionList-0qjKr6GN.js.map → DescriptionList-BhsmdtS1.js.map} +1 -1
  87. package/dist/DescriptionList-DQHNOTWl.cjs +2 -0
  88. package/dist/{DescriptionList-U5z2Faf4.cjs.map → DescriptionList-DQHNOTWl.cjs.map} +1 -1
  89. package/dist/{Dropdown-DNZ9S_zQ.cjs → Dropdown-BbaU1WDC.cjs} +2 -2
  90. package/dist/{Dropdown-DNZ9S_zQ.cjs.map → Dropdown-BbaU1WDC.cjs.map} +1 -1
  91. package/dist/{Dropdown--1mNTVZJ.js → Dropdown-BlmbYp1X.js} +2 -2
  92. package/dist/{Dropdown--1mNTVZJ.js.map → Dropdown-BlmbYp1X.js.map} +1 -1
  93. package/dist/{EmptyState-DwT9_HW7.js → EmptyState-2pA3XlOX.js} +4 -4
  94. package/dist/{EmptyState-DwT9_HW7.js.map → EmptyState-2pA3XlOX.js.map} +1 -1
  95. package/dist/{EmptyState-B2_4BN4l.cjs → EmptyState-ByBpy2vN.cjs} +2 -2
  96. package/dist/{EmptyState-B2_4BN4l.cjs.map → EmptyState-ByBpy2vN.cjs.map} +1 -1
  97. package/dist/{ErrorBoundary-CsDHKYB4.js → ErrorBoundary-B-37hGZW.js} +6 -6
  98. package/dist/{ErrorBoundary-CsDHKYB4.js.map → ErrorBoundary-B-37hGZW.js.map} +1 -1
  99. package/dist/{ErrorBoundary-CYSOAQlB.cjs → ErrorBoundary-gRGxeuM1.cjs} +2 -2
  100. package/dist/{ErrorBoundary-CYSOAQlB.cjs.map → ErrorBoundary-gRGxeuM1.cjs.map} +1 -1
  101. package/dist/{FileCard-B9f9RoXS.js → FileCard-BNfUAgsF.js} +5 -5
  102. package/dist/{FileCard-B9f9RoXS.js.map → FileCard-BNfUAgsF.js.map} +1 -1
  103. package/dist/{FileCard-zuUYik-F.cjs → FileCard-BYNJVmp0.cjs} +2 -2
  104. package/dist/{FileCard-zuUYik-F.cjs.map → FileCard-BYNJVmp0.cjs.map} +1 -1
  105. package/dist/{FileUploader-Y8hiyIpp.cjs → FileUploader-DdICa5UC.cjs} +2 -2
  106. package/dist/{FileUploader-Y8hiyIpp.cjs.map → FileUploader-DdICa5UC.cjs.map} +1 -1
  107. package/dist/{FileUploader-Dh2zA50t.js → FileUploader-TOWwDOSS.js} +6 -6
  108. package/dist/{FileUploader-Dh2zA50t.js.map → FileUploader-TOWwDOSS.js.map} +1 -1
  109. package/dist/{Flag-CmDXvd7j.js → Flag-DDR6OANA.js} +2 -2
  110. package/dist/{Flag-CmDXvd7j.js.map → Flag-DDR6OANA.js.map} +1 -1
  111. package/dist/{Flag-BpTQAgbD.cjs → Flag-DXPQ2t8z.cjs} +2 -2
  112. package/dist/{Flag-BpTQAgbD.cjs.map → Flag-DXPQ2t8z.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-BKo1lDSE.cjs} +2 -2
  118. package/dist/{FullscreenToggle-CeGgw3z1.cjs.map → FullscreenToggle-BKo1lDSE.cjs.map} +1 -1
  119. package/dist/{FullscreenToggle-2IYIS5KF.js → FullscreenToggle-DmH1541W.js} +4 -4
  120. package/dist/{FullscreenToggle-2IYIS5KF.js.map → FullscreenToggle-DmH1541W.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-CL_6iMQh.js} +2 -2
  126. package/dist/{IconButton-GU3Ud4Zg.js.map → IconButton-CL_6iMQh.js.map} +1 -1
  127. package/dist/{IconButton-BNa0yLcv.cjs → IconButton-CvIXSFsr.cjs} +2 -2
  128. package/dist/{IconButton-BNa0yLcv.cjs.map → IconButton-CvIXSFsr.cjs.map} +1 -1
  129. package/dist/{List-CZwNGxuP.js → List-BLPB3-B8.js} +3 -3
  130. package/dist/{List-CZwNGxuP.js.map → List-BLPB3-B8.js.map} +1 -1
  131. package/dist/{List-9lUjapQ5.cjs → List-ah2PNWeY.cjs} +2 -2
  132. package/dist/{List-9lUjapQ5.cjs.map → List-ah2PNWeY.cjs.map} +1 -1
  133. package/dist/{Loader-Cpr9-OOZ.cjs → Loader-CI1j71X8.cjs} +2 -2
  134. package/dist/{Loader-Cpr9-OOZ.cjs.map → Loader-CI1j71X8.cjs.map} +1 -1
  135. package/dist/{Loader-C1uaCtx6.js → Loader-Czzb450N.js} +2 -2
  136. package/dist/{Loader-C1uaCtx6.js.map → Loader-Czzb450N.js.map} +1 -1
  137. package/dist/{Modal-DHP2R3K3.js → Modal-DMJMw6kT.js} +5 -5
  138. package/dist/{Modal-DHP2R3K3.js.map → Modal-DMJMw6kT.js.map} +1 -1
  139. package/dist/{Modal-DFeBHv-Q.cjs → Modal-DPObz0b-.cjs} +2 -2
  140. package/dist/{Modal-DFeBHv-Q.cjs.map → Modal-DPObz0b-.cjs.map} +1 -1
  141. package/dist/{MultiSelect-B-FPQ08c.js → MultiSelect-BTR6w5Ot.js} +5 -5
  142. package/dist/{MultiSelect-B-FPQ08c.js.map → MultiSelect-BTR6w5Ot.js.map} +1 -1
  143. package/dist/{MultiSelect-S5VG9g3l.cjs → MultiSelect-IDAJ5a5K.cjs} +2 -2
  144. package/dist/{MultiSelect-S5VG9g3l.cjs.map → MultiSelect-IDAJ5a5K.cjs.map} +1 -1
  145. package/dist/{NumberField-SSGXlF8U.cjs → NumberField-Cg0XEDgW.cjs} +2 -2
  146. package/dist/{NumberField-SSGXlF8U.cjs.map → NumberField-Cg0XEDgW.cjs.map} +1 -1
  147. package/dist/{NumberField-CzyvDMRV.js → NumberField-DlaW-g3Z.js} +4 -4
  148. package/dist/{NumberField-CzyvDMRV.js.map → NumberField-DlaW-g3Z.js.map} +1 -1
  149. package/dist/{OtpField-Pr7Ch0El.cjs → OtpField-DsedK1nQ.cjs} +2 -2
  150. package/dist/{OtpField-Pr7Ch0El.cjs.map → OtpField-DsedK1nQ.cjs.map} +1 -1
  151. package/dist/{OtpField-CMoJqcx1.js → OtpField-vxQuo-uR.js} +2 -2
  152. package/dist/{OtpField-CMoJqcx1.js.map → OtpField-vxQuo-uR.js.map} +1 -1
  153. package/dist/{PageLayout-BIMkjq-q.cjs → PageLayout-BPbjTYS3.cjs} +2 -2
  154. package/dist/{PageLayout-BIMkjq-q.cjs.map → PageLayout-BPbjTYS3.cjs.map} +1 -1
  155. package/dist/{PageLayout-Ctr-IEzX.js → PageLayout-Rk6KSxmn.js} +2 -2
  156. package/dist/{PageLayout-Ctr-IEzX.js.map → PageLayout-Rk6KSxmn.js.map} +1 -1
  157. package/dist/{PageNotFound-KKJTeaRF.js → PageNotFound-CBNhKZ9Y.js} +5 -5
  158. package/dist/{PageNotFound-KKJTeaRF.js.map → PageNotFound-CBNhKZ9Y.js.map} +1 -1
  159. package/dist/{PageNotFound-CnhBheI4.cjs → PageNotFound-PUQ1o9R4.cjs} +2 -2
  160. package/dist/{PageNotFound-CnhBheI4.cjs.map → PageNotFound-PUQ1o9R4.cjs.map} +1 -1
  161. package/dist/{Pagination-Oyms2ERd.js → Pagination-CNdkfXp2.js} +3 -3
  162. package/dist/{Pagination-Oyms2ERd.js.map → Pagination-CNdkfXp2.js.map} +1 -1
  163. package/dist/{Pagination-BD5WOW98.cjs → Pagination-DNGKNQy0.cjs} +2 -2
  164. package/dist/{Pagination-BD5WOW98.cjs.map → Pagination-DNGKNQy0.cjs.map} +1 -1
  165. package/dist/{PaletteField-CCQGW5LC.cjs → PaletteField-BSIF5jI6.cjs} +2 -2
  166. package/dist/{PaletteField-CCQGW5LC.cjs.map → PaletteField-BSIF5jI6.cjs.map} +1 -1
  167. package/dist/{PaletteField-BHzzzdou.js → PaletteField-Bp5Fgygh.js} +3 -3
  168. package/dist/{PaletteField-BHzzzdou.js.map → PaletteField-Bp5Fgygh.js.map} +1 -1
  169. package/dist/{PhoneField-5zGY4Wko.cjs → PhoneField-BMhZeZkW.cjs} +2 -2
  170. package/dist/{PhoneField-5zGY4Wko.cjs.map → PhoneField-BMhZeZkW.cjs.map} +1 -1
  171. package/dist/{PhoneField-CBfmChPx.js → PhoneField-BdmvslXQ.js} +5 -5
  172. package/dist/{PhoneField-CBfmChPx.js.map → PhoneField-BdmvslXQ.js.map} +1 -1
  173. package/dist/{Popconfirm-BtGDhqrc.js → Popconfirm-Cyaeybtj.js} +6 -6
  174. package/dist/{Popconfirm-BtGDhqrc.js.map → Popconfirm-Cyaeybtj.js.map} +1 -1
  175. package/dist/{Popconfirm-CkBdntxV.cjs → Popconfirm-IhlIINtZ.cjs} +2 -2
  176. package/dist/{Popconfirm-CkBdntxV.cjs.map → Popconfirm-IhlIINtZ.cjs.map} +1 -1
  177. package/dist/{Popover-DAT6DcM9.cjs → Popover-DsYUT23r.cjs} +2 -2
  178. package/dist/{Popover-DAT6DcM9.cjs.map → Popover-DsYUT23r.cjs.map} +1 -1
  179. package/dist/{Popover-B82Id9Ut.js → Popover-WaVH3jsN.js} +2 -2
  180. package/dist/{Popover-B82Id9Ut.js.map → Popover-WaVH3jsN.js.map} +1 -1
  181. package/dist/{Progress-Bwxx71Ns.cjs → Progress-CAY1p06_.cjs} +2 -2
  182. package/dist/{Progress-Bwxx71Ns.cjs.map → Progress-CAY1p06_.cjs.map} +1 -1
  183. package/dist/{Progress-pTbaOSDd.js → Progress-T7PLrJ0Y.js} +2 -2
  184. package/dist/{Progress-pTbaOSDd.js.map → Progress-T7PLrJ0Y.js.map} +1 -1
  185. package/dist/{QueryError-C01oichG.cjs → QueryError-DP22IUnp.cjs} +2 -2
  186. package/dist/{QueryError-C01oichG.cjs.map → QueryError-DP22IUnp.cjs.map} +1 -1
  187. package/dist/{QueryError-Bu_MNGek.js → QueryError-Dtspj9l4.js} +2 -2
  188. package/dist/{QueryError-Bu_MNGek.js.map → QueryError-Dtspj9l4.js.map} +1 -1
  189. package/dist/RadioGroup-CTAayuMv.js +142 -0
  190. package/dist/RadioGroup-CTAayuMv.js.map +1 -0
  191. package/dist/RadioGroup-CvC2yc4p.cjs +2 -0
  192. package/dist/RadioGroup-CvC2yc4p.cjs.map +1 -0
  193. package/dist/{RemoveDialog-Bm2mJB3l.cjs → RemoveDialog-D12B4x80.cjs} +2 -2
  194. package/dist/{RemoveDialog-Bm2mJB3l.cjs.map → RemoveDialog-D12B4x80.cjs.map} +1 -1
  195. package/dist/{RemoveDialog-C2uJzWi-.js → RemoveDialog-DdGsqaWV.js} +6 -6
  196. package/dist/{RemoveDialog-C2uJzWi-.js.map → RemoveDialog-DdGsqaWV.js.map} +1 -1
  197. package/dist/RichTextEditor-BVXY25sz.cjs +2 -0
  198. package/dist/RichTextEditor-BVXY25sz.cjs.map +1 -0
  199. package/dist/RichTextEditor-DL4y5xVv.js +916 -0
  200. package/dist/RichTextEditor-DL4y5xVv.js.map +1 -0
  201. package/dist/RootLayout-BK3t6Mm0.js +604 -0
  202. package/dist/RootLayout-BK3t6Mm0.js.map +1 -0
  203. package/dist/RootLayout-DDuzPlJe.cjs +2 -0
  204. package/dist/RootLayout-DDuzPlJe.cjs.map +1 -0
  205. package/dist/{Select-CVVJKAtS.cjs → Select-DlFDOZtn.cjs} +2 -2
  206. package/dist/{Select-CVVJKAtS.cjs.map → Select-DlFDOZtn.cjs.map} +1 -1
  207. package/dist/{Select-d9LDI8O3.js → Select-tVI_qer3.js} +5 -5
  208. package/dist/{Select-d9LDI8O3.js.map → Select-tVI_qer3.js.map} +1 -1
  209. package/dist/{Sidebar-BgCfnZBF.js → Sidebar-CjrD3nNp.js} +7 -6
  210. package/dist/Sidebar-CjrD3nNp.js.map +1 -0
  211. package/dist/Sidebar-gB-X4VLX.cjs +2 -0
  212. package/dist/Sidebar-gB-X4VLX.cjs.map +1 -0
  213. package/dist/{SpeedDial-CEr2JWQb.cjs → SpeedDial-BIOkkLKO.cjs} +2 -2
  214. package/dist/{SpeedDial-CEr2JWQb.cjs.map → SpeedDial-BIOkkLKO.cjs.map} +1 -1
  215. package/dist/{SpeedDial-CBVwgnFp.js → SpeedDial-xQr4JH0x.js} +5 -5
  216. package/dist/{SpeedDial-CBVwgnFp.js.map → SpeedDial-xQr4JH0x.js.map} +1 -1
  217. package/dist/Stepper-CBdhvPoz.cjs +2 -0
  218. package/dist/Stepper-CBdhvPoz.cjs.map +1 -0
  219. package/dist/Stepper-CkYcIc15.js +169 -0
  220. package/dist/Stepper-CkYcIc15.js.map +1 -0
  221. package/dist/{SwatchPicker-Bpxk0IOe.js → SwatchPicker-BAKslSY4.js} +2 -2
  222. package/dist/{SwatchPicker-Bpxk0IOe.js.map → SwatchPicker-BAKslSY4.js.map} +1 -1
  223. package/dist/{SwatchPicker-BWXqgsEy.cjs → SwatchPicker-CpwVq0xp.cjs} +2 -2
  224. package/dist/{SwatchPicker-BWXqgsEy.cjs.map → SwatchPicker-CpwVq0xp.cjs.map} +1 -1
  225. package/dist/Table-CwQKfXGn.js +1210 -0
  226. package/dist/Table-CwQKfXGn.js.map +1 -0
  227. package/dist/Table-Cwxqo7Br.cjs +2 -0
  228. package/dist/Table-Cwxqo7Br.cjs.map +1 -0
  229. package/dist/Tabs-651xbRe4.cjs +2 -0
  230. package/dist/Tabs-651xbRe4.cjs.map +1 -0
  231. package/dist/Tabs-Bztnezt9.js +194 -0
  232. package/dist/Tabs-Bztnezt9.js.map +1 -0
  233. package/dist/{TagsField-DcuSn7wL.cjs → TagsField-B7ZARHzD.cjs} +2 -2
  234. package/dist/{TagsField-DcuSn7wL.cjs.map → TagsField-B7ZARHzD.cjs.map} +1 -1
  235. package/dist/{TagsField-DuQEFHZ3.js → TagsField-CdymON69.js} +5 -5
  236. package/dist/{TagsField-DuQEFHZ3.js.map → TagsField-CdymON69.js.map} +1 -1
  237. package/dist/{TextField-E85pvJQC.cjs → TextField-B22NRQ91.cjs} +2 -2
  238. package/dist/{TextField-E85pvJQC.cjs.map → TextField-B22NRQ91.cjs.map} +1 -1
  239. package/dist/{TextField-SGYWviFf.js → TextField-DkaYK1DI.js} +4 -4
  240. package/dist/{TextField-SGYWviFf.js.map → TextField-DkaYK1DI.js.map} +1 -1
  241. package/dist/{ThemeToggle-BdlxzYNt.cjs → ThemeToggle-D5dWHQFb.cjs} +2 -2
  242. package/dist/{ThemeToggle-BdlxzYNt.cjs.map → ThemeToggle-D5dWHQFb.cjs.map} +1 -1
  243. package/dist/{ThemeToggle-C2kjFrD_.js → ThemeToggle-DqzUvcK5.js} +4 -4
  244. package/dist/{ThemeToggle-C2kjFrD_.js.map → ThemeToggle-DqzUvcK5.js.map} +1 -1
  245. package/dist/{TimeColumns-BS1d0qOp.js → TimeColumns-BEoHh961.js} +2 -2
  246. package/dist/{TimeColumns-BS1d0qOp.js.map → TimeColumns-BEoHh961.js.map} +1 -1
  247. package/dist/{TimeColumns-D7-O4Qyt.cjs → TimeColumns-o2xhvSGE.cjs} +2 -2
  248. package/dist/{TimeColumns-D7-O4Qyt.cjs.map → TimeColumns-o2xhvSGE.cjs.map} +1 -1
  249. package/dist/{TimePicker-Dzb3gycP.cjs → TimePicker-CACmHwNn.cjs} +2 -2
  250. package/dist/{TimePicker-Dzb3gycP.cjs.map → TimePicker-CACmHwNn.cjs.map} +1 -1
  251. package/dist/{TimePicker-DlzYNDN1.js → TimePicker-DCryZCmh.js} +7 -7
  252. package/dist/{TimePicker-DlzYNDN1.js.map → TimePicker-DCryZCmh.js.map} +1 -1
  253. package/dist/{Timeline-CKEosWka.cjs → Timeline-CMP93APm.cjs} +2 -2
  254. package/dist/{Timeline-CKEosWka.cjs.map → Timeline-CMP93APm.cjs.map} +1 -1
  255. package/dist/{Timeline-ufVXmpMY.js → Timeline-Dri2dPsK.js} +3 -3
  256. package/dist/{Timeline-ufVXmpMY.js.map → Timeline-Dri2dPsK.js.map} +1 -1
  257. package/dist/{Toaster-Cummylmj.cjs → Toaster-BwREV06e.cjs} +2 -2
  258. package/dist/{Toaster-Cummylmj.cjs.map → Toaster-BwREV06e.cjs.map} +1 -1
  259. package/dist/{Toaster-cu5XyKeE.js → Toaster-DwVLab3k.js} +2 -2
  260. package/dist/{Toaster-cu5XyKeE.js.map → Toaster-DwVLab3k.js.map} +1 -1
  261. package/dist/{ToggleButtonGroup-D9odYMzD.js → ToggleButtonGroup-BtVDnQIF.js} +3 -3
  262. package/dist/{ToggleButtonGroup-D9odYMzD.js.map → ToggleButtonGroup-BtVDnQIF.js.map} +1 -1
  263. package/dist/{ToggleButtonGroup-M2oj_3mc.cjs → ToggleButtonGroup-UylpGJ16.cjs} +2 -2
  264. package/dist/{ToggleButtonGroup-M2oj_3mc.cjs.map → ToggleButtonGroup-UylpGJ16.cjs.map} +1 -1
  265. package/dist/Tooltip-Bw-1Xk2Z.cjs +2 -0
  266. package/dist/Tooltip-Bw-1Xk2Z.cjs.map +1 -0
  267. package/dist/Tooltip-DsDv4NOq.js +135 -0
  268. package/dist/Tooltip-DsDv4NOq.js.map +1 -0
  269. package/dist/{TranslatedFields-Ccjhq2YL.js → TranslatedFields-B0LMXgiu.js} +5 -5
  270. package/dist/{TranslatedFields-Ccjhq2YL.js.map → TranslatedFields-B0LMXgiu.js.map} +1 -1
  271. package/dist/{TranslatedFields-CbTlgKnh.cjs → TranslatedFields-sio1Qfy7.cjs} +2 -2
  272. package/dist/{TranslatedFields-CbTlgKnh.cjs.map → TranslatedFields-sio1Qfy7.cjs.map} +1 -1
  273. package/dist/{UserCard-Bs8kuV2j.js → UserCard-B5FVcJaK.js} +5 -5
  274. package/dist/{UserCard-Bs8kuV2j.js.map → UserCard-B5FVcJaK.js.map} +1 -1
  275. package/dist/{UserCard-BfHHfkDr.cjs → UserCard-Dzc4zmPj.cjs} +2 -2
  276. package/dist/{UserCard-BfHHfkDr.cjs.map → UserCard-Dzc4zmPj.cjs.map} +1 -1
  277. package/dist/app/AdminRoot.d.cts +7 -2
  278. package/dist/app/AdminRoot.d.ts +7 -2
  279. package/dist/components/Accordion/index.cjs +1 -1
  280. package/dist/components/Accordion/index.js +1 -1
  281. package/dist/components/Alert/index.cjs +1 -1
  282. package/dist/components/Alert/index.js +1 -1
  283. package/dist/components/AuthLayout/index.cjs +1 -1
  284. package/dist/components/AuthLayout/index.js +1 -1
  285. package/dist/components/Avatar/index.cjs +1 -1
  286. package/dist/components/Avatar/index.js +2 -2
  287. package/dist/components/Breadcrumbs/index.cjs +1 -1
  288. package/dist/components/Breadcrumbs/index.js +1 -1
  289. package/dist/components/Button/index.cjs +1 -1
  290. package/dist/components/Button/index.js +1 -1
  291. package/dist/components/Card/Card.d.cts +9 -1
  292. package/dist/components/Card/Card.d.ts +9 -1
  293. package/dist/components/Card/index.cjs +1 -1
  294. package/dist/components/Card/index.js +1 -1
  295. package/dist/components/Chip/index.cjs +1 -1
  296. package/dist/components/Chip/index.js +1 -1
  297. package/dist/components/ChoiceCard/index.cjs +1 -1
  298. package/dist/components/ChoiceCard/index.js +1 -1
  299. package/dist/components/CodeBlock/index.cjs +1 -1
  300. package/dist/components/CodeBlock/index.js +1 -1
  301. package/dist/components/ColorPicker/index.cjs +1 -1
  302. package/dist/components/ColorPicker/index.js +1 -1
  303. package/dist/components/ColorRamp/index.cjs +1 -1
  304. package/dist/components/ColorRamp/index.js +1 -1
  305. package/dist/components/CopyButton/index.cjs +1 -1
  306. package/dist/components/CopyButton/index.js +1 -1
  307. package/dist/components/DashedButton/index.cjs +1 -1
  308. package/dist/components/DashedButton/index.js +1 -1
  309. package/dist/components/DatePicker/index.cjs +1 -1
  310. package/dist/components/DatePicker/index.js +1 -1
  311. package/dist/components/DateTimePicker/index.cjs +1 -1
  312. package/dist/components/DateTimePicker/index.js +1 -1
  313. package/dist/components/DescriptionList/index.cjs +1 -1
  314. package/dist/components/DescriptionList/index.js +1 -1
  315. package/dist/components/Dropdown/index.cjs +1 -1
  316. package/dist/components/Dropdown/index.js +1 -1
  317. package/dist/components/EmptyState/index.cjs +1 -1
  318. package/dist/components/EmptyState/index.js +1 -1
  319. package/dist/components/ErrorState/index.cjs +1 -1
  320. package/dist/components/ErrorState/index.js +2 -2
  321. package/dist/components/FileCard/index.cjs +1 -1
  322. package/dist/components/FileCard/index.js +1 -1
  323. package/dist/components/FileUploader/index.cjs +1 -1
  324. package/dist/components/FileUploader/index.js +1 -1
  325. package/dist/components/Flag/index.cjs +1 -1
  326. package/dist/components/Flag/index.js +1 -1
  327. package/dist/components/FullscreenToggle/index.cjs +1 -1
  328. package/dist/components/FullscreenToggle/index.js +1 -1
  329. package/dist/components/Icon/index.cjs +1 -1
  330. package/dist/components/Icon/index.js +2 -2
  331. package/dist/components/IconButton/index.cjs +1 -1
  332. package/dist/components/IconButton/index.js +1 -1
  333. package/dist/components/List/index.cjs +1 -1
  334. package/dist/components/List/index.js +1 -1
  335. package/dist/components/Loader/index.cjs +1 -1
  336. package/dist/components/Loader/index.js +1 -1
  337. package/dist/components/Modal/index.cjs +1 -1
  338. package/dist/components/Modal/index.js +1 -1
  339. package/dist/components/MultiSelect/index.cjs +1 -1
  340. package/dist/components/MultiSelect/index.js +1 -1
  341. package/dist/components/NumberField/index.cjs +1 -1
  342. package/dist/components/NumberField/index.js +1 -1
  343. package/dist/components/OtpField/index.cjs +1 -1
  344. package/dist/components/OtpField/index.js +1 -1
  345. package/dist/components/PageLayout/index.cjs +1 -1
  346. package/dist/components/PageLayout/index.js +1 -1
  347. package/dist/components/PageNotFound/index.cjs +1 -1
  348. package/dist/components/PageNotFound/index.js +1 -1
  349. package/dist/components/Pagination/index.cjs +1 -1
  350. package/dist/components/Pagination/index.js +1 -1
  351. package/dist/components/PaletteField/index.cjs +1 -1
  352. package/dist/components/PaletteField/index.js +1 -1
  353. package/dist/components/PhoneField/index.cjs +1 -1
  354. package/dist/components/PhoneField/index.js +1 -1
  355. package/dist/components/Popconfirm/index.cjs +1 -1
  356. package/dist/components/Popconfirm/index.js +1 -1
  357. package/dist/components/Popover/index.cjs +1 -1
  358. package/dist/components/Popover/index.js +1 -1
  359. package/dist/components/Progress/index.cjs +1 -1
  360. package/dist/components/Progress/index.js +1 -1
  361. package/dist/components/Radio/RadioGroup.d.cts +1 -1
  362. package/dist/components/Radio/RadioGroup.d.ts +1 -1
  363. package/dist/components/Radio/index.cjs +1 -1
  364. package/dist/components/Radio/index.js +1 -1
  365. package/dist/components/RemoveDialog/index.cjs +1 -1
  366. package/dist/components/RemoveDialog/index.js +1 -1
  367. package/dist/components/RichTextEditor/RichTextEditor.d.cts +16 -1
  368. package/dist/components/RichTextEditor/RichTextEditor.d.ts +16 -1
  369. package/dist/components/RichTextEditor/index.cjs +1 -1
  370. package/dist/components/RichTextEditor/index.js +1 -1
  371. package/dist/components/RootLayout/RootLayout.d.cts +8 -1
  372. package/dist/components/RootLayout/RootLayout.d.ts +8 -1
  373. package/dist/components/RootLayout/SettingsDrawer.d.cts +4 -1
  374. package/dist/components/RootLayout/SettingsDrawer.d.ts +4 -1
  375. package/dist/components/RootLayout/index.cjs +1 -1
  376. package/dist/components/RootLayout/index.js +1 -1
  377. package/dist/components/Select/index.cjs +1 -1
  378. package/dist/components/Select/index.js +1 -1
  379. package/dist/components/Sidebar/Sidebar.d.cts +2 -0
  380. package/dist/components/Sidebar/Sidebar.d.ts +2 -0
  381. package/dist/components/Sidebar/index.cjs +1 -1
  382. package/dist/components/Sidebar/index.js +1 -1
  383. package/dist/components/SpeedDial/index.cjs +1 -1
  384. package/dist/components/SpeedDial/index.js +1 -1
  385. package/dist/components/Stepper/Stepper.d.cts +8 -1
  386. package/dist/components/Stepper/Stepper.d.ts +8 -1
  387. package/dist/components/Stepper/index.cjs +1 -1
  388. package/dist/components/Stepper/index.js +1 -1
  389. package/dist/components/SwatchPicker/index.cjs +1 -1
  390. package/dist/components/SwatchPicker/index.js +1 -1
  391. package/dist/components/Table/Table.d.cts +20 -3
  392. package/dist/components/Table/Table.d.ts +20 -3
  393. package/dist/components/Table/index.cjs +1 -1
  394. package/dist/components/Table/index.js +1 -1
  395. package/dist/components/Table/tableFilter.d.cts +12 -2
  396. package/dist/components/Table/tableFilter.d.ts +12 -2
  397. package/dist/components/Tabs/Tabs.d.cts +8 -1
  398. package/dist/components/Tabs/Tabs.d.ts +8 -1
  399. package/dist/components/Tabs/index.cjs +1 -1
  400. package/dist/components/Tabs/index.js +1 -1
  401. package/dist/components/TagsField/index.cjs +1 -1
  402. package/dist/components/TagsField/index.js +1 -1
  403. package/dist/components/TextField/index.cjs +1 -1
  404. package/dist/components/TextField/index.js +1 -1
  405. package/dist/components/ThemeToggle/index.cjs +1 -1
  406. package/dist/components/ThemeToggle/index.js +1 -1
  407. package/dist/components/TimePicker/index.cjs +1 -1
  408. package/dist/components/TimePicker/index.js +1 -1
  409. package/dist/components/Timeline/index.cjs +1 -1
  410. package/dist/components/Timeline/index.js +1 -1
  411. package/dist/components/Toast/index.cjs +1 -1
  412. package/dist/components/Toast/index.js +1 -1
  413. package/dist/components/ToggleButton/index.cjs +1 -1
  414. package/dist/components/ToggleButton/index.js +1 -1
  415. package/dist/components/Tooltip/Tooltip.d.cts +10 -3
  416. package/dist/components/Tooltip/Tooltip.d.ts +10 -3
  417. package/dist/components/Tooltip/index.cjs +1 -1
  418. package/dist/components/Tooltip/index.js +1 -1
  419. package/dist/components/TranslatedFields/index.cjs +1 -1
  420. package/dist/components/TranslatedFields/index.js +1 -1
  421. package/dist/components/UserCard/index.cjs +1 -1
  422. package/dist/components/UserCard/index.js +1 -1
  423. package/dist/entries/app.cjs +1 -1
  424. package/dist/entries/app.js +1 -1
  425. package/dist/entries/components.cjs +1 -1
  426. package/dist/entries/components.js +64 -64
  427. package/dist/entries/hooks.cjs +1 -1
  428. package/dist/entries/hooks.d.cts +2 -0
  429. package/dist/entries/hooks.d.ts +2 -0
  430. package/dist/entries/hooks.js +9 -8
  431. package/dist/entries/i18n.cjs +1 -1
  432. package/dist/entries/i18n.js +2 -2
  433. package/dist/entries/icons.cjs +1 -1
  434. package/dist/entries/icons.js +2 -2
  435. package/dist/entries/theme.cjs +1 -1
  436. package/dist/entries/theme.d.cts +1 -1
  437. package/dist/entries/theme.d.ts +1 -1
  438. package/dist/entries/theme.js +1 -1
  439. package/dist/hooks/index.d.cts +2 -0
  440. package/dist/hooks/index.d.ts +2 -0
  441. package/dist/hooks/useClearUrlOnUnmount.d.cts +19 -0
  442. package/dist/hooks/useClearUrlOnUnmount.d.ts +19 -0
  443. package/dist/hooks/useQueryModal.d.cts +40 -0
  444. package/dist/hooks/useQueryModal.d.ts +40 -0
  445. package/dist/i18n/messages.d.cts +12 -0
  446. package/dist/i18n/messages.d.ts +12 -0
  447. package/dist/icons/names.d.cts +3 -3
  448. package/dist/icons/names.d.ts +3 -3
  449. package/dist/index.cjs +1 -1
  450. package/dist/index.css +1 -1
  451. package/dist/index.js +251 -250
  452. package/dist/{messages-FiUqCKjJ.cjs → messages-DS38X5W2.cjs} +9 -9
  453. package/dist/messages-DS38X5W2.cjs.map +1 -0
  454. package/dist/{messages-DCefu6Pn.js → messages-DswDgGe2.js} +52 -10
  455. package/dist/messages-DswDgGe2.js.map +1 -0
  456. package/dist/{names-r21QPjcU.js → names-BR1uJs0-.js} +5 -4
  457. package/dist/names-BR1uJs0-.js.map +1 -0
  458. package/dist/names-YOCJ4B5J.cjs +2 -0
  459. package/dist/names-YOCJ4B5J.cjs.map +1 -0
  460. package/dist/theme/ConfigProvider.d.cts +48 -0
  461. package/dist/theme/ConfigProvider.d.ts +48 -0
  462. package/dist/theme/index.d.cts +1 -1
  463. package/dist/theme/index.d.ts +1 -1
  464. package/dist/useClearUrlOnUnmount-Cg7v2y5B.cjs +2 -0
  465. package/dist/useClearUrlOnUnmount-Cg7v2y5B.cjs.map +1 -0
  466. package/dist/useClearUrlOnUnmount-DOeh6CUN.js +37 -0
  467. package/dist/useClearUrlOnUnmount-DOeh6CUN.js.map +1 -0
  468. package/dist/useForm-CGbJ44Gp.js +194 -0
  469. package/dist/useForm-CGbJ44Gp.js.map +1 -0
  470. package/dist/useForm-CSw6r1n1.cjs +2 -0
  471. package/dist/useForm-CSw6r1n1.cjs.map +1 -0
  472. package/dist/{useOptionMenu-BoWyPgbY.cjs → useOptionMenu-BYeSUee6.cjs} +2 -2
  473. package/dist/{useOptionMenu-BoWyPgbY.cjs.map → useOptionMenu-BYeSUee6.cjs.map} +1 -1
  474. package/dist/{useOptionMenu-D7EbYG9A.js → useOptionMenu-DtTvY9EC.js} +6 -6
  475. package/dist/{useOptionMenu-D7EbYG9A.js.map → useOptionMenu-DtTvY9EC.js.map} +1 -1
  476. package/package.json +1 -1
  477. package/dist/AdminRoot-9HGp3Mds.js +0 -55
  478. package/dist/AdminRoot-9HGp3Mds.js.map +0 -1
  479. package/dist/AdminRoot-D24UJ-4a.cjs +0 -2
  480. package/dist/AdminRoot-D24UJ-4a.cjs.map +0 -1
  481. package/dist/Card-CUUh4mlB.cjs +0 -2
  482. package/dist/Card-CUUh4mlB.cjs.map +0 -1
  483. package/dist/Card-MxYfQTOY.js +0 -121
  484. package/dist/Card-MxYfQTOY.js.map +0 -1
  485. package/dist/ConfigProvider-BbsI15b-.js +0 -320
  486. package/dist/ConfigProvider-BbsI15b-.js.map +0 -1
  487. package/dist/ConfigProvider-ByLHqXpv.cjs +0 -2
  488. package/dist/ConfigProvider-ByLHqXpv.cjs.map +0 -1
  489. package/dist/DescriptionList-U5z2Faf4.cjs +0 -2
  490. package/dist/FloatingPanel-BIC4WrFa.cjs +0 -2
  491. package/dist/FloatingPanel-CeSOtE_D.js +0 -135
  492. package/dist/Icon-BVULqOJD.cjs +0 -2
  493. package/dist/Icon-BVULqOJD.cjs.map +0 -1
  494. package/dist/Icon-DaTvzLBu.js.map +0 -1
  495. package/dist/RadioGroup-BcFBdFhh.cjs +0 -2
  496. package/dist/RadioGroup-BcFBdFhh.cjs.map +0 -1
  497. package/dist/RadioGroup-dVx_hMCY.js +0 -141
  498. package/dist/RadioGroup-dVx_hMCY.js.map +0 -1
  499. package/dist/RichTextEditor-BDAWmQrN.js +0 -806
  500. package/dist/RichTextEditor-BDAWmQrN.js.map +0 -1
  501. package/dist/RichTextEditor-D4HpPT3C.cjs +0 -2
  502. package/dist/RichTextEditor-D4HpPT3C.cjs.map +0 -1
  503. package/dist/RootLayout-CxncyjCz.js +0 -515
  504. package/dist/RootLayout-CxncyjCz.js.map +0 -1
  505. package/dist/RootLayout-XEcU_MBs.cjs +0 -2
  506. package/dist/RootLayout-XEcU_MBs.cjs.map +0 -1
  507. package/dist/Sidebar-B8ecHwZr.cjs +0 -2
  508. package/dist/Sidebar-B8ecHwZr.cjs.map +0 -1
  509. package/dist/Sidebar-BgCfnZBF.js.map +0 -1
  510. package/dist/Stepper-DOSc03YV.cjs +0 -2
  511. package/dist/Stepper-DOSc03YV.cjs.map +0 -1
  512. package/dist/Stepper-DtYamv1q.js +0 -165
  513. package/dist/Stepper-DtYamv1q.js.map +0 -1
  514. package/dist/Table-AzNzUAkl.js +0 -1170
  515. package/dist/Table-AzNzUAkl.js.map +0 -1
  516. package/dist/Table-CrpWhZUg.cjs +0 -2
  517. package/dist/Table-CrpWhZUg.cjs.map +0 -1
  518. package/dist/Tabs-CMnLXRjA.cjs +0 -2
  519. package/dist/Tabs-CMnLXRjA.cjs.map +0 -1
  520. package/dist/Tabs-D1RGhKsa.js +0 -190
  521. package/dist/Tabs-D1RGhKsa.js.map +0 -1
  522. package/dist/Tooltip-Ao7az09p.cjs +0 -2
  523. package/dist/Tooltip-Ao7az09p.cjs.map +0 -1
  524. package/dist/Tooltip-Cb_FKxT9.js +0 -65
  525. package/dist/Tooltip-Cb_FKxT9.js.map +0 -1
  526. package/dist/messages-DCefu6Pn.js.map +0 -1
  527. package/dist/messages-FiUqCKjJ.cjs.map +0 -1
  528. package/dist/names-BJnFU_5m.cjs +0 -2
  529. package/dist/names-BJnFU_5m.cjs.map +0 -1
  530. package/dist/names-r21QPjcU.js.map +0 -1
  531. package/dist/useForm-CN-qCrP7.js +0 -144
  532. package/dist/useForm-CN-qCrP7.js.map +0 -1
  533. package/dist/useForm-WvV361y6.cjs +0 -2
  534. package/dist/useForm-WvV361y6.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
2
  import { forwardRef as x, isValidElement as B, cloneElement as g } from "react";
3
3
  import { clsx as v } from "clsx";
4
- import { L as z } from "./Loader-C1uaCtx6.js";
4
+ import { L as z } from "./Loader-Czzb450N.js";
5
5
  const I = "_iconButton_10018_1", y = "_sm_10018_22", k = "_md_10018_27", C = "_lg_10018_32", E = "_contained_10018_38", L = "_filled_10018_48", $ = "_outlined_10018_57", j = "_text_10018_68", w = "_rounded_10018_78", N = "_disabled_10018_86", R = "_loading_10018_90", V = "_nonClickable_10018_95", t = {
6
6
  iconButton: I,
7
7
  sm: y,
@@ -65,4 +65,4 @@ const I = "_iconButton_10018_1", y = "_sm_10018_22", k = "_md_10018_27", C = "_l
65
65
  export {
66
66
  H as I
67
67
  };
68
- //# sourceMappingURL=IconButton-GU3Ud4Zg.js.map
68
+ //# sourceMappingURL=IconButton-CL_6iMQh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton-GU3Ud4Zg.js","sources":["../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import {\n cloneElement,\n forwardRef,\n isValidElement,\n type ButtonHTMLAttributes,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport type { ThemeColor } from '../../theme'\nimport { Loader } from '../Loader'\nimport styles from './IconButton.module.css'\n\nexport type IconButtonVariant = 'contained' | 'filled' | 'outlined' | 'text'\nexport type IconButtonSize = 'sm' | 'md' | 'lg'\n\nexport interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'> {\n /** Visual style. `contained` solid · `filled` soft tint · `outlined` border · `text` bare. */\n variant?: IconButtonVariant\n /** Theme palette token that tints the button. Defaults to `accent`. */\n color?: ThemeColor\n /** Preset size — square: width === height === `--tz-control-height-*` (matches `Button` heights). */\n size?: IconButtonSize\n /** Shows the loader in the icon's place and blocks interaction (also sets the native `disabled`). */\n loading?: boolean\n /** Circular shape instead of the default rounded square. */\n rounded?: boolean\n /** Ignores all interaction (no clicks, hover or focus) while keeping the normal look — unlike `disabled`, it's not dimmed. */\n nonClickable?: boolean\n /** The icon to render — typically an `<Icon />`. Swapped for the loader while `loading`. */\n children?: ReactNode\n}\n\n/**\n * A square, text-less button for a single icon. Shares `Button`'s variants,\n * colors and sizing, but its width equals its height (the matching\n * `--tz-control-height-*`). Pass an `<Icon />` (or any node) as the child;\n * while `loading` it's replaced by the `Loader`. Provide an `aria-label` since\n * there's no visible text.\n */\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n {\n variant = 'contained',\n color = 'accent',\n size = 'md',\n loading = false,\n rounded = false,\n disabled = false,\n nonClickable = false,\n className,\n style,\n type = 'button',\n tabIndex,\n children,\n ...props\n },\n ref,\n) {\n // size the icon child to match the button (an explicit icon `size` still wins)\n const icon =\n isValidElement(children) && !loading\n ? cloneElement(children as ReactElement<{ size?: IconButtonSize }>, {\n size: (children.props as { size?: IconButtonSize }).size ?? size,\n })\n : children\n\n return (\n <button\n ref={ref}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n aria-disabled={nonClickable || undefined}\n tabIndex={nonClickable ? -1 : tabIndex}\n className={clsx(\n styles.iconButton,\n styles[variant],\n styles[size],\n rounded && styles.rounded,\n loading && styles.loading,\n disabled && styles.disabled,\n nonClickable && styles.nonClickable,\n className,\n )}\n style={\n {\n '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`,\n '--tz-btn-on': `var(--tz-color-${color}-contrast, #fff)`,\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n {loading ? <Loader size={size} aria-hidden=\"true\" /> : icon}\n </button>\n )\n})\n"],"names":["IconButton","forwardRef","variant","color","size","loading","rounded","disabled","nonClickable","className","style","type","tabIndex","children","props","ref","icon","isValidElement","cloneElement","jsx","clsx","styles","Loader"],"mappings":";;;;;;;;;;;;;;;;;GAyCaA,IAAaC,EAA+C,SACvE;AAAA,EACE,SAAAC,IAAU;AAAA,EACV,OAAAC,IAAQ;AAAA,EACR,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,UAAAC,IAAW;AAAA,EACX,cAAAC,IAAe;AAAA,EACf,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AAEA,QAAMC,IACJC,EAAeJ,CAAQ,KAAK,CAACR,IACzBa,EAAaL,GAAqD;AAAA,IAChE,MAAOA,EAAS,MAAoC,QAAQT;AAAA,EAAA,CAC7D,IACDS;AAEN,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAJ;AAAA,MACA,MAAAJ;AAAA,MACA,UAAUJ,KAAYF;AAAA,MACtB,aAAWA,KAAW;AAAA,MACtB,iBAAeG,KAAgB;AAAA,MAC/B,UAAUA,IAAe,KAAKI;AAAA,MAC9B,WAAWQ;AAAA,QACTC,EAAO;AAAA,QACPA,EAAOnB,CAAO;AAAA,QACdmB,EAAOjB,CAAI;AAAA,QACXE,KAAWe,EAAO;AAAA,QAClBhB,KAAWgB,EAAO;AAAA,QAClBd,KAAYc,EAAO;AAAA,QACnBb,KAAgBa,EAAO;AAAA,QACvBZ;AAAA,MAAA;AAAA,MAEF,OACE;AAAA,QACE,gBAAgB,kBAAkBN,CAAK;AAAA,QACvC,eAAe,kBAAkBA,CAAK;AAAA,QACtC,GAAGO;AAAA,MAAA;AAAA,MAGN,GAAGI;AAAA,MAEH,cAAU,gBAAAK,EAACG,GAAA,EAAO,MAAAlB,GAAY,eAAY,QAAO,IAAKY;AAAA,IAAA;AAAA,EAAA;AAG7D,CAAC;"}
1
+ {"version":3,"file":"IconButton-CL_6iMQh.js","sources":["../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import {\n cloneElement,\n forwardRef,\n isValidElement,\n type ButtonHTMLAttributes,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport type { ThemeColor } from '../../theme'\nimport { Loader } from '../Loader'\nimport styles from './IconButton.module.css'\n\nexport type IconButtonVariant = 'contained' | 'filled' | 'outlined' | 'text'\nexport type IconButtonSize = 'sm' | 'md' | 'lg'\n\nexport interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'> {\n /** Visual style. `contained` solid · `filled` soft tint · `outlined` border · `text` bare. */\n variant?: IconButtonVariant\n /** Theme palette token that tints the button. Defaults to `accent`. */\n color?: ThemeColor\n /** Preset size — square: width === height === `--tz-control-height-*` (matches `Button` heights). */\n size?: IconButtonSize\n /** Shows the loader in the icon's place and blocks interaction (also sets the native `disabled`). */\n loading?: boolean\n /** Circular shape instead of the default rounded square. */\n rounded?: boolean\n /** Ignores all interaction (no clicks, hover or focus) while keeping the normal look — unlike `disabled`, it's not dimmed. */\n nonClickable?: boolean\n /** The icon to render — typically an `<Icon />`. Swapped for the loader while `loading`. */\n children?: ReactNode\n}\n\n/**\n * A square, text-less button for a single icon. Shares `Button`'s variants,\n * colors and sizing, but its width equals its height (the matching\n * `--tz-control-height-*`). Pass an `<Icon />` (or any node) as the child;\n * while `loading` it's replaced by the `Loader`. Provide an `aria-label` since\n * there's no visible text.\n */\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n {\n variant = 'contained',\n color = 'accent',\n size = 'md',\n loading = false,\n rounded = false,\n disabled = false,\n nonClickable = false,\n className,\n style,\n type = 'button',\n tabIndex,\n children,\n ...props\n },\n ref,\n) {\n // size the icon child to match the button (an explicit icon `size` still wins)\n const icon =\n isValidElement(children) && !loading\n ? cloneElement(children as ReactElement<{ size?: IconButtonSize }>, {\n size: (children.props as { size?: IconButtonSize }).size ?? size,\n })\n : children\n\n return (\n <button\n ref={ref}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n aria-disabled={nonClickable || undefined}\n tabIndex={nonClickable ? -1 : tabIndex}\n className={clsx(\n styles.iconButton,\n styles[variant],\n styles[size],\n rounded && styles.rounded,\n loading && styles.loading,\n disabled && styles.disabled,\n nonClickable && styles.nonClickable,\n className,\n )}\n style={\n {\n '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`,\n '--tz-btn-on': `var(--tz-color-${color}-contrast, #fff)`,\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n {loading ? <Loader size={size} aria-hidden=\"true\" /> : icon}\n </button>\n )\n})\n"],"names":["IconButton","forwardRef","variant","color","size","loading","rounded","disabled","nonClickable","className","style","type","tabIndex","children","props","ref","icon","isValidElement","cloneElement","jsx","clsx","styles","Loader"],"mappings":";;;;;;;;;;;;;;;;;GAyCaA,IAAaC,EAA+C,SACvE;AAAA,EACE,SAAAC,IAAU;AAAA,EACV,OAAAC,IAAQ;AAAA,EACR,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,UAAAC,IAAW;AAAA,EACX,cAAAC,IAAe;AAAA,EACf,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AAEA,QAAMC,IACJC,EAAeJ,CAAQ,KAAK,CAACR,IACzBa,EAAaL,GAAqD;AAAA,IAChE,MAAOA,EAAS,MAAoC,QAAQT;AAAA,EAAA,CAC7D,IACDS;AAEN,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAJ;AAAA,MACA,MAAAJ;AAAA,MACA,UAAUJ,KAAYF;AAAA,MACtB,aAAWA,KAAW;AAAA,MACtB,iBAAeG,KAAgB;AAAA,MAC/B,UAAUA,IAAe,KAAKI;AAAA,MAC9B,WAAWQ;AAAA,QACTC,EAAO;AAAA,QACPA,EAAOnB,CAAO;AAAA,QACdmB,EAAOjB,CAAI;AAAA,QACXE,KAAWe,EAAO;AAAA,QAClBhB,KAAWgB,EAAO;AAAA,QAClBd,KAAYc,EAAO;AAAA,QACnBb,KAAgBa,EAAO;AAAA,QACvBZ;AAAA,MAAA;AAAA,MAEF,OACE;AAAA,QACE,gBAAgB,kBAAkBN,CAAK;AAAA,QACvC,eAAe,kBAAkBA,CAAK;AAAA,QACtC,GAAGO;AAAA,MAAA;AAAA,MAGN,GAAGI;AAAA,MAEH,cAAU,gBAAAK,EAACG,GAAA,EAAO,MAAAlB,GAAY,eAAY,QAAO,IAAKY;AAAA,IAAA;AAAA,EAAA;AAG7D,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";const i=require("react/jsx-runtime"),c=require("react"),g=require("clsx"),q=require("./Loader-Cpr9-OOZ.cjs"),v="_iconButton_10018_1",z="_sm_10018_22",I="_md_10018_27",j="_lg_10018_32",y="_contained_10018_38",k="_filled_10018_48",p="_outlined_10018_57",C="_text_10018_68",E="_rounded_10018_78",L="_disabled_10018_86",R="_loading_10018_90",$="_nonClickable_10018_95",t={iconButton:v,sm:z,md:I,lg:j,contained:y,filled:k,outlined:p,text:C,rounded:E,disabled:L,loading:R,nonClickable:$},w=c.forwardRef(function({variant:a="contained",color:d="accent",size:e="md",loading:n=!1,rounded:l=!1,disabled:_=!1,nonClickable:s=!1,className:r,style:u,type:b="button",tabIndex:f,children:o,...m},x){const B=c.isValidElement(o)&&!n?c.cloneElement(o,{size:o.props.size??e}):o;return i.jsx("button",{ref:x,type:b,disabled:_||n,"aria-busy":n||void 0,"aria-disabled":s||void 0,tabIndex:s?-1:f,className:g.clsx(t.iconButton,t[a],t[e],l&&t.rounded,n&&t.loading,_&&t.disabled,s&&t.nonClickable,r),style:{"--tz-btn-rgb":`var(--tz-color-${d}-rgb)`,"--tz-btn-on":`var(--tz-color-${d}-contrast, #fff)`,...u},...m,children:n?i.jsx(q.Loader,{size:e,"aria-hidden":"true"}):B})});exports.IconButton=w;
2
- //# sourceMappingURL=IconButton-BNa0yLcv.cjs.map
1
+ "use strict";const i=require("react/jsx-runtime"),c=require("react"),g=require("clsx"),q=require("./Loader-CI1j71X8.cjs"),v="_iconButton_10018_1",z="_sm_10018_22",I="_md_10018_27",j="_lg_10018_32",y="_contained_10018_38",k="_filled_10018_48",p="_outlined_10018_57",C="_text_10018_68",E="_rounded_10018_78",L="_disabled_10018_86",R="_loading_10018_90",$="_nonClickable_10018_95",t={iconButton:v,sm:z,md:I,lg:j,contained:y,filled:k,outlined:p,text:C,rounded:E,disabled:L,loading:R,nonClickable:$},w=c.forwardRef(function({variant:a="contained",color:d="accent",size:e="md",loading:n=!1,rounded:l=!1,disabled:_=!1,nonClickable:s=!1,className:r,style:u,type:b="button",tabIndex:f,children:o,...m},x){const B=c.isValidElement(o)&&!n?c.cloneElement(o,{size:o.props.size??e}):o;return i.jsx("button",{ref:x,type:b,disabled:_||n,"aria-busy":n||void 0,"aria-disabled":s||void 0,tabIndex:s?-1:f,className:g.clsx(t.iconButton,t[a],t[e],l&&t.rounded,n&&t.loading,_&&t.disabled,s&&t.nonClickable,r),style:{"--tz-btn-rgb":`var(--tz-color-${d}-rgb)`,"--tz-btn-on":`var(--tz-color-${d}-contrast, #fff)`,...u},...m,children:n?i.jsx(q.Loader,{size:e,"aria-hidden":"true"}):B})});exports.IconButton=w;
2
+ //# sourceMappingURL=IconButton-CvIXSFsr.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton-BNa0yLcv.cjs","sources":["../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import {\n cloneElement,\n forwardRef,\n isValidElement,\n type ButtonHTMLAttributes,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport type { ThemeColor } from '../../theme'\nimport { Loader } from '../Loader'\nimport styles from './IconButton.module.css'\n\nexport type IconButtonVariant = 'contained' | 'filled' | 'outlined' | 'text'\nexport type IconButtonSize = 'sm' | 'md' | 'lg'\n\nexport interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'> {\n /** Visual style. `contained` solid · `filled` soft tint · `outlined` border · `text` bare. */\n variant?: IconButtonVariant\n /** Theme palette token that tints the button. Defaults to `accent`. */\n color?: ThemeColor\n /** Preset size — square: width === height === `--tz-control-height-*` (matches `Button` heights). */\n size?: IconButtonSize\n /** Shows the loader in the icon's place and blocks interaction (also sets the native `disabled`). */\n loading?: boolean\n /** Circular shape instead of the default rounded square. */\n rounded?: boolean\n /** Ignores all interaction (no clicks, hover or focus) while keeping the normal look — unlike `disabled`, it's not dimmed. */\n nonClickable?: boolean\n /** The icon to render — typically an `<Icon />`. Swapped for the loader while `loading`. */\n children?: ReactNode\n}\n\n/**\n * A square, text-less button for a single icon. Shares `Button`'s variants,\n * colors and sizing, but its width equals its height (the matching\n * `--tz-control-height-*`). Pass an `<Icon />` (or any node) as the child;\n * while `loading` it's replaced by the `Loader`. Provide an `aria-label` since\n * there's no visible text.\n */\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n {\n variant = 'contained',\n color = 'accent',\n size = 'md',\n loading = false,\n rounded = false,\n disabled = false,\n nonClickable = false,\n className,\n style,\n type = 'button',\n tabIndex,\n children,\n ...props\n },\n ref,\n) {\n // size the icon child to match the button (an explicit icon `size` still wins)\n const icon =\n isValidElement(children) && !loading\n ? cloneElement(children as ReactElement<{ size?: IconButtonSize }>, {\n size: (children.props as { size?: IconButtonSize }).size ?? size,\n })\n : children\n\n return (\n <button\n ref={ref}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n aria-disabled={nonClickable || undefined}\n tabIndex={nonClickable ? -1 : tabIndex}\n className={clsx(\n styles.iconButton,\n styles[variant],\n styles[size],\n rounded && styles.rounded,\n loading && styles.loading,\n disabled && styles.disabled,\n nonClickable && styles.nonClickable,\n className,\n )}\n style={\n {\n '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`,\n '--tz-btn-on': `var(--tz-color-${color}-contrast, #fff)`,\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n {loading ? <Loader size={size} aria-hidden=\"true\" /> : icon}\n </button>\n )\n})\n"],"names":["IconButton","forwardRef","variant","color","size","loading","rounded","disabled","nonClickable","className","style","type","tabIndex","children","props","ref","icon","isValidElement","cloneElement","jsx","clsx","styles","Loader"],"mappings":"+eAyCaA,EAAaC,EAAAA,WAA+C,SACvE,CACE,QAAAC,EAAU,YACV,MAAAC,EAAQ,SACR,KAAAC,EAAO,KACP,QAAAC,EAAU,GACV,QAAAC,EAAU,GACV,SAAAC,EAAW,GACX,aAAAC,EAAe,GACf,UAAAC,EACA,MAAAC,EACA,KAAAC,EAAO,SACP,SAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EACAC,EACA,CAEA,MAAMC,EACJC,EAAAA,eAAeJ,CAAQ,GAAK,CAACR,EACzBa,EAAAA,aAAaL,EAAqD,CAChE,KAAOA,EAAS,MAAoC,MAAQT,CAAA,CAC7D,EACDS,EAEN,OACEM,EAAAA,IAAC,SAAA,CACC,IAAAJ,EACA,KAAAJ,EACA,SAAUJ,GAAYF,EACtB,YAAWA,GAAW,OACtB,gBAAeG,GAAgB,OAC/B,SAAUA,EAAe,GAAKI,EAC9B,UAAWQ,EAAAA,KACTC,EAAO,WACPA,EAAOnB,CAAO,EACdmB,EAAOjB,CAAI,EACXE,GAAWe,EAAO,QAClBhB,GAAWgB,EAAO,QAClBd,GAAYc,EAAO,SACnBb,GAAgBa,EAAO,aACvBZ,CAAA,EAEF,MACE,CACE,eAAgB,kBAAkBN,CAAK,QACvC,cAAe,kBAAkBA,CAAK,mBACtC,GAAGO,CAAA,EAGN,GAAGI,EAEH,WAAUK,EAAAA,IAACG,EAAAA,OAAA,CAAO,KAAAlB,EAAY,cAAY,OAAO,EAAKY,CAAA,CAAA,CAG7D,CAAC"}
1
+ {"version":3,"file":"IconButton-CvIXSFsr.cjs","sources":["../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import {\n cloneElement,\n forwardRef,\n isValidElement,\n type ButtonHTMLAttributes,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport type { ThemeColor } from '../../theme'\nimport { Loader } from '../Loader'\nimport styles from './IconButton.module.css'\n\nexport type IconButtonVariant = 'contained' | 'filled' | 'outlined' | 'text'\nexport type IconButtonSize = 'sm' | 'md' | 'lg'\n\nexport interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'> {\n /** Visual style. `contained` solid · `filled` soft tint · `outlined` border · `text` bare. */\n variant?: IconButtonVariant\n /** Theme palette token that tints the button. Defaults to `accent`. */\n color?: ThemeColor\n /** Preset size — square: width === height === `--tz-control-height-*` (matches `Button` heights). */\n size?: IconButtonSize\n /** Shows the loader in the icon's place and blocks interaction (also sets the native `disabled`). */\n loading?: boolean\n /** Circular shape instead of the default rounded square. */\n rounded?: boolean\n /** Ignores all interaction (no clicks, hover or focus) while keeping the normal look — unlike `disabled`, it's not dimmed. */\n nonClickable?: boolean\n /** The icon to render — typically an `<Icon />`. Swapped for the loader while `loading`. */\n children?: ReactNode\n}\n\n/**\n * A square, text-less button for a single icon. Shares `Button`'s variants,\n * colors and sizing, but its width equals its height (the matching\n * `--tz-control-height-*`). Pass an `<Icon />` (or any node) as the child;\n * while `loading` it's replaced by the `Loader`. Provide an `aria-label` since\n * there's no visible text.\n */\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n {\n variant = 'contained',\n color = 'accent',\n size = 'md',\n loading = false,\n rounded = false,\n disabled = false,\n nonClickable = false,\n className,\n style,\n type = 'button',\n tabIndex,\n children,\n ...props\n },\n ref,\n) {\n // size the icon child to match the button (an explicit icon `size` still wins)\n const icon =\n isValidElement(children) && !loading\n ? cloneElement(children as ReactElement<{ size?: IconButtonSize }>, {\n size: (children.props as { size?: IconButtonSize }).size ?? size,\n })\n : children\n\n return (\n <button\n ref={ref}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n aria-disabled={nonClickable || undefined}\n tabIndex={nonClickable ? -1 : tabIndex}\n className={clsx(\n styles.iconButton,\n styles[variant],\n styles[size],\n rounded && styles.rounded,\n loading && styles.loading,\n disabled && styles.disabled,\n nonClickable && styles.nonClickable,\n className,\n )}\n style={\n {\n '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`,\n '--tz-btn-on': `var(--tz-color-${color}-contrast, #fff)`,\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n {loading ? <Loader size={size} aria-hidden=\"true\" /> : icon}\n </button>\n )\n})\n"],"names":["IconButton","forwardRef","variant","color","size","loading","rounded","disabled","nonClickable","className","style","type","tabIndex","children","props","ref","icon","isValidElement","cloneElement","jsx","clsx","styles","Loader"],"mappings":"+eAyCaA,EAAaC,EAAAA,WAA+C,SACvE,CACE,QAAAC,EAAU,YACV,MAAAC,EAAQ,SACR,KAAAC,EAAO,KACP,QAAAC,EAAU,GACV,QAAAC,EAAU,GACV,SAAAC,EAAW,GACX,aAAAC,EAAe,GACf,UAAAC,EACA,MAAAC,EACA,KAAAC,EAAO,SACP,SAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EACAC,EACA,CAEA,MAAMC,EACJC,EAAAA,eAAeJ,CAAQ,GAAK,CAACR,EACzBa,EAAAA,aAAaL,EAAqD,CAChE,KAAOA,EAAS,MAAoC,MAAQT,CAAA,CAC7D,EACDS,EAEN,OACEM,EAAAA,IAAC,SAAA,CACC,IAAAJ,EACA,KAAAJ,EACA,SAAUJ,GAAYF,EACtB,YAAWA,GAAW,OACtB,gBAAeG,GAAgB,OAC/B,SAAUA,EAAe,GAAKI,EAC9B,UAAWQ,EAAAA,KACTC,EAAO,WACPA,EAAOnB,CAAO,EACdmB,EAAOjB,CAAI,EACXE,GAAWe,EAAO,QAClBhB,GAAWgB,EAAO,QAClBd,GAAYc,EAAO,SACnBb,GAAgBa,EAAO,aACvBZ,CAAA,EAEF,MACE,CACE,eAAgB,kBAAkBN,CAAK,QACvC,cAAe,kBAAkBA,CAAK,mBACtC,GAAGO,CAAA,EAGN,GAAGI,EAEH,WAAUK,EAAAA,IAACG,EAAAA,OAAA,CAAO,KAAAlB,EAAY,cAAY,OAAO,EAAKY,CAAA,CAAA,CAG7D,CAAC"}
@@ -3,8 +3,8 @@ import { createContext as D, useContext as j, forwardRef as y, useMemo as A } fr
3
3
  import { s as v } from "./Flex-BFn4P1tJ.js";
4
4
  import { S as I } from "./Skeleton-_-uGax2j.js";
5
5
  import { clsx as M } from "clsx";
6
- import { I as R } from "./Icon-DaTvzLBu.js";
7
- import { a as B } from "./names-r21QPjcU.js";
6
+ import { I as R } from "./Icon-CGQ5yGSZ.js";
7
+ import { a as B } from "./names-BR1uJs0-.js";
8
8
  const T = D({}), P = () => j(T), Z = "_item_16twt_3", $ = "_sm_16twt_25", q = "_md_16twt_31", F = "_lg_16twt_36", G = "_flush_16twt_43", H = "_itemIcon_16twt_49", J = "_itemText_16twt_57", Q = "_itemLabel_16twt_65", U = "_itemDescription_16twt_72", V = "_itemTrailing_16twt_82", W = "_clickable_16twt_92", X = "_selected_16twt_109", Y = "_disabled_16twt_130", t = {
9
9
  item: Z,
10
10
  sm: $,
@@ -104,4 +104,4 @@ export {
104
104
  at as L,
105
105
  et as a
106
106
  };
107
- //# sourceMappingURL=List-CZwNGxuP.js.map
107
+ //# sourceMappingURL=List-BLPB3-B8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List-CZwNGxuP.js","sources":["../src/components/List/listContext.ts","../src/components/List/ListItem.tsx","../src/components/List/List.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { ListItemSize } from './ListItem'\n\n/** Defaults a `List` hands to its `ListItem`s — an explicit item prop still wins. */\nexport interface ListContextValue {\n size?: ListItemSize\n flush?: boolean\n}\n\nexport const ListContext = createContext<ListContextValue>({})\n\n/** Read the defaults provided by a surrounding `List`, if any. */\nexport const useListContext = (): ListContextValue => useContext(ListContext)\n\n/** @deprecated internal — use `useListContext().size`. Kept so older call sites keep compiling. */\nexport const useListSize = (): ListItemSize | undefined => useListContext().size\n","import {\n forwardRef,\n type AnchorHTMLAttributes,\n type CSSProperties,\n type ElementType,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { Icon } from '../Icon'\nimport type { ThemeColor } from '../../theme'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { useListContext } from './listContext'\nimport styles from './List.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport type ListItemSize = 'sm' | 'md' | 'lg'\n\n/** Leading `<Icon>` size per row size. */\nconst ICON_SIZE: Record<ListItemSize, 'sm' | 'md'> = { sm: 'sm', md: 'md', lg: 'md' }\n\nexport interface ListItemProps\n extends\n Omit<HTMLAttributes<HTMLElement>, 'color'>,\n Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'rel' | 'download'> {\n /** Leading element — a known `IconName` (rendered as `<Icon>`) or any node (e.g. an `Avatar`). */\n icon?: IconName | ReactNode\n /** Secondary muted line shown under the label. */\n description?: ReactNode\n /** Trailing content pinned to the right (icon, `Badge`, shortcut text, chevron, …). */\n trailing?: ReactNode\n /** Highlights the row as selected/active (menu selection, current nav route). */\n selected?: boolean\n /** Makes the row interactive (hover + cursor; adds `role`/`tabIndex`/keyboard when rendered plain). */\n clickable?: boolean\n /** Dims and inerts the row. */\n disabled?: boolean\n /** Row size — height / padding / font. Defaults to `md`. */\n size?: ListItemSize\n /**\n * Drops the row's left / right padding so it sits flush with its container's edges (vertical padding\n * and min-height stay). Defaults to `false`; a surrounding `List flush` sets the default for all its rows.\n */\n flush?: boolean\n /** Theme color for the selected tint and clickable hover. Defaults to `primary`. */\n color?: ThemeColor\n /** Render a different element/component — e.g. `'a'`, `'button'`, or a router `Link`. Defaults to `div`. */\n as?: ElementType\n /** Primary label / content. */\n children?: ReactNode\n}\n\n/**\n * A flexible, reusable list row: leading `icon`, a label (`children`) with optional `description`, and\n * a `trailing` slot. `clickable` turns it interactive (hover + keyboard when rendered as a plain\n * element), `selected` highlights it, `disabled` inerts it. Render as a link/button/router `Link` via\n * `as`. Designed to compose inside `List` — for menus, the sidebar, or a standalone styled list.\n */\nexport const ListItem = forwardRef<HTMLElement, ListItemProps>(function ListItem(\n {\n icon,\n description,\n trailing,\n selected = false,\n clickable = false,\n disabled = false,\n size: sizeProp,\n flush: flushProp,\n color = 'primary',\n as,\n className,\n style,\n children,\n onClick,\n onKeyDown,\n ...props\n },\n ref,\n) {\n // explicit props win; otherwise inherit the surrounding `List`'s defaults (size falls back to `md`)\n const listCtx = useListContext()\n const size = sizeProp ?? listCtx.size ?? 'md'\n const flush = flushProp ?? listCtx.flush ?? false\n const Component = (as ?? 'div') as ElementType\n // Anchors, buttons, and custom components (e.g. a router Link) carry their own click + keyboard\n // semantics — only a plain element needs the button role/tabIndex/Enter-Space shim.\n const handlesOwnInteraction =\n as === 'a' || as === 'button' || typeof as === 'function' || typeof as === 'object'\n const isDivButton = clickable && !handlesOwnInteraction\n\n const renderedIcon =\n icon == null ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={ICON_SIZE[size]} />\n ) : (\n icon\n )\n\n const handleKeyDown = (event: KeyboardEvent<HTMLElement>) => {\n if (isDivButton && !disabled && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault()\n event.currentTarget.click()\n }\n onKeyDown?.(event)\n }\n\n return (\n <Component\n ref={ref}\n className={clsx(\n styles.item,\n styles[size],\n flush && styles.flush,\n selected && styles.selected,\n clickable && styles.clickable,\n disabled && styles.disabled,\n className,\n )}\n style={{ '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`, ...style } as CSSProperties}\n role={isDivButton ? 'button' : undefined}\n tabIndex={isDivButton ? (disabled ? -1 : 0) : undefined}\n aria-disabled={disabled || undefined}\n aria-current={selected || undefined}\n onClick={disabled ? undefined : onClick}\n onKeyDown={clickable ? handleKeyDown : onKeyDown}\n {...props}\n >\n {renderedIcon != null && <span className={styles.itemIcon}>{renderedIcon}</span>}\n {(children != null || description != null) && (\n <span className={styles.itemText}>\n {children != null && <span className={styles.itemLabel}>{children}</span>}\n {description != null && <span className={styles.itemDescription}>{description}</span>}\n </span>\n )}\n {trailing != null && <span className={styles.itemTrailing}>{trailing}</span>}\n </Component>\n )\n})\n","import {\n forwardRef,\n useMemo,\n type CSSProperties,\n type ElementType,\n type HTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { space, type Spacing } from '../Flex/Flex'\nimport { Skeleton } from '../Skeleton'\nimport { ListContext } from './listContext'\nimport { ListItem, type ListItemSize } from './ListItem'\n\nexport interface ListProps extends HTMLAttributes<HTMLElement> {\n /** Render a different element — e.g. `'ul'`, `'nav'`, `'menu'`. Defaults to `div`. */\n as?: ElementType\n /** Gap between items (token key, px number, or CSS value). Defaults to `2px`. */\n gap?: Spacing\n /** Padding around the list (token key, px number, or CSS value). */\n padding?: Spacing\n /** Default size for the contained `ListItem`s — each item can still override its own `size`. */\n size?: ListItemSize\n /**\n * Default `flush` for the contained `ListItem`s — drops their left / right padding so rows sit flush with\n * the list's edges (e.g. inside a padded `Card`). Each item can still override its own `flush`.\n */\n flush?: boolean\n /**\n * Render skeleton rows instead of `children` — `true` shows 3, a number sets the count. Each row is a\n * `ListItem` with an icon disc, a label line and a description line. Defaults to `false`.\n */\n loading?: boolean | number\n children?: ReactNode\n}\n\n/**\n * A thin semantic container for `ListItem`s — a vertical stack with a configurable `gap`/`padding`\n * and `role=\"list\"` (override `role` to `\"menu\"` for a dropdown, etc.). `size` and `flush` set defaults\n * for all contained `ListItem`s (an explicit item prop wins). `loading` swaps the items for skeleton rows. Layout is set via inline style, matching the `Flex`/`Grid` primitives.\n */\nexport const List = forwardRef<HTMLElement, ListProps>(function List(\n { as, gap = 2, padding, role = 'list', size, flush, loading = false, style, children, ...props },\n ref,\n) {\n const Component = (as ?? 'div') as ElementType\n // one stable object per (size, flush) so items don't re-render on every List render\n const ctx = useMemo(() => ({ size, flush }), [size, flush])\n const skeletonRows = typeof loading === 'number' ? loading : loading ? 3 : 0\n return (\n <Component\n ref={ref}\n role={role}\n aria-busy={loading ? true : undefined}\n style={\n {\n display: 'flex',\n flexDirection: 'column',\n gap: space(gap),\n padding: space(padding),\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n <ListContext.Provider value={ctx}>\n {loading\n ? Array.from({ length: skeletonRows }, (_, i) => (\n <ListItem\n key={i}\n aria-hidden=\"true\"\n icon={<Skeleton variant=\"circle\" height=\"1.25em\" />}\n description={<Skeleton width={i % 2 ? '45%' : '60%'} />}\n >\n <Skeleton width={i % 2 ? '30%' : '40%'} />\n </ListItem>\n ))\n : children}\n </ListContext.Provider>\n </Component>\n )\n})\n"],"names":["ListContext","createContext","useListContext","useContext","ICON_NAME_SET","ICON_NAMES","ICON_SIZE","ListItem","forwardRef","icon","description","trailing","selected","clickable","disabled","sizeProp","flushProp","color","as","className","style","children","onClick","onKeyDown","props","ref","listCtx","size","flush","Component","isDivButton","renderedIcon","jsx","Icon","handleKeyDown","event","jsxs","clsx","styles","List","gap","padding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,EAAE,MAAAlB,GAAM,OAAAC,MAAU,CAACD,GAAMC,CAAK,CAAC,GACpDkB,IAAe,OAAOH,KAAY,WAAWA,IAAUA,IAAU,IAAI;AAC3E,SACE,gBAAAX;AAAA,IAACH;AAAA,IAAA;AAAA,MACC,KAAAJ;AAAA,MACA,MAAAiB;AAAA,MACA,aAAWC,IAAU,KAAO;AAAA,MAC5B,OACE;AAAA,QACE,SAAS;AAAA,QACT,eAAe;AAAA,QACf,KAAKI,EAAMP,CAAG;AAAA,QACd,SAASO,EAAMN,CAAO;AAAA,QACtB,GAAGrB;AAAA,MAAA;AAAA,MAGN,GAAGI;AAAA,MAEJ,UAAA,gBAAAQ,EAAChC,EAAY,UAAZ,EAAqB,OAAO4C,GAC1B,UAAAD,IACG,MAAM,KAAK,EAAE,QAAQG,EAAA,GAAgB,CAACE,GAAGC,MACvC,gBAAAjB;AAAA,QAACzB;AAAA,QAAA;AAAA,UAEC,eAAY;AAAA,UACZ,MAAM,gBAAAyB,EAACkB,GAAA,EAAS,SAAQ,UAAS,QAAO,UAAS;AAAA,UACjD,aAAa,gBAAAlB,EAACkB,GAAA,EAAS,OAAOD,IAAI,IAAI,QAAQ,OAAO;AAAA,UAErD,4BAACC,GAAA,EAAS,OAAOD,IAAI,IAAI,QAAQ,MAAA,CAAO;AAAA,QAAA;AAAA,QALnCA;AAAA,MAAA,CAOR,IACD5B,EAAA,CACN;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
1
+ {"version":3,"file":"List-BLPB3-B8.js","sources":["../src/components/List/listContext.ts","../src/components/List/ListItem.tsx","../src/components/List/List.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { ListItemSize } from './ListItem'\n\n/** Defaults a `List` hands to its `ListItem`s — an explicit item prop still wins. */\nexport interface ListContextValue {\n size?: ListItemSize\n flush?: boolean\n}\n\nexport const ListContext = createContext<ListContextValue>({})\n\n/** Read the defaults provided by a surrounding `List`, if any. */\nexport const useListContext = (): ListContextValue => useContext(ListContext)\n\n/** @deprecated internal — use `useListContext().size`. Kept so older call sites keep compiling. */\nexport const useListSize = (): ListItemSize | undefined => useListContext().size\n","import {\n forwardRef,\n type AnchorHTMLAttributes,\n type CSSProperties,\n type ElementType,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { Icon } from '../Icon'\nimport type { ThemeColor } from '../../theme'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { useListContext } from './listContext'\nimport styles from './List.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport type ListItemSize = 'sm' | 'md' | 'lg'\n\n/** Leading `<Icon>` size per row size. */\nconst ICON_SIZE: Record<ListItemSize, 'sm' | 'md'> = { sm: 'sm', md: 'md', lg: 'md' }\n\nexport interface ListItemProps\n extends\n Omit<HTMLAttributes<HTMLElement>, 'color'>,\n Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'rel' | 'download'> {\n /** Leading element — a known `IconName` (rendered as `<Icon>`) or any node (e.g. an `Avatar`). */\n icon?: IconName | ReactNode\n /** Secondary muted line shown under the label. */\n description?: ReactNode\n /** Trailing content pinned to the right (icon, `Badge`, shortcut text, chevron, …). */\n trailing?: ReactNode\n /** Highlights the row as selected/active (menu selection, current nav route). */\n selected?: boolean\n /** Makes the row interactive (hover + cursor; adds `role`/`tabIndex`/keyboard when rendered plain). */\n clickable?: boolean\n /** Dims and inerts the row. */\n disabled?: boolean\n /** Row size — height / padding / font. Defaults to `md`. */\n size?: ListItemSize\n /**\n * Drops the row's left / right padding so it sits flush with its container's edges (vertical padding\n * and min-height stay). Defaults to `false`; a surrounding `List flush` sets the default for all its rows.\n */\n flush?: boolean\n /** Theme color for the selected tint and clickable hover. Defaults to `primary`. */\n color?: ThemeColor\n /** Render a different element/component — e.g. `'a'`, `'button'`, or a router `Link`. Defaults to `div`. */\n as?: ElementType\n /** Primary label / content. */\n children?: ReactNode\n}\n\n/**\n * A flexible, reusable list row: leading `icon`, a label (`children`) with optional `description`, and\n * a `trailing` slot. `clickable` turns it interactive (hover + keyboard when rendered as a plain\n * element), `selected` highlights it, `disabled` inerts it. Render as a link/button/router `Link` via\n * `as`. Designed to compose inside `List` — for menus, the sidebar, or a standalone styled list.\n */\nexport const ListItem = forwardRef<HTMLElement, ListItemProps>(function ListItem(\n {\n icon,\n description,\n trailing,\n selected = false,\n clickable = false,\n disabled = false,\n size: sizeProp,\n flush: flushProp,\n color = 'primary',\n as,\n className,\n style,\n children,\n onClick,\n onKeyDown,\n ...props\n },\n ref,\n) {\n // explicit props win; otherwise inherit the surrounding `List`'s defaults (size falls back to `md`)\n const listCtx = useListContext()\n const size = sizeProp ?? listCtx.size ?? 'md'\n const flush = flushProp ?? listCtx.flush ?? false\n const Component = (as ?? 'div') as ElementType\n // Anchors, buttons, and custom components (e.g. a router Link) carry their own click + keyboard\n // semantics — only a plain element needs the button role/tabIndex/Enter-Space shim.\n const handlesOwnInteraction =\n as === 'a' || as === 'button' || typeof as === 'function' || typeof as === 'object'\n const isDivButton = clickable && !handlesOwnInteraction\n\n const renderedIcon =\n icon == null ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={ICON_SIZE[size]} />\n ) : (\n icon\n )\n\n const handleKeyDown = (event: KeyboardEvent<HTMLElement>) => {\n if (isDivButton && !disabled && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault()\n event.currentTarget.click()\n }\n onKeyDown?.(event)\n }\n\n return (\n <Component\n ref={ref}\n className={clsx(\n styles.item,\n styles[size],\n flush && styles.flush,\n selected && styles.selected,\n clickable && styles.clickable,\n disabled && styles.disabled,\n className,\n )}\n style={{ '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`, ...style } as CSSProperties}\n role={isDivButton ? 'button' : undefined}\n tabIndex={isDivButton ? (disabled ? -1 : 0) : undefined}\n aria-disabled={disabled || undefined}\n aria-current={selected || undefined}\n onClick={disabled ? undefined : onClick}\n onKeyDown={clickable ? handleKeyDown : onKeyDown}\n {...props}\n >\n {renderedIcon != null && <span className={styles.itemIcon}>{renderedIcon}</span>}\n {(children != null || description != null) && (\n <span className={styles.itemText}>\n {children != null && <span className={styles.itemLabel}>{children}</span>}\n {description != null && <span className={styles.itemDescription}>{description}</span>}\n </span>\n )}\n {trailing != null && <span className={styles.itemTrailing}>{trailing}</span>}\n </Component>\n )\n})\n","import {\n forwardRef,\n useMemo,\n type CSSProperties,\n type ElementType,\n type HTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { space, type Spacing } from '../Flex/Flex'\nimport { Skeleton } from '../Skeleton'\nimport { ListContext } from './listContext'\nimport { ListItem, type ListItemSize } from './ListItem'\n\nexport interface ListProps extends HTMLAttributes<HTMLElement> {\n /** Render a different element — e.g. `'ul'`, `'nav'`, `'menu'`. Defaults to `div`. */\n as?: ElementType\n /** Gap between items (token key, px number, or CSS value). Defaults to `2px`. */\n gap?: Spacing\n /** Padding around the list (token key, px number, or CSS value). */\n padding?: Spacing\n /** Default size for the contained `ListItem`s — each item can still override its own `size`. */\n size?: ListItemSize\n /**\n * Default `flush` for the contained `ListItem`s — drops their left / right padding so rows sit flush with\n * the list's edges (e.g. inside a padded `Card`). Each item can still override its own `flush`.\n */\n flush?: boolean\n /**\n * Render skeleton rows instead of `children` — `true` shows 3, a number sets the count. Each row is a\n * `ListItem` with an icon disc, a label line and a description line. Defaults to `false`.\n */\n loading?: boolean | number\n children?: ReactNode\n}\n\n/**\n * A thin semantic container for `ListItem`s — a vertical stack with a configurable `gap`/`padding`\n * and `role=\"list\"` (override `role` to `\"menu\"` for a dropdown, etc.). `size` and `flush` set defaults\n * for all contained `ListItem`s (an explicit item prop wins). `loading` swaps the items for skeleton rows. Layout is set via inline style, matching the `Flex`/`Grid` primitives.\n */\nexport const List = forwardRef<HTMLElement, ListProps>(function List(\n { as, gap = 2, padding, role = 'list', size, flush, loading = false, style, children, ...props },\n ref,\n) {\n const Component = (as ?? 'div') as ElementType\n // one stable object per (size, flush) so items don't re-render on every List render\n const ctx = useMemo(() => ({ size, flush }), [size, flush])\n const skeletonRows = typeof loading === 'number' ? loading : loading ? 3 : 0\n return (\n <Component\n ref={ref}\n role={role}\n aria-busy={loading ? true : undefined}\n style={\n {\n display: 'flex',\n flexDirection: 'column',\n gap: space(gap),\n padding: space(padding),\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n <ListContext.Provider value={ctx}>\n {loading\n ? Array.from({ length: skeletonRows }, (_, i) => (\n <ListItem\n key={i}\n aria-hidden=\"true\"\n icon={<Skeleton variant=\"circle\" height=\"1.25em\" />}\n description={<Skeleton width={i % 2 ? '45%' : '60%'} />}\n >\n <Skeleton width={i % 2 ? '30%' : '40%'} />\n </ListItem>\n ))\n : children}\n </ListContext.Provider>\n </Component>\n )\n})\n"],"names":["ListContext","createContext","useListContext","useContext","ICON_NAME_SET","ICON_NAMES","ICON_SIZE","ListItem","forwardRef","icon","description","trailing","selected","clickable","disabled","sizeProp","flushProp","color","as","className","style","children","onClick","onKeyDown","props","ref","listCtx","size","flush","Component","isDivButton","renderedIcon","jsx","Icon","handleKeyDown","event","jsxs","clsx","styles","List","gap","padding","role","loading","ctx","useMemo","skeletonRows","space","_","i","Skeleton"],"mappings":";;;;;;;AASO,MAAMA,IAAcC,EAAgC,EAAE,GAGhDC,IAAiB,MAAwBC,EAAWH,CAAW;;;;;;;;;;;;;;GCItEI,IAAgB,IAAI,IAAYC,CAAU,GAK1CC,KAA+C,EAAE,IAAI,MAAM,IAAI,MAAM,IAAI,KAAA,GAuClEC,KAAWC,EAAuC,SAC7D;AAAA,EACE,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,UAAAC,IAAW;AAAA,EACX,MAAMC;AAAA,EACN,OAAOC;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA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QG,EAAA,GAAgB,CAACE,GAAGC,MACvC,gBAAAjB;AAAA,QAACzB;AAAA,QAAA;AAAA,UAEC,eAAY;AAAA,UACZ,MAAM,gBAAAyB,EAACkB,GAAA,EAAS,SAAQ,UAAS,QAAO,UAAS;AAAA,UACjD,aAAa,gBAAAlB,EAACkB,GAAA,EAAS,OAAOD,IAAI,IAAI,QAAQ,OAAO;AAAA,UAErD,4BAACC,GAAA,EAAS,OAAOD,IAAI,IAAI,QAAQ,MAAA,CAAO;AAAA,QAAA;AAAA,QALnCA;AAAA,MAAA,CAOR,IACD5B,EAAA,CACN;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("react/jsx-runtime"),u=require("react"),C=require("./Flex-C6tHC8n7.cjs"),j=require("./Skeleton-DK0lAjS9.cjs"),E=require("clsx"),O=require("./Icon-BVULqOJD.cjs"),D=require("./names-BJnFU_5m.cjs"),N=u.createContext({}),R=()=>u.useContext(N),A="_item_16twt_3",M="_sm_16twt_25",B="_md_16twt_31",F="_lg_16twt_36",P="_flush_16twt_43",Z="_itemIcon_16twt_49",$="_itemText_16twt_57",G="_itemLabel_16twt_65",H="_itemDescription_16twt_72",J="_itemTrailing_16twt_82",Q="_clickable_16twt_92",U="_selected_16twt_109",V="_disabled_16twt_130",e={item:A,sm:M,md:B,lg:F,flush:P,itemIcon:Z,itemText:$,itemLabel:G,itemDescription:H,itemTrailing:J,clickable:Q,selected:U,disabled:V},W=new Set(D.ICON_NAMES),X={sm:"sm",md:"md",lg:"md"},v=u.forwardRef(function({icon:n,description:o,trailing:d,selected:x=!1,clickable:l=!1,disabled:s=!1,size:i,flush:f,color:h="primary",as:c,className:p,style:w,children:r,onClick:I,onKeyDown:a,...m},T){const L=R(),g=i??L.size??"md",S=f??L.flush??!1,q=c??"div",b=l&&!(c==="a"||c==="button"||typeof c=="function"||typeof c=="object"),k=n==null?null:typeof n=="string"&&W.has(n)?t.jsx(O.Icon,{name:n,size:X[g]}):n,z=_=>{b&&!s&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),_.currentTarget.click()),a==null||a(_)};return t.jsxs(q,{ref:T,className:E.clsx(e.item,e[g],S&&e.flush,x&&e.selected,l&&e.clickable,s&&e.disabled,p),style:{"--tz-btn-rgb":`var(--tz-color-${h}-rgb)`,...w},role:b?"button":void 0,tabIndex:b?s?-1:0:void 0,"aria-disabled":s||void 0,"aria-current":x||void 0,onClick:s?void 0:I,onKeyDown:l?z:a,...m,children:[k!=null&&t.jsx("span",{className:e.itemIcon,children:k}),(r!=null||o!=null)&&t.jsxs("span",{className:e.itemText,children:[r!=null&&t.jsx("span",{className:e.itemLabel,children:r}),o!=null&&t.jsx("span",{className:e.itemDescription,children:o})]}),d!=null&&t.jsx("span",{className:e.itemTrailing,children:d})]})}),Y=u.forwardRef(function({as:n,gap:o=2,padding:d,role:x="list",size:l,flush:s,loading:i=!1,style:f,children:h,...c},p){const w=n??"div",r=u.useMemo(()=>({size:l,flush:s}),[l,s]),I=typeof i=="number"?i:i?3:0;return t.jsx(w,{ref:p,role:x,"aria-busy":i?!0:void 0,style:{display:"flex",flexDirection:"column",gap:C.space(o),padding:C.space(d),...f},...c,children:t.jsx(N.Provider,{value:r,children:i?Array.from({length:I},(a,m)=>t.jsx(v,{"aria-hidden":"true",icon:t.jsx(j.Skeleton,{variant:"circle",height:"1.25em"}),description:t.jsx(j.Skeleton,{width:m%2?"45%":"60%"}),children:t.jsx(j.Skeleton,{width:m%2?"30%":"40%"})},m)):h})})});exports.List=Y;exports.ListItem=v;
2
- //# sourceMappingURL=List-9lUjapQ5.cjs.map
1
+ "use strict";const t=require("react/jsx-runtime"),u=require("react"),C=require("./Flex-C6tHC8n7.cjs"),j=require("./Skeleton-DK0lAjS9.cjs"),E=require("clsx"),O=require("./Icon-BUP5_kRs.cjs"),D=require("./names-YOCJ4B5J.cjs"),N=u.createContext({}),R=()=>u.useContext(N),A="_item_16twt_3",M="_sm_16twt_25",B="_md_16twt_31",F="_lg_16twt_36",P="_flush_16twt_43",Z="_itemIcon_16twt_49",$="_itemText_16twt_57",G="_itemLabel_16twt_65",H="_itemDescription_16twt_72",J="_itemTrailing_16twt_82",Q="_clickable_16twt_92",U="_selected_16twt_109",V="_disabled_16twt_130",e={item:A,sm:M,md:B,lg:F,flush:P,itemIcon:Z,itemText:$,itemLabel:G,itemDescription:H,itemTrailing:J,clickable:Q,selected:U,disabled:V},W=new Set(D.ICON_NAMES),X={sm:"sm",md:"md",lg:"md"},v=u.forwardRef(function({icon:n,description:o,trailing:d,selected:x=!1,clickable:l=!1,disabled:s=!1,size:i,flush:f,color:h="primary",as:c,className:p,style:w,children:r,onClick:I,onKeyDown:a,...m},T){const L=R(),g=i??L.size??"md",S=f??L.flush??!1,q=c??"div",b=l&&!(c==="a"||c==="button"||typeof c=="function"||typeof c=="object"),k=n==null?null:typeof n=="string"&&W.has(n)?t.jsx(O.Icon,{name:n,size:X[g]}):n,z=_=>{b&&!s&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),_.currentTarget.click()),a==null||a(_)};return t.jsxs(q,{ref:T,className:E.clsx(e.item,e[g],S&&e.flush,x&&e.selected,l&&e.clickable,s&&e.disabled,p),style:{"--tz-btn-rgb":`var(--tz-color-${h}-rgb)`,...w},role:b?"button":void 0,tabIndex:b?s?-1:0:void 0,"aria-disabled":s||void 0,"aria-current":x||void 0,onClick:s?void 0:I,onKeyDown:l?z:a,...m,children:[k!=null&&t.jsx("span",{className:e.itemIcon,children:k}),(r!=null||o!=null)&&t.jsxs("span",{className:e.itemText,children:[r!=null&&t.jsx("span",{className:e.itemLabel,children:r}),o!=null&&t.jsx("span",{className:e.itemDescription,children:o})]}),d!=null&&t.jsx("span",{className:e.itemTrailing,children:d})]})}),Y=u.forwardRef(function({as:n,gap:o=2,padding:d,role:x="list",size:l,flush:s,loading:i=!1,style:f,children:h,...c},p){const w=n??"div",r=u.useMemo(()=>({size:l,flush:s}),[l,s]),I=typeof i=="number"?i:i?3:0;return t.jsx(w,{ref:p,role:x,"aria-busy":i?!0:void 0,style:{display:"flex",flexDirection:"column",gap:C.space(o),padding:C.space(d),...f},...c,children:t.jsx(N.Provider,{value:r,children:i?Array.from({length:I},(a,m)=>t.jsx(v,{"aria-hidden":"true",icon:t.jsx(j.Skeleton,{variant:"circle",height:"1.25em"}),description:t.jsx(j.Skeleton,{width:m%2?"45%":"60%"}),children:t.jsx(j.Skeleton,{width:m%2?"30%":"40%"})},m)):h})})});exports.List=Y;exports.ListItem=v;
2
+ //# sourceMappingURL=List-ah2PNWeY.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"List-9lUjapQ5.cjs","sources":["../src/components/List/listContext.ts","../src/components/List/ListItem.tsx","../src/components/List/List.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { ListItemSize } from './ListItem'\n\n/** Defaults a `List` hands to its `ListItem`s — an explicit item prop still wins. */\nexport interface ListContextValue {\n size?: ListItemSize\n flush?: boolean\n}\n\nexport const ListContext = createContext<ListContextValue>({})\n\n/** Read the defaults provided by a surrounding `List`, if any. */\nexport const useListContext = (): ListContextValue => useContext(ListContext)\n\n/** @deprecated internal — use `useListContext().size`. Kept so older call sites keep compiling. */\nexport const useListSize = (): ListItemSize | undefined => useListContext().size\n","import {\n forwardRef,\n type AnchorHTMLAttributes,\n type CSSProperties,\n type ElementType,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { Icon } from '../Icon'\nimport type { ThemeColor } from '../../theme'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { useListContext } from './listContext'\nimport styles from './List.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport type ListItemSize = 'sm' | 'md' | 'lg'\n\n/** Leading `<Icon>` size per row size. */\nconst ICON_SIZE: Record<ListItemSize, 'sm' | 'md'> = { sm: 'sm', md: 'md', lg: 'md' }\n\nexport interface ListItemProps\n extends\n Omit<HTMLAttributes<HTMLElement>, 'color'>,\n Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'rel' | 'download'> {\n /** Leading element — a known `IconName` (rendered as `<Icon>`) or any node (e.g. an `Avatar`). */\n icon?: IconName | ReactNode\n /** Secondary muted line shown under the label. */\n description?: ReactNode\n /** Trailing content pinned to the right (icon, `Badge`, shortcut text, chevron, …). */\n trailing?: ReactNode\n /** Highlights the row as selected/active (menu selection, current nav route). */\n selected?: boolean\n /** Makes the row interactive (hover + cursor; adds `role`/`tabIndex`/keyboard when rendered plain). */\n clickable?: boolean\n /** Dims and inerts the row. */\n disabled?: boolean\n /** Row size — height / padding / font. Defaults to `md`. */\n size?: ListItemSize\n /**\n * Drops the row's left / right padding so it sits flush with its container's edges (vertical padding\n * and min-height stay). Defaults to `false`; a surrounding `List flush` sets the default for all its rows.\n */\n flush?: boolean\n /** Theme color for the selected tint and clickable hover. Defaults to `primary`. */\n color?: ThemeColor\n /** Render a different element/component — e.g. `'a'`, `'button'`, or a router `Link`. Defaults to `div`. */\n as?: ElementType\n /** Primary label / content. */\n children?: ReactNode\n}\n\n/**\n * A flexible, reusable list row: leading `icon`, a label (`children`) with optional `description`, and\n * a `trailing` slot. `clickable` turns it interactive (hover + keyboard when rendered as a plain\n * element), `selected` highlights it, `disabled` inerts it. Render as a link/button/router `Link` via\n * `as`. Designed to compose inside `List` — for menus, the sidebar, or a standalone styled list.\n */\nexport const ListItem = forwardRef<HTMLElement, ListItemProps>(function ListItem(\n {\n icon,\n description,\n trailing,\n selected = false,\n clickable = false,\n disabled = false,\n size: sizeProp,\n flush: flushProp,\n color = 'primary',\n as,\n className,\n style,\n children,\n onClick,\n onKeyDown,\n ...props\n },\n ref,\n) {\n // explicit props win; otherwise inherit the surrounding `List`'s defaults (size falls back to `md`)\n const listCtx = useListContext()\n const size = sizeProp ?? listCtx.size ?? 'md'\n const flush = flushProp ?? listCtx.flush ?? false\n const Component = (as ?? 'div') as ElementType\n // Anchors, buttons, and custom components (e.g. a router Link) carry their own click + keyboard\n // semantics — only a plain element needs the button role/tabIndex/Enter-Space shim.\n const handlesOwnInteraction =\n as === 'a' || as === 'button' || typeof as === 'function' || typeof as === 'object'\n const isDivButton = clickable && !handlesOwnInteraction\n\n const renderedIcon =\n icon == null ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={ICON_SIZE[size]} />\n ) : (\n icon\n )\n\n const handleKeyDown = (event: KeyboardEvent<HTMLElement>) => {\n if (isDivButton && !disabled && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault()\n event.currentTarget.click()\n }\n onKeyDown?.(event)\n }\n\n return (\n <Component\n ref={ref}\n className={clsx(\n styles.item,\n styles[size],\n flush && styles.flush,\n selected && styles.selected,\n clickable && styles.clickable,\n disabled && styles.disabled,\n className,\n )}\n style={{ '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`, ...style } as CSSProperties}\n role={isDivButton ? 'button' : undefined}\n tabIndex={isDivButton ? (disabled ? -1 : 0) : undefined}\n aria-disabled={disabled || undefined}\n aria-current={selected || undefined}\n onClick={disabled ? undefined : onClick}\n onKeyDown={clickable ? handleKeyDown : onKeyDown}\n {...props}\n >\n {renderedIcon != null && <span className={styles.itemIcon}>{renderedIcon}</span>}\n {(children != null || description != null) && (\n <span className={styles.itemText}>\n {children != null && <span className={styles.itemLabel}>{children}</span>}\n {description != null && <span className={styles.itemDescription}>{description}</span>}\n </span>\n )}\n {trailing != null && <span className={styles.itemTrailing}>{trailing}</span>}\n </Component>\n )\n})\n","import {\n forwardRef,\n useMemo,\n type CSSProperties,\n type ElementType,\n type HTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { space, type Spacing } from '../Flex/Flex'\nimport { Skeleton } from '../Skeleton'\nimport { ListContext } from './listContext'\nimport { ListItem, type ListItemSize } from './ListItem'\n\nexport interface ListProps extends HTMLAttributes<HTMLElement> {\n /** Render a different element — e.g. `'ul'`, `'nav'`, `'menu'`. Defaults to `div`. */\n as?: ElementType\n /** Gap between items (token key, px number, or CSS value). Defaults to `2px`. */\n gap?: Spacing\n /** Padding around the list (token key, px number, or CSS value). */\n padding?: Spacing\n /** Default size for the contained `ListItem`s — each item can still override its own `size`. */\n size?: ListItemSize\n /**\n * Default `flush` for the contained `ListItem`s — drops their left / right padding so rows sit flush with\n * the list's edges (e.g. inside a padded `Card`). Each item can still override its own `flush`.\n */\n flush?: boolean\n /**\n * Render skeleton rows instead of `children` — `true` shows 3, a number sets the count. Each row is a\n * `ListItem` with an icon disc, a label line and a description line. Defaults to `false`.\n */\n loading?: boolean | number\n children?: ReactNode\n}\n\n/**\n * A thin semantic container for `ListItem`s — a vertical stack with a configurable `gap`/`padding`\n * and `role=\"list\"` (override `role` to `\"menu\"` for a dropdown, etc.). `size` and `flush` set defaults\n * for all contained `ListItem`s (an explicit item prop wins). `loading` swaps the items for skeleton rows. Layout is set via inline style, matching the `Flex`/`Grid` primitives.\n */\nexport const List = forwardRef<HTMLElement, ListProps>(function List(\n { as, gap = 2, padding, role = 'list', size, flush, loading = false, style, children, ...props },\n ref,\n) {\n const Component = (as ?? 'div') as ElementType\n // one stable object per (size, flush) so items don't re-render on every List render\n const ctx = useMemo(() => ({ size, flush }), [size, flush])\n const skeletonRows = typeof loading === 'number' ? loading : loading ? 3 : 0\n return (\n <Component\n ref={ref}\n role={role}\n aria-busy={loading ? true : undefined}\n style={\n {\n display: 'flex',\n flexDirection: 'column',\n gap: space(gap),\n padding: space(padding),\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n <ListContext.Provider value={ctx}>\n {loading\n ? Array.from({ length: skeletonRows }, (_, i) => (\n <ListItem\n key={i}\n aria-hidden=\"true\"\n icon={<Skeleton variant=\"circle\" height=\"1.25em\" />}\n description={<Skeleton width={i % 2 ? '45%' : '60%'} />}\n >\n <Skeleton width={i % 2 ? '30%' : '40%'} />\n </ListItem>\n ))\n : children}\n </ListContext.Provider>\n </Component>\n )\n})\n"],"names":["ListContext","createContext","useListContext","useContext","ICON_NAME_SET","ICON_NAMES","ICON_SIZE","ListItem","forwardRef","icon","description","trailing","selected","clickable","disabled","sizeProp","flushProp","color","as","className","style","children","onClick","onKeyDown","props","ref","listCtx","size","flush","Component","isDivButton","renderedIcon","jsx","Icon","handleKeyDown","event","jsxs","clsx","styles","List","gap","padding","role","loading","ctx","useMemo","skeletonRows","space","_","i","Skeleton"],"mappings":"gOASaA,EAAcC,EAAAA,cAAgC,EAAE,EAGhDC,EAAiB,IAAwBC,EAAAA,WAAWH,CAAW,yaCItEI,EAAgB,IAAI,IAAYC,YAAU,EAK1CC,EAA+C,CAAE,GAAI,KAAM,GAAI,KAAM,GAAI,IAAA,EAuClEC,EAAWC,EAAAA,WAAuC,SAC7D,CACE,KAAAC,EACA,YAAAC,EACA,SAAAC,EACA,SAAAC,EAAW,GACX,UAAAC,EAAY,GACZ,SAAAC,EAAW,GACX,KAAMC,EACN,MAAOC,EACP,MAAAC,EAAQ,UACR,GAAAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,QAAAC,EACA,UAAAC,EACA,GAAGC,CACL,EACAC,EACA,CAEA,MAAMC,EAAUxB,EAAA,EACVyB,EAAOZ,GAAYW,EAAQ,MAAQ,KACnCE,EAAQZ,GAAaU,EAAQ,OAAS,GACtCG,EAAaX,GAAM,MAKnBY,EAAcjB,GAAa,EAD/BK,IAAO,KAAOA,IAAO,UAAY,OAAOA,GAAO,YAAc,OAAOA,GAAO,UAGvEa,EACJtB,GAAQ,KAAO,KAAO,OAAOA,GAAS,UAAYL,EAAc,IAAIK,CAAI,EACtEuB,MAACC,EAAAA,MAAK,KAAMxB,EAAkB,KAAMH,EAAUqB,CAAI,EAAG,EAErDlB,EAGEyB,EAAiBC,GAAsC,CACvDL,GAAe,CAAChB,IAAaqB,EAAM,MAAQ,SAAWA,EAAM,MAAQ,OACtEA,EAAM,eAAA,EACNA,EAAM,cAAc,MAAA,GAEtBZ,GAAA,MAAAA,EAAYY,EACd,EAE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SAAWA,EAAUA,EAAU,EAAI,EAC3E,OACEX,EAAAA,IAACH,EAAA,CACC,IAAAJ,EACA,KAAAiB,EACA,YAAWC,EAAU,GAAO,OAC5B,MACE,CACE,QAAS,OACT,cAAe,SACf,IAAKI,EAAAA,MAAMP,CAAG,EACd,QAASO,EAAAA,MAAMN,CAAO,EACtB,GAAGrB,CAAA,EAGN,GAAGI,EAEJ,SAAAQ,EAAAA,IAAChC,EAAY,SAAZ,CAAqB,MAAO4C,EAC1B,SAAAD,EACG,MAAM,KAAK,CAAE,OAAQG,CAAA,EAAgB,CAACE,EAAGC,IACvCjB,EAAAA,IAACzB,EAAA,CAEC,cAAY,OACZ,KAAMyB,EAAAA,IAACkB,WAAA,CAAS,QAAQ,SAAS,OAAO,SAAS,EACjD,YAAalB,EAAAA,IAACkB,EAAAA,SAAA,CAAS,MAAOD,EAAI,EAAI,MAAQ,MAAO,EAErD,eAACC,EAAAA,SAAA,CAAS,MAAOD,EAAI,EAAI,MAAQ,KAAA,CAAO,CAAA,EALnCA,CAAA,CAOR,EACD5B,CAAA,CACN,CAAA,CAAA,CAGN,CAAC"}
1
+ {"version":3,"file":"List-ah2PNWeY.cjs","sources":["../src/components/List/listContext.ts","../src/components/List/ListItem.tsx","../src/components/List/List.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { ListItemSize } from './ListItem'\n\n/** Defaults a `List` hands to its `ListItem`s — an explicit item prop still wins. */\nexport interface ListContextValue {\n size?: ListItemSize\n flush?: boolean\n}\n\nexport const ListContext = createContext<ListContextValue>({})\n\n/** Read the defaults provided by a surrounding `List`, if any. */\nexport const useListContext = (): ListContextValue => useContext(ListContext)\n\n/** @deprecated internal — use `useListContext().size`. Kept so older call sites keep compiling. */\nexport const useListSize = (): ListItemSize | undefined => useListContext().size\n","import {\n forwardRef,\n type AnchorHTMLAttributes,\n type CSSProperties,\n type ElementType,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { Icon } from '../Icon'\nimport type { ThemeColor } from '../../theme'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { useListContext } from './listContext'\nimport styles from './List.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport type ListItemSize = 'sm' | 'md' | 'lg'\n\n/** Leading `<Icon>` size per row size. */\nconst ICON_SIZE: Record<ListItemSize, 'sm' | 'md'> = { sm: 'sm', md: 'md', lg: 'md' }\n\nexport interface ListItemProps\n extends\n Omit<HTMLAttributes<HTMLElement>, 'color'>,\n Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'rel' | 'download'> {\n /** Leading element — a known `IconName` (rendered as `<Icon>`) or any node (e.g. an `Avatar`). */\n icon?: IconName | ReactNode\n /** Secondary muted line shown under the label. */\n description?: ReactNode\n /** Trailing content pinned to the right (icon, `Badge`, shortcut text, chevron, …). */\n trailing?: ReactNode\n /** Highlights the row as selected/active (menu selection, current nav route). */\n selected?: boolean\n /** Makes the row interactive (hover + cursor; adds `role`/`tabIndex`/keyboard when rendered plain). */\n clickable?: boolean\n /** Dims and inerts the row. */\n disabled?: boolean\n /** Row size — height / padding / font. Defaults to `md`. */\n size?: ListItemSize\n /**\n * Drops the row's left / right padding so it sits flush with its container's edges (vertical padding\n * and min-height stay). Defaults to `false`; a surrounding `List flush` sets the default for all its rows.\n */\n flush?: boolean\n /** Theme color for the selected tint and clickable hover. Defaults to `primary`. */\n color?: ThemeColor\n /** Render a different element/component — e.g. `'a'`, `'button'`, or a router `Link`. Defaults to `div`. */\n as?: ElementType\n /** Primary label / content. */\n children?: ReactNode\n}\n\n/**\n * A flexible, reusable list row: leading `icon`, a label (`children`) with optional `description`, and\n * a `trailing` slot. `clickable` turns it interactive (hover + keyboard when rendered as a plain\n * element), `selected` highlights it, `disabled` inerts it. Render as a link/button/router `Link` via\n * `as`. Designed to compose inside `List` — for menus, the sidebar, or a standalone styled list.\n */\nexport const ListItem = forwardRef<HTMLElement, ListItemProps>(function ListItem(\n {\n icon,\n description,\n trailing,\n selected = false,\n clickable = false,\n disabled = false,\n size: sizeProp,\n flush: flushProp,\n color = 'primary',\n as,\n className,\n style,\n children,\n onClick,\n onKeyDown,\n ...props\n },\n ref,\n) {\n // explicit props win; otherwise inherit the surrounding `List`'s defaults (size falls back to `md`)\n const listCtx = useListContext()\n const size = sizeProp ?? listCtx.size ?? 'md'\n const flush = flushProp ?? listCtx.flush ?? false\n const Component = (as ?? 'div') as ElementType\n // Anchors, buttons, and custom components (e.g. a router Link) carry their own click + keyboard\n // semantics — only a plain element needs the button role/tabIndex/Enter-Space shim.\n const handlesOwnInteraction =\n as === 'a' || as === 'button' || typeof as === 'function' || typeof as === 'object'\n const isDivButton = clickable && !handlesOwnInteraction\n\n const renderedIcon =\n icon == null ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={ICON_SIZE[size]} />\n ) : (\n icon\n )\n\n const handleKeyDown = (event: KeyboardEvent<HTMLElement>) => {\n if (isDivButton && !disabled && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault()\n event.currentTarget.click()\n }\n onKeyDown?.(event)\n }\n\n return (\n <Component\n ref={ref}\n className={clsx(\n styles.item,\n styles[size],\n flush && styles.flush,\n selected && styles.selected,\n clickable && styles.clickable,\n disabled && styles.disabled,\n className,\n )}\n style={{ '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`, ...style } as CSSProperties}\n role={isDivButton ? 'button' : undefined}\n tabIndex={isDivButton ? (disabled ? -1 : 0) : undefined}\n aria-disabled={disabled || undefined}\n aria-current={selected || undefined}\n onClick={disabled ? undefined : onClick}\n onKeyDown={clickable ? handleKeyDown : onKeyDown}\n {...props}\n >\n {renderedIcon != null && <span className={styles.itemIcon}>{renderedIcon}</span>}\n {(children != null || description != null) && (\n <span className={styles.itemText}>\n {children != null && <span className={styles.itemLabel}>{children}</span>}\n {description != null && <span className={styles.itemDescription}>{description}</span>}\n </span>\n )}\n {trailing != null && <span className={styles.itemTrailing}>{trailing}</span>}\n </Component>\n )\n})\n","import {\n forwardRef,\n useMemo,\n type CSSProperties,\n type ElementType,\n type HTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { space, type Spacing } from '../Flex/Flex'\nimport { Skeleton } from '../Skeleton'\nimport { ListContext } from './listContext'\nimport { ListItem, type ListItemSize } from './ListItem'\n\nexport interface ListProps extends HTMLAttributes<HTMLElement> {\n /** Render a different element — e.g. `'ul'`, `'nav'`, `'menu'`. Defaults to `div`. */\n as?: ElementType\n /** Gap between items (token key, px number, or CSS value). Defaults to `2px`. */\n gap?: Spacing\n /** Padding around the list (token key, px number, or CSS value). */\n padding?: Spacing\n /** Default size for the contained `ListItem`s — each item can still override its own `size`. */\n size?: ListItemSize\n /**\n * Default `flush` for the contained `ListItem`s — drops their left / right padding so rows sit flush with\n * the list's edges (e.g. inside a padded `Card`). Each item can still override its own `flush`.\n */\n flush?: boolean\n /**\n * Render skeleton rows instead of `children` — `true` shows 3, a number sets the count. Each row is a\n * `ListItem` with an icon disc, a label line and a description line. Defaults to `false`.\n */\n loading?: boolean | number\n children?: ReactNode\n}\n\n/**\n * A thin semantic container for `ListItem`s — a vertical stack with a configurable `gap`/`padding`\n * and `role=\"list\"` (override `role` to `\"menu\"` for a dropdown, etc.). `size` and `flush` set defaults\n * for all contained `ListItem`s (an explicit item prop wins). `loading` swaps the items for skeleton rows. Layout is set via inline style, matching the `Flex`/`Grid` primitives.\n */\nexport const List = forwardRef<HTMLElement, ListProps>(function List(\n { as, gap = 2, padding, role = 'list', size, flush, loading = false, style, children, ...props },\n ref,\n) {\n const Component = (as ?? 'div') as ElementType\n // one stable object per (size, flush) so items don't re-render on every List render\n const ctx = useMemo(() => ({ size, flush }), [size, flush])\n const skeletonRows = typeof loading === 'number' ? loading : loading ? 3 : 0\n return (\n <Component\n ref={ref}\n role={role}\n aria-busy={loading ? true : undefined}\n style={\n {\n display: 'flex',\n flexDirection: 'column',\n gap: space(gap),\n padding: space(padding),\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n <ListContext.Provider value={ctx}>\n {loading\n ? Array.from({ length: skeletonRows }, (_, i) => (\n <ListItem\n key={i}\n aria-hidden=\"true\"\n icon={<Skeleton variant=\"circle\" height=\"1.25em\" />}\n description={<Skeleton width={i % 2 ? '45%' : '60%'} />}\n >\n <Skeleton width={i % 2 ? '30%' : '40%'} />\n </ListItem>\n ))\n : children}\n </ListContext.Provider>\n </Component>\n )\n})\n"],"names":["ListContext","createContext","useListContext","useContext","ICON_NAME_SET","ICON_NAMES","ICON_SIZE","ListItem","forwardRef","icon","description","trailing","selected","clickable","disabled","sizeProp","flushProp","color","as","className","style","children","onClick","onKeyDown","props","ref","listCtx","size","flush","Component","isDivButton","renderedIcon","jsx","Icon","handleKeyDown","event","jsxs","clsx","styles","List","gap","padding","role","loading","ctx","useMemo","skeletonRows","space","_","i","Skeleton"],"mappings":"gOASaA,EAAcC,EAAAA,cAAgC,EAAE,EAGhDC,EAAiB,IAAwBC,EAAAA,WAAWH,CAAW,yaCItEI,EAAgB,IAAI,IAAYC,YAAU,EAK1CC,EAA+C,CAAE,GAAI,KAAM,GAAI,KAAM,GAAI,IAAA,EAuClEC,EAAWC,EAAAA,WAAuC,SAC7D,CACE,KAAAC,EACA,YAAAC,EACA,SAAAC,EACA,SAAAC,EAAW,GACX,UAAAC,EAAY,GACZ,SAAAC,EAAW,GACX,KAAMC,EACN,MAAOC,EACP,MAAAC,EAAQ,UACR,GAAAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,QAAAC,EACA,UAAAC,EACA,GAAGC,CACL,EACAC,EACA,CAEA,MAAMC,EAAUxB,EAAA,EACVyB,EAAOZ,GAAYW,EAAQ,MAAQ,KACnCE,EAAQZ,GAAaU,EAAQ,OAAS,GACtCG,EAAaX,GAAM,MAKnBY,EAAcjB,GAAa,EAD/BK,IAAO,KAAOA,IAAO,UAAY,OAAOA,GAAO,YAAc,OAAOA,GAAO,UAGv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rD,CAAE,GAAAU,EAAI,IAAAsB,EAAM,EAAG,QAAAC,EAAS,KAAAC,EAAO,OAAQ,KAAAf,EAAM,MAAAC,EAAO,QAAAe,EAAU,GAAO,MAAAvB,EAAO,SAAAC,EAAU,GAAGG,CAAA,EACzFC,EACA,CACA,MAAMI,EAAaX,GAAM,MAEnB0B,EAAMC,UAAQ,KAAO,CAAE,KAAAlB,EAAM,MAAAC,IAAU,CAACD,EAAMC,CAAK,CAAC,EACpDkB,EAAe,OAAOH,GAAY,SAAWA,EAAUA,EAAU,EAAI,EAC3E,OACEX,EAAAA,IAACH,EAAA,CACC,IAAAJ,EACA,KAAAiB,EACA,YAAWC,EAAU,GAAO,OAC5B,MACE,CACE,QAAS,OACT,cAAe,SACf,IAAKI,EAAAA,MAAMP,CAAG,EACd,QAASO,EAAAA,MAAMN,CAAO,EACtB,GAAGrB,CAAA,EAGN,GAAGI,EAEJ,SAAAQ,EAAAA,IAAChC,EAAY,SAAZ,CAAqB,MAAO4C,EAC1B,SAAAD,EACG,MAAM,KAAK,CAAE,OAAQG,CAAA,EAAgB,CAACE,EAAGC,IACvCjB,EAAAA,IAACzB,EAAA,CAEC,cAAY,OACZ,KAAMyB,EAAAA,IAACkB,WAAA,CAAS,QAAQ,SAAS,OAAO,SAAS,EACjD,YAAalB,EAAAA,IAACkB,EAAAA,SAAA,CAAS,MAAOD,EAAI,EAAI,MAAQ,MAAO,EAErD,eAACC,EAAAA,SAAA,CAAS,MAAOD,EAAI,EAAI,MAAQ,KAAA,CAAO,CAAA,EALnCA,CAAA,CAOR,EACD5B,CAAA,CACN,CAAA,CAAA,CAGN,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";const c=require("react/jsx-runtime"),d=require("react"),_=require("clsx"),p=require("./ConfigProvider-ByLHqXpv.cjs"),i="_loader_166pp_2",u="_sm_166pp_18",m="_md_166pp_24",f="_lg_166pp_30",s={loader:i,"tz-loader-spin":"_tz-loader-spin_166pp_1",sm:u,md:m,lg:f},g=d.forwardRef(function({size:o="md",color:e,className:t,style:r,...a},l){const n=p.useT();return c.jsx("span",{ref:l,role:"status","aria-label":n("loader.label"),...a,className:_.clsx(s.loader,s[o],t),style:e?{color:`var(--tz-color-${e})`,...r}:r})});exports.Loader=g;
2
- //# sourceMappingURL=Loader-Cpr9-OOZ.cjs.map
1
+ "use strict";const c=require("react/jsx-runtime"),d=require("react"),_=require("clsx"),p=require("./ConfigProvider-CtpfSy1i.cjs"),i="_loader_166pp_2",u="_sm_166pp_18",m="_md_166pp_24",f="_lg_166pp_30",s={loader:i,"tz-loader-spin":"_tz-loader-spin_166pp_1",sm:u,md:m,lg:f},g=d.forwardRef(function({size:o="md",color:e,className:t,style:r,...a},l){const n=p.useT();return c.jsx("span",{ref:l,role:"status","aria-label":n("loader.label"),...a,className:_.clsx(s.loader,s[o],t),style:e?{color:`var(--tz-color-${e})`,...r}:r})});exports.Loader=g;
2
+ //# sourceMappingURL=Loader-CI1j71X8.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Loader-Cpr9-OOZ.cjs","sources":["../src/components/Loader/Loader.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport styles from './Loader.module.css'\n\nexport type LoaderSize = 'sm' | 'md' | 'lg'\n\nexport interface LoaderProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {\n /** Preset size — matches the Icon sizes: `sm` 14px · `md` 18px · `lg` 22px. Defaults to `md`. */\n size?: LoaderSize\n /** Theme palette token used to color the spinner. Omit to inherit the surrounding text color (`currentColor`). */\n color?: ThemeColor\n}\n\n/**\n * A circular spinner. Works standalone as a loading indicator or inside a\n * `Button`, where it inherits the button color via `currentColor` unless an\n * explicit `color` is given.\n */\nexport const Loader = forwardRef<HTMLSpanElement, LoaderProps>(function Loader(\n { size = 'md', color, className, style, ...props },\n ref,\n) {\n const t = useT()\n return (\n <span\n ref={ref}\n role=\"status\"\n aria-label={t('loader.label')}\n {...props}\n className={clsx(styles.loader, styles[size], className)}\n style={color ? ({ color: `var(--tz-color-${color})`, ...style } as CSSProperties) : style}\n />\n )\n})\n"],"names":["Loader","forwardRef","size","color","className","style","props","ref","t","useT","jsx","clsx","styles"],"mappings":"gRAmBaA,EAASC,EAAAA,WAAyC,SAC7D,CAAE,KAAAC,EAAO,KAAM,MAAAC,EAAO,UAAAC,EAAW,MAAAC,EAAO,GAAGC,CAAA,EAC3CC,EACA,CACA,MAAMC,EAAIC,EAAAA,KAAA,EACV,OACEC,EAAAA,IAAC,OAAA,CACC,IAAAH,EACA,KAAK,SACL,aAAYC,EAAE,cAAc,EAC3B,GAAGF,EACJ,UAAWK,EAAAA,KAAKC,EAAO,OAAQA,EAAOV,CAAI,EAAGE,CAAS,EACtD,MAAOD,EAAS,CAAE,MAAO,kBAAkBA,CAAK,IAAK,GAAGE,GAA4BA,CAAA,CAAA,CAG1F,CAAC"}
1
+ {"version":3,"file":"Loader-CI1j71X8.cjs","sources":["../src/components/Loader/Loader.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport styles from './Loader.module.css'\n\nexport type LoaderSize = 'sm' | 'md' | 'lg'\n\nexport interface LoaderProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {\n /** Preset size — matches the Icon sizes: `sm` 14px · `md` 18px · `lg` 22px. Defaults to `md`. */\n size?: LoaderSize\n /** Theme palette token used to color the spinner. Omit to inherit the surrounding text color (`currentColor`). */\n color?: ThemeColor\n}\n\n/**\n * A circular spinner. Works standalone as a loading indicator or inside a\n * `Button`, where it inherits the button color via `currentColor` unless an\n * explicit `color` is given.\n */\nexport const Loader = forwardRef<HTMLSpanElement, LoaderProps>(function Loader(\n { size = 'md', color, className, style, ...props },\n ref,\n) {\n const t = useT()\n return (\n <span\n ref={ref}\n role=\"status\"\n aria-label={t('loader.label')}\n {...props}\n className={clsx(styles.loader, styles[size], className)}\n style={color ? ({ color: `var(--tz-color-${color})`, ...style } as CSSProperties) : style}\n />\n )\n})\n"],"names":["Loader","forwardRef","size","color","className","style","props","ref","t","useT","jsx","clsx","styles"],"mappings":"gRAmBaA,EAASC,EAAAA,WAAyC,SAC7D,CAAE,KAAAC,EAAO,KAAM,MAAAC,EAAO,UAAAC,EAAW,MAAAC,EAAO,GAAGC,CAAA,EAC3CC,EACA,CACA,MAAMC,EAAIC,EAAAA,KAAA,EACV,OACEC,EAAAA,IAAC,OAAA,CACC,IAAAH,EACA,KAAK,SACL,aAAYC,EAAE,cAAc,EAC3B,GAAGF,EACJ,UAAWK,EAAAA,KAAKC,EAAO,OAAQA,EAAOV,CAAI,EAAGE,CAAS,EACtD,MAAOD,EAAS,CAAE,MAAO,kBAAkBA,CAAK,IAAK,GAAGE,GAA4BA,CAAA,CAAA,CAG1F,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import { forwardRef as _ } from "react";
3
3
  import { clsx as d } from "clsx";
4
- import { a as n } from "./ConfigProvider-BbsI15b-.js";
4
+ import { a as n } from "./ConfigProvider-Ct0Pe3Ku.js";
5
5
  const c = "_loader_166pp_2", i = "_sm_166pp_18", f = "_md_166pp_24", u = "_lg_166pp_30", s = {
6
6
  loader: c,
7
7
  "tz-loader-spin": "_tz-loader-spin_166pp_1",
@@ -25,4 +25,4 @@ const c = "_loader_166pp_2", i = "_sm_166pp_18", f = "_md_166pp_24", u = "_lg_16
25
25
  export {
26
26
  j as L
27
27
  };
28
- //# sourceMappingURL=Loader-C1uaCtx6.js.map
28
+ //# sourceMappingURL=Loader-Czzb450N.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Loader-C1uaCtx6.js","sources":["../src/components/Loader/Loader.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport styles from './Loader.module.css'\n\nexport type LoaderSize = 'sm' | 'md' | 'lg'\n\nexport interface LoaderProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {\n /** Preset size — matches the Icon sizes: `sm` 14px · `md` 18px · `lg` 22px. Defaults to `md`. */\n size?: LoaderSize\n /** Theme palette token used to color the spinner. Omit to inherit the surrounding text color (`currentColor`). */\n color?: ThemeColor\n}\n\n/**\n * A circular spinner. Works standalone as a loading indicator or inside a\n * `Button`, where it inherits the button color via `currentColor` unless an\n * explicit `color` is given.\n */\nexport const Loader = forwardRef<HTMLSpanElement, LoaderProps>(function Loader(\n { size = 'md', color, className, style, ...props },\n ref,\n) {\n const t = useT()\n return (\n <span\n ref={ref}\n role=\"status\"\n aria-label={t('loader.label')}\n {...props}\n className={clsx(styles.loader, styles[size], className)}\n style={color ? ({ color: `var(--tz-color-${color})`, ...style } as CSSProperties) : style}\n />\n )\n})\n"],"names":["Loader","forwardRef","size","color","className","style","props","ref","t","useT","jsx","clsx","styles"],"mappings":";;;;;;;;;;GAmBaA,IAASC,EAAyC,SAC7D,EAAE,MAAAC,IAAO,MAAM,OAAAC,GAAO,WAAAC,GAAW,OAAAC,GAAO,GAAGC,EAAA,GAC3CC,GACA;AACA,QAAMC,IAAIC,EAAA;AACV,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAH;AAAA,MACA,MAAK;AAAA,MACL,cAAYC,EAAE,cAAc;AAAA,MAC3B,GAAGF;AAAA,MACJ,WAAWK,EAAKC,EAAO,QAAQA,EAAOV,CAAI,GAAGE,CAAS;AAAA,MACtD,OAAOD,IAAS,EAAE,OAAO,kBAAkBA,CAAK,KAAK,GAAGE,MAA4BA;AAAA,IAAA;AAAA,EAAA;AAG1F,CAAC;"}
1
+ {"version":3,"file":"Loader-Czzb450N.js","sources":["../src/components/Loader/Loader.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport styles from './Loader.module.css'\n\nexport type LoaderSize = 'sm' | 'md' | 'lg'\n\nexport interface LoaderProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {\n /** Preset size — matches the Icon sizes: `sm` 14px · `md` 18px · `lg` 22px. Defaults to `md`. */\n size?: LoaderSize\n /** Theme palette token used to color the spinner. Omit to inherit the surrounding text color (`currentColor`). */\n color?: ThemeColor\n}\n\n/**\n * A circular spinner. Works standalone as a loading indicator or inside a\n * `Button`, where it inherits the button color via `currentColor` unless an\n * explicit `color` is given.\n */\nexport const Loader = forwardRef<HTMLSpanElement, LoaderProps>(function Loader(\n { size = 'md', color, className, style, ...props },\n ref,\n) {\n const t = useT()\n return (\n <span\n ref={ref}\n role=\"status\"\n aria-label={t('loader.label')}\n {...props}\n className={clsx(styles.loader, styles[size], className)}\n style={color ? ({ color: `var(--tz-color-${color})`, ...style } as CSSProperties) : style}\n />\n )\n})\n"],"names":["Loader","forwardRef","size","color","className","style","props","ref","t","useT","jsx","clsx","styles"],"mappings":";;;;;;;;;;GAmBaA,IAASC,EAAyC,SAC7D,EAAE,MAAAC,IAAO,MAAM,OAAAC,GAAO,WAAAC,GAAW,OAAAC,GAAO,GAAGC,EAAA,GAC3CC,GACA;AACA,QAAMC,IAAIC,EAAA;AACV,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAH;AAAA,MACA,MAAK;AAAA,MACL,cAAYC,EAAE,cAAc;AAAA,MAC3B,GAAGF;AAAA,MACJ,WAAWK,EAAKC,EAAO,QAAQA,EAAOV,CAAI,GAAGE,CAAS;AAAA,MACtD,OAAOD,IAAS,EAAE,OAAO,kBAAkBA,CAAK,KAAK,GAAGE,MAA4BA;AAAA,IAAA;AAAA,EAAA;AAG1F,CAAC;"}
@@ -1,12 +1,12 @@
1
1
  import { jsx as a, jsxs as T } from "react/jsx-runtime";
2
2
  import { forwardRef as V, useRef as E, useState as Z, useEffect as F, useId as H } from "react";
3
3
  import { clsx as D } from "clsx";
4
- import { a as w } from "./names-r21QPjcU.js";
5
- import { I as K } from "./Icon-DaTvzLBu.js";
6
- import { I as U } from "./IconButton-GU3Ud4Zg.js";
4
+ import { a as w } from "./names-BR1uJs0-.js";
5
+ import { I as K } from "./Icon-CGQ5yGSZ.js";
6
+ import { I as U } from "./IconButton-CL_6iMQh.js";
7
7
  import { createPortal as C } from "react-dom";
8
8
  import { u as ee } from "./useLockBodyScroll-DwBILLPK.js";
9
- import { a as te } from "./ConfigProvider-BbsI15b-.js";
9
+ import { a as te } from "./ConfigProvider-Ct0Pe3Ku.js";
10
10
  const le = "_overlay_gwv2a_6", ae = {
11
11
  overlay: le
12
12
  }, re = V(function({
@@ -193,4 +193,4 @@ export {
193
193
  qe as M,
194
194
  re as O
195
195
  };
196
- //# sourceMappingURL=Modal-DHP2R3K3.js.map
196
+ //# sourceMappingURL=Modal-DMJMw6kT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal-DHP2R3K3.js","sources":["../src/components/Overlay/Overlay.tsx","../src/components/Modal/Modal.tsx"],"sourcesContent":["import {\n forwardRef,\n useEffect,\n useRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n} from 'react'\nimport { createPortal } from 'react-dom'\nimport { clsx } from 'clsx'\nimport { useLockBodyScroll } from '../../hooks/useLockBodyScroll'\nimport styles from './Overlay.module.css'\n\nexport interface OverlayProps extends HTMLAttributes<HTMLDivElement> {\n /** Whether the overlay is mounted + shown — gates the portal and drives the fade-in. */\n open: boolean\n /** Requested dismiss — fired on a backdrop click (`closeOnBackdrop`) or Escape (`closeOnEscape`). */\n onClose?: () => void\n /** Close when the scrim itself (outside the content) is clicked. Defaults to `true`. */\n closeOnBackdrop?: boolean\n /** Close when Escape is pressed while focus is within the overlay. Defaults to `true`. */\n closeOnEscape?: boolean\n /** Lock page scroll while open. Defaults to `true`. */\n lockScroll?: boolean\n /** Scrim darkness — the black backdrop's alpha (0–1). Defaults to `0.45`. */\n dim?: number\n /** Overlay content — typically a centered dialog / box / media. */\n children?: ReactNode\n}\n\n/**\n * The shared backdrop primitive behind every dimmed, page-blocking surface (`Modal`, the FileUploader\n * lightbox). Portals a fixed full-viewport scrim to `<body>`, locks page scroll, fades in (opacity keyed\n * off a rAF `visible` flag → `data-open`), and dismisses on **backdrop-click** (gated on the pointer-down\n * AND click both landing on the scrim, so a text-selection drag ending on it doesn't close) / **Escape**\n * (swallowed via `stopPropagation` so it can't reach a React-tree ancestor overlay). Centers its children\n * by default; consumers layer their own padding / scroll / placement via `className` + `data-*` and read\n * the shared `data-open` on the scrim for their own box's enter transform. A consumer `onKeyDown` still\n * fires (after the Escape handling) so it can add e.g. a Tab focus-trap. Internal — no `index.ts`, so it's\n * never exposed as a package subpath; import it via `../Overlay/Overlay`. The ref points at the scrim div.\n */\nexport const Overlay = forwardRef<HTMLDivElement, OverlayProps>(function Overlay(\n {\n open,\n onClose,\n closeOnBackdrop = true,\n closeOnEscape = true,\n lockScroll = true,\n dim,\n className,\n style,\n children,\n onKeyDown,\n onMouseDown,\n onClick,\n ...props\n },\n ref,\n) {\n const mouseDownTarget = useRef<EventTarget | null>(null)\n const [visible, setVisible] = useState(false)\n\n useLockBodyScroll(open && lockScroll)\n\n // enter animation: flip `visible` on the frame after mount so the opacity transition runs\n useEffect(() => {\n if (!open) {\n setVisible(false)\n return\n }\n const raf = requestAnimationFrame(() => setVisible(true))\n return () => cancelAnimationFrame(raf)\n }, [open])\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Escape') {\n // the overlay owns the page — swallow Escape so it can't reach a React-tree ancestor overlay (e.g.\n // an outer Modal) even when this one isn't Escape-dismissible\n event.stopPropagation()\n if (closeOnEscape) onClose?.()\n }\n onKeyDown?.(event)\n }\n // remember where the pointer went down so the click handler can tell a scrim click from a drag that\n // started inside the content and ended on the scrim (a text-selection drag)\n const handleMouseDown = (event: MouseEvent<HTMLDivElement>) => {\n mouseDownTarget.current = event.target\n onMouseDown?.(event)\n }\n const handleClick = (event: MouseEvent<HTMLDivElement>) => {\n if (\n closeOnBackdrop &&\n event.target === event.currentTarget &&\n mouseDownTarget.current === event.currentTarget\n ) {\n onClose?.()\n }\n onClick?.(event)\n }\n\n if (!open || typeof document === 'undefined') return null\n\n return createPortal(\n <div\n ref={ref}\n className={clsx(styles.overlay, className)}\n data-open={visible ? 'true' : 'false'}\n style={dim != null ? ({ '--tz-overlay-dim': dim, ...style } as CSSProperties) : style}\n onKeyDown={handleKeyDown}\n onMouseDown={handleMouseDown}\n onClick={handleClick}\n {...props}\n >\n {children}\n </div>,\n document.body,\n )\n})\n","import {\n forwardRef,\n useEffect,\n useId,\n useRef,\n type CSSProperties,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { useT, type ThemeColor } from '../../theme'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { Overlay } from '../Overlay/Overlay'\nimport styles from './Modal.module.css'\n\nexport type ModalSize = 'sm' | 'md' | 'lg' | 'fullScreen'\nexport type ModalScrollBehavior = 'inside' | 'outside'\nexport type ModalPlacement = 'center' | 'left' | 'right'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\n/** Focusable descendants used by the focus trap + initial focus. */\n// every clause excludes tabindex=\"-1\" so decorative/programmatic-only nodes (e.g. the header's\n// `nonClickable aria-hidden` IconButton) don't count as trap boundaries or initial-focus targets\nconst FOCUSABLE =\n 'a[href]:not([tabindex=\"-1\"]), button:not(:disabled):not([tabindex=\"-1\"]), textarea:not(:disabled):not([tabindex=\"-1\"]), input:not(:disabled):not([tabindex=\"-1\"]), select:not(:disabled):not([tabindex=\"-1\"]), [tabindex]:not([tabindex=\"-1\"])'\n\nexport interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'color'> {\n /** Whether the modal is open — gates the portal and drives the enter animation. */\n open: boolean\n /** Called when a dismiss is requested (close button, backdrop click, or Escape). */\n onClose: () => void\n /** Preset width: `sm` 360 · `md` 620 · `lg` 900 px, or `fullScreen` (fills the viewport). Defaults to `md`. */\n size?: ModalSize\n /**\n * Where overflow scrolls when the content is taller than the viewport: `outside` (default — the\n * whole dialog grows and the overlay/page scrolls) or `inside` (the body scrolls while the header +\n * footer stay pinned). Ignored for side-drawer placements (`left`/`right`), which always scroll inside.\n */\n scrollBehavior?: ModalScrollBehavior\n /**\n * Where the dialog sits: `center` (default — the standard centered modal), or `left` / `right` to\n * make it a **full-height side drawer** (sheet) that slides in from that edge. A drawer takes its\n * width from `size`, fills the viewport height, and always scrolls its body inside (header + footer\n * stay pinned).\n */\n placement?: ModalPlacement\n /** Header title. When set, labels the dialog (`aria-labelledby`). */\n title?: ReactNode\n /** Muted description line under the title (e.g. a confirm prompt). */\n description?: ReactNode\n /** Leading header icon shown in a tinted box (like `Card`) — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Theme color that tints the leading icon box. Defaults to `accent`. */\n color?: ThemeColor\n /** Footer slot — right-aligned actions over a top divider (e.g. Cancel / Confirm buttons). */\n footer?: ReactNode\n /** Extra class on the scrollable body element — to tune its padding / layout (e.g. a compact confirm). */\n bodyClassName?: string\n /** Show the header × close button. Defaults to `true`. */\n showCloseButton?: boolean\n /** Close when the backdrop (outside the dialog) is clicked. Defaults to `true`. */\n closeOnBackdrop?: boolean\n /** Close when Escape is pressed. Defaults to `true`. */\n closeOnEscape?: boolean\n /** Accessible label — used when there's no `title`. */\n ariaLabel?: string\n /** Dialog body. */\n children?: ReactNode\n}\n\n/**\n * A centered, backdrop-dimmed overlay dialog. Portaled to `<body>`, it locks page scroll while open,\n * traps Tab focus inside, restores focus to the previously-focused element on close, and dismisses on\n * close button / backdrop click / Escape (each toggleable). Sizes are `sm`/`md`/`lg` (max-width caps)\n * or `fullScreen`; `scrollBehavior` picks inside-body vs. whole-dialog scrolling. `placement` turns it\n * into a full-height side drawer (`left`/`right`) that slides in from the edge. The header mirrors\n * `Card` — an optional tinted `icon` box + `title` + `description`. Controlled by `open` + `onClose`.\n * The forwarded ref points at the dialog element.\n *\n * @example\n * const { isOpen, open, close } = useDisclosure()\n * <Modal open={isOpen} onClose={close} title=\"Edit\" footer={<Button onClick={close}>Done</Button>}>\n * …\n * </Modal>\n */\nexport const Modal = forwardRef<HTMLDivElement, ModalProps>(function Modal(\n {\n open,\n onClose,\n size = 'md',\n scrollBehavior = 'outside',\n placement = 'center',\n title,\n description,\n icon,\n color = 'accent',\n footer,\n bodyClassName,\n showCloseButton = true,\n closeOnBackdrop = true,\n closeOnEscape = true,\n ariaLabel,\n className,\n style,\n children,\n ...props\n },\n forwardedRef,\n) {\n const t = useT()\n const panelRef = useRef<HTMLDivElement | null>(null)\n const bodyRef = useRef<HTMLDivElement | null>(null)\n const footerRef = useRef<HTMLDivElement | null>(null)\n const titleId = useId()\n const descId = useId()\n\n // portal + scrim + scroll-lock + fade-in + backdrop-dismiss are handled by the shared `<Overlay>`\n\n // focus management: move focus into the dialog on open — prefer a body field (form modals land on\n // their first input), else the first footer action (confirm dialogs land on Cancel/Confirm, not the\n // × button), else any control, else the dialog itself; restore focus to the trigger on close\n useEffect(() => {\n if (!open) return\n const previouslyFocused = document.activeElement as HTMLElement | null\n const target =\n bodyRef.current?.querySelector<HTMLElement>(FOCUSABLE) ??\n footerRef.current?.querySelector<HTMLElement>(FOCUSABLE) ??\n panelRef.current?.querySelector<HTMLElement>(FOCUSABLE) ??\n panelRef.current\n // preventScroll so opening an `outside`-scroll modal doesn't jump the overlay to a below-fold control\n target?.focus({ preventScroll: true })\n // only restore if the element is still mounted (it may have unmounted while the modal was open)\n return () => {\n if (previouslyFocused?.isConnected) previouslyFocused.focus?.()\n }\n }, [open])\n\n // merge the panel ref (positioning/focus) with the forwarded ref (consumer access)\n const setPanelRef = (node: HTMLDivElement | null) => {\n panelRef.current = node\n if (typeof forwardedRef === 'function') forwardedRef(node)\n else if (forwardedRef) forwardedRef.current = node\n }\n\n // trap Tab within the dialog so focus can't strand on the locked page behind it (Escape + backdrop\n // dismissal live in `<Overlay>`; this fires after the overlay's own handler)\n const handleTabTrap = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key !== 'Tab') return\n const panel = panelRef.current\n if (!panel) return\n const focusables = [...panel.querySelectorAll<HTMLElement>(FOCUSABLE)].filter(\n (el) => el.offsetParent !== null || el === document.activeElement,\n )\n if (focusables.length === 0) {\n event.preventDefault()\n panel.focus()\n return\n }\n const first = focusables[0]\n const last = focusables[focusables.length - 1]\n const active = document.activeElement\n if (event.shiftKey && (active === first || active === panel)) {\n event.preventDefault()\n last.focus()\n } else if (!event.shiftKey && active === last) {\n event.preventDefault()\n first.focus()\n }\n }\n\n if (!open) return null\n\n // a side drawer (left/right) is always full-height with the body scrolling inside (header/footer pinned)\n const isDrawer = placement !== 'center'\n\n const renderedIcon =\n icon == null ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} />\n ) : (\n icon\n )\n\n const hasHeader = title != null || description != null || renderedIcon != null || showCloseButton\n // a divider sets the header apart from the body/footer, like Card\n const headerDivided = children != null || footer != null\n\n return (\n <Overlay\n open={open}\n onClose={onClose}\n closeOnBackdrop={closeOnBackdrop}\n closeOnEscape={closeOnEscape}\n onKeyDown={handleTabTrap}\n className={styles.overlay}\n data-size={size}\n data-placement={placement}\n data-scroll={isDrawer ? 'inside' : scrollBehavior}\n >\n <div\n ref={setPanelRef}\n className={clsx(styles.modal, styles[size], className)}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={title != null ? titleId : undefined}\n aria-label={title == null ? ariaLabel : undefined}\n aria-describedby={description != null ? descId : undefined}\n tabIndex={-1}\n style={style as CSSProperties}\n {...props}\n >\n {hasHeader && (\n <div className={clsx(styles.header, headerDivided && styles.headerDivided)}>\n <div className={styles.headerMain}>\n {renderedIcon != null && (\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n color={color}\n nonClickable\n aria-hidden\n className={styles.icon}\n >\n {renderedIcon}\n </IconButton>\n )}\n {(title != null || description != null) && (\n <div className={styles.headerText}>\n {title != null && (\n <div id={titleId} className={styles.title}>\n {title}\n </div>\n )}\n {description != null && (\n <div id={descId} className={styles.subtitle}>\n {description}\n </div>\n )}\n </div>\n )}\n </div>\n {showCloseButton && (\n <IconButton\n variant=\"filled\"\n color=\"primary\"\n size=\"sm\"\n className={styles.close}\n aria-label={t('common.close')}\n onClick={onClose}\n >\n <Icon name=\"Close\" />\n </IconButton>\n )}\n </div>\n )}\n {children != null && (\n <div ref={bodyRef} className={clsx(styles.body, bodyClassName)}>\n {children}\n </div>\n )}\n {footer != null && (\n <div ref={footerRef} className={styles.footer}>\n {footer}\n </div>\n )}\n </div>\n </Overlay>\n )\n})\n"],"names":["Overlay","forwardRef","open","onClose","closeOnBackdrop","closeOnEscape","lockScroll","dim","className","style","children","onKeyDown","onMouseDown","onClick","props","ref","mouseDownTarget","useRef","visible","setVisible","useState","useLockBodyScroll","useEffect","raf","handleKeyDown","event","handleMouseDown","handleClick","createPortal","jsx","clsx","styles","ICON_NAME_SET","ICON_NAMES","FOCUSABLE","Modal","size","scrollBehavior","placement","title","description","icon","color","footer","bodyClassName","showCloseButton","ariaLabel","forwardedRef","useT","panelRef","bodyRef","footerRef","titleId","useId","descId","previouslyFocused","target","_a","_b","_c","setPanelRef","node","handleTabTrap","panel","focusables","el","first","last","active","isDrawer","renderedIcon","Icon","hasHeader","headerDivided","jsxs","IconButton"],"mappings":";;;;;;;;;;;GA4CaA,KAAUC,EAAyC,SAC9D;AAAA,EACE,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,eAAAC,IAAgB;AAAA,EAChB,YAAAC,IAAa;AAAA,EACb,KAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAA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5B,SAAS5B;AAAA,kBAET,UAAA,gBAAA0B,EAAC0C,GAAA,EAAK,MAAK,QAAA,CAAQ;AAAA,gBAAA;AAAA,cAAA;AAAA,YACrB,GAEJ;AAAA,YAED7D,KAAY,QACX,gBAAAmB,EAAC,OAAA,EAAI,KAAKqB,GAAS,WAAWpB,EAAKC,EAAO,MAAMa,CAAa,GAC1D,UAAAlC,EAAA,CACH;AAAA,YAEDiC,KAAU,QACT,gBAAAd,EAAC,OAAA,EAAI,KAAKsB,GAAW,WAAWpB,EAAO,QACpC,UAAAY,EAAA,CACH;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAEJ;AAAA,EAAA;AAGN,CAAC;"}
1
+ {"version":3,"file":"Modal-DMJMw6kT.js","sources":["../src/components/Overlay/Overlay.tsx","../src/components/Modal/Modal.tsx"],"sourcesContent":["import {\n forwardRef,\n useEffect,\n useRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n} from 'react'\nimport { createPortal } from 'react-dom'\nimport { clsx } from 'clsx'\nimport { useLockBodyScroll } from '../../hooks/useLockBodyScroll'\nimport styles from './Overlay.module.css'\n\nexport interface OverlayProps extends HTMLAttributes<HTMLDivElement> {\n /** Whether the overlay is mounted + shown — gates the portal and drives the fade-in. */\n open: boolean\n /** Requested dismiss — fired on a backdrop click (`closeOnBackdrop`) or Escape (`closeOnEscape`). */\n onClose?: () => void\n /** Close when the scrim itself (outside the content) is clicked. Defaults to `true`. */\n closeOnBackdrop?: boolean\n /** Close when Escape is pressed while focus is within the overlay. Defaults to `true`. */\n closeOnEscape?: boolean\n /** Lock page scroll while open. Defaults to `true`. */\n lockScroll?: boolean\n /** Scrim darkness — the black backdrop's alpha (0–1). Defaults to `0.45`. */\n dim?: number\n /** Overlay content — typically a centered dialog / box / media. */\n children?: ReactNode\n}\n\n/**\n * The shared backdrop primitive behind every dimmed, page-blocking surface (`Modal`, the FileUploader\n * lightbox). Portals a fixed full-viewport scrim to `<body>`, locks page scroll, fades in (opacity keyed\n * off a rAF `visible` flag → `data-open`), and dismisses on **backdrop-click** (gated on the pointer-down\n * AND click both landing on the scrim, so a text-selection drag ending on it doesn't close) / **Escape**\n * (swallowed via `stopPropagation` so it can't reach a React-tree ancestor overlay). Centers its children\n * by default; consumers layer their own padding / scroll / placement via `className` + `data-*` and read\n * the shared `data-open` on the scrim for their own box's enter transform. A consumer `onKeyDown` still\n * fires (after the Escape handling) so it can add e.g. a Tab focus-trap. Internal — no `index.ts`, so it's\n * never exposed as a package subpath; import it via `../Overlay/Overlay`. The ref points at the scrim div.\n */\nexport const Overlay = forwardRef<HTMLDivElement, OverlayProps>(function Overlay(\n {\n open,\n onClose,\n closeOnBackdrop = true,\n closeOnEscape = true,\n lockScroll = true,\n dim,\n className,\n style,\n children,\n onKeyDown,\n onMouseDown,\n onClick,\n ...props\n },\n ref,\n) {\n const mouseDownTarget = useRef<EventTarget | null>(null)\n const [visible, setVisible] = useState(false)\n\n useLockBodyScroll(open && lockScroll)\n\n // enter animation: flip `visible` on the frame after mount so the opacity transition runs\n useEffect(() => {\n if (!open) {\n setVisible(false)\n return\n }\n const raf = requestAnimationFrame(() => setVisible(true))\n return () => cancelAnimationFrame(raf)\n }, [open])\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Escape') {\n // the overlay owns the page — swallow Escape so it can't reach a React-tree ancestor overlay (e.g.\n // an outer Modal) even when this one isn't Escape-dismissible\n event.stopPropagation()\n if (closeOnEscape) onClose?.()\n }\n onKeyDown?.(event)\n }\n // remember where the pointer went down so the click handler can tell a scrim click from a drag that\n // started inside the content and ended on the scrim (a text-selection drag)\n const handleMouseDown = (event: MouseEvent<HTMLDivElement>) => {\n mouseDownTarget.current = event.target\n onMouseDown?.(event)\n }\n const handleClick = (event: MouseEvent<HTMLDivElement>) => {\n if (\n closeOnBackdrop &&\n event.target === event.currentTarget &&\n mouseDownTarget.current === event.currentTarget\n ) {\n onClose?.()\n }\n onClick?.(event)\n }\n\n if (!open || typeof document === 'undefined') return null\n\n return createPortal(\n <div\n ref={ref}\n className={clsx(styles.overlay, className)}\n data-open={visible ? 'true' : 'false'}\n style={dim != null ? ({ '--tz-overlay-dim': dim, ...style } as CSSProperties) : style}\n onKeyDown={handleKeyDown}\n onMouseDown={handleMouseDown}\n onClick={handleClick}\n {...props}\n >\n {children}\n </div>,\n document.body,\n )\n})\n","import {\n forwardRef,\n useEffect,\n useId,\n useRef,\n type CSSProperties,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { useT, type ThemeColor } from '../../theme'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { Overlay } from '../Overlay/Overlay'\nimport styles from './Modal.module.css'\n\nexport type ModalSize = 'sm' | 'md' | 'lg' | 'fullScreen'\nexport type ModalScrollBehavior = 'inside' | 'outside'\nexport type ModalPlacement = 'center' | 'left' | 'right'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\n/** Focusable descendants used by the focus trap + initial focus. */\n// every clause excludes tabindex=\"-1\" so decorative/programmatic-only nodes (e.g. the header's\n// `nonClickable aria-hidden` IconButton) don't count as trap boundaries or initial-focus targets\nconst FOCUSABLE =\n 'a[href]:not([tabindex=\"-1\"]), button:not(:disabled):not([tabindex=\"-1\"]), textarea:not(:disabled):not([tabindex=\"-1\"]), input:not(:disabled):not([tabindex=\"-1\"]), select:not(:disabled):not([tabindex=\"-1\"]), [tabindex]:not([tabindex=\"-1\"])'\n\nexport interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'color'> {\n /** Whether the modal is open — gates the portal and drives the enter animation. */\n open: boolean\n /** Called when a dismiss is requested (close button, backdrop click, or Escape). */\n onClose: () => void\n /** Preset width: `sm` 360 · `md` 620 · `lg` 900 px, or `fullScreen` (fills the viewport). Defaults to `md`. */\n size?: ModalSize\n /**\n * Where overflow scrolls when the content is taller than the viewport: `outside` (default — the\n * whole dialog grows and the overlay/page scrolls) or `inside` (the body scrolls while the header +\n * footer stay pinned). Ignored for side-drawer placements (`left`/`right`), which always scroll inside.\n */\n scrollBehavior?: ModalScrollBehavior\n /**\n * Where the dialog sits: `center` (default — the standard centered modal), or `left` / `right` to\n * make it a **full-height side drawer** (sheet) that slides in from that edge. A drawer takes its\n * width from `size`, fills the viewport height, and always scrolls its body inside (header + footer\n * stay pinned).\n */\n placement?: ModalPlacement\n /** Header title. When set, labels the dialog (`aria-labelledby`). */\n title?: ReactNode\n /** Muted description line under the title (e.g. a confirm prompt). */\n description?: ReactNode\n /** Leading header icon shown in a tinted box (like `Card`) — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Theme color that tints the leading icon box. Defaults to `accent`. */\n color?: ThemeColor\n /** Footer slot — right-aligned actions over a top divider (e.g. Cancel / Confirm buttons). */\n footer?: ReactNode\n /** Extra class on the scrollable body element — to tune its padding / layout (e.g. a compact confirm). */\n bodyClassName?: string\n /** Show the header × close button. Defaults to `true`. */\n showCloseButton?: boolean\n /** Close when the backdrop (outside the dialog) is clicked. Defaults to `true`. */\n closeOnBackdrop?: boolean\n /** Close when Escape is pressed. Defaults to `true`. */\n closeOnEscape?: boolean\n /** Accessible label — used when there's no `title`. */\n ariaLabel?: string\n /** Dialog body. */\n children?: ReactNode\n}\n\n/**\n * A centered, backdrop-dimmed overlay dialog. Portaled to `<body>`, it locks page scroll while open,\n * traps Tab focus inside, restores focus to the previously-focused element on close, and dismisses on\n * close button / backdrop click / Escape (each toggleable). Sizes are `sm`/`md`/`lg` (max-width caps)\n * or `fullScreen`; `scrollBehavior` picks inside-body vs. whole-dialog scrolling. `placement` turns it\n * into a full-height side drawer (`left`/`right`) that slides in from the edge. The header mirrors\n * `Card` — an optional tinted `icon` box + `title` + `description`. Controlled by `open` + `onClose`.\n * The forwarded ref points at the dialog element.\n *\n * @example\n * const { isOpen, open, close } = useDisclosure()\n * <Modal open={isOpen} onClose={close} title=\"Edit\" footer={<Button onClick={close}>Done</Button>}>\n * …\n * </Modal>\n */\nexport const Modal = forwardRef<HTMLDivElement, ModalProps>(function Modal(\n {\n open,\n onClose,\n size = 'md',\n scrollBehavior = 'outside',\n placement = 'center',\n title,\n description,\n icon,\n color = 'accent',\n footer,\n bodyClassName,\n showCloseButton = true,\n closeOnBackdrop = true,\n closeOnEscape = true,\n ariaLabel,\n className,\n style,\n children,\n ...props\n },\n forwardedRef,\n) {\n const t = useT()\n const panelRef = useRef<HTMLDivElement | null>(null)\n const bodyRef = useRef<HTMLDivElement | null>(null)\n const footerRef = useRef<HTMLDivElement | null>(null)\n const titleId = useId()\n const descId = useId()\n\n // portal + scrim + scroll-lock + fade-in + backdrop-dismiss are handled by the shared `<Overlay>`\n\n // focus management: move focus into the dialog on open — prefer a body field (form modals land on\n // their first input), else the first footer action (confirm dialogs land on Cancel/Confirm, not the\n // × button), else any control, else the dialog itself; restore focus to the trigger on close\n useEffect(() => {\n if (!open) return\n const previouslyFocused = document.activeElement as HTMLElement | null\n const target =\n bodyRef.current?.querySelector<HTMLElement>(FOCUSABLE) ??\n footerRef.current?.querySelector<HTMLElement>(FOCUSABLE) ??\n panelRef.current?.querySelector<HTMLElement>(FOCUSABLE) ??\n panelRef.current\n // preventScroll so opening an `outside`-scroll modal doesn't jump the overlay to a below-fold control\n target?.focus({ preventScroll: true })\n // only restore if the element is still mounted (it may have unmounted while the modal was open)\n return () => {\n if (previouslyFocused?.isConnected) previouslyFocused.focus?.()\n }\n }, [open])\n\n // merge the panel ref (positioning/focus) with the forwarded ref (consumer access)\n const setPanelRef = (node: HTMLDivElement | null) => {\n panelRef.current = node\n if (typeof forwardedRef === 'function') forwardedRef(node)\n else if (forwardedRef) forwardedRef.current = node\n }\n\n // trap Tab within the dialog so focus can't strand on the locked page behind it (Escape + backdrop\n // dismissal live in `<Overlay>`; this fires after the overlay's own handler)\n const handleTabTrap = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key !== 'Tab') return\n const panel = panelRef.current\n if (!panel) return\n const focusables = [...panel.querySelectorAll<HTMLElement>(FOCUSABLE)].filter(\n (el) => el.offsetParent !== null || el === document.activeElement,\n )\n if (focusables.length === 0) {\n event.preventDefault()\n panel.focus()\n return\n }\n const first = focusables[0]\n const last = focusables[focusables.length - 1]\n const active = document.activeElement\n if (event.shiftKey && (active === first || active === panel)) {\n event.preventDefault()\n last.focus()\n } else if (!event.shiftKey && active === last) {\n event.preventDefault()\n first.focus()\n }\n }\n\n if (!open) return null\n\n // a side drawer (left/right) is always full-height with the body scrolling inside (header/footer pinned)\n const isDrawer = placement !== 'center'\n\n const renderedIcon =\n icon == null ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} />\n ) : (\n icon\n )\n\n const hasHeader = title != null || description != null || renderedIcon != null || showCloseButton\n // a divider sets the header apart from the body/footer, like Card\n const headerDivided = children != null || footer != null\n\n return (\n <Overlay\n open={open}\n onClose={onClose}\n closeOnBackdrop={closeOnBackdrop}\n closeOnEscape={closeOnEscape}\n onKeyDown={handleTabTrap}\n className={styles.overlay}\n data-size={size}\n data-placement={placement}\n data-scroll={isDrawer ? 'inside' : scrollBehavior}\n >\n <div\n ref={setPanelRef}\n className={clsx(styles.modal, styles[size], className)}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={title != null ? titleId : undefined}\n aria-label={title == null ? ariaLabel : undefined}\n aria-describedby={description != null ? descId : undefined}\n tabIndex={-1}\n style={style as CSSProperties}\n {...props}\n >\n {hasHeader && (\n <div className={clsx(styles.header, headerDivided && styles.headerDivided)}>\n <div className={styles.headerMain}>\n {renderedIcon != null && (\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n color={color}\n nonClickable\n aria-hidden\n className={styles.icon}\n >\n {renderedIcon}\n </IconButton>\n )}\n {(title != null || description != null) && (\n <div className={styles.headerText}>\n {title != null && (\n <div id={titleId} className={styles.title}>\n {title}\n </div>\n )}\n {description != null && (\n <div id={descId} className={styles.subtitle}>\n {description}\n </div>\n )}\n </div>\n )}\n </div>\n {showCloseButton && (\n <IconButton\n variant=\"filled\"\n color=\"primary\"\n size=\"sm\"\n className={styles.close}\n aria-label={t('common.close')}\n onClick={onClose}\n >\n <Icon name=\"Close\" />\n </IconButton>\n )}\n </div>\n )}\n {children != null && (\n <div ref={bodyRef} className={clsx(styles.body, bodyClassName)}>\n {children}\n </div>\n )}\n {footer != null && (\n <div ref={footerRef} className={styles.footer}>\n {footer}\n </div>\n )}\n </div>\n </Overlay>\n )\n})\n"],"names":["Overlay","forwardRef","open","onClose","closeOnBackdrop","closeOnEscape","lockScroll","dim","className","style","children","onKeyDown","onMouseDown","onClick","props","ref","mouseDownTarget","useRef","visible","setVisible","useState","useLockBodyScroll","useEffect","raf","handleKeyDown","event","handleMouseDown","handleClick","createPortal","jsx","clsx","styles","ICON_NAME_SET","ICON_NAMES","FOCUSABLE","Modal","size","scrollBehavior","placement","title","description","icon","color","footer","bodyClassName","showCloseButton","ariaLabel","forwardedRef","useT","panelRef","bodyRef","footerRef","titleId","useId","descId","previouslyFocused","target","_a","_b","_c","setPanelRef","node","handleTabTrap","panel","focusables","el","first","last","active","isDrawer","renderedIcon","Icon","hasHeader","headerDivided","jsxs","IconButton"],"mappings":";;;;;;;;;;;GA4CaA,KAAUC,EAAyC,SAC9D;AAAA,EACE,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,eAAAC,IAAgB;AAAA,EAChB,YAAAC,IAAa;AAAA,EACb,KAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAkBC,EAA2B,IAAI,GACjD,CAACC,GAASC,CAAU,IAAIC,EAAS,EAAK;AAE5C,EAAAC,GA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AC,OAAA,EAAI,KAAKqB,GAAS,WAAWpB,EAAKC,EAAO,MAAMa,CAAa,GAC1D,UAAAlC,EAAA,CACH;AAAA,YAEDiC,KAAU,QACT,gBAAAd,EAAC,OAAA,EAAI,KAAKsB,GAAW,WAAWpB,EAAO,QACpC,UAAAY,EAAA,CACH;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAEJ;AAAA,EAAA;AAGN,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";const l=require("react/jsx-runtime"),n=require("react"),T=require("clsx"),W=require("./names-BJnFU_5m.cjs"),$=require("./Icon-BVULqOJD.cjs"),H=require("./IconButton-BNa0yLcv.cjs"),X=require("react-dom"),Y=require("./useLockBodyScroll-CIXHZo-Q.cjs"),Z=require("./ConfigProvider-ByLHqXpv.cjs"),w="_overlay_gwv2a_6",C={overlay:w},K=n.forwardRef(function({open:a,onClose:s,closeOnBackdrop:N=!0,closeOnEscape:E=!0,lockScroll:j=!0,dim:c,className:u,style:o,children:D,onKeyDown:d,onMouseDown:h,onClick:_,...R},M){const S=n.useRef(null),[A,g]=n.useState(!1);Y.useLockBodyScroll(a&&j),n.useEffect(()=>{if(!a){g(!1);return}const t=requestAnimationFrame(()=>g(!0));return()=>cancelAnimationFrame(t)},[a]);const b=t=>{t.key==="Escape"&&(t.stopPropagation(),E&&(s==null||s())),d==null||d(t)},O=t=>{S.current=t.target,h==null||h(t)},x=t=>{N&&t.target===t.currentTarget&&S.current===t.currentTarget&&(s==null||s()),_==null||_(t)};return!a||typeof document>"u"?null:X.createPortal(l.jsx("div",{ref:M,className:T.clsx(C.overlay,u),"data-open":A?"true":"false",style:c!=null?{"--tz-overlay-dim":c,...o}:o,onKeyDown:b,onMouseDown:O,onClick:x,...R,children:D}),document.body)}),ee="_overlay_1lotx_3",te="_modal_1lotx_25",le="_sm_1lotx_48",re="_md_1lotx_51",ne="_lg_1lotx_54",ae="_fullScreen_1lotx_57",se="_header_1lotx_74",ce="_headerDivided_1lotx_83",oe="_headerMain_1lotx_86",ie="_icon_1lotx_93",ue="_headerText_1lotx_96",de="_title_1lotx_103",fe="_subtitle_1lotx_115",_e="_close_1lotx_127",xe="_body_1lotx_132",me="_footer_1lotx_143",r={overlay:ee,modal:te,sm:le,md:re,lg:ne,fullScreen:ae,header:se,headerDivided:ce,headerMain:oe,icon:ie,headerText:ue,title:de,subtitle:fe,close:_e,body:xe,footer:me},he=new Set(W.ICON_NAMES),I='a[href]:not([tabindex="-1"]), button:not(:disabled):not([tabindex="-1"]), textarea:not(:disabled):not([tabindex="-1"]), input:not(:disabled):not([tabindex="-1"]), select:not(:disabled):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])',be=n.forwardRef(function({open:a,onClose:s,size:N="md",scrollBehavior:E="outside",placement:j="center",title:c,description:u,icon:o,color:D="accent",footer:d,bodyClassName:h,showCloseButton:_=!0,closeOnBackdrop:R=!0,closeOnEscape:M=!0,ariaLabel:S,className:A,style:g,children:b,...O},x){const t=Z.useT(),q=n.useRef(null),P=n.useRef(null),k=n.useRef(null),p=n.useId(),z=n.useId();n.useEffect(()=>{var f,y,v;if(!a)return;const e=document.activeElement,i=((f=P.current)==null?void 0:f.querySelector(I))??((y=k.current)==null?void 0:y.querySelector(I))??((v=q.current)==null?void 0:v.querySelector(I))??q.current;return i==null||i.focus({preventScroll:!0}),()=>{var m;e!=null&&e.isConnected&&((m=e.focus)==null||m.call(e))}},[a]);const V=e=>{q.current=e,typeof x=="function"?x(e):x&&(x.current=e)},F=e=>{if(e.key!=="Tab")return;const i=q.current;if(!i)return;const f=[...i.querySelectorAll(I)].filter(L=>L.offsetParent!==null||L===document.activeElement);if(f.length===0){e.preventDefault(),i.focus();return}const y=f[0],v=f[f.length-1],m=document.activeElement;e.shiftKey&&(m===y||m===i)?(e.preventDefault(),v.focus()):!e.shiftKey&&m===v&&(e.preventDefault(),y.focus())};if(!a)return null;const G=j!=="center",B=o==null?null:typeof o=="string"&&he.has(o)?l.jsx($.Icon,{name:o}):o,J=c!=null||u!=null||B!=null||_,Q=b!=null||d!=null;return l.jsx(K,{open:a,onClose:s,closeOnBackdrop:R,closeOnEscape:M,onKeyDown:F,className:r.overlay,"data-size":N,"data-placement":j,"data-scroll":G?"inside":E,children:l.jsxs("div",{ref:V,className:T.clsx(r.modal,r[N],A),role:"dialog","aria-modal":"true","aria-labelledby":c!=null?p:void 0,"aria-label":c==null?S:void 0,"aria-describedby":u!=null?z:void 0,tabIndex:-1,style:g,...O,children:[J&&l.jsxs("div",{className:T.clsx(r.header,Q&&r.headerDivided),children:[l.jsxs("div",{className:r.headerMain,children:[B!=null&&l.jsx(H.IconButton,{variant:"filled",size:"sm",color:D,nonClickable:!0,"aria-hidden":!0,className:r.icon,children:B}),(c!=null||u!=null)&&l.jsxs("div",{className:r.headerText,children:[c!=null&&l.jsx("div",{id:p,className:r.title,children:c}),u!=null&&l.jsx("div",{id:z,className:r.subtitle,children:u})]})]}),_&&l.jsx(H.IconButton,{variant:"filled",color:"primary",size:"sm",className:r.close,"aria-label":t("common.close"),onClick:s,children:l.jsx($.Icon,{name:"Close"})})]}),b!=null&&l.jsx("div",{ref:P,className:T.clsx(r.body,h),children:b}),d!=null&&l.jsx("div",{ref:k,className:r.footer,children:d})]})})});exports.Modal=be;exports.Overlay=K;
2
- //# sourceMappingURL=Modal-DFeBHv-Q.cjs.map
1
+ "use strict";const l=require("react/jsx-runtime"),n=require("react"),T=require("clsx"),W=require("./names-YOCJ4B5J.cjs"),$=require("./Icon-BUP5_kRs.cjs"),H=require("./IconButton-CvIXSFsr.cjs"),X=require("react-dom"),Y=require("./useLockBodyScroll-CIXHZo-Q.cjs"),Z=require("./ConfigProvider-CtpfSy1i.cjs"),w="_overlay_gwv2a_6",C={overlay:w},K=n.forwardRef(function({open:a,onClose:s,closeOnBackdrop:N=!0,closeOnEscape:E=!0,lockScroll:j=!0,dim:c,className:u,style:o,children:D,onKeyDown:d,onMouseDown:h,onClick:_,...R},M){const S=n.useRef(null),[A,g]=n.useState(!1);Y.useLockBodyScroll(a&&j),n.useEffect(()=>{if(!a){g(!1);return}const t=requestAnimationFrame(()=>g(!0));return()=>cancelAnimationFrame(t)},[a]);const b=t=>{t.key==="Escape"&&(t.stopPropagation(),E&&(s==null||s())),d==null||d(t)},O=t=>{S.current=t.target,h==null||h(t)},x=t=>{N&&t.target===t.currentTarget&&S.current===t.currentTarget&&(s==null||s()),_==null||_(t)};return!a||typeof document>"u"?null:X.createPortal(l.jsx("div",{ref:M,className:T.clsx(C.overlay,u),"data-open":A?"true":"false",style:c!=null?{"--tz-overlay-dim":c,...o}:o,onKeyDown:b,onMouseDown:O,onClick:x,...R,children:D}),document.body)}),ee="_overlay_1lotx_3",te="_modal_1lotx_25",le="_sm_1lotx_48",re="_md_1lotx_51",ne="_lg_1lotx_54",ae="_fullScreen_1lotx_57",se="_header_1lotx_74",ce="_headerDivided_1lotx_83",oe="_headerMain_1lotx_86",ie="_icon_1lotx_93",ue="_headerText_1lotx_96",de="_title_1lotx_103",fe="_subtitle_1lotx_115",_e="_close_1lotx_127",xe="_body_1lotx_132",me="_footer_1lotx_143",r={overlay:ee,modal:te,sm:le,md:re,lg:ne,fullScreen:ae,header:se,headerDivided:ce,headerMain:oe,icon:ie,headerText:ue,title:de,subtitle:fe,close:_e,body:xe,footer:me},he=new Set(W.ICON_NAMES),I='a[href]:not([tabindex="-1"]), button:not(:disabled):not([tabindex="-1"]), textarea:not(:disabled):not([tabindex="-1"]), input:not(:disabled):not([tabindex="-1"]), select:not(:disabled):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])',be=n.forwardRef(function({open:a,onClose:s,size:N="md",scrollBehavior:E="outside",placement:j="center",title:c,description:u,icon:o,color:D="accent",footer:d,bodyClassName:h,showCloseButton:_=!0,closeOnBackdrop:R=!0,closeOnEscape:M=!0,ariaLabel:S,className:A,style:g,children:b,...O},x){const t=Z.useT(),q=n.useRef(null),P=n.useRef(null),k=n.useRef(null),p=n.useId(),z=n.useId();n.useEffect(()=>{var f,y,v;if(!a)return;const e=document.activeElement,i=((f=P.current)==null?void 0:f.querySelector(I))??((y=k.current)==null?void 0:y.querySelector(I))??((v=q.current)==null?void 0:v.querySelector(I))??q.current;return i==null||i.focus({preventScroll:!0}),()=>{var m;e!=null&&e.isConnected&&((m=e.focus)==null||m.call(e))}},[a]);const V=e=>{q.current=e,typeof x=="function"?x(e):x&&(x.current=e)},F=e=>{if(e.key!=="Tab")return;const i=q.current;if(!i)return;const f=[...i.querySelectorAll(I)].filter(L=>L.offsetParent!==null||L===document.activeElement);if(f.length===0){e.preventDefault(),i.focus();return}const y=f[0],v=f[f.length-1],m=document.activeElement;e.shiftKey&&(m===y||m===i)?(e.preventDefault(),v.focus()):!e.shiftKey&&m===v&&(e.preventDefault(),y.focus())};if(!a)return null;const G=j!=="center",B=o==null?null:typeof o=="string"&&he.has(o)?l.jsx($.Icon,{name:o}):o,J=c!=null||u!=null||B!=null||_,Q=b!=null||d!=null;return l.jsx(K,{open:a,onClose:s,closeOnBackdrop:R,closeOnEscape:M,onKeyDown:F,className:r.overlay,"data-size":N,"data-placement":j,"data-scroll":G?"inside":E,children:l.jsxs("div",{ref:V,className:T.clsx(r.modal,r[N],A),role:"dialog","aria-modal":"true","aria-labelledby":c!=null?p:void 0,"aria-label":c==null?S:void 0,"aria-describedby":u!=null?z:void 0,tabIndex:-1,style:g,...O,children:[J&&l.jsxs("div",{className:T.clsx(r.header,Q&&r.headerDivided),children:[l.jsxs("div",{className:r.headerMain,children:[B!=null&&l.jsx(H.IconButton,{variant:"filled",size:"sm",color:D,nonClickable:!0,"aria-hidden":!0,className:r.icon,children:B}),(c!=null||u!=null)&&l.jsxs("div",{className:r.headerText,children:[c!=null&&l.jsx("div",{id:p,className:r.title,children:c}),u!=null&&l.jsx("div",{id:z,className:r.subtitle,children:u})]})]}),_&&l.jsx(H.IconButton,{variant:"filled",color:"primary",size:"sm",className:r.close,"aria-label":t("common.close"),onClick:s,children:l.jsx($.Icon,{name:"Close"})})]}),b!=null&&l.jsx("div",{ref:P,className:T.clsx(r.body,h),children:b}),d!=null&&l.jsx("div",{ref:k,className:r.footer,children:d})]})})});exports.Modal=be;exports.Overlay=K;
2
+ //# sourceMappingURL=Modal-DPObz0b-.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal-DFeBHv-Q.cjs","sources":["../src/components/Overlay/Overlay.tsx","../src/components/Modal/Modal.tsx"],"sourcesContent":["import {\n forwardRef,\n useEffect,\n useRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n} from 'react'\nimport { createPortal } from 'react-dom'\nimport { clsx } from 'clsx'\nimport { useLockBodyScroll } from '../../hooks/useLockBodyScroll'\nimport styles from './Overlay.module.css'\n\nexport interface OverlayProps extends HTMLAttributes<HTMLDivElement> {\n /** Whether the overlay is mounted + shown — gates the portal and drives the fade-in. */\n open: boolean\n /** Requested dismiss — fired on a backdrop click (`closeOnBackdrop`) or Escape (`closeOnEscape`). */\n onClose?: () => void\n /** Close when the scrim itself (outside the content) is clicked. Defaults to `true`. */\n closeOnBackdrop?: boolean\n /** Close when Escape is pressed while focus is within the overlay. Defaults to `true`. */\n closeOnEscape?: boolean\n /** Lock page scroll while open. Defaults to `true`. */\n lockScroll?: boolean\n /** Scrim darkness — the black backdrop's alpha (0–1). Defaults to `0.45`. */\n dim?: number\n /** Overlay content — typically a centered dialog / box / media. */\n children?: ReactNode\n}\n\n/**\n * The shared backdrop primitive behind every dimmed, page-blocking surface (`Modal`, the FileUploader\n * lightbox). Portals a fixed full-viewport scrim to `<body>`, locks page scroll, fades in (opacity keyed\n * off a rAF `visible` flag → `data-open`), and dismisses on **backdrop-click** (gated on the pointer-down\n * AND click both landing on the scrim, so a text-selection drag ending on it doesn't close) / **Escape**\n * (swallowed via `stopPropagation` so it can't reach a React-tree ancestor overlay). Centers its children\n * by default; consumers layer their own padding / scroll / placement via `className` + `data-*` and read\n * the shared `data-open` on the scrim for their own box's enter transform. A consumer `onKeyDown` still\n * fires (after the Escape handling) so it can add e.g. a Tab focus-trap. Internal — no `index.ts`, so it's\n * never exposed as a package subpath; import it via `../Overlay/Overlay`. The ref points at the scrim div.\n */\nexport const Overlay = forwardRef<HTMLDivElement, OverlayProps>(function Overlay(\n {\n open,\n onClose,\n closeOnBackdrop = true,\n closeOnEscape = true,\n lockScroll = true,\n dim,\n className,\n style,\n children,\n onKeyDown,\n onMouseDown,\n onClick,\n ...props\n },\n ref,\n) {\n const mouseDownTarget = useRef<EventTarget | null>(null)\n const [visible, setVisible] = useState(false)\n\n useLockBodyScroll(open && lockScroll)\n\n // enter animation: flip `visible` on the frame after mount so the opacity transition runs\n useEffect(() => {\n if (!open) {\n setVisible(false)\n return\n }\n const raf = requestAnimationFrame(() => setVisible(true))\n return () => cancelAnimationFrame(raf)\n }, [open])\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Escape') {\n // the overlay owns the page — swallow Escape so it can't reach a React-tree ancestor overlay (e.g.\n // an outer Modal) even when this one isn't Escape-dismissible\n event.stopPropagation()\n if (closeOnEscape) onClose?.()\n }\n onKeyDown?.(event)\n }\n // remember where the pointer went down so the click handler can tell a scrim click from a drag that\n // started inside the content and ended on the scrim (a text-selection drag)\n const handleMouseDown = (event: MouseEvent<HTMLDivElement>) => {\n mouseDownTarget.current = event.target\n onMouseDown?.(event)\n }\n const handleClick = (event: MouseEvent<HTMLDivElement>) => {\n if (\n closeOnBackdrop &&\n event.target === event.currentTarget &&\n mouseDownTarget.current === event.currentTarget\n ) {\n onClose?.()\n }\n onClick?.(event)\n }\n\n if (!open || typeof document === 'undefined') return null\n\n return createPortal(\n <div\n ref={ref}\n className={clsx(styles.overlay, className)}\n data-open={visible ? 'true' : 'false'}\n style={dim != null ? ({ '--tz-overlay-dim': dim, ...style } as CSSProperties) : style}\n onKeyDown={handleKeyDown}\n onMouseDown={handleMouseDown}\n onClick={handleClick}\n {...props}\n >\n {children}\n </div>,\n document.body,\n )\n})\n","import {\n forwardRef,\n useEffect,\n useId,\n useRef,\n type CSSProperties,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { useT, type ThemeColor } from '../../theme'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { Overlay } from '../Overlay/Overlay'\nimport styles from './Modal.module.css'\n\nexport type ModalSize = 'sm' | 'md' | 'lg' | 'fullScreen'\nexport type ModalScrollBehavior = 'inside' | 'outside'\nexport type ModalPlacement = 'center' | 'left' | 'right'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\n/** Focusable descendants used by the focus trap + initial focus. */\n// every clause excludes tabindex=\"-1\" so decorative/programmatic-only nodes (e.g. the header's\n// `nonClickable aria-hidden` IconButton) don't count as trap boundaries or initial-focus targets\nconst FOCUSABLE =\n 'a[href]:not([tabindex=\"-1\"]), button:not(:disabled):not([tabindex=\"-1\"]), textarea:not(:disabled):not([tabindex=\"-1\"]), input:not(:disabled):not([tabindex=\"-1\"]), select:not(:disabled):not([tabindex=\"-1\"]), [tabindex]:not([tabindex=\"-1\"])'\n\nexport interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'color'> {\n /** Whether the modal is open — gates the portal and drives the enter animation. */\n open: boolean\n /** Called when a dismiss is requested (close button, backdrop click, or Escape). */\n onClose: () => void\n /** Preset width: `sm` 360 · `md` 620 · `lg` 900 px, or `fullScreen` (fills the viewport). Defaults to `md`. */\n size?: ModalSize\n /**\n * Where overflow scrolls when the content is taller than the viewport: `outside` (default — the\n * whole dialog grows and the overlay/page scrolls) or `inside` (the body scrolls while the header +\n * footer stay pinned). Ignored for side-drawer placements (`left`/`right`), which always scroll inside.\n */\n scrollBehavior?: ModalScrollBehavior\n /**\n * Where the dialog sits: `center` (default — the standard centered modal), or `left` / `right` to\n * make it a **full-height side drawer** (sheet) that slides in from that edge. A drawer takes its\n * width from `size`, fills the viewport height, and always scrolls its body inside (header + footer\n * stay pinned).\n */\n placement?: ModalPlacement\n /** Header title. When set, labels the dialog (`aria-labelledby`). */\n title?: ReactNode\n /** Muted description line under the title (e.g. a confirm prompt). */\n description?: ReactNode\n /** Leading header icon shown in a tinted box (like `Card`) — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Theme color that tints the leading icon box. Defaults to `accent`. */\n color?: ThemeColor\n /** Footer slot — right-aligned actions over a top divider (e.g. Cancel / Confirm buttons). */\n footer?: ReactNode\n /** Extra class on the scrollable body element — to tune its padding / layout (e.g. a compact confirm). */\n bodyClassName?: string\n /** Show the header × close button. Defaults to `true`. */\n showCloseButton?: boolean\n /** Close when the backdrop (outside the dialog) is clicked. Defaults to `true`. */\n closeOnBackdrop?: boolean\n /** Close when Escape is pressed. Defaults to `true`. */\n closeOnEscape?: boolean\n /** Accessible label — used when there's no `title`. */\n ariaLabel?: string\n /** Dialog body. */\n children?: ReactNode\n}\n\n/**\n * A centered, backdrop-dimmed overlay dialog. Portaled to `<body>`, it locks page scroll while open,\n * traps Tab focus inside, restores focus to the previously-focused element on close, and dismisses on\n * close button / backdrop click / Escape (each toggleable). Sizes are `sm`/`md`/`lg` (max-width caps)\n * or `fullScreen`; `scrollBehavior` picks inside-body vs. whole-dialog scrolling. `placement` turns it\n * into a full-height side drawer (`left`/`right`) that slides in from the edge. The header mirrors\n * `Card` — an optional tinted `icon` box + `title` + `description`. Controlled by `open` + `onClose`.\n * The forwarded ref points at the dialog element.\n *\n * @example\n * const { isOpen, open, close } = useDisclosure()\n * <Modal open={isOpen} onClose={close} title=\"Edit\" footer={<Button onClick={close}>Done</Button>}>\n * …\n * </Modal>\n */\nexport const Modal = forwardRef<HTMLDivElement, ModalProps>(function Modal(\n {\n open,\n onClose,\n size = 'md',\n scrollBehavior = 'outside',\n placement = 'center',\n title,\n description,\n icon,\n color = 'accent',\n footer,\n bodyClassName,\n showCloseButton = true,\n closeOnBackdrop = true,\n closeOnEscape = true,\n ariaLabel,\n className,\n style,\n children,\n ...props\n },\n forwardedRef,\n) {\n const t = useT()\n const panelRef = useRef<HTMLDivElement | null>(null)\n const bodyRef = useRef<HTMLDivElement | null>(null)\n const footerRef = useRef<HTMLDivElement | null>(null)\n const titleId = useId()\n const descId = useId()\n\n // portal + scrim + scroll-lock + fade-in + backdrop-dismiss are handled by the shared `<Overlay>`\n\n // focus management: move focus into the dialog on open — prefer a body field (form modals land on\n // their first input), else the first footer action (confirm dialogs land on Cancel/Confirm, not the\n // × button), else any control, else the dialog itself; restore focus to the trigger on close\n useEffect(() => {\n if (!open) return\n const previouslyFocused = document.activeElement as HTMLElement | null\n const target =\n bodyRef.current?.querySelector<HTMLElement>(FOCUSABLE) ??\n footerRef.current?.querySelector<HTMLElement>(FOCUSABLE) ??\n panelRef.current?.querySelector<HTMLElement>(FOCUSABLE) ??\n panelRef.current\n // preventScroll so opening an `outside`-scroll modal doesn't jump the overlay to a below-fold control\n target?.focus({ preventScroll: true })\n // only restore if the element is still mounted (it may have unmounted while the modal was open)\n return () => {\n if (previouslyFocused?.isConnected) previouslyFocused.focus?.()\n }\n }, [open])\n\n // merge the panel ref (positioning/focus) with the forwarded ref (consumer access)\n const setPanelRef = (node: HTMLDivElement | null) => {\n panelRef.current = node\n if (typeof forwardedRef === 'function') forwardedRef(node)\n else if (forwardedRef) forwardedRef.current = node\n }\n\n // trap Tab within the dialog so focus can't strand on the locked page behind it (Escape + backdrop\n // dismissal live in `<Overlay>`; this fires after the overlay's own handler)\n const handleTabTrap = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key !== 'Tab') return\n const panel = panelRef.current\n if (!panel) return\n const focusables = [...panel.querySelectorAll<HTMLElement>(FOCUSABLE)].filter(\n (el) => el.offsetParent !== null || el === document.activeElement,\n )\n if (focusables.length === 0) {\n event.preventDefault()\n panel.focus()\n return\n }\n const first = focusables[0]\n const last = focusables[focusables.length - 1]\n const active = document.activeElement\n if (event.shiftKey && (active === first || active === panel)) {\n event.preventDefault()\n last.focus()\n } else if (!event.shiftKey && active === last) {\n event.preventDefault()\n first.focus()\n }\n }\n\n if (!open) return null\n\n // a side drawer (left/right) is always full-height with the body scrolling inside (header/footer pinned)\n const isDrawer = placement !== 'center'\n\n const renderedIcon =\n icon == null ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} />\n ) : (\n icon\n )\n\n const hasHeader = title != null || description != null || renderedIcon != null || showCloseButton\n // a divider sets the header apart from the body/footer, like Card\n const headerDivided = children != null || footer != null\n\n return (\n <Overlay\n open={open}\n onClose={onClose}\n closeOnBackdrop={closeOnBackdrop}\n closeOnEscape={closeOnEscape}\n onKeyDown={handleTabTrap}\n className={styles.overlay}\n data-size={size}\n data-placement={placement}\n data-scroll={isDrawer ? 'inside' : scrollBehavior}\n >\n <div\n ref={setPanelRef}\n className={clsx(styles.modal, styles[size], className)}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={title != null ? titleId : undefined}\n aria-label={title == null ? ariaLabel : undefined}\n aria-describedby={description != null ? descId : undefined}\n tabIndex={-1}\n style={style as CSSProperties}\n {...props}\n >\n {hasHeader && (\n <div className={clsx(styles.header, headerDivided && styles.headerDivided)}>\n <div className={styles.headerMain}>\n {renderedIcon != null && (\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n color={color}\n nonClickable\n aria-hidden\n className={styles.icon}\n >\n {renderedIcon}\n </IconButton>\n )}\n {(title != null || description != null) && (\n <div className={styles.headerText}>\n {title != null && (\n <div id={titleId} className={styles.title}>\n {title}\n </div>\n )}\n {description != null && (\n <div id={descId} className={styles.subtitle}>\n {description}\n </div>\n )}\n </div>\n )}\n </div>\n {showCloseButton && (\n <IconButton\n variant=\"filled\"\n color=\"primary\"\n size=\"sm\"\n className={styles.close}\n aria-label={t('common.close')}\n onClick={onClose}\n >\n <Icon name=\"Close\" />\n </IconButton>\n )}\n </div>\n )}\n {children != null && (\n <div ref={bodyRef} className={clsx(styles.body, bodyClassName)}>\n {children}\n </div>\n )}\n {footer != null && (\n <div ref={footerRef} className={styles.footer}>\n {footer}\n </div>\n )}\n </div>\n </Overlay>\n )\n})\n"],"names":["Overlay","forwardRef","open","onClose","closeOnBackdrop","closeOnEscape","lockScroll","dim","className","style","children","onKeyDown","onMouseDown","onClick","props","ref","mouseDownTarget","useRef","visible","setVisible","useState","useLockBodyScroll","useEffect","raf","handleKeyDown","event","handleMouseDown","handleClick","createPortal","jsx","clsx","styles","ICON_NAME_SET","ICON_NAMES","FOCUSABLE","Modal","size","scrollBehavior","placement","title","description","icon","color","footer","bodyClassName","showCloseButton","ariaLabel","forwardedRef","useT","panelRef","bodyRef","footerRef","titleId","useId","descId","previouslyFocused","target","_a","_b","_c","setPanelRef","node","handleTabTrap","panel","focusables","el","first","last","active","isDrawer","renderedIcon","Icon","hasHeader","headerDivided","jsxs","IconButton"],"mappings":"oVA4CaA,EAAUC,EAAAA,WAAyC,SAC9D,CACE,KAAAC,EACA,QAAAC,EACA,gBAAAC,EAAkB,GAClB,cAAAC,EAAgB,GAChB,WAAAC,EAAa,GACb,IAAAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,UAAAC,EACA,YAAAC,EACA,QAAAC,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAkBC,EAAAA,OAA2B,IAAI,EACjD,CAACC,EAASC,CAAU,EAAIC,EAAAA,SAAS,EAAK,EAE5CC,EAAAA,kBAAkBnB,GAAQI,CAAU,EAGpCgB,EAAAA,UAAU,IAAM,CACd,GAAI,CAACpB,EAAM,CACTiB,EAAW,EAAK,EAChB,MACF,CACA,MAAMI,EAAM,sBAAsB,IAAMJ,EAAW,EAAI,CAAC,EACxD,MAAO,IAAM,qBAAqBI,CAAG,CACvC,EAAG,CAACrB,CAAI,CAAC,EAET,MAAMsB,EAAiBC,GAAyC,CAC1DA,EAAM,MAAQ,WAGhBA,EAAM,gBAAA,EACFpB,IAAeF,GAAA,MAAAA,MAErBQ,GAA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AA,IAAC8C,EAAAA,WAAA,CACC,QAAQ,SACR,MAAM,UACN,KAAK,KACL,UAAW5C,EAAO,MAClB,aAAY,EAAE,cAAc,EAC5B,QAAS5B,EAET,SAAA0B,EAAAA,IAAC0C,EAAAA,KAAA,CAAK,KAAK,OAAA,CAAQ,CAAA,CAAA,CACrB,EAEJ,EAED7D,GAAY,MACXmB,EAAAA,IAAC,MAAA,CAAI,IAAKqB,EAAS,UAAWpB,EAAAA,KAAKC,EAAO,KAAMa,CAAa,EAC1D,SAAAlC,CAAA,CACH,EAEDiC,GAAU,MACTd,MAAC,MAAA,CAAI,IAAKsB,EAAW,UAAWpB,EAAO,OACpC,SAAAY,CAAA,CACH,CAAA,CAAA,CAAA,CAEJ,CAAA,CAGN,CAAC"}
1
+ {"version":3,"file":"Modal-DPObz0b-.cjs","sources":["../src/components/Overlay/Overlay.tsx","../src/components/Modal/Modal.tsx"],"sourcesContent":["import {\n forwardRef,\n useEffect,\n useRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n} from 'react'\nimport { createPortal } from 'react-dom'\nimport { clsx } from 'clsx'\nimport { useLockBodyScroll } from '../../hooks/useLockBodyScroll'\nimport styles from './Overlay.module.css'\n\nexport interface OverlayProps extends HTMLAttributes<HTMLDivElement> {\n /** Whether the overlay is mounted + shown — gates the portal and drives the fade-in. */\n open: boolean\n /** Requested dismiss — fired on a backdrop click (`closeOnBackdrop`) or Escape (`closeOnEscape`). */\n onClose?: () => void\n /** Close when the scrim itself (outside the content) is clicked. Defaults to `true`. */\n closeOnBackdrop?: boolean\n /** Close when Escape is pressed while focus is within the overlay. Defaults to `true`. */\n closeOnEscape?: boolean\n /** Lock page scroll while open. Defaults to `true`. */\n lockScroll?: boolean\n /** Scrim darkness — the black backdrop's alpha (0–1). Defaults to `0.45`. */\n dim?: number\n /** Overlay content — typically a centered dialog / box / media. */\n children?: ReactNode\n}\n\n/**\n * The shared backdrop primitive behind every dimmed, page-blocking surface (`Modal`, the FileUploader\n * lightbox). Portals a fixed full-viewport scrim to `<body>`, locks page scroll, fades in (opacity keyed\n * off a rAF `visible` flag → `data-open`), and dismisses on **backdrop-click** (gated on the pointer-down\n * AND click both landing on the scrim, so a text-selection drag ending on it doesn't close) / **Escape**\n * (swallowed via `stopPropagation` so it can't reach a React-tree ancestor overlay). Centers its children\n * by default; consumers layer their own padding / scroll / placement via `className` + `data-*` and read\n * the shared `data-open` on the scrim for their own box's enter transform. A consumer `onKeyDown` still\n * fires (after the Escape handling) so it can add e.g. a Tab focus-trap. Internal — no `index.ts`, so it's\n * never exposed as a package subpath; import it via `../Overlay/Overlay`. The ref points at the scrim div.\n */\nexport const Overlay = forwardRef<HTMLDivElement, OverlayProps>(function Overlay(\n {\n open,\n onClose,\n closeOnBackdrop = true,\n closeOnEscape = true,\n lockScroll = true,\n dim,\n className,\n style,\n children,\n onKeyDown,\n onMouseDown,\n onClick,\n ...props\n },\n ref,\n) {\n const mouseDownTarget = useRef<EventTarget | null>(null)\n const [visible, setVisible] = useState(false)\n\n useLockBodyScroll(open && lockScroll)\n\n // enter animation: flip `visible` on the frame after mount so the opacity transition runs\n useEffect(() => {\n if (!open) {\n setVisible(false)\n return\n }\n const raf = requestAnimationFrame(() => setVisible(true))\n return () => cancelAnimationFrame(raf)\n }, [open])\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Escape') {\n // the overlay owns the page — swallow Escape so it can't reach a React-tree ancestor overlay (e.g.\n // an outer Modal) even when this one isn't Escape-dismissible\n event.stopPropagation()\n if (closeOnEscape) onClose?.()\n }\n onKeyDown?.(event)\n }\n // remember where the pointer went down so the click handler can tell a scrim click from a drag that\n // started inside the content and ended on the scrim (a text-selection drag)\n const handleMouseDown = (event: MouseEvent<HTMLDivElement>) => {\n mouseDownTarget.current = event.target\n onMouseDown?.(event)\n }\n const handleClick = (event: MouseEvent<HTMLDivElement>) => {\n if (\n closeOnBackdrop &&\n event.target === event.currentTarget &&\n mouseDownTarget.current === event.currentTarget\n ) {\n onClose?.()\n }\n onClick?.(event)\n }\n\n if (!open || typeof document === 'undefined') return null\n\n return createPortal(\n <div\n ref={ref}\n className={clsx(styles.overlay, className)}\n data-open={visible ? 'true' : 'false'}\n style={dim != null ? ({ '--tz-overlay-dim': dim, ...style } as CSSProperties) : style}\n onKeyDown={handleKeyDown}\n onMouseDown={handleMouseDown}\n onClick={handleClick}\n {...props}\n >\n {children}\n </div>,\n document.body,\n )\n})\n","import {\n forwardRef,\n useEffect,\n useId,\n useRef,\n type CSSProperties,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { useT, type ThemeColor } from '../../theme'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { Overlay } from '../Overlay/Overlay'\nimport styles from './Modal.module.css'\n\nexport type ModalSize = 'sm' | 'md' | 'lg' | 'fullScreen'\nexport type ModalScrollBehavior = 'inside' | 'outside'\nexport type ModalPlacement = 'center' | 'left' | 'right'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\n/** Focusable descendants used by the focus trap + initial focus. */\n// every clause excludes tabindex=\"-1\" so decorative/programmatic-only nodes (e.g. the header's\n// `nonClickable aria-hidden` IconButton) don't count as trap boundaries or initial-focus targets\nconst FOCUSABLE =\n 'a[href]:not([tabindex=\"-1\"]), button:not(:disabled):not([tabindex=\"-1\"]), textarea:not(:disabled):not([tabindex=\"-1\"]), input:not(:disabled):not([tabindex=\"-1\"]), select:not(:disabled):not([tabindex=\"-1\"]), [tabindex]:not([tabindex=\"-1\"])'\n\nexport interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'color'> {\n /** Whether the modal is open — gates the portal and drives the enter animation. */\n open: boolean\n /** Called when a dismiss is requested (close button, backdrop click, or Escape). */\n onClose: () => void\n /** Preset width: `sm` 360 · `md` 620 · `lg` 900 px, or `fullScreen` (fills the viewport). Defaults to `md`. */\n size?: ModalSize\n /**\n * Where overflow scrolls when the content is taller than the viewport: `outside` (default — the\n * whole dialog grows and the overlay/page scrolls) or `inside` (the body scrolls while the header +\n * footer stay pinned). Ignored for side-drawer placements (`left`/`right`), which always scroll inside.\n */\n scrollBehavior?: ModalScrollBehavior\n /**\n * Where the dialog sits: `center` (default — the standard centered modal), or `left` / `right` to\n * make it a **full-height side drawer** (sheet) that slides in from that edge. A drawer takes its\n * width from `size`, fills the viewport height, and always scrolls its body inside (header + footer\n * stay pinned).\n */\n placement?: ModalPlacement\n /** Header title. When set, labels the dialog (`aria-labelledby`). */\n title?: ReactNode\n /** Muted description line under the title (e.g. a confirm prompt). */\n description?: ReactNode\n /** Leading header icon shown in a tinted box (like `Card`) — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Theme color that tints the leading icon box. Defaults to `accent`. */\n color?: ThemeColor\n /** Footer slot — right-aligned actions over a top divider (e.g. Cancel / Confirm buttons). */\n footer?: ReactNode\n /** Extra class on the scrollable body element — to tune its padding / layout (e.g. a compact confirm). */\n bodyClassName?: string\n /** Show the header × close button. Defaults to `true`. */\n showCloseButton?: boolean\n /** Close when the backdrop (outside the dialog) is clicked. Defaults to `true`. */\n closeOnBackdrop?: boolean\n /** Close when Escape is pressed. Defaults to `true`. */\n closeOnEscape?: boolean\n /** Accessible label — used when there's no `title`. */\n ariaLabel?: string\n /** Dialog body. */\n children?: ReactNode\n}\n\n/**\n * A centered, backdrop-dimmed overlay dialog. Portaled to `<body>`, it locks page scroll while open,\n * traps Tab focus inside, restores focus to the previously-focused element on close, and dismisses on\n * close button / backdrop click / Escape (each toggleable). Sizes are `sm`/`md`/`lg` (max-width caps)\n * or `fullScreen`; `scrollBehavior` picks inside-body vs. whole-dialog scrolling. `placement` turns it\n * into a full-height side drawer (`left`/`right`) that slides in from the edge. The header mirrors\n * `Card` — an optional tinted `icon` box + `title` + `description`. Controlled by `open` + `onClose`.\n * The forwarded ref points at the dialog element.\n *\n * @example\n * const { isOpen, open, close } = useDisclosure()\n * <Modal open={isOpen} onClose={close} title=\"Edit\" footer={<Button onClick={close}>Done</Button>}>\n * …\n * </Modal>\n */\nexport const Modal = forwardRef<HTMLDivElement, ModalProps>(function Modal(\n {\n open,\n onClose,\n size = 'md',\n scrollBehavior = 'outside',\n placement = 'center',\n title,\n description,\n icon,\n color = 'accent',\n footer,\n bodyClassName,\n showCloseButton = true,\n closeOnBackdrop = true,\n closeOnEscape = true,\n ariaLabel,\n className,\n style,\n children,\n ...props\n },\n forwardedRef,\n) {\n const t = useT()\n const panelRef = useRef<HTMLDivElement | null>(null)\n const bodyRef = useRef<HTMLDivElement | null>(null)\n const footerRef = useRef<HTMLDivElement | null>(null)\n const titleId = useId()\n const descId = useId()\n\n // portal + scrim + scroll-lock + fade-in + backdrop-dismiss are handled by the shared `<Overlay>`\n\n // focus management: move focus into the dialog on open — prefer a body field (form modals land on\n // their first input), else the first footer action (confirm dialogs land on Cancel/Confirm, not the\n // × button), else any control, else the dialog itself; restore focus to the trigger on close\n useEffect(() => {\n if (!open) return\n const previouslyFocused = document.activeElement as HTMLElement | null\n const target =\n bodyRef.current?.querySelector<HTMLElement>(FOCUSABLE) ??\n footerRef.current?.querySelector<HTMLElement>(FOCUSABLE) ??\n panelRef.current?.querySelector<HTMLElement>(FOCUSABLE) ??\n panelRef.current\n // preventScroll so opening an `outside`-scroll modal doesn't jump the overlay to a below-fold control\n target?.focus({ preventScroll: true })\n // only restore if the element is still mounted (it may have unmounted while the modal was open)\n return () => {\n if (previouslyFocused?.isConnected) previouslyFocused.focus?.()\n }\n }, [open])\n\n // merge the panel ref (positioning/focus) with the forwarded ref (consumer access)\n const setPanelRef = (node: HTMLDivElement | null) => {\n panelRef.current = node\n if (typeof forwardedRef === 'function') forwardedRef(node)\n else if (forwardedRef) forwardedRef.current = node\n }\n\n // trap Tab within the dialog so focus can't strand on the locked page behind it (Escape + backdrop\n // dismissal live in `<Overlay>`; this fires after the overlay's own handler)\n const handleTabTrap = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key !== 'Tab') return\n const panel = panelRef.current\n if (!panel) return\n const focusables = [...panel.querySelectorAll<HTMLElement>(FOCUSABLE)].filter(\n (el) => el.offsetParent !== null || el === document.activeElement,\n )\n if (focusables.length === 0) {\n event.preventDefault()\n panel.focus()\n return\n }\n const first = focusables[0]\n const last = focusables[focusables.length - 1]\n const active = document.activeElement\n if (event.shiftKey && (active === first || active === panel)) {\n event.preventDefault()\n last.focus()\n } else if (!event.shiftKey && active === last) {\n event.preventDefault()\n first.focus()\n }\n }\n\n if (!open) return null\n\n // a side drawer (left/right) is always full-height with the body scrolling inside (header/footer pinned)\n const isDrawer = placement !== 'center'\n\n const renderedIcon =\n icon == null ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} />\n ) : (\n icon\n )\n\n const hasHeader = title != null || description != null || renderedIcon != null || showCloseButton\n // a divider sets the header apart from the body/footer, like Card\n const headerDivided = children != null || footer != null\n\n return (\n <Overlay\n open={open}\n onClose={onClose}\n closeOnBackdrop={closeOnBackdrop}\n closeOnEscape={closeOnEscape}\n onKeyDown={handleTabTrap}\n className={styles.overlay}\n data-size={size}\n data-placement={placement}\n data-scroll={isDrawer ? 'inside' : scrollBehavior}\n >\n <div\n ref={setPanelRef}\n className={clsx(styles.modal, styles[size], className)}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={title != null ? titleId : undefined}\n aria-label={title == null ? ariaLabel : undefined}\n aria-describedby={description != null ? descId : undefined}\n tabIndex={-1}\n style={style as CSSProperties}\n {...props}\n >\n {hasHeader && (\n <div className={clsx(styles.header, headerDivided && styles.headerDivided)}>\n <div className={styles.headerMain}>\n {renderedIcon != null && (\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n color={color}\n nonClickable\n aria-hidden\n className={styles.icon}\n >\n {renderedIcon}\n </IconButton>\n )}\n {(title != null || description != null) && (\n <div className={styles.headerText}>\n {title != null && (\n <div id={titleId} className={styles.title}>\n {title}\n </div>\n )}\n {description != null && (\n <div id={descId} className={styles.subtitle}>\n {description}\n </div>\n )}\n </div>\n )}\n </div>\n {showCloseButton && (\n <IconButton\n variant=\"filled\"\n color=\"primary\"\n size=\"sm\"\n className={styles.close}\n aria-label={t('common.close')}\n onClick={onClose}\n >\n <Icon name=\"Close\" />\n </IconButton>\n )}\n </div>\n )}\n {children != null && (\n <div ref={bodyRef} className={clsx(styles.body, bodyClassName)}>\n {children}\n </div>\n )}\n {footer != null && (\n <div ref={footerRef} className={styles.footer}>\n {footer}\n </div>\n )}\n </div>\n </Overlay>\n )\n})\n"],"names":["Overlay","forwardRef","open","onClose","closeOnBackdrop","closeOnEscape","lockScroll","dim","className","style","children","onKeyDown","onMouseDown","onClick","props","ref","mouseDownTarget","useRef","visible","setVisible","useState","useLockBodyScroll","useEffect","raf","handleKeyDown","event","handleMouseDown","handleClick","createPortal","jsx","clsx","styles","ICON_NAME_SET","ICON_NAMES","FOCUSABLE","Modal","size","scrollBehavior","placement","title","description","icon","color","footer","bodyClassName","showCloseButton","ariaLabel","forwardedRef","useT","panelRef","bodyRef","footerRef","titleId","useId","descId","previouslyFocused","target","_a","_b","_c","setPanelRef","node","handleTabTrap","panel","focusables","el","first","last","active","isDrawer","renderedIcon","Icon","hasHeader","headerDivided","jsxs","IconButton"],"mappings":"oVA4CaA,EAAUC,EAAAA,WAAyC,SAC9D,CACE,KAAAC,EACA,QAAAC,EACA,gBAAAC,EAAkB,GAClB,cAAAC,EAAgB,GAChB,WAAAC,EAAa,GACb,IAAAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,UAAAC,EACA,YAAAC,EACA,QAAAC,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAkBC,EAAAA,OAA2B,IAAI,EACjD,CAACC,EAASC,CAAU,EAAIC,EAAAA,SAAS,EAAK,EAE5CC,EAAAA,kBAAkBnB,GAAQI,CAAU,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