@techzyapp/ui-library 1.0.16 → 1.0.18

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 (299) hide show
  1. package/dist/{AdminRoot-CyBIrszf.js → AdminRoot-B2J1cHK5.js} +4 -4
  2. package/dist/{AdminRoot-CyBIrszf.js.map → AdminRoot-B2J1cHK5.js.map} +1 -1
  3. package/dist/{AdminRoot-DUjVN8lu.cjs → AdminRoot-DlpMJNTx.cjs} +2 -2
  4. package/dist/{AdminRoot-DUjVN8lu.cjs.map → AdminRoot-DlpMJNTx.cjs.map} +1 -1
  5. package/dist/{Alert-D99G0StL.cjs → Alert-DRZdNwDm.cjs} +2 -2
  6. package/dist/{Alert-D99G0StL.cjs.map → Alert-DRZdNwDm.cjs.map} +1 -1
  7. package/dist/{Alert-B3rDvpbO.js → Alert-yldGvhVM.js} +3 -3
  8. package/dist/{Alert-B3rDvpbO.js.map → Alert-yldGvhVM.js.map} +1 -1
  9. package/dist/AuthLayout-B1tzhzHo.cjs +2 -0
  10. package/dist/{AuthLayout-pvqB9w-B.cjs.map → AuthLayout-B1tzhzHo.cjs.map} +1 -1
  11. package/dist/AuthLayout-j7EAPPXT.js +43 -0
  12. package/dist/{AuthLayout-DGCe90w0.js.map → AuthLayout-j7EAPPXT.js.map} +1 -1
  13. package/dist/{Breadcrumbs-DsKwFBH5.js → Breadcrumbs-FpIOHx_q.js} +3 -3
  14. package/dist/{Breadcrumbs-DsKwFBH5.js.map → Breadcrumbs-FpIOHx_q.js.map} +1 -1
  15. package/dist/{Breadcrumbs-jVOE_Pg8.cjs → Breadcrumbs-f0GE4lCI.cjs} +2 -2
  16. package/dist/{Breadcrumbs-jVOE_Pg8.cjs.map → Breadcrumbs-f0GE4lCI.cjs.map} +1 -1
  17. package/dist/{Button-CUsXYM-m.js → Button-BkjZ7wEu.js} +2 -2
  18. package/dist/{Button-CUsXYM-m.js.map → Button-BkjZ7wEu.js.map} +1 -1
  19. package/dist/{Button-Cj6pckNl.cjs → Button-Cu0XdnW6.cjs} +2 -2
  20. package/dist/{Button-Cj6pckNl.cjs.map → Button-Cu0XdnW6.cjs.map} +1 -1
  21. package/dist/{Calendar-Br4C0x0n.cjs → Calendar-CGQCditF.cjs} +2 -2
  22. package/dist/{Calendar-Br4C0x0n.cjs.map → Calendar-CGQCditF.cjs.map} +1 -1
  23. package/dist/{Calendar-CE_9WNAB.js → Calendar-DsJ6GICt.js} +3 -3
  24. package/dist/{Calendar-CE_9WNAB.js.map → Calendar-DsJ6GICt.js.map} +1 -1
  25. package/dist/{Card-DhpudGvF.js → Card-CumMi_XB.js} +2 -2
  26. package/dist/{Card-DhpudGvF.js.map → Card-CumMi_XB.js.map} +1 -1
  27. package/dist/{Card-DD9SWHzZ.cjs → Card-DGTGdaTZ.cjs} +2 -2
  28. package/dist/{Card-DD9SWHzZ.cjs.map → Card-DGTGdaTZ.cjs.map} +1 -1
  29. package/dist/{Chip-B2lY4TJ0.cjs → Chip-CJuAvgst.cjs} +2 -2
  30. package/dist/{Chip-B2lY4TJ0.cjs.map → Chip-CJuAvgst.cjs.map} +1 -1
  31. package/dist/{Chip-DulHqhuf.js → Chip-D83svOCW.js} +2 -2
  32. package/dist/{Chip-DulHqhuf.js.map → Chip-D83svOCW.js.map} +1 -1
  33. package/dist/{CodeBlock-DwBMghs2.js → CodeBlock-BK_KXhos.js} +3 -3
  34. package/dist/{CodeBlock-DwBMghs2.js.map → CodeBlock-BK_KXhos.js.map} +1 -1
  35. package/dist/{CodeBlock-EhB7v9-R.cjs → CodeBlock-C_UDrrY6.cjs} +2 -2
  36. package/dist/{CodeBlock-EhB7v9-R.cjs.map → CodeBlock-C_UDrrY6.cjs.map} +1 -1
  37. package/dist/{ColorPicker-Dc1y9Zuu.cjs → ColorPicker-BmxZnsNC.cjs} +2 -2
  38. package/dist/{ColorPicker-Dc1y9Zuu.cjs.map → ColorPicker-BmxZnsNC.cjs.map} +1 -1
  39. package/dist/{ColorPicker-DJgTeHht.js → ColorPicker-DLnB_AvZ.js} +3 -3
  40. package/dist/{ColorPicker-DJgTeHht.js.map → ColorPicker-DLnB_AvZ.js.map} +1 -1
  41. package/dist/{ColorPickerPanel-9tOQUL38.js → ColorPickerPanel-CG9idF4A.js} +2 -2
  42. package/dist/{ColorPickerPanel-9tOQUL38.js.map → ColorPickerPanel-CG9idF4A.js.map} +1 -1
  43. package/dist/{ColorPickerPanel-nXEliruE.cjs → ColorPickerPanel-CoyKplF5.cjs} +2 -2
  44. package/dist/{ColorPickerPanel-nXEliruE.cjs.map → ColorPickerPanel-CoyKplF5.cjs.map} +1 -1
  45. package/dist/{ConfigProvider-BYruQYHC.js → ConfigProvider-DDuIJSM7.js} +2 -2
  46. package/dist/{ConfigProvider-BYruQYHC.js.map → ConfigProvider-DDuIJSM7.js.map} +1 -1
  47. package/dist/{ConfigProvider-BHNx-NHV.cjs → ConfigProvider-h1WoGC3R.cjs} +2 -2
  48. package/dist/{ConfigProvider-BHNx-NHV.cjs.map → ConfigProvider-h1WoGC3R.cjs.map} +1 -1
  49. package/dist/{CopyButton-B4-OYsYr.js → CopyButton-DdQ-8ExN.js} +3 -3
  50. package/dist/{CopyButton-B4-OYsYr.js.map → CopyButton-DdQ-8ExN.js.map} +1 -1
  51. package/dist/{CopyButton-D_DCLHhb.cjs → CopyButton-tRMAy59I.cjs} +2 -2
  52. package/dist/{CopyButton-D_DCLHhb.cjs.map → CopyButton-tRMAy59I.cjs.map} +1 -1
  53. package/dist/{DatePicker-CEczjGZy.cjs → DatePicker-eryY6Xmx.cjs} +2 -2
  54. package/dist/{DatePicker-CEczjGZy.cjs.map → DatePicker-eryY6Xmx.cjs.map} +1 -1
  55. package/dist/{DatePicker-DkvfSN1K.js → DatePicker-pz634ktl.js} +4 -4
  56. package/dist/{DatePicker-DkvfSN1K.js.map → DatePicker-pz634ktl.js.map} +1 -1
  57. package/dist/{DateTimePicker-DPomyrnN.js → DateTimePicker-BJLq9Fud.js} +7 -7
  58. package/dist/{DateTimePicker-DPomyrnN.js.map → DateTimePicker-BJLq9Fud.js.map} +1 -1
  59. package/dist/{DateTimePicker-CDyGxUBX.cjs → DateTimePicker-CmH3ZuzN.cjs} +2 -2
  60. package/dist/{DateTimePicker-CDyGxUBX.cjs.map → DateTimePicker-CmH3ZuzN.cjs.map} +1 -1
  61. package/dist/{EmptyState-CVyFXprK.js → EmptyState-B2QPNhWW.js} +2 -2
  62. package/dist/{EmptyState-CVyFXprK.js.map → EmptyState-B2QPNhWW.js.map} +1 -1
  63. package/dist/{EmptyState-B77utgEn.cjs → EmptyState-Cxf4H8Cc.cjs} +2 -2
  64. package/dist/{EmptyState-B77utgEn.cjs.map → EmptyState-Cxf4H8Cc.cjs.map} +1 -1
  65. package/dist/{FileCard-CsGW2sxE.cjs → FileCard-D0Sa7WJt.cjs} +2 -2
  66. package/dist/{FileCard-CsGW2sxE.cjs.map → FileCard-D0Sa7WJt.cjs.map} +1 -1
  67. package/dist/{FileCard-Cpc5frNm.js → FileCard-Do9D72NA.js} +3 -3
  68. package/dist/{FileCard-Cpc5frNm.js.map → FileCard-Do9D72NA.js.map} +1 -1
  69. package/dist/{FileUploader-B_nKMh_K.js → FileUploader-4900qKEE.js} +5 -5
  70. package/dist/{FileUploader-B_nKMh_K.js.map → FileUploader-4900qKEE.js.map} +1 -1
  71. package/dist/{FileUploader-DDi_uzIx.cjs → FileUploader-B1Arfj1a.cjs} +2 -2
  72. package/dist/{FileUploader-DDi_uzIx.cjs.map → FileUploader-B1Arfj1a.cjs.map} +1 -1
  73. package/dist/{Flag-BJLWKB9J.cjs → Flag-D7Vlczlw.cjs} +2 -2
  74. package/dist/{Flag-BJLWKB9J.cjs.map → Flag-D7Vlczlw.cjs.map} +1 -1
  75. package/dist/{Flag-Ck1xK22A.js → Flag-DNhhLtCC.js} +2 -2
  76. package/dist/{Flag-Ck1xK22A.js.map → Flag-DNhhLtCC.js.map} +1 -1
  77. package/dist/{FullscreenToggle-DmC0jTay.js → FullscreenToggle-Bc4fB-Mi.js} +3 -3
  78. package/dist/{FullscreenToggle-DmC0jTay.js.map → FullscreenToggle-Bc4fB-Mi.js.map} +1 -1
  79. package/dist/{FullscreenToggle-MCxGzAEe.cjs → FullscreenToggle-dU2ai_OZ.cjs} +2 -2
  80. package/dist/{FullscreenToggle-MCxGzAEe.cjs.map → FullscreenToggle-dU2ai_OZ.cjs.map} +1 -1
  81. package/dist/{IconButton-B8FPGgDn.js → IconButton-DpTxmj3d.js} +2 -2
  82. package/dist/{IconButton-B8FPGgDn.js.map → IconButton-DpTxmj3d.js.map} +1 -1
  83. package/dist/{IconButton-BoY2y_pV.cjs → IconButton-DyRC514t.cjs} +2 -2
  84. package/dist/{IconButton-BoY2y_pV.cjs.map → IconButton-DyRC514t.cjs.map} +1 -1
  85. package/dist/{Loader-Cwb1bOHj.cjs → Loader-B45H2SMP.cjs} +2 -2
  86. package/dist/{Loader-Cwb1bOHj.cjs.map → Loader-B45H2SMP.cjs.map} +1 -1
  87. package/dist/{Loader-UzzqvFyo.js → Loader-B9VXX401.js} +2 -2
  88. package/dist/{Loader-UzzqvFyo.js.map → Loader-B9VXX401.js.map} +1 -1
  89. package/dist/{Modal-CO3c3sGY.cjs → Modal-DsoSz0Sp.cjs} +2 -2
  90. package/dist/{Modal-CO3c3sGY.cjs.map → Modal-DsoSz0Sp.cjs.map} +1 -1
  91. package/dist/{Modal-XMRDPHvQ.js → Modal-Us_E-lb2.js} +3 -3
  92. package/dist/{Modal-XMRDPHvQ.js.map → Modal-Us_E-lb2.js.map} +1 -1
  93. package/dist/{MultiSelect-DVOVHuIm.cjs → MultiSelect-CtLpWaBX.cjs} +2 -2
  94. package/dist/{MultiSelect-DVOVHuIm.cjs.map → MultiSelect-CtLpWaBX.cjs.map} +1 -1
  95. package/dist/{MultiSelect-BPLctumx.js → MultiSelect-sKk2KzOd.js} +4 -4
  96. package/dist/{MultiSelect-BPLctumx.js.map → MultiSelect-sKk2KzOd.js.map} +1 -1
  97. package/dist/{NumberField-BH237Vt2.cjs → NumberField-C6qj3nCa.cjs} +2 -2
  98. package/dist/{NumberField-BH237Vt2.cjs.map → NumberField-C6qj3nCa.cjs.map} +1 -1
  99. package/dist/{NumberField-X2HsSpu9.js → NumberField-Cz03nksO.js} +3 -3
  100. package/dist/{NumberField-X2HsSpu9.js.map → NumberField-Cz03nksO.js.map} +1 -1
  101. package/dist/{OtpField-CXP59zM2.cjs → OtpField-B46P6aMy.cjs} +2 -2
  102. package/dist/{OtpField-CXP59zM2.cjs.map → OtpField-B46P6aMy.cjs.map} +1 -1
  103. package/dist/{OtpField-CB05q0NX.js → OtpField-DLXQYMw1.js} +2 -2
  104. package/dist/{OtpField-CB05q0NX.js.map → OtpField-DLXQYMw1.js.map} +1 -1
  105. package/dist/{PageLayout-WKWnj5cw.js → PageLayout-BWU-p_N9.js} +2 -2
  106. package/dist/{PageLayout-WKWnj5cw.js.map → PageLayout-BWU-p_N9.js.map} +1 -1
  107. package/dist/{PageLayout-CuVuZEbR.cjs → PageLayout-BfeRjBek.cjs} +2 -2
  108. package/dist/{PageLayout-CuVuZEbR.cjs.map → PageLayout-BfeRjBek.cjs.map} +1 -1
  109. package/dist/{PageNotFound-CvWgniQM.js → PageNotFound-B_nTMrCD.js} +5 -5
  110. package/dist/{PageNotFound-CvWgniQM.js.map → PageNotFound-B_nTMrCD.js.map} +1 -1
  111. package/dist/{PageNotFound-BxABP8Nj.cjs → PageNotFound-nvZm-UCG.cjs} +2 -2
  112. package/dist/{PageNotFound-BxABP8Nj.cjs.map → PageNotFound-nvZm-UCG.cjs.map} +1 -1
  113. package/dist/{Pagination-BuP4N1bj.js → Pagination-BYXUhmSz.js} +2 -2
  114. package/dist/{Pagination-BuP4N1bj.js.map → Pagination-BYXUhmSz.js.map} +1 -1
  115. package/dist/{Pagination-Dcs_Znx3.cjs → Pagination-CsClNqIu.cjs} +2 -2
  116. package/dist/{Pagination-Dcs_Znx3.cjs.map → Pagination-CsClNqIu.cjs.map} +1 -1
  117. package/dist/{RemoveDialog-Cwtq9wAt.cjs → RemoveDialog-D5J9TYap.cjs} +2 -2
  118. package/dist/{RemoveDialog-Cwtq9wAt.cjs.map → RemoveDialog-D5J9TYap.cjs.map} +1 -1
  119. package/dist/{RemoveDialog-DU6MqkO8.js → RemoveDialog-PHdZi9-d.js} +4 -4
  120. package/dist/{RemoveDialog-DU6MqkO8.js.map → RemoveDialog-PHdZi9-d.js.map} +1 -1
  121. package/dist/{RichTextEditor-k-NlWb4Y.js → RichTextEditor-BcmsnYGJ.js} +7 -7
  122. package/dist/{RichTextEditor-k-NlWb4Y.js.map → RichTextEditor-BcmsnYGJ.js.map} +1 -1
  123. package/dist/{RichTextEditor-GxbnzLRe.cjs → RichTextEditor-jWv0t3vJ.cjs} +2 -2
  124. package/dist/{RichTextEditor-GxbnzLRe.cjs.map → RichTextEditor-jWv0t3vJ.cjs.map} +1 -1
  125. package/dist/RootLayout-DtZcqk9N.cjs +2 -0
  126. package/dist/RootLayout-DtZcqk9N.cjs.map +1 -0
  127. package/dist/RootLayout-q_oWf5et.js +422 -0
  128. package/dist/RootLayout-q_oWf5et.js.map +1 -0
  129. package/dist/{Select-DjMZec8c.cjs → Select-CWCeBQ8Q.cjs} +2 -2
  130. package/dist/{Select-DjMZec8c.cjs.map → Select-CWCeBQ8Q.cjs.map} +1 -1
  131. package/dist/{Select-D7KJ-YMU.js → Select-UygxT1Ry.js} +3 -3
  132. package/dist/{Select-D7KJ-YMU.js.map → Select-UygxT1Ry.js.map} +1 -1
  133. package/dist/Sidebar-BfBggyuh.cjs +2 -0
  134. package/dist/Sidebar-BfBggyuh.cjs.map +1 -0
  135. package/dist/Sidebar-C0OJK29L.js +513 -0
  136. package/dist/Sidebar-C0OJK29L.js.map +1 -0
  137. package/dist/{SpeedDial-DEWzAGXi.js → SpeedDial-DbvOJ4no.js} +2 -2
  138. package/dist/{SpeedDial-DEWzAGXi.js.map → SpeedDial-DbvOJ4no.js.map} +1 -1
  139. package/dist/{SpeedDial-CyiPagdu.cjs → SpeedDial-cKvuSMuk.cjs} +2 -2
  140. package/dist/{SpeedDial-CyiPagdu.cjs.map → SpeedDial-cKvuSMuk.cjs.map} +1 -1
  141. package/dist/{Stepper-CS6s0dMF.js → Stepper-BxGrP6JZ.js} +2 -2
  142. package/dist/{Stepper-CS6s0dMF.js.map → Stepper-BxGrP6JZ.js.map} +1 -1
  143. package/dist/{Stepper-PW7c45PV.cjs → Stepper-Db_ALAc4.cjs} +2 -2
  144. package/dist/{Stepper-PW7c45PV.cjs.map → Stepper-Db_ALAc4.cjs.map} +1 -1
  145. package/dist/{Table-C_Ov-kvK.cjs → Table-Dvna5_TR.cjs} +2 -2
  146. package/dist/{Table-C_Ov-kvK.cjs.map → Table-Dvna5_TR.cjs.map} +1 -1
  147. package/dist/{Table-IIAKXYOh.js → Table-tPOJ9umi.js} +15 -15
  148. package/dist/{Table-IIAKXYOh.js.map → Table-tPOJ9umi.js.map} +1 -1
  149. package/dist/{Tabs-D3wztVB1.js → Tabs-B0mWCNaC.js} +2 -2
  150. package/dist/{Tabs-D3wztVB1.js.map → Tabs-B0mWCNaC.js.map} +1 -1
  151. package/dist/{Tabs-CaHTJ99w.cjs → Tabs-ozklGWmX.cjs} +2 -2
  152. package/dist/{Tabs-CaHTJ99w.cjs.map → Tabs-ozklGWmX.cjs.map} +1 -1
  153. package/dist/{TagsField-BQIwSX5m.cjs → TagsField-BIxwLfSJ.cjs} +2 -2
  154. package/dist/{TagsField-BQIwSX5m.cjs.map → TagsField-BIxwLfSJ.cjs.map} +1 -1
  155. package/dist/{TagsField-BR9Z5pik.js → TagsField-CGFm17lP.js} +4 -4
  156. package/dist/{TagsField-BR9Z5pik.js.map → TagsField-CGFm17lP.js.map} +1 -1
  157. package/dist/{TextField-Bg4TwkVD.js → TextField-CRCYLPpr.js} +3 -3
  158. package/dist/{TextField-Bg4TwkVD.js.map → TextField-CRCYLPpr.js.map} +1 -1
  159. package/dist/{TextField-fmt7aacg.cjs → TextField-DvKEj36A.cjs} +2 -2
  160. package/dist/{TextField-fmt7aacg.cjs.map → TextField-DvKEj36A.cjs.map} +1 -1
  161. package/dist/{ThemeToggle-DEfXczDs.js → ThemeToggle-BwW9L115.js} +3 -3
  162. package/dist/{ThemeToggle-DEfXczDs.js.map → ThemeToggle-BwW9L115.js.map} +1 -1
  163. package/dist/{ThemeToggle-Cz5I2-DL.cjs → ThemeToggle-DxxLN79b.cjs} +2 -2
  164. package/dist/{ThemeToggle-Cz5I2-DL.cjs.map → ThemeToggle-DxxLN79b.cjs.map} +1 -1
  165. package/dist/{TimeColumns-B-vtakk8.js → TimeColumns-D3nqkQbh.js} +2 -2
  166. package/dist/{TimeColumns-B-vtakk8.js.map → TimeColumns-D3nqkQbh.js.map} +1 -1
  167. package/dist/{TimeColumns-IBmjExao.cjs → TimeColumns-DB-V4KpQ.cjs} +2 -2
  168. package/dist/{TimeColumns-IBmjExao.cjs.map → TimeColumns-DB-V4KpQ.cjs.map} +1 -1
  169. package/dist/{TimePicker-i2RnZHV1.js → TimePicker-D51QkQYy.js} +5 -5
  170. package/dist/{TimePicker-i2RnZHV1.js.map → TimePicker-D51QkQYy.js.map} +1 -1
  171. package/dist/{TimePicker-B-c6uIaY.cjs → TimePicker-D__72q2J.cjs} +2 -2
  172. package/dist/{TimePicker-B-c6uIaY.cjs.map → TimePicker-D__72q2J.cjs.map} +1 -1
  173. package/dist/{Toaster-Da8F_SFV.js → Toaster-BynCHvUr.js} +2 -2
  174. package/dist/{Toaster-Da8F_SFV.js.map → Toaster-BynCHvUr.js.map} +1 -1
  175. package/dist/{Toaster-qdS8Urgy.cjs → Toaster-tHet1M-T.cjs} +2 -2
  176. package/dist/{Toaster-qdS8Urgy.cjs.map → Toaster-tHet1M-T.cjs.map} +1 -1
  177. package/dist/{TranslatedFields-C30ww45c.cjs → TranslatedFields-B3Gli3TZ.cjs} +2 -2
  178. package/dist/{TranslatedFields-C30ww45c.cjs.map → TranslatedFields-B3Gli3TZ.cjs.map} +1 -1
  179. package/dist/{TranslatedFields-Ck9JTF27.js → TranslatedFields-DHRFcB3n.js} +5 -5
  180. package/dist/{TranslatedFields-Ck9JTF27.js.map → TranslatedFields-DHRFcB3n.js.map} +1 -1
  181. package/dist/{UserCard-0ZF29bkK.js → UserCard-D7U-CLbM.js} +3 -3
  182. package/dist/{UserCard-0ZF29bkK.js.map → UserCard-D7U-CLbM.js.map} +1 -1
  183. package/dist/{UserCard-C8rC_gzD.cjs → UserCard-GHw2gTx9.cjs} +2 -2
  184. package/dist/{UserCard-C8rC_gzD.cjs.map → UserCard-GHw2gTx9.cjs.map} +1 -1
  185. package/dist/components/Alert/index.cjs +1 -1
  186. package/dist/components/Alert/index.js +1 -1
  187. package/dist/components/AuthLayout/index.cjs +1 -1
  188. package/dist/components/AuthLayout/index.js +1 -1
  189. package/dist/components/Breadcrumbs/index.cjs +1 -1
  190. package/dist/components/Breadcrumbs/index.js +1 -1
  191. package/dist/components/Button/index.cjs +1 -1
  192. package/dist/components/Button/index.js +1 -1
  193. package/dist/components/Card/index.cjs +1 -1
  194. package/dist/components/Card/index.js +1 -1
  195. package/dist/components/Chip/index.cjs +1 -1
  196. package/dist/components/Chip/index.js +1 -1
  197. package/dist/components/CodeBlock/index.cjs +1 -1
  198. package/dist/components/CodeBlock/index.js +1 -1
  199. package/dist/components/ColorPicker/index.cjs +1 -1
  200. package/dist/components/ColorPicker/index.js +1 -1
  201. package/dist/components/CopyButton/index.cjs +1 -1
  202. package/dist/components/CopyButton/index.js +1 -1
  203. package/dist/components/DatePicker/index.cjs +1 -1
  204. package/dist/components/DatePicker/index.js +1 -1
  205. package/dist/components/DateTimePicker/index.cjs +1 -1
  206. package/dist/components/DateTimePicker/index.js +1 -1
  207. package/dist/components/EmptyState/index.cjs +1 -1
  208. package/dist/components/EmptyState/index.js +1 -1
  209. package/dist/components/FileCard/index.cjs +1 -1
  210. package/dist/components/FileCard/index.js +1 -1
  211. package/dist/components/FileUploader/index.cjs +1 -1
  212. package/dist/components/FileUploader/index.js +1 -1
  213. package/dist/components/Flag/index.cjs +1 -1
  214. package/dist/components/Flag/index.js +1 -1
  215. package/dist/components/FullscreenToggle/index.cjs +1 -1
  216. package/dist/components/FullscreenToggle/index.js +1 -1
  217. package/dist/components/IconButton/index.cjs +1 -1
  218. package/dist/components/IconButton/index.js +1 -1
  219. package/dist/components/Loader/index.cjs +1 -1
  220. package/dist/components/Loader/index.js +1 -1
  221. package/dist/components/Modal/index.cjs +1 -1
  222. package/dist/components/Modal/index.js +1 -1
  223. package/dist/components/MultiSelect/index.cjs +1 -1
  224. package/dist/components/MultiSelect/index.js +1 -1
  225. package/dist/components/NumberField/index.cjs +1 -1
  226. package/dist/components/NumberField/index.js +1 -1
  227. package/dist/components/OtpField/index.cjs +1 -1
  228. package/dist/components/OtpField/index.js +1 -1
  229. package/dist/components/PageLayout/index.cjs +1 -1
  230. package/dist/components/PageLayout/index.js +1 -1
  231. package/dist/components/PageNotFound/index.cjs +1 -1
  232. package/dist/components/PageNotFound/index.js +1 -1
  233. package/dist/components/Pagination/index.cjs +1 -1
  234. package/dist/components/Pagination/index.js +1 -1
  235. package/dist/components/RemoveDialog/index.cjs +1 -1
  236. package/dist/components/RemoveDialog/index.js +1 -1
  237. package/dist/components/RichTextEditor/index.cjs +1 -1
  238. package/dist/components/RichTextEditor/index.js +1 -1
  239. package/dist/components/RootLayout/index.cjs +1 -1
  240. package/dist/components/RootLayout/index.js +1 -1
  241. package/dist/components/Select/index.cjs +1 -1
  242. package/dist/components/Select/index.js +1 -1
  243. package/dist/components/Sidebar/Sidebar.d.cts +58 -12
  244. package/dist/components/Sidebar/Sidebar.d.ts +58 -12
  245. package/dist/components/Sidebar/index.cjs +1 -1
  246. package/dist/components/Sidebar/index.js +1 -1
  247. package/dist/components/SpeedDial/index.cjs +1 -1
  248. package/dist/components/SpeedDial/index.js +1 -1
  249. package/dist/components/Stepper/index.cjs +1 -1
  250. package/dist/components/Stepper/index.js +1 -1
  251. package/dist/components/Table/index.cjs +1 -1
  252. package/dist/components/Table/index.js +1 -1
  253. package/dist/components/Tabs/index.cjs +1 -1
  254. package/dist/components/Tabs/index.js +1 -1
  255. package/dist/components/TagsField/index.cjs +1 -1
  256. package/dist/components/TagsField/index.js +1 -1
  257. package/dist/components/TextField/index.cjs +1 -1
  258. package/dist/components/TextField/index.js +1 -1
  259. package/dist/components/ThemeToggle/index.cjs +1 -1
  260. package/dist/components/ThemeToggle/index.js +1 -1
  261. package/dist/components/TimePicker/index.cjs +1 -1
  262. package/dist/components/TimePicker/index.js +1 -1
  263. package/dist/components/Toast/index.cjs +1 -1
  264. package/dist/components/Toast/index.js +1 -1
  265. package/dist/components/TranslatedFields/index.cjs +1 -1
  266. package/dist/components/TranslatedFields/index.js +1 -1
  267. package/dist/components/UserCard/index.cjs +1 -1
  268. package/dist/components/UserCard/index.js +1 -1
  269. package/dist/entries/app.cjs +1 -1
  270. package/dist/entries/app.js +1 -1
  271. package/dist/entries/components.cjs +1 -1
  272. package/dist/entries/components.js +41 -41
  273. package/dist/entries/i18n.cjs +1 -1
  274. package/dist/entries/i18n.js +2 -2
  275. package/dist/entries/theme.cjs +1 -1
  276. package/dist/entries/theme.js +1 -1
  277. package/dist/i18n/messages.d.cts +1 -0
  278. package/dist/i18n/messages.d.ts +1 -0
  279. package/dist/index.cjs +1 -1
  280. package/dist/index.css +1 -1
  281. package/dist/index.js +44 -44
  282. package/dist/messages-C0YutUM1.cjs +36 -0
  283. package/dist/messages-C0YutUM1.cjs.map +1 -0
  284. package/dist/{messages-BOKick2l.js → messages-FciBtnCL.js} +8 -1
  285. package/dist/messages-FciBtnCL.js.map +1 -0
  286. package/package.json +1 -1
  287. package/dist/AuthLayout-DGCe90w0.js +0 -43
  288. package/dist/AuthLayout-pvqB9w-B.cjs +0 -2
  289. package/dist/RootLayout-C4suUXSJ.cjs +0 -2
  290. package/dist/RootLayout-C4suUXSJ.cjs.map +0 -1
  291. package/dist/RootLayout-ILyExULV.js +0 -407
  292. package/dist/RootLayout-ILyExULV.js.map +0 -1
  293. package/dist/Sidebar-DQov7G-T.cjs +0 -2
  294. package/dist/Sidebar-DQov7G-T.cjs.map +0 -1
  295. package/dist/Sidebar-DTqvtqAI.js +0 -477
  296. package/dist/Sidebar-DTqvtqAI.js.map +0 -1
  297. package/dist/messages-BOKick2l.js.map +0 -1
  298. package/dist/messages-Jxz2YMcA.cjs +0 -36
  299. package/dist/messages-Jxz2YMcA.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton-BoY2y_pV.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-DyRC514t.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,2 +1,2 @@
