erp-pro-ui 0.2.6 → 0.2.7

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 (422) hide show
  1. package/dist/accordion.cjs +1 -1
  2. package/dist/accordion.mjs +1 -1
  3. package/dist/alert.cjs +1 -1
  4. package/dist/alert.mjs +1 -1
  5. package/dist/animated-content.cjs +1 -1
  6. package/dist/animated-content.mjs +1 -1
  7. package/dist/ascii-text.cjs +1 -1
  8. package/dist/ascii-text.mjs +1 -1
  9. package/dist/background-gradient-animation.cjs +1 -1
  10. package/dist/background-gradient-animation.mjs +1 -1
  11. package/dist/button-hover-border-gradient.cjs +1 -1
  12. package/dist/button-hover-border-gradient.mjs +1 -1
  13. package/dist/button.cjs +1 -1
  14. package/dist/button.mjs +1 -1
  15. package/dist/calendar.cjs +1 -1
  16. package/dist/calendar.mjs +1 -1
  17. package/dist/card.cjs +1 -1
  18. package/dist/card.mjs +1 -1
  19. package/dist/carousel.cjs +1 -1
  20. package/dist/carousel.mjs +1 -1
  21. package/dist/catalog.cjs +7 -0
  22. package/dist/catalog.cjs.map +1 -1
  23. package/dist/catalog.d.ts +13 -1
  24. package/dist/catalog.d.ts.map +1 -1
  25. package/dist/catalog.mjs +7 -0
  26. package/dist/catalog.mjs.map +1 -1
  27. package/dist/charts.cjs +1 -1
  28. package/dist/charts.mjs +1 -1
  29. package/dist/checkbox.cjs +1 -1
  30. package/dist/checkbox.mjs +1 -1
  31. package/dist/chip.cjs +1 -1
  32. package/dist/chip.mjs +1 -1
  33. package/dist/chroma-grid.cjs +1 -1
  34. package/dist/chroma-grid.mjs +1 -1
  35. package/dist/chunks/{Drawer-Y0_sJni5.mjs → Drawer-BhTTQV8Q.mjs} +2 -2
  36. package/dist/chunks/{Drawer-Y0_sJni5.mjs.map → Drawer-BhTTQV8Q.mjs.map} +1 -1
  37. package/dist/chunks/{Drawer-D72Xi2Gq.cjs → Drawer-C_DLqrus.cjs} +2 -3
  38. package/dist/chunks/{Drawer-D72Xi2Gq.cjs.map → Drawer-C_DLqrus.cjs.map} +1 -1
  39. package/dist/chunks/{DropdownMenu-BQ4WlaGp.mjs → DropdownMenu-B18BI5l7.mjs} +2 -2
  40. package/dist/chunks/{DropdownMenu-BQ4WlaGp.mjs.map → DropdownMenu-B18BI5l7.mjs.map} +1 -1
  41. package/dist/chunks/{DropdownMenu-yh04burS.cjs → DropdownMenu-CEmlmX7P.cjs} +2 -3
  42. package/dist/chunks/{DropdownMenu-yh04burS.cjs.map → DropdownMenu-CEmlmX7P.cjs.map} +1 -1
  43. package/dist/chunks/{HoverBorderGradient-DEtm3owk.mjs → HoverBorderGradient-CGKcviEd.mjs} +2 -2
  44. package/dist/chunks/{HoverBorderGradient-DEtm3owk.mjs.map → HoverBorderGradient-CGKcviEd.mjs.map} +1 -1
  45. package/dist/chunks/{HoverBorderGradient-DMMyr2L3.cjs → HoverBorderGradient-DTKasFZO.cjs} +2 -3
  46. package/dist/chunks/{HoverBorderGradient-DMMyr2L3.cjs.map → HoverBorderGradient-DTKasFZO.cjs.map} +1 -1
  47. package/dist/chunks/{SunToMoonButton-BOKHzC1H.mjs → SunToMoonButton-DIMK53fW.mjs} +2 -2
  48. package/dist/chunks/{SunToMoonButton-BOKHzC1H.mjs.map → SunToMoonButton-DIMK53fW.mjs.map} +1 -1
  49. package/dist/chunks/{SunToMoonButton-gX4Kk_5B.cjs → SunToMoonButton-DUuIqw22.cjs} +2 -3
  50. package/dist/chunks/{SunToMoonButton-gX4Kk_5B.cjs.map → SunToMoonButton-DUuIqw22.cjs.map} +1 -1
  51. package/dist/chunks/{Tooltip-nnaiqJTT.cjs → Tooltip-1yPGRJ2Q.cjs} +1 -2
  52. package/dist/chunks/{Tooltip-nnaiqJTT.cjs.map → Tooltip-1yPGRJ2Q.cjs.map} +1 -1
  53. package/dist/chunks/{Tooltip-LbOKP__2.mjs → Tooltip-CEj-I4JO.mjs} +1 -1
  54. package/dist/chunks/{Tooltip-LbOKP__2.mjs.map → Tooltip-CEj-I4JO.mjs.map} +1 -1
  55. package/dist/chunks/{accordion-CLcjNX_X.mjs → accordion-Cf-Q3rec.mjs} +2 -2
  56. package/dist/chunks/{accordion-CLcjNX_X.mjs.map → accordion-Cf-Q3rec.mjs.map} +1 -1
  57. package/dist/chunks/{accordion-Bj3Sj0mC.cjs → accordion-X4PNqWkW.cjs} +2 -3
  58. package/dist/chunks/{accordion-Bj3Sj0mC.cjs.map → accordion-X4PNqWkW.cjs.map} +1 -1
  59. package/dist/chunks/{alert-BBA4Sh4e.cjs → alert-BEMULPIi.cjs} +2 -3
  60. package/dist/chunks/{alert-BBA4Sh4e.cjs.map → alert-BEMULPIi.cjs.map} +1 -1
  61. package/dist/chunks/{alert-oUz79MGc.mjs → alert-GImBqaCY.mjs} +2 -2
  62. package/dist/chunks/{alert-oUz79MGc.mjs.map → alert-GImBqaCY.mjs.map} +1 -1
  63. package/dist/chunks/{animated-content-CiNJLgbq.mjs → animated-content-Bp-Yt0_7.mjs} +1 -1
  64. package/dist/chunks/{animated-content-CiNJLgbq.mjs.map → animated-content-Bp-Yt0_7.mjs.map} +1 -1
  65. package/dist/chunks/{animated-content-B3wbiWQI.cjs → animated-content-tSHXDZq2.cjs} +1 -2
  66. package/dist/chunks/{animated-content-B3wbiWQI.cjs.map → animated-content-tSHXDZq2.cjs.map} +1 -1
  67. package/dist/chunks/{ascii-text-KwVE41Hw.cjs → ascii-text-Ctua6ucZ.cjs} +2 -2
  68. package/dist/chunks/{ascii-text-KwVE41Hw.cjs.map → ascii-text-Ctua6ucZ.cjs.map} +1 -1
  69. package/dist/chunks/{ascii-text-C6JegLhP.mjs → ascii-text-QyP7JU7g.mjs} +1 -1
  70. package/dist/chunks/{ascii-text-C6JegLhP.mjs.map → ascii-text-QyP7JU7g.mjs.map} +1 -1
  71. package/dist/chunks/{background-gradient-animation-CTc2ZR74.mjs → background-gradient-animation-CZUD_aq2.mjs} +2 -2
  72. package/dist/chunks/{background-gradient-animation-CTc2ZR74.mjs.map → background-gradient-animation-CZUD_aq2.mjs.map} +1 -1
  73. package/dist/chunks/{background-gradient-animation-1LZY3DYT.cjs → background-gradient-animation-PvM0i88k.cjs} +2 -3
  74. package/dist/chunks/{background-gradient-animation-1LZY3DYT.cjs.map → background-gradient-animation-PvM0i88k.cjs.map} +1 -1
  75. package/dist/chunks/{button-IDShmQqA.mjs → button-CAU9ej3h.mjs} +2 -2
  76. package/dist/chunks/{button-IDShmQqA.mjs.map → button-CAU9ej3h.mjs.map} +1 -1
  77. package/dist/chunks/{button-uD87K76W.cjs → button-D2ZYmVda.cjs} +2 -3
  78. package/dist/chunks/{button-uD87K76W.cjs.map → button-D2ZYmVda.cjs.map} +1 -1
  79. package/dist/chunks/{button-hover-border-gradient-DGZqd8je.cjs → button-hover-border-gradient-D12Zjmd3.cjs} +2 -3
  80. package/dist/chunks/{button-hover-border-gradient-DGZqd8je.cjs.map → button-hover-border-gradient-D12Zjmd3.cjs.map} +1 -1
  81. package/dist/chunks/{button-hover-border-gradient-B2ebbDek.mjs → button-hover-border-gradient-VNEg4V0o.mjs} +2 -2
  82. package/dist/chunks/{button-hover-border-gradient-B2ebbDek.mjs.map → button-hover-border-gradient-VNEg4V0o.mjs.map} +1 -1
  83. package/dist/chunks/calendar-BlUhssD4.mjs +203 -0
  84. package/dist/chunks/calendar-BlUhssD4.mjs.map +1 -0
  85. package/dist/chunks/calendar-CdKKhdx5.cjs +208 -0
  86. package/dist/chunks/calendar-CdKKhdx5.cjs.map +1 -0
  87. package/dist/chunks/{card-Cuud0jIt.cjs → card-C_Qr7E6E.cjs} +1 -2
  88. package/dist/chunks/{card-Cuud0jIt.cjs.map → card-C_Qr7E6E.cjs.map} +1 -1
  89. package/dist/chunks/{card-DNeC6jqk.mjs → card-DYHDNCPK.mjs} +1 -1
  90. package/dist/chunks/{card-DNeC6jqk.mjs.map → card-DYHDNCPK.mjs.map} +1 -1
  91. package/dist/chunks/{carousel-xHkrV_pt.cjs → carousel-DtOJEbEU.cjs} +4 -5
  92. package/dist/chunks/{carousel-xHkrV_pt.cjs.map → carousel-DtOJEbEU.cjs.map} +1 -1
  93. package/dist/chunks/{carousel-Dpe5QLJK.mjs → carousel-eeqWZZHE.mjs} +4 -4
  94. package/dist/chunks/{carousel-Dpe5QLJK.mjs.map → carousel-eeqWZZHE.mjs.map} +1 -1
  95. package/dist/chunks/{chartStyles-BADmRKZo.cjs → chartStyles-2mTluDoo.cjs} +1 -1
  96. package/dist/chunks/{chartStyles-BADmRKZo.cjs.map → chartStyles-2mTluDoo.cjs.map} +1 -1
  97. package/dist/chunks/{chartStyles-DPXgYmGn.mjs → chartStyles-DrHVYS5N.mjs} +1 -1
  98. package/dist/chunks/{chartStyles-DPXgYmGn.mjs.map → chartStyles-DrHVYS5N.mjs.map} +1 -1
  99. package/dist/chunks/{charts-COx3IbI2.cjs → charts-DMu4zp8j.cjs} +4 -4
  100. package/dist/chunks/{charts-COx3IbI2.cjs.map → charts-DMu4zp8j.cjs.map} +1 -1
  101. package/dist/chunks/{charts-C-KQ3Nk5.mjs → charts-DlskmT1J.mjs} +3 -3
  102. package/dist/chunks/{charts-C-KQ3Nk5.mjs.map → charts-DlskmT1J.mjs.map} +1 -1
  103. package/dist/chunks/{checkbox-Y04NlzB8.mjs → checkbox-D7EJQbqC.mjs} +1 -1
  104. package/dist/chunks/{checkbox-Y04NlzB8.mjs.map → checkbox-D7EJQbqC.mjs.map} +1 -1
  105. package/dist/chunks/{checkbox-CDknzh89.cjs → checkbox-Lw2UqyNE.cjs} +1 -2
  106. package/dist/chunks/{checkbox-CDknzh89.cjs.map → checkbox-Lw2UqyNE.cjs.map} +1 -1
  107. package/dist/chunks/{chip-sfQlzrbo.cjs → chip-D5i9VT9O.cjs} +4 -5
  108. package/dist/chunks/{chip-sfQlzrbo.cjs.map → chip-D5i9VT9O.cjs.map} +1 -1
  109. package/dist/chunks/{chip-B3j6R6sO.mjs → chip-DBlSQcqR.mjs} +4 -4
  110. package/dist/chunks/{chip-B3j6R6sO.mjs.map → chip-DBlSQcqR.mjs.map} +1 -1
  111. package/dist/chunks/{chroma-grid-Bp55pKEm.cjs → chroma-grid-CTDtdFUm.cjs} +2 -3
  112. package/dist/chunks/{chroma-grid-Bp55pKEm.cjs.map → chroma-grid-CTDtdFUm.cjs.map} +1 -1
  113. package/dist/chunks/{chroma-grid-BHS9qAn_.mjs → chroma-grid-DuLTfGVP.mjs} +2 -2
  114. package/dist/chunks/{chroma-grid-BHS9qAn_.mjs.map → chroma-grid-DuLTfGVP.mjs.map} +1 -1
  115. package/dist/chunks/{color-palette-Duud5Iqq.cjs → color-palette-DQQ9UV0N.cjs} +2 -2
  116. package/dist/chunks/{color-palette-Duud5Iqq.cjs.map → color-palette-DQQ9UV0N.cjs.map} +1 -1
  117. package/dist/chunks/{color-palette-D9Qlw2Cx.mjs → color-palette-G1HUXWJP.mjs} +1 -1
  118. package/dist/chunks/{color-palette-D9Qlw2Cx.mjs.map → color-palette-G1HUXWJP.mjs.map} +1 -1
  119. package/dist/chunks/{combobox-C3a2iogC.cjs → combobox-CkNzH1YV.cjs} +6 -6
  120. package/dist/chunks/{combobox-C3a2iogC.cjs.map → combobox-CkNzH1YV.cjs.map} +1 -1
  121. package/dist/chunks/{combobox-neBItbtz.mjs → combobox-xNmFFHd6.mjs} +5 -5
  122. package/dist/chunks/{combobox-neBItbtz.mjs.map → combobox-xNmFFHd6.mjs.map} +1 -1
  123. package/dist/chunks/dashboard-cards-Bww66_5K.cjs +6570 -0
  124. package/dist/chunks/dashboard-cards-Bww66_5K.cjs.map +1 -0
  125. package/dist/chunks/dashboard-cards-lnifLEyj.mjs +6385 -0
  126. package/dist/chunks/dashboard-cards-lnifLEyj.mjs.map +1 -0
  127. package/dist/chunks/{data-table-BZEiSZI2.cjs → data-table-BCVbzkLo.cjs} +16 -17
  128. package/dist/chunks/{data-table-BZEiSZI2.cjs.map → data-table-BCVbzkLo.cjs.map} +1 -1
  129. package/dist/chunks/{data-table-EfGKkerd.mjs → data-table-C25KHEn4.mjs} +14 -15
  130. package/dist/chunks/{data-table-EfGKkerd.mjs.map → data-table-C25KHEn4.mjs.map} +1 -1
  131. package/dist/chunks/date-picker--cqsgsIV.mjs +587 -0
  132. package/dist/chunks/date-picker--cqsgsIV.mjs.map +1 -0
  133. package/dist/chunks/date-picker-BJQdFyqr.cjs +592 -0
  134. package/dist/chunks/date-picker-BJQdFyqr.cjs.map +1 -0
  135. package/dist/chunks/{dialog-B60BjJz0.mjs → dialog-BHIeG3Sg.mjs} +3 -3
  136. package/dist/chunks/{dialog-B60BjJz0.mjs.map → dialog-BHIeG3Sg.mjs.map} +1 -1
  137. package/dist/chunks/{dialog-i9LdkXmF.cjs → dialog-CLKU0cXX.cjs} +3 -4
  138. package/dist/chunks/{dialog-i9LdkXmF.cjs.map → dialog-CLKU0cXX.cjs.map} +1 -1
  139. package/dist/chunks/draggable-grid-2L_eHKfp.cjs +245 -0
  140. package/dist/chunks/draggable-grid-2L_eHKfp.cjs.map +1 -0
  141. package/dist/chunks/draggable-grid-IuCMSOsE.mjs +240 -0
  142. package/dist/chunks/draggable-grid-IuCMSOsE.mjs.map +1 -0
  143. package/dist/chunks/{event-calendar-BbFOUDov.mjs → event-calendar-CO2doGJW.mjs} +11 -11
  144. package/dist/chunks/{event-calendar-BbFOUDov.mjs.map → event-calendar-CO2doGJW.mjs.map} +1 -1
  145. package/dist/chunks/{event-calendar-Bljd_7PI.cjs → event-calendar-CvficOuV.cjs} +11 -12
  146. package/dist/chunks/{event-calendar-Bljd_7PI.cjs.map → event-calendar-CvficOuV.cjs.map} +1 -1
  147. package/dist/chunks/{form-DGwdlSW2.cjs → form-DARN6jtX.cjs} +1 -2
  148. package/dist/chunks/{form-DGwdlSW2.cjs.map → form-DARN6jtX.cjs.map} +1 -1
  149. package/dist/chunks/{form-CDc9UM3r.mjs → form-DNuFklNR.mjs} +1 -1
  150. package/dist/chunks/{form-CDc9UM3r.mjs.map → form-DNuFklNR.mjs.map} +1 -1
  151. package/dist/chunks/{gradual-blur-BNYVlqb1.cjs → gradual-blur-BBLbpXD4.cjs} +2 -3
  152. package/dist/chunks/{gradual-blur-BNYVlqb1.cjs.map → gradual-blur-BBLbpXD4.cjs.map} +1 -1
  153. package/dist/chunks/{gradual-blur-Bw2KNmXb.mjs → gradual-blur-BPx2MSWI.mjs} +2 -2
  154. package/dist/chunks/{gradual-blur-Bw2KNmXb.mjs.map → gradual-blur-BPx2MSWI.mjs.map} +1 -1
  155. package/dist/chunks/{hover-card-G66SUyjq.mjs → hover-card-BkVHGXz6.mjs} +1 -1
  156. package/dist/chunks/{hover-card-G66SUyjq.mjs.map → hover-card-BkVHGXz6.mjs.map} +1 -1
  157. package/dist/chunks/{hover-card-Dp6Y2h2J.cjs → hover-card-DwZFtu8w.cjs} +1 -2
  158. package/dist/chunks/{hover-card-Dp6Y2h2J.cjs.map → hover-card-DwZFtu8w.cjs.map} +1 -1
  159. package/dist/chunks/{icons-ub9iu-JG.cjs → icons-Ci8yEvvF.cjs} +48 -2
  160. package/dist/chunks/icons-Ci8yEvvF.cjs.map +1 -0
  161. package/dist/chunks/{icons-JzMKLygv.mjs → icons-CkVHNbbN.mjs} +43 -2
  162. package/dist/chunks/icons-CkVHNbbN.mjs.map +1 -0
  163. package/dist/chunks/{input-CRc3MKb_.mjs → input-B-XSdnfh.mjs} +4 -4
  164. package/dist/chunks/{input-CRc3MKb_.mjs.map → input-B-XSdnfh.mjs.map} +1 -1
  165. package/dist/chunks/{input-DMTwz27q.cjs → input-EH7x0pQY.cjs} +4 -5
  166. package/dist/chunks/{input-DMTwz27q.cjs.map → input-EH7x0pQY.cjs.map} +1 -1
  167. package/dist/chunks/{label-Bc_r54NU.mjs → label-CcsncrKQ.mjs} +1 -1
  168. package/dist/chunks/{label-Bc_r54NU.mjs.map → label-CcsncrKQ.mjs.map} +1 -1
  169. package/dist/chunks/{label-B5Ugq0Nk.cjs → label-Du-5H7wd.cjs} +1 -2
  170. package/dist/chunks/{label-B5Ugq0Nk.cjs.map → label-Du-5H7wd.cjs.map} +1 -1
  171. package/dist/chunks/{loading-ll2L6lc7.mjs → loading-2Lh_355V.mjs} +2 -2
  172. package/dist/chunks/{loading-ll2L6lc7.mjs.map → loading-2Lh_355V.mjs.map} +1 -1
  173. package/dist/chunks/{loading-DZKJc3e7.cjs → loading-DeGHTDO2.cjs} +2 -3
  174. package/dist/chunks/{loading-DZKJc3e7.cjs.map → loading-DeGHTDO2.cjs.map} +1 -1
  175. package/dist/chunks/{multi-select-combobox-C_8sxaiL.mjs → multi-select-combobox-BOdKmPj2.mjs} +4 -4
  176. package/dist/chunks/{multi-select-combobox-C_8sxaiL.mjs.map → multi-select-combobox-BOdKmPj2.mjs.map} +1 -1
  177. package/dist/chunks/{multi-select-combobox-CFJGq1hn.cjs → multi-select-combobox-PPYRcaPg.cjs} +5 -5
  178. package/dist/chunks/{multi-select-combobox-CFJGq1hn.cjs.map → multi-select-combobox-PPYRcaPg.cjs.map} +1 -1
  179. package/dist/chunks/{otp-input-BpcTJOmU.mjs → otp-input--_itTXaL.mjs} +1 -1
  180. package/dist/chunks/{otp-input-BpcTJOmU.mjs.map → otp-input--_itTXaL.mjs.map} +1 -1
  181. package/dist/chunks/{otp-input-B5-tuc0q.cjs → otp-input-Dgw_47Z7.cjs} +1 -2
  182. package/dist/chunks/{otp-input-B5-tuc0q.cjs.map → otp-input-Dgw_47Z7.cjs.map} +1 -1
  183. package/dist/chunks/{overlay-DzE_GyYf.cjs → overlay-15EzdrIu.cjs} +1 -2
  184. package/dist/chunks/{overlay-DzE_GyYf.cjs.map → overlay-15EzdrIu.cjs.map} +1 -1
  185. package/dist/chunks/{overlay-CG1dMYtO.mjs → overlay-BMbhF-EC.mjs} +1 -1
  186. package/dist/chunks/{overlay-CG1dMYtO.mjs.map → overlay-BMbhF-EC.mjs.map} +1 -1
  187. package/dist/chunks/{password-strength-meter-_o1T1HLO.cjs → password-strength-meter-Be1c-dnK.cjs} +2 -3
  188. package/dist/chunks/{password-strength-meter-_o1T1HLO.cjs.map → password-strength-meter-Be1c-dnK.cjs.map} +1 -1
  189. package/dist/chunks/{password-strength-meter-CH6uQAuK.mjs → password-strength-meter-Q1Qr-4tz.mjs} +2 -2
  190. package/dist/chunks/{password-strength-meter-CH6uQAuK.mjs.map → password-strength-meter-Q1Qr-4tz.mjs.map} +1 -1
  191. package/dist/chunks/{progress-bar-FfdFVvTT.cjs → progress-bar-BsnX079N.cjs} +3 -3
  192. package/dist/chunks/{progress-bar-FfdFVvTT.cjs.map → progress-bar-BsnX079N.cjs.map} +1 -1
  193. package/dist/chunks/{progress-bar-BAvRSW1b.mjs → progress-bar-l5WpbpZf.mjs} +2 -2
  194. package/dist/chunks/{progress-bar-BAvRSW1b.mjs.map → progress-bar-l5WpbpZf.mjs.map} +1 -1
  195. package/dist/chunks/{radio-BMOnxnUS.mjs → radio-B94_TGtz.mjs} +2 -2
  196. package/dist/chunks/{radio-BMOnxnUS.mjs.map → radio-B94_TGtz.mjs.map} +1 -1
  197. package/dist/chunks/{radio-wagafWwx.cjs → radio-W_NiS_dO.cjs} +2 -3
  198. package/dist/chunks/{radio-wagafWwx.cjs.map → radio-W_NiS_dO.cjs.map} +1 -1
  199. package/dist/chunks/{select-zFFyNmlY.cjs → select-C5lkcrSB.cjs} +5 -6
  200. package/dist/chunks/{select-zFFyNmlY.cjs.map → select-C5lkcrSB.cjs.map} +1 -1
  201. package/dist/chunks/{select--DeSgPdn.mjs → select-DnSSxddm.mjs} +5 -5
  202. package/dist/chunks/{select--DeSgPdn.mjs.map → select-DnSSxddm.mjs.map} +1 -1
  203. package/dist/chunks/{sidebar-oemmRzCL.mjs → sidebar-C3Sx87wD.mjs} +10 -11
  204. package/dist/chunks/{sidebar-oemmRzCL.mjs.map → sidebar-C3Sx87wD.mjs.map} +1 -1
  205. package/dist/chunks/{sidebar-Cq7UbKJT.cjs → sidebar-DDRWkz5k.cjs} +10 -12
  206. package/dist/chunks/{sidebar-Cq7UbKJT.cjs.map → sidebar-DDRWkz5k.cjs.map} +1 -1
  207. package/dist/chunks/{skeleton-DWvVc17T.cjs → skeleton-B2u9c1xJ.cjs} +2 -3
  208. package/dist/chunks/{skeleton-DWvVc17T.cjs.map → skeleton-B2u9c1xJ.cjs.map} +1 -1
  209. package/dist/chunks/{skeleton-BsDMlWZG.mjs → skeleton-DVAlrOq2.mjs} +2 -2
  210. package/dist/chunks/{skeleton-BsDMlWZG.mjs.map → skeleton-DVAlrOq2.mjs.map} +1 -1
  211. package/dist/chunks/{spinners-DlMcokJa.mjs → spinners-BQtIp2ov.mjs} +2 -2
  212. package/dist/chunks/{spinners-DlMcokJa.mjs.map → spinners-BQtIp2ov.mjs.map} +1 -1
  213. package/dist/chunks/{spinners-DBAJliAj.cjs → spinners-BiebALzS.cjs} +2 -3
  214. package/dist/chunks/{spinners-DBAJliAj.cjs.map → spinners-BiebALzS.cjs.map} +1 -1
  215. package/dist/chunks/{splash-cursor-CQ6_HwHV.cjs → splash-cursor-8b7ORB2k.cjs} +2 -3
  216. package/dist/chunks/{splash-cursor-CQ6_HwHV.cjs.map → splash-cursor-8b7ORB2k.cjs.map} +1 -1
  217. package/dist/chunks/{splash-cursor-Bb7LSzaO.mjs → splash-cursor-CeZffMed.mjs} +2 -2
  218. package/dist/chunks/{splash-cursor-Bb7LSzaO.mjs.map → splash-cursor-CeZffMed.mjs.map} +1 -1
  219. package/dist/chunks/{spotlight-card-COfSD7ns.cjs → spotlight-card-BQjp7hO1.cjs} +2 -3
  220. package/dist/chunks/{spotlight-card-COfSD7ns.cjs.map → spotlight-card-BQjp7hO1.cjs.map} +1 -1
  221. package/dist/chunks/{spotlight-card-Bs0iiSLc.mjs → spotlight-card-DiPtBCAK.mjs} +2 -2
  222. package/dist/chunks/{spotlight-card-Bs0iiSLc.mjs.map → spotlight-card-DiPtBCAK.mjs.map} +1 -1
  223. package/dist/chunks/{stepper-CTteR-Kj.cjs → stepper-BuhQfQTH.cjs} +5 -6
  224. package/dist/chunks/{stepper-CTteR-Kj.cjs.map → stepper-BuhQfQTH.cjs.map} +1 -1
  225. package/dist/chunks/{stepper-B9NdZ6ZV.mjs → stepper-CVNcexxq.mjs} +5 -5
  226. package/dist/chunks/{stepper-B9NdZ6ZV.mjs.map → stepper-CVNcexxq.mjs.map} +1 -1
  227. package/dist/chunks/{sun-to-moon-button-lt-1vmWm.cjs → sun-to-moon-button-BzYGFhrg.cjs} +4 -5
  228. package/dist/chunks/{sun-to-moon-button-lt-1vmWm.cjs.map → sun-to-moon-button-BzYGFhrg.cjs.map} +1 -1
  229. package/dist/chunks/{sun-to-moon-button-DWHDpP5B.mjs → sun-to-moon-button-CRXBMFZb.mjs} +4 -4
  230. package/dist/chunks/{sun-to-moon-button-DWHDpP5B.mjs.map → sun-to-moon-button-CRXBMFZb.mjs.map} +1 -1
  231. package/dist/chunks/{switch-BbFl5b4t.cjs → switch-CEoT3MgX.cjs} +1 -2
  232. package/dist/chunks/{switch-BbFl5b4t.cjs.map → switch-CEoT3MgX.cjs.map} +1 -1
  233. package/dist/chunks/{switch--68scepb.mjs → switch-DUnNe4xP.mjs} +1 -1
  234. package/dist/chunks/{switch--68scepb.mjs.map → switch-DUnNe4xP.mjs.map} +1 -1
  235. package/dist/chunks/{textarea-U_JeSWI3.cjs → textarea-Bschfj24.cjs} +2 -3
  236. package/dist/chunks/{textarea-U_JeSWI3.cjs.map → textarea-Bschfj24.cjs.map} +1 -1
  237. package/dist/chunks/{textarea-CEj9voUJ.mjs → textarea-CfeKo5HA.mjs} +2 -2
  238. package/dist/chunks/{textarea-CEj9voUJ.mjs.map → textarea-CfeKo5HA.mjs.map} +1 -1
  239. package/dist/chunks/{theme-koPrLKQv.mjs → theme-BXML6jHE.mjs} +1 -1
  240. package/dist/chunks/{theme-koPrLKQv.mjs.map → theme-BXML6jHE.mjs.map} +1 -1
  241. package/dist/chunks/{theme-D6B-FaoE.cjs → theme-BzTaXYZ8.cjs} +1 -2
  242. package/dist/chunks/{theme-D6B-FaoE.cjs.map → theme-BzTaXYZ8.cjs.map} +1 -1
  243. package/dist/chunks/{toast-CyY8VZN7.mjs → toast-D1W0BvoH.mjs} +2 -2
  244. package/dist/chunks/{toast-CyY8VZN7.mjs.map → toast-D1W0BvoH.mjs.map} +1 -1
  245. package/dist/chunks/{toast-2yq4Q7-q.cjs → toast-DL8svc6q.cjs} +2 -3
  246. package/dist/chunks/{toast-2yq4Q7-q.cjs.map → toast-DL8svc6q.cjs.map} +1 -1
  247. package/dist/chunks/{truncated-text-CswjmrHZ.cjs → truncated-text-D0t4atw5.cjs} +3 -3
  248. package/dist/chunks/{truncated-text-CswjmrHZ.cjs.map → truncated-text-D0t4atw5.cjs.map} +1 -1
  249. package/dist/chunks/{truncated-text-DUYTW1KP.mjs → truncated-text-DIkg-8Vo.mjs} +2 -2
  250. package/dist/chunks/{truncated-text-DUYTW1KP.mjs.map → truncated-text-DIkg-8Vo.mjs.map} +1 -1
  251. package/dist/chunks/{typography-CFIiYk1d.cjs → typography-C5fYwhp2.cjs} +3 -3
  252. package/dist/chunks/{typography-CFIiYk1d.cjs.map → typography-C5fYwhp2.cjs.map} +1 -1
  253. package/dist/chunks/{typography-DHE9sUZ8.mjs → typography-Czi7t5y4.mjs} +2 -2
  254. package/dist/chunks/{typography-DHE9sUZ8.mjs.map → typography-Czi7t5y4.mjs.map} +1 -1
  255. package/dist/chunks/{utils-LRbEQHYs.cjs → utils-CoA0q63n.cjs} +84 -4
  256. package/dist/chunks/utils-CoA0q63n.cjs.map +1 -0
  257. package/dist/chunks/{utils-7S0u48mU.mjs → utils-Dc7j29ec.mjs} +84 -4
  258. package/dist/chunks/utils-Dc7j29ec.mjs.map +1 -0
  259. package/dist/color-palette.cjs +1 -1
  260. package/dist/color-palette.mjs +1 -1
  261. package/dist/combobox.cjs +1 -1
  262. package/dist/combobox.mjs +1 -1
  263. package/dist/components/data-display/dashboard-cards/AIFeatureAdoptionCard.d.ts +26 -0
  264. package/dist/components/data-display/dashboard-cards/AIFeatureAdoptionCard.d.ts.map +1 -0
  265. package/dist/components/data-display/dashboard-cards/AIInsightsCard.d.ts +30 -0
  266. package/dist/components/data-display/dashboard-cards/AIInsightsCard.d.ts.map +1 -0
  267. package/dist/components/data-display/dashboard-cards/AcquisitionChannelCard.d.ts +24 -0
  268. package/dist/components/data-display/dashboard-cards/AcquisitionChannelCard.d.ts.map +1 -0
  269. package/dist/components/data-display/dashboard-cards/BarBreakdownCard.d.ts +49 -0
  270. package/dist/components/data-display/dashboard-cards/BarBreakdownCard.d.ts.map +1 -0
  271. package/dist/components/data-display/dashboard-cards/CustomerLifecycleCard.d.ts +24 -0
  272. package/dist/components/data-display/dashboard-cards/CustomerLifecycleCard.d.ts.map +1 -0
  273. package/dist/components/data-display/dashboard-cards/EarningReportsTabsCard.d.ts +111 -2
  274. package/dist/components/data-display/dashboard-cards/EarningReportsTabsCard.d.ts.map +1 -1
  275. package/dist/components/data-display/dashboard-cards/FinancialPLCard.d.ts +78 -0
  276. package/dist/components/data-display/dashboard-cards/FinancialPLCard.d.ts.map +1 -0
  277. package/dist/components/data-display/dashboard-cards/InventoryCards.d.ts +44 -0
  278. package/dist/components/data-display/dashboard-cards/InventoryCards.d.ts.map +1 -0
  279. package/dist/components/data-display/dashboard-cards/PaymentSummaryCard.d.ts +45 -0
  280. package/dist/components/data-display/dashboard-cards/PaymentSummaryCard.d.ts.map +1 -0
  281. package/dist/components/data-display/dashboard-cards/SalesHeatmapCard.d.ts +36 -0
  282. package/dist/components/data-display/dashboard-cards/SalesHeatmapCard.d.ts.map +1 -0
  283. package/dist/components/data-display/dashboard-cards/SeatUtilizationCard.d.ts +22 -0
  284. package/dist/components/data-display/dashboard-cards/SeatUtilizationCard.d.ts.map +1 -0
  285. package/dist/components/data-display/dashboard-cards/SubscriptionHealthCard.d.ts +23 -0
  286. package/dist/components/data-display/dashboard-cards/SubscriptionHealthCard.d.ts.map +1 -0
  287. package/dist/components/data-display/dashboard-cards/ToolUsageOverviewCard.d.ts +22 -0
  288. package/dist/components/data-display/dashboard-cards/ToolUsageOverviewCard.d.ts.map +1 -0
  289. package/dist/components/data-display/dashboard-cards/TopPlansCard.d.ts +23 -0
  290. package/dist/components/data-display/dashboard-cards/TopPlansCard.d.ts.map +1 -0
  291. package/dist/components/data-display/dashboard-cards/TopSellingItemsCard.d.ts +42 -0
  292. package/dist/components/data-display/dashboard-cards/TopSellingItemsCard.d.ts.map +1 -0
  293. package/dist/components/data-display/dashboard-cards/TopToolsCard.d.ts +22 -0
  294. package/dist/components/data-display/dashboard-cards/TopToolsCard.d.ts.map +1 -0
  295. package/dist/components/data-display/dashboard-cards/_PLCardHeader.d.ts +63 -0
  296. package/dist/components/data-display/dashboard-cards/_PLCardHeader.d.ts.map +1 -0
  297. package/dist/components/data-display/dashboard-cards/_PLCharts.d.ts +33 -0
  298. package/dist/components/data-display/dashboard-cards/_PLCharts.d.ts.map +1 -0
  299. package/dist/components/data-display/dashboard-cards/_PLKpiStrip.d.ts +11 -0
  300. package/dist/components/data-display/dashboard-cards/_PLKpiStrip.d.ts.map +1 -0
  301. package/dist/components/data-display/dashboard-cards/_PLOverview.d.ts +9 -0
  302. package/dist/components/data-display/dashboard-cards/_PLOverview.d.ts.map +1 -0
  303. package/dist/components/data-display/dashboard-cards/_TabTooltip.d.ts +8 -0
  304. package/dist/components/data-display/dashboard-cards/_TabTooltip.d.ts.map +1 -0
  305. package/dist/components/data-display/dashboard-cards/index.d.ts +32 -1
  306. package/dist/components/data-display/dashboard-cards/index.d.ts.map +1 -1
  307. package/dist/components/forms/calendar/Calendar.d.ts +1 -1
  308. package/dist/components/forms/calendar/Calendar.d.ts.map +1 -1
  309. package/dist/components/forms/calendar/types.d.ts +6 -0
  310. package/dist/components/forms/calendar/types.d.ts.map +1 -1
  311. package/dist/components/forms/date-picker/DatePicker.d.ts.map +1 -1
  312. package/dist/components/layout/draggable-grid/DraggableGrid.d.ts +20 -0
  313. package/dist/components/layout/draggable-grid/DraggableGrid.d.ts.map +1 -0
  314. package/dist/components/layout/draggable-grid/index.d.ts +3 -0
  315. package/dist/components/layout/draggable-grid/index.d.ts.map +1 -0
  316. package/dist/components/navigation/sidebar/DashboardSidebarShell.d.ts.map +1 -1
  317. package/dist/dashboard-cards.cjs +16 -1
  318. package/dist/dashboard-cards.mjs +2 -2
  319. package/dist/data-table.cjs +1 -1
  320. package/dist/data-table.mjs +1 -1
  321. package/dist/date-picker.cjs +1 -1
  322. package/dist/date-picker.mjs +1 -1
  323. package/dist/dialog.cjs +1 -1
  324. package/dist/dialog.mjs +1 -1
  325. package/dist/docs.cjs +13 -0
  326. package/dist/docs.cjs.map +1 -1
  327. package/dist/docs.d.ts.map +1 -1
  328. package/dist/docs.mjs +13 -0
  329. package/dist/docs.mjs.map +1 -1
  330. package/dist/draggable-grid.cjs +3 -0
  331. package/dist/draggable-grid.d.ts +2 -0
  332. package/dist/draggable-grid.mjs +2 -0
  333. package/dist/drawer.cjs +1 -1
  334. package/dist/drawer.mjs +1 -1
  335. package/dist/event-calendar.cjs +1 -1
  336. package/dist/event-calendar.mjs +1 -1
  337. package/dist/form.cjs +1 -1
  338. package/dist/form.mjs +1 -1
  339. package/dist/gradual-blur.cjs +1 -1
  340. package/dist/gradual-blur.mjs +1 -1
  341. package/dist/hover-border-gradient.cjs +1 -1
  342. package/dist/hover-border-gradient.mjs +1 -1
  343. package/dist/hover-card.cjs +1 -1
  344. package/dist/hover-card.mjs +1 -1
  345. package/dist/icons.cjs +2 -3
  346. package/dist/icons.mjs +1 -2
  347. package/dist/index.cjs +71 -56
  348. package/dist/index.cjs.map +1 -1
  349. package/dist/index.d.ts +7 -2
  350. package/dist/index.d.ts.map +1 -1
  351. package/dist/index.mjs +55 -55
  352. package/dist/index.mjs.map +1 -1
  353. package/dist/input.cjs +1 -1
  354. package/dist/input.mjs +1 -1
  355. package/dist/label.cjs +1 -1
  356. package/dist/label.mjs +1 -1
  357. package/dist/loading.cjs +1 -1
  358. package/dist/loading.mjs +1 -1
  359. package/dist/multi-select-combobox.cjs +1 -1
  360. package/dist/multi-select-combobox.mjs +1 -1
  361. package/dist/otp-input.cjs +1 -1
  362. package/dist/otp-input.mjs +1 -1
  363. package/dist/password-strength-meter.cjs +1 -1
  364. package/dist/password-strength-meter.mjs +1 -1
  365. package/dist/progress-bar.cjs +1 -1
  366. package/dist/progress-bar.mjs +1 -1
  367. package/dist/radio.cjs +1 -1
  368. package/dist/radio.mjs +1 -1
  369. package/dist/select.cjs +1 -1
  370. package/dist/select.mjs +1 -1
  371. package/dist/sidebar.cjs +1 -1
  372. package/dist/sidebar.mjs +1 -1
  373. package/dist/skeleton.cjs +1 -1
  374. package/dist/skeleton.mjs +1 -1
  375. package/dist/spinners.cjs +1 -1
  376. package/dist/spinners.mjs +1 -1
  377. package/dist/splash-cursor.cjs +1 -1
  378. package/dist/splash-cursor.mjs +1 -1
  379. package/dist/spotlight-card.cjs +1 -1
  380. package/dist/spotlight-card.mjs +1 -1
  381. package/dist/stepper.cjs +1 -1
  382. package/dist/stepper.mjs +1 -1
  383. package/dist/sun-to-moon-button.cjs +2 -2
  384. package/dist/sun-to-moon-button.mjs +2 -2
  385. package/dist/switch.cjs +1 -1
  386. package/dist/switch.mjs +1 -1
  387. package/dist/textarea.cjs +1 -1
  388. package/dist/textarea.mjs +1 -1
  389. package/dist/theme.cjs +1 -1
  390. package/dist/theme.mjs +1 -1
  391. package/dist/toast.cjs +1 -1
  392. package/dist/toast.mjs +1 -1
  393. package/dist/tooltip.cjs +1 -1
  394. package/dist/tooltip.mjs +1 -1
  395. package/dist/truncated-text.cjs +1 -1
  396. package/dist/truncated-text.mjs +1 -1
  397. package/dist/typography.cjs +1 -1
  398. package/dist/typography.mjs +1 -1
  399. package/dist/utils.cjs +1 -1
  400. package/dist/utils.mjs +1 -1
  401. package/package.json +34 -13
  402. package/dist/chunks/EllipsisVerticalIcon-BJw3MNkg.cjs +0 -51
  403. package/dist/chunks/EllipsisVerticalIcon-BJw3MNkg.cjs.map +0 -1
  404. package/dist/chunks/EllipsisVerticalIcon-C2b2KMfE.mjs +0 -45
  405. package/dist/chunks/EllipsisVerticalIcon-C2b2KMfE.mjs.map +0 -1
  406. package/dist/chunks/calendar-DCkikZYb.cjs +0 -184
  407. package/dist/chunks/calendar-DCkikZYb.cjs.map +0 -1
  408. package/dist/chunks/calendar-FxAmm_ao.mjs +0 -178
  409. package/dist/chunks/calendar-FxAmm_ao.mjs.map +0 -1
  410. package/dist/chunks/dashboard-cards-BnPt0gDW.mjs +0 -2428
  411. package/dist/chunks/dashboard-cards-BnPt0gDW.mjs.map +0 -1
  412. package/dist/chunks/dashboard-cards-DNWJPKRu.cjs +0 -2524
  413. package/dist/chunks/dashboard-cards-DNWJPKRu.cjs.map +0 -1
  414. package/dist/chunks/date-picker-3IDSmb9Z.mjs +0 -228
  415. package/dist/chunks/date-picker-3IDSmb9Z.mjs.map +0 -1
  416. package/dist/chunks/date-picker-_EVYpGga.cjs +0 -234
  417. package/dist/chunks/date-picker-_EVYpGga.cjs.map +0 -1
  418. package/dist/chunks/icons-JzMKLygv.mjs.map +0 -1
  419. package/dist/chunks/icons-ub9iu-JG.cjs.map +0 -1
  420. package/dist/chunks/utils-7S0u48mU.mjs.map +0 -1
  421. package/dist/chunks/utils-LRbEQHYs.cjs.map +0 -1
  422. /package/dist/chunks/{chunk-B_GkZjkl.cjs → chunk-D6vf50IK.cjs} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"multi-select-combobox-C_8sxaiL.mjs","names":[],"sources":["../../src/components/forms/multi-select-combobox/MultiSelectCombobox.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { motion, useMotionTemplate, useMotionValue } from \"framer-motion\";\n\nimport { CheckIcon, ChevronDownIcon, CloseIcon } from \"../../icons\";\nimport { DropdownMenu } from \"../../overlays/dropdown-menu\";\nimport { mergeClassNames } from \"../../../utils\";\n\nexport interface MultiSelectOption {\n label: string;\n value: string;\n}\n\nexport interface MultiSelectComboboxProps {\n options: MultiSelectOption[];\n value: string[];\n onChange: (values: string[]) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n noOptionsText?: string;\n className?: string;\n bgClassName?: string;\n}\n\nconst MultiSelectCombobox: React.FC<MultiSelectComboboxProps> = ({\n options,\n value = [],\n onChange,\n placeholder = \"Select...\",\n searchPlaceholder = \"Type to search...\",\n noOptionsText = \"No options found\",\n className,\n bgClassName = \"bg-ds-surface-1\",\n}) => {\n const [open, setOpen] = useState(false);\n const [search, setSearch] = useState(\"\");\n const [visible, setVisible] = useState(false);\n const mouseX = useMotionValue(0);\n const mouseY = useMotionValue(0);\n const radius = 100;\n\n // Filter options by search\n const filteredOptions = options.filter((opt) =>\n opt.label.toLowerCase().includes(search.toLowerCase()),\n );\n\n const handleMouseMove = (event: React.MouseEvent<HTMLDivElement>) => {\n const { left, top } = event.currentTarget.getBoundingClientRect();\n mouseX.set(event.clientX - left);\n mouseY.set(event.clientY - top);\n };\n\n const handleOptionClick = (optionValue: string) => {\n if (value.includes(optionValue)) {\n onChange(value.filter((v) => v !== optionValue));\n } else {\n onChange([...value, optionValue]);\n }\n };\n\n const handleRemoveTag = (optionValue: string, e: React.MouseEvent) => {\n e.stopPropagation();\n onChange(value.filter((v) => v !== optionValue));\n };\n\n const selectedLabels = value\n .map((v) => options.find((opt) => opt.value === v)?.label)\n .filter(Boolean);\n\n return (\n <DropdownMenu\n className={mergeClassNames(\"w-full\", className)}\n open={open}\n onOpenChange={(nextOpen) => {\n setOpen(nextOpen);\n if (!nextOpen) {\n setSearch(\"\");\n }\n }}\n animationClassName=\"origin-top-left\"\n panelClassName=\"top-[40px] start-0 z-20 mt-1 flex w-full max-h-60 flex-col rounded-lg border border-ds-border-2 bg-ds-surface-1 shadow-3 backdrop-blur-xl transition\"\n trigger={\n <motion.div\n style={{\n backgroundImage: useMotionTemplate`\n radial-gradient(\n ${visible ? `${radius}px` : \"0px\"} circle at ${mouseX}px ${mouseY}px,\n var(--ds-color-accent),\n transparent 90%\n )\n `,\n }}\n onMouseMove={handleMouseMove}\n onMouseEnter={() => setVisible(true)}\n onMouseLeave={() => setVisible(false)}\n className=\"group/multi-combobox w-full rounded-lg border-ds-border-2 p-[2px] transition duration-300 hover:border-ds-border-accent\"\n >\n <div\n className={mergeClassNames(\n \"flex min-h-10 w-full cursor-pointer items-center justify-between rounded-md border border-ds-border-field px-3 py-2 text-sm text-ds-1 transition duration-400 ease-in-out group-hover/multi-combobox:shadow-none\",\n bgClassName,\n )}\n >\n <div className=\"flex flex-1 flex-wrap gap-1\">\n {selectedLabels.length > 0 ? (\n selectedLabels.map((label, index) => (\n <span\n key={value[index]}\n className=\"inline-flex items-center gap-1 rounded-md border border-ds-border-field bg-ds-surface-2 px-2 py-0.5 text-xs font-medium text-ds-1\"\n >\n {label}\n <button\n type=\"button\"\n onMouseDown={(e) => e.stopPropagation()}\n onClick={(e) => handleRemoveTag(value[index], e)}\n className=\"ms-0.5 rounded-full p-0.5 text-ds-2 transition-colors hover:bg-ds-surface-1 hover:text-ds-1\"\n >\n <CloseIcon className=\"h-3 w-3\" aria-hidden=\"true\" />\n </button>\n </span>\n ))\n ) : (\n <span className=\"text-ds-2\">{placeholder}</span>\n )}\n </div>\n <span\n className={mergeClassNames(\n \"ms-2 shrink-0 text-ds-2 transition-transform duration-300\",\n open ? \"rotate-180\" : \"rotate-0\",\n )}\n >\n <ChevronDownIcon\n width={24}\n height={24}\n color=\"currentColor\"\n className=\"h-5 w-5\"\n />\n </span>\n </div>\n </motion.div>\n }\n >\n {/* Sticky search input */}\n <div className=\"sticky top-0 z-10 rounded-t-lg border-b border-ds-border-2/30 bg-ds-surface-1/95 backdrop-blur-sm\">\n <input\n autoFocus\n className=\"w-full rounded-t-lg bg-transparent px-3 py-2 text-sm text-ds-1 outline-none placeholder:text-ds-2 focus-visible:ring-2 focus-visible:ring-ds-focus/30\"\n placeholder={searchPlaceholder}\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n onClick={(e) => e.stopPropagation()}\n />\n </div>\n {/* Scrollable options */}\n <div className=\"max-h-80 flex-1 overflow-auto\">\n {filteredOptions.length === 0 && (\n <div className=\"p-3 text-center text-sm text-ds-2\">\n {noOptionsText}\n </div>\n )}\n {filteredOptions.map((option) => {\n const isSelected = value.includes(option.value);\n return (\n <div\n key={option.value}\n className={mergeClassNames(\n \"flex cursor-pointer items-center gap-2 px-3 py-2 text-sm transition\",\n isSelected\n ? \"bg-ds-surface-2 text-ds-1\"\n : \"text-ds-1 hover:bg-ds-surface-2 hover:text-ds-1\",\n )}\n onClick={() => handleOptionClick(option.value)}\n >\n <span\n className={mergeClassNames(\n \"flex h-4 w-4 items-center justify-center rounded border transition\",\n isSelected\n ? \"border-ds-border-accent bg-ds-accent text-ds-on-accent\"\n : \"border-ds-border-2\",\n )}\n >\n {isSelected && <CheckIcon width={12} height={12} />}\n </span>\n <span className=\"flex-1\">{option.label}</span>\n </div>\n );\n })}\n </div>\n </DropdownMenu>\n );\n};\n\nexport default MultiSelectCombobox;\n"],"mappings":";;;;;;;AAuBA,IAAM,uBAA2D,EAC/D,SACA,QAAQ,EAAE,EACV,UACA,cAAc,aACd,oBAAoB,qBACpB,gBAAgB,oBAChB,WACA,cAAc,wBACV;CACJ,MAAM,CAAC,MAAM,WAAW,SAAS,MAAM;CACvC,MAAM,CAAC,QAAQ,aAAa,SAAS,GAAG;CACxC,MAAM,CAAC,SAAS,cAAc,SAAS,MAAM;CAC7C,MAAM,SAAS,eAAe,EAAE;CAChC,MAAM,SAAS,eAAe,EAAE;CAChC,MAAM,SAAS;CAGf,MAAM,kBAAkB,QAAQ,QAAQ,QACtC,IAAI,MAAM,aAAa,CAAC,SAAS,OAAO,aAAa,CAAC,CACvD;CAED,MAAM,mBAAmB,UAA4C;EACnE,MAAM,EAAE,MAAM,QAAQ,MAAM,cAAc,uBAAuB;AACjE,SAAO,IAAI,MAAM,UAAU,KAAK;AAChC,SAAO,IAAI,MAAM,UAAU,IAAI;;CAGjC,MAAM,qBAAqB,gBAAwB;AACjD,MAAI,MAAM,SAAS,YAAY,CAC7B,UAAS,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AAM;MACN,WAAU;MACV,CAAA;KACG,CAAA,CACH;;GACK,CAAA;YArEjB,CAyEE,oBAAC,OAAD;GAAK,WAAU;aACb,oBAAC,SAAD;IACE,WAAA;IACA,WAAU;IACV,aAAa;IACb,OAAO;IACP,WAAW,MAAM,UAAU,EAAE,OAAO,MAAM;IAC1C,UAAU,MAAM,EAAE,iBAAiB;IACnC,CAAA;GACE,CAAA,EAEN,qBAAC,OAAD;GAAK,WAAU;aAAf,CACG,gBAAgB,WAAW,KAC1B,oBAAC,OAAD;IAAK,WAAU;cACZ;IACG,CAAA,EAEP,gBAAgB,KAAK,WAAW;IAC/B,MAAM,aAAa,MAAM,SAAS,OAAO,MAAM;AAC/C,WACE,qBAAC,OAAD;KAEE,WAAW,gBACT,uEACA,aACI,8BACA,kDACL;KACD,eAAe,kBAAkB,OAAO,MAAM;eARhD,CAUE,oBAAC,QAAD;MACE,WAAW,gBACT,sEACA,aACI,2DACA,qBACL;gBAEA,cAAc,oBAAC,WAAD;OAAW,OAAO;OAAI,QAAQ;OAAM,CAAA;MAC9C,CAAA,EACP,oBAAC,QAAD;MAAM,WAAU;gBAAU,OAAO;MAAa,CAAA,CAC1C;OApBC,OAAO,MAoBR;KAER,CACE;KACO"}
