ivt 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/dist/accordion/index.mjs +19 -1
  2. package/dist/accordion/index.mjs.map +1 -1
  3. package/dist/alert/index.mjs +43 -1
  4. package/dist/alert/index.mjs.map +1 -1
  5. package/dist/alert-dialog/index.mjs +260 -1
  6. package/dist/alert-dialog/index.mjs.map +1 -1
  7. package/dist/avatar/index.mjs +164 -1
  8. package/dist/avatar/index.mjs.map +1 -1
  9. package/dist/badge/index.mjs +6 -1
  10. package/dist/badge/index.mjs.map +1 -1
  11. package/dist/base/index.mjs +760 -1
  12. package/dist/base/index.mjs.map +1 -1
  13. package/dist/button/index.mjs +6 -1
  14. package/dist/button/index.mjs.map +1 -1
  15. package/dist/calendar/index.mjs +11 -1
  16. package/dist/calendar/index.mjs.map +1 -1
  17. package/dist/card/index.mjs +55 -1
  18. package/dist/card/index.mjs.map +1 -1
  19. package/dist/chart/index.mjs +17042 -1
  20. package/dist/chart/index.mjs.map +1 -1
  21. package/dist/checkbox/index.mjs +223 -1
  22. package/dist/checkbox/index.mjs.map +1 -1
  23. package/dist/chunks/_commonjsHelpers-DqEvkrE1.mjs +6 -0
  24. package/dist/chunks/_commonjsHelpers-DqEvkrE1.mjs.map +1 -0
  25. package/dist/chunks/accordion-BMP2PSSC.mjs +455 -0
  26. package/dist/chunks/{accordion-CdshDFZC.mjs.map → accordion-BMP2PSSC.mjs.map} +1 -1
  27. package/dist/chunks/badge-DxuZhgBF.mjs +57 -0
  28. package/dist/chunks/{badge-BYqshEmA.mjs.map → badge-DxuZhgBF.mjs.map} +1 -1
  29. package/dist/chunks/bundle-mjs-tFg__FnT.mjs +4491 -0
  30. package/dist/chunks/{bundle-mjs-9BXytT_r.mjs.map → bundle-mjs-tFg__FnT.mjs.map} +1 -1
  31. package/dist/chunks/button-CX0htulo.mjs +47 -0
  32. package/dist/chunks/{button-DrFZXJ7z.mjs.map → button-CX0htulo.mjs.map} +1 -1
  33. package/dist/chunks/calendar-B4IV5RyM.mjs +7106 -0
  34. package/dist/chunks/calendar-B4IV5RyM.mjs.map +1 -0
  35. package/dist/chunks/check-B7209s3e.mjs +15 -0
  36. package/dist/chunks/{check-CimnOyD7.mjs.map → check-B7209s3e.mjs.map} +1 -1
  37. package/dist/chunks/chevron-down-D84DRJBv.mjs +15 -0
  38. package/dist/chunks/{chevron-down-D3fvbjxE.mjs.map → chevron-down-D84DRJBv.mjs.map} +1 -1
  39. package/dist/chunks/chevron-left-DtL1t1DJ.mjs +15 -0
  40. package/dist/chunks/{chevron-left-CrN7DlXg.mjs.map → chevron-left-DtL1t1DJ.mjs.map} +1 -1
  41. package/dist/chunks/chevron-right-Cdxg1JSQ.mjs +15 -0
  42. package/dist/chunks/{chevron-right-BMSCuDGK.mjs.map → chevron-right-Cdxg1JSQ.mjs.map} +1 -1
  43. package/dist/chunks/chevrons-up-down-DtBUG1i8.mjs +22 -0
  44. package/dist/chunks/{chevrons-up-down-DBgvRkZm.mjs.map → chevrons-up-down-DtBUG1i8.mjs.map} +1 -1
  45. package/dist/chunks/circle-BLWMZ9yp.mjs +17 -0
  46. package/dist/chunks/{circle-CGqt18Bd.mjs.map → circle-BLWMZ9yp.mjs.map} +1 -1
  47. package/dist/chunks/command-C8cVzg-x.mjs +611 -0
  48. package/dist/chunks/command-C8cVzg-x.mjs.map +1 -0
  49. package/dist/chunks/createLucideIcon-Ba0IWqsz.mjs +60 -0
  50. package/dist/chunks/{createLucideIcon-L-tld2uc.mjs.map → createLucideIcon-Ba0IWqsz.mjs.map} +1 -1
  51. package/dist/chunks/dialog-D9vbxUuQ.mjs +80 -0
  52. package/dist/chunks/{dialog-36eqHzT3.mjs.map → dialog-D9vbxUuQ.mjs.map} +1 -1
  53. package/dist/chunks/hover-card-idvDPXrI.mjs +274 -0
  54. package/dist/chunks/{hover-card-Cnd58du6.mjs.map → hover-card-idvDPXrI.mjs.map} +1 -1
  55. package/dist/chunks/index-6JUj2Tld.mjs +18 -0
  56. package/dist/chunks/{index-CRxQlsb9.mjs.map → index-6JUj2Tld.mjs.map} +1 -1
  57. package/dist/chunks/index-B0IElWB4.mjs +51 -0
  58. package/dist/chunks/{index-vmPXTidH.mjs.map → index-B0IElWB4.mjs.map} +1 -1
  59. package/dist/chunks/index-B4VRyyD1.mjs +40 -0
  60. package/dist/chunks/index-B4VRyyD1.mjs.map +1 -0
  61. package/dist/chunks/index-BE-_q4IW.mjs +266 -0
  62. package/dist/chunks/index-BE-_q4IW.mjs.map +1 -0
  63. package/dist/chunks/index-BNxaLFA6.mjs +216 -0
  64. package/dist/chunks/{index-LvOFIVGz.mjs.map → index-BNxaLFA6.mjs.map} +1 -1
  65. package/dist/chunks/index-BZUrHhU8.mjs +7 -0
  66. package/dist/chunks/{index-CLtWFQL5.mjs.map → index-BZUrHhU8.mjs.map} +1 -1
  67. package/dist/chunks/index-B_FsTtnF.mjs +110 -0
  68. package/dist/chunks/{index-CCcl327A.mjs.map → index-B_FsTtnF.mjs.map} +1 -1
  69. package/dist/chunks/index-CAg47KJ6.mjs +13 -0
  70. package/dist/chunks/{index-CXszXOf_.mjs.map → index-CAg47KJ6.mjs.map} +1 -1
  71. package/dist/chunks/index-CXuEm8w1.mjs +12 -0
  72. package/dist/chunks/{index-CU_y1XAz.mjs.map → index-CXuEm8w1.mjs.map} +1 -1
  73. package/dist/chunks/index-C_jFwfR_.mjs +77 -0
  74. package/dist/chunks/{index-CybgQKpz.mjs.map → index-C_jFwfR_.mjs.map} +1 -1
  75. package/dist/chunks/index-CglX-DNW.mjs +21 -0
  76. package/dist/chunks/index-CglX-DNW.mjs.map +1 -0
  77. package/dist/chunks/index-CyMuypYR.mjs +324 -0
  78. package/dist/chunks/{index-DUNcuWJE.mjs.map → index-CyMuypYR.mjs.map} +1 -1
  79. package/dist/chunks/index-D0S6rRRE.mjs +50 -0
  80. package/dist/chunks/{index-w9bxia3O.mjs.map → index-D0S6rRRE.mjs.map} +1 -1
  81. package/dist/chunks/index-D23BhVQG.mjs +859 -0
  82. package/dist/chunks/{index-DZHMFdr0.mjs.map → index-D23BhVQG.mjs.map} +1 -1
  83. package/dist/chunks/index-D2wfJaZh.mjs +145 -0
  84. package/dist/chunks/index-D2wfJaZh.mjs.map +1 -0
  85. package/dist/chunks/index-DNvm9MP3.mjs +34 -0
  86. package/dist/chunks/{index-D2sZp5OP.mjs.map → index-DNvm9MP3.mjs.map} +1 -1
  87. package/dist/chunks/index-Dm4_czlz.mjs +12 -0
  88. package/dist/chunks/index-Dm4_czlz.mjs.map +1 -0
  89. package/dist/chunks/index-PaJVyocC.mjs +151 -0
  90. package/dist/chunks/index-PaJVyocC.mjs.map +1 -0
  91. package/dist/chunks/index-kr6_v_F8.mjs +2370 -0
  92. package/dist/chunks/index-kr6_v_F8.mjs.map +1 -0
  93. package/dist/chunks/index-sz_BcBbA.mjs +1210 -0
  94. package/dist/chunks/index-sz_BcBbA.mjs.map +1 -0
  95. package/dist/chunks/input-DK1slFF1.mjs +14 -0
  96. package/dist/chunks/{input-85UFztMJ.mjs.map → input-DK1slFF1.mjs.map} +1 -1
  97. package/dist/chunks/label-D7ONQdHc.mjs +32 -0
  98. package/dist/chunks/{label-CICFzZIt.mjs.map → label-D7ONQdHc.mjs.map} +1 -1
  99. package/dist/chunks/pagination-BM_IQ6Qk.mjs +106 -0
  100. package/dist/chunks/{pagination-CReDQes6.mjs.map → pagination-BM_IQ6Qk.mjs.map} +1 -1
  101. package/dist/chunks/popover-D3F326FR.mjs +308 -0
  102. package/dist/chunks/{popover-Cn2ZTvKd.mjs.map → popover-D3F326FR.mjs.map} +1 -1
  103. package/dist/chunks/progress-BCl5yD5Q.mjs +99 -0
  104. package/dist/chunks/{progress-CSxQH6-f.mjs.map → progress-BCl5yD5Q.mjs.map} +1 -1
  105. package/dist/chunks/scroll-area-DB3eUx8V.mjs +791 -0
  106. package/dist/chunks/scroll-area-DB3eUx8V.mjs.map +1 -0
  107. package/dist/chunks/select-Cw81y8pT.mjs +104 -0
  108. package/dist/chunks/{select-BR6_N_Yo.mjs.map → select-Cw81y8pT.mjs.map} +1 -1
  109. package/dist/chunks/separator-2k1C7RSn.mjs +48 -0
  110. package/dist/chunks/{separator-BB6-E9Z1.mjs.map → separator-2k1C7RSn.mjs.map} +1 -1
  111. package/dist/chunks/skeleton-qx8-vr62.mjs +13 -0
  112. package/dist/chunks/{skeleton-XPWWiaac.mjs.map → skeleton-qx8-vr62.mjs.map} +1 -1
  113. package/dist/chunks/sortable-D8ayoe_b.mjs +4221 -0
  114. package/dist/chunks/sortable-D8ayoe_b.mjs.map +1 -0
  115. package/dist/chunks/table-BDNUhtz-.mjs +62 -0
  116. package/dist/chunks/{table-LQIHzPHi.mjs.map → table-BDNUhtz-.mjs.map} +1 -1
  117. package/dist/chunks/toggle-CE2ycSdL.mjs +65 -0
  118. package/dist/chunks/{toggle-Co72WXGd.mjs.map → toggle-CE2ycSdL.mjs.map} +1 -1
  119. package/dist/chunks/tooltip-DLD0ycR4.mjs +596 -0
  120. package/dist/chunks/{tooltip-qX2HjdJP.mjs.map → tooltip-DLD0ycR4.mjs.map} +1 -1
  121. package/dist/chunks/tslib.es6-BgHLrbno.mjs +61 -0
  122. package/dist/chunks/{tslib.es6-cMGqxriw.mjs.map → tslib.es6-BgHLrbno.mjs.map} +1 -1
  123. package/dist/chunks/utils-BUelq9Ro.mjs +42 -0
  124. package/dist/chunks/utils-BUelq9Ro.mjs.map +1 -0
  125. package/dist/chunks/x-Bjz0Vo6R.mjs +22 -0
  126. package/dist/chunks/{x-BNLl0E-E.mjs.map → x-Bjz0Vo6R.mjs.map} +1 -1
  127. package/dist/combobox/index.mjs +65 -1
  128. package/dist/combobox/index.mjs.map +1 -1
  129. package/dist/command/index.mjs +23 -1
  130. package/dist/command/index.mjs.map +1 -1
  131. package/dist/data-table/index.mjs +673 -1
  132. package/dist/data-table/index.mjs.map +1 -1
  133. package/dist/dialog/index.mjs +22 -1
  134. package/dist/dialog/index.mjs.map +1 -1
  135. package/dist/dropdown-menu/index.mjs +438 -1
  136. package/dist/dropdown-menu/index.mjs.map +1 -1
  137. package/dist/dropzone/index.mjs +7839 -1
  138. package/dist/dropzone/index.mjs.map +1 -1
  139. package/dist/form/index.mjs +649 -1
  140. package/dist/form/index.mjs.map +1 -1
  141. package/dist/hover-card/index.mjs +18 -1
  142. package/dist/hover-card/index.mjs.map +1 -1
  143. package/dist/icon/index.mjs +317 -1
  144. package/dist/icon/index.mjs.map +1 -1
  145. package/dist/index.css +1 -1
  146. package/dist/input/index.mjs +4 -1
  147. package/dist/input/index.mjs.map +1 -1
  148. package/dist/ivt.css +1 -1
  149. package/dist/label/index.mjs +8 -1
  150. package/dist/label/index.mjs.map +1 -1
  151. package/dist/menubar/index.mjs +583 -1
  152. package/dist/menubar/index.mjs.map +1 -1
  153. package/dist/multi-select/index.mjs +297 -1
  154. package/dist/multi-select/index.mjs.map +1 -1
  155. package/dist/pagination/index.mjs +10 -1
  156. package/dist/pagination/index.mjs.map +1 -1
  157. package/dist/popover/index.mjs +21 -1
  158. package/dist/popover/index.mjs.map +1 -1
  159. package/dist/progress/index.mjs +9 -1
  160. package/dist/progress/index.mjs.map +1 -1
  161. package/dist/radio-group/index.mjs +267 -1
  162. package/dist/radio-group/index.mjs.map +1 -1
  163. package/dist/scroll-area/index.mjs +15 -1
  164. package/dist/scroll-area/index.mjs.map +1 -1
  165. package/dist/select/index.mjs +8 -1
  166. package/dist/select/index.mjs.map +1 -1
  167. package/dist/separator/index.mjs +8 -1
  168. package/dist/separator/index.mjs.map +1 -1
  169. package/dist/sheet/index.mjs +96 -1
  170. package/dist/sheet/index.mjs.map +1 -1
  171. package/dist/skeleton/index.mjs +4 -1
  172. package/dist/skeleton/index.mjs.map +1 -1
  173. package/dist/sonner/index.mjs +1140 -1
  174. package/dist/sonner/index.mjs.map +1 -1
  175. package/dist/sortable/index.mjs +8 -1
  176. package/dist/sortable/index.mjs.map +1 -1
  177. package/dist/table/index.mjs +4 -1
  178. package/dist/table/index.mjs.map +1 -1
  179. package/dist/tabs/index.mjs +193 -1
  180. package/dist/tabs/index.mjs.map +1 -1
  181. package/dist/textarea/index.mjs +13 -1
  182. package/dist/textarea/index.mjs.map +1 -1
  183. package/dist/toast/index.mjs +705 -1
  184. package/dist/toast/index.mjs.map +1 -1
  185. package/dist/toggle/index.mjs +12 -1
  186. package/dist/toggle/index.mjs.map +1 -1
  187. package/dist/toggle-group/index.mjs +219 -1
  188. package/dist/toggle-group/index.mjs.map +1 -1
  189. package/dist/tooltip/index.mjs +20 -1
  190. package/dist/tooltip/index.mjs.map +1 -1
  191. package/package.json +2 -2
  192. package/dist/chunks/_commonjsHelpers-6qLFzZa5.mjs +0 -2
  193. package/dist/chunks/_commonjsHelpers-6qLFzZa5.mjs.map +0 -1
  194. package/dist/chunks/accordion-CdshDFZC.mjs +0 -2
  195. package/dist/chunks/badge-BYqshEmA.mjs +0 -2
  196. package/dist/chunks/bundle-mjs-9BXytT_r.mjs +0 -2
  197. package/dist/chunks/button-DrFZXJ7z.mjs +0 -2
  198. package/dist/chunks/calendar-BY6t8wdJ.mjs +0 -2
  199. package/dist/chunks/calendar-BY6t8wdJ.mjs.map +0 -1
  200. package/dist/chunks/check-CimnOyD7.mjs +0 -2
  201. package/dist/chunks/chevron-down-D3fvbjxE.mjs +0 -2
  202. package/dist/chunks/chevron-left-CrN7DlXg.mjs +0 -2
  203. package/dist/chunks/chevron-right-BMSCuDGK.mjs +0 -2
  204. package/dist/chunks/chevrons-up-down-DBgvRkZm.mjs +0 -2
  205. package/dist/chunks/circle-CGqt18Bd.mjs +0 -2
  206. package/dist/chunks/command-C6ON-ciq.mjs +0 -2
  207. package/dist/chunks/command-C6ON-ciq.mjs.map +0 -1
  208. package/dist/chunks/createLucideIcon-L-tld2uc.mjs +0 -2
  209. package/dist/chunks/dialog-36eqHzT3.mjs +0 -2
  210. package/dist/chunks/hover-card-Cnd58du6.mjs +0 -2
  211. package/dist/chunks/index-B4QsDzeM.mjs +0 -2
  212. package/dist/chunks/index-B4QsDzeM.mjs.map +0 -1
  213. package/dist/chunks/index-BdpYc58_.mjs +0 -2
  214. package/dist/chunks/index-BdpYc58_.mjs.map +0 -1
  215. package/dist/chunks/index-CCcl327A.mjs +0 -2
  216. package/dist/chunks/index-CLtWFQL5.mjs +0 -2
  217. package/dist/chunks/index-COvW87ew.mjs +0 -2
  218. package/dist/chunks/index-COvW87ew.mjs.map +0 -1
  219. package/dist/chunks/index-CRxQlsb9.mjs +0 -2
  220. package/dist/chunks/index-CU_y1XAz.mjs +0 -2
  221. package/dist/chunks/index-CXszXOf_.mjs +0 -2
  222. package/dist/chunks/index-CdJCOoFA.mjs +0 -2
  223. package/dist/chunks/index-CdJCOoFA.mjs.map +0 -1
  224. package/dist/chunks/index-Cpq7N5Ej.mjs +0 -2
  225. package/dist/chunks/index-Cpq7N5Ej.mjs.map +0 -1
  226. package/dist/chunks/index-CybgQKpz.mjs +0 -2
  227. package/dist/chunks/index-D2sZp5OP.mjs +0 -2
  228. package/dist/chunks/index-DOyt-JEx.mjs +0 -2
  229. package/dist/chunks/index-DOyt-JEx.mjs.map +0 -1
  230. package/dist/chunks/index-DUNcuWJE.mjs +0 -2
  231. package/dist/chunks/index-DZHMFdr0.mjs +0 -2
  232. package/dist/chunks/index-LvOFIVGz.mjs +0 -2
  233. package/dist/chunks/index-lvPXnk5F.mjs +0 -2
  234. package/dist/chunks/index-lvPXnk5F.mjs.map +0 -1
  235. package/dist/chunks/index-vmPXTidH.mjs +0 -2
  236. package/dist/chunks/index-w9bxia3O.mjs +0 -2
  237. package/dist/chunks/index-xew3kygQ.mjs +0 -2
  238. package/dist/chunks/index-xew3kygQ.mjs.map +0 -1
  239. package/dist/chunks/input-85UFztMJ.mjs +0 -2
  240. package/dist/chunks/label-CICFzZIt.mjs +0 -2
  241. package/dist/chunks/pagination-CReDQes6.mjs +0 -2
  242. package/dist/chunks/popover-Cn2ZTvKd.mjs +0 -2
  243. package/dist/chunks/progress-CSxQH6-f.mjs +0 -2
  244. package/dist/chunks/scroll-area-CvCz7cL_.mjs +0 -2
  245. package/dist/chunks/scroll-area-CvCz7cL_.mjs.map +0 -1
  246. package/dist/chunks/select-BR6_N_Yo.mjs +0 -2
  247. package/dist/chunks/separator-BB6-E9Z1.mjs +0 -2
  248. package/dist/chunks/skeleton-XPWWiaac.mjs +0 -2
  249. package/dist/chunks/sortable-CqPFGn8Q.mjs +0 -2
  250. package/dist/chunks/sortable-CqPFGn8Q.mjs.map +0 -1
  251. package/dist/chunks/table-LQIHzPHi.mjs +0 -2
  252. package/dist/chunks/toggle-Co72WXGd.mjs +0 -2
  253. package/dist/chunks/tooltip-qX2HjdJP.mjs +0 -2
  254. package/dist/chunks/tslib.es6-cMGqxriw.mjs +0 -2
  255. package/dist/chunks/utils-BctauAA9.mjs +0 -2
  256. package/dist/chunks/utils-BctauAA9.mjs.map +0 -1
  257. package/dist/chunks/x-BNLl0E-E.mjs +0 -2
