@techzyapp/ui-library 1.0.43 → 1.0.44

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 (625) hide show
  1. package/README.md +15 -14
  2. package/dist/{Accordion-B4vdZXIu.cjs → Accordion-CFyeLfPT.cjs} +2 -2
  3. package/dist/{Accordion-B4vdZXIu.cjs.map → Accordion-CFyeLfPT.cjs.map} +1 -1
  4. package/dist/{Accordion-DhFZ25KV.js → Accordion-DOrTQJB9.js} +2 -2
  5. package/dist/{Accordion-DhFZ25KV.js.map → Accordion-DOrTQJB9.js.map} +1 -1
  6. package/dist/{AdminRoot-BLHvXCvL.js → AdminRoot-9KE3ll-D.js} +8 -8
  7. package/dist/{AdminRoot-BLHvXCvL.js.map → AdminRoot-9KE3ll-D.js.map} +1 -1
  8. package/dist/{AdminRoot-D_g_TW30.cjs → AdminRoot-BMzHo0n7.cjs} +2 -2
  9. package/dist/{AdminRoot-D_g_TW30.cjs.map → AdminRoot-BMzHo0n7.cjs.map} +1 -1
  10. package/dist/Alert-BFfzpPNd.js +70 -0
  11. package/dist/{Alert-D5E1PLkV.js.map → Alert-BFfzpPNd.js.map} +1 -1
  12. package/dist/Alert-DS8TzpIS.cjs +2 -0
  13. package/dist/{Alert-B4XZDk16.cjs.map → Alert-DS8TzpIS.cjs.map} +1 -1
  14. package/dist/{AuthLayout-q8pbCGdt.js → AuthLayout-BI1wLuDl.js} +2 -2
  15. package/dist/{AuthLayout-q8pbCGdt.js.map → AuthLayout-BI1wLuDl.js.map} +1 -1
  16. package/dist/{AuthLayout-exuNQicH.cjs → AuthLayout-Bzlsvicf.cjs} +2 -2
  17. package/dist/{AuthLayout-exuNQicH.cjs.map → AuthLayout-Bzlsvicf.cjs.map} +1 -1
  18. package/dist/{Avatar-l48Ice6t.cjs → Avatar-BBqX1732.cjs} +2 -2
  19. package/dist/{Avatar-l48Ice6t.cjs.map → Avatar-BBqX1732.cjs.map} +1 -1
  20. package/dist/{Avatar-ClcmN0ba.js → Avatar-CaYyv5wk.js} +2 -2
  21. package/dist/{Avatar-ClcmN0ba.js.map → Avatar-CaYyv5wk.js.map} +1 -1
  22. package/dist/{AvatarGroup-l-KV3wdl.js → AvatarGroup-6fhm-van.js} +2 -2
  23. package/dist/{AvatarGroup-l-KV3wdl.js.map → AvatarGroup-6fhm-van.js.map} +1 -1
  24. package/dist/{AvatarGroup-CuvFX4di.cjs → AvatarGroup-DrkzAt1-.cjs} +2 -2
  25. package/dist/{AvatarGroup-CuvFX4di.cjs.map → AvatarGroup-DrkzAt1-.cjs.map} +1 -1
  26. package/dist/Breadcrumbs-CloqFpp1.js +34 -0
  27. package/dist/{Breadcrumbs-M31xyok8.js.map → Breadcrumbs-CloqFpp1.js.map} +1 -1
  28. package/dist/Breadcrumbs-N2-sZWW5.cjs +2 -0
  29. package/dist/{Breadcrumbs-DSUxcp6u.cjs.map → Breadcrumbs-N2-sZWW5.cjs.map} +1 -1
  30. package/dist/Button-5LQtDA9d.js +72 -0
  31. package/dist/{Button-CtADzomU.js.map → Button-5LQtDA9d.js.map} +1 -1
  32. package/dist/Button-Bxztlybi.cjs +2 -0
  33. package/dist/{Button-Q_5uA-zc.cjs.map → Button-Bxztlybi.cjs.map} +1 -1
  34. package/dist/{Calendar-CHLCv2s9.js → Calendar-BIKo_aus.js} +5 -5
  35. package/dist/{Calendar-CHLCv2s9.js.map → Calendar-BIKo_aus.js.map} +1 -1
  36. package/dist/{Calendar-BbbtMsZs.cjs → Calendar-CsBgaKZ-.cjs} +2 -2
  37. package/dist/{Calendar-BbbtMsZs.cjs.map → Calendar-CsBgaKZ-.cjs.map} +1 -1
  38. package/dist/{Card-CntRsQfm.cjs → Card-Csn3FaMl.cjs} +2 -2
  39. package/dist/{Card-CntRsQfm.cjs.map → Card-Csn3FaMl.cjs.map} +1 -1
  40. package/dist/{Card-Br9IB0yM.js → Card-DMwQ7rMk.js} +4 -4
  41. package/dist/{Card-Br9IB0yM.js.map → Card-DMwQ7rMk.js.map} +1 -1
  42. package/dist/Chip-BdCZ44I8.cjs +2 -0
  43. package/dist/{Chip-CrBizrvG.cjs.map → Chip-BdCZ44I8.cjs.map} +1 -1
  44. package/dist/Chip-C7IkFuM1.js +92 -0
  45. package/dist/{Chip-DYZ5w7VM.js.map → Chip-C7IkFuM1.js.map} +1 -1
  46. package/dist/ChoiceCardGroup-Cj_YFj6C.cjs +2 -0
  47. package/dist/{ChoiceCardGroup-C7Eengyd.cjs.map → ChoiceCardGroup-Cj_YFj6C.cjs.map} +1 -1
  48. package/dist/ChoiceCardGroup-D37XREKV.js +180 -0
  49. package/dist/{ChoiceCardGroup-q0yN-TeQ.js.map → ChoiceCardGroup-D37XREKV.js.map} +1 -1
  50. package/dist/CodeBlock-BnXxxqAW.cjs +2 -0
  51. package/dist/{CodeBlock-DW4uaZXM.cjs.map → CodeBlock-BnXxxqAW.cjs.map} +1 -1
  52. package/dist/CodeBlock-C10JN6DR.js +96 -0
  53. package/dist/{CodeBlock-B6Eqc4HR.js.map → CodeBlock-C10JN6DR.js.map} +1 -1
  54. package/dist/{ColorPicker-nhWd_nOW.cjs → ColorPicker-CVddGc-n.cjs} +2 -2
  55. package/dist/{ColorPicker-nhWd_nOW.cjs.map → ColorPicker-CVddGc-n.cjs.map} +1 -1
  56. package/dist/{ColorPicker-GsKIqJu8.js → ColorPicker-z8_-77LO.js} +3 -3
  57. package/dist/{ColorPicker-GsKIqJu8.js.map → ColorPicker-z8_-77LO.js.map} +1 -1
  58. package/dist/{ColorPickerPanel-BeAu83S6.cjs → ColorPickerPanel-DJY6-EqO.cjs} +2 -2
  59. package/dist/{ColorPickerPanel-BeAu83S6.cjs.map → ColorPickerPanel-DJY6-EqO.cjs.map} +1 -1
  60. package/dist/{ColorPickerPanel-BEcZePcT.js → ColorPickerPanel-y4A2LLLf.js} +3 -3
  61. package/dist/{ColorPickerPanel-BEcZePcT.js.map → ColorPickerPanel-y4A2LLLf.js.map} +1 -1
  62. package/dist/{ColorRamp-C-zRPhHj.cjs → ColorRamp-DvRsdOWy.cjs} +2 -2
  63. package/dist/{ColorRamp-C-zRPhHj.cjs.map → ColorRamp-DvRsdOWy.cjs.map} +1 -1
  64. package/dist/{ColorRamp-CeNgd8wF.js → ColorRamp-Dvit8yoP.js} +2 -2
  65. package/dist/{ColorRamp-CeNgd8wF.js.map → ColorRamp-Dvit8yoP.js.map} +1 -1
  66. package/dist/{ConfigProvider-Dqfu7UBU.js → ConfigProvider-CYgmMH4j.js} +2 -2
  67. package/dist/{ConfigProvider-Dqfu7UBU.js.map → ConfigProvider-CYgmMH4j.js.map} +1 -1
  68. package/dist/{ConfigProvider-Ci9Q2HLF.cjs → ConfigProvider-Cf-awvZs.cjs} +2 -2
  69. package/dist/{ConfigProvider-Ci9Q2HLF.cjs.map → ConfigProvider-Cf-awvZs.cjs.map} +1 -1
  70. package/dist/{CopyButton-Chr7SP5i.cjs → CopyButton-BOp7waEt.cjs} +2 -2
  71. package/dist/{CopyButton-Chr7SP5i.cjs.map → CopyButton-BOp7waEt.cjs.map} +1 -1
  72. package/dist/{CopyButton-Bidt2Vgp.js → CopyButton-_iMBE4q_.js} +4 -4
  73. package/dist/{CopyButton-Bidt2Vgp.js.map → CopyButton-_iMBE4q_.js.map} +1 -1
  74. package/dist/DashedButton-BX8hfY1x.cjs +2 -0
  75. package/dist/{DashedButton-Dw7xHgIp.cjs.map → DashedButton-BX8hfY1x.cjs.map} +1 -1
  76. package/dist/DashedButton-wcmXTYBw.js +58 -0
  77. package/dist/{DashedButton-csz6Jt_K.js.map → DashedButton-wcmXTYBw.js.map} +1 -1
  78. package/dist/{DatePicker-4rb34nPR.cjs → DatePicker-UQwpH-rw.cjs} +2 -2
  79. package/dist/{DatePicker-4rb34nPR.cjs.map → DatePicker-UQwpH-rw.cjs.map} +1 -1
  80. package/dist/{DatePicker-D7ZMOhWn.js → DatePicker-X5hZVSW6.js} +6 -6
  81. package/dist/{DatePicker-D7ZMOhWn.js.map → DatePicker-X5hZVSW6.js.map} +1 -1
  82. package/dist/DatePicker.module-BaQyKOUM.cjs +2 -0
  83. package/dist/{DatePicker.module-BDtTsg8M.cjs.map → DatePicker.module-BaQyKOUM.cjs.map} +1 -1
  84. package/dist/DatePicker.module-DoywSvLu.js +138 -0
  85. package/dist/{DatePicker.module-CMMQyEhG.js.map → DatePicker.module-DoywSvLu.js.map} +1 -1
  86. package/dist/{DateTimePicker-gDxM2CGy.js → DateTimePicker-Ch1kUHEb.js} +9 -9
  87. package/dist/{DateTimePicker-gDxM2CGy.js.map → DateTimePicker-Ch1kUHEb.js.map} +1 -1
  88. package/dist/{DateTimePicker-CVFzKzyA.cjs → DateTimePicker-ClTZGMON.cjs} +2 -2
  89. package/dist/{DateTimePicker-CVFzKzyA.cjs.map → DateTimePicker-ClTZGMON.cjs.map} +1 -1
  90. package/dist/{DescriptionList-Die3lRBW.js → DescriptionList-Cque-iYk.js} +69 -69
  91. package/dist/{DescriptionList-Die3lRBW.js.map → DescriptionList-Cque-iYk.js.map} +1 -1
  92. package/dist/DescriptionList-IVAvgpEL.cjs +2 -0
  93. package/dist/{DescriptionList-BBvfABps.cjs.map → DescriptionList-IVAvgpEL.cjs.map} +1 -1
  94. package/dist/Dropdown-C_y9_dVn.cjs +2 -0
  95. package/dist/Dropdown-C_y9_dVn.cjs.map +1 -0
  96. package/dist/Dropdown-D-D_Z1Jo.js +154 -0
  97. package/dist/Dropdown-D-D_Z1Jo.js.map +1 -0
  98. package/dist/{EmptyState-D5EKQjX1.cjs → EmptyState-C84B-E8a.cjs} +2 -2
  99. package/dist/{EmptyState-D5EKQjX1.cjs.map → EmptyState-C84B-E8a.cjs.map} +1 -1
  100. package/dist/{EmptyState-DRgER10x.js → EmptyState-Yts_p-jZ.js} +3 -3
  101. package/dist/{EmptyState-DRgER10x.js.map → EmptyState-Yts_p-jZ.js.map} +1 -1
  102. package/dist/{ErrorBoundary-CLfE2NjU.js → ErrorBoundary-BgMOPle0.js} +3 -3
  103. package/dist/{ErrorBoundary-CLfE2NjU.js.map → ErrorBoundary-BgMOPle0.js.map} +1 -1
  104. package/dist/{ErrorBoundary-DVcGWZd8.cjs → ErrorBoundary-DtYswKp3.cjs} +2 -2
  105. package/dist/{ErrorBoundary-DVcGWZd8.cjs.map → ErrorBoundary-DtYswKp3.cjs.map} +1 -1
  106. package/dist/{ErrorState-DJDQbHZY.cjs → ErrorState-Aa8LVjkl.cjs} +2 -2
  107. package/dist/{ErrorState-DJDQbHZY.cjs.map → ErrorState-Aa8LVjkl.cjs.map} +1 -1
  108. package/dist/{ErrorState-Dqw0AvmB.js → ErrorState-BE9Rcmht.js} +8 -8
  109. package/dist/{ErrorState-Dqw0AvmB.js.map → ErrorState-BE9Rcmht.js.map} +1 -1
  110. package/dist/FileCard-Chfx0QdF.cjs +2 -0
  111. package/dist/{FileCard-BqMproT9.cjs.map → FileCard-Chfx0QdF.cjs.map} +1 -1
  112. package/dist/{FileCard-kVnjcSlk.js → FileCard-m3i_8yKR.js} +33 -33
  113. package/dist/{FileCard-kVnjcSlk.js.map → FileCard-m3i_8yKR.js.map} +1 -1
  114. package/dist/FileUploader-B27Y4rak.js +706 -0
  115. package/dist/FileUploader-B27Y4rak.js.map +1 -0
  116. package/dist/FileUploader-DkvFO0N_.cjs +2 -0
  117. package/dist/FileUploader-DkvFO0N_.cjs.map +1 -0
  118. package/dist/{Flag-B1ZvZVXi.cjs → Flag-BvZB3295.cjs} +2 -2
  119. package/dist/{Flag-B1ZvZVXi.cjs.map → Flag-BvZB3295.cjs.map} +1 -1
  120. package/dist/{Flag-BEIqYQZg.js → Flag-C1HwnZXJ.js} +2 -2
  121. package/dist/{Flag-BEIqYQZg.js.map → Flag-C1HwnZXJ.js.map} +1 -1
  122. package/dist/{FullscreenToggle-BuQonKW8.js → FullscreenToggle-B4ynXdCP.js} +4 -4
  123. package/dist/{FullscreenToggle-BuQonKW8.js.map → FullscreenToggle-B4ynXdCP.js.map} +1 -1
  124. package/dist/{FullscreenToggle-CWlOXLss.cjs → FullscreenToggle-CEFZQ5OC.cjs} +2 -2
  125. package/dist/{FullscreenToggle-CWlOXLss.cjs.map → FullscreenToggle-CEFZQ5OC.cjs.map} +1 -1
  126. package/dist/Icon-B7DJn8Tw.js +5418 -0
  127. package/dist/Icon-B7DJn8Tw.js.map +1 -0
  128. package/dist/Icon-CBg21lKA.cjs +2 -0
  129. package/dist/Icon-CBg21lKA.cjs.map +1 -0
  130. package/dist/IconButton-EaExCXRq.js +68 -0
  131. package/dist/{IconButton-BoURJOUD.js.map → IconButton-EaExCXRq.js.map} +1 -1
  132. package/dist/IconButton-wW1o4HHw.cjs +2 -0
  133. package/dist/{IconButton-CiDPeKM4.cjs.map → IconButton-wW1o4HHw.cjs.map} +1 -1
  134. package/dist/ImageEditor-DTFQZ6ON.js +2709 -0
  135. package/dist/ImageEditor-DTFQZ6ON.js.map +1 -0
  136. package/dist/ImageEditor-D_HKfDbx.cjs +60 -0
  137. package/dist/ImageEditor-D_HKfDbx.cjs.map +1 -0
  138. package/dist/Link-BZjolIAF.js +48 -0
  139. package/dist/{Link-BQlvsu9V.js.map → Link-BZjolIAF.js.map} +1 -1
  140. package/dist/Link-CtttVM6w.cjs +2 -0
  141. package/dist/{Link-GZT51mKx.cjs.map → Link-CtttVM6w.cjs.map} +1 -1
  142. package/dist/{List-CKoNx21F.cjs → List-CLUXeaXS.cjs} +2 -2
  143. package/dist/{List-CKoNx21F.cjs.map → List-CLUXeaXS.cjs.map} +1 -1
  144. package/dist/{List-2Y3ktTcF.js → List-DS91CZUt.js} +2 -2
  145. package/dist/{List-2Y3ktTcF.js.map → List-DS91CZUt.js.map} +1 -1
  146. package/dist/ListItem-CguNjf-u.cjs +2 -0
  147. package/dist/{ListItem-DkCYXucd.cjs.map → ListItem-CguNjf-u.cjs.map} +1 -1
  148. package/dist/ListItem-Ezmdk7q-.js +76 -0
  149. package/dist/{ListItem-2Lr5_NRY.js.map → ListItem-Ezmdk7q-.js.map} +1 -1
  150. package/dist/{Loader-CAmRn8Oj.cjs → Loader-DNR2_YHm.cjs} +2 -2
  151. package/dist/{Loader-CAmRn8Oj.cjs.map → Loader-DNR2_YHm.cjs.map} +1 -1
  152. package/dist/{Loader-CnTuddK7.js → Loader-D_Foo6Hj.js} +2 -2
  153. package/dist/{Loader-CnTuddK7.js.map → Loader-D_Foo6Hj.js.map} +1 -1
  154. package/dist/{LocationPicker-BwQ6ULMF.cjs → LocationPicker-CdO37PKg.cjs} +2 -2
  155. package/dist/{LocationPicker-BwQ6ULMF.cjs.map → LocationPicker-CdO37PKg.cjs.map} +1 -1
  156. package/dist/{LocationPicker-Cns3fkYI.js → LocationPicker-DGbnbTW9.js} +8 -8
  157. package/dist/{LocationPicker-Cns3fkYI.js.map → LocationPicker-DGbnbTW9.js.map} +1 -1
  158. package/dist/Modal-1rIBMvKH.js +154 -0
  159. package/dist/Modal-1rIBMvKH.js.map +1 -0
  160. package/dist/Modal-Du-uVpYw.cjs +2 -0
  161. package/dist/Modal-Du-uVpYw.cjs.map +1 -0
  162. package/dist/MultiSelect-BoqunsM9.js +219 -0
  163. package/dist/{MultiSelect-svEVZNbp.js.map → MultiSelect-BoqunsM9.js.map} +1 -1
  164. package/dist/MultiSelect-lAAaD0uL.cjs +2 -0
  165. package/dist/{MultiSelect-DJ6tRseY.cjs.map → MultiSelect-lAAaD0uL.cjs.map} +1 -1
  166. package/dist/{NumberField-sokUuuBR.cjs → NumberField-CyUA6eob.cjs} +2 -2
  167. package/dist/{NumberField-sokUuuBR.cjs.map → NumberField-CyUA6eob.cjs.map} +1 -1
  168. package/dist/{NumberField-9ekoB1wS.js → NumberField-DHFGNQjZ.js} +4 -4
  169. package/dist/{NumberField-9ekoB1wS.js.map → NumberField-DHFGNQjZ.js.map} +1 -1
  170. package/dist/OtpField-CIy5OtXI.cjs +2 -0
  171. package/dist/{OtpField-DlkGju72.cjs.map → OtpField-CIy5OtXI.cjs.map} +1 -1
  172. package/dist/{OtpField-DA7zJwy9.js → OtpField-pL9nj4AW.js} +61 -61
  173. package/dist/{OtpField-DA7zJwy9.js.map → OtpField-pL9nj4AW.js.map} +1 -1
  174. package/dist/Overlay-CywFQfjm.cjs +2 -0
  175. package/dist/Overlay-CywFQfjm.cjs.map +1 -0
  176. package/dist/Overlay-DiL0ZARH.js +60 -0
  177. package/dist/Overlay-DiL0ZARH.js.map +1 -0
  178. package/dist/{PageError-vD8Dpfns.js → PageError-C5SO0mVJ.js} +5 -5
  179. package/dist/{PageError-vD8Dpfns.js.map → PageError-C5SO0mVJ.js.map} +1 -1
  180. package/dist/{PageError-DUN5PzDF.cjs → PageError-DbokLmOY.cjs} +2 -2
  181. package/dist/{PageError-DUN5PzDF.cjs.map → PageError-DbokLmOY.cjs.map} +1 -1
  182. package/dist/{PageLayout-BesuKuX6.cjs → PageLayout-B7ZDiNq8.cjs} +2 -2
  183. package/dist/{PageLayout-BesuKuX6.cjs.map → PageLayout-B7ZDiNq8.cjs.map} +1 -1
  184. package/dist/{PageLayout-CdObvxt7.js → PageLayout-Du-D6Pd4.js} +5 -5
  185. package/dist/{PageLayout-CdObvxt7.js.map → PageLayout-Du-D6Pd4.js.map} +1 -1
  186. package/dist/{PageNotFound-Cc5eZ6w3.js → PageNotFound-DSkoMfed.js} +5 -5
  187. package/dist/{PageNotFound-Cc5eZ6w3.js.map → PageNotFound-DSkoMfed.js.map} +1 -1
  188. package/dist/{PageNotFound-CfOAhmJ-.cjs → PageNotFound-DfNwdtgJ.cjs} +2 -2
  189. package/dist/{PageNotFound-CfOAhmJ-.cjs.map → PageNotFound-DfNwdtgJ.cjs.map} +1 -1
  190. package/dist/Pagination-BH8ACaAC.js +139 -0
  191. package/dist/{Pagination-CX0S1RrF.js.map → Pagination-BH8ACaAC.js.map} +1 -1
  192. package/dist/Pagination-DO2Os4an.cjs +2 -0
  193. package/dist/{Pagination-CAD9_Nr_.cjs.map → Pagination-DO2Os4an.cjs.map} +1 -1
  194. package/dist/{PaletteField-CVIwl2nV.js → PaletteField-BFb0PQ-S.js} +3 -3
  195. package/dist/{PaletteField-CVIwl2nV.js.map → PaletteField-BFb0PQ-S.js.map} +1 -1
  196. package/dist/{PaletteField-CpiEkXcB.cjs → PaletteField-BfvcJvGM.cjs} +2 -2
  197. package/dist/{PaletteField-CpiEkXcB.cjs.map → PaletteField-BfvcJvGM.cjs.map} +1 -1
  198. package/dist/PhoneField-C-wOm7g5.cjs +2 -0
  199. package/dist/{PhoneField-Dlnnv4DU.cjs.map → PhoneField-C-wOm7g5.cjs.map} +1 -1
  200. package/dist/{PhoneField-xHLTU-o5.js → PhoneField-DFhGWgbK.js} +106 -106
  201. package/dist/{PhoneField-xHLTU-o5.js.map → PhoneField-DFhGWgbK.js.map} +1 -1
  202. package/dist/{Popconfirm-Chlm_M5T.cjs → Popconfirm-_53vtMI0.cjs} +2 -2
  203. package/dist/{Popconfirm-Chlm_M5T.cjs.map → Popconfirm-_53vtMI0.cjs.map} +1 -1
  204. package/dist/{Popconfirm-DIlygJY8.js → Popconfirm-o5da44ra.js} +4 -4
  205. package/dist/{Popconfirm-DIlygJY8.js.map → Popconfirm-o5da44ra.js.map} +1 -1
  206. package/dist/{Progress-DqvKmyQW.cjs → Progress-BSinoQ8t.cjs} +2 -2
  207. package/dist/{Progress-DqvKmyQW.cjs.map → Progress-BSinoQ8t.cjs.map} +1 -1
  208. package/dist/{Progress-BAEhawtj.js → Progress-CHzNwegP.js} +2 -2
  209. package/dist/{Progress-BAEhawtj.js.map → Progress-CHzNwegP.js.map} +1 -1
  210. package/dist/{QrCode-D7BTYcW2.js → QrCode-C3hAfNP6.js} +2 -2
  211. package/dist/{QrCode-D7BTYcW2.js.map → QrCode-C3hAfNP6.js.map} +1 -1
  212. package/dist/{QrCode-Dqsk49vX.cjs → QrCode-tNNnsbHM.cjs} +2 -2
  213. package/dist/{QrCode-Dqsk49vX.cjs.map → QrCode-tNNnsbHM.cjs.map} +1 -1
  214. package/dist/{RemoveDialog-CQIm9GTH.js → RemoveDialog-CXy-PY-G.js} +6 -6
  215. package/dist/{RemoveDialog-CQIm9GTH.js.map → RemoveDialog-CXy-PY-G.js.map} +1 -1
  216. package/dist/{RemoveDialog-DZ-EqIfS.cjs → RemoveDialog-Hi_gV-8A.cjs} +2 -2
  217. package/dist/{RemoveDialog-DZ-EqIfS.cjs.map → RemoveDialog-Hi_gV-8A.cjs.map} +1 -1
  218. package/dist/RichTextEditor-BhVE1q4U.cjs +2 -0
  219. package/dist/RichTextEditor-BhVE1q4U.cjs.map +1 -0
  220. package/dist/RichTextEditor-DQz9jGD3.js +1011 -0
  221. package/dist/RichTextEditor-DQz9jGD3.js.map +1 -0
  222. package/dist/{RootLayout-Cl98ghy1.js → RootLayout-CjT5uHlt.js} +21 -21
  223. package/dist/{RootLayout-Cl98ghy1.js.map → RootLayout-CjT5uHlt.js.map} +1 -1
  224. package/dist/{RootLayout-s_Q_kSoS.cjs → RootLayout-iSGY4MsS.cjs} +2 -2
  225. package/dist/{RootLayout-s_Q_kSoS.cjs.map → RootLayout-iSGY4MsS.cjs.map} +1 -1
  226. package/dist/Select-DVoL547R.cjs +2 -0
  227. package/dist/{Select-BrjXCXtl.cjs.map → Select-DVoL547R.cjs.map} +1 -1
  228. package/dist/{Select-CG8UJL9R.js → Select-DuLDLnnb.js} +47 -47
  229. package/dist/{Select-CG8UJL9R.js.map → Select-DuLDLnnb.js.map} +1 -1
  230. package/dist/Sidebar-DRQo4zAF.cjs +2 -0
  231. package/dist/{Sidebar-DLlqHvQJ.cjs.map → Sidebar-DRQo4zAF.cjs.map} +1 -1
  232. package/dist/{Sidebar-CbPr34jd.js → Sidebar-DvQmuBNK.js} +59 -59
  233. package/dist/{Sidebar-CbPr34jd.js.map → Sidebar-DvQmuBNK.js.map} +1 -1
  234. package/dist/{Slider-B5iG-HSw.js → Slider-D-QjclQJ.js} +2 -2
  235. package/dist/{Slider-B5iG-HSw.js.map → Slider-D-QjclQJ.js.map} +1 -1
  236. package/dist/{Slider-DTnui01g.cjs → Slider-DxnCQRSH.cjs} +2 -2
  237. package/dist/{Slider-DTnui01g.cjs.map → Slider-DxnCQRSH.cjs.map} +1 -1
  238. package/dist/{SpeedDial-i5kxikmt.cjs → SpeedDial-37OMwj9C.cjs} +2 -2
  239. package/dist/{SpeedDial-i5kxikmt.cjs.map → SpeedDial-37OMwj9C.cjs.map} +1 -1
  240. package/dist/{SpeedDial-Be3SHkzw.js → SpeedDial-BBQ9y6lm.js} +3 -3
  241. package/dist/{SpeedDial-Be3SHkzw.js.map → SpeedDial-BBQ9y6lm.js.map} +1 -1
  242. package/dist/Stepper-CU5Y0kfj.js +168 -0
  243. package/dist/{Stepper-BDQt-oVG.js.map → Stepper-CU5Y0kfj.js.map} +1 -1
  244. package/dist/Stepper-WqkfGPnQ.cjs +2 -0
  245. package/dist/{Stepper-e8qBsKYW.cjs.map → Stepper-WqkfGPnQ.cjs.map} +1 -1
  246. package/dist/{SwatchPicker-0gnOvv7U.cjs → SwatchPicker-DCjE0T80.cjs} +2 -2
  247. package/dist/{SwatchPicker-0gnOvv7U.cjs.map → SwatchPicker-DCjE0T80.cjs.map} +1 -1
  248. package/dist/{SwatchPicker-BZHRELA-.js → SwatchPicker-DS4WY2eM.js} +2 -2
  249. package/dist/{SwatchPicker-BZHRELA-.js.map → SwatchPicker-DS4WY2eM.js.map} +1 -1
  250. package/dist/{Table-ChdM_vyi.js → Table-BECUUZtf.js} +346 -346
  251. package/dist/Table-BECUUZtf.js.map +1 -0
  252. package/dist/Table-BnlvrRMr.cjs +2 -0
  253. package/dist/Table-BnlvrRMr.cjs.map +1 -0
  254. package/dist/Tabs-BXAHddi7.js +193 -0
  255. package/dist/{Tabs-BxZrgozI.js.map → Tabs-BXAHddi7.js.map} +1 -1
  256. package/dist/Tabs-DiL1vNW3.cjs +2 -0
  257. package/dist/{Tabs-C4kB1yfG.cjs.map → Tabs-DiL1vNW3.cjs.map} +1 -1
  258. package/dist/{TagsField-Bg5BcQU-.cjs → TagsField-BsV_6dff.cjs} +2 -2
  259. package/dist/{TagsField-Bg5BcQU-.cjs.map → TagsField-BsV_6dff.cjs.map} +1 -1
  260. package/dist/{TagsField-DWlIt7XO.js → TagsField-C1SgykAj.js} +5 -5
  261. package/dist/{TagsField-DWlIt7XO.js.map → TagsField-C1SgykAj.js.map} +1 -1
  262. package/dist/{TextField-B-xqoDZR.cjs → TextField-DUv689u2.cjs} +2 -2
  263. package/dist/{TextField-B-xqoDZR.cjs.map → TextField-DUv689u2.cjs.map} +1 -1
  264. package/dist/{TextField-Dwx5GPxz.js → TextField-oZI7thoU.js} +4 -4
  265. package/dist/{TextField-Dwx5GPxz.js.map → TextField-oZI7thoU.js.map} +1 -1
  266. package/dist/{ThemeToggle-CK2USfgx.js → ThemeToggle-5uHCUsX7.js} +4 -4
  267. package/dist/{ThemeToggle-CK2USfgx.js.map → ThemeToggle-5uHCUsX7.js.map} +1 -1
  268. package/dist/{ThemeToggle-DFgv1bsh.cjs → ThemeToggle-xn3roH0u.cjs} +2 -2
  269. package/dist/{ThemeToggle-DFgv1bsh.cjs.map → ThemeToggle-xn3roH0u.cjs.map} +1 -1
  270. package/dist/TimeColumns-By23LHZw.cjs +2 -0
  271. package/dist/{TimeColumns-B8KTj-tc.cjs.map → TimeColumns-By23LHZw.cjs.map} +1 -1
  272. package/dist/TimeColumns-lO33mhX7.js +147 -0
  273. package/dist/{TimeColumns-BWcuu3l7.js.map → TimeColumns-lO33mhX7.js.map} +1 -1
  274. package/dist/{TimePicker-DjL15hz1.cjs → TimePicker-BHFNH8LR.cjs} +2 -2
  275. package/dist/{TimePicker-DjL15hz1.cjs.map → TimePicker-BHFNH8LR.cjs.map} +1 -1
  276. package/dist/{TimePicker-YMVHevpZ.js → TimePicker-Dl5p833O.js} +7 -7
  277. package/dist/{TimePicker-YMVHevpZ.js.map → TimePicker-Dl5p833O.js.map} +1 -1
  278. package/dist/Timeline-DOojNvLG.cjs +2 -0
  279. package/dist/Timeline-DOojNvLG.cjs.map +1 -0
  280. package/dist/Timeline-Dg03dwTN.js +87 -0
  281. package/dist/Timeline-Dg03dwTN.js.map +1 -0
  282. package/dist/{Toaster-pHN2pxrU.js → Toaster-BPBFZiTr.js} +3 -3
  283. package/dist/{Toaster-pHN2pxrU.js.map → Toaster-BPBFZiTr.js.map} +1 -1
  284. package/dist/{Toaster-9hZ5MuW7.cjs → Toaster-D4T89N1S.cjs} +2 -2
  285. package/dist/{Toaster-9hZ5MuW7.cjs.map → Toaster-D4T89N1S.cjs.map} +1 -1
  286. package/dist/ToggleButtonGroup-CGNRLxjg.cjs +2 -0
  287. package/dist/{ToggleButtonGroup-Ci_DFvdt.cjs.map → ToggleButtonGroup-CGNRLxjg.cjs.map} +1 -1
  288. package/dist/{ToggleButtonGroup-Mdskkjdh.js → ToggleButtonGroup-K6ZcrTZT.js} +37 -37
  289. package/dist/{ToggleButtonGroup-Mdskkjdh.js.map → ToggleButtonGroup-K6ZcrTZT.js.map} +1 -1
  290. package/dist/{TranslatedFields-BpWU5ZcG.js → TranslatedFields-Clsr84XC.js} +5 -5
  291. package/dist/{TranslatedFields-BpWU5ZcG.js.map → TranslatedFields-Clsr84XC.js.map} +1 -1
  292. package/dist/{TranslatedFields-SvS37hab.cjs → TranslatedFields-LdeJeHEp.cjs} +2 -2
  293. package/dist/{TranslatedFields-SvS37hab.cjs.map → TranslatedFields-LdeJeHEp.cjs.map} +1 -1
  294. package/dist/{UserCard-VPaexedS.cjs → UserCard-CQOiWppq.cjs} +2 -2
  295. package/dist/{UserCard-VPaexedS.cjs.map → UserCard-CQOiWppq.cjs.map} +1 -1
  296. package/dist/{UserCard-cmZrMvwL.js → UserCard-Cr75RwZb.js} +5 -5
  297. package/dist/{UserCard-cmZrMvwL.js.map → UserCard-Cr75RwZb.js.map} +1 -1
  298. package/dist/chunks/icons/{25-knEB8mSp.js → 25-BMMPtr_E.js} +4 -5
  299. package/dist/chunks/icons/{25-Dho_3EHD.cjs → 25-uATZNfXE.cjs} +1 -1
  300. package/dist/chunks/icons/{2b-CQJdcF1h.js → 2b-Brkug4c-.js} +10 -11
  301. package/dist/chunks/icons/{2b-C2_97u16.cjs → 2b-CIVRGp1R.cjs} +1 -1
  302. package/dist/chunks/icons/57-BLoIUlhF.js +27 -0
  303. package/dist/chunks/icons/57-D4zLdDZ1.cjs +1 -0
  304. package/dist/chunks/icons/{75-DqLkMUyj.cjs → 75-C2eJ2Tvr.cjs} +1 -1
  305. package/dist/chunks/icons/{75-D5RQw6IJ.js → 75-D16WojvG.js} +6 -7
  306. package/dist/chunks/icons/{7c-DpnA_JOJ.js → 7c-0j5Sno5_.js} +6 -7
  307. package/dist/chunks/icons/{7c-DEaFwltT.cjs → 7c-LUfAyp72.cjs} +1 -1
  308. package/dist/chunks/icons/8a-BJ_LOjmW.js +26 -0
  309. package/dist/chunks/icons/8a-CYkhOibI.cjs +1 -0
  310. package/dist/chunks/icons/97-Bx7FkkGJ.js +12 -0
  311. package/dist/chunks/icons/97-D7pUHrOX.cjs +1 -0
  312. package/dist/chunks/icons/{b7-BtHkI92Y.js → b7-DmmkevXf.js} +17 -18
  313. package/dist/chunks/icons/{b7-B-dB5jrV.cjs → b7-rI1GpsxW.cjs} +1 -1
  314. package/dist/chunks/icons/b8-De0yKEKv.js +28 -0
  315. package/dist/chunks/icons/b8-eR814BVJ.cjs +1 -0
  316. package/dist/chunks/icons/{b9-Bw942fE3.js → b9-CJO6ZdSw.js} +10 -11
  317. package/dist/chunks/icons/{b9-Be-J4RIp.cjs → b9-DZdWz9qg.cjs} +1 -1
  318. package/dist/chunks/icons/d5-BAPeb6B0.cjs +1 -0
  319. package/dist/chunks/icons/d5-BJJanOLe.js +21 -0
  320. package/dist/chunks/icons/d8--vRkIVal.js +19 -0
  321. package/dist/chunks/icons/d8-BfMys92X.cjs +1 -0
  322. package/dist/chunks/icons/dd-CARhkHmU.js +21 -0
  323. package/dist/chunks/icons/dd-D61yllMP.cjs +1 -0
  324. package/dist/components/Accordion/index.cjs +1 -1
  325. package/dist/components/Accordion/index.js +1 -1
  326. package/dist/components/Alert/index.cjs +1 -1
  327. package/dist/components/Alert/index.js +1 -1
  328. package/dist/components/AuthLayout/index.cjs +1 -1
  329. package/dist/components/AuthLayout/index.js +1 -1
  330. package/dist/components/Avatar/index.cjs +1 -1
  331. package/dist/components/Avatar/index.js +2 -2
  332. package/dist/components/Breadcrumbs/index.cjs +1 -1
  333. package/dist/components/Breadcrumbs/index.js +1 -1
  334. package/dist/components/Button/index.cjs +1 -1
  335. package/dist/components/Button/index.js +1 -1
  336. package/dist/components/Card/index.cjs +1 -1
  337. package/dist/components/Card/index.js +1 -1
  338. package/dist/components/Chip/index.cjs +1 -1
  339. package/dist/components/Chip/index.js +1 -1
  340. package/dist/components/ChoiceCard/index.cjs +1 -1
  341. package/dist/components/ChoiceCard/index.js +1 -1
  342. package/dist/components/CodeBlock/index.cjs +1 -1
  343. package/dist/components/CodeBlock/index.js +1 -1
  344. package/dist/components/ColorPicker/index.cjs +1 -1
  345. package/dist/components/ColorPicker/index.js +1 -1
  346. package/dist/components/ColorRamp/index.cjs +1 -1
  347. package/dist/components/ColorRamp/index.js +1 -1
  348. package/dist/components/CopyButton/index.cjs +1 -1
  349. package/dist/components/CopyButton/index.js +1 -1
  350. package/dist/components/DashedButton/index.cjs +1 -1
  351. package/dist/components/DashedButton/index.js +1 -1
  352. package/dist/components/DatePicker/index.cjs +1 -1
  353. package/dist/components/DatePicker/index.js +1 -1
  354. package/dist/components/DateTimePicker/index.cjs +1 -1
  355. package/dist/components/DateTimePicker/index.js +1 -1
  356. package/dist/components/DescriptionList/index.cjs +1 -1
  357. package/dist/components/DescriptionList/index.js +1 -1
  358. package/dist/components/Dropdown/index.cjs +1 -1
  359. package/dist/components/Dropdown/index.js +1 -1
  360. package/dist/components/EmptyState/index.cjs +1 -1
  361. package/dist/components/EmptyState/index.js +1 -1
  362. package/dist/components/ErrorState/index.cjs +1 -1
  363. package/dist/components/ErrorState/index.js +2 -2
  364. package/dist/components/FileCard/index.cjs +1 -1
  365. package/dist/components/FileCard/index.js +1 -1
  366. package/dist/components/FileUploader/FileUploader.d.cts +33 -5
  367. package/dist/components/FileUploader/FileUploader.d.ts +33 -5
  368. package/dist/components/FileUploader/FileUploaderEditDialog.d.cts +8 -18
  369. package/dist/components/FileUploader/FileUploaderEditDialog.d.ts +8 -18
  370. package/dist/components/FileUploader/index.cjs +1 -1
  371. package/dist/components/FileUploader/index.js +1 -1
  372. package/dist/components/Flag/index.cjs +1 -1
  373. package/dist/components/Flag/index.js +1 -1
  374. package/dist/components/FullscreenToggle/index.cjs +1 -1
  375. package/dist/components/FullscreenToggle/index.js +1 -1
  376. package/dist/components/Icon/index.cjs +1 -1
  377. package/dist/components/Icon/index.js +1 -1
  378. package/dist/components/IconButton/index.cjs +1 -1
  379. package/dist/components/IconButton/index.js +1 -1
  380. package/dist/components/ImageEditor/CropShapeMenu.d.cts +17 -0
  381. package/dist/components/ImageEditor/CropShapeMenu.d.ts +17 -0
  382. package/dist/components/ImageEditor/EditorStage.d.cts +27 -0
  383. package/dist/components/ImageEditor/EditorStage.d.ts +27 -0
  384. package/dist/components/ImageEditor/FilterStrip.d.cts +14 -0
  385. package/dist/components/ImageEditor/FilterStrip.d.ts +14 -0
  386. package/dist/components/ImageEditor/ImageEditor.d.cts +30 -0
  387. package/dist/components/ImageEditor/ImageEditor.d.ts +30 -0
  388. package/dist/components/ImageEditor/ResizePanel.d.cts +19 -0
  389. package/dist/components/ImageEditor/ResizePanel.d.ts +19 -0
  390. package/dist/components/ImageEditor/RulerSlider.d.cts +37 -0
  391. package/dist/components/ImageEditor/RulerSlider.d.ts +37 -0
  392. package/dist/components/ImageEditor/core/affine.d.cts +11 -0
  393. package/dist/components/ImageEditor/core/affine.d.ts +11 -0
  394. package/dist/components/ImageEditor/core/editor.d.cts +69 -0
  395. package/dist/components/ImageEditor/core/editor.d.ts +69 -0
  396. package/dist/components/ImageEditor/core/geometry.d.cts +112 -0
  397. package/dist/components/ImageEditor/core/geometry.d.ts +112 -0
  398. package/dist/components/ImageEditor/core/load.d.cts +26 -0
  399. package/dist/components/ImageEditor/core/load.d.ts +26 -0
  400. package/dist/components/ImageEditor/core/matrix.d.cts +55 -0
  401. package/dist/components/ImageEditor/core/matrix.d.ts +55 -0
  402. package/dist/components/ImageEditor/core/pixels.d.cts +24 -0
  403. package/dist/components/ImageEditor/core/pixels.d.ts +24 -0
  404. package/dist/components/ImageEditor/core/redact.d.cts +37 -0
  405. package/dist/components/ImageEditor/core/redact.d.ts +37 -0
  406. package/dist/components/ImageEditor/core/render.d.cts +19 -0
  407. package/dist/components/ImageEditor/core/render.d.ts +19 -0
  408. package/dist/components/ImageEditor/core/scene.d.cts +47 -0
  409. package/dist/components/ImageEditor/core/scene.d.ts +47 -0
  410. package/dist/components/ImageEditor/core/spring.d.cts +17 -0
  411. package/dist/components/ImageEditor/core/spring.d.ts +17 -0
  412. package/dist/components/ImageEditor/core/types.d.cts +104 -0
  413. package/dist/components/ImageEditor/core/types.d.ts +104 -0
  414. package/dist/components/ImageEditor/core/webgl.d.cts +55 -0
  415. package/dist/components/ImageEditor/core/webgl.d.ts +55 -0
  416. package/dist/components/ImageEditor/index.cjs +2 -0
  417. package/dist/components/ImageEditor/index.cjs.map +1 -0
  418. package/dist/components/ImageEditor/index.d.cts +6 -0
  419. package/dist/components/ImageEditor/index.d.ts +6 -0
  420. package/dist/components/ImageEditor/index.js +9 -0
  421. package/dist/components/ImageEditor/index.js.map +1 -0
  422. package/dist/components/Link/index.cjs +1 -1
  423. package/dist/components/Link/index.js +1 -1
  424. package/dist/components/List/index.cjs +1 -1
  425. package/dist/components/List/index.js +2 -2
  426. package/dist/components/Loader/index.cjs +1 -1
  427. package/dist/components/Loader/index.js +1 -1
  428. package/dist/components/LocationPicker/index.cjs +1 -1
  429. package/dist/components/LocationPicker/index.js +1 -1
  430. package/dist/components/Modal/index.cjs +1 -1
  431. package/dist/components/Modal/index.js +1 -1
  432. package/dist/components/MultiSelect/index.cjs +1 -1
  433. package/dist/components/MultiSelect/index.js +1 -1
  434. package/dist/components/NumberField/index.cjs +1 -1
  435. package/dist/components/NumberField/index.js +1 -1
  436. package/dist/components/OtpField/index.cjs +1 -1
  437. package/dist/components/OtpField/index.js +1 -1
  438. package/dist/components/PageError/index.cjs +1 -1
  439. package/dist/components/PageError/index.js +1 -1
  440. package/dist/components/PageLayout/index.cjs +1 -1
  441. package/dist/components/PageLayout/index.js +1 -1
  442. package/dist/components/PageNotFound/index.cjs +1 -1
  443. package/dist/components/PageNotFound/index.js +1 -1
  444. package/dist/components/Pagination/index.cjs +1 -1
  445. package/dist/components/Pagination/index.js +1 -1
  446. package/dist/components/PaletteField/index.cjs +1 -1
  447. package/dist/components/PaletteField/index.js +1 -1
  448. package/dist/components/PhoneField/index.cjs +1 -1
  449. package/dist/components/PhoneField/index.js +1 -1
  450. package/dist/components/Popconfirm/index.cjs +1 -1
  451. package/dist/components/Popconfirm/index.js +1 -1
  452. package/dist/components/Progress/index.cjs +1 -1
  453. package/dist/components/Progress/index.js +1 -1
  454. package/dist/components/QrCode/index.cjs +1 -1
  455. package/dist/components/QrCode/index.js +1 -1
  456. package/dist/components/RemoveDialog/index.cjs +1 -1
  457. package/dist/components/RemoveDialog/index.js +1 -1
  458. package/dist/components/RichTextEditor/RichTextEditor.d.cts +3 -2
  459. package/dist/components/RichTextEditor/RichTextEditor.d.ts +3 -2
  460. package/dist/components/RichTextEditor/index.cjs +1 -1
  461. package/dist/components/RichTextEditor/index.js +1 -1
  462. package/dist/components/RichTextEditor/nodes/ImageNode.d.cts +8 -5
  463. package/dist/components/RichTextEditor/nodes/ImageNode.d.ts +8 -5
  464. package/dist/components/RichTextEditor/nodes/VideoNode.d.cts +4 -4
  465. package/dist/components/RichTextEditor/nodes/VideoNode.d.ts +4 -4
  466. package/dist/components/RootLayout/index.cjs +1 -1
  467. package/dist/components/RootLayout/index.js +1 -1
  468. package/dist/components/Select/index.cjs +1 -1
  469. package/dist/components/Select/index.js +1 -1
  470. package/dist/components/Sidebar/index.cjs +1 -1
  471. package/dist/components/Sidebar/index.js +1 -1
  472. package/dist/components/Slider/index.cjs +1 -1
  473. package/dist/components/Slider/index.js +1 -1
  474. package/dist/components/SpeedDial/index.cjs +1 -1
  475. package/dist/components/SpeedDial/index.js +1 -1
  476. package/dist/components/Stepper/index.cjs +1 -1
  477. package/dist/components/Stepper/index.js +1 -1
  478. package/dist/components/SwatchPicker/index.cjs +1 -1
  479. package/dist/components/SwatchPicker/index.js +1 -1
  480. package/dist/components/Table/index.cjs +1 -1
  481. package/dist/components/Table/index.js +1 -1
  482. package/dist/components/Tabs/index.cjs +1 -1
  483. package/dist/components/Tabs/index.js +1 -1
  484. package/dist/components/TagsField/index.cjs +1 -1
  485. package/dist/components/TagsField/index.js +1 -1
  486. package/dist/components/TextField/index.cjs +1 -1
  487. package/dist/components/TextField/index.js +1 -1
  488. package/dist/components/ThemeToggle/index.cjs +1 -1
  489. package/dist/components/ThemeToggle/index.js +1 -1
  490. package/dist/components/TimePicker/index.cjs +1 -1
  491. package/dist/components/TimePicker/index.js +1 -1
  492. package/dist/components/Timeline/Timeline.d.cts +16 -4
  493. package/dist/components/Timeline/Timeline.d.ts +16 -4
  494. package/dist/components/Timeline/TimelineItem.d.cts +12 -6
  495. package/dist/components/Timeline/TimelineItem.d.ts +12 -6
  496. package/dist/components/Timeline/index.cjs +1 -1
  497. package/dist/components/Timeline/index.d.cts +1 -1
  498. package/dist/components/Timeline/index.d.ts +1 -1
  499. package/dist/components/Timeline/index.js +1 -1
  500. package/dist/components/Timeline/timelineContext.d.cts +3 -2
  501. package/dist/components/Timeline/timelineContext.d.ts +3 -2
  502. package/dist/components/Toast/index.cjs +1 -1
  503. package/dist/components/Toast/index.js +1 -1
  504. package/dist/components/ToggleButton/index.cjs +1 -1
  505. package/dist/components/ToggleButton/index.js +1 -1
  506. package/dist/components/TranslatedFields/index.cjs +1 -1
  507. package/dist/components/TranslatedFields/index.js +1 -1
  508. package/dist/components/UserCard/index.cjs +1 -1
  509. package/dist/components/UserCard/index.js +1 -1
  510. package/dist/components/index.d.cts +1 -0
  511. package/dist/components/index.d.ts +1 -0
  512. package/dist/entries/app.cjs +1 -1
  513. package/dist/entries/app.js +1 -1
  514. package/dist/entries/components.cjs +1 -1
  515. package/dist/entries/components.js +164 -159
  516. package/dist/entries/components.js.map +1 -1
  517. package/dist/entries/i18n.cjs +1 -1
  518. package/dist/entries/i18n.js +2 -2
  519. package/dist/entries/icons.cjs +1 -1
  520. package/dist/entries/icons.js +1 -1
  521. package/dist/entries/theme.cjs +1 -1
  522. package/dist/entries/theme.js +1 -1
  523. package/dist/i18n/messages.d.cts +61 -4
  524. package/dist/i18n/messages.d.ts +61 -4
  525. package/dist/icons/names.d.cts +3 -3
  526. package/dist/icons/names.d.ts +3 -3
  527. package/dist/index.cjs +1 -1
  528. package/dist/index.css +1 -1
  529. package/dist/index.js +161 -156
  530. package/dist/index.js.map +1 -1
  531. package/dist/{messages-BiRLMy1E.js → messages-BZYBZ3GR.js} +101 -44
  532. package/dist/messages-BZYBZ3GR.js.map +1 -0
  533. package/dist/{messages-C_fRRCg6.cjs → messages-CTHjpVJq.cjs} +9 -9
  534. package/dist/messages-CTHjpVJq.cjs.map +1 -0
  535. package/dist/{useHomeTo-DdmOGy09.js → useHomeTo-Biyc-Un8.js} +2 -2
  536. package/dist/{useHomeTo-DdmOGy09.js.map → useHomeTo-Biyc-Un8.js.map} +1 -1
  537. package/dist/{useHomeTo-HCkVzGTu.cjs → useHomeTo-D7wcH6aw.cjs} +2 -2
  538. package/dist/{useHomeTo-HCkVzGTu.cjs.map → useHomeTo-D7wcH6aw.cjs.map} +1 -1
  539. package/dist/{useOptionMenu-BqCj10_a.cjs → useOptionMenu-B40OOVsO.cjs} +2 -2
  540. package/dist/{useOptionMenu-BqCj10_a.cjs.map → useOptionMenu-B40OOVsO.cjs.map} +1 -1
  541. package/dist/{useOptionMenu-EiyIkC3E.js → useOptionMenu-BTt8t9SM.js} +6 -6
  542. package/dist/{useOptionMenu-EiyIkC3E.js.map → useOptionMenu-BTt8t9SM.js.map} +1 -1
  543. package/package.json +1 -6
  544. package/dist/Alert-B4XZDk16.cjs +0 -2
  545. package/dist/Alert-D5E1PLkV.js +0 -70
  546. package/dist/Breadcrumbs-DSUxcp6u.cjs +0 -2
  547. package/dist/Breadcrumbs-M31xyok8.js +0 -34
  548. package/dist/Button-CtADzomU.js +0 -72
  549. package/dist/Button-Q_5uA-zc.cjs +0 -2
  550. package/dist/Chip-CrBizrvG.cjs +0 -2
  551. package/dist/Chip-DYZ5w7VM.js +0 -92
  552. package/dist/ChoiceCardGroup-C7Eengyd.cjs +0 -2
  553. package/dist/ChoiceCardGroup-q0yN-TeQ.js +0 -180
  554. package/dist/CodeBlock-B6Eqc4HR.js +0 -96
  555. package/dist/CodeBlock-DW4uaZXM.cjs +0 -2
  556. package/dist/DashedButton-Dw7xHgIp.cjs +0 -2
  557. package/dist/DashedButton-csz6Jt_K.js +0 -58
  558. package/dist/DatePicker.module-BDtTsg8M.cjs +0 -2
  559. package/dist/DatePicker.module-CMMQyEhG.js +0 -138
  560. package/dist/DescriptionList-BBvfABps.cjs +0 -2
  561. package/dist/Dropdown-CMjURWYd.cjs +0 -2
  562. package/dist/Dropdown-CMjURWYd.cjs.map +0 -1
  563. package/dist/Dropdown-CnDBlB02.js +0 -146
  564. package/dist/Dropdown-CnDBlB02.js.map +0 -1
  565. package/dist/FileCard-BqMproT9.cjs +0 -2
  566. package/dist/FileUploader-BimFH5d8.cjs +0 -2
  567. package/dist/FileUploader-BimFH5d8.cjs.map +0 -1
  568. package/dist/FileUploader-LJIMh5_b.js +0 -707
  569. package/dist/FileUploader-LJIMh5_b.js.map +0 -1
  570. package/dist/Icon-B6lz-V0A.cjs +0 -2
  571. package/dist/Icon-B6lz-V0A.cjs.map +0 -1
  572. package/dist/Icon-D5TxgfCc.js +0 -5404
  573. package/dist/Icon-D5TxgfCc.js.map +0 -1
  574. package/dist/IconButton-BoURJOUD.js +0 -68
  575. package/dist/IconButton-CiDPeKM4.cjs +0 -2
  576. package/dist/Link-BQlvsu9V.js +0 -48
  577. package/dist/Link-GZT51mKx.cjs +0 -2
  578. package/dist/ListItem-2Lr5_NRY.js +0 -76
  579. package/dist/ListItem-DkCYXucd.cjs +0 -2
  580. package/dist/Modal-CYcVOzID.js +0 -206
  581. package/dist/Modal-CYcVOzID.js.map +0 -1
  582. package/dist/Modal-DwY3jGHE.cjs +0 -2
  583. package/dist/Modal-DwY3jGHE.cjs.map +0 -1
  584. package/dist/MultiSelect-DJ6tRseY.cjs +0 -2
  585. package/dist/MultiSelect-svEVZNbp.js +0 -219
  586. package/dist/OtpField-DlkGju72.cjs +0 -2
  587. package/dist/Pagination-CAD9_Nr_.cjs +0 -2
  588. package/dist/Pagination-CX0S1RrF.js +0 -139
  589. package/dist/PhoneField-Dlnnv4DU.cjs +0 -2
  590. package/dist/RichTextEditor-Ba1G_qXu.cjs +0 -2
  591. package/dist/RichTextEditor-Ba1G_qXu.cjs.map +0 -1
  592. package/dist/RichTextEditor-CJcbxQ6H.js +0 -916
  593. package/dist/RichTextEditor-CJcbxQ6H.js.map +0 -1
  594. package/dist/Select-BrjXCXtl.cjs +0 -2
  595. package/dist/Sidebar-DLlqHvQJ.cjs +0 -2
  596. package/dist/Stepper-BDQt-oVG.js +0 -168
  597. package/dist/Stepper-e8qBsKYW.cjs +0 -2
  598. package/dist/Table-C14fRX1U.cjs +0 -2
  599. package/dist/Table-C14fRX1U.cjs.map +0 -1
  600. package/dist/Table-ChdM_vyi.js.map +0 -1
  601. package/dist/Tabs-BxZrgozI.js +0 -193
  602. package/dist/Tabs-C4kB1yfG.cjs +0 -2
  603. package/dist/TimeColumns-B8KTj-tc.cjs +0 -2
  604. package/dist/TimeColumns-BWcuu3l7.js +0 -147
  605. package/dist/Timeline-Cb1krSlo.js +0 -70
  606. package/dist/Timeline-Cb1krSlo.js.map +0 -1
  607. package/dist/Timeline-CmluHBIT.cjs +0 -2
  608. package/dist/Timeline-CmluHBIT.cjs.map +0 -1
  609. package/dist/ToggleButtonGroup-Ci_DFvdt.cjs +0 -2
  610. package/dist/chunks/icons/57-Bxh2lSz-.cjs +0 -1
  611. package/dist/chunks/icons/57-CkmrDM9A.js +0 -28
  612. package/dist/chunks/icons/8a-CThAqelS.js +0 -27
  613. package/dist/chunks/icons/8a-DRBAtpxY.cjs +0 -1
  614. package/dist/chunks/icons/97-J9NBhX2o.js +0 -14
  615. package/dist/chunks/icons/97-r2YXIQ_T.cjs +0 -1
  616. package/dist/chunks/icons/b8-CyIivk3C.cjs +0 -1
  617. package/dist/chunks/icons/b8-DcK0w8WM.js +0 -29
  618. package/dist/chunks/icons/d5-3fWtNlXW.js +0 -20
  619. package/dist/chunks/icons/d5-CoG_Hfw9.cjs +0 -1
  620. package/dist/chunks/icons/d8-DsebfeMy.cjs +0 -1
  621. package/dist/chunks/icons/d8-DtOvDDrr.js +0 -20
  622. package/dist/chunks/icons/dd-BXVES9Ib.js +0 -22
  623. package/dist/chunks/icons/dd-beaqCKss.cjs +0 -1
  624. package/dist/messages-BiRLMy1E.js.map +0 -1
  625. package/dist/messages-C_fRRCg6.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Slider-B5iG-HSw.js","sources":["../src/components/Slider/Slider.tsx"],"sourcesContent":["import {\n forwardRef,\n useId,\n useState,\n type CSSProperties,\n type ChangeEvent,\n type FocusEvent,\n type InputHTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useFormContext } from '../../form/formContext'\nimport { Typography } from '../Typography'\nimport { useT, type ThemeColor } from '../../theme'\n// shared field chrome (wrapper / label / helper / required / error / sizes)\nimport fieldStyles from '../TextField/TextField.module.css'\nimport styles from './Slider.module.css'\n\nexport type SliderSize = 'sm' | 'md' | 'lg'\n/** A single value, or a `[start, end]` tuple when `range`. */\nexport type SliderValue = number | [number, number]\n\n/** A labeled tick under the track. */\nexport interface SliderMark {\n value: number\n label?: ReactNode\n}\n\nexport interface SliderProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'value' | 'defaultValue' | 'onChange' | 'type' | 'min' | 'max' | 'step' | 'color'\n> {\n /** Label rendered above the track. */\n label?: ReactNode\n /** Preset size — drives the track + thumb dimensions and the label/helper font. */\n size?: SliderSize\n /** Marks the field invalid: red focus ring + the `helperText` in the error color. */\n error?: boolean\n /** Helper / validation text under the track. Adopts the error color while `error`. */\n helperText?: ReactNode\n /** Adds a red asterisk after the label. */\n required?: boolean\n /** Stretches the slider to fill its container width. Defaults to `true`. */\n fullWidth?: boolean\n /** Two-thumb range mode — pick a `[start, end]` span (e.g. 5–10). The value becomes a tuple. */\n range?: boolean\n /** Controlled value — a `number`, or a `[start, end]` tuple when `range`. */\n value?: SliderValue\n /** Initial value for uncontrolled use. Defaults to `min` (or `[min, max]` when `range`). */\n defaultValue?: SliderValue\n /** Fires with the next value (a `number`, or a `[start, end]` tuple when `range`). */\n onChange?: (value: SliderValue) => void\n /** Minimum value. Defaults to `0`. */\n min?: number\n /** Maximum value. Defaults to `100`. */\n max?: number\n /** Increment the thumb snaps to (arrow keys + drag). Defaults to `1`. */\n step?: number\n /** Theme palette token that tints the fill + thumb. Defaults to `accent`. */\n color?: ThemeColor\n /** Disables the slider. */\n disabled?: boolean\n /**\n * Show the current value at the end of the label row. Defaults to `true`. Pass a function to format\n * it (receives the `number` or `[start, end]`), or `false` to hide it.\n */\n valueLabel?: boolean | ((value: SliderValue) => ReactNode)\n /** Optional labeled ticks under the track (e.g. `[{ value: 0, label: 'Min' }, …]`). Single mode only — ignored with `range`. */\n marks?: SliderMark[]\n}\n\nconst clamp = (n: number, lo: number, hi: number) => Math.min(Math.max(n, lo), hi)\nconst toPercent = (v: number, min: number, max: number) =>\n max > min ? ((v - min) / (max - min)) * 100 : 0\n\n/**\n * A range slider — drag (or arrow-key / Home / End) a thumb along the track to pick a number, snapping\n * to `step`. Built on a native `<input type=\"range\">`, so keyboard, dragging, step/min/max, and a11y\n * come for free; the track / fill / thumb are styled with `--tz-*` tokens and tinted by `color`. Pass\n * **`range`** for a two-thumb span (the value becomes a `[start, end]` tuple). Controlled (`value` +\n * `onChange`) or uncontrolled (`defaultValue`); a `name` binds it to a surrounding `<Form>` — the form\n * value is a real `number` (or `[start, end]`), validated with `z.number()` / `z.tuple([…])`.\n */\nexport const Slider = forwardRef<HTMLInputElement, SliderProps>(function Slider(\n {\n label,\n size = 'md',\n error,\n helperText,\n required = false,\n fullWidth = true,\n range = false,\n value,\n defaultValue,\n onChange,\n min = 0,\n max = 100,\n step = 1,\n color = 'accent',\n disabled = false,\n valueLabel = true,\n marks,\n name,\n onBlur,\n id: idProp,\n className,\n style,\n ...props\n },\n ref,\n) {\n const t = useT()\n const reactId = useId()\n const id = idProp ?? reactId\n const helperId = `${id}-helper`\n\n // Auto-bind to a surrounding <Form> by `name` — the form value is a real number (or tuple); the\n // touched/error state comes from field(), the raw value from values[name] (tuples must not be coerced).\n const form = useFormContext()\n const isFormBound = Boolean(form && name)\n const bound = form && name ? form.field(name) : undefined\n\n const fallback: SliderValue = range ? [min, max] : min\n const externalValue: SliderValue | undefined =\n value !== undefined\n ? value\n : isFormBound\n ? ((form!.values[name!] as SliderValue | undefined) ?? fallback)\n : undefined\n const isControlled = externalValue !== undefined\n const [internal, setInternal] = useState<SliderValue>(defaultValue ?? fallback)\n const raw = isControlled ? externalValue! : internal\n\n // Normalize to the active shape (clamped, and — for a range — ordered low ≤ high).\n const tuple = Array.isArray(raw) ? raw : [min, raw]\n const lo = clamp(Math.min(tuple[0], tuple[1]), min, max)\n const hi = clamp(Math.max(tuple[0], tuple[1]), min, max)\n const single = clamp(Array.isArray(raw) ? raw[0] : raw, min, max)\n\n const resolvedError = error ?? bound?.error ?? false\n const resolvedHelperText = helperText ?? bound?.helperText\n\n const commit = (next: SliderValue) => {\n if (!isControlled) setInternal(next)\n if (isFormBound) form!.setValue(name!, next)\n onChange?.(next)\n }\n const commitRange = (nextLo: number, nextHi: number) => {\n const l = clamp(nextLo, min, max)\n const h = clamp(nextHi, min, max)\n commit([Math.min(l, h), Math.max(l, h)])\n }\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n bound?.onBlur(event)\n onBlur?.(event)\n }\n\n const showValue = valueLabel !== false\n const currentValue: SliderValue = range ? [lo, hi] : single\n const renderedValue =\n typeof valueLabel === 'function' ? valueLabel(currentValue) : range ? `${lo} – ${hi}` : single\n\n const loPct = toPercent(lo, min, max)\n const hiPct = toPercent(hi, min, max)\n\n return (\n <div\n className={clsx(\n fieldStyles.field,\n fieldStyles[size],\n styles[size],\n fullWidth && fieldStyles.fullWidth,\n resolvedError && fieldStyles.error,\n disabled && fieldStyles.disabled,\n className,\n )}\n style={\n {\n '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`,\n '--tz-slider-fill': `${toPercent(single, min, max)}%`,\n ...style,\n } as CSSProperties\n }\n >\n {(label != null || showValue) && (\n <div className={styles.labelRow}>\n {label != null ? (\n <label htmlFor={id} className={fieldStyles.label}>\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {label}\n </Typography>\n {required && (\n <span className={fieldStyles.required} aria-hidden=\"true\">\n *\n </span>\n )}\n </label>\n ) : (\n <span />\n )}\n {showValue && (\n <Typography as=\"span\" variant=\"bodySmall\" className={styles.value}>\n {renderedValue}\n </Typography>\n )}\n </div>\n )}\n\n {range ? (\n <div className={clsx(styles.track, styles.rangeTrack)}>\n <span className={styles.rail} aria-hidden />\n <span\n className={styles.rangeFill}\n aria-hidden\n style={{ left: `${loPct}%`, width: `${hiPct - loPct}%` }}\n />\n {/* start thumb — can't pass the end thumb */}\n <input\n ref={ref}\n id={id}\n name={name}\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={lo}\n onChange={(e: ChangeEvent<HTMLInputElement>) =>\n commitRange(Math.min(Number(e.target.value), hi), hi)\n }\n onBlur={handleBlur}\n disabled={disabled}\n className={clsx(styles.input, styles.rangeInput)}\n // end thumb sits on top by default (z 4); raise the start above it (z 5) only when both pile\n // at max, so whichever thumb needs grabbing is always reachable\n style={{ zIndex: lo >= max ? 5 : 3 }}\n aria-label={\n typeof label === 'string' ? t('slider.labelStart', { label }) : t('slider.rangeStart')\n }\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n {...props}\n />\n {/* end thumb — can't pass the start thumb */}\n <input\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={hi}\n onChange={(e: ChangeEvent<HTMLInputElement>) =>\n commitRange(lo, Math.max(Number(e.target.value), lo))\n }\n onBlur={handleBlur}\n disabled={disabled}\n className={clsx(styles.input, styles.rangeInput)}\n style={{ zIndex: 4 }}\n aria-label={\n typeof label === 'string' ? t('slider.labelEnd', { label }) : t('slider.rangeEnd')\n }\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n />\n </div>\n ) : (\n <div className={clsx(styles.track, marks != null && marks.length > 0 && styles.hasMarks)}>\n <input\n ref={ref}\n id={id}\n name={name}\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={single}\n onChange={(e: ChangeEvent<HTMLInputElement>) => commit(Number(e.target.value))}\n onBlur={handleBlur}\n disabled={disabled}\n className={styles.input}\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n {...props}\n />\n {marks != null && marks.length > 0 && (\n <div className={styles.marks} aria-hidden>\n {marks.map((mark) => (\n <span\n key={mark.value}\n className={styles.mark}\n style={{ left: `${toPercent(mark.value, min, max)}%` }}\n >\n <span className={styles.tick} />\n {mark.label != null && <span className={styles.markLabel}>{mark.label}</span>}\n </span>\n ))}\n </div>\n )}\n </div>\n )}\n\n {resolvedHelperText != null && (\n <Typography\n as=\"span\"\n id={helperId}\n variant=\"bodySmall\"\n color={resolvedError ? 'error' : 'muted'}\n className={fieldStyles.helper}\n >\n {resolvedHelperText}\n </Typography>\n )}\n </div>\n )\n})\n"],"names":["clamp","n","lo","hi","toPercent","v","min","max","Slider","forwardRef","label","size","error","helperText","required","fullWidth","range","value","defaultValue","onChange","step","color","disabled","valueLabel","marks","name","onBlur","idProp","className","style","props","ref","t","useT","reactId","useId","id","helperId","form","useFormContext","isFormBound","bound","fallback","externalValue","isControlled","internal","setInternal","useState","raw","tuple","single","resolvedError","resolvedHelperText","commit","next","commitRange","nextLo","nextHi","l","h","handleBlur","event","showValue","renderedValue","loPct","hiPct","jsxs","clsx","fieldStyles","styles","jsx","Typography","mark"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;GAuEMA,IAAQ,CAACC,GAAWC,GAAYC,MAAe,KAAK,IAAI,KAAK,IAAIF,GAAGC,CAAE,GAAGC,CAAE,GAC3EC,IAAY,CAACC,GAAWC,GAAaC,MACzCA,IAAMD,KAAQD,IAAIC,MAAQC,IAAMD,KAAQ,MAAM,GAUnCE,KAASC,GAA0C,SAC9D;AAAA,EACE,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC,IAAQ;AAAA,EACR,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,KAAAb,IAAM;AAAA,EACN,KAAAC,IAAM;AAAA,EACN,MAAAa,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,UAAAC,IAAW;AAAA,EACX,YAAAC,IAAa;AAAA,EACb,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,IAAIC;AAAA,EACJ,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAIC,GAAA,GACJC,KAAUC,GAAA,GACVC,IAAKT,MAAUO,IACfG,IAAW,GAAGD,CAAE,WAIhBE,IAAOC,GAAA,GACPC,IAAc,GAAQF,KAAQb,IAC9BgB,IAAQH,KAAQb,IAAOa,EAAK,MAAMb,CAAI,IAAI,QAE1CiB,IAAwB1B,IAAQ,CAACV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,UAAK,WAAWD,EAAO,WAAY,UAAAG,EAAK,MAAA,CAAM;AAAA,cAAA;AAAA,YAAA;AAAA,YALjEA,EAAK;AAAA,UAAA,CAOb,EAAA,CACH;AAAA,QAAA,GAEJ;AAAA,QAGDpB,KAAsB,QACrB,gBAAAkB;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,IAAG;AAAA,YACH,IAAIlC;AAAA,YACJ,SAAQ;AAAA,YACR,OAAOc,IAAgB,UAAU;AAAA,YACjC,WAAWiB,EAAY;AAAA,YAEtB,UAAAhB;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