1
+ {"version":3,"file":"multi-select-combobox-BOdKmPj2.mjs","names":[],"sources":["../../src/components/forms/multi-select-combobox/MultiSelectCombobox.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { motion, useMotionTemplate, useMotionValue } from \"framer-motion\";\n\nimport { CheckIcon, ChevronDownIcon, CloseIcon } from \"../../icons\";\nimport { DropdownMenu } from \"../../overlays/dropdown-menu\";\nimport { mergeClassNames } from \"../../../utils\";\n\nexport interface MultiSelectOption {\n label: string;\n value: string;\n}\n\nexport interface MultiSelectComboboxProps {\n options: MultiSelectOption[];\n value: string[];\n onChange: (values: string[]) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n noOptionsText?: string;\n className?: string;\n bgClassName?: string;\n}\n\nconst MultiSelectCombobox: React.FC<MultiSelectComboboxProps> = ({\n options,\n value = [],\n onChange,\n placeholder = \"Select...\",\n searchPlaceholder = \"Type to search...\",\n noOptionsText = \"No options found\",\n className,\n bgClassName = \"bg-ds-surface-1\",\n}) => {\n const [open, setOpen] = useState(false);\n const [search, setSearch] = useState(\"\");\n const [visible, setVisible] = useState(false);\n const mouseX = useMotionValue(0);\n const mouseY = useMotionValue(0);\n const radius = 100;\n\n // Filter options by search\n const filteredOptions = options.filter((opt) =>\n opt.label.toLowerCase().includes(search.toLowerCase()),\n );\n\n const handleMouseMove = (event: React.MouseEvent<HTMLDivElement>) => {\n const { left, top } = event.currentTarget.getBoundingClientRect();\n mouseX.set(event.clientX - left);\n mouseY.set(event.clientY - top);\n };\n\n const handleOptionClick = (optionValue: string) => {\n if (value.includes(optionValue)) {\n onChange(value.filter((v) => v !== optionValue));\n } else {\n onChange([...value, optionValue]);\n }\n };\n\n const handleRemoveTag = (optionValue: string, e: React.MouseEvent) => {\n e.stopPropagation();\n onChange(value.filter((v) => v !== optionValue));\n };\n\n const selectedLabels = value\n .map((v) => options.find((opt) => opt.value === v)?.label)\n .filter(Boolean);\n\n return (\n <DropdownMenu\n className={mergeClassNames(\"w-full\", className)}\n open={open}\n onOpenChange={(nextOpen) => {\n setOpen(nextOpen);\n if (!nextOpen) {\n setSearch(\"\");\n }\n }}\n animationClassName=\"origin-top-left\"\n panelClassName=\"top-[40px] start-0 z-20 mt-1 flex w-full max-h-60 flex-col rounded-lg border border-ds-border-2 bg-ds-surface-1 shadow-3 backdrop-blur-xl transition\"\n trigger={\n <motion.div\n style={{\n backgroundImage: useMotionTemplate`\n radial-gradient(\n ${visible ? `${radius}px` : \"0px\"} circle at ${mouseX}px ${mouseY}px,\n var(--ds-color-accent),\n transparent 90%\n )\n `,\n }}\n onMouseMove={handleMouseMove}\n onMouseEnter={() => setVisible(true)}\n onMouseLeave={() => setVisible(false)}\n className=\"group/multi-combobox w-full rounded-lg border-ds-border-2 p-[2px] transition duration-300 hover:border-ds-border-accent\"\n >\n <div\n className={mergeClassNames(\n \"flex min-h-10 w-full cursor-pointer items-center justify-between rounded-md border border-ds-border-field px-3 py-2 text-sm text-ds-1 transition duration-400 ease-in-out group-hover/multi-combobox:shadow-none\",\n bgClassName,\n )}\n >\n <div className=\"flex flex-1 flex-wrap gap-1\">\n {selectedLabels.length > 0 ? (\n selectedLabels.map((label, index) => (\n <span\n key={value[index]}\n className=\"inline-flex items-center gap-1 rounded-md border border-ds-border-field bg-ds-surface-2 px-2 py-0.5 text-xs font-medium text-ds-1\"\n >\n {label}\n <button\n type=\"button\"\n onMouseDown={(e) => e.stopPropagation()}\n onClick={(e) => handleRemoveTag(value[index], e)}\n className=\"ms-0.5 rounded-full p-0.5 text-ds-2 transition-colors hover:bg-ds-surface-1 hover:text-ds-1\"\n >\n <CloseIcon className=\"h-3 w-3\" aria-hidden=\"true\" />\n </button>\n </span>\n ))\n ) : (\n <span className=\"text-ds-2\">{placeholder}</span>\n )}\n </div>\n <span\n className={mergeClassNames(\n \"ms-2 shrink-0 text-ds-2 transition-transform duration-300\",\n open ? \"rotate-180\" : \"rotate-0\",\n )}\n >\n <ChevronDownIcon\n width={24}\n height={24}\n color=\"currentColor\"\n className=\"h-5 w-5\"\n />\n </span>\n </div>\n </motion.div>\n }\n >\n {/* Sticky search input */}\n <div className=\"sticky top-0 z-10 rounded-t-lg border-b border-ds-border-2/30 bg-ds-surface-1/95 backdrop-blur-sm\">\n <input\n autoFocus\n className=\"w-full rounded-t-lg bg-transparent px-3 py-2 text-sm text-ds-1 outline-none placeholder:text-ds-2 focus-visible:ring-2 focus-visible:ring-ds-focus/30\"\n placeholder={searchPlaceholder}\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n onClick={(e) => e.stopPropagation()}\n />\n </div>\n {/* Scrollable options */}\n <div className=\"max-h-80 flex-1 overflow-auto\">\n {filteredOptions.length === 0 && (\n <div className=\"p-3 text-center text-sm text-ds-2\">\n {noOptionsText}\n </div>\n )}\n {filteredOptions.map((option) => {\n const isSelected = value.includes(option.value);\n return (\n <div\n key={option.value}\n className={mergeClassNames(\n \"flex cursor-pointer items-center gap-2 px-3 py-2 text-sm transition\",\n isSelected\n ? \"bg-ds-surface-2 text-ds-1\"\n : \"text-ds-1 hover:bg-ds-surface-2 hover:text-ds-1\",\n )}\n onClick={() => handleOptionClick(option.value)}\n >\n <span\n className={mergeClassNames(\n \"flex h-4 w-4 items-center justify-center rounded border transition\",\n isSelected\n ? \"border-ds-border-accent bg-ds-accent text-ds-on-accent\"\n : \"border-ds-border-2\",\n )}\n >\n {isSelected && <CheckIcon width={12} height={12} />}\n </span>\n <span className=\"flex-1\">{option.label}</span>\n </div>\n );\n })}\n </div>\n </DropdownMenu>\n );\n};\n\nexport default MultiSelectCombobox;\n"],"mappings":";;;;;;;AAuBA,IAAM,uBAA2D,EAC/D,SACA,QAAQ,CAAC,GACT,UACA,cAAc,aACd,oBAAoB,qBACpB,gBAAgB,oBAChB,WACA,cAAc,wBACV;CACJ,MAAM,CAAC,MAAM,WAAW,SAAS,KAAK;CACtC,MAAM,CAAC,QAAQ,aAAa,SAAS,EAAE;CACvC,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAC5C,MAAM,SAAS,eAAe,CAAC;CAC/B,MAAM,SAAS,eAAe,CAAC;CAC/B,MAAM,SAAS;CAGf,MAAM,kBAAkB,QAAQ,QAAQ,QACtC,IAAI,MAAM,YAAY,EAAE,SAAS,OAAO,YAAY,CAAC,CACvD;CAEA,MAAM,mBAAmB,UAA4C;EACnE,MAAM,EAAE,MAAM,QAAQ,MAAM,cAAc,sBAAsB;EAChE,OAAO,IAAI,MAAM,UAAU,IAAI;EAC/B,OAAO,IAAI,MAAM,UAAU,GAAG;CAChC;CAEA,MAAM,qBAAqB,gBAAwB;EACjD,IAAI,MAAM,SAAS,WAAW,GAC5B,SAAS,MAAM,QAAQ,MAAM,MAAM,WAAW,CAAC;OAE/C,SAAS,CAAC,GAAG,OAAO,WAAW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hB,CAyEE,oBAAC,OAAD;GAAK,WAAU;aACb,oBAAC,SAAD;IACE,WAAA;IACA,WAAU;IACV,aAAa;IACb,OAAO;IACP,WAAW,MAAM,UAAU,EAAE,OAAO,KAAK;IACzC,UAAU,MAAM,EAAE,gBAAgB;GACnC,CAAA;EACE,CAAA,GAEL,qBAAC,OAAD;GAAK,WAAU;aAAf,CACG,gBAAgB,WAAW,KAC1B,oBAAC,OAAD;IAAK,WAAU;cACZ;GACE,CAAA,GAEN,gBAAgB,KAAK,WAAW;IAC/B,MAAM,aAAa,MAAM,SAAS,OAAO,KAAK;IAC9C,OACE,qBAAC,OAAD;KAEE,WAAW,gBACT,uEACA,aACI,8BACA,iDACN;KACA,eAAe,kBAAkB,OAAO,KAAK;eAR/C,CAUE,oBAAC,QAAD;MACE,WAAW,gBACT,sEACA,aACI,2DACA,oBACN;gBAEC,cAAc,oBAAC,WAAD;OAAW,OAAO;OAAI,QAAQ;MAAK,CAAA;KAC9C,CAAA,GACN,oBAAC,QAAD;MAAM,WAAU;gBAAU,OAAO;KAAY,CAAA,CAC1C;OApBE,OAAO,KAoBT;GAET,CAAC,CACE;IACO;;AAElB"}
@@ -1,7 +1,7 @@
1
- const require_chunk = require("./chunk-B_GkZjkl.cjs");
2
- const require_utils = require("./utils-LRbEQHYs.cjs");
3
- const require_icons = require("./icons-ub9iu-JG.cjs");
4
- const require_DropdownMenu = require("./DropdownMenu-yh04burS.cjs");
1
+ const require_chunk = require("./chunk-D6vf50IK.cjs");
2
+ const require_utils = require("./utils-CoA0q63n.cjs");
3
+ const require_icons = require("./icons-Ci8yEvvF.cjs");
4
+ const require_DropdownMenu = require("./DropdownMenu-CEmlmX7P.cjs");
5
5
  let react = require("react");
