ivt 0.7.3 → 0.7.5

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 (339) hide show
  1. package/dist/accordion/index.mjs +13 -15
  2. package/dist/accordion/index.mjs.map +1 -1
  3. package/dist/accordion-table/index.mjs +26 -28
  4. package/dist/accordion-table/index.mjs.map +1 -1
  5. package/dist/alert/index.mjs +3 -3
  6. package/dist/alert-dialog/index.mjs +15 -17
  7. package/dist/alert-dialog/index.mjs.map +1 -1
  8. package/dist/aspect-ratio/index.mjs +42 -3
  9. package/dist/aspect-ratio/index.mjs.map +1 -1
  10. package/dist/auto-complete-multi-select/index.mjs +31 -33
  11. package/dist/auto-complete-multi-select/index.mjs.map +1 -1
  12. package/dist/avatar/index.mjs +130 -8
  13. package/dist/avatar/index.mjs.map +1 -1
  14. package/dist/badge/index.mjs +3 -3
  15. package/dist/base/index.d.ts +31 -9
  16. package/dist/base/index.mjs +79 -164
  17. package/dist/base/index.mjs.map +1 -1
  18. package/dist/breadcrumb/index.mjs +5 -5
  19. package/dist/button/index.d.ts +1 -1
  20. package/dist/button/index.mjs +3 -3
  21. package/dist/button-group/index.d.ts +3 -2
  22. package/dist/button-group/index.mjs +3 -4
  23. package/dist/button-group/index.mjs.map +1 -1
  24. package/dist/calendar/index.mjs +9 -9
  25. package/dist/card/index.mjs +3 -3
  26. package/dist/carousel/index.mjs +4 -4
  27. package/dist/chart/index.mjs +2869 -1282
  28. package/dist/chart/index.mjs.map +1 -1
  29. package/dist/checkbox/index.mjs +12 -14
  30. package/dist/checkbox/index.mjs.map +1 -1
  31. package/dist/chunks/AutoComplete-BpwnFm_u.mjs +106 -0
  32. package/dist/chunks/AutoComplete-BpwnFm_u.mjs.map +1 -0
  33. package/dist/chunks/{CalendarRange-C6BJ_i8D.mjs → CalendarRange-BGP7p-ma.mjs} +8 -8
  34. package/dist/chunks/{CalendarRange-C6BJ_i8D.mjs.map → CalendarRange-BGP7p-ma.mjs.map} +1 -1
  35. package/dist/chunks/{ComboboxField-DFqOZmlN.mjs → ComboboxField-CzJlHHXv.mjs} +9 -9
  36. package/dist/chunks/{ComboboxField-DFqOZmlN.mjs.map → ComboboxField-CzJlHHXv.mjs.map} +1 -1
  37. package/dist/chunks/{Container-BFnURH_3.mjs → Container-77E_UFi2.mjs} +2 -2
  38. package/dist/chunks/{Container-BFnURH_3.mjs.map → Container-77E_UFi2.mjs.map} +1 -1
  39. package/dist/chunks/{DeleteConfirmationModal-3tgFcxyU.mjs → DeleteConfirmationModal-DQK05Srx.mjs} +4 -4
  40. package/dist/chunks/{DeleteConfirmationModal-3tgFcxyU.mjs.map → DeleteConfirmationModal-DQK05Srx.mjs.map} +1 -1
  41. package/dist/chunks/{ListItem-Dhdqegoz.mjs → ListItem-B0_5JcsU.mjs} +4 -4
  42. package/dist/chunks/{ListItem-Dhdqegoz.mjs.map → ListItem-B0_5JcsU.mjs.map} +1 -1
  43. package/dist/chunks/{TooltipIndicator-tYIvoK3x.mjs → TooltipIndicator-Db1poSJI.mjs} +4 -4
  44. package/dist/chunks/{TooltipIndicator-tYIvoK3x.mjs.map → TooltipIndicator-Db1poSJI.mjs.map} +1 -1
  45. package/dist/chunks/{_commonjsHelpers-CDajFLDm.mjs → _commonjsHelpers-DkfSKqYE.mjs} +1 -1
  46. package/dist/chunks/_commonjsHelpers-DkfSKqYE.mjs.map +1 -0
  47. package/dist/chunks/{accordion-Dig0Vyew.mjs → accordion-DSn7k_RQ.mjs} +9 -11
  48. package/dist/chunks/{accordion-Dig0Vyew.mjs.map → accordion-DSn7k_RQ.mjs.map} +1 -1
  49. package/dist/chunks/{alert-CtNiMMMm.mjs → alert-aP6n7wtq.mjs} +2 -2
  50. package/dist/chunks/{alert-CtNiMMMm.mjs.map → alert-aP6n7wtq.mjs.map} +1 -1
  51. package/dist/chunks/{badge-CMepcgQ2.mjs → badge-CsUuqHNu.mjs} +2 -2
  52. package/dist/chunks/{badge-CMepcgQ2.mjs.map → badge-CsUuqHNu.mjs.map} +1 -1
  53. package/dist/chunks/{bundle-mjs-ByJyReDu.mjs → bundle-mjs-BRbxNcQb.mjs} +228 -154
  54. package/dist/chunks/bundle-mjs-BRbxNcQb.mjs.map +1 -0
  55. package/dist/chunks/{button-DHQrVlqk.mjs → button-BW9I4XWU.mjs} +2 -2
  56. package/dist/chunks/{button-DHQrVlqk.mjs.map → button-BW9I4XWU.mjs.map} +1 -1
  57. package/dist/chunks/button-C8IZYeQz.d.ts +16 -0
  58. package/dist/chunks/{calendar-DtKpXGXO.mjs → calendar-C549VT55.mjs} +1181 -797
  59. package/dist/chunks/calendar-C549VT55.mjs.map +1 -0
  60. package/dist/chunks/{calendar-days-5V8H0_Qn.mjs → calendar-days-BSzlDBsi.mjs} +2 -2
  61. package/dist/chunks/{calendar-days-5V8H0_Qn.mjs.map → calendar-days-BSzlDBsi.mjs.map} +1 -1
  62. package/dist/chunks/{card-DgO3JDtX.mjs → card-Dqm2EuWU.mjs} +2 -2
  63. package/dist/chunks/{card-DgO3JDtX.mjs.map → card-Dqm2EuWU.mjs.map} +1 -1
  64. package/dist/chunks/{check-yo43z6YO.mjs → check-CKdwsuVA.mjs} +2 -2
  65. package/dist/chunks/{check-yo43z6YO.mjs.map → check-CKdwsuVA.mjs.map} +1 -1
  66. package/dist/chunks/{checkbox-B3xoUcaP.mjs → checkbox-CvaPsjy3.mjs} +9 -11
  67. package/dist/chunks/{checkbox-B3xoUcaP.mjs.map → checkbox-CvaPsjy3.mjs.map} +1 -1
  68. package/dist/chunks/{chevron-down-gO34wzc7.mjs → chevron-down-o7NUBnJ4.mjs} +2 -2
  69. package/dist/chunks/{chevron-down-gO34wzc7.mjs.map → chevron-down-o7NUBnJ4.mjs.map} +1 -1
  70. package/dist/chunks/{chevron-left-DGlHB7Nw.mjs → chevron-left-BZ8X7kLy.mjs} +2 -2
  71. package/dist/chunks/{chevron-left-DGlHB7Nw.mjs.map → chevron-left-BZ8X7kLy.mjs.map} +1 -1
  72. package/dist/chunks/{chevron-right-B6bwFEdI.mjs → chevron-right-jAScR3zY.mjs} +2 -2
  73. package/dist/chunks/{chevron-right-B6bwFEdI.mjs.map → chevron-right-jAScR3zY.mjs.map} +1 -1
  74. package/dist/chunks/{chevrons-up-down-StzXyb6Z.mjs → chevrons-up-down-BSIPdamI.mjs} +2 -2
  75. package/dist/chunks/{chevrons-up-down-StzXyb6Z.mjs.map → chevrons-up-down-BSIPdamI.mjs.map} +1 -1
  76. package/dist/chunks/{command-BUHV178P.mjs → command-B29vdoVO.mjs} +8 -8
  77. package/dist/chunks/{command-BUHV178P.mjs.map → command-B29vdoVO.mjs.map} +1 -1
  78. package/dist/chunks/{createLucideIcon-BrIj5xiA.mjs → createLucideIcon-CkP7424r.mjs} +1 -1
  79. package/dist/chunks/{createLucideIcon-BrIj5xiA.mjs.map → createLucideIcon-CkP7424r.mjs.map} +1 -1
  80. package/dist/chunks/{date-re6oTh_O.mjs → date-Y_hKMQVr.mjs} +2 -2
  81. package/dist/chunks/{date-re6oTh_O.mjs.map → date-Y_hKMQVr.mjs.map} +1 -1
  82. package/dist/chunks/{dialog-CsH0QGEc.mjs → dialog-BhaHMQnG.mjs} +4 -4
  83. package/dist/chunks/{dialog-CsH0QGEc.mjs.map → dialog-BhaHMQnG.mjs.map} +1 -1
  84. package/dist/chunks/{ellipsis-BED2L1d7.mjs → ellipsis-DHAz8TrI.mjs} +2 -2
  85. package/dist/chunks/{ellipsis-BED2L1d7.mjs.map → ellipsis-DHAz8TrI.mjs.map} +1 -1
  86. package/dist/chunks/{form-B4-N-eE1.mjs → form-BAxhKbgh.mjs} +299 -150
  87. package/dist/chunks/form-BAxhKbgh.mjs.map +1 -0
  88. package/dist/chunks/{format-C24_9AKp.mjs → format-CR4Q6BSq.mjs} +1 -1
  89. package/dist/chunks/{format-C24_9AKp.mjs.map → format-CR4Q6BSq.mjs.map} +1 -1
  90. package/dist/chunks/{format-numbers-CksgR7yb.mjs → format-numbers-CWj9Vf7x.mjs} +2 -6
  91. package/dist/chunks/format-numbers-CWj9Vf7x.mjs.map +1 -0
  92. package/dist/chunks/{hover-card-Dke495v-.mjs → hover-card-DVmQc78n.mjs} +9 -11
  93. package/dist/chunks/{hover-card-Dke495v-.mjs.map → hover-card-DVmQc78n.mjs.map} +1 -1
  94. package/dist/chunks/{index-DIkcxop-.mjs → index-4pJ77hyF.mjs} +1 -1
  95. package/dist/chunks/{index-DIkcxop-.mjs.map → index-4pJ77hyF.mjs.map} +1 -1
  96. package/dist/chunks/{index-BrOFvz7z.mjs → index-BN17NQCv.mjs} +1 -1
  97. package/dist/chunks/{index-BrOFvz7z.mjs.map → index-BN17NQCv.mjs.map} +1 -1
  98. package/dist/chunks/{index-DmwGzaYt.mjs → index-Bt1elORc.mjs} +9 -11
  99. package/dist/chunks/{index-DmwGzaYt.mjs.map → index-Bt1elORc.mjs.map} +1 -1
  100. package/dist/chunks/{index-DHpiwknP.mjs → index-CByz7d8q.mjs} +3 -3
  101. package/dist/chunks/{index-DHpiwknP.mjs.map → index-CByz7d8q.mjs.map} +1 -1
  102. package/dist/chunks/{index-BElPX9xn.mjs → index-CS2Lzoed.mjs} +7 -9
  103. package/dist/chunks/{index-BElPX9xn.mjs.map → index-CS2Lzoed.mjs.map} +1 -1
  104. package/dist/chunks/{index-C8cUOEOO.mjs → index-CVjOpozG.mjs} +38 -2
  105. package/dist/chunks/index-CVjOpozG.mjs.map +1 -0
  106. package/dist/chunks/{index-C-ZwjB4k.mjs → index-Cs9A0tpU.mjs} +1 -1
  107. package/dist/chunks/{index-C-ZwjB4k.mjs.map → index-Cs9A0tpU.mjs.map} +1 -1
  108. package/dist/chunks/{index-Bn9j4jd_.mjs → index-Ct610FOk.mjs} +2 -2
  109. package/dist/chunks/{index-Bn9j4jd_.mjs.map → index-Ct610FOk.mjs.map} +1 -1
  110. package/dist/chunks/{index-D7mBTwC1.mjs → index-CvVBB5ll.mjs} +4 -5
  111. package/dist/chunks/{index-D7mBTwC1.mjs.map → index-CvVBB5ll.mjs.map} +1 -1
  112. package/dist/chunks/{index-7SNyMh-j.mjs → index-D1CSAowX.mjs} +13 -15
  113. package/dist/chunks/{index-7SNyMh-j.mjs.map → index-D1CSAowX.mjs.map} +1 -1
  114. package/dist/chunks/{index-DmLyVVSA.mjs → index-D2DYiX9D.mjs} +2 -2
  115. package/dist/chunks/{index-DmLyVVSA.mjs.map → index-D2DYiX9D.mjs.map} +1 -1
  116. package/dist/chunks/{index-CFaMr67I.mjs → index-D8mA4n7w.mjs} +1 -1
  117. package/dist/chunks/{index-CFaMr67I.mjs.map → index-D8mA4n7w.mjs.map} +1 -1
  118. package/dist/chunks/{index-rXTYYoI9.mjs → index-DCDDoDjL.mjs} +6 -7
  119. package/dist/chunks/{index-rXTYYoI9.mjs.map → index-DCDDoDjL.mjs.map} +1 -1
  120. package/dist/chunks/{index-BKxnMSY9.mjs → index-DLqxy-dg.mjs} +12 -2
  121. package/dist/chunks/index-DLqxy-dg.mjs.map +1 -0
  122. package/dist/chunks/{index-DLAC_TU-.mjs → index-DNMhNzeD.mjs} +7 -9
  123. package/dist/chunks/{index-DLAC_TU-.mjs.map → index-DNMhNzeD.mjs.map} +1 -1
  124. package/dist/chunks/{index-BXScVxAr.mjs → index-DQD35Ges.mjs} +3 -3
  125. package/dist/chunks/{index-BXScVxAr.mjs.map → index-DQD35Ges.mjs.map} +1 -1
  126. package/dist/chunks/{index-DjiiXdCh.mjs → index-D_Q4NGnO.mjs} +1 -1
  127. package/dist/chunks/{index-DjiiXdCh.mjs.map → index-D_Q4NGnO.mjs.map} +1 -1
  128. package/dist/chunks/{index-BP00_xoF.mjs → index-D_e6adwb.mjs} +12 -5
  129. package/dist/chunks/index-D_e6adwb.mjs.map +1 -0
  130. package/dist/chunks/{index-B8RPmvRI.mjs → index-DhI6OG_H.mjs} +2 -2
  131. package/dist/chunks/{index-B8RPmvRI.mjs.map → index-DhI6OG_H.mjs.map} +1 -1
  132. package/dist/chunks/{index-DY9hLs8O.mjs → index-Dp_0m03a.mjs} +2 -2
  133. package/dist/chunks/{index-DY9hLs8O.mjs.map → index-Dp_0m03a.mjs.map} +1 -1
  134. package/dist/chunks/{index-VN9qcZ4P.mjs → index-oX_tk439.mjs} +1 -1
  135. package/dist/chunks/{index-VN9qcZ4P.mjs.map → index-oX_tk439.mjs.map} +1 -1
  136. package/dist/chunks/index.module-Df4mRjmZ.mjs +73 -0
  137. package/dist/chunks/index.module-Df4mRjmZ.mjs.map +1 -0
  138. package/dist/chunks/{input-Beaky41D.mjs → input-YpoAHnXb.mjs} +2 -2
  139. package/dist/chunks/{input-Beaky41D.mjs.map → input-YpoAHnXb.mjs.map} +1 -1
  140. package/dist/chunks/input-otp-BKqdZwNx.mjs +455 -0
  141. package/dist/chunks/input-otp-BKqdZwNx.mjs.map +1 -0
  142. package/dist/chunks/{label-n_pPs58q.mjs → label-D5s6d0et.mjs} +44 -3
  143. package/dist/chunks/label-D5s6d0et.mjs.map +1 -0
  144. package/dist/chunks/{loader-circle-CEDL1CbD.mjs → loader-circle-C7StEOZI.mjs} +2 -2
  145. package/dist/chunks/{loader-circle-CEDL1CbD.mjs.map → loader-circle-C7StEOZI.mjs.map} +1 -1
  146. package/dist/chunks/{menubar-C8VLP8-v.mjs → menubar-ySifmjAG.mjs} +11 -13
  147. package/dist/chunks/{menubar-C8VLP8-v.mjs.map → menubar-ySifmjAG.mjs.map} +1 -1
  148. package/dist/chunks/{multi-select-fLsOx7-e.mjs → multi-select-BsnRMfg7.mjs} +13 -13
  149. package/dist/chunks/{multi-select-fLsOx7-e.mjs.map → multi-select-BsnRMfg7.mjs.map} +1 -1
  150. package/dist/chunks/{pagination-iwqbmQ5Q.mjs → pagination-CV6N_Qu_.mjs} +6 -6
  151. package/dist/chunks/{pagination-iwqbmQ5Q.mjs.map → pagination-CV6N_Qu_.mjs.map} +1 -1
  152. package/dist/chunks/{popover-Cpht2GgQ.mjs → popover-D3JC54Y3.mjs} +11 -13
  153. package/dist/chunks/{popover-Cpht2GgQ.mjs.map → popover-D3JC54Y3.mjs.map} +1 -1
  154. package/dist/chunks/progress-D_Enl4tV.mjs +223 -0
  155. package/dist/chunks/progress-D_Enl4tV.mjs.map +1 -0
  156. package/dist/chunks/radio-group-yF1QEewC.mjs +258 -0
  157. package/dist/chunks/radio-group-yF1QEewC.mjs.map +1 -0
  158. package/dist/chunks/{react-number-format.es-CcgVtYyo.mjs → react-number-format.es-C3uDZhRo.mjs} +1 -1
  159. package/dist/chunks/{react-number-format.es-CcgVtYyo.mjs.map → react-number-format.es-C3uDZhRo.mjs.map} +1 -1
  160. package/dist/chunks/{scroll-area-DuO1U-ha.mjs → scroll-area-CdGRe--S.mjs} +9 -11
  161. package/dist/chunks/{scroll-area-DuO1U-ha.mjs.map → scroll-area-CdGRe--S.mjs.map} +1 -1
  162. package/dist/chunks/{select-D5DzfQ8s.mjs → select-B8JYuJE5.mjs} +5 -5
  163. package/dist/chunks/{select-D5DzfQ8s.mjs.map → select-B8JYuJE5.mjs.map} +1 -1
  164. package/dist/chunks/{separator-DHnqygnd.mjs → separator-sWF5eZgM.mjs} +44 -3
  165. package/dist/chunks/separator-sWF5eZgM.mjs.map +1 -0
  166. package/dist/chunks/{sheet-CXvwS4r9.mjs → sheet-D-4XWzUo.mjs} +4 -4
  167. package/dist/chunks/{sheet-CXvwS4r9.mjs.map → sheet-D-4XWzUo.mjs.map} +1 -1
  168. package/dist/chunks/{skeleton-CuuvHTlE.mjs → skeleton-CQlSHSfr.mjs} +2 -2
  169. package/dist/chunks/{skeleton-CuuvHTlE.mjs.map → skeleton-CQlSHSfr.mjs.map} +1 -1
  170. package/dist/chunks/slider-CaliGouI.mjs +588 -0
  171. package/dist/chunks/slider-CaliGouI.mjs.map +1 -0
  172. package/dist/chunks/{sortable-Dc-PXgOX.mjs → sortable-BoTUMXD0.mjs} +3 -3
  173. package/dist/chunks/{sortable-Dc-PXgOX.mjs.map → sortable-BoTUMXD0.mjs.map} +1 -1
  174. package/dist/chunks/styles-C5sFcbz4.mjs +6 -0
  175. package/dist/chunks/styles-C5sFcbz4.mjs.map +1 -0
  176. package/dist/chunks/switch-szutUcvb.mjs +138 -0
  177. package/dist/chunks/switch-szutUcvb.mjs.map +1 -0
  178. package/dist/chunks/{table-CsRWNDTp.mjs → table-wwce3IsC.mjs} +2 -2
  179. package/dist/chunks/{table-CsRWNDTp.mjs.map → table-wwce3IsC.mjs.map} +1 -1
  180. package/dist/chunks/{tabs-Bw6ByWDS.mjs → tabs-BDPMoWeJ.mjs} +9 -10
  181. package/dist/chunks/{tabs-Bw6ByWDS.mjs.map → tabs-BDPMoWeJ.mjs.map} +1 -1
  182. package/dist/chunks/{textarea-C7CkvJ9p.mjs → textarea-DYBOxg35.mjs} +2 -2
  183. package/dist/chunks/{textarea-C7CkvJ9p.mjs.map → textarea-DYBOxg35.mjs.map} +1 -1
  184. package/dist/chunks/toast-S15TT7Q2.mjs +702 -0
  185. package/dist/chunks/toast-S15TT7Q2.mjs.map +1 -0
  186. package/dist/chunks/{toggle-BRsNuICy.mjs → toggle-GXtKRhvr.mjs} +4 -5
  187. package/dist/chunks/{toggle-BRsNuICy.mjs.map → toggle-GXtKRhvr.mjs.map} +1 -1
  188. package/dist/chunks/{tooltip-DXG_UtcS.mjs → tooltip-z43eMlPO.mjs} +11 -13
  189. package/dist/chunks/{tooltip-DXG_UtcS.mjs.map → tooltip-z43eMlPO.mjs.map} +1 -1
  190. package/dist/chunks/{trash-2-DSHxuneu.mjs → trash-2-CZE_1bXY.mjs} +2 -2
  191. package/dist/chunks/{trash-2-DSHxuneu.mjs.map → trash-2-CZE_1bXY.mjs.map} +1 -1
  192. package/dist/chunks/{triangle-alert-8sDAvjNW.mjs → triangle-alert-BeczCtiG.mjs} +2 -2
  193. package/dist/chunks/{triangle-alert-8sDAvjNW.mjs.map → triangle-alert-BeczCtiG.mjs.map} +1 -1
  194. package/dist/chunks/{tslib.es6-WVUvgLYj.mjs → tslib.es6-B20VGjW7.mjs} +1 -1
  195. package/dist/chunks/{tslib.es6-WVUvgLYj.mjs.map → tslib.es6-B20VGjW7.mjs.map} +1 -1
  196. package/dist/chunks/use-toast-C3gJQZ0s.mjs +137 -0
  197. package/dist/chunks/use-toast-C3gJQZ0s.mjs.map +1 -0
  198. package/dist/chunks/{utils-BqIRZT53.mjs → utils-uOfHPBdi.mjs} +2 -2
  199. package/dist/chunks/{utils-BqIRZT53.mjs.map → utils-uOfHPBdi.mjs.map} +1 -1
  200. package/dist/chunks/{wand-sparkles-BjK8VloB.mjs → wand-sparkles-COk3z6HL.mjs} +2 -2
  201. package/dist/chunks/{wand-sparkles-BjK8VloB.mjs.map → wand-sparkles-COk3z6HL.mjs.map} +1 -1
  202. package/dist/chunks/{x-D7oIZ9hK.mjs → x-D5HL_X5m.mjs} +2 -2
  203. package/dist/chunks/{x-D7oIZ9hK.mjs.map → x-D5HL_X5m.mjs.map} +1 -1
  204. package/dist/collapsible/index.mjs +8 -10
  205. package/dist/collapsible/index.mjs.map +1 -1
  206. package/dist/combobox/index.mjs +25 -27
  207. package/dist/combobox/index.mjs.map +1 -1
  208. package/dist/command/index.d.ts +7 -7
  209. package/dist/command/index.mjs +19 -21
  210. package/dist/command/index.mjs.map +1 -1
  211. package/dist/context-menu/index.mjs +21 -23
  212. package/dist/context-menu/index.mjs.map +1 -1
  213. package/dist/dash/index.mjs +25 -26
  214. package/dist/dash/index.mjs.map +1 -1
  215. package/dist/data-table/index.mjs +33 -35
  216. package/dist/data-table/index.mjs.map +1 -1
  217. package/dist/date-picker/index.d.ts +22 -7
  218. package/dist/date-picker/index.mjs +26 -28
  219. package/dist/date-picker/index.mjs.map +1 -1
  220. package/dist/dialog/index.mjs +18 -20
  221. package/dist/dialog/index.mjs.map +1 -1
  222. package/dist/drawer/index.mjs +15 -17
  223. package/dist/drawer/index.mjs.map +1 -1
  224. package/dist/dropdown-menu/index.mjs +21 -23
  225. package/dist/dropdown-menu/index.mjs.map +1 -1
  226. package/dist/dropzone/index.mjs +19 -133
  227. package/dist/dropzone/index.mjs.map +1 -1
  228. package/dist/editable-table/index.mjs +18 -20
  229. package/dist/editable-table/index.mjs.map +1 -1
  230. package/dist/empty/index.mjs +2 -2
  231. package/dist/field/index.d.ts +3 -2
  232. package/dist/field/index.mjs +4 -5
  233. package/dist/field/index.mjs.map +1 -1
  234. package/dist/form/index.mjs +4 -5
  235. package/dist/form/index.mjs.map +1 -1
  236. package/dist/form-fields/index.mjs +27 -29
  237. package/dist/form-fields/index.mjs.map +1 -1
  238. package/dist/form-layout/index.d.ts +86 -0
  239. package/dist/form-layout/index.mjs +535 -0
  240. package/dist/form-layout/index.mjs.map +1 -0
  241. package/dist/hover-card/index.mjs +14 -16
  242. package/dist/hover-card/index.mjs.map +1 -1
  243. package/dist/icon/index.mjs +1 -1
  244. package/dist/index.css +1 -1
  245. package/dist/input/index.mjs +3 -3
  246. package/dist/input-group/index.d.ts +1 -1
  247. package/dist/input-group/index.mjs +5 -5
  248. package/dist/input-otp/index.mjs +5 -455
  249. package/dist/input-otp/index.mjs.map +1 -1
  250. package/dist/item/index.d.ts +4 -2
  251. package/dist/item/index.mjs +3 -4
  252. package/dist/item/index.mjs.map +1 -1
  253. package/dist/kbd/index.mjs +2 -2
  254. package/dist/label/index.mjs +3 -4
  255. package/dist/label/index.mjs.map +1 -1
  256. package/dist/layout/index.mjs +22 -24
  257. package/dist/layout/index.mjs.map +1 -1
  258. package/dist/menubar/index.mjs +22 -24
  259. package/dist/menubar/index.mjs.map +1 -1
  260. package/dist/multi-input-list/index.mjs +28 -30
  261. package/dist/multi-input-list/index.mjs.map +1 -1
  262. package/dist/multi-select/index.mjs +32 -34
  263. package/dist/multi-select/index.mjs.map +1 -1
  264. package/dist/navigation-menu/index.mjs +15 -17
  265. package/dist/navigation-menu/index.mjs.map +1 -1
  266. package/dist/pagination/index.d.ts +1 -1
  267. package/dist/pagination/index.mjs +8 -8
  268. package/dist/popover/index.mjs +17 -19
  269. package/dist/popover/index.mjs.map +1 -1
  270. package/dist/progress/index.mjs +3 -5
  271. package/dist/progress/index.mjs.map +1 -1
  272. package/dist/radio-group/index.mjs +18 -264
  273. package/dist/radio-group/index.mjs.map +1 -1
  274. package/dist/resizable/index.mjs +3 -3
  275. package/dist/scroll-area/index.mjs +10 -12
  276. package/dist/scroll-area/index.mjs.map +1 -1
  277. package/dist/select/index.mjs +6 -6
  278. package/dist/separator/index.mjs +3 -4
  279. package/dist/separator/index.mjs.map +1 -1
  280. package/dist/shared/index.d.ts +13 -3
  281. package/dist/shared/index.mjs +6 -6
  282. package/dist/shared/index.mjs.map +1 -1
  283. package/dist/sheet/index.d.ts +7 -7
  284. package/dist/sheet/index.mjs +18 -20
  285. package/dist/sheet/index.mjs.map +1 -1
  286. package/dist/sidebar/index.d.ts +17 -4
  287. package/dist/sidebar/index.mjs +26 -28
  288. package/dist/sidebar/index.mjs.map +1 -1
  289. package/dist/skeleton/index.mjs +3 -3
  290. package/dist/skeleton-component/index.mjs +4 -4
  291. package/dist/slider/index.mjs +14 -591
  292. package/dist/slider/index.mjs.map +1 -1
  293. package/dist/sortable/index.d.ts +12 -3
  294. package/dist/sortable/index.mjs +4 -4
  295. package/dist/spinner/index.mjs +4 -4
  296. package/dist/switch/index.mjs +11 -141
  297. package/dist/switch/index.mjs.map +1 -1
  298. package/dist/table/index.mjs +3 -3
  299. package/dist/table-filter/index.d.ts +8 -3
  300. package/dist/table-filter/index.mjs +53 -54
  301. package/dist/table-filter/index.mjs.map +1 -1
  302. package/dist/tabs/index.mjs +14 -16
  303. package/dist/tabs/index.mjs.map +1 -1
  304. package/dist/textarea/index.mjs +3 -3
  305. package/dist/toast/index.mjs +19 -705
  306. package/dist/toast/index.mjs.map +1 -1
  307. package/dist/toaster/index.d.ts +5 -0
  308. package/dist/toaster/index.mjs +34 -0
  309. package/dist/toaster/index.mjs.map +1 -0
  310. package/dist/toggle/index.mjs +6 -7
  311. package/dist/toggle/index.mjs.map +1 -1
  312. package/dist/toggle-group/index.mjs +11 -13
  313. package/dist/toggle-group/index.mjs.map +1 -1
  314. package/dist/tooltip/index.mjs +16 -18
  315. package/dist/tooltip/index.mjs.map +1 -1
  316. package/package.json +10 -2
  317. package/dist/chunks/_commonjsHelpers-CDajFLDm.mjs.map +0 -1
  318. package/dist/chunks/bundle-mjs-ByJyReDu.mjs.map +0 -1
  319. package/dist/chunks/calendar-DtKpXGXO.mjs.map +0 -1
  320. package/dist/chunks/form-B4-N-eE1.mjs.map +0 -1
  321. package/dist/chunks/format-numbers-CksgR7yb.mjs.map +0 -1
  322. package/dist/chunks/index-5s6ltgHF.mjs +0 -40
  323. package/dist/chunks/index-5s6ltgHF.mjs.map +0 -1
  324. package/dist/chunks/index-BKxnMSY9.mjs.map +0 -1
  325. package/dist/chunks/index-BP00_xoF.mjs.map +0 -1
  326. package/dist/chunks/index-C8cUOEOO.mjs.map +0 -1
  327. package/dist/chunks/index-DUoETH03.mjs +0 -12
  328. package/dist/chunks/index-DUoETH03.mjs.map +0 -1
  329. package/dist/chunks/index.module-acmtZqFz.mjs +0 -68
  330. package/dist/chunks/index.module-acmtZqFz.mjs.map +0 -1
  331. package/dist/chunks/label-n_pPs58q.mjs.map +0 -1
  332. package/dist/chunks/progress-CZnyHYXZ.mjs +0 -99
  333. package/dist/chunks/progress-CZnyHYXZ.mjs.map +0 -1
  334. package/dist/chunks/separator-DHnqygnd.mjs.map +0 -1
  335. package/dist/icon.svg +0 -7
  336. package/dist/index.cjs.js +0 -1
  337. package/dist/index.es.js +0 -1
  338. package/dist/ivt.css +0 -1
  339. package/dist/ivt.png +0 -0
