ivt 0.7.4 → 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 (275) hide show
  1. package/dist/accordion/index.mjs +13 -13
  2. package/dist/accordion-table/index.mjs +25 -25
  3. package/dist/alert/index.mjs +3 -3
  4. package/dist/alert-dialog/index.mjs +15 -15
  5. package/dist/auto-complete-multi-select/index.mjs +31 -31
  6. package/dist/avatar/index.mjs +5 -5
  7. package/dist/badge/index.mjs +3 -3
  8. package/dist/base/index.d.ts +31 -9
  9. package/dist/base/index.mjs +79 -79
  10. package/dist/base/index.mjs.map +1 -1
  11. package/dist/breadcrumb/index.mjs +5 -5
  12. package/dist/button/index.d.ts +1 -1
  13. package/dist/button/index.mjs +3 -3
  14. package/dist/button-group/index.d.ts +3 -2
  15. package/dist/button-group/index.mjs +3 -3
  16. package/dist/calendar/index.mjs +9 -9
  17. package/dist/card/index.mjs +3 -3
  18. package/dist/carousel/index.mjs +4 -4
  19. package/dist/chart/index.mjs +4 -4
  20. package/dist/checkbox/index.mjs +12 -12
  21. package/dist/chunks/{AutoComplete-qFuwmV53.mjs → AutoComplete-BpwnFm_u.mjs} +23 -12
  22. package/dist/chunks/AutoComplete-BpwnFm_u.mjs.map +1 -0
  23. package/dist/chunks/{CalendarRange-Ce7PiNfq.mjs → CalendarRange-BGP7p-ma.mjs} +8 -8
  24. package/dist/chunks/{CalendarRange-Ce7PiNfq.mjs.map → CalendarRange-BGP7p-ma.mjs.map} +1 -1
  25. package/dist/chunks/{ComboboxField-DaRpRraW.mjs → ComboboxField-CzJlHHXv.mjs} +9 -9
  26. package/dist/chunks/{ComboboxField-DaRpRraW.mjs.map → ComboboxField-CzJlHHXv.mjs.map} +1 -1
  27. package/dist/chunks/{Container-DwaAaEiC.mjs → Container-77E_UFi2.mjs} +2 -2
  28. package/dist/chunks/{Container-DwaAaEiC.mjs.map → Container-77E_UFi2.mjs.map} +1 -1
  29. package/dist/chunks/{DeleteConfirmationModal-BwTbbBAw.mjs → DeleteConfirmationModal-DQK05Srx.mjs} +4 -4
  30. package/dist/chunks/{DeleteConfirmationModal-BwTbbBAw.mjs.map → DeleteConfirmationModal-DQK05Srx.mjs.map} +1 -1
  31. package/dist/chunks/{ListItem-zxS4CZdq.mjs → ListItem-B0_5JcsU.mjs} +4 -4
  32. package/dist/chunks/{ListItem-zxS4CZdq.mjs.map → ListItem-B0_5JcsU.mjs.map} +1 -1
  33. package/dist/chunks/{TooltipIndicator-CwGGAeRz.mjs → TooltipIndicator-Db1poSJI.mjs} +4 -4
  34. package/dist/chunks/{TooltipIndicator-CwGGAeRz.mjs.map → TooltipIndicator-Db1poSJI.mjs.map} +1 -1
  35. package/dist/chunks/{_commonjsHelpers-B2Be7UYW.mjs → _commonjsHelpers-DkfSKqYE.mjs} +1 -1
  36. package/dist/chunks/_commonjsHelpers-DkfSKqYE.mjs.map +1 -0
  37. package/dist/chunks/{accordion-D4JVALAO.mjs → accordion-DSn7k_RQ.mjs} +9 -9
  38. package/dist/chunks/{accordion-D4JVALAO.mjs.map → accordion-DSn7k_RQ.mjs.map} +1 -1
  39. package/dist/chunks/{alert-D-E6nsVK.mjs → alert-aP6n7wtq.mjs} +2 -2
  40. package/dist/chunks/{alert-D-E6nsVK.mjs.map → alert-aP6n7wtq.mjs.map} +1 -1
  41. package/dist/chunks/{badge-C6mkl9yr.mjs → badge-CsUuqHNu.mjs} +2 -2
  42. package/dist/chunks/{badge-C6mkl9yr.mjs.map → badge-CsUuqHNu.mjs.map} +1 -1
  43. package/dist/chunks/{bundle-mjs-B1dpl-bk.mjs → bundle-mjs-BRbxNcQb.mjs} +1 -1
  44. package/dist/chunks/{bundle-mjs-B1dpl-bk.mjs.map → bundle-mjs-BRbxNcQb.mjs.map} +1 -1
  45. package/dist/chunks/{button-DsgJkgEz.mjs → button-BW9I4XWU.mjs} +2 -2
  46. package/dist/chunks/{button-DsgJkgEz.mjs.map → button-BW9I4XWU.mjs.map} +1 -1
  47. package/dist/chunks/button-C8IZYeQz.d.ts +16 -0
  48. package/dist/chunks/{calendar-Co99lCn4.mjs → calendar-C549VT55.mjs} +531 -531
  49. package/dist/chunks/{calendar-Co99lCn4.mjs.map → calendar-C549VT55.mjs.map} +1 -1
  50. package/dist/chunks/{calendar-days-BF4GDmMr.mjs → calendar-days-BSzlDBsi.mjs} +2 -2
  51. package/dist/chunks/{calendar-days-BF4GDmMr.mjs.map → calendar-days-BSzlDBsi.mjs.map} +1 -1
  52. package/dist/chunks/{card-Cuo7NL8y.mjs → card-Dqm2EuWU.mjs} +2 -2
  53. package/dist/chunks/{card-Cuo7NL8y.mjs.map → card-Dqm2EuWU.mjs.map} +1 -1
  54. package/dist/chunks/{check-CzKqQLNR.mjs → check-CKdwsuVA.mjs} +2 -2
  55. package/dist/chunks/{check-CzKqQLNR.mjs.map → check-CKdwsuVA.mjs.map} +1 -1
  56. package/dist/chunks/{checkbox-C7RUdsIS.mjs → checkbox-CvaPsjy3.mjs} +9 -9
  57. package/dist/chunks/{checkbox-C7RUdsIS.mjs.map → checkbox-CvaPsjy3.mjs.map} +1 -1
  58. package/dist/chunks/{chevron-down-CZjN_vyX.mjs → chevron-down-o7NUBnJ4.mjs} +2 -2
  59. package/dist/chunks/{chevron-down-CZjN_vyX.mjs.map → chevron-down-o7NUBnJ4.mjs.map} +1 -1
  60. package/dist/chunks/{chevron-left-BpfBwM4S.mjs → chevron-left-BZ8X7kLy.mjs} +2 -2
  61. package/dist/chunks/{chevron-left-BpfBwM4S.mjs.map → chevron-left-BZ8X7kLy.mjs.map} +1 -1
  62. package/dist/chunks/{chevron-right-uq-O8rwC.mjs → chevron-right-jAScR3zY.mjs} +2 -2
  63. package/dist/chunks/{chevron-right-uq-O8rwC.mjs.map → chevron-right-jAScR3zY.mjs.map} +1 -1
  64. package/dist/chunks/{chevrons-up-down-DKM8h8j_.mjs → chevrons-up-down-BSIPdamI.mjs} +2 -2
  65. package/dist/chunks/{chevrons-up-down-DKM8h8j_.mjs.map → chevrons-up-down-BSIPdamI.mjs.map} +1 -1
  66. package/dist/chunks/{command-CAS791lb.mjs → command-B29vdoVO.mjs} +8 -8
  67. package/dist/chunks/{command-CAS791lb.mjs.map → command-B29vdoVO.mjs.map} +1 -1
  68. package/dist/chunks/{createLucideIcon-xkRZC0aJ.mjs → createLucideIcon-CkP7424r.mjs} +1 -1
  69. package/dist/chunks/{createLucideIcon-xkRZC0aJ.mjs.map → createLucideIcon-CkP7424r.mjs.map} +1 -1
  70. package/dist/chunks/{date-DYEUxjwi.mjs → date-Y_hKMQVr.mjs} +2 -2
  71. package/dist/chunks/{date-DYEUxjwi.mjs.map → date-Y_hKMQVr.mjs.map} +1 -1
  72. package/dist/chunks/{dialog-Dt_M700u.mjs → dialog-BhaHMQnG.mjs} +4 -4
  73. package/dist/chunks/{dialog-Dt_M700u.mjs.map → dialog-BhaHMQnG.mjs.map} +1 -1
  74. package/dist/chunks/{ellipsis-BcRZkfZw.mjs → ellipsis-DHAz8TrI.mjs} +2 -2
  75. package/dist/chunks/{ellipsis-BcRZkfZw.mjs.map → ellipsis-DHAz8TrI.mjs.map} +1 -1
  76. package/dist/chunks/{form-CJnoOgoH.mjs → form-BAxhKbgh.mjs} +3 -3
  77. package/dist/chunks/{form-CJnoOgoH.mjs.map → form-BAxhKbgh.mjs.map} +1 -1
  78. package/dist/chunks/{format-BSPAt__h.mjs → format-CR4Q6BSq.mjs} +1 -1
  79. package/dist/chunks/{format-BSPAt__h.mjs.map → format-CR4Q6BSq.mjs.map} +1 -1
  80. package/dist/chunks/{format-numbers-BpGX211b.mjs → format-numbers-CWj9Vf7x.mjs} +1 -1
  81. package/dist/chunks/{format-numbers-BpGX211b.mjs.map → format-numbers-CWj9Vf7x.mjs.map} +1 -1
  82. package/dist/chunks/{hover-card-DKMcpBnt.mjs → hover-card-DVmQc78n.mjs} +9 -9
  83. package/dist/chunks/{hover-card-DKMcpBnt.mjs.map → hover-card-DVmQc78n.mjs.map} +1 -1
  84. package/dist/chunks/{index-DjoMuta5.mjs → index-4pJ77hyF.mjs} +1 -1
  85. package/dist/chunks/{index-DjoMuta5.mjs.map → index-4pJ77hyF.mjs.map} +1 -1
  86. package/dist/chunks/{index-9921_a2g.mjs → index-BN17NQCv.mjs} +1 -1
  87. package/dist/chunks/{index-9921_a2g.mjs.map → index-BN17NQCv.mjs.map} +1 -1
  88. package/dist/chunks/{index-7wUPkpwA.mjs → index-Bt1elORc.mjs} +9 -9
  89. package/dist/chunks/{index-7wUPkpwA.mjs.map → index-Bt1elORc.mjs.map} +1 -1
  90. package/dist/chunks/{index-CsC-dafu.mjs → index-CByz7d8q.mjs} +3 -3
  91. package/dist/chunks/{index-CsC-dafu.mjs.map → index-CByz7d8q.mjs.map} +1 -1
  92. package/dist/chunks/{index-CvWc6WZ4.mjs → index-CS2Lzoed.mjs} +7 -7
  93. package/dist/chunks/{index-CvWc6WZ4.mjs.map → index-CS2Lzoed.mjs.map} +1 -1
  94. package/dist/chunks/{index-Cm5-jAR7.mjs → index-CVjOpozG.mjs} +1 -1
  95. package/dist/chunks/{index-Cm5-jAR7.mjs.map → index-CVjOpozG.mjs.map} +1 -1
  96. package/dist/chunks/{index-BtdTgi0_.mjs → index-Cs9A0tpU.mjs} +1 -1
  97. package/dist/chunks/{index-BtdTgi0_.mjs.map → index-Cs9A0tpU.mjs.map} +1 -1
  98. package/dist/chunks/{index-0DBJW078.mjs → index-Ct610FOk.mjs} +2 -2
  99. package/dist/chunks/{index-0DBJW078.mjs.map → index-Ct610FOk.mjs.map} +1 -1
  100. package/dist/chunks/{index-DSBOi0JP.mjs → index-CvVBB5ll.mjs} +4 -4
  101. package/dist/chunks/{index-DSBOi0JP.mjs.map → index-CvVBB5ll.mjs.map} +1 -1
  102. package/dist/chunks/{index-B8pOe-bI.mjs → index-D1CSAowX.mjs} +13 -13
  103. package/dist/chunks/{index-B8pOe-bI.mjs.map → index-D1CSAowX.mjs.map} +1 -1
  104. package/dist/chunks/{index-BpZD69GD.mjs → index-D2DYiX9D.mjs} +2 -2
  105. package/dist/chunks/{index-BpZD69GD.mjs.map → index-D2DYiX9D.mjs.map} +1 -1
  106. package/dist/chunks/{index-SJQIKyxi.mjs → index-D8mA4n7w.mjs} +1 -1
  107. package/dist/chunks/{index-SJQIKyxi.mjs.map → index-D8mA4n7w.mjs.map} +1 -1
  108. package/dist/chunks/{index-CuEeN4AG.mjs → index-DCDDoDjL.mjs} +6 -6
  109. package/dist/chunks/{index-CuEeN4AG.mjs.map → index-DCDDoDjL.mjs.map} +1 -1
  110. package/dist/chunks/{index-G8uUqzC7.mjs → index-DLqxy-dg.mjs} +1 -1
  111. package/dist/chunks/{index-G8uUqzC7.mjs.map → index-DLqxy-dg.mjs.map} +1 -1
  112. package/dist/chunks/{index-DaifcY5X.mjs → index-DNMhNzeD.mjs} +7 -7
  113. package/dist/chunks/{index-DaifcY5X.mjs.map → index-DNMhNzeD.mjs.map} +1 -1
  114. package/dist/chunks/{index-zv8c0UAU.mjs → index-DQD35Ges.mjs} +3 -3
  115. package/dist/chunks/{index-zv8c0UAU.mjs.map → index-DQD35Ges.mjs.map} +1 -1
  116. package/dist/chunks/{index-B49Rv10M.mjs → index-D_Q4NGnO.mjs} +1 -1
  117. package/dist/chunks/{index-B49Rv10M.mjs.map → index-D_Q4NGnO.mjs.map} +1 -1
  118. package/dist/chunks/{index-fcmnzZn6.mjs → index-D_e6adwb.mjs} +5 -5
  119. package/dist/chunks/{index-fcmnzZn6.mjs.map → index-D_e6adwb.mjs.map} +1 -1
  120. package/dist/chunks/{index-DWtzT31F.mjs → index-DhI6OG_H.mjs} +2 -2
  121. package/dist/chunks/{index-DWtzT31F.mjs.map → index-DhI6OG_H.mjs.map} +1 -1
  122. package/dist/chunks/{index-Dn87UbZu.mjs → index-Dp_0m03a.mjs} +2 -2
  123. package/dist/chunks/{index-Dn87UbZu.mjs.map → index-Dp_0m03a.mjs.map} +1 -1
  124. package/dist/chunks/{index-B8zlei3I.mjs → index-oX_tk439.mjs} +1 -1
  125. package/dist/chunks/{index-B8zlei3I.mjs.map → index-oX_tk439.mjs.map} +1 -1
  126. package/dist/chunks/{index.module-B_Z75X1e.mjs → index.module-Df4mRjmZ.mjs} +1 -1
  127. package/dist/chunks/{index.module-B_Z75X1e.mjs.map → index.module-Df4mRjmZ.mjs.map} +1 -1
  128. package/dist/chunks/{input-NILUGijL.mjs → input-YpoAHnXb.mjs} +2 -2
  129. package/dist/chunks/{input-NILUGijL.mjs.map → input-YpoAHnXb.mjs.map} +1 -1
  130. package/dist/chunks/{input-otp-b-7MmY2H.mjs → input-otp-BKqdZwNx.mjs} +3 -3
  131. package/dist/chunks/{input-otp-b-7MmY2H.mjs.map → input-otp-BKqdZwNx.mjs.map} +1 -1
  132. package/dist/chunks/{label-81mjh4Q4.mjs → label-D5s6d0et.mjs} +2 -2
  133. package/dist/chunks/{label-81mjh4Q4.mjs.map → label-D5s6d0et.mjs.map} +1 -1
  134. package/dist/chunks/{loader-circle-sGBNpyP3.mjs → loader-circle-C7StEOZI.mjs} +2 -2
  135. package/dist/chunks/{loader-circle-sGBNpyP3.mjs.map → loader-circle-C7StEOZI.mjs.map} +1 -1
  136. package/dist/chunks/{menubar-Dz5biTZv.mjs → menubar-ySifmjAG.mjs} +11 -11
  137. package/dist/chunks/{menubar-Dz5biTZv.mjs.map → menubar-ySifmjAG.mjs.map} +1 -1
  138. package/dist/chunks/{multi-select-DeW-tL6j.mjs → multi-select-BsnRMfg7.mjs} +13 -13
  139. package/dist/chunks/{multi-select-DeW-tL6j.mjs.map → multi-select-BsnRMfg7.mjs.map} +1 -1
  140. package/dist/chunks/{pagination-0W2Kek6Z.mjs → pagination-CV6N_Qu_.mjs} +6 -6
  141. package/dist/chunks/{pagination-0W2Kek6Z.mjs.map → pagination-CV6N_Qu_.mjs.map} +1 -1
  142. package/dist/chunks/{popover-ChoMUAP9.mjs → popover-D3JC54Y3.mjs} +11 -11
  143. package/dist/chunks/{popover-ChoMUAP9.mjs.map → popover-D3JC54Y3.mjs.map} +1 -1
  144. package/dist/chunks/{progress-zrBdDKEV.mjs → progress-D_Enl4tV.mjs} +2 -2
  145. package/dist/chunks/{progress-zrBdDKEV.mjs.map → progress-D_Enl4tV.mjs.map} +1 -1
  146. package/dist/chunks/{radio-group-r3ejuIom.mjs → radio-group-yF1QEewC.mjs} +11 -11
  147. package/dist/chunks/{radio-group-r3ejuIom.mjs.map → radio-group-yF1QEewC.mjs.map} +1 -1
  148. package/dist/chunks/{react-number-format.es-rRpdCutF.mjs → react-number-format.es-C3uDZhRo.mjs} +1 -1
  149. package/dist/chunks/{react-number-format.es-rRpdCutF.mjs.map → react-number-format.es-C3uDZhRo.mjs.map} +1 -1
  150. package/dist/chunks/{scroll-area-DjtXX0pm.mjs → scroll-area-CdGRe--S.mjs} +9 -9
  151. package/dist/chunks/{scroll-area-DjtXX0pm.mjs.map → scroll-area-CdGRe--S.mjs.map} +1 -1
  152. package/dist/chunks/{select-CICQavYx.mjs → select-B8JYuJE5.mjs} +5 -5
  153. package/dist/chunks/{select-CICQavYx.mjs.map → select-B8JYuJE5.mjs.map} +1 -1
  154. package/dist/chunks/{separator-CL28DVoA.mjs → separator-sWF5eZgM.mjs} +2 -2
  155. package/dist/chunks/{separator-CL28DVoA.mjs.map → separator-sWF5eZgM.mjs.map} +1 -1
  156. package/dist/chunks/{sheet-BIN5Bwkz.mjs → sheet-D-4XWzUo.mjs} +4 -4
  157. package/dist/chunks/{sheet-BIN5Bwkz.mjs.map → sheet-D-4XWzUo.mjs.map} +1 -1
  158. package/dist/chunks/{skeleton-DEo09dsp.mjs → skeleton-CQlSHSfr.mjs} +2 -2
  159. package/dist/chunks/{skeleton-DEo09dsp.mjs.map → skeleton-CQlSHSfr.mjs.map} +1 -1
  160. package/dist/chunks/{slider-C_afdOBq.mjs → slider-CaliGouI.mjs} +9 -9
  161. package/dist/chunks/{slider-C_afdOBq.mjs.map → slider-CaliGouI.mjs.map} +1 -1
  162. package/dist/chunks/{sortable-Hz2p-hG_.mjs → sortable-BoTUMXD0.mjs} +3 -3
  163. package/dist/chunks/{sortable-Hz2p-hG_.mjs.map → sortable-BoTUMXD0.mjs.map} +1 -1
  164. package/dist/chunks/{styles-DQr_CtBg.mjs → styles-C5sFcbz4.mjs} +1 -1
  165. package/dist/chunks/{styles-DQr_CtBg.mjs.map → styles-C5sFcbz4.mjs.map} +1 -1
  166. package/dist/chunks/{switch-CoxjUYji.mjs → switch-szutUcvb.mjs} +7 -7
  167. package/dist/chunks/{switch-CoxjUYji.mjs.map → switch-szutUcvb.mjs.map} +1 -1
  168. package/dist/chunks/{table-CaTzvnGO.mjs → table-wwce3IsC.mjs} +2 -2
  169. package/dist/chunks/{table-CaTzvnGO.mjs.map → table-wwce3IsC.mjs.map} +1 -1
  170. package/dist/chunks/{tabs-DbcqE74l.mjs → tabs-BDPMoWeJ.mjs} +9 -9
  171. package/dist/chunks/{tabs-DbcqE74l.mjs.map → tabs-BDPMoWeJ.mjs.map} +1 -1
  172. package/dist/chunks/{textarea-C99bTFre.mjs → textarea-DYBOxg35.mjs} +2 -2
  173. package/dist/chunks/{textarea-C99bTFre.mjs.map → textarea-DYBOxg35.mjs.map} +1 -1
  174. package/dist/chunks/toast-S15TT7Q2.mjs +702 -0
  175. package/dist/chunks/toast-S15TT7Q2.mjs.map +1 -0
  176. package/dist/chunks/{toggle-x7-6JYvP.mjs → toggle-GXtKRhvr.mjs} +4 -4
  177. package/dist/chunks/{toggle-x7-6JYvP.mjs.map → toggle-GXtKRhvr.mjs.map} +1 -1
  178. package/dist/chunks/{tooltip-aCFcTWvT.mjs → tooltip-z43eMlPO.mjs} +11 -11
  179. package/dist/chunks/{tooltip-aCFcTWvT.mjs.map → tooltip-z43eMlPO.mjs.map} +1 -1
  180. package/dist/chunks/{trash-2-BRTBRPsE.mjs → trash-2-CZE_1bXY.mjs} +2 -2
  181. package/dist/chunks/{trash-2-BRTBRPsE.mjs.map → trash-2-CZE_1bXY.mjs.map} +1 -1
  182. package/dist/chunks/{triangle-alert-DEr_0gbo.mjs → triangle-alert-BeczCtiG.mjs} +2 -2
  183. package/dist/chunks/{triangle-alert-DEr_0gbo.mjs.map → triangle-alert-BeczCtiG.mjs.map} +1 -1
  184. package/dist/chunks/{tslib.es6-9fTryOSE.mjs → tslib.es6-B20VGjW7.mjs} +1 -1
  185. package/dist/chunks/{tslib.es6-9fTryOSE.mjs.map → tslib.es6-B20VGjW7.mjs.map} +1 -1
  186. package/dist/chunks/use-toast-C3gJQZ0s.mjs +137 -0
  187. package/dist/chunks/use-toast-C3gJQZ0s.mjs.map +1 -0
  188. package/dist/chunks/{utils-M7D-rn0u.mjs → utils-uOfHPBdi.mjs} +2 -2
  189. package/dist/chunks/{utils-M7D-rn0u.mjs.map → utils-uOfHPBdi.mjs.map} +1 -1
  190. package/dist/chunks/{wand-sparkles-cr6EaHA_.mjs → wand-sparkles-COk3z6HL.mjs} +2 -2
  191. package/dist/chunks/{wand-sparkles-cr6EaHA_.mjs.map → wand-sparkles-COk3z6HL.mjs.map} +1 -1
  192. package/dist/chunks/{x-Heb3hHKJ.mjs → x-D5HL_X5m.mjs} +2 -2
  193. package/dist/chunks/{x-Heb3hHKJ.mjs.map → x-D5HL_X5m.mjs.map} +1 -1
  194. package/dist/collapsible/index.mjs +7 -7
  195. package/dist/combobox/index.mjs +24 -24
  196. package/dist/command/index.d.ts +7 -7
  197. package/dist/command/index.mjs +18 -18
  198. package/dist/context-menu/index.mjs +21 -21
  199. package/dist/dash/index.mjs +24 -24
  200. package/dist/data-table/index.mjs +33 -33
  201. package/dist/date-picker/index.d.ts +22 -7
  202. package/dist/date-picker/index.mjs +25 -25
  203. package/dist/dialog/index.mjs +17 -17
  204. package/dist/drawer/index.mjs +14 -14
  205. package/dist/dropdown-menu/index.mjs +21 -21
  206. package/dist/dropzone/index.mjs +19 -131
  207. package/dist/dropzone/index.mjs.map +1 -1
  208. package/dist/editable-table/index.mjs +18 -18
  209. package/dist/empty/index.mjs +2 -2
  210. package/dist/field/index.d.ts +3 -2
  211. package/dist/field/index.mjs +4 -4
  212. package/dist/form/index.mjs +4 -4
  213. package/dist/form-fields/index.mjs +26 -26
  214. package/dist/form-layout/index.d.ts +1 -0
  215. package/dist/form-layout/index.mjs +55 -54
  216. package/dist/form-layout/index.mjs.map +1 -1
  217. package/dist/hover-card/index.mjs +13 -13
  218. package/dist/icon/index.mjs +1 -1
  219. package/dist/input/index.mjs +3 -3
  220. package/dist/input-group/index.d.ts +1 -1
  221. package/dist/input-group/index.mjs +5 -5
  222. package/dist/input-otp/index.mjs +4 -4
  223. package/dist/item/index.d.ts +4 -2
  224. package/dist/item/index.mjs +3 -3
  225. package/dist/kbd/index.mjs +2 -2
  226. package/dist/label/index.mjs +3 -3
  227. package/dist/layout/index.mjs +21 -21
  228. package/dist/menubar/index.mjs +22 -22
  229. package/dist/multi-input-list/index.mjs +28 -28
  230. package/dist/multi-select/index.mjs +31 -31
  231. package/dist/navigation-menu/index.mjs +15 -15
  232. package/dist/pagination/index.d.ts +1 -1
  233. package/dist/pagination/index.mjs +8 -8
  234. package/dist/popover/index.mjs +16 -16
  235. package/dist/progress/index.mjs +3 -3
  236. package/dist/radio-group/index.mjs +16 -16
  237. package/dist/resizable/index.mjs +3 -3
  238. package/dist/scroll-area/index.mjs +10 -10
  239. package/dist/select/index.mjs +6 -6
  240. package/dist/separator/index.mjs +3 -3
  241. package/dist/shared/index.d.ts +13 -3
  242. package/dist/shared/index.mjs +6 -6
  243. package/dist/shared/index.mjs.map +1 -1
  244. package/dist/sheet/index.d.ts +7 -7
  245. package/dist/sheet/index.mjs +17 -17
  246. package/dist/sidebar/index.d.ts +17 -4
  247. package/dist/sidebar/index.mjs +25 -25
  248. package/dist/skeleton/index.mjs +3 -3
  249. package/dist/skeleton-component/index.mjs +4 -4
  250. package/dist/slider/index.mjs +11 -11
  251. package/dist/sortable/index.d.ts +12 -3
  252. package/dist/sortable/index.mjs +4 -4
  253. package/dist/spinner/index.mjs +4 -4
  254. package/dist/switch/index.mjs +9 -9
  255. package/dist/table/index.mjs +3 -3
  256. package/dist/table-filter/index.d.ts +8 -3
  257. package/dist/table-filter/index.mjs +52 -52
  258. package/dist/tabs/index.mjs +12 -12
  259. package/dist/textarea/index.mjs +3 -3
  260. package/dist/toast/index.mjs +19 -703
  261. package/dist/toast/index.mjs.map +1 -1
  262. package/dist/toaster/index.d.ts +5 -0
  263. package/dist/toaster/index.mjs +34 -0
  264. package/dist/toaster/index.mjs.map +1 -0
  265. package/dist/toggle/index.mjs +6 -6
  266. package/dist/toggle-group/index.mjs +11 -11
  267. package/dist/tooltip/index.mjs +15 -15
  268. package/package.json +5 -2
  269. package/dist/chunks/AutoComplete-qFuwmV53.mjs.map +0 -1
  270. package/dist/chunks/_commonjsHelpers-B2Be7UYW.mjs.map +0 -1
  271. package/dist/icon.svg +0 -7
  272. package/dist/index.cjs.js +0 -1
  273. package/dist/index.es.js +0 -1
  274. package/dist/ivt.css +0 -1
  275. package/dist/ivt.png +0 -0