6
6
  react = require_chunk.__toESM(react, 1);
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -124,4 +124,4 @@ Object.defineProperty(exports, "MultiSelectCombobox", {
124
124
  }
125
125
  });
126
126
 
127
- //# sourceMappingURL=multi-select-combobox-CFJGq1hn.cjs.map
127
+ //# sourceMappingURL=multi-select-combobox-PPYRcaPg.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"multi-select-combobox-CFJGq1hn.cjs","names":[],"sources":["../../src/components/forms/multi-select-combobox/MultiSelectCombobox.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { motion, useMotionTemplate, useMotionValue } from \"framer-motion\";\n\nimport { CheckIcon, ChevronDownIcon, CloseIcon } from \"../../icons\";\nimport { DropdownMenu } from \"../../overlays/dropdown-menu\";\nimport { mergeClassNames } from \"../../../utils\";\n\nexport interface MultiSelectOption {\n label: string;\n value: string;\n}\n\nexport interface MultiSelectComboboxProps {\n options: MultiSelectOption[];\n value: string[];\n onChange: (values: string[]) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n noOptionsText?: string;\n className?: string;\n bgClassName?: string;\n}\n\nconst MultiSelectCombobox: React.FC<MultiSelectComboboxProps> = ({\n options,\n value = [],\n onChange,\n placeholder = \"Select...\",\n searchPlaceholder = \"Type to search...\",\n noOptionsText = \"No options found\",\n className,\n bgClassName = \"bg-ds-surface-1\",\n}) => {\n const [open, setOpen] = useState(false);\n const [search, setSearch] = useState(\"\");\n const [visible, setVisible] = useState(false);\n const mouseX = useMotionValue(0);\n const mouseY = useMotionValue(0);\n const radius = 100;\n\n // Filter options by search\n const filteredOptions = options.filter((opt) =>\n opt.label.toLowerCase().includes(search.toLowerCase()),\n );\n\n const handleMouseMove = (event: React.MouseEvent<HTMLDivElement>) => {\n const { left, top } = event.currentTarget.getBoundingClientRect();\n mouseX.set(event.clientX - left);\n mouseY.set(event.clientY - top);\n };\n\n const handleOptionClick = (optionValue: string) => {\n if (value.includes(optionValue)) {\n onChange(value.filter((v) => v !== optionValue));\n } else {\n onChange([...value, optionValue]);\n }\n };\n\n const handleRemoveTag = (optionValue: string, e: React.MouseEvent) => {\n e.stopPropagation();\n onChange(value.filter((v) => v !== optionValue));\n };\n\n const selectedLabels = value\n .map((v) => options.find((opt) => opt.value === v)?.label)\n .filter(Boolean);\n\n return (\n <DropdownMenu\n className={mergeClassNames(\"w-full\", className)}\n open={open}\n onOpenChange={(nextOpen) => {\n setOpen(nextOpen);\n if (!nextOpen) {\n setSearch(\"\");\n }\n }}\n animationClassName=\"origin-top-left\"\n panelClassName=\"top-[40px] start-0 z-20 mt-1 flex w-full max-h-60 flex-col rounded-lg border border-ds-border-2 bg-ds-surface-1 shadow-3 backdrop-blur-xl transition\"\n trigger={\n <motion.div\n style={{\n backgroundImage: useMotionTemplate`\n radial-gradient(\n ${visible ? `${radius}px` : \"0px\"} circle at ${mouseX}px ${mouseY}px,\n var(--ds-color-accent),\n transparent 90%\n )\n `,\n }}\n onMouseMove={handleMouseMove}\n onMouseEnter={() => setVisible(true)}\n onMouseLeave={() => setVisible(false)}\n className=\"group/multi-combobox w-full rounded-lg border-ds-border-2 p-[2px] transition duration-300 hover:border-ds-border-accent\"\n >\n <div\n className={mergeClassNames(\n \"flex min-h-10 w-full cursor-pointer items-center justify-between rounded-md border border-ds-border-field px-3 py-2 text-sm text-ds-1 transition duration-400 ease-in-out group-hover/multi-combobox:shadow-none\",\n bgClassName,\n )}\n >\n <div className=\"flex flex-1 flex-wrap gap-1\">\n {selectedLabels.length > 0 ? (\n selectedLabels.map((label, index) => (\n <span\n key={value[index]}\n className=\"inline-flex items-center gap-1 rounded-md border border-ds-border-field bg-ds-surface-2 px-2 py-0.5 text-xs font-medium text-ds-1\"\n >\n {label}\n <button\n type=\"button\"\n onMouseDown={(e) => e.stopPropagation()}\n onClick={(e) => handleRemoveTag(value[index], e)}\n className=\"ms-0.5 rounded-full p-0.5 text-ds-2 transition-colors hover:bg-ds-surface-1 hover:text-ds-1\"\n >\n <CloseIcon className=\"h-3 w-3\" aria-hidden=\"true\" />\n </button>\n </span>\n ))\n ) : (\n <span className=\"text-ds-2\">{placeholder}</span>\n )}\n </div>\n <span\n className={mergeClassNames(\n \"ms-2 shrink-0 text-ds-2 transition-transform duration-300\",\n open ? \"rotate-180\" : \"rotate-0\",\n )}\n >\n <ChevronDownIcon\n width={24}\n height={24}\n color=\"currentColor\"\n className=\"h-5 w-5\"\n />\n </span>\n </div>\n </motion.div>\n }\n >\n {/* Sticky search input */}\n <div className=\"sticky top-0 z-10 rounded-t-lg border-b border-ds-border-2/30 bg-ds-surface-1/95 backdrop-blur-sm\">\n <input\n autoFocus\n className=\"w-full rounded-t-lg bg-transparent px-3 py-2 text-sm text-ds-1 outline-none placeholder:text-ds-2 focus-visible:ring-2 focus-visible:ring-ds-focus/30\"\n placeholder={searchPlaceholder}\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n onClick={(e) => e.stopPropagation()}\n />\n </div>\n {/* Scrollable options */}\n <div className=\"max-h-80 flex-1 overflow-auto\">\n {filteredOptions.length === 0 && (\n <div className=\"p-3 text-center text-sm text-ds-2\">\n {noOptionsText}\n </div>\n )}\n {filteredOptions.map((option) => {\n const isSelected = value.includes(option.value);\n return (\n <div\n key={option.value}\n className={mergeClassNames(\n \"flex cursor-pointer items-center gap-2 px-3 py-2 text-sm transition\",\n isSelected\n ? \"bg-ds-surface-2 text-ds-1\"\n : \"text-ds-1 hover:bg-ds-surface-2 hover:text-ds-1\",\n )}\n onClick={() => handleOptionClick(option.value)}\n >\n <span\n className={mergeClassNames(\n \"flex h-4 w-4 items-center justify-center rounded border transition\",\n isSelected\n ? \"border-ds-border-accent bg-ds-accent text-ds-on-accent\"\n : \"border-ds-border-2\",\n )}\n >\n {isSelected && <CheckIcon width={12} height={12} />}\n </span>\n <span className=\"flex-1\">{option.label}</span>\n </div>\n );\n })}\n </div>\n </DropdownMenu>\n );\n};\n\nexport default MultiSelectCombobox;\n"],"mappings":";;;;;;;;;AAuBA,IAAM,uBAA2D,EAC/D,SACA,QAAQ,EAAE,EACV,UACA,cAAc,aACd,oBAAoB,qBACpB,gBAAgB,oBAChB,WACA,cAAc,wBACV;CACJ,MAAM,CAAC,MAAM,YAAA,GAAA,MAAA,UAAoB,MAAM;CACvC,MA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AW;IAC/B,MAAM,aAAa,MAAM,SAAS,OAAO,MAAM;AAC/C,WACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;KAEE,WAAW,cAAA,gBACT,uEACA,aACI,8BACA,kDACL;KACD,eAAe,kBAAkB,OAAO,MAAM;eARhD,CAUE,iBAAA,GAAA,kBAAA,KAAC,QAAD;MACE,WAAW,cAAA,gBACT,sEACA,aACI,2DACA,qBACL;gBAEA,cAAc,iBAAA,GAAA,kBAAA,KAAC,cAAA,WAAD;OAAW,OAAO;OAAI,QAAQ;OAAM,CAAA;MAC9C,CAAA,EACP,iBAAA,GAAA,kBAAA,KAAC,QAAD;MAAM,WAAU;gBAAU,OAAO;MAAa,CAAA,CAC1C;OApBC,OAAO,MAoBR;KAER,CACE;KACO"}
1
+ {"version":3,"file":"multi-select-combobox-PPYRcaPg.cjs","names":[],"sources":["../../src/components/forms/multi-select-combobox/MultiSelectCombobox.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { motion, useMotionTemplate, useMotionValue } from \"framer-motion\";\n\nimport { CheckIcon, ChevronDownIcon, CloseIcon } from \"../../icons\";\nimport { DropdownMenu } from \"../../overlays/dropdown-menu\";\nimport { mergeClassNames } from \"../../../utils\";\n\nexport interface MultiSelectOption {\n label: string;\n value: string;\n}\n\nexport interface MultiSelectComboboxProps {\n options: MultiSelectOption[];\n value: string[];\n onChange: (values: string[]) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n noOptionsText?: string;\n className?: string;\n bgClassName?: string;\n}\n\nconst MultiSelectCombobox: React.FC<MultiSelectComboboxProps> = ({\n options,\n value = [],\n onChange,\n placeholder = \"Select...\",\n searchPlaceholder = \"Type to search...\",\n noOptionsText = \"No options found\",\n className,\n bgClassName = \"bg-ds-surface-1\",\n}) => {\n const [open, setOpen] = useState(false);\n const [search, setSearch] = useState(\"\");\n const [visible, setVisible] = useState(false);\n const mouseX = useMotionValue(0);\n const mouseY = useMotionValue(0);\n const radius = 100;\n\n // Filter options by search\n const filteredOptions = options.filter((opt) =>\n opt.label.toLowerCase().includes(search.toLowerCase()),\n );\n\n const handleMouseMove = (event: React.MouseEvent<HTMLDivElement>) => {\n const { left, top } = event.currentTarget.getBoundingClientRect();\n mouseX.set(event.clientX - left);\n mouseY.set(event.clientY - top);\n };\n\n const handleOptionClick = (optionValue: string) => {\n if (value.includes(optionValue)) {\n onChange(value.filter((v) => v !== optionValue));\n } else {\n onChange([...value, optionValue]);\n }\n };\n\n const handleRemoveTag = (optionValue: string, e: React.MouseEvent) => {\n e.stopPropagation();\n onChange(value.filter((v) => v !== optionValue));\n };\n\n const selectedLabels = value\n .map((v) => options.find((opt) => opt.value === v)?.label)\n .filter(Boolean);\n\n return (\n <DropdownMenu\n className={mergeClassNames(\"w-full\", className)}\n open={open}\n onOpenChange={(nextOpen) => {\n setOpen(nextOpen);\n if (!nextOpen) {\n setSearch(\"\");\n }\n }}\n animationClassName=\"origin-top-left\"\n panelClassName=\"top-[40px] start-0 z-20 mt-1 flex w-full max-h-60 flex-col rounded-lg border border-ds-border-2 bg-ds-surface-1 shadow-3 backdrop-blur-xl transition\"\n trigger={\n <motion.div\n style={{\n backgroundImage: useMotionTemplate`\n radial-gradient(\n ${visible ? `${radius}px` : \"0px\"} circle at ${mouseX}px ${mouseY}px,\n var(--ds-color-accent),\n transparent 90%\n )\n `,\n }}\n onMouseMove={handleMouseMove}\n onMouseEnter={() => setVisible(true)}\n onMouseLeave={() => setVisible(false)}\n className=\"group/multi-combobox w-full rounded-lg border-ds-border-2 p-[2px] transition duration-300 hover:border-ds-border-accent\"\n >\n <div\n className={mergeClassNames(\n \"flex min-h-10 w-full cursor-pointer items-center justify-between rounded-md border border-ds-border-field px-3 py-2 text-sm text-ds-1 transition duration-400 ease-in-out group-hover/multi-combobox:shadow-none\",\n bgClassName,\n )}\n >\n <div className=\"flex flex-1 flex-wrap gap-1\">\n {selectedLabels.length > 0 ? (\n selectedLabels.map((label, index) => (\n <span\n key={value[index]}\n className=\"inline-flex items-center gap-1 rounded-md border border-ds-border-field bg-ds-surface-2 px-2 py-0.5 text-xs font-medium text-ds-1\"\n >\n {label}\n <button\n type=\"button\"\n onMouseDown={(e) => e.stopPropagation()}\n onClick={(e) => handleRemoveTag(value[index], e)}\n className=\"ms-0.5 rounded-full p-0.5 text-ds-2 transition-colors hover:bg-ds-surface-1 hover:text-ds-1\"\n >\n <CloseIcon className=\"h-3 w-3\" aria-hidden=\"true\" />\n </button>\n </span>\n ))\n ) : (\n <span className=\"text-ds-2\">{placeholder}</span>\n )}\n </div>\n <span\n className={mergeClassNames(\n \"ms-2 shrink-0 text-ds-2 transition-transform duration-300\",\n open ? \"rotate-180\" : \"rotate-0\",\n )}\n >\n <ChevronDownIcon\n width={24}\n height={24}\n color=\"currentColor\"\n className=\"h-5 w-5\"\n />\n </span>\n </div>\n </motion.div>\n }\n >\n {/* Sticky search input */}\n <div className=\"sticky top-0 z-10 rounded-t-lg border-b border-ds-border-2/30 bg-ds-surface-1/95 backdrop-blur-sm\">\n <input\n autoFocus\n className=\"w-full rounded-t-lg bg-transparent px-3 py-2 text-sm text-ds-1 outline-none placeholder:text-ds-2 focus-visible:ring-2 focus-visible:ring-ds-focus/30\"\n placeholder={searchPlaceholder}\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n onClick={(e) => e.stopPropagation()}\n />\n </div>\n {/* Scrollable options */}\n <div className=\"max-h-80 flex-1 overflow-auto\">\n {filteredOptions.length === 0 && (\n <div className=\"p-3 text-center text-sm text-ds-2\">\n {noOptionsText}\n </div>\n )}\n {filteredOptions.map((option) => {\n const isSelected = value.includes(option.value);\n return (\n <div\n key={option.value}\n className={mergeClassNames(\n \"flex cursor-pointer items-center gap-2 px-3 py-2 text-sm transition\",\n isSelected\n ? \"bg-ds-surface-2 text-ds-1\"\n : \"text-ds-1 hover:bg-ds-surface-2 hover:text-ds-1\",\n )}\n onClick={() => handleOptionClick(option.value)}\n >\n <span\n className={mergeClassNames(\n \"flex h-4 w-4 items-center justify-center rounded border transition\",\n isSelected\n ? \"border-ds-border-accent bg-ds-accent text-ds-on-accent\"\n : \"border-ds-border-2\",\n )}\n >\n {isSelected && <CheckIcon width={12} height={12} />}\n </span>\n <span className=\"flex-1\">{option.label}</span>\n </div>\n );\n })}\n </div>\n </DropdownMenu>\n );\n};\n\nexport default MultiSelectCombobox;\n"],"mappings":";;;;;;;;;AAuBA,IAAM,uBAA2D,EAC/D,SACA,QAAQ,CAAC,GACT,UACA,cAAc,aACd,oBAAoB,qBACpB,gBAAgB,oBAChB,WACA,cAAc,wBACV;CACJ,MAAM,CAAC,MAAM,YAAA,GAAA,MAAA,UAAoB,KAAK;CACtC,MAAM,CAAC,QAAQ,cAAA,GAAA,MAAA,UAAsB,EAAE;CACvC,MAAM,CAAC,SAAS,eAAA,GAAA,MAAA,UAAuB,KAAK;CAC5C,MAAM,UAAA,GAAA,cAAA,gBAAwB,CAAC;CAC/B,MAAM,UAAA,GAAA,cAAA,gBAAwB,CAAC;CAC/B,MAAM,SAAS;CAGf,MAAM,kBAAkB,QAAQ,QAAQ,QACtC,IAAI,MAAM,YAAY,EAAE,SAAS,OAAO,YAAY,CAAC,CACvD;CAEA,MAAM,mBAAmB,UAA4C;EACnE,MAAM,EAAE,MAAM,QAAQ,MAAM,cAAc,sBAAsB;EAChE,OAAO,IAAI,MAAM,UAAU,IAAI;EAC/B,OAAO,IAAI,MAAM,UAAU,GAAG;CAChC;CAEA,MAAM,qBAAqB,gBAAwB;EACjD,IAAI,MAAM,SAAS,WAAW,GAC5B,SAAS,MAAM,QAAQ,MAAM,MAAM,WAAW,CAAC;OAE/C,SAAS,CAAC,GAAG,OAAO,WAAW,CAAC;CAEpC;CAEA,MAAM,mBAAmB,aAAqB,MAAwB;EACpE,EAAE,gBAAgB;EAClB,SAAS,MAAM,QAAQ,MAAM,MAAM,WAAW,CAAC;CACjD;CAEA,MAAM,iBAAiB,MACpB,KAAK,MAAM,QAAQ,MAAM,QAAQ,IAAI,UAAU,CAAC,GAAG,KAAK,E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CAAA,CACH;;EACK,CAAA;YArEhB,CAyEE,iBAAA,GAAA,kBAAA,KAAC,OAAD;GAAK,WAAU;aACb,iBAAA,GAAA,kBAAA,KAAC,SAAD;IACE,WAAA;IACA,WAAU;IACV,aAAa;IACb,OAAO;IACP,WAAW,MAAM,UAAU,EAAE,OAAO,KAAK;IACzC,UAAU,MAAM,EAAE,gBAAgB;GACnC,CAAA;EACE,CAAA,GAEL,iBAAA,GAAA,kBAAA,MAAC,OAAD;GAAK,WAAU;aAAf,CACG,gBAAgB,WAAW,KAC1B,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAU;cACZ;GACE,CAAA,GAEN,gBAAgB,KAAK,WAAW;IAC/B,MAAM,aAAa,MAAM,SAAS,OAAO,KAAK;IAC9C,OACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;KAEE,WAAW,cAAA,gBACT,uEACA,aACI,8BACA,iDACN;KACA,eAAe,kBAAkB,OAAO,KAAK;eAR/C,CAUE,iBAAA,GAAA,kBAAA,KAAC,QAAD;MACE,WAAW,cAAA,gBACT,sEACA,aACI,2DACA,oBACN;gBAEC,cAAc,iBAAA,GAAA,kBAAA,KAAC,cAAA,WAAD;OAAW,OAAO;OAAI,QAAQ;MAAK,CAAA;KAC9C,CAAA,GACN,iBAAA,GAAA,kBAAA,KAAC,QAAD;MAAM,WAAU;gBAAU,OAAO;KAAY,CAAA,CAC1C;OApBE,OAAO,KAoBT;GAET,CAAC,CACE;IACO;;AAElB"}
@@ -177,4 +177,4 @@ OTPInput.displayName = "OTPInput";
177
177
  //#endregion
