ivt 0.7.2 → 0.7.4

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 (315) 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.d.ts +1 -1
  15. package/dist/badge/index.mjs +3 -3
  16. package/dist/base/index.mjs +57 -142
  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.mjs +3 -4
  22. package/dist/button-group/index.mjs.map +1 -1
  23. package/dist/calendar/index.mjs +9 -9
  24. package/dist/card/index.mjs +3 -3
  25. package/dist/carousel/index.mjs +4 -4
  26. package/dist/chart/index.mjs +2869 -1282
  27. package/dist/chart/index.mjs.map +1 -1
  28. package/dist/checkbox/index.mjs +12 -14
  29. package/dist/checkbox/index.mjs.map +1 -1
  30. package/dist/chunks/AutoComplete-qFuwmV53.mjs +95 -0
  31. package/dist/chunks/AutoComplete-qFuwmV53.mjs.map +1 -0
  32. package/dist/chunks/{CalendarRange-k63hDccF.mjs → CalendarRange-Ce7PiNfq.mjs} +8 -8
  33. package/dist/chunks/{CalendarRange-k63hDccF.mjs.map → CalendarRange-Ce7PiNfq.mjs.map} +1 -1
  34. package/dist/chunks/{ComboboxField-5Glf1Ozh.mjs → ComboboxField-DaRpRraW.mjs} +9 -9
  35. package/dist/chunks/{ComboboxField-5Glf1Ozh.mjs.map → ComboboxField-DaRpRraW.mjs.map} +1 -1
  36. package/dist/chunks/{Container-Cv6NG9kb.mjs → Container-DwaAaEiC.mjs} +2 -2
  37. package/dist/chunks/{Container-Cv6NG9kb.mjs.map → Container-DwaAaEiC.mjs.map} +1 -1
  38. package/dist/chunks/{DeleteConfirmationModal-DRseBzq7.mjs → DeleteConfirmationModal-BwTbbBAw.mjs} +4 -4
  39. package/dist/chunks/{DeleteConfirmationModal-DRseBzq7.mjs.map → DeleteConfirmationModal-BwTbbBAw.mjs.map} +1 -1
  40. package/dist/chunks/{ListItem-eGWDX0GP.mjs → ListItem-zxS4CZdq.mjs} +4 -4
  41. package/dist/chunks/{ListItem-eGWDX0GP.mjs.map → ListItem-zxS4CZdq.mjs.map} +1 -1
  42. package/dist/chunks/{TooltipIndicator-BjtHYQzo.mjs → TooltipIndicator-CwGGAeRz.mjs} +4 -4
  43. package/dist/chunks/{TooltipIndicator-BjtHYQzo.mjs.map → TooltipIndicator-CwGGAeRz.mjs.map} +1 -1
  44. package/dist/chunks/{_commonjsHelpers-D3vrMN3C.mjs → _commonjsHelpers-B2Be7UYW.mjs} +1 -1
  45. package/dist/chunks/_commonjsHelpers-B2Be7UYW.mjs.map +1 -0
  46. package/dist/chunks/{accordion-BsbSmZP2.mjs → accordion-D4JVALAO.mjs} +9 -11
  47. package/dist/chunks/{accordion-BsbSmZP2.mjs.map → accordion-D4JVALAO.mjs.map} +1 -1
  48. package/dist/chunks/{alert-Cw-E3eta.mjs → alert-D-E6nsVK.mjs} +2 -2
  49. package/dist/chunks/{alert-Cw-E3eta.mjs.map → alert-D-E6nsVK.mjs.map} +1 -1
  50. package/dist/chunks/{badge-DTn1AQbT.mjs → badge-C6mkl9yr.mjs} +2 -2
  51. package/dist/chunks/{badge-DTn1AQbT.mjs.map → badge-C6mkl9yr.mjs.map} +1 -1
  52. package/dist/chunks/{bundle-mjs-Lvc-Dri9.mjs → bundle-mjs-B1dpl-bk.mjs} +228 -154
  53. package/dist/chunks/bundle-mjs-B1dpl-bk.mjs.map +1 -0
  54. package/dist/chunks/{button-Cve1c7GQ.mjs → button-DsgJkgEz.mjs} +2 -2
  55. package/dist/chunks/{button-Cve1c7GQ.mjs.map → button-DsgJkgEz.mjs.map} +1 -1
  56. package/dist/chunks/{calendar-BTfcQ69r.mjs → calendar-Co99lCn4.mjs} +550 -166
  57. package/dist/chunks/calendar-Co99lCn4.mjs.map +1 -0
  58. package/dist/chunks/{calendar-days-D95Vh8Id.mjs → calendar-days-BF4GDmMr.mjs} +2 -2
  59. package/dist/chunks/{calendar-days-D95Vh8Id.mjs.map → calendar-days-BF4GDmMr.mjs.map} +1 -1
  60. package/dist/chunks/{card-BCce9vjU.mjs → card-Cuo7NL8y.mjs} +2 -2
  61. package/dist/chunks/{card-BCce9vjU.mjs.map → card-Cuo7NL8y.mjs.map} +1 -1
  62. package/dist/chunks/{check-F6R3Zyjv.mjs → check-CzKqQLNR.mjs} +2 -2
  63. package/dist/chunks/{check-F6R3Zyjv.mjs.map → check-CzKqQLNR.mjs.map} +1 -1
  64. package/dist/chunks/{checkbox-BONbXOR8.mjs → checkbox-C7RUdsIS.mjs} +9 -11
  65. package/dist/chunks/{checkbox-BONbXOR8.mjs.map → checkbox-C7RUdsIS.mjs.map} +1 -1
  66. package/dist/chunks/{chevron-down-CAAkkaxH.mjs → chevron-down-CZjN_vyX.mjs} +2 -2
  67. package/dist/chunks/{chevron-down-CAAkkaxH.mjs.map → chevron-down-CZjN_vyX.mjs.map} +1 -1
  68. package/dist/chunks/{chevron-left-D9H1SFsq.mjs → chevron-left-BpfBwM4S.mjs} +2 -2
  69. package/dist/chunks/{chevron-left-D9H1SFsq.mjs.map → chevron-left-BpfBwM4S.mjs.map} +1 -1
  70. package/dist/chunks/{chevron-right-BBzqWfgU.mjs → chevron-right-uq-O8rwC.mjs} +2 -2
  71. package/dist/chunks/{chevron-right-BBzqWfgU.mjs.map → chevron-right-uq-O8rwC.mjs.map} +1 -1
  72. package/dist/chunks/{chevrons-up-down-qNyleCLF.mjs → chevrons-up-down-DKM8h8j_.mjs} +2 -2
  73. package/dist/chunks/{chevrons-up-down-qNyleCLF.mjs.map → chevrons-up-down-DKM8h8j_.mjs.map} +1 -1
  74. package/dist/chunks/{command-IbA1nxIb.mjs → command-CAS791lb.mjs} +8 -8
  75. package/dist/chunks/{command-IbA1nxIb.mjs.map → command-CAS791lb.mjs.map} +1 -1
  76. package/dist/chunks/{createLucideIcon-0uwxvfEG.mjs → createLucideIcon-xkRZC0aJ.mjs} +1 -1
  77. package/dist/chunks/{createLucideIcon-0uwxvfEG.mjs.map → createLucideIcon-xkRZC0aJ.mjs.map} +1 -1
  78. package/dist/chunks/{date-BBTPAd8S.mjs → date-DYEUxjwi.mjs} +2 -2
  79. package/dist/chunks/{date-BBTPAd8S.mjs.map → date-DYEUxjwi.mjs.map} +1 -1
  80. package/dist/chunks/{dialog-B2DUrpTa.mjs → dialog-Dt_M700u.mjs} +4 -4
  81. package/dist/chunks/{dialog-B2DUrpTa.mjs.map → dialog-Dt_M700u.mjs.map} +1 -1
  82. package/dist/chunks/{ellipsis-DvX337aw.mjs → ellipsis-BcRZkfZw.mjs} +2 -2
  83. package/dist/chunks/{ellipsis-DvX337aw.mjs.map → ellipsis-BcRZkfZw.mjs.map} +1 -1
  84. package/dist/chunks/{form-CChLO9RR.mjs → form-CJnoOgoH.mjs} +299 -150
  85. package/dist/chunks/form-CJnoOgoH.mjs.map +1 -0
  86. package/dist/chunks/{format-4Jz4C5tC.mjs → format-BSPAt__h.mjs} +1 -1
  87. package/dist/chunks/{format-4Jz4C5tC.mjs.map → format-BSPAt__h.mjs.map} +1 -1
  88. package/dist/chunks/{format-numbers-BhgU0ZHz.mjs → format-numbers-BpGX211b.mjs} +2 -6
  89. package/dist/chunks/format-numbers-BpGX211b.mjs.map +1 -0
  90. package/dist/chunks/{hover-card-DX4d068Z.mjs → hover-card-DKMcpBnt.mjs} +9 -11
  91. package/dist/chunks/{hover-card-DX4d068Z.mjs.map → hover-card-DKMcpBnt.mjs.map} +1 -1
  92. package/dist/chunks/{index-6TVIC1_R.mjs → index-0DBJW078.mjs} +2 -2
  93. package/dist/chunks/{index-6TVIC1_R.mjs.map → index-0DBJW078.mjs.map} +1 -1
  94. package/dist/chunks/{index-Bx0xXTid.mjs → index-7wUPkpwA.mjs} +9 -11
  95. package/dist/chunks/{index-Bx0xXTid.mjs.map → index-7wUPkpwA.mjs.map} +1 -1
  96. package/dist/chunks/{index-Bewwph0a.mjs → index-9921_a2g.mjs} +1 -1
  97. package/dist/chunks/{index-Bewwph0a.mjs.map → index-9921_a2g.mjs.map} +1 -1
  98. package/dist/chunks/{index-CkRZ2gKz.mjs → index-B49Rv10M.mjs} +1 -1
  99. package/dist/chunks/{index-CkRZ2gKz.mjs.map → index-B49Rv10M.mjs.map} +1 -1
  100. package/dist/chunks/{index-na6H-GCB.mjs → index-B8pOe-bI.mjs} +13 -15
  101. package/dist/chunks/{index-na6H-GCB.mjs.map → index-B8pOe-bI.mjs.map} +1 -1
  102. package/dist/chunks/{index-DpW61g8q.mjs → index-B8zlei3I.mjs} +1 -1
  103. package/dist/chunks/{index-DpW61g8q.mjs.map → index-B8zlei3I.mjs.map} +1 -1
  104. package/dist/chunks/{index-CWI00LgK.mjs → index-BpZD69GD.mjs} +2 -2
  105. package/dist/chunks/{index-CWI00LgK.mjs.map → index-BpZD69GD.mjs.map} +1 -1
  106. package/dist/chunks/{index-BSGOnYAL.mjs → index-BtdTgi0_.mjs} +1 -1
  107. package/dist/chunks/{index-BSGOnYAL.mjs.map → index-BtdTgi0_.mjs.map} +1 -1
  108. package/dist/chunks/{index-YaCKvBnb.mjs → index-Cm5-jAR7.mjs} +38 -2
  109. package/dist/chunks/index-Cm5-jAR7.mjs.map +1 -0
  110. package/dist/chunks/{index-Ch8cepWA.mjs → index-CsC-dafu.mjs} +3 -3
  111. package/dist/chunks/{index-Ch8cepWA.mjs.map → index-CsC-dafu.mjs.map} +1 -1
  112. package/dist/chunks/{index-DR3ok_zE.mjs → index-CuEeN4AG.mjs} +6 -7
  113. package/dist/chunks/{index-DR3ok_zE.mjs.map → index-CuEeN4AG.mjs.map} +1 -1
  114. package/dist/chunks/{index-CO3WOWY2.mjs → index-CvWc6WZ4.mjs} +7 -9
  115. package/dist/chunks/{index-CO3WOWY2.mjs.map → index-CvWc6WZ4.mjs.map} +1 -1
  116. package/dist/chunks/{index-CYpZ8qGv.mjs → index-DSBOi0JP.mjs} +4 -5
  117. package/dist/chunks/{index-CYpZ8qGv.mjs.map → index-DSBOi0JP.mjs.map} +1 -1
  118. package/dist/chunks/{index-F1Vay3hL.mjs → index-DWtzT31F.mjs} +2 -2
  119. package/dist/chunks/{index-F1Vay3hL.mjs.map → index-DWtzT31F.mjs.map} +1 -1
  120. package/dist/chunks/{index-DCv7HM9c.mjs → index-DaifcY5X.mjs} +7 -9
  121. package/dist/chunks/{index-DCv7HM9c.mjs.map → index-DaifcY5X.mjs.map} +1 -1
  122. package/dist/chunks/{index-BrfogwJw.mjs → index-DjoMuta5.mjs} +1 -1
  123. package/dist/chunks/{index-BrfogwJw.mjs.map → index-DjoMuta5.mjs.map} +1 -1
  124. package/dist/chunks/{index-utzX5BKz.mjs → index-Dn87UbZu.mjs} +2 -2
  125. package/dist/chunks/{index-utzX5BKz.mjs.map → index-Dn87UbZu.mjs.map} +1 -1
  126. package/dist/chunks/{index-CrXpydfv.mjs → index-G8uUqzC7.mjs} +12 -2
  127. package/dist/chunks/index-G8uUqzC7.mjs.map +1 -0
  128. package/dist/chunks/{index-D2G_PixC.mjs → index-SJQIKyxi.mjs} +1 -1
  129. package/dist/chunks/{index-D2G_PixC.mjs.map → index-SJQIKyxi.mjs.map} +1 -1
  130. package/dist/chunks/{index-Dw0VFoXM.mjs → index-fcmnzZn6.mjs} +12 -5
  131. package/dist/chunks/index-fcmnzZn6.mjs.map +1 -0
  132. package/dist/chunks/{index-cxmuS08t.mjs → index-zv8c0UAU.mjs} +3 -3
  133. package/dist/chunks/{index-cxmuS08t.mjs.map → index-zv8c0UAU.mjs.map} +1 -1
  134. package/dist/chunks/index.module-B_Z75X1e.mjs +73 -0
  135. package/dist/chunks/index.module-B_Z75X1e.mjs.map +1 -0
  136. package/dist/chunks/{input-DA9gkhwB.mjs → input-NILUGijL.mjs} +2 -2
  137. package/dist/chunks/{input-DA9gkhwB.mjs.map → input-NILUGijL.mjs.map} +1 -1
  138. package/dist/chunks/input-otp-b-7MmY2H.mjs +455 -0
  139. package/dist/chunks/input-otp-b-7MmY2H.mjs.map +1 -0
  140. package/dist/chunks/{label-BgC413_9.mjs → label-81mjh4Q4.mjs} +44 -3
  141. package/dist/chunks/label-81mjh4Q4.mjs.map +1 -0
  142. package/dist/chunks/{loader-circle-CmQoMw39.mjs → loader-circle-sGBNpyP3.mjs} +2 -2
  143. package/dist/chunks/{loader-circle-CmQoMw39.mjs.map → loader-circle-sGBNpyP3.mjs.map} +1 -1
  144. package/dist/chunks/{menubar-DU7jMSAY.mjs → menubar-Dz5biTZv.mjs} +11 -13
  145. package/dist/chunks/{menubar-DU7jMSAY.mjs.map → menubar-Dz5biTZv.mjs.map} +1 -1
  146. package/dist/chunks/{multi-select-QKfLMC0m.mjs → multi-select-DeW-tL6j.mjs} +13 -13
  147. package/dist/chunks/{multi-select-QKfLMC0m.mjs.map → multi-select-DeW-tL6j.mjs.map} +1 -1
  148. package/dist/chunks/{pagination-zyJ5vFmL.mjs → pagination-0W2Kek6Z.mjs} +6 -6
  149. package/dist/chunks/{pagination-zyJ5vFmL.mjs.map → pagination-0W2Kek6Z.mjs.map} +1 -1
  150. package/dist/chunks/{popover-RcJ808cy.mjs → popover-ChoMUAP9.mjs} +11 -13
  151. package/dist/chunks/{popover-RcJ808cy.mjs.map → popover-ChoMUAP9.mjs.map} +1 -1
  152. package/dist/chunks/progress-zrBdDKEV.mjs +223 -0
  153. package/dist/chunks/progress-zrBdDKEV.mjs.map +1 -0
  154. package/dist/chunks/radio-group-r3ejuIom.mjs +258 -0
  155. package/dist/chunks/radio-group-r3ejuIom.mjs.map +1 -0
  156. package/dist/chunks/{react-number-format.es-CyaQTuwn.mjs → react-number-format.es-rRpdCutF.mjs} +1 -1
  157. package/dist/chunks/{react-number-format.es-CyaQTuwn.mjs.map → react-number-format.es-rRpdCutF.mjs.map} +1 -1
  158. package/dist/chunks/{scroll-area-DUSbQJic.mjs → scroll-area-DjtXX0pm.mjs} +9 -11
  159. package/dist/chunks/{scroll-area-DUSbQJic.mjs.map → scroll-area-DjtXX0pm.mjs.map} +1 -1
  160. package/dist/chunks/{select-DqpIJliN.mjs → select-CICQavYx.mjs} +5 -5
  161. package/dist/chunks/{select-DqpIJliN.mjs.map → select-CICQavYx.mjs.map} +1 -1
  162. package/dist/chunks/{separator-h4204yqZ.mjs → separator-CL28DVoA.mjs} +44 -3
  163. package/dist/chunks/separator-CL28DVoA.mjs.map +1 -0
  164. package/dist/chunks/{sheet-ChrvUpAV.mjs → sheet-BIN5Bwkz.mjs} +4 -4
  165. package/dist/chunks/{sheet-ChrvUpAV.mjs.map → sheet-BIN5Bwkz.mjs.map} +1 -1
  166. package/dist/chunks/{skeleton-DYRcDQga.mjs → skeleton-DEo09dsp.mjs} +2 -2
  167. package/dist/chunks/{skeleton-DYRcDQga.mjs.map → skeleton-DEo09dsp.mjs.map} +1 -1
  168. package/dist/chunks/slider-C_afdOBq.mjs +588 -0
  169. package/dist/chunks/slider-C_afdOBq.mjs.map +1 -0
  170. package/dist/chunks/{sortable-B9EKkKQQ.mjs → sortable-Hz2p-hG_.mjs} +3 -3
  171. package/dist/chunks/{sortable-B9EKkKQQ.mjs.map → sortable-Hz2p-hG_.mjs.map} +1 -1
  172. package/dist/chunks/styles-DQr_CtBg.mjs +6 -0
  173. package/dist/chunks/styles-DQr_CtBg.mjs.map +1 -0
  174. package/dist/chunks/switch-CoxjUYji.mjs +138 -0
  175. package/dist/chunks/switch-CoxjUYji.mjs.map +1 -0
  176. package/dist/chunks/{table-Bf_4RiC6.mjs → table-CaTzvnGO.mjs} +2 -2
  177. package/dist/chunks/{table-Bf_4RiC6.mjs.map → table-CaTzvnGO.mjs.map} +1 -1
  178. package/dist/chunks/{tabs-BH56W9Uk.mjs → tabs-DbcqE74l.mjs} +9 -10
  179. package/dist/chunks/{tabs-BH56W9Uk.mjs.map → tabs-DbcqE74l.mjs.map} +1 -1
  180. package/dist/chunks/{textarea-D1VTvn_8.mjs → textarea-C99bTFre.mjs} +2 -2
  181. package/dist/chunks/{textarea-D1VTvn_8.mjs.map → textarea-C99bTFre.mjs.map} +1 -1
  182. package/dist/chunks/{toggle-DPn3fWo1.mjs → toggle-x7-6JYvP.mjs} +4 -5
  183. package/dist/chunks/{toggle-DPn3fWo1.mjs.map → toggle-x7-6JYvP.mjs.map} +1 -1
  184. package/dist/chunks/{tooltip-DL6xVJHi.mjs → tooltip-aCFcTWvT.mjs} +11 -13
  185. package/dist/chunks/{tooltip-DL6xVJHi.mjs.map → tooltip-aCFcTWvT.mjs.map} +1 -1
  186. package/dist/chunks/{trash-2-B6-kuqxf.mjs → trash-2-BRTBRPsE.mjs} +2 -2
  187. package/dist/chunks/{trash-2-B6-kuqxf.mjs.map → trash-2-BRTBRPsE.mjs.map} +1 -1
  188. package/dist/chunks/{triangle-alert-Gr8soT6b.mjs → triangle-alert-DEr_0gbo.mjs} +2 -2
  189. package/dist/chunks/{triangle-alert-Gr8soT6b.mjs.map → triangle-alert-DEr_0gbo.mjs.map} +1 -1
  190. package/dist/chunks/{tslib.es6-Bf7t9JE-.mjs → tslib.es6-9fTryOSE.mjs} +1 -1
  191. package/dist/chunks/{tslib.es6-Bf7t9JE-.mjs.map → tslib.es6-9fTryOSE.mjs.map} +1 -1
  192. package/dist/chunks/{utils-BOlqGJrg.mjs → utils-M7D-rn0u.mjs} +2 -2
  193. package/dist/chunks/{utils-BOlqGJrg.mjs.map → utils-M7D-rn0u.mjs.map} +1 -1
  194. package/dist/chunks/{wand-sparkles-BOLdCXYe.mjs → wand-sparkles-cr6EaHA_.mjs} +2 -2
  195. package/dist/chunks/{wand-sparkles-BOLdCXYe.mjs.map → wand-sparkles-cr6EaHA_.mjs.map} +1 -1
  196. package/dist/chunks/{x-DWHixXf6.mjs → x-Heb3hHKJ.mjs} +2 -2
  197. package/dist/chunks/{x-DWHixXf6.mjs.map → x-Heb3hHKJ.mjs.map} +1 -1
  198. package/dist/collapsible/index.mjs +8 -10
  199. package/dist/collapsible/index.mjs.map +1 -1
  200. package/dist/combobox/index.mjs +25 -27
  201. package/dist/combobox/index.mjs.map +1 -1
  202. package/dist/command/index.mjs +19 -21
  203. package/dist/command/index.mjs.map +1 -1
  204. package/dist/context-menu/index.mjs +21 -23
  205. package/dist/context-menu/index.mjs.map +1 -1
  206. package/dist/dash/index.mjs +25 -26
  207. package/dist/dash/index.mjs.map +1 -1
  208. package/dist/data-table/index.mjs +33 -35
  209. package/dist/data-table/index.mjs.map +1 -1
  210. package/dist/date-picker/index.mjs +26 -28
  211. package/dist/date-picker/index.mjs.map +1 -1
  212. package/dist/dialog/index.mjs +18 -20
  213. package/dist/dialog/index.mjs.map +1 -1
  214. package/dist/drawer/index.mjs +15 -17
  215. package/dist/drawer/index.mjs.map +1 -1
  216. package/dist/dropdown-menu/index.mjs +21 -23
  217. package/dist/dropdown-menu/index.mjs.map +1 -1
  218. package/dist/dropzone/index.mjs +16 -18
  219. package/dist/dropzone/index.mjs.map +1 -1
  220. package/dist/editable-table/index.mjs +52 -30
  221. package/dist/editable-table/index.mjs.map +1 -1
  222. package/dist/empty/index.mjs +2 -2
  223. package/dist/field/index.mjs +4 -5
  224. package/dist/field/index.mjs.map +1 -1
  225. package/dist/form/index.mjs +4 -5
  226. package/dist/form/index.mjs.map +1 -1
  227. package/dist/form-fields/index.mjs +27 -29
  228. package/dist/form-fields/index.mjs.map +1 -1
  229. package/dist/form-layout/index.d.ts +85 -0
  230. package/dist/form-layout/index.mjs +534 -0
  231. package/dist/form-layout/index.mjs.map +1 -0
  232. package/dist/hover-card/index.mjs +14 -16
  233. package/dist/hover-card/index.mjs.map +1 -1
  234. package/dist/icon/index.mjs +1 -1
  235. package/dist/index.css +1 -1
  236. package/dist/input/index.mjs +3 -3
  237. package/dist/input-group/index.mjs +5 -5
  238. package/dist/input-otp/index.mjs +5 -455
  239. package/dist/input-otp/index.mjs.map +1 -1
  240. package/dist/item/index.mjs +3 -4
  241. package/dist/item/index.mjs.map +1 -1
  242. package/dist/ivt.css +1 -1
  243. package/dist/kbd/index.mjs +2 -2
  244. package/dist/label/index.mjs +3 -4
  245. package/dist/label/index.mjs.map +1 -1
  246. package/dist/layout/index.mjs +22 -24
  247. package/dist/layout/index.mjs.map +1 -1
  248. package/dist/menubar/index.mjs +22 -24
  249. package/dist/menubar/index.mjs.map +1 -1
  250. package/dist/multi-input-list/index.d.ts +0 -1
  251. package/dist/multi-input-list/index.mjs +31 -39
  252. package/dist/multi-input-list/index.mjs.map +1 -1
  253. package/dist/multi-select/index.mjs +32 -34
  254. package/dist/multi-select/index.mjs.map +1 -1
  255. package/dist/navigation-menu/index.mjs +15 -17
  256. package/dist/navigation-menu/index.mjs.map +1 -1
  257. package/dist/pagination/index.mjs +8 -8
  258. package/dist/popover/index.mjs +17 -19
  259. package/dist/popover/index.mjs.map +1 -1
  260. package/dist/progress/index.mjs +3 -5
  261. package/dist/progress/index.mjs.map +1 -1
  262. package/dist/radio-group/index.mjs +18 -264
  263. package/dist/radio-group/index.mjs.map +1 -1
  264. package/dist/resizable/index.mjs +3 -3
  265. package/dist/scroll-area/index.mjs +10 -12
  266. package/dist/scroll-area/index.mjs.map +1 -1
  267. package/dist/select/index.mjs +6 -6
  268. package/dist/separator/index.mjs +3 -4
  269. package/dist/separator/index.mjs.map +1 -1
  270. package/dist/shared/index.mjs +5 -5
  271. package/dist/sheet/index.mjs +18 -20
  272. package/dist/sheet/index.mjs.map +1 -1
  273. package/dist/sidebar/index.mjs +26 -28
  274. package/dist/sidebar/index.mjs.map +1 -1
  275. package/dist/skeleton/index.mjs +3 -3
  276. package/dist/skeleton-component/index.mjs +4 -4
  277. package/dist/slider/index.mjs +14 -591
  278. package/dist/slider/index.mjs.map +1 -1
  279. package/dist/sortable/index.mjs +4 -4
  280. package/dist/spinner/index.mjs +4 -4
  281. package/dist/switch/index.mjs +11 -141
  282. package/dist/switch/index.mjs.map +1 -1
  283. package/dist/table/index.mjs +3 -3
  284. package/dist/table-filter/index.mjs +53 -54
  285. package/dist/table-filter/index.mjs.map +1 -1
  286. package/dist/tabs/index.mjs +14 -16
  287. package/dist/tabs/index.mjs.map +1 -1
  288. package/dist/textarea/index.mjs +3 -3
  289. package/dist/toast/index.mjs +13 -15
  290. package/dist/toast/index.mjs.map +1 -1
  291. package/dist/toggle/index.mjs +6 -7
  292. package/dist/toggle/index.mjs.map +1 -1
  293. package/dist/toggle-group/index.mjs +11 -13
  294. package/dist/toggle-group/index.mjs.map +1 -1
  295. package/dist/tooltip/index.mjs +16 -18
  296. package/dist/tooltip/index.mjs.map +1 -1
  297. package/package.json +475 -470
  298. package/dist/chunks/_commonjsHelpers-D3vrMN3C.mjs.map +0 -1
  299. package/dist/chunks/bundle-mjs-Lvc-Dri9.mjs.map +0 -1
  300. package/dist/chunks/calendar-BTfcQ69r.mjs.map +0 -1
  301. package/dist/chunks/form-CChLO9RR.mjs.map +0 -1
  302. package/dist/chunks/format-numbers-BhgU0ZHz.mjs.map +0 -1
  303. package/dist/chunks/index-BeWMIyGj.mjs +0 -12
  304. package/dist/chunks/index-BeWMIyGj.mjs.map +0 -1
  305. package/dist/chunks/index-CrXpydfv.mjs.map +0 -1
  306. package/dist/chunks/index-D5BJ_0bf.mjs +0 -40
  307. package/dist/chunks/index-D5BJ_0bf.mjs.map +0 -1
  308. package/dist/chunks/index-Dw0VFoXM.mjs.map +0 -1
  309. package/dist/chunks/index-YaCKvBnb.mjs.map +0 -1
  310. package/dist/chunks/index.module-DOV7zOvH.mjs +0 -68
  311. package/dist/chunks/index.module-DOV7zOvH.mjs.map +0 -1
  312. package/dist/chunks/label-BgC413_9.mjs.map +0 -1
  313. package/dist/chunks/progress-BcHalZVV.mjs +0 -99
  314. package/dist/chunks/progress-BcHalZVV.mjs.map +0 -1
  315. package/dist/chunks/separator-h4204yqZ.mjs.map +0 -1