@@ -1,705 +1,21 @@
1
- import * as React from 'react';
2
- import React__default from 'react';
3
- import * as ReactDOM from 'react-dom';
4
- import { P as Primitive, c as composeEventHandlers, d as dispatchDiscreteCustomEvent } from '../chunks/index-G8uUqzC7.mjs';
5
- import { c as createContextScope, u as useComposedRefs } from '../chunks/index-Cm5-jAR7.mjs';
6
- import { createCollection } from '@radix-ui/react-collection';
7
- import { B as Branch, R as Root } from '../chunks/index-DSBOi0JP.mjs';
8
- import { P as Portal } from '../chunks/index-zv8c0UAU.mjs';
9
- import { P as Presence } from '../chunks/index-CsC-dafu.mjs';
10
- import { u as useCallbackRef } from '../chunks/index-BtdTgi0_.mjs';
11
- import { u as useControllableState } from '../chunks/index-BpZD69GD.mjs';
12
- import { u as useLayoutEffect2 } from '../chunks/index-DjoMuta5.mjs';
13
- import { V as VisuallyHidden } from '../chunks/index-0DBJW078.mjs';
14
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
15
- import { cva } from 'class-variance-authority';
16
- import { c as cn } from '../chunks/utils-M7D-rn0u.mjs';
17
- import { X } from '../chunks/x-Heb3hHKJ.mjs';
1
+ export { b as Toast, f as ToastAction, e as ToastClose, d as ToastDescription, T as ToastProvider, c as ToastTitle, a as ToastViewport } from '../chunks/toast-S15TT7Q2.mjs';
2
+ import 'react';
3
+ import 'react-dom';
4
+ import '../chunks/index-DLqxy-dg.mjs';
18
5
  import '@radix-ui/react-slot';