178
178
  export { OTPInput as t };
179
179
 
180
- //# sourceMappingURL=otp-input-BpcTJOmU.mjs.map
180
+ //# sourceMappingURL=otp-input--_itTXaL.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"otp-input-BpcTJOmU.mjs","names":[],"sources":["../../src/components/forms/otp-input/OTPInput.tsx"],"sourcesContent":["import {\n forwardRef,\n useState,\n useRef,\n useCallback,\n useEffect,\n type KeyboardEvent,\n type ClipboardEvent,\n type ChangeEvent,\n} from \"react\";\n\nexport type OTPInputSize = \"sm\" | \"md\" | \"lg\";\nexport type OTPInputVariant = \"outlined\" | \"filled\" | \"underlined\";\n\nexport interface OTPInputProps {\n /** Number of OTP digits */\n length?: number;\n /** Callback when OTP value changes */\n onChange?: (value: string) => void;\n /** Callback when all digits are filled */\n onComplete?: (value: string) => void;\n /** The current value (controlled) */\n value?: string;\n /** Default value (uncontrolled) */\n defaultValue?: string;\n /** Size of the input boxes */\n size?: OTPInputSize;\n /** Visual variant */\n variant?: OTPInputVariant;\n /** Whether the input is disabled */\n disabled?: boolean;\n /** Whether there's an error */\n error?: boolean;\n /** Error message to display */\n errorMessage?: string;\n /** Placeholder character */\n placeholder?: string;\n /** Whether to mask the input (like password) */\n mask?: boolean;\n /** Whether to auto-focus the first input */\n autoFocus?: boolean;\n /** Input type - number only or alphanumeric */\n type?: \"number\" | \"text\";\n /** Custom className for the container */\n className?: string;\n /** Custom className for each input box */\n inputClassName?: string;\n /** Separator to show between groups of digits */\n separator?: React.ReactNode;\n /** Position(s) to show separator (e.g., [3] means after 3rd digit) */\n separatorPositions?: number[];\n /** Accessible label */\n \"aria-label\"?: string;\n}\n\nconst sizeStyles: Record<OTPInputSize, string> = {\n sm: \"w-9 h-10 text-base\",\n md: \"w-12 h-14 text-xl\",\n lg: \"w-14 h-16 text-2xl\",\n};\n\nconst variantStyles: Record<\n OTPInputVariant,\n { base: string; focus: string; error: string }\n> = {\n outlined: {\n base: \"border border-ds-border-field bg-ds-surface-1 rounded-lg text-ds-1\",\n focus: \"focus:border-ds-border-accent focus:ring-2 focus:ring-ds-accent\",\n error: \"border-destructive\",\n },\n filled: {\n base: \"border border-transparent bg-ds-accent-subtle rounded-lg text-ds-1\",\n focus:\n \"focus:border-ds-border-accent focus:bg-ds-surface-1 focus:ring-2 focus:ring-ds-accent\",\n error: \"bg-danger-subtle border-danger-border\",\n },\n underlined: {\n base: \"border-b-2 border-ds-border-1 bg-transparent rounded-none text-ds-1\",\n focus: \"focus:border-ds-border-accent\",\n error: \"border-destructive\",\n },\n};\n\nconst OTPInput = forwardRef<HTMLDivElement, OTPInputProps>(\n (\n {\n length = 6,\n onChange,\n onComplete,\n value: controlledValue,\n defaultValue = \"\",\n size = \"md\",\n variant = \"outlined\",\n disabled = false,\n error = false,\n errorMessage,\n placeholder = \"\",\n mask = false,\n autoFocus = false,\n type = \"number\",\n className = \"\",\n inputClassName = \"\",\n separator = <span className=\"text-ds-3 text-2xl mx-2\">—</span>,\n separatorPositions = [],\n \"aria-label\": ariaLabel = \"One-time password\",\n },\n ref,\n ) => {\n const [values, setValues] = useState<string[]>(() => {\n const initial = controlledValue ?? defaultValue;\n return initial\n .split(\"\")\n .slice(0, length)\n .concat(Array(length).fill(\"\"))\n .slice(0, length);\n });\n\n const inputRefs = useRef<(HTMLInputElement | null)[]>([]);\n\n // Sync with controlled value\n useEffect(() => {\n if (controlledValue !== undefined) {\n const newValues = controlledValue\n .split(\"\")\n .slice(0, length)\n .concat(Array(length).fill(\"\"))\n .slice(0, length);\n setValues(newValues);\n }\n }, [controlledValue, length]);\n\n // Auto-focus first input\n useEffect(() => {\n if (autoFocus && inputRefs.current[0]) {\n inputRefs.current[0].focus();\n }\n }, [autoFocus]);\n\n const focusInput = useCallback(\n (index: number) => {\n if (index >= 0 && index < length && inputRefs.current[index]) {\n inputRefs.current[index]?.focus();\n inputRefs.current[index]?.select();\n }\n },\n [length],\n );\n\n const handleChange = useCallback(\n (index: number, e: ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n const char = inputValue.slice(-1);\n\n // Validate input based on type\n if (type === \"number\" && char && !/^\\d$/.test(char)) {\n return;\n }\n\n const newValues = [...values];\n newValues[index] = char;\n setValues(newValues);\n\n const otpValue = newValues.join(\"\");\n onChange?.(otpValue);\n\n // Move to next input if value entered\n if (char && index < length - 1) {\n focusInput(index + 1);\n }\n\n // Check if complete\n if (newValues.every((v) => v !== \"\") && newValues.length === length) {\n onComplete?.(otpValue);\n }\n },\n [values, onChange, onComplete, length, type, focusInput],\n );\n\n const handleKeyDown = useCallback(\n (index: number, e: KeyboardEvent<HTMLInputElement>) => {\n switch (e.key) {\n case \"Backspace\":\n e.preventDefault();\n const newValues = [...values];\n if (values[index]) {\n // Clear current value\n newValues[index] = \"\";\n setValues(newValues);\n onChange?.(newValues.join(\"\"));\n } else if (index > 0) {\n // Move to previous and clear\n newValues[index - 1] = \"\";\n setValues(newValues);\n onChange?.(newValues.join(\"\"));\n focusInput(index - 1);\n }\n break;\n case \"ArrowLeft\":\n e.preventDefault();\n focusInput(index - 1);\n break;\n case \"ArrowRight\":\n e.preventDefault();\n focusInput(index + 1);\n break;\n case \"Delete\":\n e.preventDefault();\n const deleteValues = [...values];\n deleteValues[index] = \"\";\n setValues(deleteValues);\n onChange?.(deleteValues.join(\"\"));\n break;\n }\n },\n [values, onChange, focusInput],\n );\n\n const handlePaste = useCallback(\n (e: ClipboardEvent<HTMLInputElement>) => {\n e.preventDefault();\n const pastedData = e.clipboardData.getData(\"text\").slice(0, length);\n\n // Validate pasted content\n if (type === \"number\" && !/^\\d*$/.test(pastedData)) {\n return;\n }\n\n const newValues = pastedData\n .split(\"\")\n .slice(0, length)\n .concat(Array(length).fill(\"\"))\n .slice(0, length);\n\n setValues(newValues);\n const otpValue = newValues.join(\"\");\n onChange?.(otpValue);\n\n // Focus last filled input or last input\n const lastFilledIndex = newValues.findLastIndex((v) => v !== \"\");\n focusInput(Math.min(lastFilledIndex + 1, length - 1));\n\n // Check if complete\n if (newValues.every((v) => v !== \"\") && pastedData.length >= length) {\n onComplete?.(otpValue);\n }\n },\n [length, type, onChange, onComplete, focusInput],\n );\n\n const handleFocus = useCallback((e: React.FocusEvent<HTMLInputElement>) => {\n e.target.select();\n }, []);\n\n const renderInputs = () => {\n const inputs: React.ReactNode[] = [];\n\n for (let i = 0; i < length; i++) {\n // Add separator if needed\n if (separatorPositions.includes(i) && i > 0) {\n inputs.push(\n <div key={`separator-${i}`} className=\"flex items-center\">\n {separator}\n </div>,\n );\n }\n\n inputs.push(\n <input\n key={i}\n ref={(el) => {\n inputRefs.current[i] = el;\n // React 19: Return cleanup function\n return () => {\n inputRefs.current[i] = null;\n };\n }}\n type={mask ? \"password\" : \"text\"}\n inputMode={type === \"number\" ? \"numeric\" : \"text\"}\n pattern={type === \"number\" ? \"\\\\d*\" : undefined}\n maxLength={1}\n value={values[i] || \"\"}\n placeholder={placeholder}\n disabled={disabled}\n onChange={(e) => handleChange(i, e)}\n onKeyDown={(e) => handleKeyDown(i, e)}\n onPaste={handlePaste}\n onFocus={handleFocus}\n aria-label={`${ariaLabel} digit ${i + 1}`}\n className={`\n text-center font-semibold outline-none transition-all\n placeholder:text-ds-2\n ${sizeStyles[size]}\n ${variantStyles[variant].base}\n ${!error ? variantStyles[variant].focus : \"\"}\n ${error ? variantStyles[variant].error : \"\"}\n ${disabled ? \"opacity-50 cursor-not-allowed bg-ds-surface-1\" : \"\"}\n ${inputClassName}\n `}\n />,\n );\n }\n\n return inputs;\n };\n\n return (\n <div ref={ref} className={`flex flex-col gap-2 ${className}`}>\n <div\n className=\"flex items-center gap-2\"\n role=\"group\"\n aria-label={ariaLabel}\n >\n {renderInputs()}\n </div>\n {error && errorMessage && (\n <span className=\"text-sm text-destructive\">{errorMessage}</span>\n )}\n </div>\n );\n },\n);\n\nOTPInput.displayName = \"OTPInput\";\n\nexport default OTPInput;\nexport { OTPInput };\n"],"mappings":";;;AAuDA,IAAM,aAA2C;CAC/C,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAED,IAAM,gBAGF;CACF,UAAU;EACR,MAAM;EACN,OAAO;EACP,OAAO;EACR;CACD,QAAQ;EACN,MAAM;EACN,OACE;EACF,OAAO;EACR;CACD,YAAY;EACV,MAAM;EACN,OAAO;EACP,OAAO;EACR;CACF;AAED,IAAM,WAAW,YAEb,EACE,SAAS,GACT,UACA,YACA,OAAO,iBACP,eAAe,IACf,OAAO,MACP,U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,cAAY;aAEX,cAAc;GACX,CAAA,EACL,SAAS,gBACR,oBAAC,QAAD;GAAM,WAAU;aAA4B;GAAoB,CAAA,CAE9D;;EAGX;AAED,SAAS,cAAc"}
1
+ {"version":3,"file":"otp-input--_itTXaL.mjs","names":[],"sources":["../../src/components/forms/otp-input/OTPInput.tsx"],"sourcesContent":["import {\n forwardRef,\n useState,\n useRef,\n useCallback,\n useEffect,\n type KeyboardEvent,\n type ClipboardEvent,\n type ChangeEvent,\n} from \"react\";\n\nexport type OTPInputSize = \"sm\" | \"md\" | \"lg\";\nexport type OTPInputVariant = \"outlined\" | \"filled\" | \"underlined\";\n\nexport interface OTPInputProps {\n /** Number of OTP digits */\n length?: number;\n /** Callback when OTP value changes */\n onChange?: (value: string) => void;\n /** Callback when all digits are filled */\n onComplete?: (value: string) => void;\n /** The current value (controlled) */\n value?: string;\n /** Default value (uncontrolled) */\n defaultValue?: string;\n /** Size of the input boxes */\n size?: OTPInputSize;\n /** Visual variant */\n variant?: OTPInputVariant;\n /** Whether the input is disabled */\n disabled?: boolean;\n /** Whether there's an error */\n error?: boolean;\n /** Error message to display */\n errorMessage?: string;\n /** Placeholder character */\n placeholder?: string;\n /** Whether to mask the input (like password) */\n mask?: boolean;\n /** Whether to auto-focus the first input */\n autoFocus?: boolean;\n /** Input type - number only or alphanumeric */\n type?: \"number\" | \"text\";\n /** Custom className for the container */\n className?: string;\n /** Custom className for each input box */\n inputClassName?: string;\n /** Separator to show between groups of digits */\n separator?: React.ReactNode;\n /** Position(s) to show separator (e.g., [3] means after 3rd digit) */\n separatorPositions?: number[];\n /** Accessible label */\n \"aria-label\"?: string;\n}\n\nconst sizeStyles: Record<OTPInputSize, string> = {\n sm: \"w-9 h-10 text-base\",\n md: \"w-12 h-14 text-xl\",\n lg: \"w-14 h-16 text-2xl\",\n};\n\nconst variantStyles: Record<\n OTPInputVariant,\n { base: string; focus: string; error: string }\n> = {\n outlined: {\n base: \"border border-ds-border-field bg-ds-surface-1 rounded-lg text-ds-1\",\n focus: \"focus:border-ds-border-accent focus:ring-2 focus:ring-ds-accent\",\n error: \"border-destructive\",\n },\n filled: {\n base: \"border border-transparent bg-ds-accent-subtle rounded-lg text-ds-1\",\n focus:\n \"focus:border-ds-border-accent focus:bg-ds-surface-1 focus:ring-2 focus:ring-ds-accent\",\n error: \"bg-danger-subtle border-danger-border\",\n },\n underlined: {\n base: \"border-b-2 border-ds-border-1 bg-transparent rounded-none text-ds-1\",\n focus: \"focus:border-ds-border-accent\",\n error: \"border-destructive\",\n },\n};\n\nconst OTPInput = forwardRef<HTMLDivElement, OTPInputProps>(\n (\n {\n length = 6,\n onChange,\n onComplete,\n value: controlledValue,\n defaultValue = \"\",\n size = \"md\",\n variant = \"outlined\",\n disabled = false,\n error = false,\n errorMessage,\n placeholder = \"\",\n mask = false,\n autoFocus = false,\n type = \"number\",\n className = \"\",\n inputClassName = \"\",\n separator = <span className=\"text-ds-3 text-2xl mx-2\">—</span>,\n separatorPositions = [],\n \"aria-label\": ariaLabel = \"One-time password\",\n },\n ref,\n ) => {\n const [values, setValues] = useState<string[]>(() => {\n const initial = controlledValue ?? defaultValue;\n return initial\n .split(\"\")\n .slice(0, length)\n .concat(Array(length).fill(\"\"))\n .slice(0, length);\n });\n\n const inputRefs = useRef<(HTMLInputElement | null)[]>([]);\n\n // Sync with controlled value\n useEffect(() => {\n if (controlledValue !== undefined) {\n const newValues = controlledValue\n .split(\"\")\n .slice(0, length)\n .concat(Array(length).fill(\"\"))\n .slice(0, length);\n setValues(newValues);\n }\n }, [controlledValue, length]);\n\n // Auto-focus first input\n useEffect(() => {\n if (autoFocus && inputRefs.current[0]) {\n inputRefs.current[0].focus();\n }\n }, [autoFocus]);\n\n const focusInput = useCallback(\n (index: number) => {\n if (index >= 0 && index < length && inputRefs.current[index]) {\n inputRefs.current[index]?.focus();\n inputRefs.current[index]?.select();\n }\n },\n [length],\n );\n\n const handleChange = useCallback(\n (index: number, e: ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n const char = inputValue.slice(-1);\n\n // Validate input based on type\n if (type === \"number\" && char && !/^\\d$/.test(char)) {\n return;\n }\n\n const newValues = [...values];\n newValues[index] = char;\n setValues(newValues);\n\n const otpValue = newValues.join(\"\");\n onChange?.(otpValue);\n\n // Move to next input if value entered\n if (char && index < length - 1) {\n focusInput(index + 1);\n }\n\n // Check if complete\n if (newValues.every((v) => v !== \"\") && newValues.length === length) {\n onComplete?.(otpValue);\n }\n },\n [values, onChange, onComplete, length, type, focusInput],\n );\n\n const handleKeyDown = useCallback(\n (index: number, e: KeyboardEvent<HTMLInputElement>) => {\n switch (e.key) {\n case \"Backspace\":\n e.preventDefault();\n const newValues = [...values];\n if (values[index]) {\n // Clear current value\n newValues[index] = \"\";\n setValues(newValues);\n onChange?.(newValues.join(\"\"));\n } else if (index > 0) {\n // Move to previous and clear\n newValues[index - 1] = \"\";\n setValues(newValues);\n onChange?.(newValues.join(\"\"));\n focusInput(index - 1);\n }\n break;\n case \"ArrowLeft\":\n e.preventDefault();\n focusInput(index - 1);\n break;\n case \"ArrowRight\":\n e.preventDefault();\n focusInput(index + 1);\n break;\n case \"Delete\":\n e.preventDefault();\n const deleteValues = [...values];\n deleteValues[index] = \"\";\n setValues(deleteValues);\n onChange?.(deleteValues.join(\"\"));\n break;\n }\n },\n [values, onChange, focusInput],\n );\n\n const handlePaste = useCallback(\n (e: ClipboardEvent<HTMLInputElement>) => {\n e.preventDefault();\n const pastedData = e.clipboardData.getData(\"text\").slice(0, length);\n\n // Validate pasted content\n if (type === \"number\" && !/^\\d*$/.test(pastedData)) {\n return;\n }\n\n const newValues = pastedData\n .split(\"\")\n .slice(0, length)\n .concat(Array(length).fill(\"\"))\n .slice(0, length);\n\n setValues(newValues);\n const otpValue = newValues.join(\"\");\n onChange?.(otpValue);\n\n // Focus last filled input or last input\n const lastFilledIndex = newValues.findLastIndex((v) => v !== \"\");\n focusInput(Math.min(lastFilledIndex + 1, length - 1));\n\n // Check if complete\n if (newValues.every((v) => v !== \"\") && pastedData.length >= length) {\n onComplete?.(otpValue);\n }\n },\n [length, type, onChange, onComplete, focusInput],\n );\n\n const handleFocus = useCallback((e: React.FocusEvent<HTMLInputElement>) => {\n e.target.select();\n }, []);\n\n const renderInputs = () => {\n const inputs: React.ReactNode[] = [];\n\n for (let i = 0; i < length; i++) {\n // Add separator if needed\n if (separatorPositions.includes(i) && i > 0) {\n inputs.push(\n <div key={`separator-${i}`} className=\"flex items-center\">\n {separator}\n </div>,\n );\n }\n\n inputs.push(\n <input\n key={i}\n ref={(el) => {\n inputRefs.current[i] = el;\n // React 19: Return cleanup function\n return () => {\n inputRefs.current[i] = null;\n };\n }}\n type={mask ? \"password\" : \"text\"}\n inputMode={type === \"number\" ? \"numeric\" : \"text\"}\n pattern={type === \"number\" ? \"\\\\d*\" : undefined}\n maxLength={1}\n value={values[i] || \"\"}\n placeholder={placeholder}\n disabled={disabled}\n onChange={(e) => handleChange(i, e)}\n onKeyDown={(e) => handleKeyDown(i, e)}\n onPaste={handlePaste}\n onFocus={handleFocus}\n aria-label={`${ariaLabel} digit ${i + 1}`}\n className={`\n text-center font-semibold outline-none transition-all\n placeholder:text-ds-2\n ${sizeStyles[size]}\n ${variantStyles[variant].base}\n ${!error ? variantStyles[variant].focus : \"\"}\n ${error ? variantStyles[variant].error : \"\"}\n ${disabled ? \"opacity-50 cursor-not-allowed bg-ds-surface-1\" : \"\"}\n ${inputClassName}\n `}\n />,\n );\n }\n\n return inputs;\n };\n\n return (\n <div ref={ref} className={`flex flex-col gap-2 ${className}`}>\n <div\n className=\"flex items-center gap-2\"\n role=\"group\"\n aria-label={ariaLabel}\n >\n {renderInputs()}\n </div>\n {error && errorMessage && (\n <span className=\"text-sm text-destructive\">{errorMessage}</span>\n )}\n </div>\n );\n },\n);\n\nOTPInput.displayName = \"OTPInput\";\n\nexport default OTPInput;\nexport { OTPInput };\n"],"mappings":";;;AAuDA,IAAM,aAA2C;CAC/C,IAAI;CACJ,IAAI;CACJ,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gBAGP,WAAW,MAAM;gBACjB,cAAc,SAAS,KAAK;gBAC5B,CAAC,QAAQ,cAAc,SAAS,QAAQ,GAAG;gBAC3C,QAAQ,cAAc,SAAS,QAAQ,GAAG;gBAC1C,WAAW,kDAAkD,GAAG;gBAChE,eAAe;;GAEpB,GA9BM,CA8BN,CACH;EACF;EAEA,OAAO;CACT;CAEA,OACE,qBAAC,OAAD;EAAU;EAAK,WAAW,uBAAuB;YAAjD,CACE,oBAAC,OAAD;GACE,WAAU;GACV,MAAK;GACL,cAAY;aAEX,aAAa;EACX,CAAA,GACJ,SAAS,gBACR,oBAAC,QAAD;GAAM,WAAU;aAA4B;EAAmB,CAAA,CAE9D;;AAET,CACF;AAEA,SAAS,cAAc"}
@@ -1,4 +1,3 @@
1
- require("./chunk-B_GkZjkl.cjs");
2
1
  let react = require("react");