@@ -1,594 +1,17 @@
1
- import * as React from 'react';
2
- import { c as clamp } from '../chunks/index-VN9qcZ4P.mjs';
3
- import { c as composeEventHandlers } from '../chunks/index-DUoETH03.mjs';
4
- import { u as useComposedRefs } from '../chunks/index-5s6ltgHF.mjs';
5
- import { c as createContextScope } from '../chunks/index-C8cUOEOO.mjs';
6
- import { u as useControllableState } from '../chunks/index-DmLyVVSA.mjs';
7
- import { u as useDirection } from '../chunks/index-DjiiXdCh.mjs';
8
- import { u as usePrevious } from '../chunks/index-CFaMr67I.mjs';
9
- import { u as useSize } from '../chunks/index-B8RPmvRI.mjs';
10
- import { P as Primitive } from '../chunks/index-BKxnMSY9.mjs';
11
- import { createCollection } from '@radix-ui/react-collection';
12
- import { jsx, jsxs } from 'react/jsx-runtime';
13
- import { c as cn } from '../chunks/utils-BqIRZT53.mjs';
14
- import '../chunks/index-DIkcxop-.mjs';
1
+ export { S as Slider } from '../chunks/slider-CaliGouI.mjs';
2
+ import 'react';
3
+ import '../chunks/index-oX_tk439.mjs';
4
+ import '../chunks/index-DLqxy-dg.mjs';
15
5
  import 'react-dom';
