@techzyapp/ui-library 1.0.28 → 1.0.29

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 (357) hide show
  1. package/dist/{AdminRoot-BTvmassR.js → AdminRoot-9HGp3Mds.js} +5 -5
  2. package/dist/{AdminRoot-BTvmassR.js.map → AdminRoot-9HGp3Mds.js.map} +1 -1
  3. package/dist/{AdminRoot-DM-cZCpN.cjs → AdminRoot-D24UJ-4a.cjs} +2 -2
  4. package/dist/{AdminRoot-DM-cZCpN.cjs.map → AdminRoot-D24UJ-4a.cjs.map} +1 -1
  5. package/dist/{Alert-v-lelDih.js → Alert-CJono1TJ.js} +3 -3
  6. package/dist/{Alert-v-lelDih.js.map → Alert-CJono1TJ.js.map} +1 -1
  7. package/dist/{Alert-CFm6MU0u.cjs → Alert-VFQuuII6.cjs} +2 -2
  8. package/dist/{Alert-CFm6MU0u.cjs.map → Alert-VFQuuII6.cjs.map} +1 -1
  9. package/dist/{Breadcrumbs-3wHPNa0P.cjs → Breadcrumbs-DCEHxpSi.cjs} +2 -2
  10. package/dist/{Breadcrumbs-3wHPNa0P.cjs.map → Breadcrumbs-DCEHxpSi.cjs.map} +1 -1
  11. package/dist/{Breadcrumbs-Cgd-u3aK.js → Breadcrumbs-XWU8tRvs.js} +3 -3
  12. package/dist/{Breadcrumbs-Cgd-u3aK.js.map → Breadcrumbs-XWU8tRvs.js.map} +1 -1
  13. package/dist/{Button-BLW9yV8W.js → Button-CWMNNiia.js} +2 -2
  14. package/dist/{Button-BLW9yV8W.js.map → Button-CWMNNiia.js.map} +1 -1
  15. package/dist/{Button-KRGjJdMV.cjs → Button-CusxDmfq.cjs} +2 -2
  16. package/dist/{Button-KRGjJdMV.cjs.map → Button-CusxDmfq.cjs.map} +1 -1
  17. package/dist/{Calendar-CoTCOOUu.cjs → Calendar-BEQbZixA.cjs} +2 -2
  18. package/dist/{Calendar-CoTCOOUu.cjs.map → Calendar-BEQbZixA.cjs.map} +1 -1
  19. package/dist/{Calendar-sLA-xa0B.js → Calendar-Db3rr1VD.js} +3 -3
  20. package/dist/{Calendar-sLA-xa0B.js.map → Calendar-Db3rr1VD.js.map} +1 -1
  21. package/dist/{Card-zTkvreQu.cjs → Card-CUUh4mlB.cjs} +2 -2
  22. package/dist/{Card-zTkvreQu.cjs.map → Card-CUUh4mlB.cjs.map} +1 -1
  23. package/dist/{Card-6fiSEC0z.js → Card-MxYfQTOY.js} +2 -2
  24. package/dist/{Card-6fiSEC0z.js.map → Card-MxYfQTOY.js.map} +1 -1
  25. package/dist/{Chip-CqOqfafx.cjs → Chip-D12KcV4_.cjs} +2 -2
  26. package/dist/{Chip-CqOqfafx.cjs.map → Chip-D12KcV4_.cjs.map} +1 -1
  27. package/dist/{Chip-C-5Z5wsC.js → Chip-Zh1OB9nV.js} +2 -2
  28. package/dist/{Chip-C-5Z5wsC.js.map → Chip-Zh1OB9nV.js.map} +1 -1
  29. package/dist/{CodeBlock-rPaqO7yD.js → CodeBlock-CkrTnpcj.js} +3 -3
  30. package/dist/{CodeBlock-rPaqO7yD.js.map → CodeBlock-CkrTnpcj.js.map} +1 -1
  31. package/dist/{CodeBlock-DFiHDZXh.cjs → CodeBlock-DAM7BkHK.cjs} +2 -2
  32. package/dist/{CodeBlock-DFiHDZXh.cjs.map → CodeBlock-DAM7BkHK.cjs.map} +1 -1
  33. package/dist/{ColorPicker-Bqypsy5E.cjs → ColorPicker-BcCozxIe.cjs} +2 -2
  34. package/dist/{ColorPicker-Bqypsy5E.cjs.map → ColorPicker-BcCozxIe.cjs.map} +1 -1
  35. package/dist/{ColorPicker-DXDAXvlA.js → ColorPicker-DqxVgUoD.js} +3 -3
  36. package/dist/{ColorPicker-DXDAXvlA.js.map → ColorPicker-DqxVgUoD.js.map} +1 -1
  37. package/dist/{ColorPickerPanel-C9ARc_uD.cjs → ColorPickerPanel-DAOESLCe.cjs} +2 -2
  38. package/dist/{ColorPickerPanel-C9ARc_uD.cjs.map → ColorPickerPanel-DAOESLCe.cjs.map} +1 -1
  39. package/dist/{ColorPickerPanel-6lQC1URc.js → ColorPickerPanel-DZjN8NNn.js} +2 -2
  40. package/dist/{ColorPickerPanel-6lQC1URc.js.map → ColorPickerPanel-DZjN8NNn.js.map} +1 -1
  41. package/dist/{ColorRamp-DQ8wkgvF.js → ColorRamp-DS5LVpRF.js} +2 -2
  42. package/dist/{ColorRamp-DQ8wkgvF.js.map → ColorRamp-DS5LVpRF.js.map} +1 -1
  43. package/dist/{ColorRamp-B9OWxCOK.cjs → ColorRamp-_KwlPQ-T.cjs} +2 -2
  44. package/dist/{ColorRamp-B9OWxCOK.cjs.map → ColorRamp-_KwlPQ-T.cjs.map} +1 -1
  45. package/dist/{ConfigProvider-B_RSn9bb.js → ConfigProvider-BbsI15b-.js} +2 -2
  46. package/dist/{ConfigProvider-B_RSn9bb.js.map → ConfigProvider-BbsI15b-.js.map} +1 -1
  47. package/dist/{ConfigProvider-BElY0HuV.cjs → ConfigProvider-ByLHqXpv.cjs} +2 -2
  48. package/dist/{ConfigProvider-BElY0HuV.cjs.map → ConfigProvider-ByLHqXpv.cjs.map} +1 -1
  49. package/dist/{CopyButton-BplPYm8i.js → CopyButton-D4s8aeSE.js} +3 -3
  50. package/dist/{CopyButton-BplPYm8i.js.map → CopyButton-D4s8aeSE.js.map} +1 -1
  51. package/dist/{CopyButton-B5aicGl3.cjs → CopyButton-SFwjKod9.cjs} +2 -2
  52. package/dist/{CopyButton-B5aicGl3.cjs.map → CopyButton-SFwjKod9.cjs.map} +1 -1
  53. package/dist/{DatePicker-U5TJ9FYM.js → DatePicker-DGwjCHfd.js} +4 -4
  54. package/dist/{DatePicker-U5TJ9FYM.js.map → DatePicker-DGwjCHfd.js.map} +1 -1
  55. package/dist/{DatePicker-Cdl2JYBd.cjs → DatePicker-ENbn2Vab.cjs} +2 -2
  56. package/dist/{DatePicker-Cdl2JYBd.cjs.map → DatePicker-ENbn2Vab.cjs.map} +1 -1
  57. package/dist/{DateTimePicker-DUFtddxJ.cjs → DateTimePicker-BQUmsFwX.cjs} +2 -2
  58. package/dist/{DateTimePicker-DUFtddxJ.cjs.map → DateTimePicker-BQUmsFwX.cjs.map} +1 -1
  59. package/dist/{DateTimePicker-laJsZYJX.js → DateTimePicker-CwVkQiun.js} +7 -7
  60. package/dist/{DateTimePicker-laJsZYJX.js.map → DateTimePicker-CwVkQiun.js.map} +1 -1
  61. package/dist/{DescriptionList-Y9jF_4L0.js → DescriptionList-0qjKr6GN.js} +4 -4
  62. package/dist/{DescriptionList-Y9jF_4L0.js.map → DescriptionList-0qjKr6GN.js.map} +1 -1
  63. package/dist/{DescriptionList-BCvOX8fg.cjs → DescriptionList-U5z2Faf4.cjs} +2 -2
  64. package/dist/{DescriptionList-BCvOX8fg.cjs.map → DescriptionList-U5z2Faf4.cjs.map} +1 -1
  65. package/dist/{EmptyState-CO_NRZ6w.cjs → EmptyState-B2_4BN4l.cjs} +2 -2
  66. package/dist/{EmptyState-CO_NRZ6w.cjs.map → EmptyState-B2_4BN4l.cjs.map} +1 -1
  67. package/dist/{EmptyState-BtwuzX9Z.js → EmptyState-DwT9_HW7.js} +2 -2
  68. package/dist/{EmptyState-BtwuzX9Z.js.map → EmptyState-DwT9_HW7.js.map} +1 -1
  69. package/dist/ErrorBoundary-CYSOAQlB.cjs +2 -0
  70. package/dist/ErrorBoundary-CYSOAQlB.cjs.map +1 -0
  71. package/dist/ErrorBoundary-CsDHKYB4.js +163 -0
  72. package/dist/ErrorBoundary-CsDHKYB4.js.map +1 -0
  73. package/dist/{FileCard-C3a2yDhK.js → FileCard-B9f9RoXS.js} +3 -3
  74. package/dist/{FileCard-C3a2yDhK.js.map → FileCard-B9f9RoXS.js.map} +1 -1
  75. package/dist/{FileCard-DKjDQRzZ.cjs → FileCard-zuUYik-F.cjs} +2 -2
  76. package/dist/{FileCard-DKjDQRzZ.cjs.map → FileCard-zuUYik-F.cjs.map} +1 -1
  77. package/dist/{FileUploader-CuOHWkiG.js → FileUploader-Dh2zA50t.js} +5 -5
  78. package/dist/{FileUploader-CuOHWkiG.js.map → FileUploader-Dh2zA50t.js.map} +1 -1
  79. package/dist/{FileUploader-VIOg03pl.cjs → FileUploader-Y8hiyIpp.cjs} +2 -2
  80. package/dist/{FileUploader-VIOg03pl.cjs.map → FileUploader-Y8hiyIpp.cjs.map} +1 -1
  81. package/dist/{Flag-aOQncoEZ.cjs → Flag-BpTQAgbD.cjs} +2 -2
  82. package/dist/{Flag-aOQncoEZ.cjs.map → Flag-BpTQAgbD.cjs.map} +1 -1
  83. package/dist/{Flag-kpUfmrwC.js → Flag-CmDXvd7j.js} +2 -2
  84. package/dist/{Flag-kpUfmrwC.js.map → Flag-CmDXvd7j.js.map} +1 -1
  85. package/dist/{FullscreenToggle-CMifmPD3.js → FullscreenToggle-2IYIS5KF.js} +3 -3
  86. package/dist/{FullscreenToggle-CMifmPD3.js.map → FullscreenToggle-2IYIS5KF.js.map} +1 -1
  87. package/dist/{FullscreenToggle-BSwxQEaG.cjs → FullscreenToggle-CeGgw3z1.cjs} +2 -2
  88. package/dist/{FullscreenToggle-BSwxQEaG.cjs.map → FullscreenToggle-CeGgw3z1.cjs.map} +1 -1
  89. package/dist/{IconButton-A2B0bqC-.cjs → IconButton-BNa0yLcv.cjs} +2 -2
  90. package/dist/{IconButton-A2B0bqC-.cjs.map → IconButton-BNa0yLcv.cjs.map} +1 -1
  91. package/dist/{IconButton-Dq17Fekm.js → IconButton-GU3Ud4Zg.js} +2 -2
  92. package/dist/{IconButton-Dq17Fekm.js.map → IconButton-GU3Ud4Zg.js.map} +1 -1
  93. package/dist/{Loader-CwyoKoWY.js → Loader-C1uaCtx6.js} +2 -2
  94. package/dist/{Loader-CwyoKoWY.js.map → Loader-C1uaCtx6.js.map} +1 -1
  95. package/dist/{Loader-D9nteBXt.cjs → Loader-Cpr9-OOZ.cjs} +2 -2
  96. package/dist/{Loader-D9nteBXt.cjs.map → Loader-Cpr9-OOZ.cjs.map} +1 -1
  97. package/dist/{Modal-CQDcYS-Y.cjs → Modal-DFeBHv-Q.cjs} +2 -2
  98. package/dist/{Modal-CQDcYS-Y.cjs.map → Modal-DFeBHv-Q.cjs.map} +1 -1
  99. package/dist/{Modal-cz6JIsZn.js → Modal-DHP2R3K3.js} +3 -3
  100. package/dist/{Modal-cz6JIsZn.js.map → Modal-DHP2R3K3.js.map} +1 -1
  101. package/dist/{MultiSelect-C6l0LpIs.js → MultiSelect-B-FPQ08c.js} +4 -4
  102. package/dist/{MultiSelect-C6l0LpIs.js.map → MultiSelect-B-FPQ08c.js.map} +1 -1
  103. package/dist/{MultiSelect-BIwE6wb7.cjs → MultiSelect-S5VG9g3l.cjs} +2 -2
  104. package/dist/{MultiSelect-BIwE6wb7.cjs.map → MultiSelect-S5VG9g3l.cjs.map} +1 -1
  105. package/dist/{NumberField-BpUTV_Qn.js → NumberField-CzyvDMRV.js} +3 -3
  106. package/dist/{NumberField-BpUTV_Qn.js.map → NumberField-CzyvDMRV.js.map} +1 -1
  107. package/dist/{NumberField-IyhO4OpJ.cjs → NumberField-SSGXlF8U.cjs} +2 -2
  108. package/dist/{NumberField-IyhO4OpJ.cjs.map → NumberField-SSGXlF8U.cjs.map} +1 -1
  109. package/dist/{OtpField-BoLxbGtY.js → OtpField-CMoJqcx1.js} +2 -2
  110. package/dist/{OtpField-BoLxbGtY.js.map → OtpField-CMoJqcx1.js.map} +1 -1
  111. package/dist/{OtpField-HMrxkdiy.cjs → OtpField-Pr7Ch0El.cjs} +2 -2
  112. package/dist/{OtpField-HMrxkdiy.cjs.map → OtpField-Pr7Ch0El.cjs.map} +1 -1
  113. package/dist/{PageLayout-DtWG-6dn.cjs → PageLayout-BIMkjq-q.cjs} +2 -2
  114. package/dist/{PageLayout-DtWG-6dn.cjs.map → PageLayout-BIMkjq-q.cjs.map} +1 -1
  115. package/dist/{PageLayout-G8F1WgC-.js → PageLayout-Ctr-IEzX.js} +2 -2
  116. package/dist/{PageLayout-G8F1WgC-.js.map → PageLayout-Ctr-IEzX.js.map} +1 -1
  117. package/dist/{PageNotFound-DG8xXPL3.cjs → PageNotFound-CnhBheI4.cjs} +2 -2
  118. package/dist/{PageNotFound-DG8xXPL3.cjs.map → PageNotFound-CnhBheI4.cjs.map} +1 -1
  119. package/dist/{PageNotFound-CeKIMZ55.js → PageNotFound-KKJTeaRF.js} +5 -5
  120. package/dist/{PageNotFound-CeKIMZ55.js.map → PageNotFound-KKJTeaRF.js.map} +1 -1
  121. package/dist/{Pagination-Br8P3KwE.cjs → Pagination-BD5WOW98.cjs} +2 -2
  122. package/dist/{Pagination-Br8P3KwE.cjs.map → Pagination-BD5WOW98.cjs.map} +1 -1
  123. package/dist/{Pagination-CE1uKrR4.js → Pagination-Oyms2ERd.js} +2 -2
  124. package/dist/{Pagination-CE1uKrR4.js.map → Pagination-Oyms2ERd.js.map} +1 -1
  125. package/dist/{PaletteField-BBPbkDcp.js → PaletteField-BHzzzdou.js} +3 -3
  126. package/dist/{PaletteField-BBPbkDcp.js.map → PaletteField-BHzzzdou.js.map} +1 -1
  127. package/dist/{PaletteField-DwvSn6V6.cjs → PaletteField-CCQGW5LC.cjs} +2 -2
  128. package/dist/{PaletteField-DwvSn6V6.cjs.map → PaletteField-CCQGW5LC.cjs.map} +1 -1
  129. package/dist/{PhoneField-BclMbl7L.cjs → PhoneField-5zGY4Wko.cjs} +2 -2
  130. package/dist/{PhoneField-BclMbl7L.cjs.map → PhoneField-5zGY4Wko.cjs.map} +1 -1
  131. package/dist/{PhoneField-B-L0xAtD.js → PhoneField-CBfmChPx.js} +4 -4
  132. package/dist/{PhoneField-B-L0xAtD.js.map → PhoneField-CBfmChPx.js.map} +1 -1
  133. package/dist/{Popconfirm-BgpvCBy1.js → Popconfirm-BtGDhqrc.js} +3 -3
  134. package/dist/{Popconfirm-BgpvCBy1.js.map → Popconfirm-BtGDhqrc.js.map} +1 -1
  135. package/dist/{Popconfirm-DD8F8SXn.cjs → Popconfirm-CkBdntxV.cjs} +2 -2
  136. package/dist/{Popconfirm-DD8F8SXn.cjs.map → Popconfirm-CkBdntxV.cjs.map} +1 -1
  137. package/dist/{Progress-_aZ8XOJr.cjs → Progress-Bwxx71Ns.cjs} +2 -2
  138. package/dist/{Progress-_aZ8XOJr.cjs.map → Progress-Bwxx71Ns.cjs.map} +1 -1
  139. package/dist/{Progress-L5koRRJp.js → Progress-pTbaOSDd.js} +2 -2
  140. package/dist/{Progress-L5koRRJp.js.map → Progress-pTbaOSDd.js.map} +1 -1
  141. package/dist/{QueryError-tBuIQRgv.js → QueryError-Bu_MNGek.js} +2 -2
  142. package/dist/{QueryError-tBuIQRgv.js.map → QueryError-Bu_MNGek.js.map} +1 -1
  143. package/dist/{QueryError-BMH8X69O.cjs → QueryError-C01oichG.cjs} +2 -2
  144. package/dist/{QueryError-BMH8X69O.cjs.map → QueryError-C01oichG.cjs.map} +1 -1
  145. package/dist/{RemoveDialog-DBKYnTYU.cjs → RemoveDialog-Bm2mJB3l.cjs} +2 -2
  146. package/dist/{RemoveDialog-DBKYnTYU.cjs.map → RemoveDialog-Bm2mJB3l.cjs.map} +1 -1
  147. package/dist/{RemoveDialog-C9_UzFBf.js → RemoveDialog-C2uJzWi-.js} +5 -5
  148. package/dist/{RemoveDialog-C9_UzFBf.js.map → RemoveDialog-C2uJzWi-.js.map} +1 -1
  149. package/dist/{RichTextEditor-fXcbUjTl.js → RichTextEditor-BDAWmQrN.js} +7 -7
  150. package/dist/{RichTextEditor-fXcbUjTl.js.map → RichTextEditor-BDAWmQrN.js.map} +1 -1
  151. package/dist/{RichTextEditor-DTz7Qcn_.cjs → RichTextEditor-D4HpPT3C.cjs} +2 -2
  152. package/dist/{RichTextEditor-DTz7Qcn_.cjs.map → RichTextEditor-D4HpPT3C.cjs.map} +1 -1
  153. package/dist/{RootLayout-p8ArA6wA.js → RootLayout-CxncyjCz.js} +13 -13
  154. package/dist/{RootLayout-p8ArA6wA.js.map → RootLayout-CxncyjCz.js.map} +1 -1
  155. package/dist/{RootLayout-DG2dXhXn.cjs → RootLayout-XEcU_MBs.cjs} +2 -2
  156. package/dist/{RootLayout-DG2dXhXn.cjs.map → RootLayout-XEcU_MBs.cjs.map} +1 -1
  157. package/dist/{Select-BuVfUiw-.cjs → Select-CVVJKAtS.cjs} +2 -2
  158. package/dist/{Select-BuVfUiw-.cjs.map → Select-CVVJKAtS.cjs.map} +1 -1
  159. package/dist/{Select-BAR_aVSz.js → Select-d9LDI8O3.js} +3 -3
  160. package/dist/{Select-BAR_aVSz.js.map → Select-d9LDI8O3.js.map} +1 -1
  161. package/dist/{Sidebar-NI5HGGYF.cjs → Sidebar-B8ecHwZr.cjs} +2 -2
  162. package/dist/{Sidebar-NI5HGGYF.cjs.map → Sidebar-B8ecHwZr.cjs.map} +1 -1
  163. package/dist/{Sidebar-CsWcjSTx.js → Sidebar-BgCfnZBF.js} +3 -3
  164. package/dist/{Sidebar-CsWcjSTx.js.map → Sidebar-BgCfnZBF.js.map} +1 -1
  165. package/dist/{SpeedDial-DF-ILheU.js → SpeedDial-CBVwgnFp.js} +2 -2
  166. package/dist/{SpeedDial-DF-ILheU.js.map → SpeedDial-CBVwgnFp.js.map} +1 -1
  167. package/dist/{SpeedDial-C_rZkHmF.cjs → SpeedDial-CEr2JWQb.cjs} +2 -2
  168. package/dist/{SpeedDial-C_rZkHmF.cjs.map → SpeedDial-CEr2JWQb.cjs.map} +1 -1
  169. package/dist/{Stepper-CT7n113R.cjs → Stepper-DOSc03YV.cjs} +2 -2
  170. package/dist/{Stepper-CT7n113R.cjs.map → Stepper-DOSc03YV.cjs.map} +1 -1
  171. package/dist/{Stepper-B39Ax_w6.js → Stepper-DtYamv1q.js} +2 -2
  172. package/dist/{Stepper-B39Ax_w6.js.map → Stepper-DtYamv1q.js.map} +1 -1
  173. package/dist/{Table-CH_oiEP3.js → Table-AzNzUAkl.js} +15 -15
  174. package/dist/{Table-CH_oiEP3.js.map → Table-AzNzUAkl.js.map} +1 -1
  175. package/dist/{Table-DD_uysnY.cjs → Table-CrpWhZUg.cjs} +2 -2
  176. package/dist/{Table-DD_uysnY.cjs.map → Table-CrpWhZUg.cjs.map} +1 -1
  177. package/dist/{Tabs-C1N9FgAq.cjs → Tabs-CMnLXRjA.cjs} +2 -2
  178. package/dist/{Tabs-C1N9FgAq.cjs.map → Tabs-CMnLXRjA.cjs.map} +1 -1
  179. package/dist/{Tabs-By86Cmpw.js → Tabs-D1RGhKsa.js} +2 -2
  180. package/dist/{Tabs-By86Cmpw.js.map → Tabs-D1RGhKsa.js.map} +1 -1
  181. package/dist/{TagsField-RX-x45-j.cjs → TagsField-DcuSn7wL.cjs} +2 -2
  182. package/dist/{TagsField-RX-x45-j.cjs.map → TagsField-DcuSn7wL.cjs.map} +1 -1
  183. package/dist/{TagsField-BiOyAadf.js → TagsField-DuQEFHZ3.js} +4 -4
  184. package/dist/{TagsField-BiOyAadf.js.map → TagsField-DuQEFHZ3.js.map} +1 -1
  185. package/dist/{TextField-CdbanZuk.cjs → TextField-E85pvJQC.cjs} +2 -2
  186. package/dist/{TextField-CdbanZuk.cjs.map → TextField-E85pvJQC.cjs.map} +1 -1
  187. package/dist/{TextField-CkronCRC.js → TextField-SGYWviFf.js} +3 -3
  188. package/dist/{TextField-CkronCRC.js.map → TextField-SGYWviFf.js.map} +1 -1
  189. package/dist/{ThemeToggle-C4QhDd76.cjs → ThemeToggle-BdlxzYNt.cjs} +2 -2
  190. package/dist/{ThemeToggle-C4QhDd76.cjs.map → ThemeToggle-BdlxzYNt.cjs.map} +1 -1
  191. package/dist/{ThemeToggle-BYUEH6be.js → ThemeToggle-C2kjFrD_.js} +3 -3
  192. package/dist/{ThemeToggle-BYUEH6be.js.map → ThemeToggle-C2kjFrD_.js.map} +1 -1
  193. package/dist/{TimeColumns-yzjScNU8.js → TimeColumns-BS1d0qOp.js} +2 -2
  194. package/dist/{TimeColumns-yzjScNU8.js.map → TimeColumns-BS1d0qOp.js.map} +1 -1
  195. package/dist/{TimeColumns-Cl0_IRf0.cjs → TimeColumns-D7-O4Qyt.cjs} +2 -2
  196. package/dist/{TimeColumns-Cl0_IRf0.cjs.map → TimeColumns-D7-O4Qyt.cjs.map} +1 -1
  197. package/dist/{TimePicker-CoIdMv1S.js → TimePicker-DlzYNDN1.js} +5 -5
  198. package/dist/{TimePicker-CoIdMv1S.js.map → TimePicker-DlzYNDN1.js.map} +1 -1
  199. package/dist/{TimePicker-CJGVGETl.cjs → TimePicker-Dzb3gycP.cjs} +2 -2
  200. package/dist/{TimePicker-CJGVGETl.cjs.map → TimePicker-Dzb3gycP.cjs.map} +1 -1
  201. package/dist/{Toaster-lv5cJhib.cjs → Toaster-Cummylmj.cjs} +2 -2
  202. package/dist/{Toaster-lv5cJhib.cjs.map → Toaster-Cummylmj.cjs.map} +1 -1
  203. package/dist/{Toaster-Dhz2mYq_.js → Toaster-cu5XyKeE.js} +2 -2
  204. package/dist/{Toaster-Dhz2mYq_.js.map → Toaster-cu5XyKeE.js.map} +1 -1
  205. package/dist/{TranslatedFields-BCJ86Tqp.cjs → TranslatedFields-CbTlgKnh.cjs} +2 -2
  206. package/dist/{TranslatedFields-BCJ86Tqp.cjs.map → TranslatedFields-CbTlgKnh.cjs.map} +1 -1
  207. package/dist/{TranslatedFields-BtNUAyrY.js → TranslatedFields-Ccjhq2YL.js} +5 -5
  208. package/dist/{TranslatedFields-BtNUAyrY.js.map → TranslatedFields-Ccjhq2YL.js.map} +1 -1
  209. package/dist/{UserCard-CiQUrZjb.cjs → UserCard-BfHHfkDr.cjs} +2 -2
  210. package/dist/{UserCard-CiQUrZjb.cjs.map → UserCard-BfHHfkDr.cjs.map} +1 -1
  211. package/dist/{UserCard-B-eNyZuT.js → UserCard-Bs8kuV2j.js} +3 -3
  212. package/dist/{UserCard-B-eNyZuT.js.map → UserCard-Bs8kuV2j.js.map} +1 -1
  213. package/dist/components/Alert/index.cjs +1 -1
  214. package/dist/components/Alert/index.js +1 -1
  215. package/dist/components/Breadcrumbs/index.cjs +1 -1
  216. package/dist/components/Breadcrumbs/index.js +1 -1
  217. package/dist/components/Button/index.cjs +1 -1
  218. package/dist/components/Button/index.js +1 -1
  219. package/dist/components/Card/index.cjs +1 -1
  220. package/dist/components/Card/index.js +1 -1
  221. package/dist/components/Chip/index.cjs +1 -1
  222. package/dist/components/Chip/index.js +1 -1
  223. package/dist/components/CodeBlock/index.cjs +1 -1
  224. package/dist/components/CodeBlock/index.js +1 -1
  225. package/dist/components/ColorPicker/index.cjs +1 -1
  226. package/dist/components/ColorPicker/index.js +1 -1
  227. package/dist/components/ColorRamp/index.cjs +1 -1
  228. package/dist/components/ColorRamp/index.js +1 -1
  229. package/dist/components/CopyButton/index.cjs +1 -1
  230. package/dist/components/CopyButton/index.js +1 -1
  231. package/dist/components/DatePicker/index.cjs +1 -1
  232. package/dist/components/DatePicker/index.js +1 -1
  233. package/dist/components/DateTimePicker/index.cjs +1 -1
  234. package/dist/components/DateTimePicker/index.js +1 -1
  235. package/dist/components/DescriptionList/index.cjs +1 -1
  236. package/dist/components/DescriptionList/index.js +1 -1
  237. package/dist/components/EmptyState/index.cjs +1 -1
  238. package/dist/components/EmptyState/index.js +1 -1
  239. package/dist/components/ErrorState/ErrorState.d.cts +13 -1
  240. package/dist/components/ErrorState/ErrorState.d.ts +13 -1
  241. package/dist/components/ErrorState/errorMessage.d.cts +12 -0
  242. package/dist/components/ErrorState/errorMessage.d.ts +12 -0
  243. package/dist/components/ErrorState/index.cjs +1 -1
  244. package/dist/components/ErrorState/index.d.cts +1 -1
  245. package/dist/components/ErrorState/index.d.ts +1 -1
  246. package/dist/components/ErrorState/index.js +6 -4
  247. package/dist/components/FileCard/index.cjs +1 -1
  248. package/dist/components/FileCard/index.js +1 -1
  249. package/dist/components/FileUploader/index.cjs +1 -1
  250. package/dist/components/FileUploader/index.js +1 -1
  251. package/dist/components/Flag/index.cjs +1 -1
  252. package/dist/components/Flag/index.js +1 -1
  253. package/dist/components/FullscreenToggle/index.cjs +1 -1
  254. package/dist/components/FullscreenToggle/index.js +1 -1
  255. package/dist/components/IconButton/index.cjs +1 -1
  256. package/dist/components/IconButton/index.js +1 -1
  257. package/dist/components/Loader/index.cjs +1 -1
  258. package/dist/components/Loader/index.js +1 -1
  259. package/dist/components/Modal/index.cjs +1 -1
  260. package/dist/components/Modal/index.js +1 -1
  261. package/dist/components/MultiSelect/index.cjs +1 -1
  262. package/dist/components/MultiSelect/index.js +1 -1
  263. package/dist/components/NumberField/index.cjs +1 -1
  264. package/dist/components/NumberField/index.js +1 -1
  265. package/dist/components/OtpField/index.cjs +1 -1
  266. package/dist/components/OtpField/index.js +1 -1
  267. package/dist/components/PageLayout/index.cjs +1 -1
  268. package/dist/components/PageLayout/index.js +1 -1
  269. package/dist/components/PageNotFound/index.cjs +1 -1
  270. package/dist/components/PageNotFound/index.js +1 -1
  271. package/dist/components/Pagination/index.cjs +1 -1
  272. package/dist/components/Pagination/index.js +1 -1
  273. package/dist/components/PaletteField/index.cjs +1 -1
  274. package/dist/components/PaletteField/index.js +1 -1
  275. package/dist/components/PhoneField/index.cjs +1 -1
  276. package/dist/components/PhoneField/index.js +1 -1
  277. package/dist/components/Popconfirm/index.cjs +1 -1
  278. package/dist/components/Popconfirm/index.js +1 -1
  279. package/dist/components/Progress/index.cjs +1 -1
  280. package/dist/components/Progress/index.js +1 -1
  281. package/dist/components/RemoveDialog/index.cjs +1 -1
  282. package/dist/components/RemoveDialog/index.js +1 -1
  283. package/dist/components/RichTextEditor/index.cjs +1 -1
  284. package/dist/components/RichTextEditor/index.js +1 -1
  285. package/dist/components/RootLayout/index.cjs +1 -1
  286. package/dist/components/RootLayout/index.js +1 -1
  287. package/dist/components/Select/index.cjs +1 -1
  288. package/dist/components/Select/index.js +1 -1
  289. package/dist/components/Sidebar/index.cjs +1 -1
  290. package/dist/components/Sidebar/index.js +1 -1
  291. package/dist/components/SpeedDial/index.cjs +1 -1
  292. package/dist/components/SpeedDial/index.js +1 -1
  293. package/dist/components/Stepper/index.cjs +1 -1
  294. package/dist/components/Stepper/index.js +1 -1
  295. package/dist/components/Table/index.cjs +1 -1
  296. package/dist/components/Table/index.js +1 -1
  297. package/dist/components/Tabs/index.cjs +1 -1
  298. package/dist/components/Tabs/index.js +1 -1
  299. package/dist/components/TagsField/index.cjs +1 -1
  300. package/dist/components/TagsField/index.js +1 -1
  301. package/dist/components/TextField/index.cjs +1 -1
  302. package/dist/components/TextField/index.js +1 -1
  303. package/dist/components/ThemeToggle/index.cjs +1 -1
  304. package/dist/components/ThemeToggle/index.js +1 -1
  305. package/dist/components/TimePicker/index.cjs +1 -1
  306. package/dist/components/TimePicker/index.js +1 -1
  307. package/dist/components/Toast/index.cjs +1 -1
  308. package/dist/components/Toast/index.js +1 -1
  309. package/dist/components/TranslatedFields/index.cjs +1 -1
  310. package/dist/components/TranslatedFields/index.js +1 -1
  311. package/dist/components/UserCard/index.cjs +1 -1
  312. package/dist/components/UserCard/index.js +1 -1
  313. package/dist/entries/app.cjs +1 -1
  314. package/dist/entries/app.js +1 -1
  315. package/dist/entries/components.cjs +1 -1
  316. package/dist/entries/components.js +144 -142
  317. package/dist/entries/hooks.cjs +1 -1
  318. package/dist/entries/hooks.d.cts +2 -0
  319. package/dist/entries/hooks.d.ts +2 -0
  320. package/dist/entries/hooks.js +9 -8
  321. package/dist/entries/i18n.cjs +1 -1
  322. package/dist/entries/i18n.js +2 -2
  323. package/dist/entries/theme.cjs +1 -1
  324. package/dist/entries/theme.js +1 -1
  325. package/dist/hooks/index.d.cts +2 -0
  326. package/dist/hooks/index.d.ts +2 -0
  327. package/dist/hooks/useTableQuery.d.cts +56 -0
  328. package/dist/hooks/useTableQuery.d.ts +56 -0
  329. package/dist/i18n/messages.d.cts +1 -0
  330. package/dist/i18n/messages.d.ts +1 -0
  331. package/dist/index.cjs +1 -1
  332. package/dist/index.css +1 -1
  333. package/dist/index.js +247 -244
  334. package/dist/{messages-BF2ft7yD.js → messages-DCefu6Pn.js} +20 -13
  335. package/dist/messages-DCefu6Pn.js.map +1 -0
  336. package/dist/messages-FiUqCKjJ.cjs +36 -0
  337. package/dist/messages-FiUqCKjJ.cjs.map +1 -0
  338. package/dist/useForm-CN-qCrP7.js +144 -0
  339. package/dist/useForm-CN-qCrP7.js.map +1 -0
  340. package/dist/useForm-WvV361y6.cjs +2 -0
  341. package/dist/useForm-WvV361y6.cjs.map +1 -0
  342. package/dist/{useOptionMenu-C0xSaZ4t.cjs → useOptionMenu-BoWyPgbY.cjs} +2 -2
  343. package/dist/{useOptionMenu-C0xSaZ4t.cjs.map → useOptionMenu-BoWyPgbY.cjs.map} +1 -1
  344. package/dist/{useOptionMenu-Cq_eHdab.js → useOptionMenu-D7EbYG9A.js} +3 -3
  345. package/dist/{useOptionMenu-Cq_eHdab.js.map → useOptionMenu-D7EbYG9A.js.map} +1 -1
  346. package/package.json +2 -1
  347. package/dist/ErrorBoundary-DJ6R1M9k.js +0 -126
  348. package/dist/ErrorBoundary-DJ6R1M9k.js.map +0 -1
  349. package/dist/ErrorBoundary-unvC1vZQ.cjs +0 -2
  350. package/dist/ErrorBoundary-unvC1vZQ.cjs.map +0 -1
  351. package/dist/messages-BF2ft7yD.js.map +0 -1
  352. package/dist/messages-ihnE1jVG.cjs +0 -36
  353. package/dist/messages-ihnE1jVG.cjs.map +0 -1
  354. package/dist/useForm-B_5wDIER.js +0 -126
  355. package/dist/useForm-B_5wDIER.js.map +0 -1
  356. package/dist/useForm-C7erBHt0.cjs +0 -2
  357. package/dist/useForm-C7erBHt0.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"FullscreenToggle-CMifmPD3.js","sources":["../src/components/FullscreenToggle/FullscreenToggle.tsx"],"sourcesContent":["import { forwardRef, useEffect, useState } from 'react'\nimport { useT } from '../../theme'\nimport { Icon } from '../Icon'\nimport { IconButton, type IconButtonProps } from '../IconButton'\n\n/** Inherits `IconButton`'s look (variant, color, size); the icon and toggle behavior are built in. */\nexport type FullscreenToggleProps = Omit<IconButtonProps, 'children'>\n\n/**\n * A one-tap browser fullscreen switch. Renders an `IconButton` that calls the Fullscreen API —\n * `requestFullscreen` to maximize, `exitFullscreen` to restore — and flips its `Maximize3` icon 180°\n * while fullscreen (so it reads as \"minimize\"), keeping state in sync via the `fullscreenchange`\n * event. Renders **nothing** where the Fullscreen API is unavailable (e.g. iOS Safari on iPhone), so\n * it auto-hides on devices that can't go fullscreen. Styling comes from `IconButton`, so `variant`,\n * `color` and `size` pass through.\n */\nexport const FullscreenToggle = forwardRef<HTMLButtonElement, FullscreenToggleProps>(\n function FullscreenToggle({ variant = 'outlined', ...props }, ref) {\n // The Fullscreen API is absent on some devices (notably iOS Safari on iPhone); hide the control\n // there, since tapping it could never do anything.\n const [supported] = useState(\n () =>\n typeof document !== 'undefined' &&\n typeof document.documentElement.requestFullscreen === 'function',\n )\n const [isFullscreen, setIsFullscreen] = useState(false)\n const t = useT()\n\n useEffect(() => {\n const sync = () => setIsFullscreen(document.fullscreenElement != null)\n sync() // pick up a session that's already fullscreen on mount\n document.addEventListener('fullscreenchange', sync)\n return () => document.removeEventListener('fullscreenchange', sync)\n }, [])\n\n if (!supported) return null\n\n const toggle = () => {\n // `?.` guards environments without the Fullscreen API; `.catch` swallows a blocked request\n if (document.fullscreenElement) {\n document.exitFullscreen?.()?.catch(() => {})\n } else {\n document.documentElement.requestFullscreen?.()?.catch(() => {})\n }\n }\n\n return (\n <IconButton\n ref={ref}\n variant={variant}\n role=\"switch\"\n aria-checked={isFullscreen}\n aria-label={t('fullscreenToggle.label')}\n {...props}\n onClick={(event) => {\n props.onClick?.(event) // preserve a caller-supplied handler, then toggle\n toggle()\n }}\n >\n <Icon name=\"Maximize3\" style={isFullscreen ? { transform: 'rotate(180deg)' } : undefined} />\n </IconButton>\n )\n },\n)\n"],"names":["FullscreenToggle","forwardRef","variant","props","ref","supported","useState","isFullscreen","setIsFullscreen","t","useT","useEffect","sync","toggle","_b","_a","_e","_d","_c","jsx","IconButton","event","Icon"],"mappings":";;;;;AAgBO,MAAMA,IAAmBC;AAAA,EAC9B,SAA0B,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enToggle.tsx"],"sourcesContent":["import { forwardRef, useEffect, useState } from 'react'\nimport { useT } from '../../theme'\nimport { Icon } from '../Icon'\nimport { IconButton, type IconButtonProps } from '../IconButton'\n\n/** Inherits `IconButton`'s look (variant, color, size); the icon and toggle behavior are built in. */\nexport type FullscreenToggleProps = Omit<IconButtonProps, 'children'>\n\n/**\n * A one-tap browser fullscreen switch. Renders an `IconButton` that calls the Fullscreen API —\n * `requestFullscreen` to maximize, `exitFullscreen` to restore — and flips its `Maximize3` icon 180°\n * while fullscreen (so it reads as \"minimize\"), keeping state in sync via the `fullscreenchange`\n * event. Renders **nothing** where the Fullscreen API is unavailable (e.g. iOS Safari on iPhone), so\n * it auto-hides on devices that can't go fullscreen. Styling comes from `IconButton`, so `variant`,\n * `color` and `size` pass through.\n */\nexport const FullscreenToggle = forwardRef<HTMLButtonElement, FullscreenToggleProps>(\n function FullscreenToggle({ variant = 'outlined', ...props }, ref) {\n // The Fullscreen API is absent on some devices (notably iOS Safari on iPhone); hide the control\n // there, since tapping it could never do anything.\n const [supported] = useState(\n () =>\n typeof document !== 'undefined' &&\n typeof document.documentElement.requestFullscreen === 'function',\n )\n const [isFullscreen, setIsFullscreen] = useState(false)\n const t = useT()\n\n useEffect(() => {\n const sync = () => setIsFullscreen(document.fullscreenElement != null)\n sync() // pick up a session that's already fullscreen on mount\n document.addEventListener('fullscreenchange', sync)\n return () => document.removeEventListener('fullscreenchange', sync)\n }, [])\n\n if (!supported) return null\n\n const toggle = () => {\n // `?.` guards environments without the Fullscreen API; `.catch` swallows a blocked request\n if (document.fullscreenElement) {\n document.exitFullscreen?.()?.catch(() => {})\n } else {\n document.documentElement.requestFullscreen?.()?.catch(() => {})\n }\n }\n\n return (\n <IconButton\n ref={ref}\n variant={variant}\n role=\"switch\"\n aria-checked={isFullscreen}\n aria-label={t('fullscreenToggle.label')}\n {...props}\n onClick={(event) => {\n props.onClick?.(event) // preserve a caller-supplied handler, then toggle\n toggle()\n }}\n >\n <Icon name=\"Maximize3\" style={isFullscreen ? { transform: 'rotate(180deg)' } : undefined} />\n </IconButton>\n )\n },\n)\n"],"names":["FullscreenToggle","forwardRef","variant","props","ref","supported","useState","isFullscreen","setIsFullscreen","t","useT","useEffect","sync","toggle","_b","_a","_e","_d","_c","jsx","IconButton","event","Icon"],"mappings":";;;;;AAgBO,MAAMA,IAAmBC;AAAA,EAC9B,SAA0B,EAAE,SAAAC,IAAU,YAAY,GAAGC,EAAA,GAASC,GAAK;AAGjE,UAAM,CAACC,CAAS,IAAIC;AAAA,MAClB,MACE,OAAO,WAAa,OACpB,OAAO,SAAS,gBAAgB,qBAAsB;AAAA,IAAA,GAEpD,CAACC,GAAcC,CAAe,IAAIF,EAAS,EAAK,GAChDG,IAAIC,EAAA;AASV,QAPAC,EAAU,MAAM;AACd,YAAMC,IAAO,MAAMJ,EAAgB,SAAS,qBAAqB,IAAI;AACrE,aAAAI,EAAA,GACA,SAAS,iBAAiB,oBAAoBA,CAAI,GAC3C,MAAM,SAAS,oBAAoB,oBAAoBA,CAAI;AAAA,IACpE,GAAG,CAAA,CAAE,GAED,CAACP,EAAW,QAAO;AAEvB,UAAMQ,IAAS,MAAM;;AAEnB,MAAI,SAAS,qBACXC,KAAAC,IAAA,SAAS,mBAAT,gBAAAA,EAAA,2BAAAD,EAA6B,MAAM,MAAM;AAAA,MAAC,MAE1CE,KAAAC,KAAAC,IAAA,SAAS,iBAAgB,sBAAzB,gBAAAD,EAAA,KAAAC,OAAA,QAAAF,EAAgD,MAAM,MAAM;AAAA,MAAC;AAAA,IAEjE;AAEA,WACE,gBAAAG;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAAhB;AAAA,QACA,SAAAF;AAAA,QACA,MAAK;AAAA,QACL,gBAAcK;AAAA,QACd,cAAYE,EAAE,wBAAwB;AAAA,QACrC,GAAGN;AAAA,QACJ,SAAS,CAACkB,MAAU;;AAClB,WAAAN,IAAAZ,EAAM,YAAN,QAAAY,EAAA,KAAAZ,GAAgBkB,IAChBR,EAAA;AAAA,QACF;AAAA,QAEA,UAAA,gBAAAM,EAACG,GAAA,EAAK,MAAK,aAAY,OAAOf,IAAe,EAAE,WAAW,iBAAA,IAAqB,OAAA,CAAW;AAAA,MAAA;AAAA,IAAA;AAAA,EAGhG;AACF;"}