3
2
  let react_jsx_runtime = require("react/jsx-runtime");
4
3
  //#region src/components/forms/otp-input/OTPInput.tsx
@@ -183,4 +182,4 @@ Object.defineProperty(exports, "OTPInput", {
183
182
  }
184
183
  });
185
184
 
186
- //# sourceMappingURL=otp-input-B5-tuc0q.cjs.map
185
+ //# sourceMappingURL=otp-input-Dgw_47Z7.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"otp-input-B5-tuc0q.cjs","names":[],"sources":["../../src/components/forms/otp-input/OTPInput.tsx"],"sourcesContent":["import {\n forwardRef,\n useState,\n useRef,\n useCallback,\n useEffect,\n type KeyboardEvent,\n type ClipboardEvent,\n type ChangeEvent,\n} from \"react\";\n\nexport type OTPInputSize = \"sm\" | \"md\" | \"lg\";\nexport type OTPInputVariant = \"outlined\" | \"filled\" | \"underlined\";\n\nexport interface OTPInputProps {\n /** Number of OTP digits */\n length?: number;\n /** Callback when OTP value changes */\n onChange?: (value: string) => void;\n /** Callback when all digits are filled */\n onComplete?: (value: string) => void;\n /** The current value (controlled) */\n value?: string;\n /** Default value (uncontrolled) */\n defaultValue?: string;\n /** Size of the input boxes */\n size?: OTPInputSize;\n /** Visual variant */\n variant?: OTPInputVariant;\n /** Whether the input is disabled */\n disabled?: boolean;\n /** Whether there's an error */\n error?: boolean;\n /** Error message to display */\n errorMessage?: string;\n /** Placeholder character */\n placeholder?: string;\n /** Whether to mask the input (like password) */\n mask?: boolean;\n /** Whether to auto-focus the first input */\n autoFocus?: boolean;\n /** Input type - number only or alphanumeric */\n type?: \"number\" | \"text\";\n /** Custom className for the container */\n className?: string;\n /** Custom className for each input box */\n inputClassName?: string;\n /** Separator to show between groups of digits */\n separator?: React.ReactNode;\n /** Position(s) to show separator (e.g., [3] means after 3rd digit) */\n separatorPositions?: number[];\n /** Accessible label */\n \"aria-label\"?: string;\n}\n\nconst sizeStyles: Record<OTPInputSize, string> = {\n sm: \"w-9 h-10 text-base\",\n md: \"w-12 h-14 text-xl\",\n lg: \"w-14 h-16 text-2xl\",\n};\n\nconst variantStyles: Record<\n OTPInputVariant,\n { base: string; focus: string; error: string }\n> = {\n outlined: {\n base: \"border border-ds-border-field bg-ds-surface-1 rounded-lg text-ds-1\",\n focus: \"focus:border-ds-border-accent focus:ring-2 focus:ring-ds-accent\",\n error: \"border-destructive\",\n },\n filled: {\n base: \"border border-transparent bg-ds-accent-subtle rounded-lg text-ds-1\",\n focus:\n \"focus:border-ds-border-accent focus:bg-ds-surface-1 focus:ring-2 focus:ring-ds-accent\",\n error: \"bg-danger-subtle border-danger-border\",\n },\n underlined: {\n base: \"border-b-2 border-ds-border-1 bg-transparent rounded-none text-ds-1\",\n focus: \"focus:border-ds-border-accent\",\n error: \"border-destructive\",\n },\n};\n\nconst OTPInput = forwardRef<HTMLDivElement, OTPInputProps>(\n (\n {\n length = 6,\n onChange,\n onComplete,\n value: controlledValue,\n defaultValue = \"\",\n size = \"md\",\n variant = \"outlined\",\n disabled = false,\n error = false,\n errorMessage,\n placeholder = \"\",\n mask = false,\n autoFocus = false,\n type = \"number\",\n className = \"\",\n inputClassName = \"\",\n separator = <span className=\"text-ds-3 text-2xl mx-2\">—</span>,\n separatorPositions = [],\n \"aria-label\": ariaLabel = \"One-time password\",\n },\n ref,\n ) => {\n const [values, setValues] = useState<string[]>(() => {\n const initial = controlledValue ?? defaultValue;\n return initial\n .split(\"\")\n .slice(0, length)\n .concat(Array(length).fill(\"\"))\n .slice(0, length);\n });\n\n const inputRefs = useRef<(HTMLInputElement | null)[]>([]);\n\n // Sync with controlled value\n useEffect(() => {\n if (controlledValue !== undefined) {\n const newValues = controlledValue\n .split(\"\")\n .slice(0, length)\n .concat(Array(length).fill(\"\"))\n .slice(0, length);\n setValues(newValues);\n }\n }, [controlledValue, length]);\n\n // Auto-focus first input\n useEffect(() => {\n if (autoFocus && inputRefs.current[0]) {\n inputRefs.current[0].focus();\n }\n }, [autoFocus]);\n\n const focusInput = useCallback(\n (index: number) => {\n if (index >= 0 && index < length && inputRefs.current[index]) {\n inputRefs.current[index]?.focus();\n inputRefs.current[index]?.select();\n }\n },\n [length],\n );\n\n const handleChange = useCallback(\n (index: number, e: ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n const char = inputValue.slice(-1);\n\n // Validate input based on type\n if (type === \"number\" && char && !/^\\d$/.test(char)) {\n return;\n }\n\n const newValues = [...values];\n newValues[index] = char;\n setValues(newValues);\n\n const otpValue = newValues.join(\"\");\n onChange?.(otpValue);\n\n // Move to next input if value entered\n if (char && index < length - 1) {\n focusInput(index + 1);\n }\n\n // Check if complete\n if (newValues.every((v) => v !== \"\") && newValues.length === length) {\n onComplete?.(otpValue);\n }\n },\n [values, onChange, onComplete, length, type, focusInput],\n );\n\n const handleKeyDown = useCallback(\n (index: number, e: KeyboardEvent<HTMLInputElement>) => {\n switch (e.key) {\n case \"Backspace\":\n e.preventDefault();\n const newValues = [...values];\n if (values[index]) {\n // Clear current value\n newValues[index] = \"\";\n setValues(newValues);\n onChange?.(newValues.join(\"\"));\n } else if (index > 0) {\n // Move to previous and clear\n newValues[index - 1] = \"\";\n setValues(newValues);\n onChange?.(newValues.join(\"\"));\n focusInput(index - 1);\n }\n break;\n case \"ArrowLeft\":\n e.preventDefault();\n focusInput(index - 1);\n break;\n case \"ArrowRight\":\n e.preventDefault();\n focusInput(index + 1);\n break;\n case \"Delete\":\n e.preventDefault();\n const deleteValues = [...values];\n deleteValues[index] = \"\";\n setValues(deleteValues);\n onChange?.(deleteValues.join(\"\"));\n break;\n }\n },\n [values, onChange, focusInput],\n );\n\n const handlePaste = useCallback(\n (e: ClipboardEvent<HTMLInputElement>) => {\n e.preventDefault();\n const pastedData = e.clipboardData.getData(\"text\").slice(0, length);\n\n // Validate pasted content\n if (type === \"number\" && !/^\\d*$/.test(pastedData)) {\n return;\n }\n\n const newValues = pastedData\n .split(\"\")\n .slice(0, length)\n .concat(Array(length).fill(\"\"))\n .slice(0, length);\n\n setValues(newValues);\n const otpValue = newValues.join(\"\");\n onChange?.(otpValue);\n\n // Focus last filled input or last input\n const lastFilledIndex = newValues.findLastIndex((v) => v !== \"\");\n focusInput(Math.min(lastFilledIndex + 1, length - 1));\n\n // Check if complete\n if (newValues.every((v) => v !== \"\") && pastedData.length >= length) {\n onComplete?.(otpValue);\n }\n },\n [length, type, onChange, onComplete, focusInput],\n );\n\n const handleFocus = useCallback((e: React.FocusEvent<HTMLInputElement>) => {\n e.target.select();\n }, []);\n\n const renderInputs = () => {\n const inputs: React.ReactNode[] = [];\n\n for (let i = 0; i < length; i++) {\n // Add separator if needed\n if (separatorPositions.includes(i) && i > 0) {\n inputs.push(\n <div key={`separator-${i}`} className=\"flex items-center\">\n {separator}\n </div>,\n );\n }\n\n inputs.push(\n <input\n key={i}\n ref={(el) => {\n inputRefs.current[i] = el;\n // React 19: Return cleanup function\n return () => {\n inputRefs.current[i] = null;\n };\n }}\n type={mask ? \"password\" : \"text\"}\n inputMode={type === \"number\" ? \"numeric\" : \"text\"}\n pattern={type === \"number\" ? \"\\\\d*\" : undefined}\n maxLength={1}\n value={values[i] || \"\"}\n placeholder={placeholder}\n disabled={disabled}\n onChange={(e) => handleChange(i, e)}\n onKeyDown={(e) => handleKeyDown(i, e)}\n onPaste={handlePaste}\n onFocus={handleFocus}\n aria-label={`${ariaLabel} digit ${i + 1}`}\n className={`\n text-center font-semibold outline-none transition-all\n placeholder:text-ds-2\n ${sizeStyles[size]}\n ${variantStyles[variant].base}\n ${!error ? variantStyles[variant].focus : \"\"}\n ${error ? variantStyles[variant].error : \"\"}\n ${disabled ? \"opacity-50 cursor-not-allowed bg-ds-surface-1\" : \"\"}\n ${inputClassName}\n `}\n />,\n );\n }\n\n return inputs;\n };\n\n return (\n <div ref={ref} className={`flex flex-col gap-2 ${className}`}>\n <div\n className=\"flex items-center gap-2\"\n role=\"group\"\n aria-label={ariaLabel}\n >\n {renderInputs()}\n </div>\n {error && errorMessage && (\n <span className=\"text-sm text-destructive\">{errorMessage}</span>\n )}\n </div>\n );\n },\n);\n\nOTPInput.displayName = \"OTPInput\";\n\nexport default OTPInput;\nexport { OTPInput };\n"],"mappings":";;;;AAuDA,IAAM,aAA2C;CAC/C,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAED,IAAM,gBAGF;CACF,UAAU;EACR,MAAM;EACN,OAAO;EACP,OAAO;EACR;CACD,QAAQ;EACN,MAAM;EACN,OACE;EACF,OAAO;EACR;CACD,YAAY;EACV,MAAM;EACN,OAAO;EACP,OAAO;EACR;CACF;AAED,IAAM,YAAA,GAAA,MAAA,aAEF,EACE,SAAS,GACT,UACA,YACA,OAAO,iBACP,eAAe,IACf,OAAO,MACP,UAAU,YACV,WAAW,OACX,QAAQ,OACR,cACA,cAAc,IACd,OAAO,OACP,YAAY,OACZ,OAAO,UACP,YAAY,IACZ,iBAAiB,IACjB,YAAY,iBAAA,GAAA,kBAAA,KAAC,QAAD;CAAM,WAAU;WAA0B;CAAQ,CAAA,EAC9D,qBAAqB,EAAE,EACvB,cAAc,YAAY,uBAE5B,QACG;CACH,MAAM,CAAC,QAAQ,cAAA,GAAA,MAAA,gBAAsC;AAEnD,UADgB,mBAAmB,cAEhC,MAAM,GAAG,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A,CAE9D;;EAGX;AAED,SAAS,cAAc"}
1
+ {"version":3,"file":"otp-input-Dgw_47Z7.cjs","names":[],"sources":["../../src/components/forms/otp-input/OTPInput.tsx"],"sourcesContent":["import {\n forwardRef,\n useState,\n useRef,\n useCallback,\n useEffect,\n type KeyboardEvent,\n type ClipboardEvent,\n type ChangeEvent,\n} from \"react\";\n\nexport type OTPInputSize = \"sm\" | \"md\" | \"lg\";\nexport type OTPInputVariant = \"outlined\" | \"filled\" | \"underlined\";\n\nexport interface OTPInputProps {\n /** Number of OTP digits */\n length?: number;\n /** Callback when OTP value changes */\n onChange?: (value: string) => void;\n /** Callback when all digits are filled */\n onComplete?: (value: string) => void;\n /** The current value (controlled) */\n value?: string;\n /** Default value (uncontrolled) */\n defaultValue?: string;\n /** Size of the input boxes */\n size?: OTPInputSize;\n /** Visual variant */\n variant?: OTPInputVariant;\n /** Whether the input is disabled */\n disabled?: boolean;\n /** Whether there's an error */\n error?: boolean;\n /** Error message to display */\n errorMessage?: string;\n /** Placeholder character */\n placeholder?: string;\n /** Whether to mask the input (like password) */\n mask?: boolean;\n /** Whether to auto-focus the first input */\n autoFocus?: boolean;\n /** Input type - number only or alphanumeric */\n type?: \"number\" | \"text\";\n /** Custom className for the container */\n className?: string;\n /** Custom className for each input box */\n inputClassName?: string;\n /** Separator to show between groups of digits */\n separator?: React.ReactNode;\n /** Position(s) to show separator (e.g., [3] means after 3rd digit) */\n separatorPositions?: number[];\n /** Accessible label */\n \"aria-label\"?: string;\n}\n\nconst sizeStyles: Record<OTPInputSize, string> = {\n sm: \"w-9 h-10 text-base\",\n md: \"w-12 h-14 text-xl\",\n lg: \"w-14 h-16 text-2xl\",\n};\n\nconst variantStyles: Record<\n OTPInputVariant,\n { base: string; focus: string; error: string }\n> = {\n outlined: {\n base: \"border border-ds-border-field bg-ds-surface-1 rounded-lg text-ds-1\",\n focus: \"focus:border-ds-border-accent focus:ring-2 focus:ring-ds-accent\",\n error: \"border-destructive\",\n },\n filled: {\n base: \"border border-transparent bg-ds-accent-subtle rounded-lg text-ds-1\",\n focus:\n \"focus:border-ds-border-accent focus:bg-ds-surface-1 focus:ring-2 focus:ring-ds-accent\",\n error: \"bg-danger-subtle border-danger-border\",\n },\n underlined: {\n base: \"border-b-2 border-ds-border-1 bg-transparent rounded-none text-ds-1\",\n focus: \"focus:border-ds-border-accent\",\n error: \"border-destructive\",\n },\n};\n\nconst OTPInput = forwardRef<HTMLDivElement, OTPInputProps>(\n (\n {\n length = 6,\n onChange,\n onComplete,\n value: controlledValue,\n defaultValue = \"\",\n size = \"md\",\n variant = \"outlined\",\n disabled = false,\n error = false,\n errorMessage,\n placeholder = \"\",\n mask = false,\n autoFocus = false,\n type = \"number\",\n className = \"\",\n inputClassName = \"\",\n separator = <span className=\"text-ds-3 text-2xl mx-2\">—</span>,\n separatorPositions = [],\n \"aria-label\": ariaLabel = \"One-time password\",\n },\n ref,\n ) => {\n const [values, setValues] = useState<string[]>(() => {\n const initial = controlledValue ?? defaultValue;\n return initial\n .split(\"\")\n .slice(0, length)\n .concat(Array(length).fill(\"\"))\n .slice(0, length);\n });\n\n const inputRefs = useRef<(HTMLInputElement | null)[]>([]);\n\n // Sync with controlled value\n useEffect(() => {\n if (controlledValue !== undefined) {\n const newValues = controlledValue\n .split(\"\")\n .slice(0, length)\n .concat(Array(length).fill(\"\"))\n .slice(0, length);\n setValues(newValues);\n }\n }, [controlledValue, length]);\n\n // Auto-focus first input\n useEffect(() => {\n if (autoFocus && inputRefs.current[0]) {\n inputRefs.current[0].focus();\n }\n }, [autoFocus]);\n\n const focusInput = useCallback(\n (index: number) => {\n if (index >= 0 && index < length && inputRefs.current[index]) {\n inputRefs.current[index]?.focus();\n inputRefs.current[index]?.select();\n }\n },\n [length],\n );\n\n const handleChange = useCallback(\n (index: number, e: ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n const char = inputValue.slice(-1);\n\n // Validate input based on type\n if (type === \"number\" && char && !/^\\d$/.test(char)) {\n return;\n }\n\n const newValues = [...values];\n newValues[index] = char;\n setValues(newValues);\n\n const otpValue = newValues.join(\"\");\n onChange?.(otpValue);\n\n // Move to next input if value entered\n if (char && index < length - 1) {\n focusInput(index + 1);\n }\n\n // Check if complete\n if (newValues.every((v) => v !== \"\") && newValues.length === length) {\n onComplete?.(otpValue);\n }\n },\n [values, onChange, onComplete, length, type, focusInput],\n );\n\n const handleKeyDown = useCallback(\n (index: number, e: KeyboardEvent<HTMLInputElement>) => {\n switch (e.key) {\n case \"Backspace\":\n e.preventDefault();\n const newValues = [...values];\n if (values[index]) {\n // Clear current value\n newValues[index] = \"\";\n setValues(newValues);\n onChange?.(newValues.join(\"\"));\n } else if (index > 0) {\n // Move to previous and clear\n newValues[index - 1] = \"\";\n setValues(newValues);\n onChange?.(newValues.join(\"\"));\n focusInput(index - 1);\n }\n break;\n case \"ArrowLeft\":\n e.preventDefault();\n focusInput(index - 1);\n break;\n case \"ArrowRight\":\n e.preventDefault();\n focusInput(index + 1);\n break;\n case \"Delete\":\n e.preventDefault();\n const deleteValues = [...values];\n deleteValues[index] = \"\";\n setValues(deleteValues);\n onChange?.(deleteValues.join(\"\"));\n break;\n }\n },\n [values, onChange, focusInput],\n );\n\n const handlePaste = useCallback(\n (e: ClipboardEvent<HTMLInputElement>) => {\n e.preventDefault();\n const pastedData = e.clipboardData.getData(\"text\").slice(0, length);\n\n // Validate pasted content\n if (type === \"number\" && !/^\\d*$/.test(pastedData)) {\n return;\n }\n\n const newValues = pastedData\n .split(\"\")\n .slice(0, length)\n .concat(Array(length).fill(\"\"))\n .slice(0, length);\n\n setValues(newValues);\n const otpValue = newValues.join(\"\");\n onChange?.(otpValue);\n\n // Focus last filled input or last input\n const lastFilledIndex = newValues.findLastIndex((v) => v !== \"\");\n focusInput(Math.min(lastFilledIndex + 1, length - 1));\n\n // Check if complete\n if (newValues.every((v) => v !== \"\") && pastedData.length >= length) {\n onComplete?.(otpValue);\n }\n },\n [length, type, onChange, onComplete, focusInput],\n );\n\n const handleFocus = useCallback((e: React.FocusEvent<HTMLInputElement>) => {\n e.target.select();\n }, []);\n\n const renderInputs = () => {\n const inputs: React.ReactNode[] = [];\n\n for (let i = 0; i < length; i++) {\n // Add separator if needed\n if (separatorPositions.includes(i) && i > 0) {\n inputs.push(\n <div key={`separator-${i}`} className=\"flex items-center\">\n {separator}\n </div>,\n );\n }\n\n inputs.push(\n <input\n key={i}\n ref={(el) => {\n inputRefs.current[i] = el;\n // React 19: Return cleanup function\n return () => {\n inputRefs.current[i] = null;\n };\n }}\n type={mask ? \"password\" : \"text\"}\n inputMode={type === \"number\" ? \"numeric\" : \"text\"}\n pattern={type === \"number\" ? \"\\\\d*\" : undefined}\n maxLength={1}\n value={values[i] || \"\"}\n placeholder={placeholder}\n disabled={disabled}\n onChange={(e) => handleChange(i, e)}\n onKeyDown={(e) => handleKeyDown(i, e)}\n onPaste={handlePaste}\n onFocus={handleFocus}\n aria-label={`${ariaLabel} digit ${i + 1}`}\n className={`\n text-center font-semibold outline-none transition-all\n placeholder:text-ds-2\n ${sizeStyles[size]}\n ${variantStyles[variant].base}\n ${!error ? variantStyles[variant].focus : \"\"}\n ${error ? variantStyles[variant].error : \"\"}\n ${disabled ? \"opacity-50 cursor-not-allowed bg-ds-surface-1\" : \"\"}\n ${inputClassName}\n `}\n />,\n );\n }\n\n return inputs;\n };\n\n return (\n <div ref={ref} className={`flex flex-col gap-2 ${className}`}>\n <div\n className=\"flex items-center gap-2\"\n role=\"group\"\n aria-label={ariaLabel}\n >\n {renderInputs()}\n </div>\n {error && errorMessage && (\n <span className=\"text-sm text-destructive\">{errorMessage}</span>\n )}\n </div>\n );\n },\n);\n\nOTPInput.displayName = \"OTPInput\";\n\nexport default OTPInput;\nexport { OTPInput };\n"],"mappings":";;;AAuDA,IAAM,aAA2C;CAC/C,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,IAAM,gBAGF;CACF,UAAU;EACR,MAAM;EACN,OAAO;EACP,OAAO;CACT;CACA,QAA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AAY,MAAM,cAAc,GAAG,CAAC;IACpC,SAAS;IACT,SAAS;IACT,cAAY,GAAG,UAAU,SAAS,IAAI;IACtC,WAAW;;;gBAGP,WAAW,MAAM;gBACjB,cAAc,SAAS,KAAK;gBAC5B,CAAC,QAAQ,cAAc,SAAS,QAAQ,GAAG;gBAC3C,QAAQ,cAAc,SAAS,QAAQ,GAAG;gBAC1C,WAAW,kDAAkD,GAAG;gBAChE,eAAe;;GAEpB,GA9BM,CA8BN,CACH;EACF;EAEA,OAAO;CACT;CAEA,OACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EAAU;EAAK,WAAW,uBAAuB;YAAjD,CACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;GACE,WAAU;GACV,MAAK;GACL,cAAY;aAEX,aAAa;EACX,CAAA,GACJ,SAAS,gBACR,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,WAAU;aAA4B;EAAmB,CAAA,CAE9D;;AAET,CACF;AAEA,SAAS,cAAc"}
@@ -1,4 +1,3 @@
1
- require("./chunk-B_GkZjkl.cjs");
2
1
  let react = require("react");