16
6
  import '@radix-ui/react-slot';
17
- import '../chunks/bundle-mjs-ByJyReDu.mjs';
18
-
19
- var PAGE_KEYS = [
20
- "PageUp",
21
- "PageDown"
22
- ];
23
- var ARROW_KEYS = [
24
- "ArrowUp",
25
- "ArrowDown",
26
- "ArrowLeft",
27
- "ArrowRight"
28
- ];
29
- var BACK_KEYS = {
30
- "from-left": [
31
- "Home",
32
- "PageDown",
33
- "ArrowDown",
34
- "ArrowLeft"
35
- ],
36
- "from-right": [
37
- "Home",
38
- "PageDown",
39
- "ArrowDown",
40
- "ArrowRight"
41
- ],
42
- "from-bottom": [
43
- "Home",
44
- "PageDown",
45
- "ArrowDown",
46
- "ArrowLeft"
47
- ],
48
- "from-top": [
49
- "Home",
50
- "PageDown",
51
- "ArrowUp",
52
- "ArrowLeft"
53
- ]
54
- };
55
- var SLIDER_NAME = "Slider";
56
- var [Collection, useCollection, createCollectionScope] = createCollection(SLIDER_NAME);
57
- var [createSliderContext] = createContextScope(SLIDER_NAME, [
58
- createCollectionScope
59
- ]);
60
- var [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME);
61
- var Slider$1 = React.forwardRef((props, forwardedRef)=>{
62
- const { name, min = 0, max = 100, step = 1, orientation = "horizontal", disabled = false, minStepsBetweenThumbs = 0, defaultValue = [
63
- min
64
- ], value, onValueChange = ()=>{}, onValueCommit = ()=>{}, inverted = false, form, ...sliderProps } = props;
65
- const thumbRefs = React.useRef(/* @__PURE__ */ new Set());
66
- const valueIndexToChangeRef = React.useRef(0);
67
- const isHorizontal = orientation === "horizontal";
68
- const SliderOrientation = isHorizontal ? SliderHorizontal : SliderVertical;
69
- const [values = [], setValues] = useControllableState({
70
- prop: value,
71
- defaultProp: defaultValue,
72
- onChange: (value2)=>{
73
- const thumbs = [
74
- ...thumbRefs.current
75
- ];
76
- thumbs[valueIndexToChangeRef.current]?.focus();
77
- onValueChange(value2);
78
- }
79
- });
80
- const valuesBeforeSlideStartRef = React.useRef(values);
81
- function handleSlideStart(value2) {
82
- const closestIndex = getClosestValueIndex(values, value2);
83
- updateValues(value2, closestIndex);
84
- }
85
- function handleSlideMove(value2) {
86
- updateValues(value2, valueIndexToChangeRef.current);
87
- }
88
- function handleSlideEnd() {
89
- const prevValue = valuesBeforeSlideStartRef.current[valueIndexToChangeRef.current];
90
- const nextValue = values[valueIndexToChangeRef.current];
91
- const hasChanged = nextValue !== prevValue;
92
- if (hasChanged) onValueCommit(values);
93
- }
94
- function updateValues(value2, atIndex, { commit } = {
95
- commit: false
96
- }) {
97
- const decimalCount = getDecimalCount(step);
98
- const snapToStep = roundValue(Math.round((value2 - min) / step) * step + min, decimalCount);
99
- const nextValue = clamp(snapToStep, [
100
- min,
101
- max
102
- ]);
103
- setValues((prevValues = [])=>{
104
- const nextValues = getNextSortedValues(prevValues, nextValue, atIndex);
105
- if (hasMinStepsBetweenValues(nextValues, minStepsBetweenThumbs * step)) {
106
- valueIndexToChangeRef.current = nextValues.indexOf(nextValue);
107
- const hasChanged = String(nextValues) !== String(prevValues);
108
- if (hasChanged && commit) onValueCommit(nextValues);
109
- return hasChanged ? nextValues : prevValues;
110
- } else {
111
- return prevValues;
112
- }
113
- });
114
- }
115
- return /* @__PURE__ */ jsx(SliderProvider, {
116
- scope: props.__scopeSlider,
117
- name,
118
- disabled,
119
- min,
120
- max,
121
- valueIndexToChangeRef,
122
- thumbs: thumbRefs.current,
123
- values,
124
- orientation,
125
- form,
126
- children: /* @__PURE__ */ jsx(Collection.Provider, {
127
- scope: props.__scopeSlider,
128
- children: /* @__PURE__ */ jsx(Collection.Slot, {
129
- scope: props.__scopeSlider,
130
- children: /* @__PURE__ */ jsx(SliderOrientation, {
131
- "aria-disabled": disabled,
132
- "data-disabled": disabled ? "" : void 0,
133
- ...sliderProps,
134
- ref: forwardedRef,
135
- onPointerDown: composeEventHandlers(sliderProps.onPointerDown, ()=>{
136
- if (!disabled) valuesBeforeSlideStartRef.current = values;
137
- }),
138
- min,
139
- max,
140
- inverted,
141
- onSlideStart: disabled ? void 0 : handleSlideStart,
142
- onSlideMove: disabled ? void 0 : handleSlideMove,
143
- onSlideEnd: disabled ? void 0 : handleSlideEnd,
144
- onHomeKeyDown: ()=>!disabled && updateValues(min, 0, {
145
- commit: true
146
- }),
147
- onEndKeyDown: ()=>!disabled && updateValues(max, values.length - 1, {
148
- commit: true
149
- }),
150
- onStepKeyDown: ({ event, direction: stepDirection })=>{
151
- if (!disabled) {
152
- const isPageKey = PAGE_KEYS.includes(event.key);
153
- const isSkipKey = isPageKey || event.shiftKey && ARROW_KEYS.includes(event.key);
154
- const multiplier = isSkipKey ? 10 : 1;
155
- const atIndex = valueIndexToChangeRef.current;
156
- const value2 = values[atIndex];
157
- const stepInDirection = step * multiplier * stepDirection;
158
- updateValues(value2 + stepInDirection, atIndex, {
159
- commit: true
160
- });
161
- }
162
- }
163
- })
164
- })
165
- })
166
- });
167
- });
168
- Slider$1.displayName = SLIDER_NAME;
169
- var [SliderOrientationProvider, useSliderOrientationContext] = createSliderContext(SLIDER_NAME, {
170
- startEdge: "left",
171
- endEdge: "right",
172
- size: "width",
173
- direction: 1
174
- });
175
- var SliderHorizontal = React.forwardRef((props, forwardedRef)=>{
176
- const { min, max, dir, inverted, onSlideStart, onSlideMove, onSlideEnd, onStepKeyDown, ...sliderProps } = props;
177
- const [slider, setSlider] = React.useState(null);
178
- const composedRefs = useComposedRefs(forwardedRef, (node)=>setSlider(node));
179
- const rectRef = React.useRef(void 0);
180
- const direction = useDirection(dir);
181
- const isDirectionLTR = direction === "ltr";
182
- const isSlidingFromLeft = isDirectionLTR && !inverted || !isDirectionLTR && inverted;
183
- function getValueFromPointer(pointerPosition) {
184
- const rect = rectRef.current || slider.getBoundingClientRect();
185
- const input = [
186
- 0,
187
- rect.width
188
- ];
189
- const output = isSlidingFromLeft ? [
190
- min,
191
- max
192
- ] : [
193
- max,
194
- min
195
- ];
196
- const value = linearScale(input, output);
197
- rectRef.current = rect;
198
- return value(pointerPosition - rect.left);
199
- }
200
- return /* @__PURE__ */ jsx(SliderOrientationProvider, {
201
- scope: props.__scopeSlider,
202
- startEdge: isSlidingFromLeft ? "left" : "right",
203
- endEdge: isSlidingFromLeft ? "right" : "left",
204
- direction: isSlidingFromLeft ? 1 : -1,
205
- size: "width",
206
- children: /* @__PURE__ */ jsx(SliderImpl, {
207
- dir: direction,
208
- "data-orientation": "horizontal",
209
- ...sliderProps,
210
- ref: composedRefs,
211
- style: {
212
- ...sliderProps.style,
213
- ["--radix-slider-thumb-transform"]: "translateX(-50%)"
214
- },
215
- onSlideStart: (event)=>{
216
- const value = getValueFromPointer(event.clientX);
217
- onSlideStart?.(value);
218
- },
219
- onSlideMove: (event)=>{
220
- const value = getValueFromPointer(event.clientX);
221
- onSlideMove?.(value);
222
- },
223
- onSlideEnd: ()=>{
224
- rectRef.current = void 0;
225
- onSlideEnd?.();
226
- },
227
- onStepKeyDown: (event)=>{
228
- const slideDirection = isSlidingFromLeft ? "from-left" : "from-right";
229
- const isBackKey = BACK_KEYS[slideDirection].includes(event.key);
230
- onStepKeyDown?.({
231
- event,
232
- direction: isBackKey ? -1 : 1
233
- });
234
- }
235
- })
236
- });
237
- });
238
- var SliderVertical = React.forwardRef((props, forwardedRef)=>{
239
- const { min, max, inverted, onSlideStart, onSlideMove, onSlideEnd, onStepKeyDown, ...sliderProps } = props;
240
- const sliderRef = React.useRef(null);
241
- const ref = useComposedRefs(forwardedRef, sliderRef);
242
- const rectRef = React.useRef(void 0);
243
- const isSlidingFromBottom = !inverted;
244
- function getValueFromPointer(pointerPosition) {
245
- const rect = rectRef.current || sliderRef.current.getBoundingClientRect();
246
- const input = [
247
- 0,
248
- rect.height
249
- ];
250
- const output = isSlidingFromBottom ? [
251
- max,
252
- min
253
- ] : [
254
- min,
255
- max
256
- ];
257
- const value = linearScale(input, output);
258
- rectRef.current = rect;
259
- return value(pointerPosition - rect.top);
260
- }
261
- return /* @__PURE__ */ jsx(SliderOrientationProvider, {
262
- scope: props.__scopeSlider,
263
- startEdge: isSlidingFromBottom ? "bottom" : "top",
264
- endEdge: isSlidingFromBottom ? "top" : "bottom",
265
- size: "height",
266
- direction: isSlidingFromBottom ? 1 : -1,
267
- children: /* @__PURE__ */ jsx(SliderImpl, {
268
- "data-orientation": "vertical",
269
- ...sliderProps,
270
- ref,
271
- style: {
272
- ...sliderProps.style,
273
- ["--radix-slider-thumb-transform"]: "translateY(50%)"
274
- },
275
- onSlideStart: (event)=>{
276
- const value = getValueFromPointer(event.clientY);
277
- onSlideStart?.(value);
278
- },
279
- onSlideMove: (event)=>{
280
- const value = getValueFromPointer(event.clientY);
281
- onSlideMove?.(value);
282
- },
283
- onSlideEnd: ()=>{
284
- rectRef.current = void 0;
285
- onSlideEnd?.();
286
- },
287
- onStepKeyDown: (event)=>{
288
- const slideDirection = isSlidingFromBottom ? "from-bottom" : "from-top";
289
- const isBackKey = BACK_KEYS[slideDirection].includes(event.key);
290
- onStepKeyDown?.({
291
- event,
292
- direction: isBackKey ? -1 : 1
293
- });
294
- }
295
- })
296
- });
297
- });
298
- var SliderImpl = React.forwardRef((props, forwardedRef)=>{
299
- const { __scopeSlider, onSlideStart, onSlideMove, onSlideEnd, onHomeKeyDown, onEndKeyDown, onStepKeyDown, ...sliderProps } = props;
300
- const context = useSliderContext(SLIDER_NAME, __scopeSlider);
301
- return /* @__PURE__ */ jsx(Primitive.span, {
302
- ...sliderProps,
303
- ref: forwardedRef,
304
- onKeyDown: composeEventHandlers(props.onKeyDown, (event)=>{
305
- if (event.key === "Home") {
306
- onHomeKeyDown(event);
307
- event.preventDefault();
308
- } else if (event.key === "End") {
309
- onEndKeyDown(event);
310
- event.preventDefault();
311
- } else if (PAGE_KEYS.concat(ARROW_KEYS).includes(event.key)) {
312
- onStepKeyDown(event);
313
- event.preventDefault();
314
- }
315
- }),
316
- onPointerDown: composeEventHandlers(props.onPointerDown, (event)=>{
317
- const target = event.target;
318
- target.setPointerCapture(event.pointerId);
319
- event.preventDefault();
320
- if (context.thumbs.has(target)) {
321
- target.focus();
322
- } else {
323
- onSlideStart(event);
324
- }
325
- }),
326
- onPointerMove: composeEventHandlers(props.onPointerMove, (event)=>{
327
- const target = event.target;
328
- if (target.hasPointerCapture(event.pointerId)) onSlideMove(event);
329
- }),
330
- onPointerUp: composeEventHandlers(props.onPointerUp, (event)=>{
331
- const target = event.target;
332
- if (target.hasPointerCapture(event.pointerId)) {
333
- target.releasePointerCapture(event.pointerId);
334
- onSlideEnd(event);
335
- }
336
- })
337
- });
338
- });
339
- var TRACK_NAME = "SliderTrack";
340
- var SliderTrack = React.forwardRef((props, forwardedRef)=>{
341
- const { __scopeSlider, ...trackProps } = props;
342
- const context = useSliderContext(TRACK_NAME, __scopeSlider);
343
- return /* @__PURE__ */ jsx(Primitive.span, {
344
- "data-disabled": context.disabled ? "" : void 0,
345
- "data-orientation": context.orientation,
346
- ...trackProps,
347
- ref: forwardedRef
348
- });
349
- });
350
- SliderTrack.displayName = TRACK_NAME;
351
- var RANGE_NAME = "SliderRange";
352
- var SliderRange = React.forwardRef((props, forwardedRef)=>{
353
- const { __scopeSlider, ...rangeProps } = props;
354
- const context = useSliderContext(RANGE_NAME, __scopeSlider);
355
- const orientation = useSliderOrientationContext(RANGE_NAME, __scopeSlider);
356
- const ref = React.useRef(null);
357
- const composedRefs = useComposedRefs(forwardedRef, ref);
358
- const valuesCount = context.values.length;
359
- const percentages = context.values.map((value)=>convertValueToPercentage(value, context.min, context.max));
360
- const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;
361
- const offsetEnd = 100 - Math.max(...percentages);
362
- return /* @__PURE__ */ jsx(Primitive.span, {
363
- "data-orientation": context.orientation,
364
- "data-disabled": context.disabled ? "" : void 0,
365
- ...rangeProps,
366
- ref: composedRefs,
367
- style: {
368
- ...props.style,
369
- [orientation.startEdge]: offsetStart + "%",
370
- [orientation.endEdge]: offsetEnd + "%"
371
- }
372
- });
373
- });
374
- SliderRange.displayName = RANGE_NAME;
375
- var THUMB_NAME = "SliderThumb";
376
- var SliderThumb = React.forwardRef((props, forwardedRef)=>{
377
- const getItems = useCollection(props.__scopeSlider);
378
- const [thumb, setThumb] = React.useState(null);
379
- const composedRefs = useComposedRefs(forwardedRef, (node)=>setThumb(node));
380
- const index = React.useMemo(()=>thumb ? getItems().findIndex((item)=>item.ref.current === thumb) : -1, [
381
- getItems,
382
- thumb
383
- ]);
384
- return /* @__PURE__ */ jsx(SliderThumbImpl, {
385
- ...props,
386
- ref: composedRefs,
387
- index
388
- });
389
- });
390
- var SliderThumbImpl = React.forwardRef((props, forwardedRef)=>{
391
- const { __scopeSlider, index, name, ...thumbProps } = props;
392
- const context = useSliderContext(THUMB_NAME, __scopeSlider);
393
- const orientation = useSliderOrientationContext(THUMB_NAME, __scopeSlider);
394
- const [thumb, setThumb] = React.useState(null);
395
- const composedRefs = useComposedRefs(forwardedRef, (node)=>setThumb(node));
396
- const isFormControl = thumb ? context.form || !!thumb.closest("form") : true;
397
- const size = useSize(thumb);
398
- const value = context.values[index];
399
- const percent = value === void 0 ? 0 : convertValueToPercentage(value, context.min, context.max);
400
- const label = getLabel(index, context.values.length);
401
- const orientationSize = size?.[orientation.size];
402
- const thumbInBoundsOffset = orientationSize ? getThumbInBoundsOffset(orientationSize, percent, orientation.direction) : 0;
403
- React.useEffect(()=>{
404
- if (thumb) {
405
- context.thumbs.add(thumb);
406
- return ()=>{
407
- context.thumbs.delete(thumb);
408
- };
409
- }
410
- }, [
411
- thumb,
412
- context.thumbs
413
- ]);
414
- return /* @__PURE__ */ jsxs("span", {
415
- style: {
416
- transform: "var(--radix-slider-thumb-transform)",
417
- position: "absolute",
418
- [orientation.startEdge]: `calc(${percent}% + ${thumbInBoundsOffset}px)`
419
- },
420
- children: [
421
- /* @__PURE__ */ jsx(Collection.ItemSlot, {
422
- scope: props.__scopeSlider,
423
- children: /* @__PURE__ */ jsx(Primitive.span, {
424
- role: "slider",
425
- "aria-label": props["aria-label"] || label,
426
- "aria-valuemin": context.min,
427
- "aria-valuenow": value,
428
- "aria-valuemax": context.max,
429
- "aria-orientation": context.orientation,
430
- "data-orientation": context.orientation,
431
- "data-disabled": context.disabled ? "" : void 0,
432
- tabIndex: context.disabled ? void 0 : 0,
433
- ...thumbProps,
434
- ref: composedRefs,
435
- style: value === void 0 ? {
436
- display: "none"
437
- } : props.style,
438
- onFocus: composeEventHandlers(props.onFocus, ()=>{
439
- context.valueIndexToChangeRef.current = index;
440
- })
441
- })
442
- }),
443
- isFormControl && /* @__PURE__ */ jsx(SliderBubbleInput, {
444
- name: name ?? (context.name ? context.name + (context.values.length > 1 ? "[]" : "") : void 0),
445
- form: context.form,
446
- value
447
- }, index)
448
- ]
449
- });
450
- });
451
- SliderThumb.displayName = THUMB_NAME;
452
- var BUBBLE_INPUT_NAME = "RadioBubbleInput";
453
- var SliderBubbleInput = React.forwardRef(({ __scopeSlider, value, ...props }, forwardedRef)=>{
454
- const ref = React.useRef(null);
455
- const composedRefs = useComposedRefs(ref, forwardedRef);
456
- const prevValue = usePrevious(value);
457
- React.useEffect(()=>{
458
- const input = ref.current;
459
- if (!input) return;
460
- const inputProto = window.HTMLInputElement.prototype;
461
- const descriptor = Object.getOwnPropertyDescriptor(inputProto, "value");
462
- const setValue = descriptor.set;
463
- if (prevValue !== value && setValue) {
464
- const event = new Event("input", {
465
- bubbles: true
466
- });
467
- setValue.call(input, value);
468
- input.dispatchEvent(event);
469
- }
470
- }, [
471
- prevValue,
472
- value
473
- ]);
474
- return /* @__PURE__ */ jsx(Primitive.input, {
475
- style: {
476
- display: "none"
477
- },
478
- ...props,
479
- ref: composedRefs,
480
- defaultValue: value
481
- });
482
- });
483
- SliderBubbleInput.displayName = BUBBLE_INPUT_NAME;
484
- function getNextSortedValues(prevValues = [], nextValue, atIndex) {
485
- const nextValues = [
486
- ...prevValues
487
- ];
488
- nextValues[atIndex] = nextValue;
489
- return nextValues.sort((a, b)=>a - b);
490
- }
491
- function convertValueToPercentage(value, min, max) {
492
- const maxSteps = max - min;
493
- const percentPerStep = 100 / maxSteps;
494
- const percentage = percentPerStep * (value - min);
495
- return clamp(percentage, [
496
- 0,
497
- 100
498
- ]);
499
- }
500
- function getLabel(index, totalValues) {
501
- if (totalValues > 2) {
502
- return `Value ${index + 1} of ${totalValues}`;
503
- } else if (totalValues === 2) {
504
- return [
505
- "Minimum",
506
- "Maximum"
507
- ][index];
508
- } else {
509
- return void 0;
510
- }
511
- }
512
- function getClosestValueIndex(values, nextValue) {
513
- if (values.length === 1) return 0;
514
- const distances = values.map((value)=>Math.abs(value - nextValue));
515
- const closestDistance = Math.min(...distances);
516
- return distances.indexOf(closestDistance);
517
- }
518
- function getThumbInBoundsOffset(width, left, direction) {
519
- const halfWidth = width / 2;
520
- const halfPercent = 50;
521
- const offset = linearScale([
522
- 0,
523
- halfPercent
524
- ], [
525
- 0,
526
- halfWidth
527
- ]);
528
- return (halfWidth - offset(left) * direction) * direction;
529
- }
530
- function getStepsBetweenValues(values) {
531
- return values.slice(0, -1).map((value, index)=>values[index + 1] - value);
532
- }
533
- function hasMinStepsBetweenValues(values, minStepsBetweenValues) {
534
- if (minStepsBetweenValues > 0) {
535
- const stepsBetweenValues = getStepsBetweenValues(values);
536
- const actualMinStepsBetweenValues = Math.min(...stepsBetweenValues);
537
- return actualMinStepsBetweenValues >= minStepsBetweenValues;
538
- }
539
- return true;
540
- }
541
- function linearScale(input, output) {
542
- return (value)=>{
543
- if (input[0] === input[1] || output[0] === output[1]) return output[0];
544
- const ratio = (output[1] - output[0]) / (input[1] - input[0]);
545
- return output[0] + ratio * (value - input[0]);
546
- };
547
- }
548
- function getDecimalCount(value) {
549
- return (String(value).split(".")[1] || "").length;
550
- }
551
- function roundValue(value, decimalCount) {
552
- const rounder = Math.pow(10, decimalCount);
553
- return Math.round(value * rounder) / rounder;
554
- }
555
- var Root = Slider$1;
556
- var Track = SliderTrack;
557
- var Range = SliderRange;
558
- var Thumb = SliderThumb;
559
-
560
- function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
561
- const _values = React.useMemo(()=>Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [
562
- min,
563
- max
564
- ], [
565
- value,
566
- defaultValue,
567
- min,
568
- max
569
- ]);
570
- return /*#__PURE__*/ React.createElement(Root, {
571
- "data-slot": "slider",
572
- defaultValue: defaultValue,
573
- value: value,
574
- min: min,
575
- max: max,
576
- className: cn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className),
577
- ...props
578
- }, /*#__PURE__*/ React.createElement(Track, {
579
- "data-slot": "slider-track",
580
- className: cn("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5")
581
- }, /*#__PURE__*/ React.createElement(Range, {
582
- "data-slot": "slider-range",
583
- className: cn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
584
- })), Array.from({
585
- length: _values.length
586
- }, (_, index)=>/*#__PURE__*/ React.createElement(Thumb, {
587
- "data-slot": "slider-thumb",
588
- key: index,
589
- className: "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
590
- })));
591
- }
592
-
593
- export { Slider };
7
+ import 'react/jsx-runtime';
8
+ import '../chunks/index-CVjOpozG.mjs';
9
+ import '../chunks/index-D2DYiX9D.mjs';
10
+ import '../chunks/index-4pJ77hyF.mjs';
11
+ import '../chunks/index-D_Q4NGnO.mjs';
12
+ import '../chunks/index-D8mA4n7w.mjs';
13
+ import '../chunks/index-DhI6OG_H.mjs';
14
+ import '@radix-ui/react-collection';
15
+ import '../chunks/utils-uOfHPBdi.mjs';
16
+ import '../chunks/bundle-mjs-BRbxNcQb.mjs';
594
17
  //# sourceMappingURL=index.mjs.map