@@ -1,2 +1,2 @@
1
- "use strict";const s=require("react/jsx-runtime"),c=require("react"),F=require("./Icon-BVULqOJD.cjs"),h=require("./IconButton-A2B0bqC-.cjs"),q=require("./ConfigProvider-BElY0HuV.cjs"),E=c.forwardRef(function({variant:i="outlined",...t},d){const[a]=c.useState(()=>typeof document<"u"&&typeof document.documentElement.requestFullscreen=="function"),[l,f]=c.useState(!1),m=q.useT();if(c.useEffect(()=>{const e=()=>f(document.fullscreenElement!=null);return e(),document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),!a)return null;const g=()=>{var e,n,u,o,r;document.fullscreenElement?(n=(e=document.exitFullscreen)==null?void 0:e.call(document))==null||n.catch(()=>{}):(r=(o=(u=document.documentElement).requestFullscreen)==null?void 0:o.call(u))==null||r.catch(()=>{})};return s.jsx(h.IconButton,{ref:d,variant:i,role:"switch","aria-checked":l,"aria-label":m("fullscreenToggle.label"),...t,onClick:e=>{var n;(n=t.onClick)==null||n.call(t,e),g()},children:s.jsx(F.Icon,{name:"Maximize3",style:l?{transform:"rotate(180deg)"}:void 0})})});exports.FullscreenToggle=E;
2
- //# sourceMappingURL=FullscreenToggle-BSwxQEaG.cjs.map
1
+ "use strict";const s=require("react/jsx-runtime"),c=require("react"),F=require("./Icon-BVULqOJD.cjs"),h=require("./IconButton-BNa0yLcv.cjs"),q=require("./ConfigProvider-ByLHqXpv.cjs"),E=c.forwardRef(function({variant:i="outlined",...t},d){const[a]=c.useState(()=>typeof document<"u"&&typeof document.documentElement.requestFullscreen=="function"),[l,f]=c.useState(!1),m=q.useT();if(c.useEffect(()=>{const e=()=>f(document.fullscreenElement!=null);return e(),document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),!a)return null;const g=()=>{var e,n,u,o,r;document.fullscreenElement?(n=(e=document.exitFullscreen)==null?void 0:e.call(document))==null||n.catch(()=>{}):(r=(o=(u=document.documentElement).requestFullscreen)==null?void 0:o.call(u))==null||r.catch(()=>{})};return s.jsx(h.IconButton,{ref:d,variant:i,role:"switch","aria-checked":l,"aria-label":m("fullscreenToggle.label"),...t,onClick:e=>{var n;(n=t.onClick)==null||n.call(t,e),g()},children:s.jsx(F.Icon,{name:"Maximize3",style:l?{transform:"rotate(180deg)"}:void 0})})});exports.FullscreenToggle=E;
2
+ //# sourceMappingURL=FullscreenToggle-CeGgw3z1.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"FullscreenToggle-BSwxQEaG.cjs","sources":["../src/components/FullscreenToggle/FullscreenToggle.tsx"],"sourcesContent":["import { forwardRef, useEffect, useState } from 'react'\nimport { useT } from '../../theme'\nimport { Icon } from '../Icon'\nimport { IconButton, type IconButtonProps } from '../IconButton'\n\n/** Inherits `IconButton`'s look (variant, color, size); the icon and toggle behavior are built in. */\nexport type FullscreenToggleProps = Omit<IconButtonProps, 'children'>\n\n/**\n * A one-tap browser fullscreen switch. Renders an `IconButton` that calls the Fullscreen API —\n * `requestFullscreen` to maximize, `exitFullscreen` to restore — and flips its `Maximize3` icon 180°\n * while fullscreen (so it reads as \"minimize\"), keeping state in sync via the `fullscreenchange`\n * event. Renders **nothing** where the Fullscreen API is unavailable (e.g. iOS Safari on iPhone), so\n * it auto-hides on devices that can't go fullscreen. Styling comes from `IconButton`, so `variant`,\n * `color` and `size` pass through.\n */\nexport const FullscreenToggle = forwardRef<HTMLButtonElement, FullscreenToggleProps>(\n function FullscreenToggle({ variant = 'outlined', ...props }, ref) {\n // The Fullscreen API is absent on some devices (notably iOS Safari on iPhone); hide the control\n // there, since tapping it could never do anything.\n const [supported] = useState(\n () =>\n typeof document !== 'undefined' &&\n typeof document.documentElement.requestFullscreen === 'function',\n )\n const [isFullscreen, setIsFullscreen] = useState(false)\n const t = useT()\n\n useEffect(() => {\n const sync = () => setIsFullscreen(document.fullscreenElement != null)\n sync() // pick up a session that's already fullscreen on mount\n document.addEventListener('fullscreenchange', sync)\n return () => document.removeEventListener('fullscreenchange', sync)\n }, [])\n\n if (!supported) return null\n\n const toggle = () => {\n // `?.` guards environments without the Fullscreen API; `.catch` swallows a blocked request\n if (document.fullscreenElement) {\n document.exitFullscreen?.()?.catch(() => {})\n } else {\n document.documentElement.requestFullscreen?.()?.catch(() => {})\n }\n }\n\n return (\n <IconButton\n ref={ref}\n variant={variant}\n role=\"switch\"\n aria-checked={isFullscreen}\n aria-label={t('fullscreenToggle.label')}\n {...props}\n onClick={(event) => {\n props.onClick?.(event) // preserve a caller-supplied handler, then toggle\n toggle()\n }}\n >\n <Icon name=\"Maximize3\" style={isFullscreen ? { transform: 'rotate(180deg)' } : undefined} />\n </IconButton>\n )\n },\n)\n"],"names":["FullscreenToggle","forwardRef","variant","props","ref","supported","useState","isFullscreen","setIsFullscreen","t","useT","useEffect","sync","toggle","_b","_a","_e","_d","_c","jsx","IconButton","event","Icon"],"mappings":"wLAgBaA,EAAmBC,EAAAA,WAC9B,SAA0B,CAAE,QAAAC,EAAU,WAAY,GAAGC,CAAA,EAASC,EAAK,CAGjE,KAAM,CAACC,CAAS,EAAIC,EAAAA,SAClB,IACE,OAAO,SAAa,KACpB,OAAO,SAAS,gBAAgB,mBAAsB,UAAA,EAEpD,CAACC,EAAcC,CAAe,EAAIF,EAAAA,SAAS,EAAK,EAChDG,EAAIC,EAAAA,KAAA,EASV,GAPAC,EAAAA,UAAU,IAAM,CACd,MAAMC,EAAO,IAAMJ,EAAgB,SAAS,mBAAqB,IAAI,EACrE,OAAAI,EAAA,EACA,SAAS,iBAAiB,mBAAoBA,CAAI,EAC3C,IAAM,SAAS,oBAAoB,mBAAoBA,CAAI,CACpE,EAAG,CAAA,CAAE,EAED,CAACP,EAAW,OAAO,KAEvB,MAAMQ,EAAS,IAAM,eAEf,SAAS,mBACXC,GAAAC,EAAA,SAAS,iBAAT,YAAAA,EAAA,uBAAAD,EAA6B,MAAM,IAAM,CAAC,IAE1CE,GAAAC,GAAAC,EAAA,SAAS,iBAAgB,oBAAzB,YAAAD,EAAA,KAAAC,KAAA,MAAAF,EAAgD,MAAM,IAAM,CAAC,EAEjE,EAEA,OACEG,EAAAA,IAACC,EAAAA,WAAA,CACC,IAAAhB,EACA,QAAAF,EACA,KAAK,SACL,eAAcK,EACd,aAAYE,EAAE,wBAAwB,EACrC,GAAGN,EACJ,QAAUkB,GAAU,QAClBN,EAAAZ,EAAM,UAAN,MAAAY,EAAA,KAAAZ,EAAgBkB,GAChBR,EAAA,CACF,EAEA,SAAAM,EAAAA,IAACG,OAAA,CAAK,KAAK,YAAY,MAAOf,EAAe,CAAE,UAAW,gBAAA,EAAqB,MAAA,CAAW,CAAA,CAAA,CAGhG,CACF"}
1
+ {"version":3,"file":"FullscreenToggle-CeGgw3z1.cjs","sources":["../src/components/FullscreenToggle/FullscreenToggle.tsx"],"sourcesContent":["import { forwardRef, useEffect, useState } from 'react'\nimport { useT } from '../../theme'\nimport { Icon } from '../Icon'\nimport { IconButton, type IconButtonProps } from '../IconButton'\n\n/** Inherits `IconButton`'s look (variant, color, size); the icon and toggle behavior are built in. */\nexport type FullscreenToggleProps = Omit<IconButtonProps, 'children'>\n\n/**\n * A one-tap browser fullscreen switch. Renders an `IconButton` that calls the Fullscreen API —\n * `requestFullscreen` to maximize, `exitFullscreen` to restore — and flips its `Maximize3` icon 180°\n * while fullscreen (so it reads as \"minimize\"), keeping state in sync via the `fullscreenchange`\n * event. Renders **nothing** where the Fullscreen API is unavailable (e.g. iOS Safari on iPhone), so\n * it auto-hides on devices that can't go fullscreen. Styling comes from `IconButton`, so `variant`,\n * `color` and `size` pass through.\n */\nexport const FullscreenToggle = forwardRef<HTMLButtonElement, FullscreenToggleProps>(\n function FullscreenToggle({ variant = 'outlined', ...props }, ref) {\n // The Fullscreen API is absent on some devices (notably iOS Safari on iPhone); hide the control\n // there, since tapping it could never do anything.\n const [supported] = useState(\n () =>\n typeof document !== 'undefined' &&\n typeof document.documentElement.requestFullscreen === 'function',\n )\n const [isFullscreen, setIsFullscreen] = useState(false)\n const t = useT()\n\n useEffect(() => {\n const sync = () => setIsFullscreen(document.fullscreenElement != null)\n sync() // pick up a session that's already fullscreen on mount\n document.addEventListener('fullscreenchange', sync)\n return () => document.removeEventListener('fullscreenchange', sync)\n }, [])\n\n if (!supported) return null\n\n const toggle = () => {\n // `?.` guards environments without the Fullscreen API; `.catch` swallows a blocked request\n if (document.fullscreenElement) {\n document.exitFullscreen?.()?.catch(() => {})\n } else {\n document.documentElement.requestFullscreen?.()?.catch(() => {})\n }\n }\n\n return (\n <IconButton\n ref={ref}\n variant={variant}\n role=\"switch\"\n aria-checked={isFullscreen}\n aria-label={t('fullscreenToggle.label')}\n {...props}\n onClick={(event) => {\n props.onClick?.(event) // preserve a caller-supplied handler, then toggle\n toggle()\n }}\n >\n <Icon name=\"Maximize3\" style={isFullscreen ? { transform: 'rotate(180deg)' } : undefined} />\n </IconButton>\n )\n },\n)\n"],"names":["FullscreenToggle","forwardRef","variant","props","ref","supported","useState","isFullscreen","setIsFullscreen","t","useT","useEffect","sync","toggle","_b","_a","_e","_d","_c","jsx","IconButton","event","Icon"],"mappings":"wLAgBaA,EAAmBC,EAAAA,WAC9B,SAA0B,CAAE,QAAAC,EAAU,WAAY,GAAGC,CAAA,EAASC,EAAK,CAGjE,KAAM,CAACC,CAAS,EAAIC,EAAAA,SAClB,IACE,OAAO,SAAa,KACpB,OAAO,SAAS,gBAAgB,mBAAsB,UAAA,EAEpD,CAACC,EAAcC,CAAe,EAAIF,EAAAA,SAAS,EAAK,EAChDG,EAAIC,EAAAA,KAAA,EASV,GAPAC,EAAAA,UAAU,IAAM,CACd,MAAMC,EAAO,IAAMJ,EAAgB,SAAS,mBAAqB,IAAI,EACrE,OAAAI,EAAA,EACA,SAAS,iBAAiB,mBAAoBA,CAAI,EAC3C,IAAM,SAAS,oBAAoB,mBAAoBA,CAAI,CACpE,EAAG,CAAA,CAAE,EAED,CAACP,EAAW,OAAO,KAEvB,MAAMQ,EAAS,IAAM,eAEf,SAAS,mBACXC,GAAAC,EAAA,SAAS,iBAAT,YAAAA,EAAA,uBAAAD,EAA6B,MAAM,IAAM,CAAC,IAE1CE,GAAAC,GAAAC,EAAA,SAAS,iBAAgB,oBAAzB,YAAAD,EAAA,KAAAC,KAAA,MAAAF,EAAgD,MAAM,IAAM,CAAC,EAEjE,EAEA,OACEG,EAAAA,IAACC,EAAAA,WAAA,CACC,IAAAhB,EACA,QAAAF,EACA,KAAK,SACL,eAAcK,EACd,aAAYE,EAAE,wBAAwB,EACrC,GAAGN,EACJ,QAAUkB,GAAU,QAClBN,EAAAZ,EAAM,UAAN,MAAAY,EAAA,KAAAZ,EAAgBkB,GAChBR,EAAA,CACF,EAEA,SAAAM,EAAAA,IAACG,OAAA,CAAK,KAAK,YAAY,MAAOf,EAAe,CAAE,UAAW,gBAAA,EAAqB,MAAA,CAAW,CAAA,CAAA,CAGhG,CACF"}
@@ -1,2 +1,2 @@
1
- "use strict";const i=require("react/jsx-runtime"),c=require("react"),g=require("clsx"),q=require("./Loader-D9nteBXt.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-A2B0bqC-.cjs.map
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 +1 @@
1
- {"version":3,"file":"IconButton-A2B0bqC-.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-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,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-CwyoKoWY.js";
4
+ import { L as z } from "./Loader-C1uaCtx6.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-Dq17Fekm.js.map
68
+ //# sourceMappingURL=IconButton-GU3Ud4Zg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton-Dq17Fekm.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-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,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-B_RSn9bb.js";
4
+ import { a as n } from "./ConfigProvider-BbsI15b-.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-CwyoKoWY.js.map
28
+ //# sourceMappingURL=Loader-C1uaCtx6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Loader-CwyoKoWY.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-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,2 +1,2 @@
1
- "use strict";const c=require("react/jsx-runtime"),d=require("react"),_=require("clsx"),p=require("./ConfigProvider-BElY0HuV.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-D9nteBXt.cjs.map
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 +1 @@
1
- {"version":3,"file":"Loader-D9nteBXt.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-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,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-A2B0bqC-.cjs"),X=require("react-dom"),Y=require("./useLockBodyScroll-CIXHZo-Q.cjs"),Z=require("./ConfigProvider-BElY0HuV.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-CQDcYS-Y.cjs.map
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 +1 @@
1
- {"version":3,"file":"Modal-CQDcYS-Y.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,SAC9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EACC,GAAGK,EAEH,SAAA,CAAA0D,GACCE,EAAAA,KAAC,OAAI,UAAW5C,EAAAA,KAAKC,EAAO,OAAQ0C,GAAiB1C,EAAO,aAAa,EACvE,SAAA,CAAA2C,EAAAA,KAAC,MAAA,CAAI,UAAW3C,EAAO,WACpB,SAAA,CAAAuC,GAAgB,MACfzC,EAAAA,IAAC8C,EAAAA,WAAA,CACC,QAAQ,SACR,KAAK,KACL,MAAAjC,EACA,aAAY,GACZ,cAAW,GACX,UAAWX,EAAO,KAEjB,SAAAuC,CAAA,CAAA,GAGH/B,GAAS,MAAQC,GAAe,cAC/B,MAAA,CAAI,UAAWT,EAAO,WACpB,SAAA,CAAAQ,GAAS,YACP,MAAA,CAAI,GAAIa,EAAS,UAAWrB,EAAO,MACjC,SAAAQ,CAAA,CACH,EAEDC,GAAe,MACdX,MAAC,MAAA,CAAI,GAAIyB,EAAQ,UAAWvB,EAAO,SAChC,SAAAS,CAAA,CACH,CAAA,CAAA,CAEJ,CAAA,EAEJ,EACCK,GACChB,EAAAA,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-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,GAAA,MAAAA,EAAYc,EACd,EAGMC,EAAmBD,GAAsC,CAC7DT,EAAgB,QAAUS,EAAM,OAChCb,GAAA,MAAAA,EAAca,EAChB,EACME,EAAeF,GAAsC,CAEvDrB,GACAqB,EAAM,SAAWA,EAAM,eACvBT,EAAgB,UAAYS,EAAM,gBAElCtB,GAAA,MAAAA,KAEFU,GAAA,MAAAA,EAAUY,EACZ,EAEA,MAAI,CAACvB,GAAQ,OA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WpB,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"}
@@ -3,10 +3,10 @@ import { forwardRef as V, useRef as E, useState as Z, useEffect as F, useId as H
3
3
  import { clsx as D } from "clsx";
4
4
  import { a as w } from "./names-r21QPjcU.js";
5
5
  import { I as K } from "./Icon-DaTvzLBu.js";
6
- import { I as U } from "./IconButton-Dq17Fekm.js";
6
+ import { I as U } from "./IconButton-GU3Ud4Zg.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-B_RSn9bb.js";
9
+ import { a as te } from "./ConfigProvider-BbsI15b-.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-cz6JIsZn.js.map
196
+ //# sourceMappingURL=Modal-DHP2R3K3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal-cz6JIsZn.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;A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A,GAEJ;AAAA,cACCK,KACC,gBAAAhB;AAAA,gBAAC8C;AAAA,gBAAA;AAAA,kBACC,SAAQ;AAAA,kBACR,OAAM;AAAA,kBACN,MAAK;AAAA,kBACL,WAAW5C,EAAO;AAAA,kBAClB,cAAY,EAAE,cAAc;AAAA,kBAC5B,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-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,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cAAY,EAAE,cAAc;AAAA,kBAC5B,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;"}
@@ -2,11 +2,11 @@ import { jsxs as k, jsx as t } from "react/jsx-runtime";
2
2
  import { forwardRef as ce, useId as ie, useState as ue, useRef as P, useCallback as de } from "react";
3
3
  import { clsx as B } from "clsx";
4
4
  import { u as me } from "./formContext-B7ln1Miy.js";
5
- import { C as he } from "./Chip-C-5Z5wsC.js";
5
+ import { C as he } from "./Chip-Zh1OB9nV.js";
6
6
  import { I as W } from "./Icon-DaTvzLBu.js";
7
- import { u as _e, O as pe } from "./useOptionMenu-Cq_eHdab.js";
7
+ import { u as _e, O as pe } from "./useOptionMenu-D7EbYG9A.js";
8
8
  import { T as j } from "./Typography-CJv5AnRP.js";
9
- import { a as fe } from "./ConfigProvider-B_RSn9bb.js";
9
+ import { a as fe } from "./ConfigProvider-BbsI15b-.js";
10
10
  const ve = "_field_um3uh_1", be = "_fullWidth_um3uh_7", ye = "_label_um3uh_12", ge = "_required_um3uh_21", xe = "_control_um3uh_27", Ie = "_filled_um3uh_47", Ne = "_open_um3uh_51", we = "_error_um3uh_56", De = "_disabled_um3uh_64", Se = "_chips_um3uh_31", Te = "_value_um3uh_84", ke = "_valueLabel_um3uh_91", Be = "_placeholder_um3uh_96", Ce = "_clear_um3uh_100", Me = "_chevron_um3uh_117", Re = "_sm_um3uh_127", Le = "_md_um3uh_131", Ve = "_lg_um3uh_135", qe = "_helper_um3uh_140", r = {
11
11
  field: ve,
12
12
  fullWidth: be,
@@ -216,4 +216,4 @@ const ve = "_field_um3uh_1", be = "_fullWidth_um3uh_7", ye = "_label_um3uh_12",
216
216
  export {
217
217
  Qe as M
218
218
  };
219
- //# sourceMappingURL=MultiSelect-C6l0LpIs.js.map
219
+ //# sourceMappingURL=MultiSelect-B-FPQ08c.js.map