3
2
  //#region src/components/shared/overlay.ts
4
3
  var focusableSelectors = [
@@ -57,4 +56,4 @@ Object.defineProperty(exports, "useOverlayEffects", {
57
56
  }
58
57
  });
59
58
 
60
- //# sourceMappingURL=overlay-DzE_GyYf.cjs.map
59
+ //# sourceMappingURL=overlay-15EzdrIu.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"overlay-DzE_GyYf.cjs","names":[],"sources":["../../src/components/shared/overlay.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport type { RefObject } from \"react\";\n\nconst focusableSelectors = [\n \"a[href]\",\n \"button:not([disabled])\",\n \"textarea:not([disabled])\",\n \"input:not([disabled])\",\n \"select:not([disabled])\",\n '[tabindex]:not([tabindex=\"-1\"])',\n];\n\nconst scheduleMicrotask = (callback: () => void) => {\n if (typeof queueMicrotask === \"function\") {\n queueMicrotask(callback);\n return;\n }\n Promise.resolve()\n .then(callback)\n .catch(() => {\n callback();\n });\n};\n\nexport const useBodyScrollLock = (active: boolean) => {\n useEffect(() => {\n if (!active || typeof window === \"undefined\") return;\n const { overflow } = document.body.style;\n document.body.style.overflow = \"hidden\";\n return () => {\n document.body.style.overflow = overflow;\n };\n }, [active]);\n};\n\nexport const useFocusTrap = (\n containerRef: RefObject<HTMLElement | null>,\n active: boolean,\n) => {\n useEffect(() => {\n if (!active || typeof window === \"undefined\") return;\n const container = containerRef.current;\n if (!container) return;\n\n const getFocusable = () =>\n Array.from(\n container.querySelectorAll<HTMLElement>(focusableSelectors.join(\",\")),\n ).filter(\n (el) => !el.hasAttribute(\"disabled\") && !el.getAttribute(\"aria-hidden\"),\n );\n\n const focusable = getFocusable();\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n first?.focus();\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key !== \"Tab\" || focusable.length === 0) return;\n if (event.shiftKey) {\n if (document.activeElement === first) {\n event.preventDefault();\n (last || first)?.focus();\n }\n } else if (document.activeElement === last) {\n event.preventDefault();\n (first || last)?.focus();\n }\n };\n\n container.addEventListener(\"keydown\", handleKeyDown);\n return () => container.removeEventListener(\"keydown\", handleKeyDown);\n }, [containerRef, active]);\n};\n\nexport const useOverlayEffects = (\n containerRef: RefObject<HTMLElement | null>,\n active: boolean,\n) => {\n useBodyScrollLock(active);\n useFocusTrap(containerRef, active);\n};\n\nexport const useOverlayTransition = (open: boolean, duration = 200) => {\n const [closing, setClosing] = useState(false);\n\n useEffect(() => {\n if (open) {\n return undefined;\n }\n\n scheduleMicrotask(() => setClosing(true));\n const timer = setTimeout(() => setClosing(false), duration);\n\n return () => {\n clearTimeout(timer);\n scheduleMicrotask(() => setClosing(false));\n };\n }, [open, duration]);\n\n const shouldRender = open || closing;\n const transitionState: \"open\" | \"closing\" | \"closed\" = open\n ? \"open\"\n : closing\n ? \"closing\"\n : \"closed\";\n\n return { shouldRender, transitionState };\n};\n"],"mappings":";;;AAGA,IAAM,qBAAqB;CACzB;CACA;CACA;CACA;CACA;CACA;CACD;AAcD,IAAa,qBAAqB,WAAoB;AACpD,EAAA,GAAA,MAAA,iBAAgB;AACd,MAAI,CAAC,UAAU,OAAO,WAAW,YAAa;EAC9C,MAAM,EAAE,aAAa,SAAS,KAAK;AACnC,WAAS,KAAK,MAAM,WAAW;AAC/B,eAAa;AACX,YAAS,KAAK,MAAM,WAAW;;IAEhC,CAAC,OAAO,CAAC;;AAGd,IAAa,gBACX,cACA,WACG;AACH,EAAA,GAAA,MAAA,iBAAgB;AACd,MAAI,CAAC,UAAU,OAAO,WAAW,YAAa;EAC9C,MAAM,YAAY,aAAa;AAC/B,MAAI,CAAC,UAAW;EAEhB,MAAM,qBACJ,MAAM,KACJ,UAAU,iBAA8B,mBAAmB,KAAK,IAAI,CAAC,CACtE,CAAC,QACC,OAAO,CAAC,GAAG,aAAa,WAAW,IAAI,CAAC,GAAG,aAAa,cAAc,CACxE;EAEH,MAAM,YAAY,cAAc;EAChC,MAAM,QAAQ,UAAU;EACxB,MAAM,OAAO,UAAU,UAAU,SAAS;AAC1C,SAAO,OAAO;EAEd,MAAM,iBAAiB,UAAyB;AAC9C,OAAI,MAAM,QAAQ,SAAS,UAAU,WAAW,EAAG;AACnD,OAAI,MAAM;QACJ,SAAS,kBAAkB,OAAO;AACpC,WAAM,gBAAgB;AACtB,MAAC,QAAQ,QAAQ,OAAO;;cAEjB,SAAS,kBAAkB,MAAM;AAC1C,UAAM,gBAAgB;AACtB,KAAC,SAAS,OAAO,OAAO;;;AAI5B,YAAU,iBAAiB,WAAW,cAAc;AACpD,eAAa,UAAU,oBAAoB,WAAW,cAAc;IACnE,CAAC,cAAc,OAAO,CAAC;;AAG5B,IAAa,qBACX,cACA,WACG;AACH,mBAAkB,OAAO;AACzB,cAAa,cAAc,OAAO"}
1
+ {"version":3,"file":"overlay-15EzdrIu.cjs","names":[],"sources":["../../src/components/shared/overlay.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport type { RefObject } from \"react\";\n\nconst focusableSelectors = [\n \"a[href]\",\n \"button:not([disabled])\",\n \"textarea:not([disabled])\",\n \"input:not([disabled])\",\n \"select:not([disabled])\",\n '[tabindex]:not([tabindex=\"-1\"])',\n];\n\nconst scheduleMicrotask = (callback: () => void) => {\n if (typeof queueMicrotask === \"function\") {\n queueMicrotask(callback);\n return;\n }\n Promise.resolve()\n .then(callback)\n .catch(() => {\n callback();\n });\n};\n\nexport const useBodyScrollLock = (active: boolean) => {\n useEffect(() => {\n if (!active || typeof window === \"undefined\") return;\n const { overflow } = document.body.style;\n document.body.style.overflow = \"hidden\";\n return () => {\n document.body.style.overflow = overflow;\n };\n }, [active]);\n};\n\nexport const useFocusTrap = (\n containerRef: RefObject<HTMLElement | null>,\n active: boolean,\n) => {\n useEffect(() => {\n if (!active || typeof window === \"undefined\") return;\n const container = containerRef.current;\n if (!container) return;\n\n const getFocusable = () =>\n Array.from(\n container.querySelectorAll<HTMLElement>(focusableSelectors.join(\",\")),\n ).filter(\n (el) => !el.hasAttribute(\"disabled\") && !el.getAttribute(\"aria-hidden\"),\n );\n\n const focusable = getFocusable();\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n first?.focus();\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key !== \"Tab\" || focusable.length === 0) return;\n if (event.shiftKey) {\n if (document.activeElement === first) {\n event.preventDefault();\n (last || first)?.focus();\n }\n } else if (document.activeElement === last) {\n event.preventDefault();\n (first || last)?.focus();\n }\n };\n\n container.addEventListener(\"keydown\", handleKeyDown);\n return () => container.removeEventListener(\"keydown\", handleKeyDown);\n }, [containerRef, active]);\n};\n\nexport const useOverlayEffects = (\n containerRef: RefObject<HTMLElement | null>,\n active: boolean,\n) => {\n useBodyScrollLock(active);\n useFocusTrap(containerRef, active);\n};\n\nexport const useOverlayTransition = (open: boolean, duration = 200) => {\n const [closing, setClosing] = useState(false);\n\n useEffect(() => {\n if (open) {\n return undefined;\n }\n\n scheduleMicrotask(() => setClosing(true));\n const timer = setTimeout(() => setClosing(false), duration);\n\n return () => {\n clearTimeout(timer);\n scheduleMicrotask(() => setClosing(false));\n };\n }, [open, duration]);\n\n const shouldRender = open || closing;\n const transitionState: \"open\" | \"closing\" | \"closed\" = open\n ? \"open\"\n : closing\n ? \"closing\"\n : \"closed\";\n\n return { shouldRender, transitionState };\n};\n"],"mappings":";;AAGA,IAAM,qBAAqB;CACzB;CACA;CACA;CACA;CACA;CACA;AACF;AAcA,IAAa,qBAAqB,WAAoB;CACpD,CAAA,GAAA,MAAA,iBAAgB;EACd,IAAI,CAAC,UAAU,OAAO,WAAW,aAAa;EAC9C,MAAM,EAAE,aAAa,SAAS,KAAK;EACnC,SAAS,KAAK,MAAM,WAAW;EAC/B,aAAa;GACX,SAAS,KAAK,MAAM,WAAW;EACjC;CACF,GAAG,CAAC,MAAM,CAAC;AACb;AAEA,IAAa,gBACX,cACA,WACG;CACH,CAAA,GAAA,MAAA,iBAAgB;EACd,IAAI,CAAC,UAAU,OAAO,WAAW,aAAa;EAC9C,MAAM,YAAY,aAAa;EAC/B,IAAI,CAAC,WAAW;EAEhB,MAAM,qBACJ,MAAM,KACJ,UAAU,iBAA8B,mBAAmB,KAAK,GAAG,CAAC,CACtE,EAAE,QACC,OAAO,CAAC,GAAG,aAAa,UAAU,KAAK,CAAC,GAAG,aAAa,aAAa,CACxE;EAEF,MAAM,YAAY,aAAa;EAC/B,MAAM,QAAQ,UAAU;EACxB,MAAM,OAAO,UAAU,UAAU,SAAS;EAC1C,OAAO,MAAM;EAEb,MAAM,iBAAiB,UAAyB;GAC9C,IAAI,MAAM,QAAQ,SAAS,UAAU,WAAW,GAAG;GACnD,IAAI,MAAM;QACJ,SAAS,kBAAkB,OAAO;KACpC,MAAM,eAAe;KACrB,CAAC,QAAQ,QAAQ,MAAM;IACzB;UACK,IAAI,SAAS,kBAAkB,MAAM;IAC1C,MAAM,eAAe;IACrB,CAAC,SAAS,OAAO,MAAM;GACzB;EACF;EAEA,UAAU,iBAAiB,WAAW,aAAa;EACnD,aAAa,UAAU,oBAAoB,WAAW,aAAa;CACrE,GAAG,CAAC,cAAc,MAAM,CAAC;AAC3B;AAEA,IAAa,qBACX,cACA,WACG;CACH,kBAAkB,MAAM;CACxB,aAAa,cAAc,MAAM;AACnC"}
@@ -51,4 +51,4 @@ var useOverlayEffects = (containerRef, active) => {
51
51
  //#endregion
52
52
  export { useOverlayEffects as t };
53
53
 
54
- //# sourceMappingURL=overlay-CG1dMYtO.mjs.map
54
+ //# sourceMappingURL=overlay-BMbhF-EC.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"overlay-CG1dMYtO.mjs","names":[],"sources":["../../src/components/shared/overlay.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport type { RefObject } from \"react\";\n\nconst focusableSelectors = [\n \"a[href]\",\n \"button:not([disabled])\",\n \"textarea:not([disabled])\",\n \"input:not([disabled])\",\n \"select:not([disabled])\",\n '[tabindex]:not([tabindex=\"-1\"])',\n];\n\nconst scheduleMicrotask = (callback: () => void) => {\n if (typeof queueMicrotask === \"function\") {\n queueMicrotask(callback);\n return;\n }\n Promise.resolve()\n .then(callback)\n .catch(() => {\n callback();\n });\n};\n\nexport const useBodyScrollLock = (active: boolean) => {\n useEffect(() => {\n if (!active || typeof window === \"undefined\") return;\n const { overflow } = document.body.style;\n document.body.style.overflow = \"hidden\";\n return () => {\n document.body.style.overflow = overflow;\n };\n }, [active]);\n};\n\nexport const useFocusTrap = (\n containerRef: RefObject<HTMLElement | null>,\n active: boolean,\n) => {\n useEffect(() => {\n if (!active || typeof window === \"undefined\") return;\n const container = containerRef.current;\n if (!container) return;\n\n const getFocusable = () =>\n Array.from(\n container.querySelectorAll<HTMLElement>(focusableSelectors.join(\",\")),\n ).filter(\n (el) => !el.hasAttribute(\"disabled\") && !el.getAttribute(\"aria-hidden\"),\n );\n\n const focusable = getFocusable();\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n first?.focus();\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key !== \"Tab\" || focusable.length === 0) return;\n if (event.shiftKey) {\n if (document.activeElement === first) {\n event.preventDefault();\n (last || first)?.focus();\n }\n } else if (document.activeElement === last) {\n event.preventDefault();\n (first || last)?.focus();\n }\n };\n\n container.addEventListener(\"keydown\", handleKeyDown);\n return () => container.removeEventListener(\"keydown\", handleKeyDown);\n }, [containerRef, active]);\n};\n\nexport const useOverlayEffects = (\n containerRef: RefObject<HTMLElement | null>,\n active: boolean,\n) => {\n useBodyScrollLock(active);\n useFocusTrap(containerRef, active);\n};\n\nexport const useOverlayTransition = (open: boolean, duration = 200) => {\n const [closing, setClosing] = useState(false);\n\n useEffect(() => {\n if (open) {\n return undefined;\n }\n\n scheduleMicrotask(() => setClosing(true));\n const timer = setTimeout(() => setClosing(false), duration);\n\n return () => {\n clearTimeout(timer);\n scheduleMicrotask(() => setClosing(false));\n };\n }, [open, duration]);\n\n const shouldRender = open || closing;\n const transitionState: \"open\" | \"closing\" | \"closed\" = open\n ? \"open\"\n : closing\n ? \"closing\"\n : \"closed\";\n\n return { shouldRender, transitionState };\n};\n"],"mappings":";;AAGA,IAAM,qBAAqB;CACzB;CACA;CACA;CACA;CACA;CACA;CACD;AAcD,IAAa,qBAAqB,WAAoB;AACpD,iBAAgB;AACd,MAAI,CAAC,UAAU,OAAO,WAAW,YAAa;EAC9C,MAAM,EAAE,aAAa,SAAS,KAAK;AACnC,WAAS,KAAK,MAAM,WAAW;AAC/B,eAAa;AACX,YAAS,KAAK,MAAM,WAAW;;IAEhC,CAAC,OAAO,CAAC;;AAGd,IAAa,gBACX,cACA,WACG;AACH,iBAAgB;AACd,MAAI,CAAC,UAAU,OAAO,WAAW,YAAa;EAC9C,MAAM,YAAY,aAAa;AAC/B,MAAI,CAAC,UAAW;EAEhB,MAAM,qBACJ,MAAM,KACJ,UAAU,iBAA8B,mBAAmB,KAAK,IAAI,CAAC,CACtE,CAAC,QACC,OAAO,CAAC,GAAG,aAAa,WAAW,IAAI,CAAC,GAAG,aAAa,cAAc,CACxE;EAEH,MAAM,YAAY,cAAc;EAChC,MAAM,QAAQ,UAAU;EACxB,MAAM,OAAO,UAAU,UAAU,SAAS;AAC1C,SAAO,OAAO;EAEd,MAAM,iBAAiB,UAAyB;AAC9C,OAAI,MAAM,QAAQ,SAAS,UAAU,WAAW,EAAG;AACnD,OAAI,MAAM;QACJ,SAAS,kBAAkB,OAAO;AACpC,WAAM,gBAAgB;AACtB,MAAC,QAAQ,QAAQ,OAAO;;cAEjB,SAAS,kBAAkB,MAAM;AAC1C,UAAM,gBAAgB;AACtB,KAAC,SAAS,OAAO,OAAO;;;AAI5B,YAAU,iBAAiB,WAAW,cAAc;AACpD,eAAa,UAAU,oBAAoB,WAAW,cAAc;IACnE,CAAC,cAAc,OAAO,CAAC;;AAG5B,IAAa,qBACX,cACA,WACG;AACH,mBAAkB,OAAO;AACzB,cAAa,cAAc,OAAO"}
1
+ {"version":3,"file":"overlay-BMbhF-EC.mjs","names":[],"sources":["../../src/components/shared/overlay.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport type { RefObject } from \"react\";\n\nconst focusableSelectors = [\n \"a[href]\",\n \"button:not([disabled])\",\n \"textarea:not([disabled])\",\n \"input:not([disabled])\",\n \"select:not([disabled])\",\n '[tabindex]:not([tabindex=\"-1\"])',\n];\n\nconst scheduleMicrotask = (callback: () => void) => {\n if (typeof queueMicrotask === \"function\") {\n queueMicrotask(callback);\n return;\n }\n Promise.resolve()\n .then(callback)\n .catch(() => {\n callback();\n });\n};\n\nexport const useBodyScrollLock = (active: boolean) => {\n useEffect(() => {\n if (!active || typeof window === \"undefined\") return;\n const { overflow } = document.body.style;\n document.body.style.overflow = \"hidden\";\n return () => {\n document.body.style.overflow = overflow;\n };\n }, [active]);\n};\n\nexport const useFocusTrap = (\n containerRef: RefObject<HTMLElement | null>,\n active: boolean,\n) => {\n useEffect(() => {\n if (!active || typeof window === \"undefined\") return;\n const container = containerRef.current;\n if (!container) return;\n\n const getFocusable = () =>\n Array.from(\n container.querySelectorAll<HTMLElement>(focusableSelectors.join(\",\")),\n ).filter(\n (el) => !el.hasAttribute(\"disabled\") && !el.getAttribute(\"aria-hidden\"),\n );\n\n const focusable = getFocusable();\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n first?.focus();\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key !== \"Tab\" || focusable.length === 0) return;\n if (event.shiftKey) {\n if (document.activeElement === first) {\n event.preventDefault();\n (last || first)?.focus();\n }\n } else if (document.activeElement === last) {\n event.preventDefault();\n (first || last)?.focus();\n }\n };\n\n container.addEventListener(\"keydown\", handleKeyDown);\n return () => container.removeEventListener(\"keydown\", handleKeyDown);\n }, [containerRef, active]);\n};\n\nexport const useOverlayEffects = (\n containerRef: RefObject<HTMLElement | null>,\n active: boolean,\n) => {\n useBodyScrollLock(active);\n useFocusTrap(containerRef, active);\n};\n\nexport const useOverlayTransition = (open: boolean, duration = 200) => {\n const [closing, setClosing] = useState(false);\n\n useEffect(() => {\n if (open) {\n return undefined;\n }\n\n scheduleMicrotask(() => setClosing(true));\n const timer = setTimeout(() => setClosing(false), duration);\n\n return () => {\n clearTimeout(timer);\n scheduleMicrotask(() => setClosing(false));\n };\n }, [open, duration]);\n\n const shouldRender = open || closing;\n const transitionState: \"open\" | \"closing\" | \"closed\" = open\n ? \"open\"\n : closing\n ? \"closing\"\n : \"closed\";\n\n return { shouldRender, transitionState };\n};\n"],"mappings":";;AAGA,IAAM,qBAAqB;CACzB;CACA;CACA;CACA;CACA;CACA;AACF;AAcA,IAAa,qBAAqB,WAAoB;CACpD,gBAAgB;EACd,IAAI,CAAC,UAAU,OAAO,WAAW,aAAa;EAC9C,MAAM,EAAE,aAAa,SAAS,KAAK;EACnC,SAAS,KAAK,MAAM,WAAW;EAC/B,aAAa;GACX,SAAS,KAAK,MAAM,WAAW;EACjC;CACF,GAAG,CAAC,MAAM,CAAC;AACb;AAEA,IAAa,gBACX,cACA,WACG;CACH,gBAAgB;EACd,IAAI,CAAC,UAAU,OAAO,WAAW,aAAa;EAC9C,MAAM,YAAY,aAAa;EAC/B,IAAI,CAAC,WAAW;EAEhB,MAAM,qBACJ,MAAM,KACJ,UAAU,iBAA8B,mBAAmB,KAAK,GAAG,CAAC,CACtE,EAAE,QACC,OAAO,CAAC,GAAG,aAAa,UAAU,KAAK,CAAC,GAAG,aAAa,aAAa,CACxE;EAEF,MAAM,YAAY,aAAa;EAC/B,MAAM,QAAQ,UAAU;EACxB,MAAM,OAAO,UAAU,UAAU,SAAS;EAC1C,OAAO,MAAM;EAEb,MAAM,iBAAiB,UAAyB;GAC9C,IAAI,MAAM,QAAQ,SAAS,UAAU,WAAW,GAAG;GACnD,IAAI,MAAM;QACJ,SAAS,kBAAkB,OAAO;KACpC,MAAM,eAAe;KACrB,CAAC,QAAQ,QAAQ,MAAM;IACzB;UACK,IAAI,SAAS,kBAAkB,MAAM;IAC1C,MAAM,eAAe;IACrB,CAAC,SAAS,OAAO,MAAM;GACzB;EACF;EAEA,UAAU,iBAAiB,WAAW,aAAa;EACnD,aAAa,UAAU,oBAAoB,WAAW,aAAa;CACrE,GAAG,CAAC,cAAc,MAAM,CAAC;AAC3B;AAEA,IAAa,qBACX,cACA,WACG;CACH,kBAAkB,MAAM;CACxB,aAAa,cAAc,MAAM;AACnC"}
@@ -1,5 +1,4 @@
1
- require("./chunk-B_GkZjkl.cjs");
2
- const require_icons = require("./icons-ub9iu-JG.cjs");
1
+ const require_icons = require("./icons-Ci8yEvvF.cjs");
3
2
  let react = require("react");
4
3
  let react_jsx_runtime = require("react/jsx-runtime");
5
4
  //#region src/components/forms/password-strength-meter/PasswordCriteria.tsx
@@ -102,4 +101,4 @@ Object.defineProperty(exports, "PasswordStrengthMeter", {
102
101
  }
103
102
  });