1
- "use strict";const c=require("react/jsx-runtime"),d=require("react"),_=require("clsx"),q=require("./ConfigProvider-BHNx-NHV.cjs"),i="_loader_qv0xq_2",u="_sm_qv0xq_16",m="_md_qv0xq_22",x="_lg_qv0xq_28",s={loader:i,"tz-loader-spin":"_tz-loader-spin_qv0xq_1",sm:u,md:m,lg:x},v=d.forwardRef(function({size:o="md",color:e,className:t,style:r,...a},l){const n=q.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=v;
2
- //# sourceMappingURL=Loader-Cwb1bOHj.cjs.map
1
+ "use strict";const c=require("react/jsx-runtime"),d=require("react"),_=require("clsx"),q=require("./ConfigProvider-h1WoGC3R.cjs"),i="_loader_qv0xq_2",u="_sm_qv0xq_16",m="_md_qv0xq_22",x="_lg_qv0xq_28",s={loader:i,"tz-loader-spin":"_tz-loader-spin_qv0xq_1",sm:u,md:m,lg:x},v=d.forwardRef(function({size:o="md",color:e,className:t,style:r,...a},l){const n=q.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=v;
2
+ //# sourceMappingURL=Loader-B45H2SMP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Loader-Cwb1bOHj.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-B45H2SMP.cjs","sources":["../src/components/Loader/Loader.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport styles from './Loader.module.css'\n\nexport type LoaderSize = 'sm' | 'md' | 'lg'\n\nexport interface LoaderProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {\n /** Preset size — matches the Icon sizes: `sm` 14px · `md` 18px · `lg` 22px. Defaults to `md`. */\n size?: LoaderSize\n /** Theme palette token used to color the spinner. Omit to inherit the surrounding text color (`currentColor`). */\n color?: ThemeColor\n}\n\n/**\n * A circular spinner. Works standalone as a loading indicator or inside a\n * `Button`, where it inherits the button color via `currentColor` unless an\n * explicit `color` is given.\n */\nexport const Loader = forwardRef<HTMLSpanElement, LoaderProps>(function Loader(\n { size = 'md', color, className, style, ...props },\n ref,\n) {\n const t = useT()\n return (\n <span\n ref={ref}\n role=\"status\"\n aria-label={t('loader.label')}\n {...props}\n className={clsx(styles.loader, styles[size], className)}\n style={color ? ({ color: `var(--tz-color-${color})`, ...style } as CSSProperties) : style}\n />\n )\n})\n"],"names":["Loader","forwardRef","size","color","className","style","props","ref","t","useT","jsx","clsx","styles"],"mappings":"gRAmBaA,EAASC,EAAAA,WAAyC,SAC7D,CAAE,KAAAC,EAAO,KAAM,MAAAC,EAAO,UAAAC,EAAW,MAAAC,EAAO,GAAGC,CAAA,EAC3CC,EACA,CACA,MAAMC,EAAIC,EAAAA,KAAA,EACV,OACEC,EAAAA,IAAC,OAAA,CACC,IAAAH,EACA,KAAK,SACL,aAAYC,EAAE,cAAc,EAC3B,GAAGF,EACJ,UAAWK,EAAAA,KAAKC,EAAO,OAAQA,EAAOV,CAAI,EAAGE,CAAS,EACtD,MAAOD,EAAS,CAAE,MAAO,kBAAkBA,CAAK,IAAK,GAAGE,GAA4BA,CAAA,CAAA,CAG1F,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _ } from "react/jsx-runtime";
2
2
  import { forwardRef as d } from "react";
3
3
  import { clsx as n } from "clsx";
4
- import { a as c } from "./ConfigProvider-BYruQYHC.js";
4
+ import { a as c } from "./ConfigProvider-DDuIJSM7.js";
5
5
  const q = "_loader_qv0xq_2", i = "_sm_qv0xq_16", p = "_md_qv0xq_22", x = "_lg_qv0xq_28", s = {
6
6
  loader: q,
7
7
  "tz-loader-spin": "_tz-loader-spin_qv0xq_1",
@@ -25,4 +25,4 @@ const q = "_loader_qv0xq_2", i = "_sm_qv0xq_16", p = "_md_qv0xq_22", x = "_lg_qv
25
25
  export {
26
26
  L
27
27
  };
28
- //# sourceMappingURL=Loader-UzzqvFyo.js.map
28
+ //# sourceMappingURL=Loader-B9VXX401.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Loader-UzzqvFyo.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-B9VXX401.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 r=require("react/jsx-runtime"),l=require("react"),A=require("clsx"),Q=require("./names-C2Yj1p3u.cjs"),L=require("./Icon-CXTl_QAP.cjs"),$=require("./IconButton-BoY2y_pV.cjs"),W=require("react-dom"),X=require("./useLockBodyScroll-CIXHZo-Q.cjs"),Y=require("./ConfigProvider-BHNx-NHV.cjs"),Z="_overlay_gwv2a_6",w={overlay:Z},H=l.forwardRef(function({open:a,onClose:s,closeOnBackdrop:k=!0,closeOnEscape:g=!0,lockScroll:N=!0,dim:c,className:i,style:d,children:q,onKeyDown:u,onMouseDown:_,onClick:x,...I},T){const j=l.useRef(null),[E,m]=l.useState(!1);X.useLockBodyScroll(a&&N),l.useEffect(()=>{if(!a){m(!1);return}const e=requestAnimationFrame(()=>m(!0));return()=>cancelAnimationFrame(e)},[a]);const D=e=>{e.key==="Escape"&&(e.stopPropagation(),g&&(s==null||s())),u==null||u(e)},h=e=>{j.current=e.target,_==null||_(e)},R=e=>{k&&e.target===e.currentTarget&&j.current===e.currentTarget&&(s==null||s()),x==null||x(e)};return!a||typeof document>"u"?null:W.createPortal(r.jsx("div",{ref:T,className:A.clsx(w.overlay,i),"data-open":E?"true":"false",style:c!=null?{"--tz-overlay-dim":c,...d}:d,onKeyDown:D,onMouseDown:h,onClick:R,...I,children:q}),document.body)}),C="_overlay_1d22k_3",ee="_modal_1d22k_14",te="_sm_1d22k_37",re="_md_1d22k_40",ne="_lg_1d22k_43",le="_fullScreen_1d22k_46",ae="_header_1d22k_58",se="_headerDivided_1d22k_67",ce="_headerMain_1d22k_70",de="_icon_1d22k_77",oe="_headerText_1d22k_80",ie="_title_1d22k_87",ue="_subtitle_1d22k_99",fe="_close_1d22k_111",_e="_body_1d22k_116",me="_footer_1d22k_124",n={overlay:C,modal:ee,sm:te,md:re,lg:ne,fullScreen:le,header:ae,headerDivided:se,headerMain:ce,icon:de,headerText:oe,title:ie,subtitle:ue,close:fe,body:_e,footer:me},he=new Set(Q.ICON_NAMES),S='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=l.forwardRef(function({open:a,onClose:s,size:k="md",scrollBehavior:g="outside",placement:N="center",title:c,description:i,icon:d,color:q="accent",footer:u,showCloseButton:_=!0,closeOnBackdrop:x=!0,closeOnEscape:I=!0,ariaLabel:T,className:j,style:E,children:m,...D},h){const R=Y.useT(),e=l.useRef(null),O=l.useRef(null),B=l.useRef(null),P=l.useId(),p=l.useId();l.useEffect(()=>{var f,y,v;if(!a)return;const t=document.activeElement,o=((f=O.current)==null?void 0:f.querySelector(S))??((y=B.current)==null?void 0:y.querySelector(S))??((v=e.current)==null?void 0:v.querySelector(S))??e.current;return o==null||o.focus({preventScroll:!0}),()=>{var b;t!=null&&t.isConnected&&((b=t.focus)==null||b.call(t))}},[a]);const U=t=>{e.current=t,typeof h=="function"?h(t):h&&(h.current=t)},V=t=>{if(t.key!=="Tab")return;const o=e.current;if(!o)return;const f=[...o.querySelectorAll(S)].filter(z=>z.offsetParent!==null||z===document.activeElement);if(f.length===0){t.preventDefault(),o.focus();return}const y=f[0],v=f[f.length-1],b=document.activeElement;t.shiftKey&&(b===y||b===o)?(t.preventDefault(),v.focus()):!t.shiftKey&&b===v&&(t.preventDefault(),y.focus())};if(!a)return null;const F=N!=="center",M=d==null?null:typeof d=="string"&&he.has(d)?r.jsx(L.Icon,{name:d}):d,G=c!=null||i!=null||M!=null||_,J=m!=null||u!=null;return r.jsx(H,{open:a,onClose:s,closeOnBackdrop:x,closeOnEscape:I,onKeyDown:V,className:n.overlay,"data-size":k,"data-placement":N,"data-scroll":F?"inside":g,children:r.jsxs("div",{ref:U,className:A.clsx(n.modal,n[k],j),role:"dialog","aria-modal":"true","aria-labelledby":c!=null?P:void 0,"aria-label":c==null?T:void 0,"aria-describedby":i!=null?p:void 0,tabIndex:-1,style:E,...D,children:[G&&r.jsxs("div",{className:A.clsx(n.header,J&&n.headerDivided),children:[r.jsxs("div",{className:n.headerMain,children:[M!=null&&r.jsx($.IconButton,{variant:"filled",size:"sm",color:q,nonClickable:!0,"aria-hidden":!0,className:n.icon,children:M}),(c!=null||i!=null)&&r.jsxs("div",{className:n.headerText,children:[c!=null&&r.jsx("div",{id:P,className:n.title,children:c}),i!=null&&r.jsx("div",{id:p,className:n.subtitle,children:i})]})]}),_&&r.jsx($.IconButton,{variant:"filled",color:"primary",size:"sm",className:n.close,"aria-label":R("common.close"),onClick:s,children:r.jsx(L.Icon,{name:"Close"})})]}),m!=null&&r.jsx("div",{ref:O,className:n.body,children:m}),u!=null&&r.jsx("div",{ref:B,className:n.footer,children:u})]})})});exports.Modal=be;exports.Overlay=H;
2
- //# sourceMappingURL=Modal-CO3c3sGY.cjs.map
1
+ "use strict";const r=require("react/jsx-runtime"),l=require("react"),A=require("clsx"),Q=require("./names-C2Yj1p3u.cjs"),L=require("./Icon-CXTl_QAP.cjs"),$=require("./IconButton-DyRC514t.cjs"),W=require("react-dom"),X=require("./useLockBodyScroll-CIXHZo-Q.cjs"),Y=require("./ConfigProvider-h1WoGC3R.cjs"),Z="_overlay_gwv2a_6",w={overlay:Z},H=l.forwardRef(function({open:a,onClose:s,closeOnBackdrop:k=!0,closeOnEscape:g=!0,lockScroll:N=!0,dim:c,className:i,style:d,children:q,onKeyDown:u,onMouseDown:_,onClick:x,...I},T){const j=l.useRef(null),[E,m]=l.useState(!1);X.useLockBodyScroll(a&&N),l.useEffect(()=>{if(!a){m(!1);return}const e=requestAnimationFrame(()=>m(!0));return()=>cancelAnimationFrame(e)},[a]);const D=e=>{e.key==="Escape"&&(e.stopPropagation(),g&&(s==null||s())),u==null||u(e)},h=e=>{j.current=e.target,_==null||_(e)},R=e=>{k&&e.target===e.currentTarget&&j.current===e.currentTarget&&(s==null||s()),x==null||x(e)};return!a||typeof document>"u"?null:W.createPortal(r.jsx("div",{ref:T,className:A.clsx(w.overlay,i),"data-open":E?"true":"false",style:c!=null?{"--tz-overlay-dim":c,...d}:d,onKeyDown:D,onMouseDown:h,onClick:R,...I,children:q}),document.body)}),C="_overlay_1d22k_3",ee="_modal_1d22k_14",te="_sm_1d22k_37",re="_md_1d22k_40",ne="_lg_1d22k_43",le="_fullScreen_1d22k_46",ae="_header_1d22k_58",se="_headerDivided_1d22k_67",ce="_headerMain_1d22k_70",de="_icon_1d22k_77",oe="_headerText_1d22k_80",ie="_title_1d22k_87",ue="_subtitle_1d22k_99",fe="_close_1d22k_111",_e="_body_1d22k_116",me="_footer_1d22k_124",n={overlay:C,modal:ee,sm:te,md:re,lg:ne,fullScreen:le,header:ae,headerDivided:se,headerMain:ce,icon:de,headerText:oe,title:ie,subtitle:ue,close:fe,body:_e,footer:me},he=new Set(Q.ICON_NAMES),S='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=l.forwardRef(function({open:a,onClose:s,size:k="md",scrollBehavior:g="outside",placement:N="center",title:c,description:i,icon:d,color:q="accent",footer:u,showCloseButton:_=!0,closeOnBackdrop:x=!0,closeOnEscape:I=!0,ariaLabel:T,className:j,style:E,children:m,...D},h){const R=Y.useT(),e=l.useRef(null),O=l.useRef(null),B=l.useRef(null),P=l.useId(),p=l.useId();l.useEffect(()=>{var f,y,v;if(!a)return;const t=document.activeElement,o=((f=O.current)==null?void 0:f.querySelector(S))??((y=B.current)==null?void 0:y.querySelector(S))??((v=e.current)==null?void 0:v.querySelector(S))??e.current;return o==null||o.focus({preventScroll:!0}),()=>{var b;t!=null&&t.isConnected&&((b=t.focus)==null||b.call(t))}},[a]);const U=t=>{e.current=t,typeof h=="function"?h(t):h&&(h.current=t)},V=t=>{if(t.key!=="Tab")return;const o=e.current;if(!o)return;const f=[...o.querySelectorAll(S)].filter(z=>z.offsetParent!==null||z===document.activeElement);if(f.length===0){t.preventDefault(),o.focus();return}const y=f[0],v=f[f.length-1],b=document.activeElement;t.shiftKey&&(b===y||b===o)?(t.preventDefault(),v.focus()):!t.shiftKey&&b===v&&(t.preventDefault(),y.focus())};if(!a)return null;const F=N!=="center",M=d==null?null:typeof d=="string"&&he.has(d)?r.jsx(L.Icon,{name:d}):d,G=c!=null||i!=null||M!=null||_,J=m!=null||u!=null;return r.jsx(H,{open:a,onClose:s,closeOnBackdrop:x,closeOnEscape:I,onKeyDown:V,className:n.overlay,"data-size":k,"data-placement":N,"data-scroll":F?"inside":g,children:r.jsxs("div",{ref:U,className:A.clsx(n.modal,n[k],j),role:"dialog","aria-modal":"true","aria-labelledby":c!=null?P:void 0,"aria-label":c==null?T:void 0,"aria-describedby":i!=null?p:void 0,tabIndex:-1,style:E,...D,children:[G&&r.jsxs("div",{className:A.clsx(n.header,J&&n.headerDivided),children:[r.jsxs("div",{className:n.headerMain,children:[M!=null&&r.jsx($.IconButton,{variant:"filled",size:"sm",color:q,nonClickable:!0,"aria-hidden":!0,className:n.icon,children:M}),(c!=null||i!=null)&&r.jsxs("div",{className:n.headerText,children:[c!=null&&r.jsx("div",{id:P,className:n.title,children:c}),i!=null&&r.jsx("div",{id:p,className:n.subtitle,children:i})]})]}),_&&r.jsx($.IconButton,{variant:"filled",color:"primary",size:"sm",className:n.close,"aria-label":R("common.close"),onClick:s,children:r.jsx(L.Icon,{name:"Close"})})]}),m!=null&&r.jsx("div",{ref:O,className:n.body,children:m}),u!=null&&r.jsx("div",{ref:B,className:n.footer,children:u})]})})});exports.Modal=be;exports.Overlay=H;
2
+ //# sourceMappingURL=Modal-DsoSz0Sp.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal-CO3c3sGY.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 /** 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 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={styles.body}>\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","showCloseButton","ariaLabel","forwardedRef","t","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,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Aa,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,EACCI,GACCf,EAAAA,IAAC8C,EAAAA,WAAA,CACC,QAAQ,SACR,MAAM,UACN,KAAK,KACL,UAAW5C,EAAO,MAClB,aAAYgB,EAAE,cAAc,EAC5B,QAAS5C,EAET,SAAA0B,EAAAA,IAAC0C,EAAAA,KAAA,CAAK,KAAK,OAAA,CAAQ,CAAA,CAAA,CACrB,EAEJ,EAED7D,GAAY,MACXmB,MAAC,MAAA,CAAI,IAAKqB,EAAS,UAAWnB,EAAO,KAClC,SAAArB,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-DsoSz0Sp.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 /** 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 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={styles.body}>\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","showCloseButton","ariaLabel","forwardedRef","t","useT","panelRef","bodyRef","footerRef","titleId","useId","descId","previouslyFocused","target","_a","_b","_c","setPanelRef","node","handleTabTrap","panel","focusables","el","first","last","active","isDrawer","renderedIcon","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4
4
  import { a as Z } from "./names-D8ABK2Wk.js";
5
5
  import { I as H } from "./Icon-CophpkHo.js";
6
- import { I as K } from "./IconButton-B8FPGgDn.js";
6
+ import { I as K } from "./IconButton-DpTxmj3d.js";
7
7
  import { createPortal as w } from "react-dom";
8
8
  import { u as C } from "./useLockBodyScroll-DwBILLPK.js";
9
- import { a as ee } from "./ConfigProvider-BYruQYHC.js";
9
+ import { a as ee } from "./ConfigProvider-DDuIJSM7.js";
10
10
  const te = "_overlay_gwv2a_6", ae = {
11
11
  overlay: te
12
12
  }, re = U(function({
@@ -192,4 +192,4 @@ export {
192
192
  Ae as M,
193
193
  re as O
194
194
  };
195
- //# sourceMappingURL=Modal-XMRDPHvQ.js.map
195
+ //# sourceMappingURL=Modal-Us_E-lb2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal-XMRDPHvQ.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 /** 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 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={styles.body}>\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","showCloseButton","ariaLabel","forwardedRef","t","useT","panelRef","bodyRef","footerRef","titleId","useId","descId","previouslyFocused","target","_a","_b","_c","setPanelRef","node","handleTabTrap","panel","focusables","el","first","last","active","isDrawer","renderedIcon","Icon","hasHeader","headerDivided","jsxs","IconButton"],"mappings":";;;;;;;;;;;GA4CaA,KAAUC,EAAyC,SAC9D;AAAA,EACE,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,eAAAC,IAAgB;AAAA,EAChB,YAAAC,IAAa;AAAA,EACb,KAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAkBC,EAA2B,IAAI,GACjD,CAACC,GAASC,CAAU,IAAIC,EAAS,EAAK;AAE5C,EAAAC,EAAkBnB,KAAQI,CAAU,GAGp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AO,MAClC,UAAArB,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-Us_E-lb2.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 /** 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 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={styles.body}>\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","showCloseButton","ariaLabel","forwardedRef","t","useT","panelRef","bodyRef","footerRef","titleId","useId","descId","previouslyFocused","target","_a","_b","_c","setPanelRef","node","handleTabTrap","panel","focusables","el","first","last","active","isDrawer","renderedIcon","Icon","hasHeader","headerDivided","jsxs","IconButton"],"mappings":";;;;;;;;;;;GA4CaA,KAAUC,EAAyC,SAC9D;AAAA,EACE,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,eAAAC,IAAgB;AAAA,EAChB,YAAAC,IAAa;AAAA,EACb,KAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAkBC,EAA2B,IAAI,GACjD,CAACC,GAASC,CAAU,IAAIC,EAAS,EAAK;AAE5C,EAAAC,EAAkBnB,KAAQI,CAAU,GAGpCgB,EAAU,MAAM;AACd,QAAI,CAACpB,GAAM;AACT,MAAAiB,EAAW,EAAK;AAChB;AAAA,IACF;AACA,UAAMI,IAAM,sBAAsB,MAAMJ,EAAW,EAAI,CAAC;AACxD,WAAO,MAAM,qBAAqBI,CAAG;AAAA,EACvC,GAAG,CAACrB,CAAI,CAAC;AAET,QAAMsB,IAAgB,CAACC,MAAyC;AAC9D,IAAIA,EAAM,QAAQ,aAGhBA,EAAM,gBAAA,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WrqdEV.cjs"),De=require("./FloatingPanel-U6sGYiSK.cjs"),Ne=require("./Chip-B2lY4TJ0.cjs"),E=require("./Icon-CXTl_QAP.cjs"),qe=require("./List-ChXO0Hz-.cjs"),Le=require("./ListItem-DWQorRxG.cjs"),Te=require("./Loader-Cwb1bOHj.cjs"),M=require("./Typography-BFatE1_A.cjs"),Ce=require("./ConfigProvider-BHNx-NHV.cjs"),Re="_field_16ykc_1",Ee="_fullWidth_16ykc_7",Me="_label_16ykc_12",Se="_required_16ykc_21",Be="_control_16ykc_27",Pe="_filled_16ykc_47",Ke="_open_16ykc_51",Ve="_error_16ykc_56",We="_disabled_16ykc_64",$e="_chips_16ykc_31",Ae="_value_16ykc_84",Fe="_valueLabel_16ykc_91",Oe="_placeholder_16ykc_96",He="_clear_16ykc_100",Qe="_chevron_16ykc_117",Ue="_sm_16ykc_127",ze="_md_16ykc_131",Ge="_lg_16ykc_135",Je="_helper_16ykc_140",Xe="_popover_16ykc_145",Ye="_search_16ykc_152",Ze="_searchIcon_16ykc_161",es="_searchInput_16ykc_165",ss="_listbox_16ykc_180",ts="_active_16ykc_188",rs="_noOptions_16ykc_192",ls="_loading_16ykc_198",r={field:Re,fullWidth:Ee,label:Me,required:Se,control:Be,filled:Pe,open:Ke,error:Ve,disabled:We,chips:$e,value:Ae,valueLabel:Fe,placeholder:Oe,clear:He,chevron:Qe,sm:Ue,md:ze,lg:Ge,helper:Je,popover:Xe,search:Ye,searchIcon:Ze,searchInput:es,listbox:ss,active:ts,noOptions:rs,loading:ls},cs=o.forwardRef(function({label:w,options:D,size:b="md",error:ce,helperText:oe,required:Q=!1,fullWidth:ae=!0,disabled:p=!1,value:S,defaultValue:ne,onChange:B,placeholder:ie,color:ue="primary",clearable:de=!0,searchable:d=!1,searchPlaceholder:fe,onSearchChange:k,loading:pe=!1,loadingText:he,noOptionsText:N,name:_,id:me,className:_e,style:ye},x){const ve=o.useId(),g=me??ve,P=`${g}-label`,K=`${g}-listbox`,U=`${g}-helper`,V=e=>`${g}-opt-${e}`,I=Ce.useT(),z=fe??I("common.search"),q=we.useFormContext(),L=!!(q&&_),n=L?q.field(_):void 0,be=S!==void 0?S:L?q.values[_]??[]:void 0,G=S!==void 0||L,[ke,xe]=o.useState(ne??[]),i=G?be:ke,W=ce??(n==null?void 0:n.error)??!1,$=oe??(n==null?void 0:n.helperText),A=e=>{G||xe(e),L&&q.setValue(_,e),B==null||B(e)},y=o.useRef(null),J=o.useRef(null),F=o.useRef({buffer:"",timer:0}),T=o.useRef(void 0);T.current=n?()=>n.onBlur({}):void 0;const[l,X]=o.useState(!1),[m,Y]=o.useState(""),[h,f]=o.useState(-1),ge=o.useCallback(e=>{y.current=e,typeof x=="function"?x(e):x&&(x.current=e)},[x]),a=o.useMemo(()=>{if(!d||k||!m.trim())return D;const e=m.trim().toLowerCase();return D.filter(s=>s.label.toLowerCase().includes(e))},[d,k,m,D]),v=o.useCallback((e,s)=>{let c=e;for(;c>=0&&c<a.length;){if(!a[c].disabled)return c;c+=s}return-1},[a]),Z=o.useRef(null),C=o.useCallback(e=>{var s,c;X(!1),Y(""),window.clearTimeout(F.current.timer),F.current.buffer="",(s=T.current)==null||s.call(T),e&&((c=y.current)==null||c.focus())},[]);o.useEffect(()=>{l&&(f(v(0,1)),d&&requestAnimationFrame(()=>{var e;return(e=J.current)==null?void 0:e.focus()}))},[l]),o.useEffect(()=>{var e,s;!l||h<0||(s=(e=document.getElementById(V(h)))==null?void 0:e.scrollIntoView)==null||s.call(e,{block:"nearest"})},[l,h]),o.useEffect(()=>{l&&d&&f(v(0,1))},[m]),o.useEffect(()=>{l&&f(e=>e<a.length?e:v(0,1))},[a.length]);const j=()=>{p||X(!0)},O=e=>{!e||e.disabled||A(i.includes(e.value)?i.filter(s=>s!==e.value):[...i,e.value])},ee=e=>A(i.filter(s=>s!==e)),se=e=>{f(s=>{const c=s<0?e>0?0:a.length-1:s+e,u=v(c,e);return u===-1?s:u})},Ie=e=>{const s=F.current;window.clearTimeout(s.timer),s.buffer+=e.toLowerCase(),s.timer=window.setTimeout(()=>s.buffer="",500);const c=a.findIndex(u=>!u.disabled&&u.label.toLowerCase().startsWith(s.buffer));c>=0&&f(c)},te=e=>{if(!p)switch(e.key){case"ArrowDown":e.preventDefault(),l?se(1):j();break;case"ArrowUp":e.preventDefault(),l?se(-1):j();break;case"Enter":e.preventDefault(),l?O(a[h]):j();break;case" ":l?d||(e.preventDefault(),O(a[h])):(e.preventDefault(),j());break;case"Escape":l&&(e.preventDefault(),e.stopPropagation(),C(!0));break;case"Tab":l&&C(!0);break;case"Backspace":l&&(!d||m==="")&&i.length>0&&(e.preventDefault(),ee(i[i.length-1]));break;case"Home":l&&(e.preventDefault(),f(v(0,1)));break;case"End":l&&(e.preventDefault(),f(v(a.length-1,-1)));break;default:!d&&l&&e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&Ie(e.key)}},je=e=>{var c,u;const s=e.relatedTarget;s&&((c=Z.current)!=null&&c.contains(s)||(u=y.current)!=null&&u.contains(s))||n==null||n.onBlur(e)},re=l&&h>=0?V(h):void 0,le=b==="sm"?16:b==="md"?14:12,H=i.length>0;return t.jsxs("div",{className:R.clsx(r.field,r[b],ae&&r.fullWidth,W&&r.error,p&&r.disabled,_e),style:ye,children:[w!=null&&t.jsxs("span",{id:P,className:r.label,onClick:()=>{var e;return!p&&((e=y.current)==null?void 0:e.focus())},children:[t.jsx(M.Typography,{as:"span",variant:"bodySmall",color:"muted",children:w}),Q&&t.jsx("span",{className:r.required,"aria-hidden":"true",children:"*"})]}),t.jsxs("div",{ref:ge,id:g,..._?{name:_}:{},role:"combobox",tabIndex:p?-1:0,"aria-haspopup":"listbox","aria-expanded":l,"aria-controls":l?K:void 0,"aria-activedescendant":d?void 0:re,"aria-labelledby":w!=null?P:void 0,"aria-disabled":p||void 0,"aria-required":Q||void 0,"aria-invalid":W||void 0,"aria-describedby":$!=null?U:void 0,className:R.clsx(r.control,l&&r.open,H&&r.filled),onClick:()=>l?C(!1):j(),onKeyDown:te,onBlur:je,children:[H?t.jsx("span",{className:r.chips,children:i.map(e=>{const s=D.find(c=>c.value===e);return t.jsx(Ne.Chip,{size:b,color:ue,disabled:p,onDelete:()=>ee(e),deleteLabel:`Remove ${(s==null?void 0:s.label)??e}`,deleteTabIndex:-1,children:(s==null?void 0:s.label)??e},e)})}):t.jsx("span",{className:R.clsx(r.value,r.placeholder),children:t.jsx("span",{className:r.valueLabel,children:ie??I("select.placeholder")})}),de&&H&&!p&&t.jsx("button",{type:"button",className:r.clear,"aria-label":I("multiSelect.clearAll"),tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:e=>{var s;e.stopPropagation(),A([]),(s=y.current)==null||s.focus()},children:t.jsx(E.Icon,{name:"CloseCircle",size:"sm"})}),t.jsx(E.Icon,{name:"ArrowDown4",className:r.chevron,style:{width:le,height:le},"aria-hidden":"true"})]}),t.jsxs(De.FloatingPanel,{ref:Z,open:l,triggerRef:y,onClose:C,matchTriggerWidth:!0,className:r.popover,children:[d&&t.jsxs("div",{className:r.search,children:[t.jsx(E.Icon,{name:"SearchNormal",size:"sm",className:r.searchIcon,"aria-hidden":"true"}),t.jsx("input",{ref:J,className:r.searchInput,type:"text",role:"combobox","aria-expanded":"true","aria-controls":K,"aria-activedescendant":re,"aria-autocomplete":"list","aria-label":z,placeholder:z,value:m,spellCheck:!1,onChange:e=>{Y(e.target.value),k==null||k(e.target.value)},onKeyDown:te})]}),t.jsx(qe.List,{role:"listbox",id:K,"aria-labelledby":w!=null?P:void 0,"aria-multiselectable":"true",size:b,className:r.listbox,onMouseLeave:()=>f(-1),children:pe?t.jsxs("div",{className:r.loading,children:[t.jsx(Te.Loader,{size:"sm"}),t.jsx(M.Typography,{as:"span",variant:"bodySmall",color:"muted",children:he??I("common.loading")})]}):a.length===0?t.jsx("div",{className:r.noOptions,children:t.jsx(M.Typography,{as:"span",variant:"bodySmall",color:"muted",children:N==null?I("select.noOptions"):typeof N=="function"?N(m):N})}):a.map((e,s)=>{const c=i.includes(e.value);return t.jsx(Le.ListItem,{id:V(s),role:"option",tabIndex:-1,"aria-selected":c,"aria-current":void 0,clickable:!0,selected:c,disabled:e.disabled,icon:e.icon,className:R.clsx(s===h&&r.active),trailing:c?t.jsx(E.Icon,{name:"TickCircle",size:"sm"}):void 0,onMouseEnter:()=>!e.disabled&&f(s),onMouseDown:u=>u.preventDefault(),onClick:()=>O(e),children:e.label},e.value)})})]}),$!=null&&t.jsx(M.Typography,{as:"span",id:U,variant:"bodySmall",color:W?"error":"muted",className:r.helper,children:$})]})});exports.MultiSelect=cs;
2
- //# sourceMappingURL=MultiSelect-DVOVHuIm.cjs.map
1
+ "use strict";const t=require("react/jsx-runtime"),o=require("react"),R=require("clsx"),we=require("./formContext-bTWrqdEV.cjs"),De=require("./FloatingPanel-U6sGYiSK.cjs"),Ne=require("./Chip-CJuAvgst.cjs"),E=require("./Icon-CXTl_QAP.cjs"),qe=require("./List-ChXO0Hz-.cjs"),Le=require("./ListItem-DWQorRxG.cjs"),Te=require("./Loader-B45H2SMP.cjs"),M=require("./Typography-BFatE1_A.cjs"),Ce=require("./ConfigProvider-h1WoGC3R.cjs"),Re="_field_16ykc_1",Ee="_fullWidth_16ykc_7",Me="_label_16ykc_12",Se="_required_16ykc_21",Be="_control_16ykc_27",Pe="_filled_16ykc_47",Ke="_open_16ykc_51",Ve="_error_16ykc_56",We="_disabled_16ykc_64",$e="_chips_16ykc_31",Ae="_value_16ykc_84",Fe="_valueLabel_16ykc_91",Oe="_placeholder_16ykc_96",He="_clear_16ykc_100",Qe="_chevron_16ykc_117",Ue="_sm_16ykc_127",ze="_md_16ykc_131",Ge="_lg_16ykc_135",Je="_helper_16ykc_140",Xe="_popover_16ykc_145",Ye="_search_16ykc_152",Ze="_searchIcon_16ykc_161",es="_searchInput_16ykc_165",ss="_listbox_16ykc_180",ts="_active_16ykc_188",rs="_noOptions_16ykc_192",ls="_loading_16ykc_198",r={field:Re,fullWidth:Ee,label:Me,required:Se,control:Be,filled:Pe,open:Ke,error:Ve,disabled:We,chips:$e,value:Ae,valueLabel:Fe,placeholder:Oe,clear:He,chevron:Qe,sm:Ue,md:ze,lg:Ge,helper:Je,popover:Xe,search:Ye,searchIcon:Ze,searchInput:es,listbox:ss,active:ts,noOptions:rs,loading:ls},cs=o.forwardRef(function({label:w,options:D,size:b="md",error:ce,helperText:oe,required:Q=!1,fullWidth:ae=!0,disabled:p=!1,value:S,defaultValue:ne,onChange:B,placeholder:ie,color:ue="primary",clearable:de=!0,searchable:d=!1,searchPlaceholder:fe,onSearchChange:k,loading:pe=!1,loadingText:he,noOptionsText:N,name:_,id:me,className:_e,style:ye},x){const ve=o.useId(),g=me??ve,P=`${g}-label`,K=`${g}-listbox`,U=`${g}-helper`,V=e=>`${g}-opt-${e}`,I=Ce.useT(),z=fe??I("common.search"),q=we.useFormContext(),L=!!(q&&_),n=L?q.field(_):void 0,be=S!==void 0?S:L?q.values[_]??[]:void 0,G=S!==void 0||L,[ke,xe]=o.useState(ne??[]),i=G?be:ke,W=ce??(n==null?void 0:n.error)??!1,$=oe??(n==null?void 0:n.helperText),A=e=>{G||xe(e),L&&q.setValue(_,e),B==null||B(e)},y=o.useRef(null),J=o.useRef(null),F=o.useRef({buffer:"",timer:0}),T=o.useRef(void 0);T.current=n?()=>n.onBlur({}):void 0;const[l,X]=o.useState(!1),[m,Y]=o.useState(""),[h,f]=o.useState(-1),ge=o.useCallback(e=>{y.current=e,typeof x=="function"?x(e):x&&(x.current=e)},[x]),a=o.useMemo(()=>{if(!d||k||!m.trim())return D;const e=m.trim().toLowerCase();return D.filter(s=>s.label.toLowerCase().includes(e))},[d,k,m,D]),v=o.useCallback((e,s)=>{let c=e;for(;c>=0&&c<a.length;){if(!a[c].disabled)return c;c+=s}return-1},[a]),Z=o.useRef(null),C=o.useCallback(e=>{var s,c;X(!1),Y(""),window.clearTimeout(F.current.timer),F.current.buffer="",(s=T.current)==null||s.call(T),e&&((c=y.current)==null||c.focus())},[]);o.useEffect(()=>{l&&(f(v(0,1)),d&&requestAnimationFrame(()=>{var e;return(e=J.current)==null?void 0:e.focus()}))},[l]),o.useEffect(()=>{var e,s;!l||h<0||(s=(e=document.getElementById(V(h)))==null?void 0:e.scrollIntoView)==null||s.call(e,{block:"nearest"})},[l,h]),o.useEffect(()=>{l&&d&&f(v(0,1))},[m]),o.useEffect(()=>{l&&f(e=>e<a.length?e:v(0,1))},[a.length]);const j=()=>{p||X(!0)},O=e=>{!e||e.disabled||A(i.includes(e.value)?i.filter(s=>s!==e.value):[...i,e.value])},ee=e=>A(i.filter(s=>s!==e)),se=e=>{f(s=>{const c=s<0?e>0?0:a.length-1:s+e,u=v(c,e);return u===-1?s:u})},Ie=e=>{const s=F.current;window.clearTimeout(s.timer),s.buffer+=e.toLowerCase(),s.timer=window.setTimeout(()=>s.buffer="",500);const c=a.findIndex(u=>!u.disabled&&u.label.toLowerCase().startsWith(s.buffer));c>=0&&f(c)},te=e=>{if(!p)switch(e.key){case"ArrowDown":e.preventDefault(),l?se(1):j();break;case"ArrowUp":e.preventDefault(),l?se(-1):j();break;case"Enter":e.preventDefault(),l?O(a[h]):j();break;case" ":l?d||(e.preventDefault(),O(a[h])):(e.preventDefault(),j());break;case"Escape":l&&(e.preventDefault(),e.stopPropagation(),C(!0));break;case"Tab":l&&C(!0);break;case"Backspace":l&&(!d||m==="")&&i.length>0&&(e.preventDefault(),ee(i[i.length-1]));break;case"Home":l&&(e.preventDefault(),f(v(0,1)));break;case"End":l&&(e.preventDefault(),f(v(a.length-1,-1)));break;default:!d&&l&&e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&Ie(e.key)}},je=e=>{var c,u;const s=e.relatedTarget;s&&((c=Z.current)!=null&&c.contains(s)||(u=y.current)!=null&&u.contains(s))||n==null||n.onBlur(e)},re=l&&h>=0?V(h):void 0,le=b==="sm"?16:b==="md"?14:12,H=i.length>0;return t.jsxs("div",{className:R.clsx(r.field,r[b],ae&&r.fullWidth,W&&r.error,p&&r.disabled,_e),style:ye,children:[w!=null&&t.jsxs("span",{id:P,className:r.label,onClick:()=>{var e;return!p&&((e=y.current)==null?void 0:e.focus())},children:[t.jsx(M.Typography,{as:"span",variant:"bodySmall",color:"muted",children:w}),Q&&t.jsx("span",{className:r.required,"aria-hidden":"true",children:"*"})]}),t.jsxs("div",{ref:ge,id:g,..._?{name:_}:{},role:"combobox",tabIndex:p?-1:0,"aria-haspopup":"listbox","aria-expanded":l,"aria-controls":l?K:void 0,"aria-activedescendant":d?void 0:re,"aria-labelledby":w!=null?P:void 0,"aria-disabled":p||void 0,"aria-required":Q||void 0,"aria-invalid":W||void 0,"aria-describedby":$!=null?U:void 0,className:R.clsx(r.control,l&&r.open,H&&r.filled),onClick:()=>l?C(!1):j(),onKeyDown:te,onBlur:je,children:[H?t.jsx("span",{className:r.chips,children:i.map(e=>{const s=D.find(c=>c.value===e);return t.jsx(Ne.Chip,{size:b,color:ue,disabled:p,onDelete:()=>ee(e),deleteLabel:`Remove ${(s==null?void 0:s.label)??e}`,deleteTabIndex:-1,children:(s==null?void 0:s.label)??e},e)})}):t.jsx("span",{className:R.clsx(r.value,r.placeholder),children:t.jsx("span",{className:r.valueLabel,children:ie??I("select.placeholder")})}),de&&H&&!p&&t.jsx("button",{type:"button",className:r.clear,"aria-label":I("multiSelect.clearAll"),tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:e=>{var s;e.stopPropagation(),A([]),(s=y.current)==null||s.focus()},children:t.jsx(E.Icon,{name:"CloseCircle",size:"sm"})}),t.jsx(E.Icon,{name:"ArrowDown4",className:r.chevron,style:{width:le,height:le},"aria-hidden":"true"})]}),t.jsxs(De.FloatingPanel,{ref:Z,open:l,triggerRef:y,onClose:C,matchTriggerWidth:!0,className:r.popover,children:[d&&t.jsxs("div",{className:r.search,children:[t.jsx(E.Icon,{name:"SearchNormal",size:"sm",className:r.searchIcon,"aria-hidden":"true"}),t.jsx("input",{ref:J,className:r.searchInput,type:"text",role:"combobox","aria-expanded":"true","aria-controls":K,"aria-activedescendant":re,"aria-autocomplete":"list","aria-label":z,placeholder:z,value:m,spellCheck:!1,onChange:e=>{Y(e.target.value),k==null||k(e.target.value)},onKeyDown:te})]}),t.jsx(qe.List,{role:"listbox",id:K,"aria-labelledby":w!=null?P:void 0,"aria-multiselectable":"true",size:b,className:r.listbox,onMouseLeave:()=>f(-1),children:pe?t.jsxs("div",{className:r.loading,children:[t.jsx(Te.Loader,{size:"sm"}),t.jsx(M.Typography,{as:"span",variant:"bodySmall",color:"muted",children:he??I("common.loading")})]}):a.length===0?t.jsx("div",{className:r.noOptions,children:t.jsx(M.Typography,{as:"span",variant:"bodySmall",color:"muted",children:N==null?I("select.noOptions"):typeof N=="function"?N(m):N})}):a.map((e,s)=>{const c=i.includes(e.value);return t.jsx(Le.ListItem,{id:V(s),role:"option",tabIndex:-1,"aria-selected":c,"aria-current":void 0,clickable:!0,selected:c,disabled:e.disabled,icon:e.icon,className:R.clsx(s===h&&r.active),trailing:c?t.jsx(E.Icon,{name:"TickCircle",size:"sm"}):void 0,onMouseEnter:()=>!e.disabled&&f(s),onMouseDown:u=>u.preventDefault(),onClick:()=>O(e),children:e.label},e.value)})})]}),$!=null&&t.jsx(M.Typography,{as:"span",id:U,variant:"bodySmall",color:W?"error":"muted",className:r.helper,children:$})]})});exports.MultiSelect=cs;
2
+ //# sourceMappingURL=MultiSelect-CtLpWaBX.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelect-DVOVHuIm.cjs","sources":["../src/components/MultiSelect/MultiSelect.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type CSSProperties,\n type FocusEvent,\n type KeyboardEvent as ReactKeyboardEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useFormContext } from '../../form/formContext'\nimport { FloatingPanel } from '../FloatingPanel/FloatingPanel'\nimport { useT, type ThemeColor } from '../../theme'\nimport { Chip } from '../Chip'\nimport { Icon } from '../Icon'\nimport { List, ListItem } from '../List'\nimport { Loader } from '../Loader'\nimport { Typography } from '../Typography'\nimport type { SelectOption, SelectSize } from '../Select'\nimport styles from './MultiSelect.module.css'\n\nexport interface MultiSelectProps {\n /** Label rendered above the field. */\n label?: ReactNode\n /** The selectable options. */\n options: SelectOption[]\n /** Preset size — control height, font, chips and option density. */\n size?: SelectSize\n /** Marks the field invalid: red border/ring + the `helperText` in the error color. */\n error?: boolean\n /** Helper / validation text under the field. Adopts the error color while `error`. */\n helperText?: ReactNode\n /** Adds a red asterisk after the label. */\n required?: boolean\n /** Stretches the field to fill its container width. Defaults to `true`. */\n fullWidth?: boolean\n /** Disables the field. */\n disabled?: boolean\n /** Controlled value — the chosen options' `value`s. */\n value?: string[]\n /** Initial value for uncontrolled use. */\n defaultValue?: string[]\n /** Fires with the next array of selected values. */\n onChange?: (value: string[]) => void\n /** Text shown in the trigger when nothing is selected. Defaults to `\"Select…\"`. */\n placeholder?: string\n /** Theme palette token tinting the selected chips. Defaults to `primary`. */\n color?: ThemeColor\n /** Shows a clear (×) button in the trigger when anything is selected. Defaults to `true`. */\n clearable?: boolean\n /** Adds a search box inside the popover that filters options by label. */\n searchable?: boolean\n /** Placeholder for the search box. Defaults to `\"Search…\"`. */\n searchPlaceholder?: string\n /**\n * Fires with the search query as the user types. **Providing this switches off the built-in\n * local filtering** — you own `options` (e.g. fetch them from a server for the current query).\n */\n onSearchChange?: (query: string) => void\n /** Shows a loading indicator in the popover (e.g. while fetching server-side search results). */\n loading?: boolean\n /** Text shown next to the loader while `loading`. Defaults to `\"Loading…\"`. */\n loadingText?: ReactNode\n /**\n * Shown in the popover when no option matches. Defaults to `\"No options\"`. Pass a function\n * `(query) => node` to vary the message by the current search text — e.g. a \"Type to search\" hint\n * while it's empty vs a \"No results\" message after typing.\n */\n noOptionsText?: ReactNode | ((query: string) => ReactNode)\n /** Form field name — auto-binds to a surrounding `<Form>` (value is a `string[]`). */\n name?: string\n /** Id for the trigger (label association). */\n id?: string\n className?: string\n style?: CSSProperties\n}\n\n/**\n * A labeled multi-select — the `string[]` sibling of `Select`. The trigger shows the chosen options\n * as deletable `Chip`s (wrapping, growing like `TagsField`) or a placeholder; clicking it opens the\n * same `Dropdown`-style popover (portaled, flips, scroll-locked, trigger-width, animated — shared via\n * `useFloatingPanel`). Options render as `ListItem`s in a `role=\"listbox\"` `aria-multiselectable`\n * list; selecting **toggles** an option and keeps the popover open, the chosen ones showing a tick.\n * Full keyboard support (Arrow/Home/End, Enter/Space to toggle, Escape to close, type-ahead) and\n * ARIA. Optionally `searchable` + `clearable`; pass `onSearchChange` to drive the search\n * **server-side** (you own `options` — local filtering is skipped) with a `loading` indicator.\n * Controlled (`value` + `onChange`) or uncontrolled\n * (`defaultValue`), and binds to a surrounding `<Form>` by `name` (value = `string[]`; validate with\n * e.g. `z.array(z.string()).min(1, 'Pick at least one')`). Token-only styling.\n */\nexport const MultiSelect = forwardRef<HTMLDivElement, MultiSelectProps>(function MultiSelect(\n {\n label,\n options,\n size = 'md',\n error,\n helperText,\n required = false,\n fullWidth = true,\n disabled = false,\n value,\n defaultValue,\n onChange,\n placeholder,\n color = 'primary',\n clearable = true,\n searchable = false,\n searchPlaceholder,\n onSearchChange,\n loading = false,\n loadingText,\n noOptionsText,\n name,\n id: idProp,\n className,\n style,\n },\n ref,\n) {\n const reactId = useId()\n const id = idProp ?? reactId\n const labelId = `${id}-label`\n const listboxId = `${id}-listbox`\n const helperId = `${id}-helper`\n const optionId = (index: number) => `${id}-opt-${index}`\n\n // ── value (controlled / form-bound / uncontrolled) — always a string[] ─────────────────────────\n // Read the RAW form value (field().value String-coerces, which would flatten the array).\n const t = useT()\n const searchPh = searchPlaceholder ?? t('common.search')\n const form = useFormContext()\n const isFormBound = Boolean(form && name)\n const bound = isFormBound ? form!.field(name!) : undefined\n const externalValue =\n value !== undefined\n ? value\n : isFormBound\n ? ((form!.values[name!] as string[] | undefined) ?? [])\n : undefined\n const isControlled = value !== undefined || isFormBound\n const [internal, setInternal] = useState<string[]>(defaultValue ?? [])\n const selectedValues = isControlled ? externalValue! : internal\n\n const resolvedError = error ?? bound?.error ?? false\n const resolvedHelperText = helperText ?? bound?.helperText\n\n const commit = (next: string[]) => {\n if (!isControlled) setInternal(next)\n if (isFormBound) form!.setValue(name!, next)\n onChange?.(next)\n }\n\n // ── popover open state ─────────────────────────────────────────────────────────────────────────\n const triggerRef = useRef<HTMLDivElement | null>(null)\n const searchInputRef = useRef<HTMLInputElement | null>(null)\n const typeahead = useRef({ buffer: '', timer: 0 })\n const fieldBlur = useRef<(() => void) | undefined>(undefined)\n fieldBlur.current = bound ? () => bound.onBlur({} as FocusEvent<HTMLInputElement>) : undefined\n const [open, setOpen] = useState(false)\n const [searchQuery, setSearchQuery] = useState('')\n const [highlightedIndex, setHighlightedIndex] = useState(-1)\n\n const setTriggerRef = useCallback(\n (node: HTMLDivElement | null) => {\n triggerRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as { current: HTMLDivElement | null }).current = node\n },\n [ref],\n )\n\n // when `onSearchChange` is set the consumer owns `options` (server-side search) — skip local filter\n const filteredOptions = useMemo(() => {\n if (!searchable || onSearchChange || !searchQuery.trim()) return options\n const q = searchQuery.trim().toLowerCase()\n return options.filter((o) => o.label.toLowerCase().includes(q))\n }, [searchable, onSearchChange, searchQuery, options])\n\n const findEnabled = useCallback(\n (start: number, delta: number) => {\n let i = start\n while (i >= 0 && i < filteredOptions.length) {\n if (!filteredOptions[i].disabled) return i\n i += delta\n }\n return -1\n },\n [filteredOptions],\n )\n\n // the floating panel forwards its node here, for the focus-leaves-the-widget check on blur\n const popoverRef = useRef<HTMLDivElement | null>(null)\n\n const closeMenu = useCallback((refocus: boolean) => {\n setOpen(false)\n setSearchQuery('')\n window.clearTimeout(typeahead.current.timer)\n typeahead.current.buffer = ''\n fieldBlur.current?.()\n if (refocus) triggerRef.current?.focus()\n }, [])\n\n // on open: highlight the first enabled option, focus the search box if searchable\n useEffect(() => {\n if (!open) return\n setHighlightedIndex(findEnabled(0, 1))\n if (searchable) requestAnimationFrame(() => searchInputRef.current?.focus())\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open])\n\n useEffect(() => {\n if (!open || highlightedIndex < 0) return\n document.getElementById(optionId(highlightedIndex))?.scrollIntoView?.({ block: 'nearest' })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, highlightedIndex])\n\n // search filter → re-anchor to the first match\n useEffect(() => {\n if (open && searchable) setHighlightedIndex(findEnabled(0, 1))\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [searchQuery])\n\n // keep the highlight in range if the option count changes while open\n useEffect(() => {\n if (open) setHighlightedIndex((i) => (i < filteredOptions.length ? i : findEnabled(0, 1)))\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [filteredOptions.length])\n\n const openMenu = () => {\n if (!disabled) setOpen(true)\n }\n const toggleOption = (opt: SelectOption | undefined) => {\n if (!opt || opt.disabled) return\n commit(\n selectedValues.includes(opt.value)\n ? selectedValues.filter((v) => v !== opt.value)\n : [...selectedValues, opt.value],\n )\n // multi-select stays open\n }\n const removeValue = (v: string) => commit(selectedValues.filter((x) => x !== v))\n const moveHighlight = (delta: number) => {\n setHighlightedIndex((cur) => {\n const start = cur < 0 ? (delta > 0 ? 0 : filteredOptions.length - 1) : cur + delta\n const found = findEnabled(start, delta)\n return found === -1 ? cur : found\n })\n }\n\n const handleTypeahead = (char: string) => {\n const t = typeahead.current\n window.clearTimeout(t.timer)\n t.buffer += char.toLowerCase()\n t.timer = window.setTimeout(() => (t.buffer = ''), 500)\n const match = filteredOptions.findIndex(\n (o) => !o.disabled && o.label.toLowerCase().startsWith(t.buffer),\n )\n if (match >= 0) setHighlightedIndex(match)\n }\n\n const handleKeyDown = (event: ReactKeyboardEvent) => {\n if (disabled) return\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault()\n open ? moveHighlight(1) : openMenu()\n break\n case 'ArrowUp':\n event.preventDefault()\n open ? moveHighlight(-1) : openMenu()\n break\n case 'Enter':\n event.preventDefault()\n if (!open) openMenu()\n else toggleOption(filteredOptions[highlightedIndex])\n break\n case ' ':\n // Space opens a closed menu (any mode); toggles only when open & not searchable\n if (!open) {\n event.preventDefault()\n openMenu()\n } else if (!searchable) {\n event.preventDefault()\n toggleOption(filteredOptions[highlightedIndex])\n }\n break\n case 'Escape':\n if (open) {\n event.preventDefault()\n event.stopPropagation() // don't let FloatingPanel's own Escape also fire closeMenu/onBlur\n closeMenu(true)\n }\n break\n case 'Tab':\n // refocus the trigger so Tab continues from the field's visual location, not the portaled\n // search input's DOM position (end of <body>); don't preventDefault — let Tab move on\n if (open) closeMenu(true)\n break\n case 'Backspace':\n // remove the last chip when the (search) input is empty or there's no search box\n if (open && (!searchable || searchQuery === '') && selectedValues.length > 0) {\n event.preventDefault()\n removeValue(selectedValues[selectedValues.length - 1])\n }\n break\n case 'Home':\n if (open) {\n event.preventDefault()\n setHighlightedIndex(findEnabled(0, 1))\n }\n break\n case 'End':\n if (open) {\n event.preventDefault()\n setHighlightedIndex(findEnabled(filteredOptions.length - 1, -1))\n }\n break\n default:\n if (\n !searchable &&\n open &&\n event.key.length === 1 &&\n !event.metaKey &&\n !event.ctrlKey &&\n !event.altKey\n ) {\n handleTypeahead(event.key)\n }\n }\n }\n\n const handleTriggerBlur = (event: FocusEvent<HTMLDivElement>) => {\n const next = event.relatedTarget as Node | null\n if (next && (popoverRef.current?.contains(next) || triggerRef.current?.contains(next))) return\n bound?.onBlur(event as unknown as FocusEvent<HTMLInputElement>)\n }\n\n const activeId = open && highlightedIndex >= 0 ? optionId(highlightedIndex) : undefined\n // chevron size per field size: sm 16 · md 14 · lg 12\n const chevronPx = size === 'sm' ? 16 : size === 'md' ? 14 : 12\n const hasValue = selectedValues.length > 0\n\n return (\n <div\n className={clsx(\n styles.field,\n styles[size],\n fullWidth && styles.fullWidth,\n resolvedError && styles.error,\n disabled && styles.disabled,\n className,\n )}\n style={style}\n >\n {label != null && (\n <span\n id={labelId}\n className={styles.label}\n onClick={() => !disabled && triggerRef.current?.focus()}\n >\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {label}\n </Typography>\n {required && (\n <span className={styles.required} aria-hidden=\"true\">\n *\n </span>\n )}\n </span>\n )}\n\n <div\n ref={setTriggerRef}\n id={id}\n {...(name ? { name } : {})}\n role=\"combobox\"\n tabIndex={disabled ? -1 : 0}\n aria-haspopup=\"listbox\"\n aria-expanded={open}\n aria-controls={open ? listboxId : undefined}\n aria-activedescendant={searchable ? undefined : activeId}\n aria-labelledby={label != null ? labelId : undefined}\n aria-disabled={disabled || undefined}\n aria-required={required || undefined}\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n className={clsx(styles.control, open && styles.open, hasValue && styles.filled)}\n onClick={() => (open ? closeMenu(false) : openMenu())}\n onKeyDown={handleKeyDown}\n onBlur={handleTriggerBlur}\n >\n {hasValue ? (\n <span className={styles.chips}>\n {selectedValues.map((v) => {\n const opt = options.find((o) => o.value === v)\n return (\n <Chip\n key={v}\n size={size}\n color={color}\n disabled={disabled}\n onDelete={() => removeValue(v)}\n deleteLabel={`Remove ${opt?.label ?? v}`}\n // the combobox owns keyboard focus — keep chip deletes out of the tab order\n deleteTabIndex={-1}\n >\n {opt?.label ?? v}\n </Chip>\n )\n })}\n </span>\n ) : (\n <span className={clsx(styles.value, styles.placeholder)}>\n <span className={styles.valueLabel}>{placeholder ?? t('select.placeholder')}</span>\n </span>\n )}\n\n {clearable && hasValue && !disabled && (\n <button\n type=\"button\"\n className={styles.clear}\n aria-label={t('multiSelect.clearAll')}\n tabIndex={-1}\n onMouseDown={(e) => e.preventDefault()}\n onClick={(e) => {\n e.stopPropagation()\n commit([])\n triggerRef.current?.focus()\n }}\n >\n <Icon name=\"CloseCircle\" size=\"sm\" />\n </button>\n )}\n\n <Icon\n name=\"ArrowDown4\"\n className={styles.chevron}\n style={{ width: chevronPx, height: chevronPx }}\n aria-hidden=\"true\"\n />\n </div>\n\n <FloatingPanel\n ref={popoverRef}\n open={open}\n triggerRef={triggerRef}\n onClose={closeMenu}\n matchTriggerWidth\n className={styles.popover}\n >\n {searchable && (\n <div className={styles.search}>\n <Icon name=\"SearchNormal\" size=\"sm\" className={styles.searchIcon} aria-hidden=\"true\" />\n <input\n ref={searchInputRef}\n className={styles.searchInput}\n type=\"text\"\n role=\"combobox\"\n aria-expanded=\"true\"\n aria-controls={listboxId}\n aria-activedescendant={activeId}\n aria-autocomplete=\"list\"\n aria-label={searchPh}\n placeholder={searchPh}\n value={searchQuery}\n spellCheck={false}\n onChange={(e) => {\n setSearchQuery(e.target.value)\n onSearchChange?.(e.target.value)\n }}\n onKeyDown={handleKeyDown}\n />\n </div>\n )}\n\n <List\n role=\"listbox\"\n id={listboxId}\n aria-labelledby={label != null ? labelId : undefined}\n aria-multiselectable=\"true\"\n size={size}\n className={styles.listbox}\n // clear the mouse highlight when the pointer leaves the list (no lingering hover)\n onMouseLeave={() => setHighlightedIndex(-1)}\n >\n {loading ? (\n <div className={styles.loading}>\n <Loader size=\"sm\" />\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {loadingText ?? t('common.loading')}\n </Typography>\n </div>\n ) : filteredOptions.length === 0 ? (\n <div className={styles.noOptions}>\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {noOptionsText == null\n ? t('select.noOptions')\n : typeof noOptionsText === 'function'\n ? noOptionsText(searchQuery)\n : noOptionsText}\n </Typography>\n </div>\n ) : (\n filteredOptions.map((opt, index) => {\n const isSelected = selectedValues.includes(opt.value)\n return (\n <ListItem\n key={opt.value}\n id={optionId(index)}\n role=\"option\"\n tabIndex={-1}\n aria-selected={isSelected}\n aria-current={undefined}\n clickable\n selected={isSelected}\n disabled={opt.disabled}\n icon={opt.icon}\n className={clsx(index === highlightedIndex && styles.active)}\n trailing={isSelected ? <Icon name=\"TickCircle\" size=\"sm\" /> : undefined}\n onMouseEnter={() => !opt.disabled && setHighlightedIndex(index)}\n // keep focus on the search input (menu stays open on toggle) so typing keeps working\n onMouseDown={(e) => e.preventDefault()}\n onClick={() => toggleOption(opt)}\n >\n {opt.label}\n </ListItem>\n )\n })\n )}\n </List>\n </FloatingPanel>\n\n {resolvedHelperText != null && (\n <Typography\n as=\"span\"\n id={helperId}\n variant=\"bodySmall\"\n color={resolvedError ? 'error' : 'muted'}\n className={styles.helper}\n >\n {resolvedHelperText}\n </Typography>\n )}\n </div>\n )\n})\n"],"names":["MultiSelect","forwardRef","label","options","size","error","helperText","required","fullWidth","disabled","value","defaultValue","onChange","placeholder","color","clearable","searchable","searchPlaceholder","onSearchChange","loading","loadingText","noOptionsText","name","idProp","className","style","ref","reactId","useId","id","labelId","listboxId","helperId","optionId","index","t","useT","searchPh","form","useFormContext","isFormBound","bound","externalValue","isControlled","internal","setInternal","useState","selectedValues","resolvedError","resolvedHelperText","commit","next","triggerRef","useRef","searchInputRef","typeahead","fieldBlur","open","setOpen","searchQuery","setSearchQuery","highlightedIndex","setHighlightedIndex","setTriggerRef","useCallback","node","filteredOptions","useMemo","q","o","findEnabled","start","delta","i","popoverRef","closeMenu","refocus","_a","_b","useEffect","openMenu","toggleOption","opt","v","removeValue","x","moveHighlight","cur","found","handleTypeahead","char","match","handleKeyDown","event","handleTriggerBlur","activeId","chevronPx","hasValue","jsxs","clsx","styles","jsx","Typography","Chip","Icon","FloatingPanel","List","Loader","isSelected","ListItem","e"],"mappings":"uzCA8FaA,GAAcC,EAAAA,WAA6C,SACtE,CACE,MAAAC,EACA,QAAAC,EACA,KAAAC,EAAO,KACP,MAAAC,GACA,WAAAC,GACA,SAAAC,EAAW,GACX,UAAAC,GAAY,GACZ,SAAAC,EAAW,GACX,MAAAC,EACA,aAAAC,GACA,SAAAC,EACA,YAAAC,GACA,MAAAC,GAAQ,UACR,UAAAC,GAAY,GACZ,WAAAC,EAAa,GACb,kBAAAC,GACA,eAAAC,EACA,QAAAC,GAAU,GACV,YAAAC,GACA,cA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C,EAAgB,IAAI,CAACgB,EAAKhD,IAAU,CAClC,MAAM0E,EAAa7D,EAAe,SAASmC,EAAI,KAAK,EACpD,OACEmB,EAAAA,IAACQ,GAAAA,SAAA,CAEC,GAAI5E,EAASC,CAAK,EAClB,KAAK,SACL,SAAU,GACV,gBAAe0E,EACf,eAAc,OACd,UAAS,GACT,SAAUA,EACV,SAAU1B,EAAI,SACd,KAAMA,EAAI,KACV,UAAWiB,EAAAA,KAAKjE,IAAU2B,GAAoBuC,EAAO,MAAM,EAC3D,SAAUQ,EAAaP,EAAAA,IAACG,OAAA,CAAK,KAAK,aAAa,KAAK,KAAK,EAAK,OAC9D,aAAc,IAAM,CAACtB,EAAI,UAAYpB,EAAoB5B,CAAK,EAE9D,YAAc4E,GAAMA,EAAE,eAAA,EACtB,QAAS,IAAM7B,EAAaC,CAAG,EAE9B,SAAAA,EAAI,KAAA,EAjBAA,EAAI,KAAA,CAoBf,CAAC,CAAA,CAAA,CAEL,CAAA,CAAA,EAGDjC,GAAsB,MACrBoD,EAAAA,IAACC,EAAAA,WAAA,CACC,GAAG,OACH,GAAItE,EACJ,QAAQ,YACR,MAAOgB,EAAgB,QAAU,QACjC,UAAWoD,EAAO,OAEjB,SAAAnD,CAAA,CAAA,CACH,CAAA,CAAA,CAIR,CAAC"}
1
+ {"version":3,"file":"MultiSelect-CtLpWaBX.cjs","sources":["../src/components/MultiSelect/MultiSelect.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type CSSProperties,\n type FocusEvent,\n type KeyboardEvent as ReactKeyboardEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useFormContext } from '../../form/formContext'\nimport { FloatingPanel } from '../FloatingPanel/FloatingPanel'\nimport { useT, type ThemeColor } from '../../theme'\nimport { Chip } from '../Chip'\nimport { Icon } from '../Icon'\nimport { List, ListItem } from '../List'\nimport { Loader } from '../Loader'\nimport { Typography } from '../Typography'\nimport type { SelectOption, SelectSize } from '../Select'\nimport styles from './MultiSelect.module.css'\n\nexport interface MultiSelectProps {\n /** Label rendered above the field. */\n label?: ReactNode\n /** The selectable options. */\n options: SelectOption[]\n /** Preset size — control height, font, chips and option density. */\n size?: SelectSize\n /** Marks the field invalid: red border/ring + the `helperText` in the error color. */\n error?: boolean\n /** Helper / validation text under the field. Adopts the error color while `error`. */\n helperText?: ReactNode\n /** Adds a red asterisk after the label. */\n required?: boolean\n /** Stretches the field to fill its container width. Defaults to `true`. */\n fullWidth?: boolean\n /** Disables the field. */\n disabled?: boolean\n /** Controlled value — the chosen options' `value`s. */\n value?: string[]\n /** Initial value for uncontrolled use. */\n defaultValue?: string[]\n /** Fires with the next array of selected values. */\n onChange?: (value: string[]) => void\n /** Text shown in the trigger when nothing is selected. Defaults to `\"Select…\"`. */\n placeholder?: string\n /** Theme palette token tinting the selected chips. Defaults to `primary`. */\n color?: ThemeColor\n /** Shows a clear (×) button in the trigger when anything is selected. Defaults to `true`. */\n clearable?: boolean\n /** Adds a search box inside the popover that filters options by label. */\n searchable?: boolean\n /** Placeholder for the search box. Defaults to `\"Search…\"`. */\n searchPlaceholder?: string\n /**\n * Fires with the search query as the user types. **Providing this switches off the built-in\n * local filtering** — you own `options` (e.g. fetch them from a server for the current query).\n */\n onSearchChange?: (query: string) => void\n /** Shows a loading indicator in the popover (e.g. while fetching server-side search results). */\n loading?: boolean\n /** Text shown next to the loader while `loading`. Defaults to `\"Loading…\"`. */\n loadingText?: ReactNode\n /**\n * Shown in the popover when no option matches. Defaults to `\"No options\"`. Pass a function\n * `(query) => node` to vary the message by the current search text — e.g. a \"Type to search\" hint\n * while it's empty vs a \"No results\" message after typing.\n */\n noOptionsText?: ReactNode | ((query: string) => ReactNode)\n /** Form field name — auto-binds to a surrounding `<Form>` (value is a `string[]`). */\n name?: string\n /** Id for the trigger (label association). */\n id?: string\n className?: string\n style?: CSSProperties\n}\n\n/**\n * A labeled multi-select — the `string[]` sibling of `Select`. The trigger shows the chosen options\n * as deletable `Chip`s (wrapping, growing like `TagsField`) or a placeholder; clicking it opens the\n * same `Dropdown`-style popover (portaled, flips, scroll-locked, trigger-width, animated — shared via\n * `useFloatingPanel`). Options render as `ListItem`s in a `role=\"listbox\"` `aria-multiselectable`\n * list; selecting **toggles** an option and keeps the popover open, the chosen ones showing a tick.\n * Full keyboard support (Arrow/Home/End, Enter/Space to toggle, Escape to close, type-ahead) and\n * ARIA. Optionally `searchable` + `clearable`; pass `onSearchChange` to drive the search\n * **server-side** (you own `options` — local filtering is skipped) with a `loading` indicator.\n * Controlled (`value` + `onChange`) or uncontrolled\n * (`defaultValue`), and binds to a surrounding `<Form>` by `name` (value = `string[]`; validate with\n * e.g. `z.array(z.string()).min(1, 'Pick at least one')`). Token-only styling.\n */\nexport const MultiSelect = forwardRef<HTMLDivElement, MultiSelectProps>(function MultiSelect(\n {\n label,\n options,\n size = 'md',\n error,\n helperText,\n required = false,\n fullWidth = true,\n disabled = false,\n value,\n defaultValue,\n onChange,\n placeholder,\n color = 'primary',\n clearable = true,\n searchable = false,\n searchPlaceholder,\n onSearchChange,\n loading = false,\n loadingText,\n noOptionsText,\n name,\n id: idProp,\n className,\n style,\n },\n ref,\n) {\n const reactId = useId()\n const id = idProp ?? reactId\n const labelId = `${id}-label`\n const listboxId = `${id}-listbox`\n const helperId = `${id}-helper`\n const optionId = (index: number) => `${id}-opt-${index}`\n\n // ── value (controlled / form-bound / uncontrolled) — always a string[] ─────────────────────────\n // Read the RAW form value (field().value String-coerces, which would flatten the array).\n const t = useT()\n const searchPh = searchPlaceholder ?? t('common.search')\n const form = useFormContext()\n const isFormBound = Boolean(form && name)\n const bound = isFormBound ? form!.field(name!) : undefined\n const externalValue =\n value !== undefined\n ? value\n : isFormBound\n ? ((form!.values[name!] as string[] | undefined) ?? [])\n : undefined\n const isControlled = value !== undefined || isFormBound\n const [internal, setInternal] = useState<string[]>(defaultValue ?? [])\n const selectedValues = isControlled ? externalValue! : internal\n\n const resolvedError = error ?? bound?.error ?? false\n const resolvedHelperText = helperText ?? bound?.helperText\n\n const commit = (next: string[]) => {\n if (!isControlled) setInternal(next)\n if (isFormBound) form!.setValue(name!, next)\n onChange?.(next)\n }\n\n // ── popover open state ─────────────────────────────────────────────────────────────────────────\n const triggerRef = useRef<HTMLDivElement | null>(null)\n const searchInputRef = useRef<HTMLInputElement | null>(null)\n const typeahead = useRef({ buffer: '', timer: 0 })\n const fieldBlur = useRef<(() => void) | undefined>(undefined)\n fieldBlur.current = bound ? () => bound.onBlur({} as FocusEvent<HTMLInputElement>) : undefined\n const [open, setOpen] = useState(false)\n const [searchQuery, setSearchQuery] = useState('')\n const [highlightedIndex, setHighlightedIndex] = useState(-1)\n\n const setTriggerRef = useCallback(\n (node: HTMLDivElement | null) => {\n triggerRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as { current: HTMLDivElement | null }).current = node\n },\n [ref],\n )\n\n // when `onSearchChange` is set the consumer owns `options` (server-side search) — skip local filter\n const filteredOptions = useMemo(() => {\n if (!searchable || onSearchChange || !searchQuery.trim()) return options\n const q = searchQuery.trim().toLowerCase()\n return options.filter((o) => o.label.toLowerCase().includes(q))\n }, [searchable, onSearchChange, searchQuery, options])\n\n const findEnabled = useCallback(\n (start: number, delta: number) => {\n let i = start\n while (i >= 0 && i < filteredOptions.length) {\n if (!filteredOptions[i].disabled) return i\n i += delta\n }\n return -1\n },\n [filteredOptions],\n )\n\n // the floating panel forwards its node here, for the focus-leaves-the-widget check on blur\n const popoverRef = useRef<HTMLDivElement | null>(null)\n\n const closeMenu = useCallback((refocus: boolean) => {\n setOpen(false)\n setSearchQuery('')\n window.clearTimeout(typeahead.current.timer)\n typeahead.current.buffer = ''\n fieldBlur.current?.()\n if (refocus) triggerRef.current?.focus()\n }, [])\n\n // on open: highlight the first enabled option, focus the search box if searchable\n useEffect(() => {\n if (!open) return\n setHighlightedIndex(findEnabled(0, 1))\n if (searchable) requestAnimationFrame(() => searchInputRef.current?.focus())\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open])\n\n useEffect(() => {\n if (!open || highlightedIndex < 0) return\n document.getElementById(optionId(highlightedIndex))?.scrollIntoView?.({ block: 'nearest' })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, highlightedIndex])\n\n // search filter → re-anchor to the first match\n useEffect(() => {\n if (open && searchable) setHighlightedIndex(findEnabled(0, 1))\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [searchQuery])\n\n // keep the highlight in range if the option count changes while open\n useEffect(() => {\n if (open) setHighlightedIndex((i) => (i < filteredOptions.length ? i : findEnabled(0, 1)))\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [filteredOptions.length])\n\n const openMenu = () => {\n if (!disabled) setOpen(true)\n }\n const toggleOption = (opt: SelectOption | undefined) => {\n if (!opt || opt.disabled) return\n commit(\n selectedValues.includes(opt.value)\n ? selectedValues.filter((v) => v !== opt.value)\n : [...selectedValues, opt.value],\n )\n // multi-select stays open\n }\n const removeValue = (v: string) => commit(selectedValues.filter((x) => x !== v))\n const moveHighlight = (delta: number) => {\n setHighlightedIndex((cur) => {\n const start = cur < 0 ? (delta > 0 ? 0 : filteredOptions.length - 1) : cur + delta\n const found = findEnabled(start, delta)\n return found === -1 ? cur : found\n })\n }\n\n const handleTypeahead = (char: string) => {\n const t = typeahead.current\n window.clearTimeout(t.timer)\n t.buffer += char.toLowerCase()\n t.timer = window.setTimeout(() => (t.buffer = ''), 500)\n const match = filteredOptions.findIndex(\n (o) => !o.disabled && o.label.toLowerCase().startsWith(t.buffer),\n )\n if (match >= 0) setHighlightedIndex(match)\n }\n\n const handleKeyDown = (event: ReactKeyboardEvent) => {\n if (disabled) return\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault()\n open ? moveHighlight(1) : openMenu()\n break\n case 'ArrowUp':\n event.preventDefault()\n open ? moveHighlight(-1) : openMenu()\n break\n case 'Enter':\n event.preventDefault()\n if (!open) openMenu()\n else toggleOption(filteredOptions[highlightedIndex])\n break\n case ' ':\n // Space opens a closed menu (any mode); toggles only when open & not searchable\n if (!open) {\n event.preventDefault()\n openMenu()\n } else if (!searchable) {\n event.preventDefault()\n toggleOption(filteredOptions[highlightedIndex])\n }\n break\n case 'Escape':\n if (open) {\n event.preventDefault()\n event.stopPropagation() // don't let FloatingPanel's own Escape also fire closeMenu/onBlur\n closeMenu(true)\n }\n break\n case 'Tab':\n // refocus the trigger so Tab continues from the field's visual location, not the portaled\n // search input's DOM position (end of <body>); don't preventDefault — let Tab move on\n if (open) closeMenu(true)\n break\n case 'Backspace':\n // remove the last chip when the (search) input is empty or there's no search box\n if (open && (!searchable || searchQuery === '') && selectedValues.length > 0) {\n event.preventDefault()\n removeValue(selectedValues[selectedValues.length - 1])\n }\n break\n case 'Home':\n if (open) {\n event.preventDefault()\n setHighlightedIndex(findEnabled(0, 1))\n }\n break\n case 'End':\n if (open) {\n event.preventDefault()\n setHighlightedIndex(findEnabled(filteredOptions.length - 1, -1))\n }\n break\n default:\n if (\n !searchable &&\n open &&\n event.key.length === 1 &&\n !event.metaKey &&\n !event.ctrlKey &&\n !event.altKey\n ) {\n handleTypeahead(event.key)\n }\n }\n }\n\n const handleTriggerBlur = (event: FocusEvent<HTMLDivElement>) => {\n const next = event.relatedTarget as Node | null\n if (next && (popoverRef.current?.contains(next) || triggerRef.current?.contains(next))) return\n bound?.onBlur(event as unknown as FocusEvent<HTMLInputElement>)\n }\n\n const activeId = open && highlightedIndex >= 0 ? optionId(highlightedIndex) : undefined\n // chevron size per field size: sm 16 · md 14 · lg 12\n const chevronPx = size === 'sm' ? 16 : size === 'md' ? 14 : 12\n const hasValue = selectedValues.length > 0\n\n return (\n <div\n className={clsx(\n styles.field,\n styles[size],\n fullWidth && styles.fullWidth,\n resolvedError && styles.error,\n disabled && styles.disabled,\n className,\n )}\n style={style}\n >\n {label != null && (\n <span\n id={labelId}\n className={styles.label}\n onClick={() => !disabled && triggerRef.current?.focus()}\n >\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {label}\n </Typography>\n {required && (\n <span className={styles.required} aria-hidden=\"true\">\n *\n </span>\n )}\n </span>\n )}\n\n <div\n ref={setTriggerRef}\n id={id}\n {...(name ? { name } : {})}\n role=\"combobox\"\n tabIndex={disabled ? -1 : 0}\n aria-haspopup=\"listbox\"\n aria-expanded={open}\n aria-controls={open ? listboxId : undefined}\n aria-activedescendant={searchable ? undefined : activeId}\n aria-labelledby={label != null ? labelId : undefined}\n aria-disabled={disabled || undefined}\n aria-required={required || undefined}\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n className={clsx(styles.control, open && styles.open, hasValue && styles.filled)}\n onClick={() => (open ? closeMenu(false) : openMenu())}\n onKeyDown={handleKeyDown}\n onBlur={handleTriggerBlur}\n >\n {hasValue ? (\n <span className={styles.chips}>\n {selectedValues.map((v) => {\n const opt = options.find((o) => o.value === v)\n return (\n <Chip\n key={v}\n size={size}\n color={color}\n disabled={disabled}\n onDelete={() => removeValue(v)}\n deleteLabel={`Remove ${opt?.label ?? v}`}\n // the combobox owns keyboard focus — keep chip deletes out of the tab order\n deleteTabIndex={-1}\n >\n {opt?.label ?? v}\n </Chip>\n )\n })}\n </span>\n ) : (\n <span className={clsx(styles.value, styles.placeholder)}>\n <span className={styles.valueLabel}>{placeholder ?? t('select.placeholder')}</span>\n </span>\n )}\n\n {clearable && hasValue && !disabled && (\n <button\n type=\"button\"\n className={styles.clear}\n aria-label={t('multiSelect.clearAll')}\n tabIndex={-1}\n onMouseDown={(e) => e.preventDefault()}\n onClick={(e) => {\n e.stopPropagation()\n commit([])\n triggerRef.current?.focus()\n }}\n >\n <Icon name=\"CloseCircle\" size=\"sm\" />\n </button>\n )}\n\n <Icon\n name=\"ArrowDown4\"\n className={styles.chevron}\n style={{ width: chevronPx, height: chevronPx }}\n aria-hidden=\"true\"\n />\n </div>\n\n <FloatingPanel\n ref={popoverRef}\n open={open}\n triggerRef={triggerRef}\n onClose={closeMenu}\n matchTriggerWidth\n className={styles.popover}\n >\n {searchable && (\n <div className={styles.search}>\n <Icon name=\"SearchNormal\" size=\"sm\" className={styles.searchIcon} aria-hidden=\"true\" />\n <input\n ref={searchInputRef}\n className={styles.searchInput}\n type=\"text\"\n role=\"combobox\"\n aria-expanded=\"true\"\n aria-controls={listboxId}\n aria-activedescendant={activeId}\n aria-autocomplete=\"list\"\n aria-label={searchPh}\n placeholder={searchPh}\n value={searchQuery}\n spellCheck={false}\n onChange={(e) => {\n setSearchQuery(e.target.value)\n onSearchChange?.(e.target.value)\n }}\n onKeyDown={handleKeyDown}\n />\n </div>\n )}\n\n <List\n role=\"listbox\"\n id={listboxId}\n aria-labelledby={label != null ? labelId : undefined}\n aria-multiselectable=\"true\"\n size={size}\n className={styles.listbox}\n // clear the mouse highlight when the pointer leaves the list (no lingering hover)\n onMouseLeave={() => setHighlightedIndex(-1)}\n >\n {loading ? (\n <div className={styles.loading}>\n <Loader size=\"sm\" />\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {loadingText ?? t('common.loading')}\n </Typography>\n </div>\n ) : filteredOptions.length === 0 ? (\n <div className={styles.noOptions}>\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {noOptionsText == null\n ? t('select.noOptions')\n : typeof noOptionsText === 'function'\n ? noOptionsText(searchQuery)\n : noOptionsText}\n </Typography>\n </div>\n ) : (\n filteredOptions.map((opt, index) => {\n const isSelected = selectedValues.includes(opt.value)\n return (\n <ListItem\n key={opt.value}\n id={optionId(index)}\n role=\"option\"\n tabIndex={-1}\n aria-selected={isSelected}\n aria-current={undefined}\n clickable\n selected={isSelected}\n disabled={opt.disabled}\n icon={opt.icon}\n className={clsx(index === highlightedIndex && styles.active)}\n trailing={isSelected ? <Icon name=\"TickCircle\" size=\"sm\" /> : undefined}\n onMouseEnter={() => !opt.disabled && setHighlightedIndex(index)}\n // keep focus on the search input (menu stays open on toggle) so typing keeps working\n onMouseDown={(e) => e.preventDefault()}\n onClick={() => toggleOption(opt)}\n >\n {opt.label}\n </ListItem>\n )\n })\n )}\n </List>\n </FloatingPanel>\n\n {resolvedHelperText != null && (\n <Typography\n as=\"span\"\n id={helperId}\n variant=\"bodySmall\"\n color={resolvedError ? 'error' : 'muted'}\n className={styles.helper}\n >\n {resolvedHelperText}\n </Typography>\n )}\n </div>\n )\n})\n"],"names":["MultiSelect","forwardRef","label","options","size","error","helperText","required","fullWidth","disabled","value","defaultValue","onChange","placeholder","color","clearable","searchable","searchPlaceholder","onSearchChange","loading","loadingText","noOptionsText","name","idProp","className","style","ref","reactId","useId","id","labelId","listboxId","helperId","optionId","index","t","useT","searchPh","form","useFormContext","isFormBound","bound","externalValue","isControlled","internal","setInternal","useState","selectedValues","resolvedError","resolvedHelperText","commit","next","triggerRef","useRef","searchInputRef","typeahead","fieldBlur","open","setOpen","searchQuery","setSearchQuery","highlightedIndex","setHighlightedIndex","setTriggerRef","useCallback","node","filteredOptions","useMemo","q","o","findEnabled","start","delta","i","popoverRef","closeMenu","refocus","_a","_b","useEffect","openMenu","toggleOption","opt","v","removeValue","x","moveHighlight","cur","found","handleTypeahead","char","match","handleKeyDown","event","handleTriggerBlur","activeId","chevronPx","hasValue","jsxs","clsx","styles","jsx","Typography","Chip","Icon","FloatingPanel","List","Loader","isSelected","ListItem","e"],"mappings":"uzCA8FaA,GAAcC,EAAAA,WAA6C,SACtE,CACE,MAAAC,EACA,QAAAC,EACA,KAAAC,EAAO,KACP,MAAAC,GACA,WAAAC,GACA,SAAAC,EAAW,GACX,UAAAC,GAAY,GACZ,SAAAC,EAAW,GACX,MAAAC,EACA,aAAAC,GACA,SAAAC,EACA,YAAAC,GACA,MAAAC,GAAQ,UACR,UAAAC,GAAY,GACZ,WAAAC,EAAa,GACb,kBAAAC,GACA,eAAAC,EACA,QAAAC,GAAU,GACV,YAAAC,GACA,cAAAC,EACA,KAAAC,EACA,GAAIC,GACJ,UAAAC,GACA,MAAAC,EACF,EACAC,EACA,CACA,MA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I,KAAK,EACpD,OACEmB,EAAAA,IAACQ,GAAAA,SAAA,CAEC,GAAI5E,EAASC,CAAK,EAClB,KAAK,SACL,SAAU,GACV,gBAAe0E,EACf,eAAc,OACd,UAAS,GACT,SAAUA,EACV,SAAU1B,EAAI,SACd,KAAMA,EAAI,KACV,UAAWiB,EAAAA,KAAKjE,IAAU2B,GAAoBuC,EAAO,MAAM,EAC3D,SAAUQ,EAAaP,EAAAA,IAACG,OAAA,CAAK,KAAK,aAAa,KAAK,KAAK,EAAK,OAC9D,aAAc,IAAM,CAACtB,EAAI,UAAYpB,EAAoB5B,CAAK,EAE9D,YAAc4E,GAAMA,EAAE,eAAA,EACtB,QAAS,IAAM7B,EAAaC,CAAG,EAE9B,SAAAA,EAAI,KAAA,EAjBAA,EAAI,KAAA,CAoBf,CAAC,CAAA,CAAA,CAEL,CAAA,CAAA,EAGDjC,GAAsB,MACrBoD,EAAAA,IAACC,EAAAA,WAAA,CACC,GAAG,OACH,GAAItE,EACJ,QAAQ,YACR,MAAOgB,EAAgB,QAAU,QACjC,UAAWoD,EAAO,OAEjB,SAAAnD,CAAA,CAAA,CACH,CAAA,CAAA,CAIR,CAAC"}
@@ -3,13 +3,13 @@ import { forwardRef as Me, useId as Ce, useState as R, useRef as D, useCallback
3
3
  import { clsx as K } from "clsx";
4
4
  import { u as Be } from "./formContext-B7ln1Miy.js";
5
5
  import { F as Re } from "./FloatingPanel-BG9Uag__.js";
6
- import { C as qe } from "./Chip-DulHqhuf.js";
6
+ import { C as qe } from "./Chip-D83svOCW.js";
7
7
  import { I as V } from "./Icon-CophpkHo.js";
8
8
  import { L as Ke } from "./List-LqbfF6gU.js";
9
9
  import { L as Ve } from "./ListItem-B4Upc0Hy.js";
10
- import { L as We } from "./Loader-UzzqvFyo.js";
10
+ import { L as We } from "./Loader-B9VXX401.js";
11
11
  import { T as W } from "./Typography-Cta6Rg4L.js";
12
- import { a as $e } from "./ConfigProvider-BYruQYHC.js";
12
+ import { a as $e } from "./ConfigProvider-DDuIJSM7.js";
13
13
  const Ae = "_field_16ykc_1", Fe = "_fullWidth_16ykc_7", Oe = "_label_16ykc_12", Pe = "_required_16ykc_21", Se = "_control_16ykc_27", He = "_filled_16ykc_47", je = "_open_16ykc_51", Qe = "_error_16ykc_56", Ue = "_disabled_16ykc_64", ze = "_chips_16ykc_31", Ge = "_value_16ykc_84", Je = "_valueLabel_16ykc_91", Xe = "_placeholder_16ykc_96", Ye = "_clear_16ykc_100", Ze = "_chevron_16ykc_117", er = "_sm_16ykc_127", rr = "_md_16ykc_131", lr = "_lg_16ykc_135", tr = "_helper_16ykc_140", or = "_popover_16ykc_145", ar = "_search_16ykc_152", cr = "_searchIcon_16ykc_161", sr = "_searchInput_16ykc_165", nr = "_listbox_16ykc_180", ir = "_active_16ykc_188", dr = "_noOptions_16ykc_192", ur = "_loading_16ykc_198", l = {
14
14
  field: Ae,
15
15
  fullWidth: Fe,
@@ -347,4 +347,4 @@ const Ae = "_field_16ykc_1", Fe = "_fullWidth_16ykc_7", Oe = "_label_16ykc_12",
347
347
  export {
348
348
  Dr as M
349
349
  };
350
- //# sourceMappingURL=MultiSelect-BPLctumx.js.map
350
+ //# sourceMappingURL=MultiSelect-sKk2KzOd.js.map