1
+ {"version":3,"file":"Slider-D-QjclQJ.js","sources":["../src/components/Slider/Slider.tsx"],"sourcesContent":["import {\n forwardRef,\n useId,\n useState,\n type CSSProperties,\n type ChangeEvent,\n type FocusEvent,\n type InputHTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useFormContext } from '../../form/formContext'\nimport { Typography } from '../Typography'\nimport { useT, type ThemeColor } from '../../theme'\n// shared field chrome (wrapper / label / helper / required / error / sizes)\nimport fieldStyles from '../TextField/TextField.module.css'\nimport styles from './Slider.module.css'\n\nexport type SliderSize = 'sm' | 'md' | 'lg'\n/** A single value, or a `[start, end]` tuple when `range`. */\nexport type SliderValue = number | [number, number]\n\n/** A labeled tick under the track. */\nexport interface SliderMark {\n value: number\n label?: ReactNode\n}\n\nexport interface SliderProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'value' | 'defaultValue' | 'onChange' | 'type' | 'min' | 'max' | 'step' | 'color'\n> {\n /** Label rendered above the track. */\n label?: ReactNode\n /** Preset size — drives the track + thumb dimensions and the label/helper font. */\n size?: SliderSize\n /** Marks the field invalid: red focus ring + the `helperText` in the error color. */\n error?: boolean\n /** Helper / validation text under the track. Adopts the error color while `error`. */\n helperText?: ReactNode\n /** Adds a red asterisk after the label. */\n required?: boolean\n /** Stretches the slider to fill its container width. Defaults to `true`. */\n fullWidth?: boolean\n /** Two-thumb range mode — pick a `[start, end]` span (e.g. 5–10). The value becomes a tuple. */\n range?: boolean\n /** Controlled value — a `number`, or a `[start, end]` tuple when `range`. */\n value?: SliderValue\n /** Initial value for uncontrolled use. Defaults to `min` (or `[min, max]` when `range`). */\n defaultValue?: SliderValue\n /** Fires with the next value (a `number`, or a `[start, end]` tuple when `range`). */\n onChange?: (value: SliderValue) => void\n /** Minimum value. Defaults to `0`. */\n min?: number\n /** Maximum value. Defaults to `100`. */\n max?: number\n /** Increment the thumb snaps to (arrow keys + drag). Defaults to `1`. */\n step?: number\n /** Theme palette token that tints the fill + thumb. Defaults to `accent`. */\n color?: ThemeColor\n /** Disables the slider. */\n disabled?: boolean\n /**\n * Show the current value at the end of the label row. Defaults to `true`. Pass a function to format\n * it (receives the `number` or `[start, end]`), or `false` to hide it.\n */\n valueLabel?: boolean | ((value: SliderValue) => ReactNode)\n /** Optional labeled ticks under the track (e.g. `[{ value: 0, label: 'Min' }, …]`). Single mode only — ignored with `range`. */\n marks?: SliderMark[]\n}\n\nconst clamp = (n: number, lo: number, hi: number) => Math.min(Math.max(n, lo), hi)\nconst toPercent = (v: number, min: number, max: number) =>\n max > min ? ((v - min) / (max - min)) * 100 : 0\n\n/**\n * A range slider — drag (or arrow-key / Home / End) a thumb along the track to pick a number, snapping\n * to `step`. Built on a native `<input type=\"range\">`, so keyboard, dragging, step/min/max, and a11y\n * come for free; the track / fill / thumb are styled with `--tz-*` tokens and tinted by `color`. Pass\n * **`range`** for a two-thumb span (the value becomes a `[start, end]` tuple). Controlled (`value` +\n * `onChange`) or uncontrolled (`defaultValue`); a `name` binds it to a surrounding `<Form>` — the form\n * value is a real `number` (or `[start, end]`), validated with `z.number()` / `z.tuple([…])`.\n */\nexport const Slider = forwardRef<HTMLInputElement, SliderProps>(function Slider(\n {\n label,\n size = 'md',\n error,\n helperText,\n required = false,\n fullWidth = true,\n range = false,\n value,\n defaultValue,\n onChange,\n min = 0,\n max = 100,\n step = 1,\n color = 'accent',\n disabled = false,\n valueLabel = true,\n marks,\n name,\n onBlur,\n id: idProp,\n className,\n style,\n ...props\n },\n ref,\n) {\n const t = useT()\n const reactId = useId()\n const id = idProp ?? reactId\n const helperId = `${id}-helper`\n\n // Auto-bind to a surrounding <Form> by `name` — the form value is a real number (or tuple); the\n // touched/error state comes from field(), the raw value from values[name] (tuples must not be coerced).\n const form = useFormContext()\n const isFormBound = Boolean(form && name)\n const bound = form && name ? form.field(name) : undefined\n\n const fallback: SliderValue = range ? [min, max] : min\n const externalValue: SliderValue | undefined =\n value !== undefined\n ? value\n : isFormBound\n ? ((form!.values[name!] as SliderValue | undefined) ?? fallback)\n : undefined\n const isControlled = externalValue !== undefined\n const [internal, setInternal] = useState<SliderValue>(defaultValue ?? fallback)\n const raw = isControlled ? externalValue! : internal\n\n // Normalize to the active shape (clamped, and — for a range — ordered low ≤ high).\n const tuple = Array.isArray(raw) ? raw : [min, raw]\n const lo = clamp(Math.min(tuple[0], tuple[1]), min, max)\n const hi = clamp(Math.max(tuple[0], tuple[1]), min, max)\n const single = clamp(Array.isArray(raw) ? raw[0] : raw, min, max)\n\n const resolvedError = error ?? bound?.error ?? false\n const resolvedHelperText = helperText ?? bound?.helperText\n\n const commit = (next: SliderValue) => {\n if (!isControlled) setInternal(next)\n if (isFormBound) form!.setValue(name!, next)\n onChange?.(next)\n }\n const commitRange = (nextLo: number, nextHi: number) => {\n const l = clamp(nextLo, min, max)\n const h = clamp(nextHi, min, max)\n commit([Math.min(l, h), Math.max(l, h)])\n }\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n bound?.onBlur(event)\n onBlur?.(event)\n }\n\n const showValue = valueLabel !== false\n const currentValue: SliderValue = range ? [lo, hi] : single\n const renderedValue =\n typeof valueLabel === 'function' ? valueLabel(currentValue) : range ? `${lo} – ${hi}` : single\n\n const loPct = toPercent(lo, min, max)\n const hiPct = toPercent(hi, min, max)\n\n return (\n <div\n className={clsx(\n fieldStyles.field,\n fieldStyles[size],\n styles[size],\n fullWidth && fieldStyles.fullWidth,\n resolvedError && fieldStyles.error,\n disabled && fieldStyles.disabled,\n className,\n )}\n style={\n {\n '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`,\n '--tz-slider-fill': `${toPercent(single, min, max)}%`,\n ...style,\n } as CSSProperties\n }\n >\n {(label != null || showValue) && (\n <div className={styles.labelRow}>\n {label != null ? (\n <label htmlFor={id} className={fieldStyles.label}>\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {label}\n </Typography>\n {required && (\n <span className={fieldStyles.required} aria-hidden=\"true\">\n *\n </span>\n )}\n </label>\n ) : (\n <span />\n )}\n {showValue && (\n <Typography as=\"span\" variant=\"bodySmall\" className={styles.value}>\n {renderedValue}\n </Typography>\n )}\n </div>\n )}\n\n {range ? (\n <div className={clsx(styles.track, styles.rangeTrack)}>\n <span className={styles.rail} aria-hidden />\n <span\n className={styles.rangeFill}\n aria-hidden\n style={{ left: `${loPct}%`, width: `${hiPct - loPct}%` }}\n />\n {/* start thumb — can't pass the end thumb */}\n <input\n ref={ref}\n id={id}\n name={name}\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={lo}\n onChange={(e: ChangeEvent<HTMLInputElement>) =>\n commitRange(Math.min(Number(e.target.value), hi), hi)\n }\n onBlur={handleBlur}\n disabled={disabled}\n className={clsx(styles.input, styles.rangeInput)}\n // end thumb sits on top by default (z 4); raise the start above it (z 5) only when both pile\n // at max, so whichever thumb needs grabbing is always reachable\n style={{ zIndex: lo >= max ? 5 : 3 }}\n aria-label={\n typeof label === 'string' ? t('slider.labelStart', { label }) : t('slider.rangeStart')\n }\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n {...props}\n />\n {/* end thumb — can't pass the start thumb */}\n <input\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={hi}\n onChange={(e: ChangeEvent<HTMLInputElement>) =>\n commitRange(lo, Math.max(Number(e.target.value), lo))\n }\n onBlur={handleBlur}\n disabled={disabled}\n className={clsx(styles.input, styles.rangeInput)}\n style={{ zIndex: 4 }}\n aria-label={\n typeof label === 'string' ? t('slider.labelEnd', { label }) : t('slider.rangeEnd')\n }\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n />\n </div>\n ) : (\n <div className={clsx(styles.track, marks != null && marks.length > 0 && styles.hasMarks)}>\n <input\n ref={ref}\n id={id}\n name={name}\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={single}\n onChange={(e: ChangeEvent<HTMLInputElement>) => commit(Number(e.target.value))}\n onBlur={handleBlur}\n disabled={disabled}\n className={styles.input}\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n {...props}\n />\n {marks != null && marks.length > 0 && (\n <div className={styles.marks} aria-hidden>\n {marks.map((mark) => (\n <span\n key={mark.value}\n className={styles.mark}\n style={{ left: `${toPercent(mark.value, min, max)}%` }}\n >\n <span className={styles.tick} />\n {mark.label != null && <span className={styles.markLabel}>{mark.label}</span>}\n </span>\n ))}\n </div>\n )}\n </div>\n )}\n\n {resolvedHelperText != null && (\n <Typography\n as=\"span\"\n id={helperId}\n variant=\"bodySmall\"\n color={resolvedError ? 'error' : 'muted'}\n className={fieldStyles.helper}\n >\n {resolvedHelperText}\n </Typography>\n )}\n </div>\n )\n})\n"],"names":["clamp","n","lo","hi","toPercent","v","min","max","Slider","forwardRef","label","size","error","helperText","required","fullWidth","range","value","defaultValue","onChange","step","color","disabled","valueLabel","marks","name","onBlur","idProp","className","style","props","ref","t","useT","reactId","useId","id","helperId","form","useFormContext","isFormBound","bound","fallback","externalValue","isControlled","internal","setInternal","useState","raw","tuple","single","resolvedError","resolvedHelperText","commit","next","commitRange","nextLo","nextHi","l","h","handleBlur","event","showValue","renderedValue","loPct","hiPct","jsxs","clsx","fieldStyles","styles","jsx","Typography","mark"],"mappings":";;;;;;;;;;;;;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B,UAAU;AAAA,YACjC,WAAWiB,EAAY;AAAA,YAEtB,UAAAhB;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";const s=require("react/jsx-runtime"),R=require("react"),v=require("clsx"),oe=require("./formContext-bTWrqdEV.cjs"),V=require("./Typography-d97DdbNd.cjs"),c=require("./TextField.module-DsNCo8vN.cjs"),de=require("./ConfigProvider-Ci9Q2HLF.cjs"),ue="_sm_s0efw_5",_e="_md_s0efw_9",fe="_lg_s0efw_13",he="_labelRow_s0efw_18",pe="_value_s0efw_24",ye="_track_s0efw_30",ve="_hasMarks_s0efw_37",ge="_input_s0efw_42",we="_marks_s0efw_109",ke="_mark_s0efw_109",me="_tick_s0efw_128",xe="_markLabel_s0efw_134",je="_rangeTrack_s0efw_141",Ne="_rail_s0efw_146",be="_rangeFill_s0efw_147",Se="_rangeInput_s0efw_164",l={sm:ue,md:_e,lg:fe,labelRow:he,value:pe,track:ye,hasMarks:ve,input:ge,marks:we,mark:ke,tick:me,markLabel:xe,rangeTrack:je,rail:Ne,rangeFill:be,rangeInput:Se},g=(w,t,i)=>Math.min(Math.max(w,t),i),M=(w,t,i)=>i>t?(w-t)/(i-t)*100:0,Me=R.forwardRef(function({label:t,size:i="md",error:O,helperText:Q,required:U=!1,fullWidth:X=!0,range:k=!1,value:z,defaultValue:Y,onChange:T,min:a=0,max:r=100,step:I=1,color:Z="accent",disabled:m=!1,valueLabel:q=!0,marks:f,name:o,onBlur:F,id:ee,className:se,style:le,...A},P){const x=de.useT(),ae=R.useId(),j=ee??ae,N=`${j}-helper`,h=oe.useFormContext(),B=!!(h&&o),n=h&&o?h.field(o):void 0,C=k?[a,r]:a,E=z!==void 0?z:B?h.values[o]??C:void 0,L=E!==void 0,[re,te]=R.useState(Y??C),u=L?E:re,b=Array.isArray(u)?u:[a,u],d=g(Math.min(b[0],b[1]),a,r),_=g(Math.max(b[0],b[1]),a,r),S=g(Array.isArray(u)?u[0]:u,a,r),p=O??(n==null?void 0:n.error)??!1,y=Q??(n==null?void 0:n.helperText),H=e=>{L||te(e),B&&h.setValue(o,e),T==null||T(e)},W=(e,ie)=>{const J=g(e,a,r),K=g(ie,a,r);H([Math.min(J,K),Math.max(J,K)])},$=e=>{n==null||n.onBlur(e),F==null||F(e)},D=q!==!1,ne=typeof q=="function"?q(k?[d,_]:S):k?`${d} – ${_}`:S,G=M(d,a,r),ce=M(_,a,r);return s.jsxs("div",{className:v.clsx(c.fieldStyles.field,c.fieldStyles[i],l[i],X&&c.fieldStyles.fullWidth,p&&c.fieldStyles.error,m&&c.fieldStyles.disabled,se),style:{"--tz-btn-rgb":`var(--tz-color-${Z}-rgb)`,"--tz-slider-fill":`${M(S,a,r)}%`,...le},children:[(t!=null||D)&&s.jsxs("div",{className:l.labelRow,children:[t!=null?s.jsxs("label",{htmlFor:j,className:c.fieldStyles.label,children:[s.jsx(V.Typography,{as:"span",variant:"bodySmall",color:"muted",children:t}),U&&s.jsx("span",{className:c.fieldStyles.required,"aria-hidden":"true",children:"*"})]}):s.jsx("span",{}),D&&s.jsx(V.Typography,{as:"span",variant:"bodySmall",className:l.value,children:ne})]}),k?s.jsxs("div",{className:v.clsx(l.track,l.rangeTrack),children:[s.jsx("span",{className:l.rail,"aria-hidden":!0}),s.jsx("span",{className:l.rangeFill,"aria-hidden":!0,style:{left:`${G}%`,width:`${ce-G}%`}}),s.jsx("input",{ref:P,id:j,name:o,type:"range",min:a,max:r,step:I,value:d,onChange:e=>W(Math.min(Number(e.target.value),_),_),onBlur:$,disabled:m,className:v.clsx(l.input,l.rangeInput),style:{zIndex:d>=r?5:3},"aria-label":typeof t=="string"?x("slider.labelStart",{label:t}):x("slider.rangeStart"),"aria-invalid":p||void 0,"aria-describedby":y!=null?N:void 0,...A}),s.jsx("input",{type:"range",min:a,max:r,step:I,value:_,onChange:e=>W(d,Math.max(Number(e.target.value),d)),onBlur:$,disabled:m,className:v.clsx(l.input,l.rangeInput),style:{zIndex:4},"aria-label":typeof t=="string"?x("slider.labelEnd",{label:t}):x("slider.rangeEnd"),"aria-invalid":p||void 0,"aria-describedby":y!=null?N:void 0})]}):s.jsxs("div",{className:v.clsx(l.track,f!=null&&f.length>0&&l.hasMarks),children:[s.jsx("input",{ref:P,id:j,name:o,type:"range",min:a,max:r,step:I,value:S,onChange:e=>H(Number(e.target.value)),onBlur:$,disabled:m,className:l.input,"aria-invalid":p||void 0,"aria-describedby":y!=null?N:void 0,...A}),f!=null&&f.length>0&&s.jsx("div",{className:l.marks,"aria-hidden":!0,children:f.map(e=>s.jsxs("span",{className:l.mark,style:{left:`${M(e.value,a,r)}%`},children:[s.jsx("span",{className:l.tick}),e.label!=null&&s.jsx("span",{className:l.markLabel,children:e.label})]},e.value))})]}),y!=null&&s.jsx(V.Typography,{as:"span",id:N,variant:"bodySmall",color:p?"error":"muted",className:c.fieldStyles.helper,children:y})]})});exports.Slider=Me;
2
- //# sourceMappingURL=Slider-DTnui01g.cjs.map
1
+ "use strict";const s=require("react/jsx-runtime"),R=require("react"),v=require("clsx"),oe=require("./formContext-bTWrqdEV.cjs"),V=require("./Typography-d97DdbNd.cjs"),c=require("./TextField.module-DsNCo8vN.cjs"),de=require("./ConfigProvider-Cf-awvZs.cjs"),ue="_sm_s0efw_5",_e="_md_s0efw_9",fe="_lg_s0efw_13",he="_labelRow_s0efw_18",pe="_value_s0efw_24",ye="_track_s0efw_30",ve="_hasMarks_s0efw_37",ge="_input_s0efw_42",we="_marks_s0efw_109",ke="_mark_s0efw_109",me="_tick_s0efw_128",xe="_markLabel_s0efw_134",je="_rangeTrack_s0efw_141",Ne="_rail_s0efw_146",be="_rangeFill_s0efw_147",Se="_rangeInput_s0efw_164",l={sm:ue,md:_e,lg:fe,labelRow:he,value:pe,track:ye,hasMarks:ve,input:ge,marks:we,mark:ke,tick:me,markLabel:xe,rangeTrack:je,rail:Ne,rangeFill:be,rangeInput:Se},g=(w,t,i)=>Math.min(Math.max(w,t),i),M=(w,t,i)=>i>t?(w-t)/(i-t)*100:0,Me=R.forwardRef(function({label:t,size:i="md",error:O,helperText:Q,required:U=!1,fullWidth:X=!0,range:k=!1,value:z,defaultValue:Y,onChange:T,min:a=0,max:r=100,step:I=1,color:Z="accent",disabled:m=!1,valueLabel:q=!0,marks:f,name:o,onBlur:F,id:ee,className:se,style:le,...A},P){const x=de.useT(),ae=R.useId(),j=ee??ae,N=`${j}-helper`,h=oe.useFormContext(),B=!!(h&&o),n=h&&o?h.field(o):void 0,C=k?[a,r]:a,E=z!==void 0?z:B?h.values[o]??C:void 0,L=E!==void 0,[re,te]=R.useState(Y??C),u=L?E:re,b=Array.isArray(u)?u:[a,u],d=g(Math.min(b[0],b[1]),a,r),_=g(Math.max(b[0],b[1]),a,r),S=g(Array.isArray(u)?u[0]:u,a,r),p=O??(n==null?void 0:n.error)??!1,y=Q??(n==null?void 0:n.helperText),H=e=>{L||te(e),B&&h.setValue(o,e),T==null||T(e)},W=(e,ie)=>{const J=g(e,a,r),K=g(ie,a,r);H([Math.min(J,K),Math.max(J,K)])},$=e=>{n==null||n.onBlur(e),F==null||F(e)},D=q!==!1,ne=typeof q=="function"?q(k?[d,_]:S):k?`${d} – ${_}`:S,G=M(d,a,r),ce=M(_,a,r);return s.jsxs("div",{className:v.clsx(c.fieldStyles.field,c.fieldStyles[i],l[i],X&&c.fieldStyles.fullWidth,p&&c.fieldStyles.error,m&&c.fieldStyles.disabled,se),style:{"--tz-btn-rgb":`var(--tz-color-${Z}-rgb)`,"--tz-slider-fill":`${M(S,a,r)}%`,...le},children:[(t!=null||D)&&s.jsxs("div",{className:l.labelRow,children:[t!=null?s.jsxs("label",{htmlFor:j,className:c.fieldStyles.label,children:[s.jsx(V.Typography,{as:"span",variant:"bodySmall",color:"muted",children:t}),U&&s.jsx("span",{className:c.fieldStyles.required,"aria-hidden":"true",children:"*"})]}):s.jsx("span",{}),D&&s.jsx(V.Typography,{as:"span",variant:"bodySmall",className:l.value,children:ne})]}),k?s.jsxs("div",{className:v.clsx(l.track,l.rangeTrack),children:[s.jsx("span",{className:l.rail,"aria-hidden":!0}),s.jsx("span",{className:l.rangeFill,"aria-hidden":!0,style:{left:`${G}%`,width:`${ce-G}%`}}),s.jsx("input",{ref:P,id:j,name:o,type:"range",min:a,max:r,step:I,value:d,onChange:e=>W(Math.min(Number(e.target.value),_),_),onBlur:$,disabled:m,className:v.clsx(l.input,l.rangeInput),style:{zIndex:d>=r?5:3},"aria-label":typeof t=="string"?x("slider.labelStart",{label:t}):x("slider.rangeStart"),"aria-invalid":p||void 0,"aria-describedby":y!=null?N:void 0,...A}),s.jsx("input",{type:"range",min:a,max:r,step:I,value:_,onChange:e=>W(d,Math.max(Number(e.target.value),d)),onBlur:$,disabled:m,className:v.clsx(l.input,l.rangeInput),style:{zIndex:4},"aria-label":typeof t=="string"?x("slider.labelEnd",{label:t}):x("slider.rangeEnd"),"aria-invalid":p||void 0,"aria-describedby":y!=null?N:void 0})]}):s.jsxs("div",{className:v.clsx(l.track,f!=null&&f.length>0&&l.hasMarks),children:[s.jsx("input",{ref:P,id:j,name:o,type:"range",min:a,max:r,step:I,value:S,onChange:e=>H(Number(e.target.value)),onBlur:$,disabled:m,className:l.input,"aria-invalid":p||void 0,"aria-describedby":y!=null?N:void 0,...A}),f!=null&&f.length>0&&s.jsx("div",{className:l.marks,"aria-hidden":!0,children:f.map(e=>s.jsxs("span",{className:l.mark,style:{left:`${M(e.value,a,r)}%`},children:[s.jsx("span",{className:l.tick}),e.label!=null&&s.jsx("span",{className:l.markLabel,children:e.label})]},e.value))})]}),y!=null&&s.jsx(V.Typography,{as:"span",id:N,variant:"bodySmall",color:p?"error":"muted",className:c.fieldStyles.helper,children:y})]})});exports.Slider=Me;
2
+ //# sourceMappingURL=Slider-DxnCQRSH.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Slider-DTnui01g.cjs","sources":["../src/components/Slider/Slider.tsx"],"sourcesContent":["import {\n forwardRef,\n useId,\n useState,\n type CSSProperties,\n type ChangeEvent,\n type FocusEvent,\n type InputHTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useFormContext } from '../../form/formContext'\nimport { Typography } from '../Typography'\nimport { useT, type ThemeColor } from '../../theme'\n// shared field chrome (wrapper / label / helper / required / error / sizes)\nimport fieldStyles from '../TextField/TextField.module.css'\nimport styles from './Slider.module.css'\n\nexport type SliderSize = 'sm' | 'md' | 'lg'\n/** A single value, or a `[start, end]` tuple when `range`. */\nexport type SliderValue = number | [number, number]\n\n/** A labeled tick under the track. */\nexport interface SliderMark {\n value: number\n label?: ReactNode\n}\n\nexport interface SliderProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'value' | 'defaultValue' | 'onChange' | 'type' | 'min' | 'max' | 'step' | 'color'\n> {\n /** Label rendered above the track. */\n label?: ReactNode\n /** Preset size — drives the track + thumb dimensions and the label/helper font. */\n size?: SliderSize\n /** Marks the field invalid: red focus ring + the `helperText` in the error color. */\n error?: boolean\n /** Helper / validation text under the track. Adopts the error color while `error`. */\n helperText?: ReactNode\n /** Adds a red asterisk after the label. */\n required?: boolean\n /** Stretches the slider to fill its container width. Defaults to `true`. */\n fullWidth?: boolean\n /** Two-thumb range mode — pick a `[start, end]` span (e.g. 5–10). The value becomes a tuple. */\n range?: boolean\n /** Controlled value — a `number`, or a `[start, end]` tuple when `range`. */\n value?: SliderValue\n /** Initial value for uncontrolled use. Defaults to `min` (or `[min, max]` when `range`). */\n defaultValue?: SliderValue\n /** Fires with the next value (a `number`, or a `[start, end]` tuple when `range`). */\n onChange?: (value: SliderValue) => void\n /** Minimum value. Defaults to `0`. */\n min?: number\n /** Maximum value. Defaults to `100`. */\n max?: number\n /** Increment the thumb snaps to (arrow keys + drag). Defaults to `1`. */\n step?: number\n /** Theme palette token that tints the fill + thumb. Defaults to `accent`. */\n color?: ThemeColor\n /** Disables the slider. */\n disabled?: boolean\n /**\n * Show the current value at the end of the label row. Defaults to `true`. Pass a function to format\n * it (receives the `number` or `[start, end]`), or `false` to hide it.\n */\n valueLabel?: boolean | ((value: SliderValue) => ReactNode)\n /** Optional labeled ticks under the track (e.g. `[{ value: 0, label: 'Min' }, …]`). Single mode only — ignored with `range`. */\n marks?: SliderMark[]\n}\n\nconst clamp = (n: number, lo: number, hi: number) => Math.min(Math.max(n, lo), hi)\nconst toPercent = (v: number, min: number, max: number) =>\n max > min ? ((v - min) / (max - min)) * 100 : 0\n\n/**\n * A range slider — drag (or arrow-key / Home / End) a thumb along the track to pick a number, snapping\n * to `step`. Built on a native `<input type=\"range\">`, so keyboard, dragging, step/min/max, and a11y\n * come for free; the track / fill / thumb are styled with `--tz-*` tokens and tinted by `color`. Pass\n * **`range`** for a two-thumb span (the value becomes a `[start, end]` tuple). Controlled (`value` +\n * `onChange`) or uncontrolled (`defaultValue`); a `name` binds it to a surrounding `<Form>` — the form\n * value is a real `number` (or `[start, end]`), validated with `z.number()` / `z.tuple([…])`.\n */\nexport const Slider = forwardRef<HTMLInputElement, SliderProps>(function Slider(\n {\n label,\n size = 'md',\n error,\n helperText,\n required = false,\n fullWidth = true,\n range = false,\n value,\n defaultValue,\n onChange,\n min = 0,\n max = 100,\n step = 1,\n color = 'accent',\n disabled = false,\n valueLabel = true,\n marks,\n name,\n onBlur,\n id: idProp,\n className,\n style,\n ...props\n },\n ref,\n) {\n const t = useT()\n const reactId = useId()\n const id = idProp ?? reactId\n const helperId = `${id}-helper`\n\n // Auto-bind to a surrounding <Form> by `name` — the form value is a real number (or tuple); the\n // touched/error state comes from field(), the raw value from values[name] (tuples must not be coerced).\n const form = useFormContext()\n const isFormBound = Boolean(form && name)\n const bound = form && name ? form.field(name) : undefined\n\n const fallback: SliderValue = range ? [min, max] : min\n const externalValue: SliderValue | undefined =\n value !== undefined\n ? value\n : isFormBound\n ? ((form!.values[name!] as SliderValue | undefined) ?? fallback)\n : undefined\n const isControlled = externalValue !== undefined\n const [internal, setInternal] = useState<SliderValue>(defaultValue ?? fallback)\n const raw = isControlled ? externalValue! : internal\n\n // Normalize to the active shape (clamped, and — for a range — ordered low ≤ high).\n const tuple = Array.isArray(raw) ? raw : [min, raw]\n const lo = clamp(Math.min(tuple[0], tuple[1]), min, max)\n const hi = clamp(Math.max(tuple[0], tuple[1]), min, max)\n const single = clamp(Array.isArray(raw) ? raw[0] : raw, min, max)\n\n const resolvedError = error ?? bound?.error ?? false\n const resolvedHelperText = helperText ?? bound?.helperText\n\n const commit = (next: SliderValue) => {\n if (!isControlled) setInternal(next)\n if (isFormBound) form!.setValue(name!, next)\n onChange?.(next)\n }\n const commitRange = (nextLo: number, nextHi: number) => {\n const l = clamp(nextLo, min, max)\n const h = clamp(nextHi, min, max)\n commit([Math.min(l, h), Math.max(l, h)])\n }\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n bound?.onBlur(event)\n onBlur?.(event)\n }\n\n const showValue = valueLabel !== false\n const currentValue: SliderValue = range ? [lo, hi] : single\n const renderedValue =\n typeof valueLabel === 'function' ? valueLabel(currentValue) : range ? `${lo} – ${hi}` : single\n\n const loPct = toPercent(lo, min, max)\n const hiPct = toPercent(hi, min, max)\n\n return (\n <div\n className={clsx(\n fieldStyles.field,\n fieldStyles[size],\n styles[size],\n fullWidth && fieldStyles.fullWidth,\n resolvedError && fieldStyles.error,\n disabled && fieldStyles.disabled,\n className,\n )}\n style={\n {\n '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`,\n '--tz-slider-fill': `${toPercent(single, min, max)}%`,\n ...style,\n } as CSSProperties\n }\n >\n {(label != null || showValue) && (\n <div className={styles.labelRow}>\n {label != null ? (\n <label htmlFor={id} className={fieldStyles.label}>\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {label}\n </Typography>\n {required && (\n <span className={fieldStyles.required} aria-hidden=\"true\">\n *\n </span>\n )}\n </label>\n ) : (\n <span />\n )}\n {showValue && (\n <Typography as=\"span\" variant=\"bodySmall\" className={styles.value}>\n {renderedValue}\n </Typography>\n )}\n </div>\n )}\n\n {range ? (\n <div className={clsx(styles.track, styles.rangeTrack)}>\n <span className={styles.rail} aria-hidden />\n <span\n className={styles.rangeFill}\n aria-hidden\n style={{ left: `${loPct}%`, width: `${hiPct - loPct}%` }}\n />\n {/* start thumb — can't pass the end thumb */}\n <input\n ref={ref}\n id={id}\n name={name}\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={lo}\n onChange={(e: ChangeEvent<HTMLInputElement>) =>\n commitRange(Math.min(Number(e.target.value), hi), hi)\n }\n onBlur={handleBlur}\n disabled={disabled}\n className={clsx(styles.input, styles.rangeInput)}\n // end thumb sits on top by default (z 4); raise the start above it (z 5) only when both pile\n // at max, so whichever thumb needs grabbing is always reachable\n style={{ zIndex: lo >= max ? 5 : 3 }}\n aria-label={\n typeof label === 'string' ? t('slider.labelStart', { label }) : t('slider.rangeStart')\n }\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n {...props}\n />\n {/* end thumb — can't pass the start thumb */}\n <input\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={hi}\n onChange={(e: ChangeEvent<HTMLInputElement>) =>\n commitRange(lo, Math.max(Number(e.target.value), lo))\n }\n onBlur={handleBlur}\n disabled={disabled}\n className={clsx(styles.input, styles.rangeInput)}\n style={{ zIndex: 4 }}\n aria-label={\n typeof label === 'string' ? t('slider.labelEnd', { label }) : t('slider.rangeEnd')\n }\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n />\n </div>\n ) : (\n <div className={clsx(styles.track, marks != null && marks.length > 0 && styles.hasMarks)}>\n <input\n ref={ref}\n id={id}\n name={name}\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={single}\n onChange={(e: ChangeEvent<HTMLInputElement>) => commit(Number(e.target.value))}\n onBlur={handleBlur}\n disabled={disabled}\n className={styles.input}\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n {...props}\n />\n {marks != null && marks.length > 0 && (\n <div className={styles.marks} aria-hidden>\n {marks.map((mark) => (\n <span\n key={mark.value}\n className={styles.mark}\n style={{ left: `${toPercent(mark.value, min, max)}%` }}\n >\n <span className={styles.tick} />\n {mark.label != null && <span className={styles.markLabel}>{mark.label}</span>}\n </span>\n ))}\n </div>\n )}\n </div>\n )}\n\n {resolvedHelperText != null && (\n <Typography\n as=\"span\"\n id={helperId}\n variant=\"bodySmall\"\n color={resolvedError ? 'error' : 'muted'}\n className={fieldStyles.helper}\n >\n {resolvedHelperText}\n </Typography>\n )}\n </div>\n )\n})\n"],"names":["clamp","n","lo","hi","toPercent","v","min","max","Slider","forwardRef","label","size","error","helperText","required","fullWidth","range","value","defaultValue","onChange","step","color","disabled","valueLabel","marks","name","onBlur","idProp","className","style","props","ref","t","useT","reactId","useId","id","helperId","form","useFormContext","isFormBound","bound","fallback","externalValue","isControlled","internal","setInternal","useState","raw","tuple","single","resolvedError","resolvedHelperText","commit","next","commitRange","nextLo","nextHi","l","h","handleBlur","event","showValue","renderedValue","loPct","hiPct","jsxs","clsx","fieldStyles","styles","jsx","Typography","mark"],"mappings":"kwBAuEMA,EAAQ,CAACC,EAAWC,EAAYC,IAAe,KAAK,IAAI,KAAK,IAAIF,EAAGC,CAAE,EAAGC,CAAE,EAC3EC,EAAY,CAACC,EAAWC,EAAaC,IACzCA,EAAMD,GAAQD,EAAIC,IAAQC,EAAMD,GAAQ,IAAM,EAUnCE,GAASC,EAAAA,WAA0C,SAC9D,CACE,MAAAC,EACA,KAAAC,EAAO,KACP,MAAAC,EACA,WAAAC,EACA,SAAAC,EAAW,GACX,UAAAC,EAAY,GACZ,MAAAC,EAAQ,GACR,MAAAC,EACA,aAAAC,EACA,SAAAC,EACA,IAAAb,EAAM,EACN,IAAAC,EAAM,IACN,KAAAa,EAAO,EACP,MAAAC,EAAQ,SACR,SAAAC,EAAW,GACX,WAAAC,EAAa,GACb,MAAAC,EACA,KAAAC,EACA,OAA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ACH,CAAA,CAAA,CAIR,CAAC"}
1
+ {"version":3,"file":"Slider-DxnCQRSH.cjs","sources":["../src/components/Slider/Slider.tsx"],"sourcesContent":["import {\n forwardRef,\n useId,\n useState,\n type CSSProperties,\n type ChangeEvent,\n type FocusEvent,\n type InputHTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useFormContext } from '../../form/formContext'\nimport { Typography } from '../Typography'\nimport { useT, type ThemeColor } from '../../theme'\n// shared field chrome (wrapper / label / helper / required / error / sizes)\nimport fieldStyles from '../TextField/TextField.module.css'\nimport styles from './Slider.module.css'\n\nexport type SliderSize = 'sm' | 'md' | 'lg'\n/** A single value, or a `[start, end]` tuple when `range`. */\nexport type SliderValue = number | [number, number]\n\n/** A labeled tick under the track. */\nexport interface SliderMark {\n value: number\n label?: ReactNode\n}\n\nexport interface SliderProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'value' | 'defaultValue' | 'onChange' | 'type' | 'min' | 'max' | 'step' | 'color'\n> {\n /** Label rendered above the track. */\n label?: ReactNode\n /** Preset size — drives the track + thumb dimensions and the label/helper font. */\n size?: SliderSize\n /** Marks the field invalid: red focus ring + the `helperText` in the error color. */\n error?: boolean\n /** Helper / validation text under the track. Adopts the error color while `error`. */\n helperText?: ReactNode\n /** Adds a red asterisk after the label. */\n required?: boolean\n /** Stretches the slider to fill its container width. Defaults to `true`. */\n fullWidth?: boolean\n /** Two-thumb range mode — pick a `[start, end]` span (e.g. 5–10). The value becomes a tuple. */\n range?: boolean\n /** Controlled value — a `number`, or a `[start, end]` tuple when `range`. */\n value?: SliderValue\n /** Initial value for uncontrolled use. Defaults to `min` (or `[min, max]` when `range`). */\n defaultValue?: SliderValue\n /** Fires with the next value (a `number`, or a `[start, end]` tuple when `range`). */\n onChange?: (value: SliderValue) => void\n /** Minimum value. Defaults to `0`. */\n min?: number\n /** Maximum value. Defaults to `100`. */\n max?: number\n /** Increment the thumb snaps to (arrow keys + drag). Defaults to `1`. */\n step?: number\n /** Theme palette token that tints the fill + thumb. Defaults to `accent`. */\n color?: ThemeColor\n /** Disables the slider. */\n disabled?: boolean\n /**\n * Show the current value at the end of the label row. Defaults to `true`. Pass a function to format\n * it (receives the `number` or `[start, end]`), or `false` to hide it.\n */\n valueLabel?: boolean | ((value: SliderValue) => ReactNode)\n /** Optional labeled ticks under the track (e.g. `[{ value: 0, label: 'Min' }, …]`). Single mode only — ignored with `range`. */\n marks?: SliderMark[]\n}\n\nconst clamp = (n: number, lo: number, hi: number) => Math.min(Math.max(n, lo), hi)\nconst toPercent = (v: number, min: number, max: number) =>\n max > min ? ((v - min) / (max - min)) * 100 : 0\n\n/**\n * A range slider — drag (or arrow-key / Home / End) a thumb along the track to pick a number, snapping\n * to `step`. Built on a native `<input type=\"range\">`, so keyboard, dragging, step/min/max, and a11y\n * come for free; the track / fill / thumb are styled with `--tz-*` tokens and tinted by `color`. Pass\n * **`range`** for a two-thumb span (the value becomes a `[start, end]` tuple). Controlled (`value` +\n * `onChange`) or uncontrolled (`defaultValue`); a `name` binds it to a surrounding `<Form>` — the form\n * value is a real `number` (or `[start, end]`), validated with `z.number()` / `z.tuple([…])`.\n */\nexport const Slider = forwardRef<HTMLInputElement, SliderProps>(function Slider(\n {\n label,\n size = 'md',\n error,\n helperText,\n required = false,\n fullWidth = true,\n range = false,\n value,\n defaultValue,\n onChange,\n min = 0,\n max = 100,\n step = 1,\n color = 'accent',\n disabled = false,\n valueLabel = true,\n marks,\n name,\n onBlur,\n id: idProp,\n className,\n style,\n ...props\n },\n ref,\n) {\n const t = useT()\n const reactId = useId()\n const id = idProp ?? reactId\n const helperId = `${id}-helper`\n\n // Auto-bind to a surrounding <Form> by `name` — the form value is a real number (or tuple); the\n // touched/error state comes from field(), the raw value from values[name] (tuples must not be coerced).\n const form = useFormContext()\n const isFormBound = Boolean(form && name)\n const bound = form && name ? form.field(name) : undefined\n\n const fallback: SliderValue = range ? [min, max] : min\n const externalValue: SliderValue | undefined =\n value !== undefined\n ? value\n : isFormBound\n ? ((form!.values[name!] as SliderValue | undefined) ?? fallback)\n : undefined\n const isControlled = externalValue !== undefined\n const [internal, setInternal] = useState<SliderValue>(defaultValue ?? fallback)\n const raw = isControlled ? externalValue! : internal\n\n // Normalize to the active shape (clamped, and — for a range — ordered low ≤ high).\n const tuple = Array.isArray(raw) ? raw : [min, raw]\n const lo = clamp(Math.min(tuple[0], tuple[1]), min, max)\n const hi = clamp(Math.max(tuple[0], tuple[1]), min, max)\n const single = clamp(Array.isArray(raw) ? raw[0] : raw, min, max)\n\n const resolvedError = error ?? bound?.error ?? false\n const resolvedHelperText = helperText ?? bound?.helperText\n\n const commit = (next: SliderValue) => {\n if (!isControlled) setInternal(next)\n if (isFormBound) form!.setValue(name!, next)\n onChange?.(next)\n }\n const commitRange = (nextLo: number, nextHi: number) => {\n const l = clamp(nextLo, min, max)\n const h = clamp(nextHi, min, max)\n commit([Math.min(l, h), Math.max(l, h)])\n }\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n bound?.onBlur(event)\n onBlur?.(event)\n }\n\n const showValue = valueLabel !== false\n const currentValue: SliderValue = range ? [lo, hi] : single\n const renderedValue =\n typeof valueLabel === 'function' ? valueLabel(currentValue) : range ? `${lo} – ${hi}` : single\n\n const loPct = toPercent(lo, min, max)\n const hiPct = toPercent(hi, min, max)\n\n return (\n <div\n className={clsx(\n fieldStyles.field,\n fieldStyles[size],\n styles[size],\n fullWidth && fieldStyles.fullWidth,\n resolvedError && fieldStyles.error,\n disabled && fieldStyles.disabled,\n className,\n )}\n style={\n {\n '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`,\n '--tz-slider-fill': `${toPercent(single, min, max)}%`,\n ...style,\n } as CSSProperties\n }\n >\n {(label != null || showValue) && (\n <div className={styles.labelRow}>\n {label != null ? (\n <label htmlFor={id} className={fieldStyles.label}>\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {label}\n </Typography>\n {required && (\n <span className={fieldStyles.required} aria-hidden=\"true\">\n *\n </span>\n )}\n </label>\n ) : (\n <span />\n )}\n {showValue && (\n <Typography as=\"span\" variant=\"bodySmall\" className={styles.value}>\n {renderedValue}\n </Typography>\n )}\n </div>\n )}\n\n {range ? (\n <div className={clsx(styles.track, styles.rangeTrack)}>\n <span className={styles.rail} aria-hidden />\n <span\n className={styles.rangeFill}\n aria-hidden\n style={{ left: `${loPct}%`, width: `${hiPct - loPct}%` }}\n />\n {/* start thumb — can't pass the end thumb */}\n <input\n ref={ref}\n id={id}\n name={name}\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={lo}\n onChange={(e: ChangeEvent<HTMLInputElement>) =>\n commitRange(Math.min(Number(e.target.value), hi), hi)\n }\n onBlur={handleBlur}\n disabled={disabled}\n className={clsx(styles.input, styles.rangeInput)}\n // end thumb sits on top by default (z 4); raise the start above it (z 5) only when both pile\n // at max, so whichever thumb needs grabbing is always reachable\n style={{ zIndex: lo >= max ? 5 : 3 }}\n aria-label={\n typeof label === 'string' ? t('slider.labelStart', { label }) : t('slider.rangeStart')\n }\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n {...props}\n />\n {/* end thumb — can't pass the start thumb */}\n <input\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={hi}\n onChange={(e: ChangeEvent<HTMLInputElement>) =>\n commitRange(lo, Math.max(Number(e.target.value), lo))\n }\n onBlur={handleBlur}\n disabled={disabled}\n className={clsx(styles.input, styles.rangeInput)}\n style={{ zIndex: 4 }}\n aria-label={\n typeof label === 'string' ? t('slider.labelEnd', { label }) : t('slider.rangeEnd')\n }\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n />\n </div>\n ) : (\n <div className={clsx(styles.track, marks != null && marks.length > 0 && styles.hasMarks)}>\n <input\n ref={ref}\n id={id}\n name={name}\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={single}\n onChange={(e: ChangeEvent<HTMLInputElement>) => commit(Number(e.target.value))}\n onBlur={handleBlur}\n disabled={disabled}\n className={styles.input}\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n {...props}\n />\n {marks != null && marks.length > 0 && (\n <div className={styles.marks} aria-hidden>\n {marks.map((mark) => (\n <span\n key={mark.value}\n className={styles.mark}\n style={{ left: `${toPercent(mark.value, min, max)}%` }}\n >\n <span className={styles.tick} />\n {mark.label != null && <span className={styles.markLabel}>{mark.label}</span>}\n </span>\n ))}\n </div>\n )}\n </div>\n )}\n\n {resolvedHelperText != null && (\n <Typography\n as=\"span\"\n id={helperId}\n variant=\"bodySmall\"\n color={resolvedError ? 'error' : 'muted'}\n className={fieldStyles.helper}\n >\n {resolvedHelperText}\n </Typography>\n )}\n </div>\n )\n})\n"],"names":["clamp","n","lo","hi","toPercent","v","min","max","Slider","forwardRef","label","size","error","helperText","required","fullWidth","range","value","defaultValue","onChange","step","color","disabled","valueLabel","marks","name","onBlur","idProp","className","style","props","ref","t","useT","reactId","useId","id","helperId","form","useFormContext","isFormBound","bound","fallback","externalValue","isControlled","internal","setInternal","useState","raw","tuple","single","resolvedError","resolvedHelperText","commit","next","commitRange","nextLo","nextHi","l","h","handleBlur","event","showValue","renderedValue","loPct","hiPct","jsxs","clsx","fieldStyles","styles","jsx","Typography","mark"],"mappings":"kwBAuEMA,EAAQ,CAACC,EAAWC,EAAYC,IAAe,KAAK,IAAI,KAAK,IAAIF,EAAGC,CAAE,EAAGC,CAAE,EAC3EC,EAAY,CAACC,EAAWC,EAAaC,IACzCA,EAAMD,GAAQD,EAAIC,IAAQC,EAAMD,GAAQ,IAAM,EAUnCE,GAASC,EAAAA,WAA0C,SAC9D,CACE,MAAAC,EACA,KAAAC,EAAO,KACP,MAAAC,EACA,WAAAC,EACA,SAAAC,EAAW,GACX,UAAAC,EAAY,GACZ,MAAAC,EAAQ,GACR,MAAAC,EACA,aAAAC,EACA,SAAAC,EACA,IAAAb,EAAM,EACN,IA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C,GAAG,OACH,GAAIlC,EACJ,QAAQ,YACR,MAAOc,EAAgB,QAAU,QACjC,UAAWiB,EAAAA,YAAY,OAEtB,SAAAhB,CAAA,CAAA,CACH,CAAA,CAAA,CAIR,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("react/jsx-runtime"),o=require("react"),d=require("clsx"),N=require("./Icon-B6lz-V0A.cjs"),M=require("./IconButton-CiDPeKM4.cjs"),F=require("./Tooltip-DmMq5R1x.cjs"),k=o.createContext(null);function G(){return o.useContext(k)}const H="_speedDial_1qwl9_4",J="_fab_1qwl9_9",Q="_fabIcon_1qwl9_17",U="_fabIconOpen_1qwl9_21",V="_actions_1qwl9_26",X="_up_1qwl9_47",Y="_down_1qwl9_53",ee="_left_1qwl9_59",te="_right_1qwl9_65",ne="_action_1qwl9_26",se="_actionWrap_1qwl9_91",oe="_actionLabel_1qwl9_95",ce="_labelLeft_1qwl9_110",re="_labelTop_1qwl9_117",s={speedDial:H,fab:J,fabIcon:Q,fabIconOpen:U,actions:V,up:X,down:Y,left:ee,right:te,action:ne,actionWrap:se,actionLabel:oe,labelLeft:ce,labelTop:re},le=new Set(N.ICON_NAMES),g=o.forwardRef(function({icon:l,label:c,tooltipOpen:p,hideTooltip:_=!1,color:b,onClick:a,disabled:m,className:L,style:i,...E},S){const t=G(),w=typeof l=="string"&&le.has(l)?n.jsx(N.Icon,{name:l}):l,u=n.jsx(M.IconButton,{ref:S,rounded:!0,variant:"contained",color:"surface",size:(t==null?void 0:t.size)??"sm",disabled:m,"aria-label":typeof c=="string"?c:void 0,className:d.clsx(s.action,L),style:b?{color:`var(--tz-color-${b})`,...i}:i,onClick:v=>{a==null||a(v),t!=null&&t.closeOnClick&&t.requestClose()},...E,children:w});if(c==null||_)return u;const x=(t==null?void 0:t.placement)??"left";return p??(t==null?void 0:t.persistentLabels)??!1?n.jsxs("span",{className:d.clsx(s.actionWrap,x==="top"?s.labelTop:s.labelLeft),children:[u,n.jsx("span",{className:s.actionLabel,children:c})]}):n.jsx(F.Tooltip,{content:c,placement:x,children:u})}),ae=new Set(N.ICON_NAMES),ie={sm:"sm",md:"sm",lg:"md"},ue={up:"left",down:"left",left:"top",right:"top"},fe=o.forwardRef(function({ariaLabel:l,icon:c="Add",openIcon:p,direction:_="up",color:b="primary",size:a="md",open:m,defaultOpen:L=!1,onOpenChange:i,openOnHover:E=!0,closeOnActionClick:S=!0,tooltipOpen:t=!1,actions:w,disabled:u=!1,children:x,className:O,style:v,...W},I){const D=o.useRef(null),T=o.useRef(null),y=o.useId(),A=m!==void 0,[z,B]=o.useState(L),r=A?m:z,f=e=>{A||B(e),i==null||i(e)},h=o.useRef(f);h.current=f,o.useEffect(()=>{if(!r)return;const e=j=>{D.current&&!D.current.contains(j.target)&&h.current(!1)},q=j=>{var R;j.key==="Escape"&&(h.current(!1),(R=T.current)==null||R.focus())};return document.addEventListener("pointerdown",e),document.addEventListener("keydown",q),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("keydown",q)}},[r]);const $=e=>{D.current=e,typeof I=="function"?I(e):I&&(I.current=e)},C=e=>typeof e=="string"&&ae.has(e)?n.jsx(N.Icon,{name:e}):e,K={size:ie[a],placement:ue[_],closeOnClick:S,persistentLabels:t,requestClose:()=>f(!1)},Z=E&&!u?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{};return n.jsxs("div",{ref:$,className:d.clsx(s.speedDial,O),style:v,...Z,...W,children:[n.jsx("div",{id:y,className:d.clsx(s.actions,s[_]),"data-open":r?"true":"false",children:n.jsx(k.Provider,{value:K,children:w?w.map((e,q)=>n.jsx(g,{icon:e.icon,label:e.label,onClick:e.onClick,disabled:e.disabled,color:e.color},e.key??q)):x})}),n.jsx(M.IconButton,{ref:T,rounded:!0,variant:"contained",color:b,size:a,disabled:u,"aria-label":l,"aria-haspopup":"true","aria-expanded":r,"aria-controls":y,className:s.fab,onClick:()=>f(!r),children:n.jsx("span",{className:d.clsx(s.fabIcon,!p&&r&&s.fabIconOpen),children:r&&p!=null?C(p):C(c)})})]})});exports.SpeedDial=fe;exports.SpeedDialAction=g;
2
- //# sourceMappingURL=SpeedDial-i5kxikmt.cjs.map
1
+ "use strict";const n=require("react/jsx-runtime"),o=require("react"),d=require("clsx"),N=require("./Icon-CBg21lKA.cjs"),M=require("./IconButton-wW1o4HHw.cjs"),F=require("./Tooltip-DmMq5R1x.cjs"),k=o.createContext(null);function G(){return o.useContext(k)}const H="_speedDial_1qwl9_4",J="_fab_1qwl9_9",Q="_fabIcon_1qwl9_17",U="_fabIconOpen_1qwl9_21",V="_actions_1qwl9_26",X="_up_1qwl9_47",Y="_down_1qwl9_53",ee="_left_1qwl9_59",te="_right_1qwl9_65",ne="_action_1qwl9_26",se="_actionWrap_1qwl9_91",oe="_actionLabel_1qwl9_95",ce="_labelLeft_1qwl9_110",re="_labelTop_1qwl9_117",s={speedDial:H,fab:J,fabIcon:Q,fabIconOpen:U,actions:V,up:X,down:Y,left:ee,right:te,action:ne,actionWrap:se,actionLabel:oe,labelLeft:ce,labelTop:re},le=new Set(N.ICON_NAMES),g=o.forwardRef(function({icon:l,label:c,tooltipOpen:p,hideTooltip:_=!1,color:b,onClick:a,disabled:m,className:L,style:i,...E},S){const t=G(),w=typeof l=="string"&&le.has(l)?n.jsx(N.Icon,{name:l}):l,u=n.jsx(M.IconButton,{ref:S,rounded:!0,variant:"contained",color:"surface",size:(t==null?void 0:t.size)??"sm",disabled:m,"aria-label":typeof c=="string"?c:void 0,className:d.clsx(s.action,L),style:b?{color:`var(--tz-color-${b})`,...i}:i,onClick:v=>{a==null||a(v),t!=null&&t.closeOnClick&&t.requestClose()},...E,children:w});if(c==null||_)return u;const x=(t==null?void 0:t.placement)??"left";return p??(t==null?void 0:t.persistentLabels)??!1?n.jsxs("span",{className:d.clsx(s.actionWrap,x==="top"?s.labelTop:s.labelLeft),children:[u,n.jsx("span",{className:s.actionLabel,children:c})]}):n.jsx(F.Tooltip,{content:c,placement:x,children:u})}),ae=new Set(N.ICON_NAMES),ie={sm:"sm",md:"sm",lg:"md"},ue={up:"left",down:"left",left:"top",right:"top"},fe=o.forwardRef(function({ariaLabel:l,icon:c="Add",openIcon:p,direction:_="up",color:b="primary",size:a="md",open:m,defaultOpen:L=!1,onOpenChange:i,openOnHover:E=!0,closeOnActionClick:S=!0,tooltipOpen:t=!1,actions:w,disabled:u=!1,children:x,className:O,style:v,...W},I){const D=o.useRef(null),T=o.useRef(null),y=o.useId(),A=m!==void 0,[z,B]=o.useState(L),r=A?m:z,f=e=>{A||B(e),i==null||i(e)},h=o.useRef(f);h.current=f,o.useEffect(()=>{if(!r)return;const e=j=>{D.current&&!D.current.contains(j.target)&&h.current(!1)},q=j=>{var R;j.key==="Escape"&&(h.current(!1),(R=T.current)==null||R.focus())};return document.addEventListener("pointerdown",e),document.addEventListener("keydown",q),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("keydown",q)}},[r]);const $=e=>{D.current=e,typeof I=="function"?I(e):I&&(I.current=e)},C=e=>typeof e=="string"&&ae.has(e)?n.jsx(N.Icon,{name:e}):e,K={size:ie[a],placement:ue[_],closeOnClick:S,persistentLabels:t,requestClose:()=>f(!1)},Z=E&&!u?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{};return n.jsxs("div",{ref:$,className:d.clsx(s.speedDial,O),style:v,...Z,...W,children:[n.jsx("div",{id:y,className:d.clsx(s.actions,s[_]),"data-open":r?"true":"false",children:n.jsx(k.Provider,{value:K,children:w?w.map((e,q)=>n.jsx(g,{icon:e.icon,label:e.label,onClick:e.onClick,disabled:e.disabled,color:e.color},e.key??q)):x})}),n.jsx(M.IconButton,{ref:T,rounded:!0,variant:"contained",color:b,size:a,disabled:u,"aria-label":l,"aria-haspopup":"true","aria-expanded":r,"aria-controls":y,className:s.fab,onClick:()=>f(!r),children:n.jsx("span",{className:d.clsx(s.fabIcon,!p&&r&&s.fabIconOpen),children:r&&p!=null?C(p):C(c)})})]})});exports.SpeedDial=fe;exports.SpeedDialAction=g;
2
+ //# sourceMappingURL=SpeedDial-37OMwj9C.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SpeedDial-i5kxikmt.cjs","sources":["../src/components/SpeedDial/speedDialContext.ts","../src/components/SpeedDial/SpeedDialAction.tsx","../src/components/SpeedDial/SpeedDial.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { TooltipPlacement } from '../Tooltip'\n\n/** Action button size — one step smaller than the dial's FAB. */\nexport type SpeedDialActionSize = 'sm' | 'md' | 'lg'\n\n/** Shared state a `<SpeedDial>` hands down to its `<SpeedDialAction>` children via context. */\nexport interface SpeedDialContextValue {\n /** Size for the action FABs. */\n size: SpeedDialActionSize\n /** Where each action's tooltip label sits (derived from the dial `direction`). */\n placement: TooltipPlacement\n /** Close the dial after an action is clicked. */\n closeOnClick: boolean\n /** Show every action's label persistently (no hover needed) while the dial is open. */\n persistentLabels: boolean\n /** Request the dial to close (called by an action on click). */\n requestClose: () => void\n}\n\nexport const SpeedDialContext = createContext<SpeedDialContextValue | null>(null)\n\n/** Read the surrounding `<SpeedDial>` (or `null` when an action is rendered standalone). */\nexport function useSpeedDial(): SpeedDialContextValue | null {\n return useContext(SpeedDialContext)\n}\n","import { forwardRef, type ButtonHTMLAttributes, type MouseEvent, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport type { ThemeColor } from '../../theme'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { Tooltip } from '../Tooltip'\nimport { useSpeedDial } from './speedDialContext'\nimport styles from './SpeedDial.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface SpeedDialActionProps extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'color'\n> {\n /** Action icon — a known `IconName` or any node. */\n icon: IconName | ReactNode\n /** Label shown as a tooltip beside the action (also its `aria-label` when a string). */\n label?: ReactNode\n /** Show the label persistently (no hover) while the dial is open — overrides the dial's `tooltipOpen`. */\n tooltipOpen?: boolean\n /** Hide the tooltip / persistent label (still used for `aria-label`). */\n hideTooltip?: boolean\n /**\n * Tints the **icon** (the circle stays the neutral surface button) — e.g. `error` for a destructive action.\n * Omit for the default text color.\n */\n color?: ThemeColor\n}\n\n/**\n * One action inside a `<SpeedDial>` — a small circular `IconButton` (surface-tinted) with a tooltip\n * `label`. It reads the dial via context for its size, tooltip placement and close-on-click; clicking\n * runs `onClick` then closes the dial. The ref points at the `<button>`.\n */\nexport const SpeedDialAction = forwardRef<HTMLButtonElement, SpeedDialActionProps>(\n function SpeedDialAction(\n {\n icon,\n label,\n tooltipOpen,\n hideTooltip = false,\n color,\n onClick,\n disabled,\n className,\n style,\n ...props\n },\n ref,\n ) {\n const dial = useSpeedDial()\n const iconNode =\n typeof icon === 'string' && ICON_NAME_SET.has(icon) ? <Icon name={icon as IconName} /> : icon\n\n const button = (\n <IconButton\n ref={ref}\n rounded\n variant=\"contained\"\n color=\"surface\"\n size={dial?.size ?? 'sm'}\n disabled={disabled}\n aria-label={typeof label === 'string' ? label : undefined}\n className={clsx(styles.action, className)}\n // the icon follows `color` (currentColor); the circle keeps its surface fill\n style={color ? { color: `var(--tz-color-${color})`, ...style } : style}\n onClick={(event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (dial?.closeOnClick) dial.requestClose()\n }}\n {...props}\n >\n {iconNode}\n </IconButton>\n )\n\n if (label == null || hideTooltip) return button\n\n const placement = dial?.placement ?? 'left'\n // persistent label: render a static label beside the button (no hover) — like MUI's tooltipOpen\n const persistent = tooltipOpen ?? dial?.persistentLabels ?? false\n if (persistent) {\n return (\n <span\n className={clsx(\n styles.actionWrap,\n placement === 'top' ? styles.labelTop : styles.labelLeft,\n )}\n >\n {button}\n <span className={styles.actionLabel}>{label}</span>\n </span>\n )\n }\n\n return (\n <Tooltip content={label} placement={placement}>\n {button}\n </Tooltip>\n )\n },\n)\n","import {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type MouseEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport type { ThemeColor } from '../../theme'\nimport type { TooltipPlacement } from '../Tooltip'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { SpeedDialAction } from './SpeedDialAction'\nimport {\n SpeedDialContext,\n type SpeedDialActionSize,\n type SpeedDialContextValue,\n} from './speedDialContext'\nimport styles from './SpeedDial.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport type SpeedDialSize = 'sm' | 'md' | 'lg'\nexport type SpeedDialDirection = 'up' | 'down' | 'left' | 'right'\n\n/** The FAB size → the (smaller) action-button size. */\nconst ACTION_SIZE: Record<SpeedDialSize, SpeedDialActionSize> = { sm: 'sm', md: 'sm', lg: 'md' }\n/** Tooltip side per direction — labels sit left of a vertical dial, above a horizontal one. */\nconst TOOLTIP_PLACEMENT: Record<SpeedDialDirection, TooltipPlacement> = {\n up: 'left',\n down: 'left',\n left: 'top',\n right: 'top',\n}\n\n/** A data-driven action for the `actions` prop. */\nexport interface SpeedDialActionItem {\n /** Stable key (falls back to the index). */\n key?: string\n icon: IconName | ReactNode\n label?: ReactNode\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void\n disabled?: boolean\n /** Tints the action's icon (e.g. `error` for a destructive one); the circle stays neutral. */\n color?: ThemeColor\n}\n\nexport interface SpeedDialProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'onChange'> {\n /** Accessible label for the FAB (required — it's icon-only). */\n ariaLabel: string\n /** FAB icon. Defaults to `Add` (a `+`). */\n icon?: IconName | ReactNode\n /** Icon shown while open. Omit to rotate the `icon` 45° instead (a `+` becomes a `×`). */\n openIcon?: IconName | ReactNode\n /** Which way the actions fan out. Defaults to `up`. */\n direction?: SpeedDialDirection\n /** Theme palette token tinting the FAB. Defaults to `primary`. */\n color?: ThemeColor\n /** FAB size (actions render one step smaller). Defaults to `md`. */\n size?: SpeedDialSize\n /** Controlled open state. */\n open?: boolean\n /** Initial open state for uncontrolled use. Defaults to `false`. */\n defaultOpen?: boolean\n /** Fires with the next open state. */\n onOpenChange?: (open: boolean) => void\n /** Open on hover (also opens on click). Defaults to `true`. */\n openOnHover?: boolean\n /** Close the dial after an action is clicked. Defaults to `true`. */\n closeOnActionClick?: boolean\n /** Show every action's label persistently while open (no hover needed) — like MUI's `tooltipOpen`. */\n tooltipOpen?: boolean\n /** Data-driven actions — an alternative to `<SpeedDialAction>` children. */\n actions?: SpeedDialActionItem[]\n /** Disables the FAB (and hover-opening). */\n disabled?: boolean\n /** `<SpeedDialAction>` children (used when `actions` is not given). */\n children?: ReactNode\n}\n\n/**\n * A floating action button that reveals a set of related actions on hover / click — fanning out in\n * `direction` (`up` default). The FAB icon rotates 45° when open (a `+` → `×`) unless an `openIcon` is\n * given. Each `<SpeedDialAction>` is a small circular button with a tooltip label; supply them via the\n * data-driven `actions` prop or as children. Opens on hover (`openOnHover`) and click; closes on\n * outside-pointerdown, Escape (refocusing the FAB), or selecting an action. Controlled (`open` +\n * `onOpenChange`) or uncontrolled (`defaultOpen`). The ref points at the root; position it (e.g.\n * `fixed` bottom-right) via `style`/`className`. The FAB carries `aria-expanded`/`aria-controls`.\n */\nexport const SpeedDial = forwardRef<HTMLDivElement, SpeedDialProps>(function SpeedDial(\n {\n ariaLabel,\n icon = 'Add',\n openIcon,\n direction = 'up',\n color = 'primary',\n size = 'md',\n open,\n defaultOpen = false,\n onOpenChange,\n openOnHover = true,\n closeOnActionClick = true,\n tooltipOpen = false,\n actions,\n disabled = false,\n children,\n className,\n style,\n ...props\n },\n forwardedRef,\n) {\n const rootRef = useRef<HTMLDivElement | null>(null)\n const fabRef = useRef<HTMLButtonElement | null>(null)\n const actionsId = useId()\n\n const isControlled = open !== undefined\n const [internal, setInternal] = useState(defaultOpen)\n const isOpen = isControlled ? open : internal\n\n const setOpen = (next: boolean) => {\n if (!isControlled) setInternal(next)\n onOpenChange?.(next)\n }\n // keep a stable reference for the document listeners below\n const setOpenRef = useRef(setOpen)\n setOpenRef.current = setOpen\n\n // while open: close on outside pointerdown / Escape (Escape refocuses the FAB)\n useEffect(() => {\n if (!isOpen) return\n const onPointerDown = (event: PointerEvent) => {\n if (rootRef.current && !rootRef.current.contains(event.target as Node)) {\n setOpenRef.current(false)\n }\n }\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n setOpenRef.current(false)\n fabRef.current?.focus()\n }\n }\n document.addEventListener('pointerdown', onPointerDown)\n document.addEventListener('keydown', onKeyDown)\n return () => {\n document.removeEventListener('pointerdown', onPointerDown)\n document.removeEventListener('keydown', onKeyDown)\n }\n }, [isOpen])\n\n const setRootRef = (node: HTMLDivElement | null) => {\n rootRef.current = node\n if (typeof forwardedRef === 'function') forwardedRef(node)\n else if (forwardedRef) forwardedRef.current = node\n }\n\n const renderIcon = (value: IconName | ReactNode) =>\n typeof value === 'string' && ICON_NAME_SET.has(value) ? (\n <Icon name={value as IconName} />\n ) : (\n value\n )\n\n const ctx: SpeedDialContextValue = {\n size: ACTION_SIZE[size],\n placement: TOOLTIP_PLACEMENT[direction],\n closeOnClick: closeOnActionClick,\n persistentLabels: tooltipOpen,\n requestClose: () => setOpen(false),\n }\n\n const hoverProps =\n openOnHover && !disabled\n ? { onMouseEnter: () => setOpen(true), onMouseLeave: () => setOpen(false) }\n : {}\n\n return (\n <div\n ref={setRootRef}\n className={clsx(styles.speedDial, className)}\n style={style as CSSProperties}\n {...hoverProps}\n {...props}\n >\n <div\n id={actionsId}\n className={clsx(styles.actions, styles[direction])}\n data-open={isOpen ? 'true' : 'false'}\n >\n <SpeedDialContext.Provider value={ctx}>\n {actions\n ? actions.map((action, index) => (\n <SpeedDialAction\n key={action.key ?? index}\n icon={action.icon}\n label={action.label}\n onClick={action.onClick}\n disabled={action.disabled}\n color={action.color}\n />\n ))\n : children}\n </SpeedDialContext.Provider>\n </div>\n\n <IconButton\n ref={fabRef}\n rounded\n variant=\"contained\"\n color={color}\n size={size}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-haspopup=\"true\"\n aria-expanded={isOpen}\n aria-controls={actionsId}\n className={styles.fab}\n onClick={() => setOpen(!isOpen)}\n >\n <span className={clsx(styles.fabIcon, !openIcon && isOpen && styles.fabIconOpen)}>\n {isOpen && openIcon != null ? renderIcon(openIcon) : renderIcon(icon)}\n </span>\n </IconButton>\n </div>\n )\n})\n"],"names":["SpeedDialContext","createContext","useSpeedDial","useContext","ICON_NAME_SET","ICON_NAMES","SpeedDialAction","forwardRef","icon","label","tooltipOpen","hideTooltip","color","onClick","disabled","className","style","props","ref","dial","iconNode","jsx","Icon","button","IconButton","clsx","styles","event","placement","jsxs","Tooltip","ACTION_SIZE","TOOLTIP_PLACEMENT","SpeedDial","ariaLabel","openIcon","direction","size","open","defaultOpen","onOpenChange","openOnHover","closeOnActionClick","actions","children","forwardedRef","rootRef","useRef","fabRef","actionsId","useId","isControlled","internal","setInternal","useState","isOpen","setOpen","next","setOpenRef","useEffect","onPointerDown","onKeyDown","_a","setRootRef","node","renderIcon","value","ctx","hoverProps","action","index"],"mappings":"mMAoBaA,EAAmBC,EAAAA,cAA4C,IAAI,EAGzE,SAASC,GAA6C,CAC3D,OAAOC,EAAAA,WAAWH,CAAgB,CACpC,qdCfMI,GAAgB,IAAI,IAAYC,YAAU,EA0BnCC,EAAkBC,EAAAA,WAC7B,SACE,CACE,KAAAC,EACA,MAAAC,EACA,YAAAC,EACA,YAAAC,EAAc,GACd,MAAAC,EACA,QAAAC,EACA,SAAAC,EACA,UAAAC,EACA,MAAAC,EACA,GAAGC,CAAA,EAELC,EACA,CACA,MAAMC,EAAOjB,EAAA,EACPkB,EACJ,OAAOZ,GAAS,UAAYJ,GAAc,IAAII,CAAI,EAAIa,EAAAA,IAACC,EAAAA,KAAA,CAAK,KAAMd,CAAA,CAAkB,EAAKA,EAErFe,EACJF,EAAAA,IAACG,EAAAA,W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CAGN,CAAC"}
1
+ {"version":3,"file":"SpeedDial-37OMwj9C.cjs","sources":["../src/components/SpeedDial/speedDialContext.ts","../src/components/SpeedDial/SpeedDialAction.tsx","../src/components/SpeedDial/SpeedDial.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { TooltipPlacement } from '../Tooltip'\n\n/** Action button size — one step smaller than the dial's FAB. */\nexport type SpeedDialActionSize = 'sm' | 'md' | 'lg'\n\n/** Shared state a `<SpeedDial>` hands down to its `<SpeedDialAction>` children via context. */\nexport interface SpeedDialContextValue {\n /** Size for the action FABs. */\n size: SpeedDialActionSize\n /** Where each action's tooltip label sits (derived from the dial `direction`). */\n placement: TooltipPlacement\n /** Close the dial after an action is clicked. */\n closeOnClick: boolean\n /** Show every action's label persistently (no hover needed) while the dial is open. */\n persistentLabels: boolean\n /** Request the dial to close (called by an action on click). */\n requestClose: () => void\n}\n\nexport const SpeedDialContext = createContext<SpeedDialContextValue | null>(null)\n\n/** Read the surrounding `<SpeedDial>` (or `null` when an action is rendered standalone). */\nexport function useSpeedDial(): SpeedDialContextValue | null {\n return useContext(SpeedDialContext)\n}\n","import { forwardRef, type ButtonHTMLAttributes, type MouseEvent, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport type { ThemeColor } from '../../theme'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { Tooltip } from '../Tooltip'\nimport { useSpeedDial } from './speedDialContext'\nimport styles from './SpeedDial.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface SpeedDialActionProps extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'color'\n> {\n /** Action icon — a known `IconName` or any node. */\n icon: IconName | ReactNode\n /** Label shown as a tooltip beside the action (also its `aria-label` when a string). */\n label?: ReactNode\n /** Show the label persistently (no hover) while the dial is open — overrides the dial's `tooltipOpen`. */\n tooltipOpen?: boolean\n /** Hide the tooltip / persistent label (still used for `aria-label`). */\n hideTooltip?: boolean\n /**\n * Tints the **icon** (the circle stays the neutral surface button) — e.g. `error` for a destructive action.\n * Omit for the default text color.\n */\n color?: ThemeColor\n}\n\n/**\n * One action inside a `<SpeedDial>` — a small circular `IconButton` (surface-tinted) with a tooltip\n * `label`. It reads the dial via context for its size, tooltip placement and close-on-click; clicking\n * runs `onClick` then closes the dial. The ref points at the `<button>`.\n */\nexport const SpeedDialAction = forwardRef<HTMLButtonElement, SpeedDialActionProps>(\n function SpeedDialAction(\n {\n icon,\n label,\n tooltipOpen,\n hideTooltip = false,\n color,\n onClick,\n disabled,\n className,\n style,\n ...props\n },\n ref,\n ) {\n const dial = useSpeedDial()\n const iconNode =\n typeof icon === 'string' && ICON_NAME_SET.has(icon) ? <Icon name={icon as IconName} /> : icon\n\n const button = (\n <IconButton\n ref={ref}\n rounded\n variant=\"contained\"\n color=\"surface\"\n size={dial?.size ?? 'sm'}\n disabled={disabled}\n aria-label={typeof label === 'string' ? label : undefined}\n className={clsx(styles.action, className)}\n // the icon follows `color` (currentColor); the circle keeps its surface fill\n style={color ? { color: `var(--tz-color-${color})`, ...style } : style}\n onClick={(event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (dial?.closeOnClick) dial.requestClose()\n }}\n {...props}\n >\n {iconNode}\n </IconButton>\n )\n\n if (label == null || hideTooltip) return button\n\n const placement = dial?.placement ?? 'left'\n // persistent label: render a static label beside the button (no hover) — like MUI's tooltipOpen\n const persistent = tooltipOpen ?? dial?.persistentLabels ?? false\n if (persistent) {\n return (\n <span\n className={clsx(\n styles.actionWrap,\n placement === 'top' ? styles.labelTop : styles.labelLeft,\n )}\n >\n {button}\n <span className={styles.actionLabel}>{label}</span>\n </span>\n )\n }\n\n return (\n <Tooltip content={label} placement={placement}>\n {button}\n </Tooltip>\n )\n },\n)\n","import {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type MouseEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport type { ThemeColor } from '../../theme'\nimport type { TooltipPlacement } from '../Tooltip'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { SpeedDialAction } from './SpeedDialAction'\nimport {\n SpeedDialContext,\n type SpeedDialActionSize,\n type SpeedDialContextValue,\n} from './speedDialContext'\nimport styles from './SpeedDial.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport type SpeedDialSize = 'sm' | 'md' | 'lg'\nexport type SpeedDialDirection = 'up' | 'down' | 'left' | 'right'\n\n/** The FAB size → the (smaller) action-button size. */\nconst ACTION_SIZE: Record<SpeedDialSize, SpeedDialActionSize> = { sm: 'sm', md: 'sm', lg: 'md' }\n/** Tooltip side per direction — labels sit left of a vertical dial, above a horizontal one. */\nconst TOOLTIP_PLACEMENT: Record<SpeedDialDirection, TooltipPlacement> = {\n up: 'left',\n down: 'left',\n left: 'top',\n right: 'top',\n}\n\n/** A data-driven action for the `actions` prop. */\nexport interface SpeedDialActionItem {\n /** Stable key (falls back to the index). */\n key?: string\n icon: IconName | ReactNode\n label?: ReactNode\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void\n disabled?: boolean\n /** Tints the action's icon (e.g. `error` for a destructive one); the circle stays neutral. */\n color?: ThemeColor\n}\n\nexport interface SpeedDialProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'onChange'> {\n /** Accessible label for the FAB (required — it's icon-only). */\n ariaLabel: string\n /** FAB icon. Defaults to `Add` (a `+`). */\n icon?: IconName | ReactNode\n /** Icon shown while open. Omit to rotate the `icon` 45° instead (a `+` becomes a `×`). */\n openIcon?: IconName | ReactNode\n /** Which way the actions fan out. Defaults to `up`. */\n direction?: SpeedDialDirection\n /** Theme palette token tinting the FAB. Defaults to `primary`. */\n color?: ThemeColor\n /** FAB size (actions render one step smaller). Defaults to `md`. */\n size?: SpeedDialSize\n /** Controlled open state. */\n open?: boolean\n /** Initial open state for uncontrolled use. Defaults to `false`. */\n defaultOpen?: boolean\n /** Fires with the next open state. */\n onOpenChange?: (open: boolean) => void\n /** Open on hover (also opens on click). Defaults to `true`. */\n openOnHover?: boolean\n /** Close the dial after an action is clicked. Defaults to `true`. */\n closeOnActionClick?: boolean\n /** Show every action's label persistently while open (no hover needed) — like MUI's `tooltipOpen`. */\n tooltipOpen?: boolean\n /** Data-driven actions — an alternative to `<SpeedDialAction>` children. */\n actions?: SpeedDialActionItem[]\n /** Disables the FAB (and hover-opening). */\n disabled?: boolean\n /** `<SpeedDialAction>` children (used when `actions` is not given). */\n children?: ReactNode\n}\n\n/**\n * A floating action button that reveals a set of related actions on hover / click — fanning out in\n * `direction` (`up` default). The FAB icon rotates 45° when open (a `+` → `×`) unless an `openIcon` is\n * given. Each `<SpeedDialAction>` is a small circular button with a tooltip label; supply them via the\n * data-driven `actions` prop or as children. Opens on hover (`openOnHover`) and click; closes on\n * outside-pointerdown, Escape (refocusing the FAB), or selecting an action. Controlled (`open` +\n * `onOpenChange`) or uncontrolled (`defaultOpen`). The ref points at the root; position it (e.g.\n * `fixed` bottom-right) via `style`/`className`. The FAB carries `aria-expanded`/`aria-controls`.\n */\nexport const SpeedDial = forwardRef<HTMLDivElement, SpeedDialProps>(function SpeedDial(\n {\n ariaLabel,\n icon = 'Add',\n openIcon,\n direction = 'up',\n color = 'primary',\n size = 'md',\n open,\n defaultOpen = false,\n onOpenChange,\n openOnHover = true,\n closeOnActionClick = true,\n tooltipOpen = false,\n actions,\n disabled = false,\n children,\n className,\n style,\n ...props\n },\n forwardedRef,\n) {\n const rootRef = useRef<HTMLDivElement | null>(null)\n const fabRef = useRef<HTMLButtonElement | null>(null)\n const actionsId = useId()\n\n const isControlled = open !== undefined\n const [internal, setInternal] = useState(defaultOpen)\n const isOpen = isControlled ? open : internal\n\n const setOpen = (next: boolean) => {\n if (!isControlled) setInternal(next)\n onOpenChange?.(next)\n }\n // keep a stable reference for the document listeners below\n const setOpenRef = useRef(setOpen)\n setOpenRef.current = setOpen\n\n // while open: close on outside pointerdown / Escape (Escape refocuses the FAB)\n useEffect(() => {\n if (!isOpen) return\n const onPointerDown = (event: PointerEvent) => {\n if (rootRef.current && !rootRef.current.contains(event.target as Node)) {\n setOpenRef.current(false)\n }\n }\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n setOpenRef.current(false)\n fabRef.current?.focus()\n }\n }\n document.addEventListener('pointerdown', onPointerDown)\n document.addEventListener('keydown', onKeyDown)\n return () => {\n document.removeEventListener('pointerdown', onPointerDown)\n document.removeEventListener('keydown', onKeyDown)\n }\n }, [isOpen])\n\n const setRootRef = (node: HTMLDivElement | null) => {\n rootRef.current = node\n if (typeof forwardedRef === 'function') forwardedRef(node)\n else if (forwardedRef) forwardedRef.current = node\n }\n\n const renderIcon = (value: IconName | ReactNode) =>\n typeof value === 'string' && ICON_NAME_SET.has(value) ? (\n <Icon name={value as IconName} />\n ) : (\n value\n )\n\n const ctx: SpeedDialContextValue = {\n size: ACTION_SIZE[size],\n placement: TOOLTIP_PLACEMENT[direction],\n closeOnClick: closeOnActionClick,\n persistentLabels: tooltipOpen,\n requestClose: () => setOpen(false),\n }\n\n const hoverProps =\n openOnHover && !disabled\n ? { onMouseEnter: () => setOpen(true), onMouseLeave: () => setOpen(false) }\n : {}\n\n return (\n <div\n ref={setRootRef}\n className={clsx(styles.speedDial, className)}\n style={style as CSSProperties}\n {...hoverProps}\n {...props}\n >\n <div\n id={actionsId}\n className={clsx(styles.actions, styles[direction])}\n data-open={isOpen ? 'true' : 'false'}\n >\n <SpeedDialContext.Provider value={ctx}>\n {actions\n ? actions.map((action, index) => (\n <SpeedDialAction\n key={action.key ?? index}\n icon={action.icon}\n label={action.label}\n onClick={action.onClick}\n disabled={action.disabled}\n color={action.color}\n />\n ))\n : children}\n </SpeedDialContext.Provider>\n </div>\n\n <IconButton\n ref={fabRef}\n rounded\n variant=\"contained\"\n color={color}\n size={size}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-haspopup=\"true\"\n aria-expanded={isOpen}\n aria-controls={actionsId}\n className={styles.fab}\n onClick={() => setOpen(!isOpen)}\n >\n <span className={clsx(styles.fabIcon, !openIcon && isOpen && styles.fabIconOpen)}>\n {isOpen && openIcon != null ? renderIcon(openIcon) : renderIcon(icon)}\n </span>\n </IconButton>\n </div>\n )\n})\n"],"names":["SpeedDialContext","createContext","useSpeedDial","useContext","ICON_NAME_SET","ICON_NAMES","SpeedDialAction","forwardRef","icon","label","tooltipOpen","hideTooltip","color","onClick","disabled","className","style","props","ref","dial","iconNode","jsx","Icon","button","IconButton","clsx","styles","event","placement","jsxs","Tooltip","ACTION_SIZE","TOOLTIP_PLACEMENT","SpeedDial","ariaLabel","openIcon","direction","size","open","defaultOpen","onOpenChange","openOnHover","closeOnActionClick","actions","children","forwardedRef","rootRef","useRef","fabRef","actionsId","useId","isControlled","internal","setInternal","useState","isOpen","setOpen","next","setOpenRef","useEffect","onPointerDown","onKeyDown","_a","setRootRef","node","renderIcon","value","ctx","hoverProps","action","index"],"mappings":"mMAoBaA,EAAmBC,EAAAA,cAA4C,IAAI,EAGzE,SAASC,GAA6C,CAC3D,OAAOC,EAAAA,WAAWH,CAAgB,CACpC,qdCfMI,GAAgB,IAAI,IAAYC,YAAU,EA0BnCC,EAAkBC,EAAAA,WAC7B,SACE,CACE,KAAAC,EACA,MAAAC,EACA,YAAAC,EACA,YAAAC,EAAc,GACd,MAAAC,EACA,QAAAC,EACA,SAAAC,EACA,UAAAC,EACA,MAAAC,EACA,GAAGC,CAAA,EAELC,EACA,CACA,MAAMC,EAAOjB,EAAA,EACPkB,EACJ,OAAOZ,GAAS,UAAYJ,GAAc,IAAII,CAAI,EAAIa,EAAAA,IAACC,EAAAA,KAAA,CAAK,KAAMd,CAAA,CAAkB,EAAKA,EAErFe,EACJF,EAAAA,IAACG,EAAAA,WAAA,CACC,IAAAN,EACA,QAAO,GACP,QAAQ,YACR,M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as o, jsxs as M } from "react/jsx-runtime";
2
2
  import { createContext as H, useContext as J, forwardRef as g, useRef as T, useId as Q, useState as U, useEffect as V } from "react";
3
3
  import { clsx as u } from "clsx";
4
- import { b as P, a as R } from "./Icon-D5TxgfCc.js";
5
- import { I as W } from "./IconButton-BoURJOUD.js";
4
+ import { b as P, a as R } from "./Icon-B7DJn8Tw.js";
5
+ import { I as W } from "./IconButton-EaExCXRq.js";
6
6
  import { T as X } from "./Tooltip-BbT0uNzy.js";
7
7
  const z = H(null);
8
8
  function Y() {
@@ -174,4 +174,4 @@ export {
174
174
  he as S,
175
175
  me as a
176
176
  };
177
- //# sourceMappingURL=SpeedDial-Be3SHkzw.js.map
177
+ //# sourceMappingURL=SpeedDial-BBQ9y6lm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SpeedDial-Be3SHkzw.js","sources":["../src/components/SpeedDial/speedDialContext.ts","../src/components/SpeedDial/SpeedDialAction.tsx","../src/components/SpeedDial/SpeedDial.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { TooltipPlacement } from '../Tooltip'\n\n/** Action button size — one step smaller than the dial's FAB. */\nexport type SpeedDialActionSize = 'sm' | 'md' | 'lg'\n\n/** Shared state a `<SpeedDial>` hands down to its `<SpeedDialAction>` children via context. */\nexport interface SpeedDialContextValue {\n /** Size for the action FABs. */\n size: SpeedDialActionSize\n /** Where each action's tooltip label sits (derived from the dial `direction`). */\n placement: TooltipPlacement\n /** Close the dial after an action is clicked. */\n closeOnClick: boolean\n /** Show every action's label persistently (no hover needed) while the dial is open. */\n persistentLabels: boolean\n /** Request the dial to close (called by an action on click). */\n requestClose: () => void\n}\n\nexport const SpeedDialContext = createContext<SpeedDialContextValue | null>(null)\n\n/** Read the surrounding `<SpeedDial>` (or `null` when an action is rendered standalone). */\nexport function useSpeedDial(): SpeedDialContextValue | null {\n return useContext(SpeedDialContext)\n}\n","import { forwardRef, type ButtonHTMLAttributes, type MouseEvent, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport type { ThemeColor } from '../../theme'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { Tooltip } from '../Tooltip'\nimport { useSpeedDial } from './speedDialContext'\nimport styles from './SpeedDial.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface SpeedDialActionProps extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'color'\n> {\n /** Action icon — a known `IconName` or any node. */\n icon: IconName | ReactNode\n /** Label shown as a tooltip beside the action (also its `aria-label` when a string). */\n label?: ReactNode\n /** Show the label persistently (no hover) while the dial is open — overrides the dial's `tooltipOpen`. */\n tooltipOpen?: boolean\n /** Hide the tooltip / persistent label (still used for `aria-label`). */\n hideTooltip?: boolean\n /**\n * Tints the **icon** (the circle stays the neutral surface button) — e.g. `error` for a destructive action.\n * Omit for the default text color.\n */\n color?: ThemeColor\n}\n\n/**\n * One action inside a `<SpeedDial>` — a small circular `IconButton` (surface-tinted) with a tooltip\n * `label`. It reads the dial via context for its size, tooltip placement and close-on-click; clicking\n * runs `onClick` then closes the dial. The ref points at the `<button>`.\n */\nexport const SpeedDialAction = forwardRef<HTMLButtonElement, SpeedDialActionProps>(\n function SpeedDialAction(\n {\n icon,\n label,\n tooltipOpen,\n hideTooltip = false,\n color,\n onClick,\n disabled,\n className,\n style,\n ...props\n },\n ref,\n ) {\n const dial = useSpeedDial()\n const iconNode =\n typeof icon === 'string' && ICON_NAME_SET.has(icon) ? <Icon name={icon as IconName} /> : icon\n\n const button = (\n <IconButton\n ref={ref}\n rounded\n variant=\"contained\"\n color=\"surface\"\n size={dial?.size ?? 'sm'}\n disabled={disabled}\n aria-label={typeof label === 'string' ? label : undefined}\n className={clsx(styles.action, className)}\n // the icon follows `color` (currentColor); the circle keeps its surface fill\n style={color ? { color: `var(--tz-color-${color})`, ...style } : style}\n onClick={(event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (dial?.closeOnClick) dial.requestClose()\n }}\n {...props}\n >\n {iconNode}\n </IconButton>\n )\n\n if (label == null || hideTooltip) return button\n\n const placement = dial?.placement ?? 'left'\n // persistent label: render a static label beside the button (no hover) — like MUI's tooltipOpen\n const persistent = tooltipOpen ?? dial?.persistentLabels ?? false\n if (persistent) {\n return (\n <span\n className={clsx(\n styles.actionWrap,\n placement === 'top' ? styles.labelTop : styles.labelLeft,\n )}\n >\n {button}\n <span className={styles.actionLabel}>{label}</span>\n </span>\n )\n }\n\n return (\n <Tooltip content={label} placement={placement}>\n {button}\n </Tooltip>\n )\n },\n)\n","import {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type MouseEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport type { ThemeColor } from '../../theme'\nimport type { TooltipPlacement } from '../Tooltip'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { SpeedDialAction } from './SpeedDialAction'\nimport {\n SpeedDialContext,\n type SpeedDialActionSize,\n type SpeedDialContextValue,\n} from './speedDialContext'\nimport styles from './SpeedDial.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport type SpeedDialSize = 'sm' | 'md' | 'lg'\nexport type SpeedDialDirection = 'up' | 'down' | 'left' | 'right'\n\n/** The FAB size → the (smaller) action-button size. */\nconst ACTION_SIZE: Record<SpeedDialSize, SpeedDialActionSize> = { sm: 'sm', md: 'sm', lg: 'md' }\n/** Tooltip side per direction — labels sit left of a vertical dial, above a horizontal one. */\nconst TOOLTIP_PLACEMENT: Record<SpeedDialDirection, TooltipPlacement> = {\n up: 'left',\n down: 'left',\n left: 'top',\n right: 'top',\n}\n\n/** A data-driven action for the `actions` prop. */\nexport interface SpeedDialActionItem {\n /** Stable key (falls back to the index). */\n key?: string\n icon: IconName | ReactNode\n label?: ReactNode\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void\n disabled?: boolean\n /** Tints the action's icon (e.g. `error` for a destructive one); the circle stays neutral. */\n color?: ThemeColor\n}\n\nexport interface SpeedDialProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'onChange'> {\n /** Accessible label for the FAB (required — it's icon-only). */\n ariaLabel: string\n /** FAB icon. Defaults to `Add` (a `+`). */\n icon?: IconName | ReactNode\n /** Icon shown while open. Omit to rotate the `icon` 45° instead (a `+` becomes a `×`). */\n openIcon?: IconName | ReactNode\n /** Which way the actions fan out. Defaults to `up`. */\n direction?: SpeedDialDirection\n /** Theme palette token tinting the FAB. Defaults to `primary`. */\n color?: ThemeColor\n /** FAB size (actions render one step smaller). Defaults to `md`. */\n size?: SpeedDialSize\n /** Controlled open state. */\n open?: boolean\n /** Initial open state for uncontrolled use. Defaults to `false`. */\n defaultOpen?: boolean\n /** Fires with the next open state. */\n onOpenChange?: (open: boolean) => void\n /** Open on hover (also opens on click). Defaults to `true`. */\n openOnHover?: boolean\n /** Close the dial after an action is clicked. Defaults to `true`. */\n closeOnActionClick?: boolean\n /** Show every action's label persistently while open (no hover needed) — like MUI's `tooltipOpen`. */\n tooltipOpen?: boolean\n /** Data-driven actions — an alternative to `<SpeedDialAction>` children. */\n actions?: SpeedDialActionItem[]\n /** Disables the FAB (and hover-opening). */\n disabled?: boolean\n /** `<SpeedDialAction>` children (used when `actions` is not given). */\n children?: ReactNode\n}\n\n/**\n * A floating action button that reveals a set of related actions on hover / click — fanning out in\n * `direction` (`up` default). The FAB icon rotates 45° when open (a `+` → `×`) unless an `openIcon` is\n * given. Each `<SpeedDialAction>` is a small circular button with a tooltip label; supply them via the\n * data-driven `actions` prop or as children. Opens on hover (`openOnHover`) and click; closes on\n * outside-pointerdown, Escape (refocusing the FAB), or selecting an action. Controlled (`open` +\n * `onOpenChange`) or uncontrolled (`defaultOpen`). The ref points at the root; position it (e.g.\n * `fixed` bottom-right) via `style`/`className`. The FAB carries `aria-expanded`/`aria-controls`.\n */\nexport const SpeedDial = forwardRef<HTMLDivElement, SpeedDialProps>(function SpeedDial(\n {\n ariaLabel,\n icon = 'Add',\n openIcon,\n direction = 'up',\n color = 'primary',\n size = 'md',\n open,\n defaultOpen = false,\n onOpenChange,\n openOnHover = true,\n closeOnActionClick = true,\n tooltipOpen = false,\n actions,\n disabled = false,\n children,\n className,\n style,\n ...props\n },\n forwardedRef,\n) {\n const rootRef = useRef<HTMLDivElement | null>(null)\n const fabRef = useRef<HTMLButtonElement | null>(null)\n const actionsId = useId()\n\n const isControlled = open !== undefined\n const [internal, setInternal] = useState(defaultOpen)\n const isOpen = isControlled ? open : internal\n\n const setOpen = (next: boolean) => {\n if (!isControlled) setInternal(next)\n onOpenChange?.(next)\n }\n // keep a stable reference for the document listeners below\n const setOpenRef = useRef(setOpen)\n setOpenRef.current = setOpen\n\n // while open: close on outside pointerdown / Escape (Escape refocuses the FAB)\n useEffect(() => {\n if (!isOpen) return\n const onPointerDown = (event: PointerEvent) => {\n if (rootRef.current && !rootRef.current.contains(event.target as Node)) {\n setOpenRef.current(false)\n }\n }\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n setOpenRef.current(false)\n fabRef.current?.focus()\n }\n }\n document.addEventListener('pointerdown', onPointerDown)\n document.addEventListener('keydown', onKeyDown)\n return () => {\n document.removeEventListener('pointerdown', onPointerDown)\n document.removeEventListener('keydown', onKeyDown)\n }\n }, [isOpen])\n\n const setRootRef = (node: HTMLDivElement | null) => {\n rootRef.current = node\n if (typeof forwardedRef === 'function') forwardedRef(node)\n else if (forwardedRef) forwardedRef.current = node\n }\n\n const renderIcon = (value: IconName | ReactNode) =>\n typeof value === 'string' && ICON_NAME_SET.has(value) ? (\n <Icon name={value as IconName} />\n ) : (\n value\n )\n\n const ctx: SpeedDialContextValue = {\n size: ACTION_SIZE[size],\n placement: TOOLTIP_PLACEMENT[direction],\n closeOnClick: closeOnActionClick,\n persistentLabels: tooltipOpen,\n requestClose: () => setOpen(false),\n }\n\n const hoverProps =\n openOnHover && !disabled\n ? { onMouseEnter: () => setOpen(true), onMouseLeave: () => setOpen(false) }\n : {}\n\n return (\n <div\n ref={setRootRef}\n className={clsx(styles.speedDial, className)}\n style={style as CSSProperties}\n {...hoverProps}\n {...props}\n >\n <div\n id={actionsId}\n className={clsx(styles.actions, styles[direction])}\n data-open={isOpen ? 'true' : 'false'}\n >\n <SpeedDialContext.Provider value={ctx}>\n {actions\n ? actions.map((action, index) => (\n <SpeedDialAction\n key={action.key ?? index}\n icon={action.icon}\n label={action.label}\n onClick={action.onClick}\n disabled={action.disabled}\n color={action.color}\n />\n ))\n : children}\n </SpeedDialContext.Provider>\n </div>\n\n <IconButton\n ref={fabRef}\n rounded\n variant=\"contained\"\n color={color}\n size={size}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-haspopup=\"true\"\n aria-expanded={isOpen}\n aria-controls={actionsId}\n className={styles.fab}\n onClick={() => setOpen(!isOpen)}\n >\n <span className={clsx(styles.fabIcon, !openIcon && isOpen && styles.fabIconOpen)}>\n {isOpen && openIcon != null ? renderIcon(openIcon) : renderIcon(icon)}\n </span>\n </IconButton>\n </div>\n )\n})\n"],"names":["SpeedDialContext","createContext","useSpeedDial","useContext","ICON_NAME_SET","ICON_NAMES","SpeedDialAction","forwardRef","icon","label","tooltipOpen","hideTooltip","color","onClick","disabled","className","style","props","ref","dial","iconNode","jsx","Icon","button","IconButton","clsx","styles","event","placement","jsxs","Tooltip","ACTION_SIZE","TOOLTIP_PLACEMENT","SpeedDial","ariaLabel","openIcon","direction","size","open","defaultOpen","onOpenChange","openOnHover","closeOnActionClick","actions","children","forwardedRef","rootRef","useRef","fabRef","actionsId","useId","isControlled","internal","setInternal","useState","isOpen","setOpen","next","setOpenRef","useEffect","onPointerDown","onKeyDown","_a","setRootRef","node","renderIcon","value","ctx","hoverProps","action","index"],"mappings":";;;;;;AAoBO,MAAMA,IAAmBC,EAA4C,IAAI;AAGzE,SAASC,IAA6C;AAC3D,SAAO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/SpeedDial/SpeedDialAction.tsx","../src/components/SpeedDial/SpeedDial.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { TooltipPlacement } from '../Tooltip'\n\n/** Action button size — one step smaller than the dial's FAB. */\nexport type SpeedDialActionSize = 'sm' | 'md' | 'lg'\n\n/** Shared state a `<SpeedDial>` hands down to its `<SpeedDialAction>` children via context. */\nexport interface SpeedDialContextValue {\n /** Size for the action FABs. */\n size: SpeedDialActionSize\n /** Where each action's tooltip label sits (derived from the dial `direction`). */\n placement: TooltipPlacement\n /** Close the dial after an action is clicked. */\n closeOnClick: boolean\n /** Show every action's label persistently (no hover needed) while the dial is open. */\n persistentLabels: boolean\n /** Request the dial to close (called by an action on click). */\n requestClose: () => void\n}\n\nexport const SpeedDialContext = createContext<SpeedDialContextValue | null>(null)\n\n/** Read the surrounding `<SpeedDial>` (or `null` when an action is rendered standalone). */\nexport function useSpeedDial(): SpeedDialContextValue | null {\n return useContext(SpeedDialContext)\n}\n","import { forwardRef, type ButtonHTMLAttributes, type MouseEvent, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport type { ThemeColor } from '../../theme'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { Tooltip } from '../Tooltip'\nimport { useSpeedDial } from './speedDialContext'\nimport styles from './SpeedDial.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface SpeedDialActionProps extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'color'\n> {\n /** Action icon — a known `IconName` or any node. */\n icon: IconName | ReactNode\n /** Label shown as a tooltip beside the action (also its `aria-label` when a string). */\n label?: ReactNode\n /** Show the label persistently (no hover) while the dial is open — overrides the dial's `tooltipOpen`. */\n tooltipOpen?: boolean\n /** Hide the tooltip / persistent label (still used for `aria-label`). */\n hideTooltip?: boolean\n /**\n * Tints the **icon** (the circle stays the neutral surface button) — e.g. `error` for a destructive action.\n * Omit for the default text color.\n */\n color?: ThemeColor\n}\n\n/**\n * One action inside a `<SpeedDial>` — a small circular `IconButton` (surface-tinted) with a tooltip\n * `label`. It reads the dial via context for its size, tooltip placement and close-on-click; clicking\n * runs `onClick` then closes the dial. The ref points at the `<button>`.\n */\nexport const SpeedDialAction = forwardRef<HTMLButtonElement, SpeedDialActionProps>(\n function SpeedDialAction(\n {\n icon,\n label,\n tooltipOpen,\n hideTooltip = false,\n color,\n onClick,\n disabled,\n className,\n style,\n ...props\n },\n ref,\n ) {\n const dial = useSpeedDial()\n const iconNode =\n typeof icon === 'string' && ICON_NAME_SET.has(icon) ? <Icon name={icon as IconName} /> : icon\n\n const button = (\n <IconButton\n ref={ref}\n rounded\n variant=\"contained\"\n color=\"surface\"\n size={dial?.size ?? 'sm'}\n disabled={disabled}\n aria-label={typeof label === 'string' ? label : undefined}\n className={clsx(styles.action, className)}\n // the icon follows `color` (currentColor); the circle keeps its surface fill\n style={color ? { color: `var(--tz-color-${color})`, ...style } : style}\n onClick={(event: MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (dial?.closeOnClick) dial.requestClose()\n }}\n {...props}\n >\n {iconNode}\n </IconButton>\n )\n\n if (label == null || hideTooltip) return button\n\n const placement = dial?.placement ?? 'left'\n // persistent label: render a static label beside the button (no hover) — like MUI's tooltipOpen\n const persistent = tooltipOpen ?? dial?.persistentLabels ?? false\n if (persistent) {\n return (\n <span\n className={clsx(\n styles.actionWrap,\n placement === 'top' ? styles.labelTop : styles.labelLeft,\n )}\n >\n {button}\n <span className={styles.actionLabel}>{label}</span>\n </span>\n )\n }\n\n return (\n <Tooltip content={label} placement={placement}>\n {button}\n </Tooltip>\n )\n },\n)\n","import {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type MouseEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport type { ThemeColor } from '../../theme'\nimport type { TooltipPlacement } from '../Tooltip'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { SpeedDialAction } from './SpeedDialAction'\nimport {\n SpeedDialContext,\n type SpeedDialActionSize,\n type SpeedDialContextValue,\n} from './speedDialContext'\nimport styles from './SpeedDial.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport type SpeedDialSize = 'sm' | 'md' | 'lg'\nexport type SpeedDialDirection = 'up' | 'down' | 'left' | 'right'\n\n/** The FAB size → the (smaller) action-button size. */\nconst ACTION_SIZE: Record<SpeedDialSize, SpeedDialActionSize> = { sm: 'sm', md: 'sm', lg: 'md' }\n/** Tooltip side per direction — labels sit left of a vertical dial, above a horizontal one. */\nconst TOOLTIP_PLACEMENT: Record<SpeedDialDirection, TooltipPlacement> = {\n up: 'left',\n down: 'left',\n left: 'top',\n right: 'top',\n}\n\n/** A data-driven action for the `actions` prop. */\nexport interface SpeedDialActionItem {\n /** Stable key (falls back to the index). */\n key?: string\n icon: IconName | ReactNode\n label?: ReactNode\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void\n disabled?: boolean\n /** Tints the action's icon (e.g. `error` for a destructive one); the circle stays neutral. */\n color?: ThemeColor\n}\n\nexport interface SpeedDialProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'onChange'> {\n /** Accessible label for the FAB (required — it's icon-only). */\n ariaLabel: string\n /** FAB icon. Defaults to `Add` (a `+`). */\n icon?: IconName | ReactNode\n /** Icon shown while open. Omit to rotate the `icon` 45° instead (a `+` becomes a `×`). */\n openIcon?: IconName | ReactNode\n /** Which way the actions fan out. Defaults to `up`. */\n direction?: SpeedDialDirection\n /** Theme palette token tinting the FAB. Defaults to `primary`. */\n color?: ThemeColor\n /** FAB size (actions render one step smaller). Defaults to `md`. */\n size?: SpeedDialSize\n /** Controlled open state. */\n open?: boolean\n /** Initial open state for uncontrolled use. Defaults to `false`. */\n defaultOpen?: boolean\n /** Fires with the next open state. */\n onOpenChange?: (open: boolean) => void\n /** Open on hover (also opens on click). Defaults to `true`. */\n openOnHover?: boolean\n /** Close the dial after an action is clicked. Defaults to `true`. */\n closeOnActionClick?: boolean\n /** Show every action's label persistently while open (no hover needed) — like MUI's `tooltipOpen`. */\n tooltipOpen?: boolean\n /** Data-driven actions — an alternative to `<SpeedDialAction>` children. */\n actions?: SpeedDialActionItem[]\n /** Disables the FAB (and hover-opening). */\n disabled?: boolean\n /** `<SpeedDialAction>` children (used when `actions` is not given). */\n children?: ReactNode\n}\n\n/**\n * A floating action button that reveals a set of related actions on hover / click — fanning out in\n * `direction` (`up` default). The FAB icon rotates 45° when open (a `+` → `×`) unless an `openIcon` is\n * given. Each `<SpeedDialAction>` is a small circular button with a tooltip label; supply them via the\n * data-driven `actions` prop or as children. Opens on hover (`openOnHover`) and click; closes on\n * outside-pointerdown, Escape (refocusing the FAB), or selecting an action. Controlled (`open` +\n * `onOpenChange`) or uncontrolled (`defaultOpen`). The ref points at the root; position it (e.g.\n * `fixed` bottom-right) via `style`/`className`. The FAB carries `aria-expanded`/`aria-controls`.\n */\nexport const SpeedDial = forwardRef<HTMLDivElement, SpeedDialProps>(function SpeedDial(\n {\n ariaLabel,\n icon = 'Add',\n openIcon,\n direction = 'up',\n color = 'primary',\n size = 'md',\n open,\n defaultOpen = false,\n onOpenChange,\n openOnHover = true,\n closeOnActionClick = true,\n tooltipOpen = false,\n actions,\n disabled = false,\n children,\n className,\n style,\n ...props\n },\n forwardedRef,\n) {\n const rootRef = useRef<HTMLDivElement | null>(null)\n const fabRef = useRef<HTMLButtonElement | null>(null)\n const actionsId = useId()\n\n const isControlled = open !== undefined\n const [internal, setInternal] = useState(defaultOpen)\n const isOpen = isControlled ? open : internal\n\n const setOpen = (next: boolean) => {\n if (!isControlled) setInternal(next)\n onOpenChange?.(next)\n }\n // keep a stable reference for the document listeners below\n const setOpenRef = useRef(setOpen)\n setOpenRef.current = setOpen\n\n // while open: close on outside pointerdown / Escape (Escape refocuses the FAB)\n useEffect(() => {\n if (!isOpen) return\n const onPointerDown = (event: PointerEvent) => {\n if (rootRef.current && !rootRef.current.contains(event.target as Node)) {\n setOpenRef.current(false)\n }\n }\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n setOpenRef.current(false)\n fabRef.current?.focus()\n }\n }\n document.addEventListener('pointerdown', onPointerDown)\n document.addEventListener('keydown', onKeyDown)\n return () => {\n document.removeEventListener('pointerdown', onPointerDown)\n document.removeEventListener('keydown', onKeyDown)\n }\n }, [isOpen])\n\n const setRootRef = (node: HTMLDivElement | null) => {\n rootRef.current = node\n if (typeof forwardedRef === 'function') forwardedRef(node)\n else if (forwardedRef) forwardedRef.current = node\n }\n\n const renderIcon = (value: IconName | ReactNode) =>\n typeof value === 'string' && ICON_NAME_SET.has(value) ? (\n <Icon name={value as IconName} />\n ) : (\n value\n )\n\n const ctx: SpeedDialContextValue = {\n size: ACTION_SIZE[size],\n placement: TOOLTIP_PLACEMENT[direction],\n closeOnClick: closeOnActionClick,\n persistentLabels: tooltipOpen,\n requestClose: () => setOpen(false),\n }\n\n const hoverProps =\n openOnHover && !disabled\n ? { onMouseEnter: () => setOpen(true), onMouseLeave: () => setOpen(false) }\n : {}\n\n return (\n <div\n ref={setRootRef}\n className={clsx(styles.speedDial, className)}\n style={style as CSSProperties}\n {...hoverProps}\n {...props}\n >\n <div\n id={actionsId}\n className={clsx(styles.actions, styles[direction])}\n data-open={isOpen ? 'true' : 'false'}\n >\n <SpeedDialContext.Provider value={ctx}>\n {actions\n ? actions.map((action, index) => (\n <SpeedDialAction\n key={action.key ?? index}\n icon={action.icon}\n label={action.label}\n onClick={action.onClick}\n disabled={action.disabled}\n color={action.color}\n />\n ))\n : children}\n </SpeedDialContext.Provider>\n </div>\n\n <IconButton\n ref={fabRef}\n rounded\n variant=\"contained\"\n color={color}\n size={size}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-haspopup=\"true\"\n aria-expanded={isOpen}\n aria-controls={actionsId}\n className={styles.fab}\n onClick={() => setOpen(!isOpen)}\n >\n <span className={clsx(styles.fabIcon, !openIcon && isOpen && styles.fabIconOpen)}>\n {isOpen && openIcon != null ? renderIcon(openIcon) : renderIcon(icon)}\n </span>\n </IconButton>\n </div>\n )\n})\n"],"names":["SpeedDialContext","createContext","useSpeedDial","useContext","ICON_NAME_SET","ICON_NAMES","SpeedDialAction","forwardRef","icon","label","tooltipOpen","hideTooltip","color","onClick","disabled","className","style","props","ref","dial","iconNode","jsx","Icon","button","IconButton","clsx","styles","event","placement","jsxs","Tooltip","ACTION_SIZE","TOOLTIP_PLACEMENT","SpeedDial","ariaLabel","openIcon","direction","size","open","defaultOpen","onOpenChange","openOnHover","closeOnActionClick","actions","children","forwardedRef","rootRef","useRef","fabRef","actionsId","useId","isControlled","internal","setInternal","useState","isOpen","setOpen","next","setOpenRef","useEffect","onPointerDown","onKeyDown","_a","setRootRef","node","renderIcon","value","ctx","hoverProps","action","index"],"mappings":";;;;;;AAoBO,MAAMA,IAAmBC,EAA4C,IAAI;AAGzE,SAASC,IAA6C;AAC3D,SAAOC,EAAWH,CAAgB;AACpC;;;;;;;;;;;;;;;;GCfMI,KAAgB,IAAI,IAAYC,CAAU,GA0BnCC,KAAkBC;AAAA,EAC7B,SACE;AAAA,IACE,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,GACA;AACA,UAAMC,IAAOjB,EAAA,GACPkB,IACJ,OAAOZ,KAAS,YAAYJ,GAAc,IAAII,CAAI,IAAI,gBAAAa,EAACC,GAAA,EAAK,MAAMd,EAAA,CAAkB,IAAKA,GAErFe,IACJ,gBAAAF;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,KAAAN;AAAA,QACA,SAAO;AAAA,QACP,SAAQ;A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AAAA,UAAA;AAAA,QAAA;AAAA,QAGF,gBAAAvB;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,KAAKwB;AAAA,YACL,SAAO;AAAA,YACP,SAAQ;AAAA,YACR,OAAApC;AAAA,YACA,MAAAyB;AAAA,YACA,UAAAvB;AAAA,YACA,cAAYoB;AAAA,YACZ,iBAAc;AAAA,YACd,iBAAeqB;AAAA,YACf,iBAAeN;AAAA,YACf,WAAWvB,EAAO;AAAA,YAClB,SAAS,MAAM8B,EAAQ,CAACD,CAAM;AAAA,YAE9B,UAAA,gBAAAlC,EAAC,UAAK,WAAWI,EAAKC,EAAO,SAAS,CAACS,KAAYoB,KAAU7B,EAAO,WAAW,GAC5E,UAAA6B,KAAUpB,KAAY,OAAO8B,EAAW9B,CAAQ,IAAI8B,EAAWzD,CAAI,EAAA,CACtE;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
@@ -0,0 +1,168 @@
1
+ import { jsxs as h, jsx as c, Fragment as nn } from "react/jsx-runtime";
2
+ import { forwardRef as tn, useCallback as x, useState as en, useRef as b, useEffect as I } from "react";
3
+ import { clsx as R } from "clsx";
4
+ import { u as on, r as rn } from "./useClearUrlOnUnmount-DOeh6CUN.js";
5
+ import { b as K, a as cn } from "./Icon-B7DJn8Tw.js";
6
+ import { m as ln } from "./ConfigProvider-CYgmMH4j.js";
7
+ const sn = "_root_1pvou_2", an = "_list_1pvou_5", dn = "_horizontal_1pvou_11", un = "_vertical_1pvou_24", _n = "_sm_1pvou_29", mn = "_md_1pvou_34", pn = "_lg_1pvou_39", fn = "_step_1pvou_47", vn = "_disabled_1pvou_64", hn = "_main_1pvou_69", bn = "_indicator_1pvou_100", wn = "_number_1pvou_127", Nn = "_completed_1pvou_132", yn = "_active_1pvou_138", gn = "_error_1pvou_146", Ln = "_text_1pvou_153", xn = "_label_1pvou_169", In = "_description_1pvou_183", Rn = "_optional_1pvou_188", En = "_connector_1pvou_195", zn = "_done_1pvou_200", $n = "_panel_1pvou_226", Qn = "_stepContent_1pvou_230", e = {
8
+ root: sn,
9
+ list: an,
10
+ horizontal: dn,
11
+ vertical: un,
12
+ sm: _n,
13
+ md: mn,
14
+ lg: pn,
15
+ step: fn,
16
+ disabled: vn,
17
+ main: hn,
18
+ indicator: bn,
19
+ number: wn,
20
+ completed: Nn,
21
+ active: yn,
22
+ error: gn,
23
+ text: Ln,
24
+ label: xn,
25
+ description: In,
26
+ optional: Rn,
27
+ connector: En,
28
+ done: zn,
29
+ panel: $n,
30
+ stepContent: Qn
31
+ }, Pn = new Set(cn), Kn = tn(function({
32
+ steps: a,
33
+ activeStep: u,
34
+ defaultStep: E,
35
+ onStepChange: d,
36
+ queryKey: z,
37
+ pushHistory: $ = !1,
38
+ clearUrlOnUnmount: T = !0,
39
+ orientation: _ = "horizontal",
40
+ size: w = "md",
41
+ color: Q = "primary",
42
+ onStepClick: m,
43
+ "aria-label": W,
44
+ className: q,
45
+ style: F
46
+ }, D) {
47
+ var j;
48
+ const P = _ === "vertical", G = m != null, J = ln(), o = z === !0 ? J : z || void 0, p = x(
49
+ (n) => n != null && Number.isInteger(n) && n >= 0 && n < a.length && !a[n].disabled,
50
+ [a]
51
+ ), N = x(() => {
52
+ if (!o || typeof window > "u") return null;
53
+ const n = new URLSearchParams(window.location.search).get(o);
54
+ return n != null && /^\d+$/.test(n) ? Number(n) - 1 : null;
55
+ }, [o]), S = Math.max(
56
+ a.findIndex((n) => !n.disabled),
57
+ 0
58
+ ), [V, U] = en(() => {
59
+ const n = N();
60
+ return p(n) ? n : p(E) ? E : S;
61
+ }), A = u !== void 0, r = A ? u : V, y = b(r);
62
+ y.current = r;
63
+ const f = b(d);
64
+ f.current = d;
65
+ const g = b(!1), C = x(
66
+ (n, t) => {
67
+ if (!o || typeof window > "u") return;
68
+ const l = new URLSearchParams(window.location.search), s = String(n + 1);
69
+ if (l.get(o) === s) return;
70
+ l.set(o, s);
71
+ const i = `${window.location.pathname}?${l.toString()}${window.location.hash}`;
72
+ window.history[t ? "pushState" : "replaceState"](window.history.state, "", i);
73
+ },
74
+ [o]
75
+ ), X = (n) => {
76
+ n !== y.current && (g.current = !0, A || U(n), d == null || d(n));
77
+ };
78
+ I(() => {
79
+ if (!o || typeof window > "u" || !Number.isInteger(r) || r < 0 || r >= a.length) return;
80
+ const n = g.current && $;
81
+ g.current = !1, C(r, n);
82
+ }, [o, r, $, C, a.length]), on(o, T, () => {
83
+ o && rn(o);
84
+ }), I(() => {
85
+ if (!o || typeof window > "u") return;
86
+ const n = () => {
87
+ var l;
88
+ const t = N();
89
+ p(t) && t !== y.current && (u === void 0 && U(t), (l = f.current) == null || l.call(f, t));
90
+ };
91
+ return window.addEventListener("popstate", n), () => window.removeEventListener("popstate", n);
92
+ }, [o, N, p, u]);
93
+ const M = (j = a[r]) == null ? void 0 : j.content, O = b(null);
94
+ I(() => {
95
+ if (_ === "vertical") return;
96
+ const n = O.current, t = n == null ? void 0 : n.children[r];
97
+ if (!n || !t) return;
98
+ const l = n.getBoundingClientRect(), s = t.getBoundingClientRect(), i = s.left - l.left + n.scrollLeft, v = i + s.width;
99
+ i < n.scrollLeft ? n.scrollLeft = i : v > n.scrollLeft + n.clientWidth && (n.scrollLeft = v - n.clientWidth);
100
+ }, [r, _]);
101
+ const Y = (n) => typeof n == "string" && Pn.has(n) ? /* @__PURE__ */ c(K, { name: n, size: w }) : n;
102
+ return /* @__PURE__ */ h(
103
+ "div",
104
+ {
105
+ ref: D,
106
+ className: R(e.root, e[_], e[w], q),
107
+ style: {
108
+ "--tz-btn-rgb": `var(--tz-color-${Q}-rgb)`,
109
+ "--tz-btn-on": `var(--tz-color-${Q}-contrast, #fff)`,
110
+ ...F
111
+ },
112
+ children: [
113
+ /* @__PURE__ */ c("ol", { ref: O, "aria-label": W, className: e.list, children: a.map((n, t) => {
114
+ const l = !!n.error, s = !l && (n.completed || t < r), i = !l && !s && t === r, v = l ? "error" : s ? "completed" : i ? "active" : "upcoming", Z = t === a.length - 1, L = Y(n.icon), k = L ?? (s ? /* @__PURE__ */ c(K, { name: "Check", size: w }) : /* @__PURE__ */ c("span", { className: e.number, children: t + 1 })), H = n.label != null || n.description != null || n.optional != null, B = /* @__PURE__ */ h(nn, { children: [
115
+ /* @__PURE__ */ c(
116
+ "span",
117
+ {
118
+ className: e.indicator,
119
+ "aria-hidden": L == null && !s ? void 0 : !0,
120
+ children: k
121
+ }
122
+ ),
123
+ H && /* @__PURE__ */ h("span", { className: e.text, children: [
124
+ n.label != null && /* @__PURE__ */ c("span", { className: e.label, children: n.label }),
125
+ n.description != null && /* @__PURE__ */ c("span", { className: e.description, children: n.description }),
126
+ n.optional != null && /* @__PURE__ */ c("span", { className: e.optional, children: n.optional })
127
+ ] })
128
+ ] });
129
+ return /* @__PURE__ */ h(
130
+ "li",
131
+ {
132
+ className: R(e.step, e[v], n.disabled && e.disabled),
133
+ children: [
134
+ G ? /* @__PURE__ */ c(
135
+ "button",
136
+ {
137
+ type: "button",
138
+ className: e.main,
139
+ disabled: n.disabled,
140
+ "aria-current": i ? "step" : void 0,
141
+ onClick: () => {
142
+ m == null || m(t), X(t);
143
+ },
144
+ children: B
145
+ }
146
+ ) : /* @__PURE__ */ c("div", { className: e.main, "aria-current": i ? "step" : void 0, children: B }),
147
+ !Z && /* @__PURE__ */ c(
148
+ "span",
149
+ {
150
+ className: R(e.connector, t < r && e.done),
151
+ "aria-hidden": "true"
152
+ }
153
+ ),
154
+ P && t === r && n.content != null && /* @__PURE__ */ c("div", { className: e.stepContent, children: n.content })
155
+ ]
156
+ },
157
+ t
158
+ );
159
+ }) }),
160
+ !P && M != null && /* @__PURE__ */ c("div", { className: e.panel, children: M })
161
+ ]
162
+ }
163
+ );
164
+ });
165
+ export {
166
+ Kn as S
167
+ };
168
+ //# sourceMappingURL=Stepper-CU5Y0kfj.js.map