104
103
 
105
- //# sourceMappingURL=password-strength-meter-_o1T1HLO.cjs.map
104
+ //# sourceMappingURL=password-strength-meter-Be1c-dnK.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"password-strength-meter-_o1T1HLO.cjs","names":[],"sources":["../../src/components/forms/password-strength-meter/PasswordCriteria.tsx","../../src/components/forms/password-strength-meter/PasswordStrengthMeter.tsx"],"sourcesContent":["import { CheckIcon, CloseIcon } from \"../../icons\";\n\ninterface PasswordCriteriaProps {\n password: string;\n}\n\nexport const PasswordCriteria = ({ password }: PasswordCriteriaProps) => {\n const criteria = [\n { label: \"At least 6 characters\", met: password.length >= 6 },\n { label: \"Contains uppercase letter\", met: /[A-Z]/.test(password) },\n { label: \"Contains lowercase letter\", met: /[a-z]/.test(password) },\n { label: \"Contains a number\", met: /\\d/.test(password) },\n { label: \"Contains special character\", met: /[^A-Za-z0-9]/.test(password) },\n ];\n\n return (\n <div className=\"mt-2 space-y-1\">\n {criteria.map((item) => (\n <div key={item.label} className=\"flex items-center text-xs\">\n {item.met ? (\n <CheckIcon className=\"me-2 size-4 text-success\" title=\"CheckIcon\" />\n ) : (\n <CloseIcon className=\"me-2 size-4 text-ds-3\" title=\"CloseIcon\" />\n )}\n <span className={item.met ? \"text-success\" : \"text-ds-2\"}>\n {item.label}\n </span>\n </div>\n ))}\n </div>\n );\n};\n","import { useMemo } from \"react\";\n\nimport { PasswordCriteria } from \"./PasswordCriteria\";\n\nexport interface PasswordStrengthMeterProps {\n password: string;\n}\n\nexport function PasswordStrengthMeter({\n password,\n}: PasswordStrengthMeterProps) {\n // Calculate password strength using an object mapping approach\n const getStrength = (pass: string): number => {\n const criteria = {\n minLength: pass.length >= 6,\n hasMixedCase: /[a-z]/.test(pass) && /[A-Z]/.test(pass),\n hasNumber: /\\d/.test(pass),\n hasSpecialChar: /[^a-zA-Z\\d]/.test(pass),\n };\n\n // Count the number of criteria that pass\n return Object.values(criteria).filter(Boolean).length;\n };\n\n // Memoize the strength calculation to avoid unnecessary recalculations\n const strength = useMemo(() => getStrength(password), [password]);\n\n // Determine strength color based on the calculated strength\n const getColor = (strength: number): string => {\n const colors = [\n \"bg-ds-state-danger\",\n \"bg-ds-state-danger\",\n \"bg-ds-state-warning\",\n \"bg-ds-state-warning\",\n \"bg-ds-state-success\",\n ];\n return colors[strength] || \"bg-ds-surface-3\";\n };\n\n // Get a text label corresponding to the password strength\n const getStrengthText = (strength: number): string => {\n const strengthLevels = [\"Very Weak\", \"Weak\", \"Fair\", \"Good\", \"Strong\"];\n return strengthLevels[strength] || \"Very Weak\";\n };\n\n return (\n <div className=\"mt-2\">\n {/* Strength Label */}\n <div className=\"mb-1 flex items-center justify-between\">\n <span className=\"text-xs text-ds-2\">Password strength</span>\n <span className=\"text-xs text-ds-2\">{getStrengthText(strength)}</span>\n </div>\n\n {/* Strength Meter */}\n <div className=\"flex gap-1\">\n {Array.from({ length: 4 }, (_, index) => (\n <div\n key={index}\n className={`h-1 w-1/4 rounded-full transition-colors duration-300 ${\n index < strength ? getColor(strength) : \"bg-ds-surface-3\"\n }`}\n />\n ))}\n </div>\n\n <PasswordCriteria password={password} />\n </div>\n );\n}\n"],"mappings":";;;;;AAMA,IAAa,oBAAoB,EAAE,eAAsC;AASvE,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,WAAU;YACZ;GATH;IAAE,OAAO;IAAyB,KAAK,SAAS,UAAU;IAAG;GAC7D;IAAE,OAAO;IAA6B,KAAK,QAAQ,KAAK,SAAS;IAAE;GACnE;IAAE,OAAO;IAA6B,KAAK,QAAQ,KAAK,SAAS;IAAE;GACnE;IAAE,OAAO;IAAqB,KAAK,KAAK,KAAK,SAAS;IAAE;GACxD;IAAE,OAAO;IAA8B,KAAK,eAAe,KAAK,SAAS;IAAE;GAKxE,CAAS,KAAK,SACb,iBAAA,GAAA,kBAAA,MAAC,OAAD;GAAsB,WAAU;aAAhC,CACG,KAAK,MACJ,iBAAA,GAAA,kBAAA,KAAC,cAAA,WAAD;IAAW,WAAU;IAA2B,OAAM;IAAc,CAAA,GAEpE,iBAAA,GAAA,kBAAA,KAAC,cAAA,WAAD;IAAW,WAAU;IAAwB,OAAM;I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AAD,EAA4B,UAAY,CAAA;GACpC"}
1
+ {"version":3,"file":"password-strength-meter-Be1c-dnK.cjs","names":[],"sources":["../../src/components/forms/password-strength-meter/PasswordCriteria.tsx","../../src/components/forms/password-strength-meter/PasswordStrengthMeter.tsx"],"sourcesContent":["import { CheckIcon, CloseIcon } from \"../../icons\";\n\ninterface PasswordCriteriaProps {\n password: string;\n}\n\nexport const PasswordCriteria = ({ password }: PasswordCriteriaProps) => {\n const criteria = [\n { label: \"At least 6 characters\", met: password.length >= 6 },\n { label: \"Contains uppercase letter\", met: /[A-Z]/.test(password) },\n { label: \"Contains lowercase letter\", met: /[a-z]/.test(password) },\n { label: \"Contains a number\", met: /\\d/.test(password) },\n { label: \"Contains special character\", met: /[^A-Za-z0-9]/.test(password) },\n ];\n\n return (\n <div className=\"mt-2 space-y-1\">\n {criteria.map((item) => (\n <div key={item.label} className=\"flex items-center text-xs\">\n {item.met ? (\n <CheckIcon className=\"me-2 size-4 text-success\" title=\"CheckIcon\" />\n ) : (\n <CloseIcon className=\"me-2 size-4 text-ds-3\" title=\"CloseIcon\" />\n )}\n <span className={item.met ? \"text-success\" : \"text-ds-2\"}>\n {item.label}\n </span>\n </div>\n ))}\n </div>\n );\n};\n","import { useMemo } from \"react\";\n\nimport { PasswordCriteria } from \"./PasswordCriteria\";\n\nexport interface PasswordStrengthMeterProps {\n password: string;\n}\n\nexport function PasswordStrengthMeter({\n password,\n}: PasswordStrengthMeterProps) {\n // Calculate password strength using an object mapping approach\n const getStrength = (pass: string): number => {\n const criteria = {\n minLength: pass.length >= 6,\n hasMixedCase: /[a-z]/.test(pass) && /[A-Z]/.test(pass),\n hasNumber: /\\d/.test(pass),\n hasSpecialChar: /[^a-zA-Z\\d]/.test(pass),\n };\n\n // Count the number of criteria that pass\n return Object.values(criteria).filter(Boolean).length;\n };\n\n // Memoize the strength calculation to avoid unnecessary recalculations\n const strength = useMemo(() => getStrength(password), [password]);\n\n // Determine strength color based on the calculated strength\n const getColor = (strength: number): string => {\n const colors = [\n \"bg-ds-state-danger\",\n \"bg-ds-state-danger\",\n \"bg-ds-state-warning\",\n \"bg-ds-state-warning\",\n \"bg-ds-state-success\",\n ];\n return colors[strength] || \"bg-ds-surface-3\";\n };\n\n // Get a text label corresponding to the password strength\n const getStrengthText = (strength: number): string => {\n const strengthLevels = [\"Very Weak\", \"Weak\", \"Fair\", \"Good\", \"Strong\"];\n return strengthLevels[strength] || \"Very Weak\";\n };\n\n return (\n <div className=\"mt-2\">\n {/* Strength Label */}\n <div className=\"mb-1 flex items-center justify-between\">\n <span className=\"text-xs text-ds-2\">Password strength</span>\n <span className=\"text-xs text-ds-2\">{getStrengthText(strength)}</span>\n </div>\n\n {/* Strength Meter */}\n <div className=\"flex gap-1\">\n {Array.from({ length: 4 }, (_, index) => (\n <div\n key={index}\n className={`h-1 w-1/4 rounded-full transition-colors duration-300 ${\n index < strength ? getColor(strength) : \"bg-ds-surface-3\"\n }`}\n />\n ))}\n </div>\n\n <PasswordCriteria password={password} />\n </div>\n );\n}\n"],"mappings":";;;;AAMA,IAAa,oBAAoB,EAAE,eAAsC;CASvE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,WAAU;YACZ;GATH;IAAE,OAAO;IAAyB,KAAK,SAAS,UAAU;GAAE;GAC5D;IAAE,OAAO;IAA6B,KAAK,QAAQ,KAAK,QAAQ;GAAE;GAClE;IAAE,OAAO;IAA6B,KAAK,QAAQ,KAAK,QAAQ;GAAE;GAClE;IAAE,OAAO;IAAqB,KAAK,KAAK,KAAK,QAAQ;GAAE;GACvD;IAAE,OAAO;IAA8B,KAAK,eAAe,KAAK,QAAQ;GAAE;EAKvE,EAAS,KAAK,SACb,iBAAA,GAAA,kBAAA,MAAC,OAAD;GAAsB,WAAU;aAAhC,CACG,KAAK,MACJ,iBAAA,GAAA,kBAAA,KAAC,cAAA,WAAD;IAAW,WAAU;IAA2B,OAAM;GAAa,CAAA,IAEnE,iBAAA,GAAA,kBAAA,KAAC,cAAA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,CACF;GACE,CAAA;GAEL,iBAAA,GAAA,kBAAA,KAAC,kBAAD,EAA4B,SAAW,CAAA;EACpC;;AAET"}
@@ -1,4 +1,4 @@
1
- import { K as CloseIcon, q as CheckIcon } from "./icons-JzMKLygv.mjs";
1
+ import { J as CheckIcon, q as CloseIcon } from "./icons-CkVHNbbN.mjs";
2
2
  import { useMemo } from "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/components/forms/password-strength-meter/PasswordCriteria.tsx
@@ -96,4 +96,4 @@ function PasswordStrengthMeter({ password }) {
96
96
  //#endregion
97
97
  export { PasswordStrengthMeter as t };
98
98
 
99
- //# sourceMappingURL=password-strength-meter-CH6uQAuK.mjs.map
99
+ //# sourceMappingURL=password-strength-meter-Q1Qr-4tz.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"password-strength-meter-CH6uQAuK.mjs","names":[],"sources":["../../src/components/forms/password-strength-meter/PasswordCriteria.tsx","../../src/components/forms/password-strength-meter/PasswordStrengthMeter.tsx"],"sourcesContent":["import { CheckIcon, CloseIcon } from \"../../icons\";\n\ninterface PasswordCriteriaProps {\n password: string;\n}\n\nexport const PasswordCriteria = ({ password }: PasswordCriteriaProps) => {\n const criteria = [\n { label: \"At least 6 characters\", met: password.length >= 6 },\n { label: \"Contains uppercase letter\", met: /[A-Z]/.test(password) },\n { label: \"Contains lowercase letter\", met: /[a-z]/.test(password) },\n { label: \"Contains a number\", met: /\\d/.test(password) },\n { label: \"Contains special character\", met: /[^A-Za-z0-9]/.test(password) },\n ];\n\n return (\n <div className=\"mt-2 space-y-1\">\n {criteria.map((item) => (\n <div key={item.label} className=\"flex items-center text-xs\">\n {item.met ? (\n <CheckIcon className=\"me-2 size-4 text-success\" title=\"CheckIcon\" />\n ) : (\n <CloseIcon className=\"me-2 size-4 text-ds-3\" title=\"CloseIcon\" />\n )}\n <span className={item.met ? \"text-success\" : \"text-ds-2\"}>\n {item.label}\n </span>\n </div>\n ))}\n </div>\n );\n};\n","import { useMemo } from \"react\";\n\nimport { PasswordCriteria } from \"./PasswordCriteria\";\n\nexport interface PasswordStrengthMeterProps {\n password: string;\n}\n\nexport function PasswordStrengthMeter({\n password,\n}: PasswordStrengthMeterProps) {\n // Calculate password strength using an object mapping approach\n const getStrength = (pass: string): number => {\n const criteria = {\n minLength: pass.length >= 6,\n hasMixedCase: /[a-z]/.test(pass) && /[A-Z]/.test(pass),\n hasNumber: /\\d/.test(pass),\n hasSpecialChar: /[^a-zA-Z\\d]/.test(pass),\n };\n\n // Count the number of criteria that pass\n return Object.values(criteria).filter(Boolean).length;\n };\n\n // Memoize the strength calculation to avoid unnecessary recalculations\n const strength = useMemo(() => getStrength(password), [password]);\n\n // Determine strength color based on the calculated strength\n const getColor = (strength: number): string => {\n const colors = [\n \"bg-ds-state-danger\",\n \"bg-ds-state-danger\",\n \"bg-ds-state-warning\",\n \"bg-ds-state-warning\",\n \"bg-ds-state-success\",\n ];\n return colors[strength] || \"bg-ds-surface-3\";\n };\n\n // Get a text label corresponding to the password strength\n const getStrengthText = (strength: number): string => {\n const strengthLevels = [\"Very Weak\", \"Weak\", \"Fair\", \"Good\", \"Strong\"];\n return strengthLevels[strength] || \"Very Weak\";\n };\n\n return (\n <div className=\"mt-2\">\n {/* Strength Label */}\n <div className=\"mb-1 flex items-center justify-between\">\n <span className=\"text-xs text-ds-2\">Password strength</span>\n <span className=\"text-xs text-ds-2\">{getStrengthText(strength)}</span>\n </div>\n\n {/* Strength Meter */}\n <div className=\"flex gap-1\">\n {Array.from({ length: 4 }, (_, index) => (\n <div\n key={index}\n className={`h-1 w-1/4 rounded-full transition-colors duration-300 ${\n index < strength ? getColor(strength) : \"bg-ds-surface-3\"\n }`}\n />\n ))}\n </div>\n\n <PasswordCriteria password={password} />\n </div>\n );\n}\n"],"mappings":";;;;AAMA,IAAa,oBAAoB,EAAE,eAAsC;AASvE,QACE,oBAAC,OAAD;EAAK,WAAU;YACZ;GATH;IAAE,OAAO;IAAyB,KAAK,S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U;eAAqB,gBAAgB,SAAS;KAAQ,CAAA,CAClE;;GAGN,oBAAC,OAAD;IAAK,WAAU;cACZ,MAAM,KAAK,EAAE,QAAQ,GAAG,GAAG,GAAG,UAC7B,oBAAC,OAAD,EAEE,WAAW,yDACT,QAAQ,WAAW,SAAS,SAAS,GAAG,qBAE1C,EAJK,MAIL,CACF;IACE,CAAA;GAEN,oBAAC,kBAAD,EAA4B,UAAY,CAAA;GACpC"}
1
+ {"version":3,"file":"password-strength-meter-Q1Qr-4tz.mjs","names":[],"sources":["../../src/components/forms/password-strength-meter/PasswordCriteria.tsx","../../src/components/forms/password-strength-meter/PasswordStrengthMeter.tsx"],"sourcesContent":["import { CheckIcon, CloseIcon } from \"../../icons\";\n\ninterface PasswordCriteriaProps {\n password: string;\n}\n\nexport const PasswordCriteria = ({ password }: PasswordCriteriaProps) => {\n const criteria = [\n { label: \"At least 6 characters\", met: password.length >= 6 },\n { label: \"Contains uppercase letter\", met: /[A-Z]/.test(password) },\n { label: \"Contains lowercase letter\", met: /[a-z]/.test(password) },\n { label: \"Contains a number\", met: /\\d/.test(password) },\n { label: \"Contains special character\", met: /[^A-Za-z0-9]/.test(password) },\n ];\n\n return (\n <div className=\"mt-2 space-y-1\">\n {criteria.map((item) => (\n <div key={item.label} className=\"flex items-center text-xs\">\n {item.met ? (\n <CheckIcon className=\"me-2 size-4 text-success\" title=\"CheckIcon\" />\n ) : (\n <CloseIcon className=\"me-2 size-4 text-ds-3\" title=\"CloseIcon\" />\n )}\n <span className={item.met ? \"text-success\" : \"text-ds-2\"}>\n {item.label}\n </span>\n </div>\n ))}\n </div>\n );\n};\n","import { useMemo } from \"react\";\n\nimport { PasswordCriteria } from \"./PasswordCriteria\";\n\nexport interface PasswordStrengthMeterProps {\n password: string;\n}\n\nexport function PasswordStrengthMeter({\n password,\n}: PasswordStrengthMeterProps) {\n // Calculate password strength using an object mapping approach\n const getStrength = (pass: string): number => {\n const criteria = {\n minLength: pass.length >= 6,\n hasMixedCase: /[a-z]/.test(pass) && /[A-Z]/.test(pass),\n hasNumber: /\\d/.test(pass),\n hasSpecialChar: /[^a-zA-Z\\d]/.test(pass),\n };\n\n // Count the number of criteria that pass\n return Object.values(criteria).filter(Boolean).length;\n };\n\n // Memoize the strength calculation to avoid unnecessary recalculations\n const strength = useMemo(() => getStrength(password), [password]);\n\n // Determine strength color based on the calculated strength\n const getColor = (strength: number): string => {\n const colors = [\n \"bg-ds-state-danger\",\n \"bg-ds-state-danger\",\n \"bg-ds-state-warning\",\n \"bg-ds-state-warning\",\n \"bg-ds-state-success\",\n ];\n return colors[strength] || \"bg-ds-surface-3\";\n };\n\n // Get a text label corresponding to the password strength\n const getStrengthText = (strength: number): string => {\n const strengthLevels = [\"Very Weak\", \"Weak\", \"Fair\", \"Good\", \"Strong\"];\n return strengthLevels[strength] || \"Very Weak\";\n };\n\n return (\n <div className=\"mt-2\">\n {/* Strength Label */}\n <div className=\"mb-1 flex items-center justify-between\">\n <span className=\"text-xs text-ds-2\">Password strength</span>\n <span className=\"text-xs text-ds-2\">{getStrengthText(strength)}</span>\n </div>\n\n {/* Strength Meter */}\n <div className=\"flex gap-1\">\n {Array.from({ length: 4 }, (_, index) => (\n <div\n key={index}\n className={`h-1 w-1/4 rounded-full transition-colors duration-300 ${\n index < strength ? getColor(strength) : \"bg-ds-surface-3\"\n }`}\n />\n ))}\n </div>\n\n <PasswordCriteria password={password} />\n </div>\n );\n}\n"],"mappings":";;;;AAMA,IAAa,oBAAoB,EAAE,eAAsC;CASvE,OACE,oBAAC,OAAD;EAAK,WAAU;YACZ;GATH;IAAE,OAAO;IAAyB,KAAK,SAAS,UAAU;GAAE;GAC5D;IAAE,OAAO;IAA6B,KAAK,QAAQ,KAAK,QAAQ;GAAE;GAClE;IAAE,OAAO;IAA6B,KAAK,QAAQ,KAAK,QAAQ;GAAE;GAClE;IAAE,OAAO;IAAqB,KAAK,KAAK,KAAK,QAAQ;GAAE;GACvD;IAAE,OAAO;IAA8B,KAAK,eAA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,GAJM,KAIN,CACF;GACE,CAAA;GAEL,oBAAC,kBAAD,EAA4B,SAAW,CAAA;EACpC;;AAET"}
@@ -1,5 +1,5 @@
1
- const require_chunk = require("./chunk-B_GkZjkl.cjs");
2
- const require_utils = require("./utils-LRbEQHYs.cjs");
1
+ const require_chunk = require("./chunk-D6vf50IK.cjs");
2
+ const require_utils = require("./utils-CoA0q63n.cjs");
3
3
  let react = require("react");
4
4
  react = require_chunk.__toESM(react, 1);
5
5
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -166,4 +166,4 @@ Object.defineProperty(exports, "ProgressBar", {
166
166
  }
167
167
  });