19
- import '../chunks/bundle-mjs-B1dpl-bk.mjs';
20
- import '../chunks/createLucideIcon-xkRZC0aJ.mjs';
21
-
22
- var PROVIDER_NAME = "ToastProvider";
23
- var [Collection, useCollection, createCollectionScope] = createCollection("Toast");
24
- var [createToastContext] = createContextScope("Toast", [
25
- createCollectionScope
26
- ]);
27
- var [ToastProviderProvider, useToastProviderContext] = createToastContext(PROVIDER_NAME);
28
- var ToastProvider$1 = (props)=>{
29
- const { __scopeToast, label = "Notification", duration = 5e3, swipeDirection = "right", swipeThreshold = 50, children } = props;
30
- const [viewport, setViewport] = React.useState(null);
31
- const [toastCount, setToastCount] = React.useState(0);
32
- const isFocusedToastEscapeKeyDownRef = React.useRef(false);
33
- const isClosePausedRef = React.useRef(false);
34
- if (!label.trim()) {
35
- console.error(`Invalid prop \`label\` supplied to \`${PROVIDER_NAME}\`. Expected non-empty \`string\`.`);
36
- }
37
- return /* @__PURE__ */ jsx(Collection.Provider, {
38
- scope: __scopeToast,
39
- children: /* @__PURE__ */ jsx(ToastProviderProvider, {
40
- scope: __scopeToast,
41
- label,
42
- duration,
43
- swipeDirection,
44
- swipeThreshold,
45
- toastCount,
46
- viewport,
47
- onViewportChange: setViewport,
48
- onToastAdd: React.useCallback(()=>setToastCount((prevCount)=>prevCount + 1), []),
49
- onToastRemove: React.useCallback(()=>setToastCount((prevCount)=>prevCount - 1), []),
50
- isFocusedToastEscapeKeyDownRef,
51
- isClosePausedRef,
52
- children
53
- })
54
- });
55
- };
56
- ToastProvider$1.displayName = PROVIDER_NAME;
57
- var VIEWPORT_NAME = "ToastViewport";
58
- var VIEWPORT_DEFAULT_HOTKEY = [
59
- "F8"
60
- ];
61
- var VIEWPORT_PAUSE = "toast.viewportPause";
62
- var VIEWPORT_RESUME = "toast.viewportResume";
63
- var ToastViewport$1 = React.forwardRef((props, forwardedRef)=>{
64
- const { __scopeToast, hotkey = VIEWPORT_DEFAULT_HOTKEY, label = "Notifications ({hotkey})", ...viewportProps } = props;
65
- const context = useToastProviderContext(VIEWPORT_NAME, __scopeToast);
66
- const getItems = useCollection(__scopeToast);
67
- const wrapperRef = React.useRef(null);
68
- const headFocusProxyRef = React.useRef(null);
69
- const tailFocusProxyRef = React.useRef(null);
70
- const ref = React.useRef(null);
71
- const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
72
- const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
73
- const hasToasts = context.toastCount > 0;
74
- React.useEffect(()=>{
75
- const handleKeyDown = (event)=>{
76
- const isHotkeyPressed = hotkey.length !== 0 && hotkey.every((key)=>event[key] || event.code === key);
77
- if (isHotkeyPressed) ref.current?.focus();
78
- };
79
- document.addEventListener("keydown", handleKeyDown);
80
- return ()=>document.removeEventListener("keydown", handleKeyDown);
81
- }, [
82
- hotkey
83
- ]);
84
- React.useEffect(()=>{
85
- const wrapper = wrapperRef.current;
86
- const viewport = ref.current;
87
- if (hasToasts && wrapper && viewport) {
88
- const handlePause = ()=>{
89
- if (!context.isClosePausedRef.current) {
90
- const pauseEvent = new CustomEvent(VIEWPORT_PAUSE);
91
- viewport.dispatchEvent(pauseEvent);
92
- context.isClosePausedRef.current = true;
93
- }
94
- };
95
- const handleResume = ()=>{
96
- if (context.isClosePausedRef.current) {
97
- const resumeEvent = new CustomEvent(VIEWPORT_RESUME);
98
- viewport.dispatchEvent(resumeEvent);
99
- context.isClosePausedRef.current = false;
100
- }
101
- };
102
- const handleFocusOutResume = (event)=>{
103
- const isFocusMovingOutside = !wrapper.contains(event.relatedTarget);
104
- if (isFocusMovingOutside) handleResume();
105
- };
106
- const handlePointerLeaveResume = ()=>{
107
- const isFocusInside = wrapper.contains(document.activeElement);
108
- if (!isFocusInside) handleResume();
109
- };
110
- wrapper.addEventListener("focusin", handlePause);
111
- wrapper.addEventListener("focusout", handleFocusOutResume);
112
- wrapper.addEventListener("pointermove", handlePause);
113
- wrapper.addEventListener("pointerleave", handlePointerLeaveResume);
114
- window.addEventListener("blur", handlePause);
115
- window.addEventListener("focus", handleResume);
116
- return ()=>{
117
- wrapper.removeEventListener("focusin", handlePause);
118
- wrapper.removeEventListener("focusout", handleFocusOutResume);
119
- wrapper.removeEventListener("pointermove", handlePause);
120
- wrapper.removeEventListener("pointerleave", handlePointerLeaveResume);
121
- window.removeEventListener("blur", handlePause);
122
- window.removeEventListener("focus", handleResume);
123
- };
124
- }
125
- }, [
126
- hasToasts,
127
- context.isClosePausedRef
128
- ]);
129
- const getSortedTabbableCandidates = React.useCallback(({ tabbingDirection })=>{
130
- const toastItems = getItems();
131
- const tabbableCandidates = toastItems.map((toastItem)=>{
132
- const toastNode = toastItem.ref.current;
133
- const toastTabbableCandidates = [
134
- toastNode,
135
- ...getTabbableCandidates(toastNode)
136
- ];
137
- return tabbingDirection === "forwards" ? toastTabbableCandidates : toastTabbableCandidates.reverse();
138
- });
139
- return (tabbingDirection === "forwards" ? tabbableCandidates.reverse() : tabbableCandidates).flat();
140
- }, [
141
- getItems
142
- ]);
143
- React.useEffect(()=>{
144
- const viewport = ref.current;
145
- if (viewport) {
146
- const handleKeyDown = (event)=>{
147
- const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;
148
- const isTabKey = event.key === "Tab" && !isMetaKey;
149
- if (isTabKey) {
150
- const focusedElement = document.activeElement;
151
- const isTabbingBackwards = event.shiftKey;
152
- const targetIsViewport = event.target === viewport;
153
- if (targetIsViewport && isTabbingBackwards) {
154
- headFocusProxyRef.current?.focus();
155
- return;
156
- }
157
- const tabbingDirection = isTabbingBackwards ? "backwards" : "forwards";
158
- const sortedCandidates = getSortedTabbableCandidates({
159
- tabbingDirection
160
- });
161
- const index = sortedCandidates.findIndex((candidate)=>candidate === focusedElement);
162
- if (focusFirst(sortedCandidates.slice(index + 1))) {
163
- event.preventDefault();
164
- } else {
165
- isTabbingBackwards ? headFocusProxyRef.current?.focus() : tailFocusProxyRef.current?.focus();
166
- }
167
- }
168
- };
169
- viewport.addEventListener("keydown", handleKeyDown);
170
- return ()=>viewport.removeEventListener("keydown", handleKeyDown);
171
- }
172
- }, [
173
- getItems,
174
- getSortedTabbableCandidates
175
- ]);
176
- return /* @__PURE__ */ jsxs(Branch, {
177
- ref: wrapperRef,
178
- role: "region",
179
- "aria-label": label.replace("{hotkey}", hotkeyLabel),
180
- tabIndex: -1,
181
- style: {
182
- pointerEvents: hasToasts ? void 0 : "none"
183
- },
184
- children: [
185
- hasToasts && /* @__PURE__ */ jsx(FocusProxy, {
186
- ref: headFocusProxyRef,
187
- onFocusFromOutsideViewport: ()=>{
188
- const tabbableCandidates = getSortedTabbableCandidates({
189
- tabbingDirection: "forwards"
190
- });
191
- focusFirst(tabbableCandidates);
192
- }
193
- }),
194
- /* @__PURE__ */ jsx(Collection.Slot, {
195
- scope: __scopeToast,
196
- children: /* @__PURE__ */ jsx(Primitive.ol, {
197
- tabIndex: -1,
198
- ...viewportProps,
199
- ref: composedRefs
200
- })
201
- }),
202
- hasToasts && /* @__PURE__ */ jsx(FocusProxy, {
203
- ref: tailFocusProxyRef,
204
- onFocusFromOutsideViewport: ()=>{
205
- const tabbableCandidates = getSortedTabbableCandidates({
206
- tabbingDirection: "backwards"
207
- });
208
- focusFirst(tabbableCandidates);
209
- }
210
- })
211
- ]
212
- });
213
- });
214
- ToastViewport$1.displayName = VIEWPORT_NAME;
215
- var FOCUS_PROXY_NAME = "ToastFocusProxy";
216
- var FocusProxy = React.forwardRef((props, forwardedRef)=>{
217
- const { __scopeToast, onFocusFromOutsideViewport, ...proxyProps } = props;
218
- const context = useToastProviderContext(FOCUS_PROXY_NAME, __scopeToast);
219
- return /* @__PURE__ */ jsx(VisuallyHidden, {
220
- tabIndex: 0,
221
- ...proxyProps,
222
- ref: forwardedRef,
223
- style: {
224
- position: "fixed"
225
- },
226
- onFocus: (event)=>{
227
- const prevFocusedElement = event.relatedTarget;
228
- const isFocusFromOutsideViewport = !context.viewport?.contains(prevFocusedElement);
229
- if (isFocusFromOutsideViewport) onFocusFromOutsideViewport();
230
- }
231
- });
232
- });
233
- FocusProxy.displayName = FOCUS_PROXY_NAME;
234
- var TOAST_NAME = "Toast";
235
- var TOAST_SWIPE_START = "toast.swipeStart";
236
- var TOAST_SWIPE_MOVE = "toast.swipeMove";
237
- var TOAST_SWIPE_CANCEL = "toast.swipeCancel";
238
- var TOAST_SWIPE_END = "toast.swipeEnd";
239
- var Toast$1 = React.forwardRef((props, forwardedRef)=>{
240
- const { forceMount, open: openProp, defaultOpen, onOpenChange, ...toastProps } = props;
241
- const [open, setOpen] = useControllableState({
242
- prop: openProp,
243
- defaultProp: defaultOpen ?? true,
244
- onChange: onOpenChange,
245
- caller: TOAST_NAME
246
- });
247
- return /* @__PURE__ */ jsx(Presence, {
248
- present: forceMount || open,
249
- children: /* @__PURE__ */ jsx(ToastImpl, {
250
- open,
251
- ...toastProps,
252
- ref: forwardedRef,
253
- onClose: ()=>setOpen(false),
254
- onPause: useCallbackRef(props.onPause),
255
- onResume: useCallbackRef(props.onResume),
256
- onSwipeStart: composeEventHandlers(props.onSwipeStart, (event)=>{
257
- event.currentTarget.setAttribute("data-swipe", "start");
258
- }),
259
- onSwipeMove: composeEventHandlers(props.onSwipeMove, (event)=>{
260
- const { x, y } = event.detail.delta;
261
- event.currentTarget.setAttribute("data-swipe", "move");
262
- event.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${x}px`);
263
- event.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${y}px`);
264
- }),
265
- onSwipeCancel: composeEventHandlers(props.onSwipeCancel, (event)=>{
266
- event.currentTarget.setAttribute("data-swipe", "cancel");
267
- event.currentTarget.style.removeProperty("--radix-toast-swipe-move-x");
268
- event.currentTarget.style.removeProperty("--radix-toast-swipe-move-y");
269
- event.currentTarget.style.removeProperty("--radix-toast-swipe-end-x");
270
- event.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
271
- }),
272
- onSwipeEnd: composeEventHandlers(props.onSwipeEnd, (event)=>{
273
- const { x, y } = event.detail.delta;
274
- event.currentTarget.setAttribute("data-swipe", "end");
275
- event.currentTarget.style.removeProperty("--radix-toast-swipe-move-x");
276
- event.currentTarget.style.removeProperty("--radix-toast-swipe-move-y");
277
- event.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${x}px`);
278
- event.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${y}px`);
279
- setOpen(false);
280
- })
281
- })
282
- });
283
- });
284
- Toast$1.displayName = TOAST_NAME;
285
- var [ToastInteractiveProvider, useToastInteractiveContext] = createToastContext(TOAST_NAME, {
286
- onClose () {}
287
- });
288
- var ToastImpl = React.forwardRef((props, forwardedRef)=>{
289
- const { __scopeToast, type = "foreground", duration: durationProp, open, onClose, onEscapeKeyDown, onPause, onResume, onSwipeStart, onSwipeMove, onSwipeCancel, onSwipeEnd, ...toastProps } = props;
290
- const context = useToastProviderContext(TOAST_NAME, __scopeToast);
291
- const [node, setNode] = React.useState(null);
292
- const composedRefs = useComposedRefs(forwardedRef, (node2)=>setNode(node2));
293
- const pointerStartRef = React.useRef(null);
294
- const swipeDeltaRef = React.useRef(null);
295
- const duration = durationProp || context.duration;
296
- const closeTimerStartTimeRef = React.useRef(0);
297
- const closeTimerRemainingTimeRef = React.useRef(duration);
298
- const closeTimerRef = React.useRef(0);
299
- const { onToastAdd, onToastRemove } = context;
300
- const handleClose = useCallbackRef(()=>{
301
- const isFocusInToast = node?.contains(document.activeElement);
302
- if (isFocusInToast) context.viewport?.focus();
303
- onClose();
304
- });
305
- const startTimer = React.useCallback((duration2)=>{
306
- if (!duration2 || duration2 === Infinity) return;
307
- window.clearTimeout(closeTimerRef.current);
308
- closeTimerStartTimeRef.current = /* @__PURE__ */ new Date().getTime();
309
- closeTimerRef.current = window.setTimeout(handleClose, duration2);
310
- }, [
311
- handleClose
312
- ]);
313
- React.useEffect(()=>{
314
- const viewport = context.viewport;
315
- if (viewport) {
316
- const handleResume = ()=>{
317
- startTimer(closeTimerRemainingTimeRef.current);
318
- onResume?.();
319
- };
320
- const handlePause = ()=>{
321
- const elapsedTime = /* @__PURE__ */ new Date().getTime() - closeTimerStartTimeRef.current;
322
- closeTimerRemainingTimeRef.current = closeTimerRemainingTimeRef.current - elapsedTime;
323
- window.clearTimeout(closeTimerRef.current);
324
- onPause?.();
325
- };
326
- viewport.addEventListener(VIEWPORT_PAUSE, handlePause);
327
- viewport.addEventListener(VIEWPORT_RESUME, handleResume);
328
- return ()=>{
329
- viewport.removeEventListener(VIEWPORT_PAUSE, handlePause);
330
- viewport.removeEventListener(VIEWPORT_RESUME, handleResume);
331
- };
332
- }
333
- }, [
334
- context.viewport,
335
- duration,
336
- onPause,
337
- onResume,
338
- startTimer
339
- ]);
340
- React.useEffect(()=>{
341
- if (open && !context.isClosePausedRef.current) startTimer(duration);
342
- }, [
343
- open,
344
- duration,
345
- context.isClosePausedRef,
346
- startTimer
347
- ]);
348
- React.useEffect(()=>{
349
- onToastAdd();
350
- return ()=>onToastRemove();
351
- }, [
352
- onToastAdd,
353
- onToastRemove
354
- ]);
355
- const announceTextContent = React.useMemo(()=>{
356
- return node ? getAnnounceTextContent(node) : null;
357
- }, [
358
- node
359
- ]);
360
- if (!context.viewport) return null;
361
- return /* @__PURE__ */ jsxs(Fragment, {
362
- children: [
363
- announceTextContent && /* @__PURE__ */ jsx(ToastAnnounce, {
364
- __scopeToast,
365
- role: "status",
366
- "aria-live": type === "foreground" ? "assertive" : "polite",
367
- children: announceTextContent
368
- }),
369
- /* @__PURE__ */ jsx(ToastInteractiveProvider, {
370
- scope: __scopeToast,
371
- onClose: handleClose,
372
- children: ReactDOM.createPortal(/* @__PURE__ */ jsx(Collection.ItemSlot, {
373
- scope: __scopeToast,
374
- children: /* @__PURE__ */ jsx(Root, {
375
- asChild: true,
376
- onEscapeKeyDown: composeEventHandlers(onEscapeKeyDown, ()=>{
377
- if (!context.isFocusedToastEscapeKeyDownRef.current) handleClose();
378
- context.isFocusedToastEscapeKeyDownRef.current = false;
379
- }),
380
- children: /* @__PURE__ */ jsx(Primitive.li, {
381
- tabIndex: 0,
382
- "data-state": open ? "open" : "closed",
383
- "data-swipe-direction": context.swipeDirection,
384
- ...toastProps,
385
- ref: composedRefs,
386
- style: {
387
- userSelect: "none",
388
- touchAction: "none",
389
- ...props.style
390
- },
391
- onKeyDown: composeEventHandlers(props.onKeyDown, (event)=>{
392
- if (event.key !== "Escape") return;
393
- onEscapeKeyDown?.(event.nativeEvent);
394
- if (!event.nativeEvent.defaultPrevented) {
395
- context.isFocusedToastEscapeKeyDownRef.current = true;
396
- handleClose();
397
- }
398
- }),
399
- onPointerDown: composeEventHandlers(props.onPointerDown, (event)=>{
400
- if (event.button !== 0) return;
401
- pointerStartRef.current = {
402
- x: event.clientX,
403
- y: event.clientY
404
- };
405
- }),
406
- onPointerMove: composeEventHandlers(props.onPointerMove, (event)=>{
407
- if (!pointerStartRef.current) return;
408
- const x = event.clientX - pointerStartRef.current.x;
409
- const y = event.clientY - pointerStartRef.current.y;
410
- const hasSwipeMoveStarted = Boolean(swipeDeltaRef.current);
411
- const isHorizontalSwipe = [
412
- "left",
413
- "right"
414
- ].includes(context.swipeDirection);
415
- const clamp = [
416
- "left",
417
- "up"
418
- ].includes(context.swipeDirection) ? Math.min : Math.max;
419
- const clampedX = isHorizontalSwipe ? clamp(0, x) : 0;
420
- const clampedY = !isHorizontalSwipe ? clamp(0, y) : 0;
421
- const moveStartBuffer = event.pointerType === "touch" ? 10 : 2;
422
- const delta = {
423
- x: clampedX,
424
- y: clampedY
425
- };
426
- const eventDetail = {
427
- originalEvent: event,
428
- delta
429
- };
430
- if (hasSwipeMoveStarted) {
431
- swipeDeltaRef.current = delta;
432
- handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE, onSwipeMove, eventDetail, {
433
- discrete: false
434
- });
435
- } else if (isDeltaInDirection(delta, context.swipeDirection, moveStartBuffer)) {
436
- swipeDeltaRef.current = delta;
437
- handleAndDispatchCustomEvent(TOAST_SWIPE_START, onSwipeStart, eventDetail, {
438
- discrete: false
439
- });
440
- event.target.setPointerCapture(event.pointerId);
441
- } else if (Math.abs(x) > moveStartBuffer || Math.abs(y) > moveStartBuffer) {
442
- pointerStartRef.current = null;
443
- }
444
- }),
445
- onPointerUp: composeEventHandlers(props.onPointerUp, (event)=>{
446
- const delta = swipeDeltaRef.current;
447
- const target = event.target;
448
- if (target.hasPointerCapture(event.pointerId)) {
449
- target.releasePointerCapture(event.pointerId);
450
- }
451
- swipeDeltaRef.current = null;
452
- pointerStartRef.current = null;
453
- if (delta) {
454
- const toast = event.currentTarget;
455
- const eventDetail = {
456
- originalEvent: event,
457
- delta
458
- };
459
- if (isDeltaInDirection(delta, context.swipeDirection, context.swipeThreshold)) {
460
- handleAndDispatchCustomEvent(TOAST_SWIPE_END, onSwipeEnd, eventDetail, {
461
- discrete: true
462
- });
463
- } else {
464
- handleAndDispatchCustomEvent(TOAST_SWIPE_CANCEL, onSwipeCancel, eventDetail, {
465
- discrete: true
466
- });
467
- }
468
- toast.addEventListener("click", (event2)=>event2.preventDefault(), {
469
- once: true
470
- });
471
- }
472
- })
473
- })
474
- })
475
- }), context.viewport)
476
- })
477
- ]
478
- });
479
- });
480
- var ToastAnnounce = (props)=>{
481
- const { __scopeToast, children, ...announceProps } = props;
482
- const context = useToastProviderContext(TOAST_NAME, __scopeToast);
483
- const [renderAnnounceText, setRenderAnnounceText] = React.useState(false);
484
- const [isAnnounced, setIsAnnounced] = React.useState(false);
485
- useNextFrame(()=>setRenderAnnounceText(true));
486
- React.useEffect(()=>{
487
- const timer = window.setTimeout(()=>setIsAnnounced(true), 1e3);
488
- return ()=>window.clearTimeout(timer);
489
- }, []);
490
- return isAnnounced ? null : /* @__PURE__ */ jsx(Portal, {
491
- asChild: true,
492
- children: /* @__PURE__ */ jsx(VisuallyHidden, {
493
- ...announceProps,
494
- children: renderAnnounceText && /* @__PURE__ */ jsxs(Fragment, {
495
- children: [
496
- context.label,
497
- " ",
498
- children
499
- ]
500
- })
501
- })
502
- });
503
- };
504
- var TITLE_NAME = "ToastTitle";
505
- var ToastTitle$1 = React.forwardRef((props, forwardedRef)=>{
506
- const { __scopeToast, ...titleProps } = props;
507
- return /* @__PURE__ */ jsx(Primitive.div, {
508
- ...titleProps,
509
- ref: forwardedRef
510
- });
511
- });
512
- ToastTitle$1.displayName = TITLE_NAME;
513
- var DESCRIPTION_NAME = "ToastDescription";
514
- var ToastDescription$1 = React.forwardRef((props, forwardedRef)=>{
515
- const { __scopeToast, ...descriptionProps } = props;
516
- return /* @__PURE__ */ jsx(Primitive.div, {
517
- ...descriptionProps,
518
- ref: forwardedRef
519
- });
520
- });
521
- ToastDescription$1.displayName = DESCRIPTION_NAME;
522
- var ACTION_NAME = "ToastAction";
523
- var ToastAction$1 = React.forwardRef((props, forwardedRef)=>{
524
- const { altText, ...actionProps } = props;
525
- if (!altText.trim()) {
526
- console.error(`Invalid prop \`altText\` supplied to \`${ACTION_NAME}\`. Expected non-empty \`string\`.`);
527
- return null;
528
- }
529
- return /* @__PURE__ */ jsx(ToastAnnounceExclude, {
530
- altText,
531
- asChild: true,
532
- children: /* @__PURE__ */ jsx(ToastClose$1, {
533
- ...actionProps,
534
- ref: forwardedRef
535
- })
536
- });
537
- });
538
- ToastAction$1.displayName = ACTION_NAME;
539
- var CLOSE_NAME = "ToastClose";
540
- var ToastClose$1 = React.forwardRef((props, forwardedRef)=>{
541
- const { __scopeToast, ...closeProps } = props;
542
- const interactiveContext = useToastInteractiveContext(CLOSE_NAME, __scopeToast);
543
- return /* @__PURE__ */ jsx(ToastAnnounceExclude, {
544
- asChild: true,
545
- children: /* @__PURE__ */ jsx(Primitive.button, {
546
- type: "button",
547
- ...closeProps,
548
- ref: forwardedRef,
549
- onClick: composeEventHandlers(props.onClick, interactiveContext.onClose)
550
- })
551
- });
552
- });
553
- ToastClose$1.displayName = CLOSE_NAME;
554
- var ToastAnnounceExclude = React.forwardRef((props, forwardedRef)=>{
555
- const { __scopeToast, altText, ...announceExcludeProps } = props;
556
- return /* @__PURE__ */ jsx(Primitive.div, {
557
- "data-radix-toast-announce-exclude": "",
558
- "data-radix-toast-announce-alt": altText || void 0,
559
- ...announceExcludeProps,
560
- ref: forwardedRef
561
- });
562
- });
563
- function getAnnounceTextContent(container) {
564
- const textContent = [];
565
- const childNodes = Array.from(container.childNodes);
566
- childNodes.forEach((node)=>{
567
- if (node.nodeType === node.TEXT_NODE && node.textContent) textContent.push(node.textContent);
568
- if (isHTMLElement(node)) {
569
- const isHidden = node.ariaHidden || node.hidden || node.style.display === "none";
570
- const isExcluded = node.dataset.radixToastAnnounceExclude === "";
571
- if (!isHidden) {
572
- if (isExcluded) {
573
- const altText = node.dataset.radixToastAnnounceAlt;
574
- if (altText) textContent.push(altText);
575
- } else {
576
- textContent.push(...getAnnounceTextContent(node));
577
- }
578
- }
579
- }
580
- });
581
- return textContent;
582
- }
583
- function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
584
- const currentTarget = detail.originalEvent.currentTarget;
585
- const event = new CustomEvent(name, {
586
- bubbles: true,
587
- cancelable: true,
588
- detail
589
- });
590
- if (handler) currentTarget.addEventListener(name, handler, {
591
- once: true
592
- });
593
- if (discrete) {
594
- dispatchDiscreteCustomEvent(currentTarget, event);
595
- } else {
596
- currentTarget.dispatchEvent(event);
597
- }
598
- }
599
- var isDeltaInDirection = (delta, direction, threshold = 0)=>{
600
- const deltaX = Math.abs(delta.x);
601
- const deltaY = Math.abs(delta.y);
602
- const isDeltaX = deltaX > deltaY;
603
- if (direction === "left" || direction === "right") {
604
- return isDeltaX && deltaX > threshold;
605
- } else {
606
- return !isDeltaX && deltaY > threshold;
607
- }
608
- };
609
- function useNextFrame(callback = ()=>{}) {
610
- const fn = useCallbackRef(callback);
611
- useLayoutEffect2(()=>{
612
- let raf1 = 0;
613
- let raf2 = 0;
614
- raf1 = window.requestAnimationFrame(()=>raf2 = window.requestAnimationFrame(fn));
615
- return ()=>{
616
- window.cancelAnimationFrame(raf1);
617
- window.cancelAnimationFrame(raf2);
618
- };
619
- }, [
620
- fn
621
- ]);
622
- }
623
- function isHTMLElement(node) {
624
- return node.nodeType === node.ELEMENT_NODE;
625
- }
626
- function getTabbableCandidates(container) {
627
- const nodes = [];
628
- const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
629
- acceptNode: (node)=>{
630
- const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
631
- if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
632
- return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
633
- }
634
- });
635
- while(walker.nextNode())nodes.push(walker.currentNode);
636
- return nodes;
637
- }
638
- function focusFirst(candidates) {
639
- const previouslyFocusedElement = document.activeElement;
640
- return candidates.some((candidate)=>{
641
- if (candidate === previouslyFocusedElement) return true;
642
- candidate.focus();
643
- return document.activeElement !== previouslyFocusedElement;
644
- });
645
- }
646
- var Provider = ToastProvider$1;
647
- var Viewport = ToastViewport$1;
648
- var Root2 = Toast$1;
649
- var Title = ToastTitle$1;
650
- var Description = ToastDescription$1;
651
- var Action = ToastAction$1;
652
- var Close = ToastClose$1;
653
-
654
- const ToastProvider = Provider;
655
- const ToastViewport = ({ className, ...props })=>/*#__PURE__*/ React__default.createElement(Viewport, {
656
- "data-slot": "toast-viewport",
657
- className: cn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]", className),
658
- ...props
659
- });
660
- const toastVariants = cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", {
661
- variants: {
662
- variant: {
663
- default: "border bg-background text-foreground",
664
- destructive: "destructive group border-destructive-foreground bg-destructive-foreground text-destructive border-destructive"
665
- }
666
- },
667
- defaultVariants: {
668
- variant: "default"
669
- }
670
- });
671
- const Toast = ({ className, variant, ...props })=>{
672
- return /*#__PURE__*/ React__default.createElement(Root2, {
673
- "data-slot": "toast-root",
674
- className: cn(toastVariants({
675
- variant
676
- }), className),
677
- ...props
678
- });
679
- };
680
- const ToastAction = ({ className, ...props })=>/*#__PURE__*/ React__default.createElement(Action, {
681
- "data-slot": "toast-action",
682
- className: cn("ring-offset-background hover:bg-secondary focus:ring-ring group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none disabled:opacity-50", className),
683
- ...props
684
- });
685
- const ToastClose = ({ className, ...props })=>/*#__PURE__*/ React__default.createElement(Close, {
686
- "data-slot": "toast-close",
687
- className: cn("text-foreground/50 hover:text-foreground absolute top-2 right-2 rounded-md p-1 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:ring-2 focus:outline-none group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", className),
688
- "toast-close": "",
689
- ...props
690
- }, /*#__PURE__*/ React__default.createElement(X, {
691
- className: "h-4 w-4"
692
- }));
693
- const ToastTitle = ({ className, ...props })=>/*#__PURE__*/ React__default.createElement(Title, {
694
- "data-slot": "toast-title",
695
- className: cn("text-sm font-semibold", className),
696
- ...props
697
- });
698
- const ToastDescription = ({ className, ...props })=>/*#__PURE__*/ React__default.createElement(Description, {
699
- "data-slot": "toast-description",
700
- className: cn("text-sm opacity-90", className),
701
- ...props
702
- });
703
-
704
- export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport };
6
+ import 'react/jsx-runtime';
7
+ import '../chunks/index-CVjOpozG.mjs';
8
+ import '@radix-ui/react-collection';
9
+ import '../chunks/index-CvVBB5ll.mjs';
10
+ import '../chunks/index-Cs9A0tpU.mjs';
11
+ import '../chunks/index-DQD35Ges.mjs';
12
+ import '../chunks/index-4pJ77hyF.mjs';
13
+ import '../chunks/index-CByz7d8q.mjs';
14
+ import '../chunks/index-D2DYiX9D.mjs';
15
+ import '../chunks/index-Ct610FOk.mjs';
16
+ import 'class-variance-authority';
17
+ import '../chunks/utils-uOfHPBdi.mjs';
18
+ import '../chunks/bundle-mjs-BRbxNcQb.mjs';
19
+ import '../chunks/x-D5HL_X5m.mjs';
20
+ import '../chunks/createLucideIcon-CkP7424r.mjs';
705
21
  //# sourceMappingURL=index.mjs.map