@@ -1,2 +1,20 @@
1
- export{A as Accordion,c as AccordionContent,a as AccordionItem,b as AccordionTrigger}from"../chunks/accordion-CdshDFZC.mjs";import"../chunks/utils-BctauAA9.mjs";import"../chunks/bundle-mjs-9BXytT_r.mjs";import"react";import"../chunks/index-CCcl327A.mjs";import"react/jsx-runtime";import"@radix-ui/react-collection";import"../chunks/index-COvW87ew.mjs";import"../chunks/index-CdJCOoFA.mjs";import"../chunks/index-CybgQKpz.mjs";import"../chunks/index-CLtWFQL5.mjs";import"../chunks/index-w9bxia3O.mjs";import"react-dom";import"@radix-ui/react-slot";import"../chunks/index-BdpYc58_.mjs";import"../chunks/index-CRxQlsb9.mjs";import"../chunks/index-CU_y1XAz.mjs";import"../chunks/chevron-down-D3fvbjxE.mjs";import"../chunks/createLucideIcon-L-tld2uc.mjs";
1
+ export { A as Accordion, c as AccordionContent, a as AccordionItem, b as AccordionTrigger } from '../chunks/accordion-BMP2PSSC.mjs';
2
+ import '../chunks/utils-BUelq9Ro.mjs';
3
+ import '../chunks/bundle-mjs-tFg__FnT.mjs';
4
+ import 'react';
5
+ import '../chunks/index-B_FsTtnF.mjs';
6
+ import 'react/jsx-runtime';
7
+ import '@radix-ui/react-collection';
8
+ import '../chunks/index-B4VRyyD1.mjs';
9
+ import '../chunks/index-Dm4_czlz.mjs';
10
+ import '../chunks/index-C_jFwfR_.mjs';
11
+ import '../chunks/index-BZUrHhU8.mjs';
12
+ import '../chunks/index-D0S6rRRE.mjs';
13
+ import 'react-dom';
14
+ import '@radix-ui/react-slot';
15
+ import '../chunks/index-D2wfJaZh.mjs';
16
+ import '../chunks/index-6JUj2Tld.mjs';
17
+ import '../chunks/index-CXuEm8w1.mjs';
18
+ import '../chunks/chevron-down-D84DRJBv.mjs';
19
+ import '../chunks/createLucideIcon-Ba0IWqsz.mjs';
2
20
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,44 @@
1
- import{c as t}from"../chunks/utils-BctauAA9.mjs";import{cva as r}from"class-variance-authority";import e from"react";import"../chunks/bundle-mjs-9BXytT_r.mjs";const a=r("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card border-destructive bg-destructive-foreground [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"text-warning bg-card border-warning bg-warning-foreground [&>svg]:text-current *:data-[slot=alert-description]:text-warning/90"}},defaultVariants:{variant:"default"}});function s({className:r,variant:s,...i}){return e.createElement("div",{"data-slot":"alert",role:"alert",className:t(a({variant:s}),r),...i})}function i({className:r,...a}){return e.createElement("div",{"data-slot":"alert-title",className:t("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",r),...a})}function n({className:r,...a}){return e.createElement("div",{"data-slot":"alert-description",className:t("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",r),...a})}export{s as Alert,n as AlertDescription,i as AlertTitle};
1
+ import { c as cn } from '../chunks/utils-BUelq9Ro.mjs';
2
+ import { cva } from 'class-variance-authority';
3
+ import React__default from 'react';
4
+ import '../chunks/bundle-mjs-tFg__FnT.mjs';
5
+
6
+ const alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
7
+ variants: {
8
+ variant: {
9
+ default: "bg-card text-card-foreground",
10
+ destructive: "text-destructive bg-card border-destructive bg-destructive-foreground [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
11
+ warning: "text-warning bg-card border-warning bg-warning-foreground [&>svg]:text-current *:data-[slot=alert-description]:text-warning/90"
12
+ }
13
+ },
14
+ defaultVariants: {
15
+ variant: "default"
16
+ }
17
+ });
18
+ function Alert({ className, variant, ...props }) {
19
+ return /*#__PURE__*/ React__default.createElement("div", {
20
+ "data-slot": "alert",
21
+ role: "alert",
22
+ className: cn(alertVariants({
23
+ variant
24
+ }), className),
25
+ ...props
26
+ });
27
+ }
28
+ function AlertTitle({ className, ...props }) {
29
+ return /*#__PURE__*/ React__default.createElement("div", {
30
+ "data-slot": "alert-title",
31
+ className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className),
32
+ ...props
33
+ });
34
+ }
35
+ function AlertDescription({ className, ...props }) {
36
+ return /*#__PURE__*/ React__default.createElement("div", {
37
+ "data-slot": "alert-description",
38
+ className: cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", className),
39
+ ...props
40
+ });
41
+ }
42
+
43
+ export { Alert, AlertDescription, AlertTitle };
2
44
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/components/ui/alert/alert.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport React from \"react\";\n\nconst alertVariants = cva(\n\t\"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"bg-card text-card-foreground\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"text-destructive bg-card border-destructive bg-destructive-foreground [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90\",\n\t\t\t\twarning:\n\t\t\t\t\t\"text-warning bg-card border-warning bg-warning-foreground [&>svg]:text-current *:data-[slot=alert-description]:text-warning/90\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t},\n);\n\nfunction Alert({\n\tclassName,\n\tvariant,\n\t...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert\"\n\t\t\trole=\"alert\"\n\t\t\tclassName={cn(alertVariants({ variant }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-title\"\n\t\t\tclassName={cn(\"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-description\"\n\t\t\tclassName={cn(\n\t\t\t\t\"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Alert, AlertTitle, AlertDescription };\n"],"names":["alertVariants","cva","variants","variant","default","destructive","warning","defaultVariants","Alert","className","props","React","createElement","div","data-slot","role","cn","AlertTitle","AlertDescription"],"mappings":"+JAIA,MAAMA,EAAgBC,EACrB,oOACA,CACCC,SAAU,CACTC,QAAS,CACRC,QAAS,+BACTC,YACC,iJACDC,QACC,mIAGHC,gBAAiB,CAChBJ,QAAS,aAKZ,SAASK,GAAMC,UACdA,EAASN,QACTA,KACGO,IAEH,OACCC,EAAAC,cAACC,MAAAA,CACAC,YAAU,QACVC,KAAK,QACLN,UAAWO,EAAGhB,EAAc,CAAEG,YAAYM,MACtCC,GAGP,CAEA,SAASO,GAAWR,UAAEA,KAAcC,IACnC,OACCC,EAAAC,cAACC,MAAAA,CACAC,YAAU,cACVL,UAAWO,EAAG,8DAA+DP,MACzEC,GAGP,CAEA,SAASQ,GAAiBT,UAAEA,KAAcC,IACzC,OACCC,EAAAC,cAACC,MAAAA,CACAC,YAAU,oBACVL,UAAWO,EACV,iGACAP,MAEGC,GAGP"}
1
+ {"version":3,"file":"index.mjs","sources":["../../src/components/ui/alert/alert.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport React from \"react\";\n\nconst alertVariants = cva(\n\t\"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"bg-card text-card-foreground\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"text-destructive bg-card border-destructive bg-destructive-foreground [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90\",\n\t\t\t\twarning:\n\t\t\t\t\t\"text-warning bg-card border-warning bg-warning-foreground [&>svg]:text-current *:data-[slot=alert-description]:text-warning/90\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t},\n);\n\nfunction Alert({\n\tclassName,\n\tvariant,\n\t...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert\"\n\t\t\trole=\"alert\"\n\t\t\tclassName={cn(alertVariants({ variant }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-title\"\n\t\t\tclassName={cn(\"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-description\"\n\t\t\tclassName={cn(\n\t\t\t\t\"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Alert, AlertTitle, AlertDescription };\n"],"names":["alertVariants","cva","variants","variant","default","destructive","warning","defaultVariants","Alert","className","props","React","div","data-slot","role","cn","AlertTitle","AlertDescription"],"mappings":";;;;;AAIA,MAAMA,aAAAA,GAAgBC,IACrB,mOAAA,EACA;IACCC,QAAAA,EAAU;QACTC,OAAAA,EAAS;YACRC,OAAAA,EAAS,8BAAA;YACTC,WAAAA,EACC,gJAAA;YACDC,OAAAA,EACC;AACF;AACD,KAAA;IACAC,eAAAA,EAAiB;QAChBJ,OAAAA,EAAS;AACV;AACD,CAAA,CAAA;AAGD,SAASK,MAAM,EACdC,SAAS,EACTN,OAAO,EACP,GAAGO,KAAAA,EAC+D,EAAA;AAClE,IAAA,qBACCC,cAAA,CAAA,aAAA,CAACC,KAAAA,EAAAA;QACAC,WAAAA,EAAU,OAAA;QACVC,IAAAA,EAAK,OAAA;AACLL,QAAAA,SAAAA,EAAWM,GAAGf,aAAAA,CAAc;AAAEG,YAAAA;SAAQ,CAAA,EAAIM,SAAAA,CAAAA;AACzC,QAAA,GAAGC;;AAGP;AAEA,SAASM,UAAAA,CAAW,EAAEP,SAAS,EAAE,GAAGC,KAAAA,EAAoC,EAAA;AACvE,IAAA,qBACCC,cAAA,CAAA,aAAA,CAACC,KAAAA,EAAAA;QACAC,WAAAA,EAAU,aAAA;AACVJ,QAAAA,SAAAA,EAAWM,GAAG,6DAAA,EAA+DN,SAAAA,CAAAA;AAC5E,QAAA,GAAGC;;AAGP;AAEA,SAASO,gBAAAA,CAAiB,EAAER,SAAS,EAAE,GAAGC,KAAAA,EAAoC,EAAA;AAC7E,IAAA,qBACCC,cAAA,CAAA,aAAA,CAACC,KAAAA,EAAAA;QACAC,WAAAA,EAAU,mBAAA;AACVJ,QAAAA,SAAAA,EAAWM,GACV,gGAAA,EACAN,SAAAA,CAAAA;AAEA,QAAA,GAAGC;;AAGP;;;;"}
@@ -1,2 +1,261 @@
1
- import*as e from"react";import{c as t}from"../chunks/index-CCcl327A.mjs";import{u as a}from"../chunks/index-COvW87ew.mjs";import{c as r,R as o,P as n,O as s,b as l,W as i,a as c,T as d,D as m,C as u}from"../chunks/index-DUNcuWJE.mjs";import{c as p}from"../chunks/index-CdJCOoFA.mjs";import{createSlottable as f}from"@radix-ui/react-slot";import{jsx as g,jsxs as h}from"react/jsx-runtime";import{c as x}from"../chunks/utils-BctauAA9.mjs";import{b as v}from"../chunks/button-DrFZXJ7z.mjs";import"../chunks/index-CRxQlsb9.mjs";import"../chunks/index-CLtWFQL5.mjs";import"../chunks/index-CybgQKpz.mjs";import"../chunks/index-xew3kygQ.mjs";import"../chunks/index-w9bxia3O.mjs";import"react-dom";import"../chunks/index-CXszXOf_.mjs";import"../chunks/index-lvPXnk5F.mjs";import"../chunks/tslib.es6-cMGqxriw.mjs";import"../chunks/index-BdpYc58_.mjs";import"../chunks/bundle-mjs-9BXytT_r.mjs";import"class-variance-authority";var N="AlertDialog",[y,D]=t(N,[r]),b=r(),A=e=>{const{__scopeAlertDialog:t,...a}=e,r=b(t);return g(o,{...r,...a,modal:!0})};A.displayName=N;var j=e.forwardRef((e,t)=>{const{__scopeAlertDialog:a,...r}=e,o=b(a);return g(l,{...o,...r,ref:t})});j.displayName="AlertDialogTrigger";var k=e=>{const{__scopeAlertDialog:t,...a}=e,r=b(t);return g(n,{...r,...a})};k.displayName="AlertDialogPortal";var _=e.forwardRef((e,t)=>{const{__scopeAlertDialog:a,...r}=e,o=b(a);return g(s,{...o,...r,ref:t})});_.displayName="AlertDialogOverlay";var w="AlertDialogContent",[E,R]=y(w),O=f("AlertDialogContent"),z=e.forwardRef((t,r)=>{const{__scopeAlertDialog:o,children:n,...s}=t,l=b(o),d=e.useRef(null),m=a(r,d),u=e.useRef(null);return g(i,{contentName:w,titleName:C,docsSlug:"alert-dialog",children:g(E,{scope:o,cancelRef:u,children:h(c,{role:"alertdialog",...l,...s,ref:m,onOpenAutoFocus:p(s.onOpenAutoFocus,e=>{e.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[g(O,{children:n}),g(q,{contentRef:d})]})})})});z.displayName=w;var C="AlertDialogTitle",$=e.forwardRef((e,t)=>{const{__scopeAlertDialog:a,...r}=e,o=b(a);return g(d,{...o,...r,ref:t})});$.displayName=C;var F="AlertDialogDescription",I=e.forwardRef((e,t)=>{const{__scopeAlertDialog:a,...r}=e,o=b(a);return g(m,{...o,...r,ref:t})});I.displayName=F;var P=e.forwardRef((e,t)=>{const{__scopeAlertDialog:a,...r}=e,o=b(a);return g(u,{...o,...r,ref:t})});P.displayName="AlertDialogAction";var T="AlertDialogCancel",S=e.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,{cancelRef:n}=R(T,r),s=b(r),l=a(t,n);return g(u,{...s,...o,ref:l})});S.displayName=T;var q=({contentRef:t})=>{const a=`\`${w}\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \`${w}\` by passing a \`${F}\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${w}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return e.useEffect(()=>{document.getElementById(t.current?.getAttribute("aria-describedby"))},[a,t]),null},B=A,W=j,Y=k,G=_,H=z,J=P,K=S,L=$,M=I;function Q({...t}){return e.createElement(B,{"data-slot":"alert-dialog",...t})}function U({...t}){return e.createElement(W,{"data-slot":"alert-dialog-trigger",...t})}function V({...t}){return e.createElement(Y,{"data-slot":"alert-dialog-portal",...t})}function X({className:t,...a}){return e.createElement(G,{"data-slot":"alert-dialog-overlay",className:x("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function Z({className:t,...a}){return e.createElement(V,null,e.createElement(X,null),e.createElement(H,{"data-slot":"alert-dialog-content",className:x("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...a}))}function ee({className:t,...a}){return e.createElement("div",{"data-slot":"alert-dialog-header",className:x("flex flex-col gap-2 text-center sm:text-left",t),...a})}function te({className:t,...a}){return e.createElement("div",{"data-slot":"alert-dialog-footer",className:x("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function ae({className:t,...a}){return e.createElement(L,{"data-slot":"alert-dialog-title",className:x("text-lg font-semibold",t),...a})}function re({className:t,...a}){return e.createElement(M,{"data-slot":"alert-dialog-description",className:x("text-muted-foreground text-sm",t),...a})}function oe({className:t,...a}){return e.createElement(J,{className:x(v(),t),...a})}function ne({className:t,...a}){return e.createElement(K,{className:x(v({variant:"outline"}),t),...a})}export{Q as AlertDialog,oe as AlertDialogAction,ne as AlertDialogCancel,Z as AlertDialogContent,re as AlertDialogDescription,te as AlertDialogFooter,ee as AlertDialogHeader,X as AlertDialogOverlay,V as AlertDialogPortal,ae as AlertDialogTitle,U as AlertDialogTrigger};
1
+ import * as React from 'react';
2
+ import { c as createContextScope } from '../chunks/index-B_FsTtnF.mjs';
3
+ import { u as useComposedRefs } from '../chunks/index-B4VRyyD1.mjs';
4
+ import { c as createDialogScope, R as Root, P as Portal, O as Overlay, b as Trigger, W as WarningProvider, a as Content, T as Title, D as Description, C as Close } from '../chunks/index-CyMuypYR.mjs';
5
+ import { c as composeEventHandlers } from '../chunks/index-Dm4_czlz.mjs';
6
+ import { createSlottable } from '@radix-ui/react-slot';
7
+ import { jsx, jsxs } from 'react/jsx-runtime';
8
+ import { c as cn } from '../chunks/utils-BUelq9Ro.mjs';
9
+ import { b as buttonVariants } from '../chunks/button-CX0htulo.mjs';
10
+ import '../chunks/index-6JUj2Tld.mjs';
11
+ import '../chunks/index-BZUrHhU8.mjs';
12
+ import '../chunks/index-C_jFwfR_.mjs';
13
+ import '../chunks/index-BE-_q4IW.mjs';
14
+ import '../chunks/index-D0S6rRRE.mjs';
15
+ import 'react-dom';
16
+ import '../chunks/index-CAg47KJ6.mjs';
17
+ import '../chunks/index-sz_BcBbA.mjs';
18
+ import '../chunks/tslib.es6-BgHLrbno.mjs';
19
+ import '../chunks/index-D2wfJaZh.mjs';
20
+ import '../chunks/bundle-mjs-tFg__FnT.mjs';
21
+ import 'class-variance-authority';
22
+
23
+ var ROOT_NAME = "AlertDialog";
24
+ var [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
25
+ createDialogScope
26
+ ]);
27
+ var useDialogScope = createDialogScope();
28
+ var AlertDialog$1 = (props)=>{
29
+ const { __scopeAlertDialog, ...alertDialogProps } = props;
30
+ const dialogScope = useDialogScope(__scopeAlertDialog);
31
+ return /* @__PURE__ */ jsx(Root, {
32
+ ...dialogScope,
33
+ ...alertDialogProps,
34
+ modal: true
35
+ });
36
+ };
37
+ AlertDialog$1.displayName = ROOT_NAME;
38
+ var TRIGGER_NAME = "AlertDialogTrigger";
39
+ var AlertDialogTrigger$1 = React.forwardRef((props, forwardedRef)=>{
40
+ const { __scopeAlertDialog, ...triggerProps } = props;
41
+ const dialogScope = useDialogScope(__scopeAlertDialog);
42
+ return /* @__PURE__ */ jsx(Trigger, {
43
+ ...dialogScope,
44
+ ...triggerProps,
45
+ ref: forwardedRef
46
+ });
47
+ });
48
+ AlertDialogTrigger$1.displayName = TRIGGER_NAME;
49
+ var PORTAL_NAME = "AlertDialogPortal";
50
+ var AlertDialogPortal$1 = (props)=>{
51
+ const { __scopeAlertDialog, ...portalProps } = props;
52
+ const dialogScope = useDialogScope(__scopeAlertDialog);
53
+ return /* @__PURE__ */ jsx(Portal, {
54
+ ...dialogScope,
55
+ ...portalProps
56
+ });
57
+ };
58
+ AlertDialogPortal$1.displayName = PORTAL_NAME;
59
+ var OVERLAY_NAME = "AlertDialogOverlay";
60
+ var AlertDialogOverlay$1 = React.forwardRef((props, forwardedRef)=>{
61
+ const { __scopeAlertDialog, ...overlayProps } = props;
62
+ const dialogScope = useDialogScope(__scopeAlertDialog);
63
+ return /* @__PURE__ */ jsx(Overlay, {
64
+ ...dialogScope,
65
+ ...overlayProps,
66
+ ref: forwardedRef
67
+ });
68
+ });
69
+ AlertDialogOverlay$1.displayName = OVERLAY_NAME;
70
+ var CONTENT_NAME = "AlertDialogContent";
71
+ var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);
72
+ var Slottable = createSlottable("AlertDialogContent");
73
+ var AlertDialogContent$1 = React.forwardRef((props, forwardedRef)=>{
74
+ const { __scopeAlertDialog, children, ...contentProps } = props;
75
+ const dialogScope = useDialogScope(__scopeAlertDialog);
76
+ const contentRef = React.useRef(null);
77
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
78
+ const cancelRef = React.useRef(null);
79
+ return /* @__PURE__ */ jsx(WarningProvider, {
80
+ contentName: CONTENT_NAME,
81
+ titleName: TITLE_NAME,
82
+ docsSlug: "alert-dialog",
83
+ children: /* @__PURE__ */ jsx(AlertDialogContentProvider, {
84
+ scope: __scopeAlertDialog,
85
+ cancelRef,
86
+ children: /* @__PURE__ */ jsxs(Content, {
87
+ role: "alertdialog",
88
+ ...dialogScope,
89
+ ...contentProps,
90
+ ref: composedRefs,
91
+ onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event)=>{
92
+ event.preventDefault();
93
+ cancelRef.current?.focus({
94
+ preventScroll: true
95
+ });
96
+ }),
97
+ onPointerDownOutside: (event)=>event.preventDefault(),
98
+ onInteractOutside: (event)=>event.preventDefault(),
99
+ children: [
100
+ /* @__PURE__ */ jsx(Slottable, {
101
+ children
102
+ }),
103
+ /* @__PURE__ */ jsx(DescriptionWarning, {
104
+ contentRef
105
+ })
106
+ ]
107
+ })
108
+ })
109
+ });
110
+ });
111
+ AlertDialogContent$1.displayName = CONTENT_NAME;
112
+ var TITLE_NAME = "AlertDialogTitle";
113
+ var AlertDialogTitle$1 = React.forwardRef((props, forwardedRef)=>{
114
+ const { __scopeAlertDialog, ...titleProps } = props;
115
+ const dialogScope = useDialogScope(__scopeAlertDialog);
116
+ return /* @__PURE__ */ jsx(Title, {
117
+ ...dialogScope,
118
+ ...titleProps,
119
+ ref: forwardedRef
120
+ });
121
+ });
122
+ AlertDialogTitle$1.displayName = TITLE_NAME;
123
+ var DESCRIPTION_NAME = "AlertDialogDescription";
124
+ var AlertDialogDescription$1 = React.forwardRef((props, forwardedRef)=>{
125
+ const { __scopeAlertDialog, ...descriptionProps } = props;
126
+ const dialogScope = useDialogScope(__scopeAlertDialog);
127
+ return /* @__PURE__ */ jsx(Description, {
128
+ ...dialogScope,
129
+ ...descriptionProps,
130
+ ref: forwardedRef
131
+ });
132
+ });
133
+ AlertDialogDescription$1.displayName = DESCRIPTION_NAME;
134
+ var ACTION_NAME = "AlertDialogAction";
135
+ var AlertDialogAction$1 = React.forwardRef((props, forwardedRef)=>{
136
+ const { __scopeAlertDialog, ...actionProps } = props;
137
+ const dialogScope = useDialogScope(__scopeAlertDialog);
138
+ return /* @__PURE__ */ jsx(Close, {
139
+ ...dialogScope,
140
+ ...actionProps,
141
+ ref: forwardedRef
142
+ });
143
+ });
144
+ AlertDialogAction$1.displayName = ACTION_NAME;
145
+ var CANCEL_NAME = "AlertDialogCancel";
146
+ var AlertDialogCancel$1 = React.forwardRef((props, forwardedRef)=>{
147
+ const { __scopeAlertDialog, ...cancelProps } = props;
148
+ const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
149
+ const dialogScope = useDialogScope(__scopeAlertDialog);
150
+ const ref = useComposedRefs(forwardedRef, cancelRef);
151
+ return /* @__PURE__ */ jsx(Close, {
152
+ ...dialogScope,
153
+ ...cancelProps,
154
+ ref
155
+ });
156
+ });
157
+ AlertDialogCancel$1.displayName = CANCEL_NAME;
158
+ var DescriptionWarning = ({ contentRef })=>{
159
+ const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
160
+
161
+ You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
162
+
163
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
164
+
165
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
166
+ React.useEffect(()=>{
167
+ const hasDescription = document.getElementById(contentRef.current?.getAttribute("aria-describedby"));
168
+ if (!hasDescription) console.warn(MESSAGE);
169
+ }, [
170
+ MESSAGE,
171
+ contentRef
172
+ ]);
173
+ return null;
174
+ };
175
+ var Root2 = AlertDialog$1;
176
+ var Trigger2 = AlertDialogTrigger$1;
177
+ var Portal2 = AlertDialogPortal$1;
178
+ var Overlay2 = AlertDialogOverlay$1;
179
+ var Content2 = AlertDialogContent$1;
180
+ var Action = AlertDialogAction$1;
181
+ var Cancel = AlertDialogCancel$1;
182
+ var Title2 = AlertDialogTitle$1;
183
+ var Description2 = AlertDialogDescription$1;
184
+
185
+ function AlertDialog({ ...props }) {
186
+ return /*#__PURE__*/ React.createElement(Root2, {
187
+ "data-slot": "alert-dialog",
188
+ ...props
189
+ });
190
+ }
191
+ function AlertDialogTrigger({ ...props }) {
192
+ return /*#__PURE__*/ React.createElement(Trigger2, {
193
+ "data-slot": "alert-dialog-trigger",
194
+ ...props
195
+ });
196
+ }
197
+ function AlertDialogPortal({ ...props }) {
198
+ return /*#__PURE__*/ React.createElement(Portal2, {
199
+ "data-slot": "alert-dialog-portal",
200
+ ...props
201
+ });
202
+ }
203
+ function AlertDialogOverlay({ className, ...props }) {
204
+ return /*#__PURE__*/ React.createElement(Overlay2, {
205
+ "data-slot": "alert-dialog-overlay",
206
+ className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className),
207
+ ...props
208
+ });
209
+ }
210
+ function AlertDialogContent({ className, ...props }) {
211
+ return /*#__PURE__*/ React.createElement(AlertDialogPortal, null, /*#__PURE__*/ React.createElement(AlertDialogOverlay, null), /*#__PURE__*/ React.createElement(Content2, {
212
+ "data-slot": "alert-dialog-content",
213
+ className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className),
214
+ ...props
215
+ }));
216
+ }
217
+ function AlertDialogHeader({ className, ...props }) {
218
+ return /*#__PURE__*/ React.createElement("div", {
219
+ "data-slot": "alert-dialog-header",
220
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
221
+ ...props
222
+ });
223
+ }
224
+ function AlertDialogFooter({ className, ...props }) {
225
+ return /*#__PURE__*/ React.createElement("div", {
226
+ "data-slot": "alert-dialog-footer",
227
+ className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
228
+ ...props
229
+ });
230
+ }
231
+ function AlertDialogTitle({ className, ...props }) {
232
+ return /*#__PURE__*/ React.createElement(Title2, {
233
+ "data-slot": "alert-dialog-title",
234
+ className: cn("text-lg font-semibold", className),
235
+ ...props
236
+ });
237
+ }
238
+ function AlertDialogDescription({ className, ...props }) {
239
+ return /*#__PURE__*/ React.createElement(Description2, {
240
+ "data-slot": "alert-dialog-description",
241
+ className: cn("text-muted-foreground text-sm", className),
242
+ ...props
243
+ });
244
+ }
245
+ function AlertDialogAction({ className, ...props }) {
246
+ return /*#__PURE__*/ React.createElement(Action, {
247
+ className: cn(buttonVariants(), className),
248
+ ...props
249
+ });
250
+ }
251
+ function AlertDialogCancel({ className, ...props }) {
252
+ return /*#__PURE__*/ React.createElement(Cancel, {
253
+ className: cn(buttonVariants({
254
+ variant: "outline"
255
+ }), className),
256
+ ...props
257
+ });
258
+ }
259
+
260
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
2
261
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../node_modules/@radix-ui/react-alert-dialog/dist/index.mjs","../../src/components/ui/alert-dialog/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\n// src/alert-dialog.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { createDialogScope } from \"@radix-ui/react-dialog\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createSlottable } from \"@radix-ui/react-slot\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar ROOT_NAME = \"AlertDialog\";\nvar [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope\n]);\nvar useDialogScope = createDialogScope();\nvar AlertDialog = (props) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });\n};\nAlertDialog.displayName = ROOT_NAME;\nvar TRIGGER_NAME = \"AlertDialogTrigger\";\nvar AlertDialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });\n }\n);\nAlertDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"AlertDialogPortal\";\nvar AlertDialogPortal = (props) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });\n};\nAlertDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"AlertDialogOverlay\";\nvar AlertDialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });\n }\n);\nAlertDialogOverlay.displayName = OVERLAY_NAME;\nvar CONTENT_NAME = \"AlertDialogContent\";\nvar [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);\nvar Slottable = createSlottable(\"AlertDialogContent\");\nvar AlertDialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef(null);\n return /* @__PURE__ */ jsx(\n DialogPrimitive.WarningProvider,\n {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"alert-dialog\",\n children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(\n DialogPrimitive.Content,\n {\n role: \"alertdialog\",\n ...dialogScope,\n ...contentProps,\n ref: composedRefs,\n onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n }),\n onPointerDownOutside: (event) => event.preventDefault(),\n onInteractOutside: (event) => event.preventDefault(),\n children: [\n /* @__PURE__ */ jsx(Slottable, { children }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })\n ]\n }\n ) })\n }\n );\n }\n);\nAlertDialogContent.displayName = CONTENT_NAME;\nvar TITLE_NAME = \"AlertDialogTitle\";\nvar AlertDialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });\n }\n);\nAlertDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"AlertDialogDescription\";\nvar AlertDialogDescription = React.forwardRef((props, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });\n});\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\nvar ACTION_NAME = \"AlertDialogAction\";\nvar AlertDialogAction = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });\n }\n);\nAlertDialogAction.displayName = ACTION_NAME;\nvar CANCEL_NAME = \"AlertDialogCancel\";\nvar AlertDialogCancel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });\n }\n);\nAlertDialogCancel.displayName = CANCEL_NAME;\nvar DescriptionWarning = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute(\"aria-describedby\")\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n return null;\n};\nvar Root2 = AlertDialog;\nvar Trigger2 = AlertDialogTrigger;\nvar Portal2 = AlertDialogPortal;\nvar Overlay2 = AlertDialogOverlay;\nvar Content2 = AlertDialogContent;\nvar Action = AlertDialogAction;\nvar Cancel = AlertDialogCancel;\nvar Title2 = AlertDialogTitle;\nvar Description2 = AlertDialogDescription;\nexport {\n Action,\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n Cancel,\n Content2 as Content,\n Description2 as Description,\n Overlay2 as Overlay,\n Portal2 as Portal,\n Root2 as Root,\n Title2 as Title,\n Trigger2 as Trigger,\n createAlertDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\nimport * as React from \"react\";\n\nimport { buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n\treturn <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n\treturn <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n\treturn <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Overlay\n\t\t\tdata-slot=\"alert-dialog-overlay\"\n\t\t\tclassName={cn(\n\t\t\t\t\"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n\treturn (\n\t\t<AlertDialogPortal>\n\t\t\t<AlertDialogOverlay />\n\t\t\t<AlertDialogPrimitive.Content\n\t\t\t\tdata-slot=\"alert-dialog-content\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</AlertDialogPortal>\n\t);\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-header\"\n\t\t\tclassName={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-footer\"\n\t\t\tclassName={cn(\"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogTitle({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Title\n\t\t\tdata-slot=\"alert-dialog-title\"\n\t\t\tclassName={cn(\"text-lg font-semibold\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Description\n\t\t\tdata-slot=\"alert-dialog-description\"\n\t\t\tclassName={cn(\"text-muted-foreground text-sm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogAction({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n\treturn <AlertDialogPrimitive.Action className={cn(buttonVariants(), className)} {...props} />;\n}\n\nfunction AlertDialogCancel({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Cancel\n\t\t\tclassName={cn(buttonVariants({ variant: \"outline\" }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tAlertDialog,\n\tAlertDialogPortal,\n\tAlertDialogOverlay,\n\tAlertDialogTrigger,\n\tAlertDialogContent,\n\tAlertDialogHeader,\n\tAlertDialogFooter,\n\tAlertDialogTitle,\n\tAlertDialogDescription,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n};\n"],"names":["ROOT_NAME","createAlertDialogContext","createAlertDialogScope","createContextScope","createDialogScope","useDialogScope","AlertDialog","props","__scopeAlertDialog","alertDialogProps","dialogScope","jsx","DialogPrimitive.Root","modal","displayName","AlertDialogTrigger","React","forwardRef","forwardedRef","triggerProps","DialogPrimitive.Trigger","ref","AlertDialogPortal","portalProps","DialogPrimitive.Portal","AlertDialogOverlay","overlayProps","DialogPrimitive.Overlay","CONTENT_NAME","AlertDialogContentProvider","useAlertDialogContentContext","Slottable","createSlottable","AlertDialogContent","children","contentProps","contentRef","useRef","composedRefs","useComposedRefs","cancelRef","DialogPrimitive.WarningProvider","contentName","titleName","TITLE_NAME","docsSlug","scope","jsxs","DialogPrimitive.Content","role","onOpenAutoFocus","composeEventHandlers","event","preventDefault","current","focus","preventScroll","onPointerDownOutside","onInteractOutside","DescriptionWarning","AlertDialogTitle","titleProps","DialogPrimitive.Title","DESCRIPTION_NAME","AlertDialogDescription","descriptionProps","DialogPrimitive.Description","AlertDialogAction","actionProps","DialogPrimitive.Close","CANCEL_NAME","AlertDialogCancel","cancelProps","MESSAGE","useEffect","document","getElementById","getAttribute","Root","Trigger","Portal","Overlay","Content","Action","Cancel","Title","Description","createElement","AlertDialogPrimitive","data-slot","className","cn","AlertDialogHeader","div","AlertDialogFooter","buttonVariants","variant"],"mappings":"q5BAcA,IAAMA,EAAY,eAGXC,EAA0BC,GAA0BC,EAAmBH,EAAW,CACvFI,IAEIC,EAAiBD,IAKjBE,EAA2CC,IAC/C,MAAMC,mBAAEA,KAAuBC,GAAqBF,EAC9CG,EAAcL,EAAeG,GACnC,OAAOG,EAAiBC,EAAhB,IAAyBF,KAAiBD,EAAkBI,OAAO,KAG7EP,EAAYQ,YAAcd,EAK1B,IAMMe,EAA2BC,EAAAC,WAC/B,CAACV,EAA6CW,KAC5C,MAAMV,mBAAEA,KAAuBW,GAAiBZ,EAC1CG,EAAcL,EAAeG,GACnC,OAAOG,EAAiBS,EAAhB,IAA4BV,KAAiBS,EAAcE,IAAKH,MAI5EH,EAAmBD,YAdE,qBAoBrB,IAKMQ,EACJf,IAEA,MAAMC,mBAAEA,KAAuBe,GAAgBhB,EACzCG,EAAcL,EAAeG,GACnC,OAAOG,EAAiBa,EAAhB,IAA2Bd,KAAiBa,KAGtDD,EAAkBR,YAbE,oBAmBpB,IAMMW,EAA2BT,EAA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AAU,yBAA0BlF,GACzE,CAEA,SAASkB,GAAmBiE,UAC3BA,KACGnF,IAEH,OACCS,EAAAuE,cAACC,EAA4B,CAC5BC,YAAU,uBACVC,UAAWC,EACV,yJACAD,MAEGnF,GAGP,CAEA,SAAS0B,GAAmByD,UAC3BA,KACGnF,IAEH,OACCS,gBAACM,EAAAA,KACAN,EAAAuE,cAAC9D,EAAAA,MACDT,EAAAuE,cAACC,EAA4B,CAC5BC,YAAU,uBACVC,UAAWC,EACV,8WACAD,MAEGnF,IAIR,CAEA,SAASqF,IAAkBF,UAAEA,KAAcnF,IAC1C,OACCS,EAAAuE,cAACM,MAAAA,CACAJ,YAAU,sBACVC,UAAWC,EAAG,+CAAgDD,MAC1DnF,GAGP,CAEA,SAASuF,IAAkBJ,UAAEA,KAAcnF,IAC1C,OACCS,EAAAuE,cAACM,MAAAA,CACAJ,YAAU,sBACVC,UAAWC,EAAG,yDAA0DD,MACpEnF,GAGP,CAEA,SAASqD,IAAiB8B,UACzBA,KACGnF,IAEH,OACCS,EAAAuE,cAACC,EAA0B,CAC1BC,YAAU,qBACVC,UAAWC,EAAG,wBAAyBD,MACnCnF,GAGP,CAEA,SAASyD,IAAuB0B,UAC/BA,KACGnF,IAEH,OACCS,EAAAuE,cAACC,EAAgC,CAChCC,YAAU,2BACVC,UAAWC,EAAG,gCAAiCD,MAC3CnF,GAGP,CAEA,SAAS4D,IAAkBuB,UAC1BA,KACGnF,IAEH,OAAOS,EAAAuE,cAACC,EAA2B,CAACE,UAAWC,EAAGI,IAAkBL,MAAgBnF,GACrF,CAEA,SAASgE,IAAkBmB,UAC1BA,KACGnF,IAEH,OACCS,EAAAuE,cAACC,EAA2B,CAC3BE,UAAWC,EAAGI,EAAe,CAAEC,QAAS,YAAcN,MAClDnF,GAGP","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.mjs","sources":["../../node_modules/@radix-ui/react-alert-dialog/dist/index.mjs","../../src/components/ui/alert-dialog/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\n// src/alert-dialog.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { createDialogScope } from \"@radix-ui/react-dialog\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createSlottable } from \"@radix-ui/react-slot\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar ROOT_NAME = \"AlertDialog\";\nvar [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope\n]);\nvar useDialogScope = createDialogScope();\nvar AlertDialog = (props) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });\n};\nAlertDialog.displayName = ROOT_NAME;\nvar TRIGGER_NAME = \"AlertDialogTrigger\";\nvar AlertDialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });\n }\n);\nAlertDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"AlertDialogPortal\";\nvar AlertDialogPortal = (props) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });\n};\nAlertDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"AlertDialogOverlay\";\nvar AlertDialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });\n }\n);\nAlertDialogOverlay.displayName = OVERLAY_NAME;\nvar CONTENT_NAME = \"AlertDialogContent\";\nvar [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);\nvar Slottable = createSlottable(\"AlertDialogContent\");\nvar AlertDialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef(null);\n return /* @__PURE__ */ jsx(\n DialogPrimitive.WarningProvider,\n {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"alert-dialog\",\n children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(\n DialogPrimitive.Content,\n {\n role: \"alertdialog\",\n ...dialogScope,\n ...contentProps,\n ref: composedRefs,\n onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n }),\n onPointerDownOutside: (event) => event.preventDefault(),\n onInteractOutside: (event) => event.preventDefault(),\n children: [\n /* @__PURE__ */ jsx(Slottable, { children }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })\n ]\n }\n ) })\n }\n );\n }\n);\nAlertDialogContent.displayName = CONTENT_NAME;\nvar TITLE_NAME = \"AlertDialogTitle\";\nvar AlertDialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });\n }\n);\nAlertDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"AlertDialogDescription\";\nvar AlertDialogDescription = React.forwardRef((props, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });\n});\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\nvar ACTION_NAME = \"AlertDialogAction\";\nvar AlertDialogAction = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });\n }\n);\nAlertDialogAction.displayName = ACTION_NAME;\nvar CANCEL_NAME = \"AlertDialogCancel\";\nvar AlertDialogCancel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });\n }\n);\nAlertDialogCancel.displayName = CANCEL_NAME;\nvar DescriptionWarning = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute(\"aria-describedby\")\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n return null;\n};\nvar Root2 = AlertDialog;\nvar Trigger2 = AlertDialogTrigger;\nvar Portal2 = AlertDialogPortal;\nvar Overlay2 = AlertDialogOverlay;\nvar Content2 = AlertDialogContent;\nvar Action = AlertDialogAction;\nvar Cancel = AlertDialogCancel;\nvar Title2 = AlertDialogTitle;\nvar Description2 = AlertDialogDescription;\nexport {\n Action,\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n Cancel,\n Content2 as Content,\n Description2 as Description,\n Overlay2 as Overlay,\n Portal2 as Portal,\n Root2 as Root,\n Title2 as Title,\n Trigger2 as Trigger,\n createAlertDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\nimport * as React from \"react\";\n\nimport { buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n\treturn <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n\treturn <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n\treturn <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Overlay\n\t\t\tdata-slot=\"alert-dialog-overlay\"\n\t\t\tclassName={cn(\n\t\t\t\t\"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n\treturn (\n\t\t<AlertDialogPortal>\n\t\t\t<AlertDialogOverlay />\n\t\t\t<AlertDialogPrimitive.Content\n\t\t\t\tdata-slot=\"alert-dialog-content\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</AlertDialogPortal>\n\t);\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-header\"\n\t\t\tclassName={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-footer\"\n\t\t\tclassName={cn(\"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogTitle({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Title\n\t\t\tdata-slot=\"alert-dialog-title\"\n\t\t\tclassName={cn(\"text-lg font-semibold\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Description\n\t\t\tdata-slot=\"alert-dialog-description\"\n\t\t\tclassName={cn(\"text-muted-foreground text-sm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogAction({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n\treturn <AlertDialogPrimitive.Action className={cn(buttonVariants(), className)} {...props} />;\n}\n\nfunction AlertDialogCancel({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Cancel\n\t\t\tclassName={cn(buttonVariants({ variant: \"outline\" }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tAlertDialog,\n\tAlertDialogPortal,\n\tAlertDialogOverlay,\n\tAlertDialogTrigger,\n\tAlertDialogContent,\n\tAlertDialogHeader,\n\tAlertDialogFooter,\n\tAlertDialogTitle,\n\tAlertDialogDescription,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n};\n"],"names":["AlertDialog","DialogPrimitive.Root","AlertDialogTrigger","DialogPrimitive.Trigger","AlertDialogPortal","DialogPrimitive.Portal","AlertDialogOverlay","DialogPrimitive.Overlay","AlertDialogContent","DialogPrimitive.WarningProvider","DialogPrimitive.Content","AlertDialogTitle","DialogPrimitive.Title","AlertDialogDescription","DialogPrimitive.Description","AlertDialogAction","DialogPrimitive.Close","AlertDialogCancel","Root","Trigger","Portal","Overlay","Content","Title","Description","props","AlertDialogPrimitive","data-slot","className","cn","AlertDialogHeader","div","AlertDialogFooter","buttonVariants","variant"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAcA,IAAM,SAAA,GAAY,aAAA;AAGlB,IAAM,CAAC,wBAAA,EAA0B,sBAAsB,CAAA,GAAI,mBAAmB,SA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SAAAA,EAAWC,GAAG,uBAAA,EAAyBD,SAAAA,CAAAA;AACtC,QAAA,GAAGH;;AAGP;AAEA,SAASZ,sBAAAA,CAAuB,EAC/Be,SAAS,EACT,GAAGH,KAAAA,EAC4D,EAAA;IAC/D,qBACC,KAAA,CAAA,aAAA,CAACC,YAAgC,EAAA;QAChCC,WAAAA,EAAU,0BAAA;AACVC,QAAAA,SAAAA,EAAWC,GAAG,+BAAA,EAAiCD,SAAAA,CAAAA;AAC9C,QAAA,GAAGH;;AAGP;AAEA,SAASV,iBAAAA,CAAkB,EAC1Ba,SAAS,EACT,GAAGH,KAAAA,EACuD,EAAA;IAC1D,qBAAO,KAAA,CAAA,aAAA,CAACC,MAA2B,EAAA;AAACE,QAAAA,SAAAA,EAAWC,GAAGI,cAAAA,EAAAA,EAAkBL,SAAAA,CAAAA;AAAa,QAAA,GAAGH;;AACrF;AAEA,SAASR,iBAAAA,CAAkB,EAC1BW,SAAS,EACT,GAAGH,KAAAA,EACuD,EAAA;IAC1D,qBACC,KAAA,CAAA,aAAA,CAACC,MAA2B,EAAA;AAC3BE,QAAAA,SAAAA,EAAWC,GAAGI,cAAAA,CAAe;YAAEC,OAAAA,EAAS;SAAU,CAAA,EAAIN,SAAAA,CAAAA;AACrD,QAAA,GAAGH;;AAGP;;;;","x_google_ignoreList":[0]}
@@ -1,2 +1,165 @@
1
- import*as e from"react";import{c as r}from"../chunks/index-CCcl327A.mjs";import{u as a}from"../chunks/index-CXszXOf_.mjs";import{u as t}from"../chunks/index-CLtWFQL5.mjs";import{P as n}from"../chunks/index-w9bxia3O.mjs";import{r as s}from"../chunks/index-Cpq7N5Ej.mjs";import{jsx as o}from"react/jsx-runtime";import{c as i}from"../chunks/utils-BctauAA9.mjs";import"react-dom";import"@radix-ui/react-slot";import"../chunks/bundle-mjs-9BXytT_r.mjs";var l=s();function u(){return()=>{}}var c="Avatar",[m,d]=r(c),[f,p]=m(c),v=e.forwardRef((r,a)=>{const{__scopeAvatar:t,...s}=r,[i,l]=e.useState("idle");return o(f,{scope:t,imageLoadingStatus:i,onImageLoadingStatusChange:l,children:o(n.span,{...s,ref:a})})});v.displayName=c;var g="AvatarImage",h=e.forwardRef((r,s)=>{const{__scopeAvatar:i,src:c,onLoadingStatusChange:m=()=>{},...d}=r,f=p(g,i),v=function(r,{referrerPolicy:a,crossOrigin:n}){const s=l.useSyncExternalStore(u,()=>!0,()=>!1),o=e.useRef(null),i=s?(o.current||(o.current=new window.Image),o.current):null,[c,m]=e.useState(()=>j(i,r));return t(()=>{m(j(i,r))},[i,r]),t(()=>{const e=e=>()=>{m(e)};if(!i)return;const r=e("loaded"),t=e("error");return i.addEventListener("load",r),i.addEventListener("error",t),a&&(i.referrerPolicy=a),"string"==typeof n&&(i.crossOrigin=n),()=>{i.removeEventListener("load",r),i.removeEventListener("error",t)}},[i,n,a]),c}(c,d),h=a(e=>{m(e),f.onImageLoadingStatusChange(e)});return t(()=>{"idle"!==v&&h(v)},[v,h]),"loaded"===v?o(n.img,{...d,ref:s,src:c}):null});h.displayName=g;var w="AvatarFallback",x=e.forwardRef((r,a)=>{const{__scopeAvatar:t,delayMs:s,...i}=r,l=p(w,t),[u,c]=e.useState(void 0===s);return e.useEffect(()=>{if(void 0!==s){const e=window.setTimeout(()=>c(!0),s);return()=>window.clearTimeout(e)}},[s]),u&&"loaded"!==l.imageLoadingStatus?o(n.span,{...i,ref:a}):null});function j(e,r){return e?r?(e.src!==r&&(e.src=r),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}x.displayName=w;var k=v,S=h,y=x;function E({className:r,...a}){return e.createElement(k,{"data-slot":"avatar",className:i("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",r),...a})}function L({className:r,...a}){return e.createElement(S,{"data-slot":"avatar-image",className:i("aspect-square h-full w-full",r),...a})}function N({className:r,...a}){return e.createElement(y,{"data-slot":"avatar-fallback",className:i("bg-muted flex h-full w-full items-center justify-center rounded-full",r),...a})}export{E as Avatar,N as AvatarFallback,L as AvatarImage};
1
+ import * as React from 'react';
2
+ import { c as createContextScope } from '../chunks/index-B_FsTtnF.mjs';
3
+ import { u as useCallbackRef } from '../chunks/index-CAg47KJ6.mjs';
4
+ import { u as useLayoutEffect2 } from '../chunks/index-BZUrHhU8.mjs';
5
+ import { P as Primitive } from '../chunks/index-D0S6rRRE.mjs';
6
+ import { r as requireShim } from '../chunks/index-PaJVyocC.mjs';
7
+ import { jsx } from 'react/jsx-runtime';
8
+ import { c as cn } from '../chunks/utils-BUelq9Ro.mjs';
9
+ import 'react-dom';
10
+ import '@radix-ui/react-slot';
11
+ import '../chunks/bundle-mjs-tFg__FnT.mjs';
12
+
13
+ var shimExports = requireShim();
14
+
15
+ // src/use-is-hydrated.tsx
16
+ function useIsHydrated() {
17
+ return shimExports.useSyncExternalStore(subscribe, ()=>true, ()=>false);
18
+ }
19
+ function subscribe() {
20
+ return ()=>{};
21
+ }
22
+
23
+ var AVATAR_NAME = "Avatar";
24
+ var [createAvatarContext, createAvatarScope] = createContextScope(AVATAR_NAME);
25
+ var [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME);
26
+ var Avatar$1 = React.forwardRef((props, forwardedRef)=>{
27
+ const { __scopeAvatar, ...avatarProps } = props;
28
+ const [imageLoadingStatus, setImageLoadingStatus] = React.useState("idle");
29
+ return /* @__PURE__ */ jsx(AvatarProvider, {
30
+ scope: __scopeAvatar,
31
+ imageLoadingStatus,
32
+ onImageLoadingStatusChange: setImageLoadingStatus,
33
+ children: /* @__PURE__ */ jsx(Primitive.span, {
34
+ ...avatarProps,
35
+ ref: forwardedRef
36
+ })
37
+ });
38
+ });
39
+ Avatar$1.displayName = AVATAR_NAME;
40
+ var IMAGE_NAME = "AvatarImage";
41
+ var AvatarImage$1 = React.forwardRef((props, forwardedRef)=>{
42
+ const { __scopeAvatar, src, onLoadingStatusChange = ()=>{}, ...imageProps } = props;
43
+ const context = useAvatarContext(IMAGE_NAME, __scopeAvatar);
44
+ const imageLoadingStatus = useImageLoadingStatus(src, imageProps);
45
+ const handleLoadingStatusChange = useCallbackRef((status)=>{
46
+ onLoadingStatusChange(status);
47
+ context.onImageLoadingStatusChange(status);
48
+ });
49
+ useLayoutEffect2(()=>{
50
+ if (imageLoadingStatus !== "idle") {
51
+ handleLoadingStatusChange(imageLoadingStatus);
52
+ }
53
+ }, [
54
+ imageLoadingStatus,
55
+ handleLoadingStatusChange
56
+ ]);
57
+ return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive.img, {
58
+ ...imageProps,
59
+ ref: forwardedRef,
60
+ src
61
+ }) : null;
62
+ });
63
+ AvatarImage$1.displayName = IMAGE_NAME;
64
+ var FALLBACK_NAME = "AvatarFallback";
65
+ var AvatarFallback$1 = React.forwardRef((props, forwardedRef)=>{
66
+ const { __scopeAvatar, delayMs, ...fallbackProps } = props;
67
+ const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar);
68
+ const [canRender, setCanRender] = React.useState(delayMs === void 0);
69
+ React.useEffect(()=>{
70
+ if (delayMs !== void 0) {
71
+ const timerId = window.setTimeout(()=>setCanRender(true), delayMs);
72
+ return ()=>window.clearTimeout(timerId);
73
+ }
74
+ }, [
75
+ delayMs
76
+ ]);
77
+ return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive.span, {
78
+ ...fallbackProps,
79
+ ref: forwardedRef
80
+ }) : null;
81
+ });
82
+ AvatarFallback$1.displayName = FALLBACK_NAME;
83
+ function resolveLoadingStatus(image, src) {
84
+ if (!image) {
85
+ return "idle";
86
+ }
87
+ if (!src) {
88
+ return "error";
89
+ }
90
+ if (image.src !== src) {
91
+ image.src = src;
92
+ }
93
+ return image.complete && image.naturalWidth > 0 ? "loaded" : "loading";
94
+ }
95
+ function useImageLoadingStatus(src, { referrerPolicy, crossOrigin }) {
96
+ const isHydrated = useIsHydrated();
97
+ const imageRef = React.useRef(null);
98
+ const image = (()=>{
99
+ if (!isHydrated) return null;
100
+ if (!imageRef.current) {
101
+ imageRef.current = new window.Image();
102
+ }
103
+ return imageRef.current;
104
+ })();
105
+ const [loadingStatus, setLoadingStatus] = React.useState(()=>resolveLoadingStatus(image, src));
106
+ useLayoutEffect2(()=>{
107
+ setLoadingStatus(resolveLoadingStatus(image, src));
108
+ }, [
109
+ image,
110
+ src
111
+ ]);
112
+ useLayoutEffect2(()=>{
113
+ const updateStatus = (status)=>()=>{
114
+ setLoadingStatus(status);
115
+ };
116
+ if (!image) return;
117
+ const handleLoad = updateStatus("loaded");
118
+ const handleError = updateStatus("error");
119
+ image.addEventListener("load", handleLoad);
120
+ image.addEventListener("error", handleError);
121
+ if (referrerPolicy) {
122
+ image.referrerPolicy = referrerPolicy;
123
+ }
124
+ if (typeof crossOrigin === "string") {
125
+ image.crossOrigin = crossOrigin;
126
+ }
127
+ return ()=>{
128
+ image.removeEventListener("load", handleLoad);
129
+ image.removeEventListener("error", handleError);
130
+ };
131
+ }, [
132
+ image,
133
+ crossOrigin,
134
+ referrerPolicy
135
+ ]);
136
+ return loadingStatus;
137
+ }
138
+ var Root = Avatar$1;
139
+ var Image = AvatarImage$1;
140
+ var Fallback = AvatarFallback$1;
141
+
142
+ function Avatar({ className, ...props }) {
143
+ return /*#__PURE__*/ React.createElement(Root, {
144
+ "data-slot": "avatar",
145
+ className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
146
+ ...props
147
+ });
148
+ }
149
+ function AvatarImage({ className, ...props }) {
150
+ return /*#__PURE__*/ React.createElement(Image, {
151
+ "data-slot": "avatar-image",
152
+ className: cn("aspect-square h-full w-full", className),
153
+ ...props
154
+ });
155
+ }
156
+ function AvatarFallback({ className, ...props }) {
157
+ return /*#__PURE__*/ React.createElement(Fallback, {
158
+ "data-slot": "avatar-fallback",
159
+ className: cn("bg-muted flex h-full w-full items-center justify-center rounded-full", className),
160
+ ...props
161
+ });
162
+ }
163
+
164
+ export { Avatar, AvatarFallback, AvatarImage };
2
165
  //# sourceMappingURL=index.mjs.map