168
168
 
169
- //# sourceMappingURL=progress-bar-FfdFVvTT.cjs.map
169
+ //# sourceMappingURL=progress-bar-BsnX079N.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress-bar-FfdFVvTT.cjs","names":[],"sources":["../../src/components/data-display/progress-bar/ProgressBar.tsx","../../src/components/data-display/progress-bar/CircularProgress.tsx"],"sourcesContent":["import React from \"react\";\n\nexport type ProgressBarSize = \"sm\" | \"md\" | \"lg\";\nexport type ProgressBarTone =\n | \"default\"\n | \"success\"\n | \"warning\"\n | \"danger\"\n | \"info\";\n\nexport interface ProgressBarProps {\n value: number;\n max?: number;\n label?: React.ReactNode;\n percentageLabel?: React.ReactNode;\n showPercentage?: boolean;\n size?: ProgressBarSize;\n tone?: ProgressBarTone;\n className?: string;\n trackClassName?: string;\n fillClassName?: string;\n ariaLabel?: string;\n}\n\nconst sizeStyles: Record<\n ProgressBarSize,\n {\n track: string;\n label: string;\n percentage: string;\n }\n> = {\n sm: {\n track: \"h-1.5\",\n label: \"text-xs\",\n percentage: \"text-xs\",\n },\n md: {\n track: \"h-2.5\",\n label: \"text-sm\",\n percentage: \"text-sm\",\n },\n lg: {\n track: \"h-3.5\",\n label: \"text-base\",\n percentage: \"text-base\",\n },\n};\n\nconst toneStyles: Record<\n ProgressBarTone,\n {\n color: string;\n trackBackground: string;\n }\n> = {\n default: {\n color: \"var(--ds-chart-1)\",\n trackBackground:\n \"linear-gradient(90deg, rgba(15, 23, 42, 0.08) 0%, rgba(30, 41, 59, 0.14) 100%)\",\n },\n success: {\n color: \"var(--ds-chart-3)\",\n trackBackground:\n \"linear-gradient(90deg, rgba(20, 83, 45, 0.12) 0%, rgba(34, 197, 94, 0.18) 100%)\",\n },\n warning: {\n color: \"var(--ds-chart-4)\",\n trackBackground:\n \"linear-gradient(90deg, rgba(120, 53, 15, 0.12) 0%, rgba(245, 158, 11, 0.18) 100%)\",\n },\n danger: {\n color: \"var(--ds-chart-5)\",\n trackBackground:\n \"linear-gradient(90deg, rgba(127, 29, 29, 0.12) 0%, rgba(239, 68, 68, 0.18) 100%)\",\n },\n info: {\n color: \"var(--ds-chart-2)\",\n trackBackground:\n \"linear-gradient(90deg, rgba(30, 64, 175, 0.12) 0%, rgba(59, 130, 246, 0.18) 100%)\",\n },\n};\n\nfunction clampValue(value: number, max: number): number {\n if (!Number.isFinite(value)) {\n return 0;\n }\n\n return Math.min(Math.max(value, 0), max);\n}\n\nexport default function ProgressBar({\n value,\n max = 100,\n label,\n percentageLabel,\n showPercentage = true,\n size = \"md\",\n tone = \"default\",\n className = \"\",\n trackClassName = \"\",\n fillClassName = \"\",\n ariaLabel = \"Progress\",\n}: ProgressBarProps) {\n const safeMax = Number.isFinite(max) && max > 0 ? max : 100;\n const clampedValue = clampValue(value, safeMax);\n const percentage = (clampedValue / safeMax) * 100;\n const roundedPercentage = Math.round(percentage);\n const toneStyle = toneStyles[tone];\n const resolvedPercentageLabel = percentageLabel ?? `${roundedPercentage}%`;\n\n return (\n <div className={`w-full space-y-3 ${className}`}>\n {(label || showPercentage) && (\n <div className=\"flex items-center justify-between gap-4\">\n <div\n className={`font-mono font-semibold tracking-[0.08em] text-ds-1 ${sizeStyles[size].label}`}\n >\n {label}\n </div>\n {showPercentage && (\n <div\n className={`font-mono font-medium tracking-[0.08em] text-ds-2 ${sizeStyles[size].percentage}`}\n >\n {resolvedPercentageLabel}\n </div>\n )}\n </div>\n )}\n\n <div\n role=\"progressbar\"\n aria-label={ariaLabel}\n aria-valuemin={0}\n aria-valuemax={safeMax}\n aria-valuenow={Math.round(clampedValue)}\n aria-valuetext={`${roundedPercentage}%`}\n className={`relative overflow-hidden rounded-full border border-ds-border-2/50 bg-ds-surface-2/80 shadow-[inset_0_1px_1px_rgba(255,255,255,0.2)] ${sizeStyles[size].track} ${trackClassName}`}\n style={{ background: toneStyle.trackBackground }}\n >\n <div\n className={`h-full rounded-full transition-[width,filter,box-shadow] duration-500 ease-out ${fillClassName}`}\n style={{\n width: `${percentage}%`,\n background: `linear-gradient(90deg, color-mix(in srgb, ${toneStyle.color} 68%, white 32%) 0%, ${toneStyle.color} 100%)`,\n boxShadow: `inset 0 1px 0 rgba(255,255,255,0.4), 0 0 14px color-mix(in srgb, ${toneStyle.color} 32%, transparent)`,\n filter: percentage > 0 ? \"saturate(1.05) brightness(1.02)\" : \"none\",\n }}\n />\n </div>\n </div>\n );\n}\n","import { mergeClassNames } from \"../../../utils\";\n\nexport type CircularProgressTone =\n | \"default\"\n | \"success\"\n | \"warning\"\n | \"danger\"\n | \"info\";\n\nexport interface CircularProgressProps {\n value: number;\n max?: number;\n size?: number;\n strokeWidth?: number;\n tone?: CircularProgressTone;\n showValue?: boolean;\n valueLabel?: string;\n className?: string;\n trackClassName?: string;\n progressClassName?: string;\n ariaLabel?: string;\n}\n\nconst toneColorMap: Record<CircularProgressTone, string> = {\n default: \"var(--ds-chart-1)\",\n success: \"var(--ds-chart-3)\",\n warning: \"var(--ds-chart-4)\",\n danger: \"var(--ds-chart-5)\",\n info: \"var(--ds-chart-2)\",\n};\n\nfunction clamp(value: number, max: number): number {\n if (!Number.isFinite(value)) return 0;\n return Math.min(Math.max(value, 0), max);\n}\n\nexport default function CircularProgress({\n value,\n max = 100,\n size = 24,\n strokeWidth = 3,\n tone = \"default\",\n showValue = false,\n valueLabel,\n className,\n trackClassName,\n progressClassName,\n ariaLabel = \"Circular progress\",\n}: CircularProgressProps) {\n const safeMax = Number.isFinite(max) && max > 0 ? max : 100;\n const safeValue = clamp(value, safeMax);\n const percentage = (safeValue / safeMax) * 100;\n\n const center = size / 2;\n const radius = center - strokeWidth / 2;\n const circumference = 2 * Math.PI * radius;\n const dashOffset = circumference - (percentage / 100) * circumference;\n const label = valueLabel ?? `${Math.round(percentage)}%`;\n\n return (\n <span\n role=\"progressbar\"\n aria-label={ariaLabel}\n aria-valuemin={0}\n aria-valuemax={safeMax}\n aria-valuenow={Math.round(safeValue)}\n aria-valuetext={label}\n className={mergeClassNames(\n \"relative inline-flex items-center justify-center\",\n className,\n )}\n style={{ width: size, height: size }}\n >\n <svg\n width={size}\n height={size}\n viewBox={`0 0 ${size} ${size}`}\n className=\"-rotate-90\"\n >\n <circle\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n stroke=\"var(--ds-border-2)\"\n strokeOpacity={0.5}\n strokeWidth={strokeWidth}\n className={trackClassName}\n />\n <circle\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n stroke={toneColorMap[tone]}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={dashOffset}\n className={mergeClassNames(\n \"transition-[stroke-dashoffset] duration-500 ease-out\",\n progressClassName,\n )}\n />\n </svg>\n\n {showValue ? (\n <span className=\"absolute text-[10px] font-semibold leading-none text-ds-1\">\n {Math.round(percentage)}\n </span>\n ) : null}\n </span>\n );\n}\n\nexport { CircularProgress };\n"],"mappings":";;;;;;AAwBA,IAAM,aAOF;CACF,IAAI;EACF,OAAO;EACP,OAAO;EACP,YAAY;EACb;CACD,IAAI;EACF,OAAO;EACP,OAAO;EACP,YAAY;EACb;CACD,IAAI;EACF,OAAO;EACP,OAAO;EACP,YAAY;EACb;CACF;AAED,IAAM,aAMF;CACF,SAAS;EACP,OAAO;EACP,iBACE;EACH;CACD,SAAS;EACP,OAAO;EACP,iBACE;EACH;CACD,SAAS;EACP,OAAO;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AAI;IACJ,GAAG;IACH,MAAK;IACL,QAAO;IACP,eAAe;IACF;IACb,WAAW;IACX,CAAA,EACF,iBAAA,GAAA,kBAAA,KAAC,UAAD;IACE,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,MAAK;IACL,QAAQ,aAAa;IACR;IACb,eAAc;IACd,iBAAiB;IACjB,kBAAkB;IAClB,WAAW,cAAA,gBACT,wDACA,kBACD;IACD,CAAA,CACE;MAEL,YACC,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,WAAU;aACb,KAAK,MAAM,WAAW;GAClB,CAAA,GACL,KACC"}
1
+ {"version":3,"file":"progress-bar-BsnX079N.cjs","names":[],"sources":["../../src/components/data-display/progress-bar/ProgressBar.tsx","../../src/components/data-display/progress-bar/CircularProgress.tsx"],"sourcesContent":["import React from \"react\";\n\nexport type ProgressBarSize = \"sm\" | \"md\" | \"lg\";\nexport type ProgressBarTone =\n | \"default\"\n | \"success\"\n | \"warning\"\n | \"danger\"\n | \"info\";\n\nexport interface ProgressBarProps {\n value: number;\n max?: number;\n label?: React.ReactNode;\n percentageLabel?: React.ReactNode;\n showPercentage?: boolean;\n size?: ProgressBarSize;\n tone?: ProgressBarTone;\n className?: string;\n trackClassName?: string;\n fillClassName?: string;\n ariaLabel?: string;\n}\n\nconst sizeStyles: Record<\n ProgressBarSize,\n {\n track: string;\n label: string;\n percentage: string;\n }\n> = {\n sm: {\n track: \"h-1.5\",\n label: \"text-xs\",\n percentage: \"text-xs\",\n },\n md: {\n track: \"h-2.5\",\n label: \"text-sm\",\n percentage: \"text-sm\",\n },\n lg: {\n track: \"h-3.5\",\n label: \"text-base\",\n percentage: \"text-base\",\n },\n};\n\nconst toneStyles: Record<\n ProgressBarTone,\n {\n color: string;\n trackBackground: string;\n }\n> = {\n default: {\n color: \"var(--ds-chart-1)\",\n trackBackground:\n \"linear-gradient(90deg, rgba(15, 23, 42, 0.08) 0%, rgba(30, 41, 59, 0.14) 100%)\",\n },\n success: {\n color: \"var(--ds-chart-3)\",\n trackBackground:\n \"linear-gradient(90deg, rgba(20, 83, 45, 0.12) 0%, rgba(34, 197, 94, 0.18) 100%)\",\n },\n warning: {\n color: \"var(--ds-chart-4)\",\n trackBackground:\n \"linear-gradient(90deg, rgba(120, 53, 15, 0.12) 0%, rgba(245, 158, 11, 0.18) 100%)\",\n },\n danger: {\n color: \"var(--ds-chart-5)\",\n trackBackground:\n \"linear-gradient(90deg, rgba(127, 29, 29, 0.12) 0%, rgba(239, 68, 68, 0.18) 100%)\",\n },\n info: {\n color: \"var(--ds-chart-2)\",\n trackBackground:\n \"linear-gradient(90deg, rgba(30, 64, 175, 0.12) 0%, rgba(59, 130, 246, 0.18) 100%)\",\n },\n};\n\nfunction clampValue(value: number, max: number): number {\n if (!Number.isFinite(value)) {\n return 0;\n }\n\n return Math.min(Math.max(value, 0), max);\n}\n\nexport default function ProgressBar({\n value,\n max = 100,\n label,\n percentageLabel,\n showPercentage = true,\n size = \"md\",\n tone = \"default\",\n className = \"\",\n trackClassName = \"\",\n fillClassName = \"\",\n ariaLabel = \"Progress\",\n}: ProgressBarProps) {\n const safeMax = Number.isFinite(max) && max > 0 ? max : 100;\n const clampedValue = clampValue(value, safeMax);\n const percentage = (clampedValue / safeMax) * 100;\n const roundedPercentage = Math.round(percentage);\n const toneStyle = toneStyles[tone];\n const resolvedPercentageLabel = percentageLabel ?? `${roundedPercentage}%`;\n\n return (\n <div className={`w-full space-y-3 ${className}`}>\n {(label || showPercentage) && (\n <div className=\"flex items-center justify-between gap-4\">\n <div\n className={`font-mono font-semibold tracking-[0.08em] text-ds-1 ${sizeStyles[size].label}`}\n >\n {label}\n </div>\n {showPercentage && (\n <div\n className={`font-mono font-medium tracking-[0.08em] text-ds-2 ${sizeStyles[size].percentage}`}\n >\n {resolvedPercentageLabel}\n </div>\n )}\n </div>\n )}\n\n <div\n role=\"progressbar\"\n aria-label={ariaLabel}\n aria-valuemin={0}\n aria-valuemax={safeMax}\n aria-valuenow={Math.round(clampedValue)}\n aria-valuetext={`${roundedPercentage}%`}\n className={`relative overflow-hidden rounded-full border border-ds-border-2/50 bg-ds-surface-2/80 shadow-[inset_0_1px_1px_rgba(255,255,255,0.2)] ${sizeStyles[size].track} ${trackClassName}`}\n style={{ background: toneStyle.trackBackground }}\n >\n <div\n className={`h-full rounded-full transition-[width,filter,box-shadow] duration-500 ease-out ${fillClassName}`}\n style={{\n width: `${percentage}%`,\n background: `linear-gradient(90deg, color-mix(in srgb, ${toneStyle.color} 68%, white 32%) 0%, ${toneStyle.color} 100%)`,\n boxShadow: `inset 0 1px 0 rgba(255,255,255,0.4), 0 0 14px color-mix(in srgb, ${toneStyle.color} 32%, transparent)`,\n filter: percentage > 0 ? \"saturate(1.05) brightness(1.02)\" : \"none\",\n }}\n />\n </div>\n </div>\n );\n}\n","import { mergeClassNames } from \"../../../utils\";\n\nexport type CircularProgressTone =\n | \"default\"\n | \"success\"\n | \"warning\"\n | \"danger\"\n | \"info\";\n\nexport interface CircularProgressProps {\n value: number;\n max?: number;\n size?: number;\n strokeWidth?: number;\n tone?: CircularProgressTone;\n showValue?: boolean;\n valueLabel?: string;\n className?: string;\n trackClassName?: string;\n progressClassName?: string;\n ariaLabel?: string;\n}\n\nconst toneColorMap: Record<CircularProgressTone, string> = {\n default: \"var(--ds-chart-1)\",\n success: \"var(--ds-chart-3)\",\n warning: \"var(--ds-chart-4)\",\n danger: \"var(--ds-chart-5)\",\n info: \"var(--ds-chart-2)\",\n};\n\nfunction clamp(value: number, max: number): number {\n if (!Number.isFinite(value)) return 0;\n return Math.min(Math.max(value, 0), max);\n}\n\nexport default function CircularProgress({\n value,\n max = 100,\n size = 24,\n strokeWidth = 3,\n tone = \"default\",\n showValue = false,\n valueLabel,\n className,\n trackClassName,\n progressClassName,\n ariaLabel = \"Circular progress\",\n}: CircularProgressProps) {\n const safeMax = Number.isFinite(max) && max > 0 ? max : 100;\n const safeValue = clamp(value, safeMax);\n const percentage = (safeValue / safeMax) * 100;\n\n const center = size / 2;\n const radius = center - strokeWidth / 2;\n const circumference = 2 * Math.PI * radius;\n const dashOffset = circumference - (percentage / 100) * circumference;\n const label = valueLabel ?? `${Math.round(percentage)}%`;\n\n return (\n <span\n role=\"progressbar\"\n aria-label={ariaLabel}\n aria-valuemin={0}\n aria-valuemax={safeMax}\n aria-valuenow={Math.round(safeValue)}\n aria-valuetext={label}\n className={mergeClassNames(\n \"relative inline-flex items-center justify-center\",\n className,\n )}\n style={{ width: size, height: size }}\n >\n <svg\n width={size}\n height={size}\n viewBox={`0 0 ${size} ${size}`}\n className=\"-rotate-90\"\n >\n <circle\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n stroke=\"var(--ds-border-2)\"\n strokeOpacity={0.5}\n strokeWidth={strokeWidth}\n className={trackClassName}\n />\n <circle\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n stroke={toneColorMap[tone]}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={dashOffset}\n className={mergeClassNames(\n \"transition-[stroke-dashoffset] duration-500 ease-out\",\n progressClassName,\n )}\n />\n </svg>\n\n {showValue ? (\n <span className=\"absolute text-[10px] font-semibold leading-none text-ds-1\">\n {Math.round(percentage)}\n </span>\n ) : null}\n </span>\n );\n}\n\nexport { CircularProgress };\n"],"mappings":";;;;;;AAwBA,IAAM,aAOF;CACF,IAAI;EACF,OAAO;EACP,OAAO;EACP,YAAY;CACd;CACA,IAAI;EACF,OAAO;EACP,OAAO;EACP,YAAY;CACd;CACA,IAAI;EACF,OAAO;EACP,OAAO;EACP,YAAY;CACd;AACF;AAEA,IAAM,aAMF;CACF,SAAS;EACP,OAAO;EACP,iBACE;CACJ;CACA,SAAS;EACP,OAAO;EACP,iBACE;CACJ;CACA,SAAS;EACP,OAAO;EACP,iBACE;CACJ;CACA,QAAQ;EACN,OAAO;EACP,iBACE;CACJ;CACA,MAAM;EACJ,OAAO;EACP,iBACE;CACJ;AACF;AAEA,SAAS,WAA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A,KAAC,UAAD;IACE,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,MAAK;IACL,QAAQ,aAAa;IACR;IACb,eAAc;IACd,iBAAiB;IACjB,kBAAkB;IAClB,WAAW,cAAA,gBACT,wDACA,iBACF;GACD,CAAA,CACE;MAEJ,YACC,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,WAAU;aACb,KAAK,MAAM,UAAU;EAClB,CAAA,IACJ,IACA;;AAEV"}
@@ -1,4 +1,4 @@
1
- import { n as mergeClassNames } from "./utils-7S0u48mU.mjs";
1
+ import { n as mergeClassNames } from "./utils-Dc7j29ec.mjs";
2
2
  import "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/components/data-display/progress-bar/ProgressBar.tsx
@@ -153,4 +153,4 @@ function CircularProgress({ value, max = 100, size = 24, strokeWidth = 3, tone =
153
153
  //#endregion
154
154
  export { ProgressBar as n, CircularProgress as t };
155
155
 
156
- //# sourceMappingURL=progress-bar-BAvRSW1b.mjs.map
156
+ //# sourceMappingURL=progress-bar-l5WpbpZf.mjs.map