@@ -1,594 +1,17 @@
1
- import * as React from 'react';
2
- import { c as clamp } from '../chunks/index-DpW61g8q.mjs';
3
- import { c as composeEventHandlers } from '../chunks/index-BeWMIyGj.mjs';
4
- import { u as useComposedRefs } from '../chunks/index-D5BJ_0bf.mjs';
5
- import { c as createContextScope } from '../chunks/index-YaCKvBnb.mjs';
6
- import { u as useControllableState } from '../chunks/index-CWI00LgK.mjs';
7
- import { u as useDirection } from '../chunks/index-CkRZ2gKz.mjs';
8
- import { u as usePrevious } from '../chunks/index-D2G_PixC.mjs';
9
- import { u as useSize } from '../chunks/index-F1Vay3hL.mjs';
10
- import { P as Primitive } from '../chunks/index-CrXpydfv.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-BOlqGJrg.mjs';
14
- import '../chunks/index-BrfogwJw.mjs';
1
+ export { S as Slider } from '../chunks/slider-C_afdOBq.mjs';
2
+ import 'react';
3
+ import '../chunks/index-B8zlei3I.mjs';
4
+ import '../chunks/index-G8uUqzC7.mjs';
15
5
  import 'react-dom';
16
6
  import '@radix-ui/react-slot';
17
- import '../chunks/bundle-mjs-Lvc-Dri9.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-Cm5-jAR7.mjs';
9
+ import '../chunks/index-BpZD69GD.mjs';
10
+ import '../chunks/index-DjoMuta5.mjs';
11
+ import '../chunks/index-B49Rv10M.mjs';
12
+ import '../chunks/index-SJQIKyxi.mjs';
13
+ import '../chunks/index-DWtzT31F.mjs';
14
+ import '@radix-ui/react-collection';
15
+ import '../chunks/utils-M7D-rn0u.mjs';
16
+ import '../chunks/bundle-mjs-B1dpl-bk.mjs';
594
17
  //# sourceMappingURL=index.mjs.map