@arolariu/components 0.0.22 → 0.0.23

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 (562) hide show
  1. package/dist/cjs/components/ui/accordion.js +83 -0
  2. package/dist/cjs/components/ui/accordion.js.map +1 -0
  3. package/dist/cjs/components/ui/alert-dialog.js +165 -0
  4. package/dist/cjs/components/ui/alert-dialog.js.map +1 -0
  5. package/dist/cjs/components/ui/alert.js +67 -0
  6. package/dist/cjs/components/ui/alert.js.map +1 -0
  7. package/dist/cjs/components/ui/aspect-ratio.js +29 -0
  8. package/dist/cjs/components/ui/aspect-ratio.js.map +1 -0
  9. package/dist/cjs/components/ui/avatar.js +72 -0
  10. package/dist/cjs/components/ui/avatar.js.map +1 -0
  11. package/dist/cjs/components/ui/badge.js +42 -0
  12. package/dist/cjs/components/ui/badge.js.map +1 -0
  13. package/dist/cjs/components/ui/breadcrumb.js +105 -0
  14. package/dist/cjs/components/ui/breadcrumb.js.map +1 -0
  15. package/dist/cjs/components/ui/button.js +52 -0
  16. package/dist/cjs/components/ui/button.js.map +1 -0
  17. package/dist/cjs/components/ui/calendar.js +63 -0
  18. package/dist/cjs/components/ui/calendar.js.map +1 -0
  19. package/dist/cjs/components/ui/card.js +75 -0
  20. package/dist/cjs/components/ui/card.js.map +1 -0
  21. package/dist/cjs/components/ui/carousel.js +217 -0
  22. package/dist/cjs/components/ui/carousel.js.map +1 -0
  23. package/dist/cjs/components/ui/chart.js +262 -0
  24. package/dist/cjs/components/ui/chart.js.map +1 -0
  25. package/dist/cjs/components/ui/checkbox.js +50 -0
  26. package/dist/cjs/components/ui/checkbox.js.map +1 -0
  27. package/dist/cjs/components/ui/collapsible.js +53 -0
  28. package/dist/cjs/components/ui/collapsible.js.map +1 -0
  29. package/dist/cjs/components/ui/command.js +163 -0
  30. package/dist/cjs/components/ui/command.js.map +1 -0
  31. package/dist/cjs/components/ui/context-menu.js +242 -0
  32. package/dist/cjs/components/ui/context-menu.js.map +1 -0
  33. package/dist/cjs/components/ui/dialog.js +147 -0
  34. package/dist/cjs/components/ui/dialog.js.map +1 -0
  35. package/dist/cjs/components/ui/drawer.js +127 -0
  36. package/dist/cjs/components/ui/drawer.js.map +1 -0
  37. package/dist/cjs/components/ui/dropdown-menu.js +250 -0
  38. package/dist/cjs/components/ui/dropdown-menu.js.map +1 -0
  39. package/dist/cjs/components/ui/form.js +135 -0
  40. package/dist/cjs/components/ui/form.js.map +1 -0
  41. package/dist/cjs/components/ui/hover-card.js +57 -0
  42. package/dist/cjs/components/ui/hover-card.js.map +1 -0
  43. package/dist/cjs/components/ui/input-otp.js +86 -0
  44. package/dist/cjs/components/ui/input-otp.js.map +1 -0
  45. package/dist/cjs/components/ui/input.js +23 -0
  46. package/dist/cjs/components/ui/input.js.map +1 -0
  47. package/dist/cjs/components/ui/label.js +41 -0
  48. package/dist/cjs/components/ui/label.js.map +1 -0
  49. package/dist/cjs/components/ui/menubar.js +270 -0
  50. package/dist/cjs/components/ui/menubar.js.map +1 -0
  51. package/dist/cjs/components/ui/navigation-menu.js +189 -0
  52. package/dist/cjs/components/ui/navigation-menu.js.map +1 -0
  53. package/dist/cjs/components/ui/pagination.js +120 -0
  54. package/dist/cjs/components/ui/pagination.js.map +1 -0
  55. package/dist/cjs/components/ui/popover.js +63 -0
  56. package/dist/cjs/components/ui/popover.js.map +1 -0
  57. package/dist/cjs/components/ui/progress.js +50 -0
  58. package/dist/cjs/components/ui/progress.js.map +1 -0
  59. package/dist/cjs/components/ui/radio-group.js +64 -0
  60. package/dist/cjs/components/ui/radio-group.js.map +1 -0
  61. package/dist/cjs/components/ui/resizable.js +67 -0
  62. package/dist/cjs/components/ui/resizable.js.map +1 -0
  63. package/dist/cjs/components/ui/scroll-area.js +79 -0
  64. package/dist/cjs/components/ui/scroll-area.js.map +1 -0
  65. package/dist/cjs/components/ui/select.js +186 -0
  66. package/dist/cjs/components/ui/select.js.map +1 -0
  67. package/dist/cjs/components/ui/separator.js +45 -0
  68. package/dist/cjs/components/ui/separator.js.map +1 -0
  69. package/dist/cjs/components/ui/sheet.js +145 -0
  70. package/dist/cjs/components/ui/sheet.js.map +1 -0
  71. package/dist/cjs/components/ui/sidebar.js +654 -0
  72. package/dist/cjs/components/ui/sidebar.js.map +1 -0
  73. package/dist/cjs/components/ui/skeleton.js +16 -0
  74. package/dist/cjs/components/ui/skeleton.js.map +1 -0
  75. package/dist/cjs/components/ui/slider.js +83 -0
  76. package/dist/cjs/components/ui/slider.js.map +1 -0
  77. package/dist/cjs/components/ui/sonner.js +27 -0
  78. package/dist/cjs/components/ui/sonner.js.map +1 -0
  79. package/dist/cjs/components/ui/switch.js +50 -0
  80. package/dist/cjs/components/ui/switch.js.map +1 -0
  81. package/dist/cjs/components/ui/table.js +116 -0
  82. package/dist/cjs/components/ui/table.js.map +1 -0
  83. package/dist/cjs/components/ui/tabs.js +86 -0
  84. package/dist/cjs/components/ui/tabs.js.map +1 -0
  85. package/dist/cjs/components/ui/textarea.js +20 -0
  86. package/dist/cjs/components/ui/textarea.js.map +1 -0
  87. package/dist/cjs/components/ui/toggle-group.js +82 -0
  88. package/dist/cjs/components/ui/toggle-group.js.map +1 -0
  89. package/dist/cjs/components/ui/toggle.js +62 -0
  90. package/dist/cjs/components/ui/toggle.js.map +1 -0
  91. package/dist/cjs/components/ui/tooltip.js +74 -0
  92. package/dist/cjs/components/ui/tooltip.js.map +1 -0
  93. package/dist/cjs/hooks/use-mobile.js +36 -0
  94. package/dist/cjs/hooks/use-mobile.js.map +1 -0
  95. package/dist/cjs/index.js +295 -1
  96. package/dist/cjs/index.js.map +1 -1
  97. package/dist/cjs/lib/utils.js +9 -0
  98. package/dist/cjs/lib/utils.js.map +1 -0
  99. package/dist/es/components/ui/accordion.js +66 -0
  100. package/dist/es/components/ui/accordion.js.map +1 -0
  101. package/dist/es/components/ui/alert-dialog.js +148 -0
  102. package/dist/es/components/ui/alert-dialog.js.map +1 -0
  103. package/dist/es/{alert.js → components/ui/alert.js} +26 -26
  104. package/dist/es/components/ui/alert.js.map +1 -0
  105. package/dist/es/components/ui/aspect-ratio.js +12 -0
  106. package/dist/es/components/ui/aspect-ratio.js.map +1 -0
  107. package/dist/es/components/ui/avatar.js +55 -0
  108. package/dist/es/components/ui/avatar.js.map +1 -0
  109. package/dist/es/{badge.js → components/ui/badge.js} +18 -16
  110. package/dist/es/components/ui/badge.js.map +1 -0
  111. package/dist/es/components/ui/breadcrumb.js +105 -0
  112. package/dist/es/components/ui/breadcrumb.js.map +1 -0
  113. package/dist/es/{button.js → components/ui/button.js} +19 -17
  114. package/dist/es/components/ui/button.js.map +1 -0
  115. package/dist/es/components/ui/calendar.js +63 -0
  116. package/dist/es/components/ui/calendar.js.map +1 -0
  117. package/dist/es/components/ui/card.js +75 -0
  118. package/dist/es/components/ui/card.js.map +1 -0
  119. package/dist/es/components/ui/carousel.js +200 -0
  120. package/dist/es/components/ui/carousel.js.map +1 -0
  121. package/dist/es/components/ui/chart.js +244 -0
  122. package/dist/es/components/ui/chart.js.map +1 -0
  123. package/dist/es/components/ui/checkbox.js +33 -0
  124. package/dist/es/components/ui/checkbox.js.map +1 -0
  125. package/dist/es/components/ui/collapsible.js +36 -0
  126. package/dist/es/components/ui/collapsible.js.map +1 -0
  127. package/dist/es/components/ui/command.js +163 -0
  128. package/dist/es/components/ui/command.js.map +1 -0
  129. package/dist/es/components/ui/context-menu.js +225 -0
  130. package/dist/es/components/ui/context-menu.js.map +1 -0
  131. package/dist/es/components/ui/dialog.js +130 -0
  132. package/dist/es/components/ui/dialog.js.map +1 -0
  133. package/dist/es/components/ui/drawer.js +127 -0
  134. package/dist/es/components/ui/drawer.js.map +1 -0
  135. package/dist/es/components/ui/dropdown-menu.js +233 -0
  136. package/dist/es/components/ui/dropdown-menu.js.map +1 -0
  137. package/dist/es/components/ui/form.js +118 -0
  138. package/dist/es/components/ui/form.js.map +1 -0
  139. package/dist/es/components/ui/hover-card.js +40 -0
  140. package/dist/es/components/ui/hover-card.js.map +1 -0
  141. package/dist/es/components/ui/input-otp.js +69 -0
  142. package/dist/es/components/ui/input-otp.js.map +1 -0
  143. package/dist/es/{input.js → components/ui/input.js} +10 -9
  144. package/dist/es/components/ui/input.js.map +1 -0
  145. package/dist/es/components/ui/label.js +24 -0
  146. package/dist/es/components/ui/label.js.map +1 -0
  147. package/dist/es/components/ui/menubar.js +253 -0
  148. package/dist/es/components/ui/menubar.js.map +1 -0
  149. package/dist/es/components/ui/navigation-menu.js +172 -0
  150. package/dist/es/components/ui/navigation-menu.js.map +1 -0
  151. package/dist/es/components/ui/pagination.js +120 -0
  152. package/dist/es/components/ui/pagination.js.map +1 -0
  153. package/dist/es/components/ui/popover.js +46 -0
  154. package/dist/es/components/ui/popover.js.map +1 -0
  155. package/dist/es/components/ui/progress.js +33 -0
  156. package/dist/es/components/ui/progress.js.map +1 -0
  157. package/dist/es/components/ui/radio-group.js +47 -0
  158. package/dist/es/components/ui/radio-group.js.map +1 -0
  159. package/dist/es/components/ui/resizable.js +50 -0
  160. package/dist/es/components/ui/resizable.js.map +1 -0
  161. package/dist/es/components/ui/scroll-area.js +62 -0
  162. package/dist/es/components/ui/scroll-area.js.map +1 -0
  163. package/dist/es/components/ui/select.js +169 -0
  164. package/dist/es/components/ui/select.js.map +1 -0
  165. package/dist/es/components/ui/separator.js +28 -0
  166. package/dist/es/components/ui/separator.js.map +1 -0
  167. package/dist/es/components/ui/sheet.js +128 -0
  168. package/dist/es/components/ui/sheet.js.map +1 -0
  169. package/dist/es/components/ui/sidebar.js +637 -0
  170. package/dist/es/components/ui/sidebar.js.map +1 -0
  171. package/dist/es/components/ui/skeleton.js +16 -0
  172. package/dist/es/components/ui/skeleton.js.map +1 -0
  173. package/dist/es/components/ui/slider.js +65 -0
  174. package/dist/es/components/ui/slider.js.map +1 -0
  175. package/dist/es/components/ui/sonner.js +27 -0
  176. package/dist/es/components/ui/sonner.js.map +1 -0
  177. package/dist/es/components/ui/switch.js +33 -0
  178. package/dist/es/components/ui/switch.js.map +1 -0
  179. package/dist/es/components/ui/table.js +116 -0
  180. package/dist/es/components/ui/table.js.map +1 -0
  181. package/dist/es/components/ui/tabs.js +69 -0
  182. package/dist/es/components/ui/tabs.js.map +1 -0
  183. package/dist/es/{textarea.js → components/ui/textarea.js} +9 -8
  184. package/dist/es/components/ui/textarea.js.map +1 -0
  185. package/dist/es/components/ui/toggle-group.js +64 -0
  186. package/dist/es/components/ui/toggle-group.js.map +1 -0
  187. package/dist/es/{toggle-sZQvHluU.js → components/ui/toggle.js} +18 -44
  188. package/dist/es/components/ui/toggle.js.map +1 -0
  189. package/dist/es/components/ui/tooltip.js +57 -0
  190. package/dist/es/components/ui/tooltip.js.map +1 -0
  191. package/dist/es/hooks/use-mobile.js +19 -0
  192. package/dist/es/hooks/use-mobile.js.map +1 -0
  193. package/dist/es/index.js +293 -292
  194. package/dist/es/index.js.map +1 -1
  195. package/dist/es/lib/utils.js +9 -0
  196. package/dist/es/lib/utils.js.map +1 -0
  197. package/package.json +143 -146
  198. package/dist/cjs/accordion.js +0 -2
  199. package/dist/cjs/accordion.js.map +0 -1
  200. package/dist/cjs/alert-dialog.js +0 -8
  201. package/dist/cjs/alert-dialog.js.map +0 -1
  202. package/dist/cjs/alert.js +0 -2
  203. package/dist/cjs/alert.js.map +0 -1
  204. package/dist/cjs/aspect-ratio.js +0 -2
  205. package/dist/cjs/aspect-ratio.js.map +0 -1
  206. package/dist/cjs/avatar.js +0 -2
  207. package/dist/cjs/avatar.js.map +0 -1
  208. package/dist/cjs/badge.js +0 -2
  209. package/dist/cjs/badge.js.map +0 -1
  210. package/dist/cjs/breadcrumb.js +0 -2
  211. package/dist/cjs/breadcrumb.js.map +0 -1
  212. package/dist/cjs/button.js +0 -2
  213. package/dist/cjs/button.js.map +0 -1
  214. package/dist/cjs/calendar.js +0 -2
  215. package/dist/cjs/calendar.js.map +0 -1
  216. package/dist/cjs/card.js +0 -2
  217. package/dist/cjs/card.js.map +0 -1
  218. package/dist/cjs/carousel.js +0 -12
  219. package/dist/cjs/carousel.js.map +0 -1
  220. package/dist/cjs/chart.js +0 -33
  221. package/dist/cjs/chart.js.map +0 -1
  222. package/dist/cjs/check-DsmrR87f.cjs +0 -7
  223. package/dist/cjs/check-DsmrR87f.cjs.map +0 -1
  224. package/dist/cjs/checkbox.js +0 -2
  225. package/dist/cjs/checkbox.js.map +0 -1
  226. package/dist/cjs/chevron-down-BXHjLz6b.cjs +0 -7
  227. package/dist/cjs/chevron-down-BXHjLz6b.cjs.map +0 -1
  228. package/dist/cjs/chevron-left-DWN7aNcV.cjs +0 -7
  229. package/dist/cjs/chevron-left-DWN7aNcV.cjs.map +0 -1
  230. package/dist/cjs/chevron-right-B5DLWRs3.cjs +0 -7
  231. package/dist/cjs/chevron-right-B5DLWRs3.cjs.map +0 -1
  232. package/dist/cjs/circle-Go4w5B8m.cjs +0 -7
  233. package/dist/cjs/circle-Go4w5B8m.cjs.map +0 -1
  234. package/dist/cjs/collapsible.js +0 -2
  235. package/dist/cjs/collapsible.js.map +0 -1
  236. package/dist/cjs/command.js +0 -10
  237. package/dist/cjs/command.js.map +0 -1
  238. package/dist/cjs/context-menu.js +0 -2
  239. package/dist/cjs/context-menu.js.map +0 -1
  240. package/dist/cjs/createLucideIcon-7s3OZKKJ.cjs +0 -22
  241. package/dist/cjs/createLucideIcon-7s3OZKKJ.cjs.map +0 -1
  242. package/dist/cjs/dialog.js +0 -2
  243. package/dist/cjs/dialog.js.map +0 -1
  244. package/dist/cjs/drawer.js +0 -4
  245. package/dist/cjs/drawer.js.map +0 -1
  246. package/dist/cjs/dropdown-menu.js +0 -2
  247. package/dist/cjs/dropdown-menu.js.map +0 -1
  248. package/dist/cjs/ellipsis-Dcd0hJxD.cjs +0 -7
  249. package/dist/cjs/ellipsis-Dcd0hJxD.cjs.map +0 -1
  250. package/dist/cjs/form.js +0 -2
  251. package/dist/cjs/form.js.map +0 -1
  252. package/dist/cjs/hover-card.js +0 -2
  253. package/dist/cjs/hover-card.js.map +0 -1
  254. package/dist/cjs/index-BA7cqKce.cjs +0 -2
  255. package/dist/cjs/index-BA7cqKce.cjs.map +0 -1
  256. package/dist/cjs/index-BABhT3A2.cjs +0 -2
  257. package/dist/cjs/index-BABhT3A2.cjs.map +0 -1
  258. package/dist/cjs/index-BFkoAeYt.cjs +0 -2
  259. package/dist/cjs/index-BFkoAeYt.cjs.map +0 -1
  260. package/dist/cjs/index-BMYQQX5X.cjs +0 -2
  261. package/dist/cjs/index-BMYQQX5X.cjs.map +0 -1
  262. package/dist/cjs/index-BcYohIA6.cjs +0 -2
  263. package/dist/cjs/index-BcYohIA6.cjs.map +0 -1
  264. package/dist/cjs/index-C8ni3LLa.cjs +0 -2
  265. package/dist/cjs/index-C8ni3LLa.cjs.map +0 -1
  266. package/dist/cjs/index-CDuvS0oh.cjs +0 -2
  267. package/dist/cjs/index-CDuvS0oh.cjs.map +0 -1
  268. package/dist/cjs/index-CI-TYt7m.cjs +0 -2
  269. package/dist/cjs/index-CI-TYt7m.cjs.map +0 -1
  270. package/dist/cjs/index-CKsZU_EJ.cjs +0 -42
  271. package/dist/cjs/index-CKsZU_EJ.cjs.map +0 -1
  272. package/dist/cjs/index-Cje7xxa1.cjs +0 -2
  273. package/dist/cjs/index-Cje7xxa1.cjs.map +0 -1
  274. package/dist/cjs/index-CtQPmeNr.cjs +0 -2
  275. package/dist/cjs/index-CtQPmeNr.cjs.map +0 -1
  276. package/dist/cjs/index-D5UqZzES.cjs +0 -2
  277. package/dist/cjs/index-D5UqZzES.cjs.map +0 -1
  278. package/dist/cjs/index-DGxLeo0U.cjs +0 -2
  279. package/dist/cjs/index-DGxLeo0U.cjs.map +0 -1
  280. package/dist/cjs/index-DHINEOOo.cjs +0 -6
  281. package/dist/cjs/index-DHINEOOo.cjs.map +0 -1
  282. package/dist/cjs/index-DYxWvftI.cjs +0 -2
  283. package/dist/cjs/index-DYxWvftI.cjs.map +0 -1
  284. package/dist/cjs/index-Da4RIGhY.cjs +0 -2
  285. package/dist/cjs/index-Da4RIGhY.cjs.map +0 -1
  286. package/dist/cjs/index-DaxnLcvM.cjs +0 -2
  287. package/dist/cjs/index-DaxnLcvM.cjs.map +0 -1
  288. package/dist/cjs/index-Dqur2yAt.cjs +0 -2
  289. package/dist/cjs/index-Dqur2yAt.cjs.map +0 -1
  290. package/dist/cjs/index-Fzi6xTMp.cjs +0 -2
  291. package/dist/cjs/index-Fzi6xTMp.cjs.map +0 -1
  292. package/dist/cjs/index-YIs2_rrG.cjs +0 -2
  293. package/dist/cjs/index-YIs2_rrG.cjs.map +0 -1
  294. package/dist/cjs/index-hwV4SK1V.cjs +0 -2
  295. package/dist/cjs/index-hwV4SK1V.cjs.map +0 -1
  296. package/dist/cjs/index-urlL5V69.cjs +0 -2
  297. package/dist/cjs/index-urlL5V69.cjs.map +0 -1
  298. package/dist/cjs/index-vMiBE3Z1.cjs +0 -2
  299. package/dist/cjs/index-vMiBE3Z1.cjs.map +0 -1
  300. package/dist/cjs/index-yhkM5Qo-.cjs +0 -2
  301. package/dist/cjs/index-yhkM5Qo-.cjs.map +0 -1
  302. package/dist/cjs/input-otp.js +0 -26
  303. package/dist/cjs/input-otp.js.map +0 -1
  304. package/dist/cjs/input.js +0 -2
  305. package/dist/cjs/input.js.map +0 -1
  306. package/dist/cjs/label.js +0 -2
  307. package/dist/cjs/label.js.map +0 -1
  308. package/dist/cjs/menubar.js +0 -2
  309. package/dist/cjs/menubar.js.map +0 -1
  310. package/dist/cjs/navigation-menu.js +0 -2
  311. package/dist/cjs/navigation-menu.js.map +0 -1
  312. package/dist/cjs/pagination.js +0 -2
  313. package/dist/cjs/pagination.js.map +0 -1
  314. package/dist/cjs/popover.js +0 -2
  315. package/dist/cjs/popover.js.map +0 -1
  316. package/dist/cjs/progress.js +0 -7
  317. package/dist/cjs/progress.js.map +0 -1
  318. package/dist/cjs/radio-group.js +0 -2
  319. package/dist/cjs/radio-group.js.map +0 -1
  320. package/dist/cjs/resizable.js +0 -7
  321. package/dist/cjs/resizable.js.map +0 -1
  322. package/dist/cjs/scroll-area.js +0 -2
  323. package/dist/cjs/scroll-area.js.map +0 -1
  324. package/dist/cjs/select.js +0 -7
  325. package/dist/cjs/select.js.map +0 -1
  326. package/dist/cjs/separator.js +0 -2
  327. package/dist/cjs/separator.js.map +0 -1
  328. package/dist/cjs/sheet.js +0 -2
  329. package/dist/cjs/sheet.js.map +0 -1
  330. package/dist/cjs/sidebar-Bx3XeHcA.cjs +0 -7
  331. package/dist/cjs/sidebar-Bx3XeHcA.cjs.map +0 -1
  332. package/dist/cjs/sidebar.js +0 -2
  333. package/dist/cjs/sidebar.js.map +0 -1
  334. package/dist/cjs/skeleton.js +0 -2
  335. package/dist/cjs/skeleton.js.map +0 -1
  336. package/dist/cjs/slider.js +0 -2
  337. package/dist/cjs/slider.js.map +0 -1
  338. package/dist/cjs/sonner.js +0 -2
  339. package/dist/cjs/sonner.js.map +0 -1
  340. package/dist/cjs/switch.js +0 -2
  341. package/dist/cjs/switch.js.map +0 -1
  342. package/dist/cjs/table.js +0 -2
  343. package/dist/cjs/table.js.map +0 -1
  344. package/dist/cjs/tabs.js +0 -2
  345. package/dist/cjs/tabs.js.map +0 -1
  346. package/dist/cjs/textarea.js +0 -2
  347. package/dist/cjs/textarea.js.map +0 -1
  348. package/dist/cjs/toggle-B2GNuCnp.cjs +0 -2
  349. package/dist/cjs/toggle-B2GNuCnp.cjs.map +0 -1
  350. package/dist/cjs/toggle-group.js +0 -2
  351. package/dist/cjs/toggle-group.js.map +0 -1
  352. package/dist/cjs/toggle.js +0 -2
  353. package/dist/cjs/toggle.js.map +0 -1
  354. package/dist/cjs/tooltip.js +0 -2
  355. package/dist/cjs/tooltip.js.map +0 -1
  356. package/dist/cjs/utils-Gb5_Gcy7.cjs +0 -2
  357. package/dist/cjs/utils-Gb5_Gcy7.cjs.map +0 -1
  358. package/dist/cjs/x-Dn7F6zs7.cjs +0 -7
  359. package/dist/cjs/x-Dn7F6zs7.cjs.map +0 -1
  360. package/dist/es/accordion.js +0 -288
  361. package/dist/es/accordion.js.map +0 -1
  362. package/dist/es/alert-dialog.js +0 -251
  363. package/dist/es/alert-dialog.js.map +0 -1
  364. package/dist/es/alert.js.map +0 -1
  365. package/dist/es/aspect-ratio.js +0 -48
  366. package/dist/es/aspect-ratio.js.map +0 -1
  367. package/dist/es/avatar.js +0 -114
  368. package/dist/es/avatar.js.map +0 -1
  369. package/dist/es/badge.js.map +0 -1
  370. package/dist/es/breadcrumb.js +0 -104
  371. package/dist/es/breadcrumb.js.map +0 -1
  372. package/dist/es/button.js.map +0 -1
  373. package/dist/es/calendar.js +0 -2419
  374. package/dist/es/calendar.js.map +0 -1
  375. package/dist/es/card.js +0 -74
  376. package/dist/es/card.js.map +0 -1
  377. package/dist/es/carousel.js +0 -1446
  378. package/dist/es/carousel.js.map +0 -1
  379. package/dist/es/chart.js +0 -4448
  380. package/dist/es/chart.js.map +0 -1
  381. package/dist/es/check-BFSkh0zY.js +0 -12
  382. package/dist/es/check-BFSkh0zY.js.map +0 -1
  383. package/dist/es/checkbox.js +0 -158
  384. package/dist/es/checkbox.js.map +0 -1
  385. package/dist/es/chevron-down-D1WfRf9d.js +0 -12
  386. package/dist/es/chevron-down-D1WfRf9d.js.map +0 -1
  387. package/dist/es/chevron-left-B_RUqPq2.js +0 -12
  388. package/dist/es/chevron-left-B_RUqPq2.js.map +0 -1
  389. package/dist/es/chevron-right-CYkmGE7o.js +0 -12
  390. package/dist/es/chevron-right-CYkmGE7o.js.map +0 -1
  391. package/dist/es/circle-slaY-ZRd.js +0 -12
  392. package/dist/es/circle-slaY-ZRd.js.map +0 -1
  393. package/dist/es/collapsible.js +0 -35
  394. package/dist/es/collapsible.js.map +0 -1
  395. package/dist/es/command.js +0 -1498
  396. package/dist/es/command.js.map +0 -1
  397. package/dist/es/context-menu.js +0 -430
  398. package/dist/es/context-menu.js.map +0 -1
  399. package/dist/es/createLucideIcon-DuEFx7Oi.js +0 -80
  400. package/dist/es/createLucideIcon-DuEFx7Oi.js.map +0 -1
  401. package/dist/es/dialog.js +0 -129
  402. package/dist/es/dialog.js.map +0 -1
  403. package/dist/es/drawer.js +0 -1159
  404. package/dist/es/drawer.js.map +0 -1
  405. package/dist/es/dropdown-menu.js +0 -424
  406. package/dist/es/dropdown-menu.js.map +0 -1
  407. package/dist/es/ellipsis-BPt-NzsR.js +0 -16
  408. package/dist/es/ellipsis-BPt-NzsR.js.map +0 -1
  409. package/dist/es/form.js +0 -312
  410. package/dist/es/form.js.map +0 -1
  411. package/dist/es/hover-card.js +0 -206
  412. package/dist/es/hover-card.js.map +0 -1
  413. package/dist/es/index--Ec6-Sd5.js +0 -36
  414. package/dist/es/index--Ec6-Sd5.js.map +0 -1
  415. package/dist/es/index-B1ImaC_E.js +0 -28
  416. package/dist/es/index-B1ImaC_E.js.map +0 -1
  417. package/dist/es/index-BZPx6jYI.js +0 -9
  418. package/dist/es/index-BZPx6jYI.js.map +0 -1
  419. package/dist/es/index-BcF6J_oE.js +0 -682
  420. package/dist/es/index-BcF6J_oE.js.map +0 -1
  421. package/dist/es/index-Bu1KwSAv.js +0 -250
  422. package/dist/es/index-Bu1KwSAv.js.map +0 -1
  423. package/dist/es/index-BySFQqHy.js +0 -179
  424. package/dist/es/index-BySFQqHy.js.map +0 -1
  425. package/dist/es/index-ByaXH_ih.js +0 -11
  426. package/dist/es/index-ByaXH_ih.js.map +0 -1
  427. package/dist/es/index-C1lxUgu8.js +0 -35
  428. package/dist/es/index-C1lxUgu8.js.map +0 -1
  429. package/dist/es/index-Cv4f_S7-.js +0 -633
  430. package/dist/es/index-Cv4f_S7-.js.map +0 -1
  431. package/dist/es/index-D0hprziO.js +0 -33
  432. package/dist/es/index-D0hprziO.js.map +0 -1
  433. package/dist/es/index-D8JcuGO5.js +0 -1526
  434. package/dist/es/index-D8JcuGO5.js.map +0 -1
  435. package/dist/es/index-DLeNytVF.js +0 -10
  436. package/dist/es/index-DLeNytVF.js.map +0 -1
  437. package/dist/es/index-DPEsKR25.js +0 -135
  438. package/dist/es/index-DPEsKR25.js.map +0 -1
  439. package/dist/es/index-DXnZn5I3.js +0 -48
  440. package/dist/es/index-DXnZn5I3.js.map +0 -1
  441. package/dist/es/index-Db9lcxQz.js +0 -14
  442. package/dist/es/index-Db9lcxQz.js.map +0 -1
  443. package/dist/es/index-Dekf5jV-.js +0 -33
  444. package/dist/es/index-Dekf5jV-.js.map +0 -1
  445. package/dist/es/index-DnGHEwBw.js +0 -17
  446. package/dist/es/index-DnGHEwBw.js.map +0 -1
  447. package/dist/es/index-DwYXX2sM.js +0 -14
  448. package/dist/es/index-DwYXX2sM.js.map +0 -1
  449. package/dist/es/index-UFb2E87s.js +0 -71
  450. package/dist/es/index-UFb2E87s.js.map +0 -1
  451. package/dist/es/index-YS751NDG.js +0 -119
  452. package/dist/es/index-YS751NDG.js.map +0 -1
  453. package/dist/es/index-f-iPgWOf.js +0 -72
  454. package/dist/es/index-f-iPgWOf.js.map +0 -1
  455. package/dist/es/index-nyDQUcyF.js +0 -70
  456. package/dist/es/index-nyDQUcyF.js.map +0 -1
  457. package/dist/es/index-rKs9bXHr.js +0 -7
  458. package/dist/es/index-rKs9bXHr.js.map +0 -1
  459. package/dist/es/index-tHF99yB3.js +0 -7
  460. package/dist/es/index-tHF99yB3.js.map +0 -1
  461. package/dist/es/input-otp.js +0 -261
  462. package/dist/es/input-otp.js.map +0 -1
  463. package/dist/es/input.js.map +0 -1
  464. package/dist/es/label.js +0 -37
  465. package/dist/es/label.js.map +0 -1
  466. package/dist/es/menubar.js +0 -570
  467. package/dist/es/menubar.js.map +0 -1
  468. package/dist/es/navigation-menu.js +0 -755
  469. package/dist/es/navigation-menu.js.map +0 -1
  470. package/dist/es/pagination.js +0 -121
  471. package/dist/es/pagination.js.map +0 -1
  472. package/dist/es/popover.js +0 -267
  473. package/dist/es/popover.js.map +0 -1
  474. package/dist/es/progress.js +0 -108
  475. package/dist/es/progress.js.map +0 -1
  476. package/dist/es/radio-group.js +0 -259
  477. package/dist/es/radio-group.js.map +0 -1
  478. package/dist/es/resizable.js +0 -1529
  479. package/dist/es/resizable.js.map +0 -1
  480. package/dist/es/scroll-area.js +0 -581
  481. package/dist/es/scroll-area.js.map +0 -1
  482. package/dist/es/select.js +0 -988
  483. package/dist/es/select.js.map +0 -1
  484. package/dist/es/separator.js +0 -45
  485. package/dist/es/separator.js.map +0 -1
  486. package/dist/es/sheet.js +0 -127
  487. package/dist/es/sheet.js.map +0 -1
  488. package/dist/es/sidebar-B-DB4ekI.js +0 -610
  489. package/dist/es/sidebar-B-DB4ekI.js.map +0 -1
  490. package/dist/es/sidebar.js +0 -39
  491. package/dist/es/sidebar.js.map +0 -1
  492. package/dist/es/skeleton.js +0 -16
  493. package/dist/es/skeleton.js.map +0 -1
  494. package/dist/es/slider.js +0 -475
  495. package/dist/es/slider.js.map +0 -1
  496. package/dist/es/sonner.js +0 -790
  497. package/dist/es/sonner.js.map +0 -1
  498. package/dist/es/switch.js +0 -141
  499. package/dist/es/switch.js.map +0 -1
  500. package/dist/es/table.js +0 -115
  501. package/dist/es/table.js.map +0 -1
  502. package/dist/es/tabs.js +0 -218
  503. package/dist/es/tabs.js.map +0 -1
  504. package/dist/es/textarea.js.map +0 -1
  505. package/dist/es/toggle-group.js +0 -189
  506. package/dist/es/toggle-group.js.map +0 -1
  507. package/dist/es/toggle-sZQvHluU.js.map +0 -1
  508. package/dist/es/toggle.js +0 -9
  509. package/dist/es/toggle.js.map +0 -1
  510. package/dist/es/tooltip.js +0 -377
  511. package/dist/es/tooltip.js.map +0 -1
  512. package/dist/es/utils-B9KdtH6G.js +0 -2494
  513. package/dist/es/utils-B9KdtH6G.js.map +0 -1
  514. package/dist/es/x-CRMDqlOZ.js +0 -15
  515. package/dist/es/x-CRMDqlOZ.js.map +0 -1
  516. package/dist/types/accordion.d.ts +0 -2
  517. package/dist/types/alert-dialog.d.ts +0 -2
  518. package/dist/types/alert.d.ts +0 -2
  519. package/dist/types/aspect-ratio.d.ts +0 -2
  520. package/dist/types/avatar.d.ts +0 -2
  521. package/dist/types/badge.d.ts +0 -2
  522. package/dist/types/breadcrumb.d.ts +0 -2
  523. package/dist/types/button.d.ts +0 -2
  524. package/dist/types/calendar.d.ts +0 -2
  525. package/dist/types/card.d.ts +0 -2
  526. package/dist/types/carousel.d.ts +0 -2
  527. package/dist/types/chart.d.ts +0 -2
  528. package/dist/types/checkbox.d.ts +0 -2
  529. package/dist/types/collapsible.d.ts +0 -2
  530. package/dist/types/command.d.ts +0 -2
  531. package/dist/types/context-menu.d.ts +0 -2
  532. package/dist/types/dialog.d.ts +0 -2
  533. package/dist/types/drawer.d.ts +0 -2
  534. package/dist/types/dropdown-menu.d.ts +0 -2
  535. package/dist/types/form.d.ts +0 -2
  536. package/dist/types/global.d.ts +0 -3
  537. package/dist/types/hover-card.d.ts +0 -2
  538. package/dist/types/input-otp.d.ts +0 -2
  539. package/dist/types/input.d.ts +0 -2
  540. package/dist/types/label.d.ts +0 -2
  541. package/dist/types/menubar.d.ts +0 -2
  542. package/dist/types/navigation-menu.d.ts +0 -2
  543. package/dist/types/pagination.d.ts +0 -2
  544. package/dist/types/popover.d.ts +0 -2
  545. package/dist/types/progress.d.ts +0 -2
  546. package/dist/types/radio-group.d.ts +0 -2
  547. package/dist/types/resizable.d.ts +0 -2
  548. package/dist/types/scroll-area.d.ts +0 -2
  549. package/dist/types/select.d.ts +0 -2
  550. package/dist/types/separator.d.ts +0 -2
  551. package/dist/types/sheet.d.ts +0 -2
  552. package/dist/types/sidebar.d.ts +0 -2
  553. package/dist/types/skeleton.d.ts +0 -2
  554. package/dist/types/slider.d.ts +0 -2
  555. package/dist/types/sonner.d.ts +0 -2
  556. package/dist/types/switch.d.ts +0 -2
  557. package/dist/types/table.d.ts +0 -2
  558. package/dist/types/tabs.d.ts +0 -2
  559. package/dist/types/textarea.d.ts +0 -2
  560. package/dist/types/toggle-group.d.ts +0 -2
  561. package/dist/types/toggle.d.ts +0 -2
  562. package/dist/types/tooltip.d.ts +0 -2
package/dist/es/sonner.js DELETED
@@ -1,790 +0,0 @@
1
- import { jsx as Ut } from "react/jsx-runtime";
2
- import * as mt from "react";
3
- import a from "react";
4
- import Wt from "react-dom";
5
- var Xt = (n, o, e, s, x, d, h, E) => {
6
- let f = document.documentElement, i = ["light", "dark"];
7
- function v(b) {
8
- (Array.isArray(n) ? n : [n]).forEach((S) => {
9
- let U = S === "class", c = U && d ? x.map((B) => d[B] || B) : x;
10
- U ? (f.classList.remove(...c), f.classList.add(b)) : f.setAttribute(S, b);
11
- }), t(b);
12
- }
13
- function t(b) {
14
- E && i.includes(b) && (f.style.colorScheme = b);
15
- }
16
- function N() {
17
- return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
18
- }
19
- if (s) v(s);
20
- else try {
21
- let b = localStorage.getItem(o) || e, S = h && b === "system" ? N() : b;
22
- v(S);
23
- } catch {
24
- }
25
- }, Kt = mt.createContext(void 0), qt = { setTheme: (n) => {
26
- }, themes: [] }, Gt = () => {
27
- var n;
28
- return (n = mt.useContext(Kt)) != null ? n : qt;
29
- };
30
- mt.memo(({ forcedTheme: n, storageKey: o, attribute: e, enableSystem: s, enableColorScheme: x, defaultTheme: d, value: h, themes: E, nonce: f, scriptProps: i }) => {
31
- let v = JSON.stringify([e, o, d, n, E, h, s, x]).slice(1, -1);
32
- return mt.createElement("script", { ...i, suppressHydrationWarning: !0, nonce: typeof window > "u" ? f : "", dangerouslySetInnerHTML: { __html: `(${Xt.toString()})(${v})` } });
33
- });
34
- function Jt(n) {
35
- if (typeof document > "u") return;
36
- let o = document.head || document.getElementsByTagName("head")[0], e = document.createElement("style");
37
- e.type = "text/css", o.appendChild(e), e.styleSheet ? e.styleSheet.cssText = n : e.appendChild(document.createTextNode(n));
38
- }
39
- const Qt = (n) => {
40
- switch (n) {
41
- case "success":
42
- return ee;
43
- case "info":
44
- return oe;
45
- case "warning":
46
- return ae;
47
- case "error":
48
- return se;
49
- default:
50
- return null;
51
- }
52
- }, Zt = Array(12).fill(0), te = ({ visible: n, className: o }) => /* @__PURE__ */ a.createElement("div", {
53
- className: [
54
- "sonner-loading-wrapper",
55
- o
56
- ].filter(Boolean).join(" "),
57
- "data-visible": n
58
- }, /* @__PURE__ */ a.createElement("div", {
59
- className: "sonner-spinner"
60
- }, Zt.map((e, s) => /* @__PURE__ */ a.createElement("div", {
61
- className: "sonner-loading-bar",
62
- key: `spinner-bar-${s}`
63
- })))), ee = /* @__PURE__ */ a.createElement("svg", {
64
- xmlns: "http://www.w3.org/2000/svg",
65
- viewBox: "0 0 20 20",
66
- fill: "currentColor",
67
- height: "20",
68
- width: "20"
69
- }, /* @__PURE__ */ a.createElement("path", {
70
- fillRule: "evenodd",
71
- d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
72
- clipRule: "evenodd"
73
- })), ae = /* @__PURE__ */ a.createElement("svg", {
74
- xmlns: "http://www.w3.org/2000/svg",
75
- viewBox: "0 0 24 24",
76
- fill: "currentColor",
77
- height: "20",
78
- width: "20"
79
- }, /* @__PURE__ */ a.createElement("path", {
80
- fillRule: "evenodd",
81
- d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
82
- clipRule: "evenodd"
83
- })), oe = /* @__PURE__ */ a.createElement("svg", {
84
- xmlns: "http://www.w3.org/2000/svg",
85
- viewBox: "0 0 20 20",
86
- fill: "currentColor",
87
- height: "20",
88
- width: "20"
89
- }, /* @__PURE__ */ a.createElement("path", {
90
- fillRule: "evenodd",
91
- d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
92
- clipRule: "evenodd"
93
- })), se = /* @__PURE__ */ a.createElement("svg", {
94
- xmlns: "http://www.w3.org/2000/svg",
95
- viewBox: "0 0 20 20",
96
- fill: "currentColor",
97
- height: "20",
98
- width: "20"
99
- }, /* @__PURE__ */ a.createElement("path", {
100
- fillRule: "evenodd",
101
- d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
102
- clipRule: "evenodd"
103
- })), ne = /* @__PURE__ */ a.createElement("svg", {
104
- xmlns: "http://www.w3.org/2000/svg",
105
- width: "12",
106
- height: "12",
107
- viewBox: "0 0 24 24",
108
- fill: "none",
109
- stroke: "currentColor",
110
- strokeWidth: "1.5",
111
- strokeLinecap: "round",
112
- strokeLinejoin: "round"
113
- }, /* @__PURE__ */ a.createElement("line", {
114
- x1: "18",
115
- y1: "6",
116
- x2: "6",
117
- y2: "18"
118
- }), /* @__PURE__ */ a.createElement("line", {
119
- x1: "6",
120
- y1: "6",
121
- x2: "18",
122
- y2: "18"
123
- })), re = () => {
124
- const [n, o] = a.useState(document.hidden);
125
- return a.useEffect(() => {
126
- const e = () => {
127
- o(document.hidden);
128
- };
129
- return document.addEventListener("visibilitychange", e), () => window.removeEventListener("visibilitychange", e);
130
- }, []), n;
131
- };
132
- let wt = 1;
133
- class ie {
134
- constructor() {
135
- this.subscribe = (o) => (this.subscribers.push(o), () => {
136
- const e = this.subscribers.indexOf(o);
137
- this.subscribers.splice(e, 1);
138
- }), this.publish = (o) => {
139
- this.subscribers.forEach((e) => e(o));
140
- }, this.addToast = (o) => {
141
- this.publish(o), this.toasts = [
142
- ...this.toasts,
143
- o
144
- ];
145
- }, this.create = (o) => {
146
- var e;
147
- const { message: s, ...x } = o, d = typeof (o == null ? void 0 : o.id) == "number" || ((e = o.id) == null ? void 0 : e.length) > 0 ? o.id : wt++, h = this.toasts.find((f) => f.id === d), E = o.dismissible === void 0 ? !0 : o.dismissible;
148
- return this.dismissedToasts.has(d) && this.dismissedToasts.delete(d), h ? this.toasts = this.toasts.map((f) => f.id === d ? (this.publish({
149
- ...f,
150
- ...o,
151
- id: d,
152
- title: s
153
- }), {
154
- ...f,
155
- ...o,
156
- id: d,
157
- dismissible: E,
158
- title: s
159
- }) : f) : this.addToast({
160
- title: s,
161
- ...x,
162
- dismissible: E,
163
- id: d
164
- }), d;
165
- }, this.dismiss = (o) => (this.dismissedToasts.add(o), o || this.toasts.forEach((e) => {
166
- this.subscribers.forEach((s) => s({
167
- id: e.id,
168
- dismiss: !0
169
- }));
170
- }), requestAnimationFrame(() => this.subscribers.forEach((e) => e({
171
- id: o,
172
- dismiss: !0
173
- }))), o), this.message = (o, e) => this.create({
174
- ...e,
175
- message: o
176
- }), this.error = (o, e) => this.create({
177
- ...e,
178
- message: o,
179
- type: "error"
180
- }), this.success = (o, e) => this.create({
181
- ...e,
182
- type: "success",
183
- message: o
184
- }), this.info = (o, e) => this.create({
185
- ...e,
186
- type: "info",
187
- message: o
188
- }), this.warning = (o, e) => this.create({
189
- ...e,
190
- type: "warning",
191
- message: o
192
- }), this.loading = (o, e) => this.create({
193
- ...e,
194
- type: "loading",
195
- message: o
196
- }), this.promise = (o, e) => {
197
- if (!e)
198
- return;
199
- let s;
200
- e.loading !== void 0 && (s = this.create({
201
- ...e,
202
- promise: o,
203
- type: "loading",
204
- message: e.loading,
205
- description: typeof e.description != "function" ? e.description : void 0
206
- }));
207
- const x = Promise.resolve(o instanceof Function ? o() : o);
208
- let d = s !== void 0, h;
209
- const E = x.then(async (i) => {
210
- if (h = [
211
- "resolve",
212
- i
213
- ], a.isValidElement(i))
214
- d = !1, this.create({
215
- id: s,
216
- type: "default",
217
- message: i
218
- });
219
- else if (de(i) && !i.ok) {
220
- d = !1;
221
- const t = typeof e.error == "function" ? await e.error(`HTTP error! status: ${i.status}`) : e.error, N = typeof e.description == "function" ? await e.description(`HTTP error! status: ${i.status}`) : e.description, b = typeof t == "object" ? t : {
222
- message: t
223
- };
224
- this.create({
225
- id: s,
226
- type: "error",
227
- description: N,
228
- ...b
229
- });
230
- } else if (i instanceof Error) {
231
- d = !1;
232
- const t = typeof e.error == "function" ? await e.error(i) : e.error, N = typeof e.description == "function" ? await e.description(i) : e.description, b = typeof t == "object" ? t : {
233
- message: t
234
- };
235
- this.create({
236
- id: s,
237
- type: "error",
238
- description: N,
239
- ...b
240
- });
241
- } else if (e.success !== void 0) {
242
- d = !1;
243
- const t = typeof e.success == "function" ? await e.success(i) : e.success, N = typeof e.description == "function" ? await e.description(i) : e.description, b = typeof t == "object" ? t : {
244
- message: t
245
- };
246
- this.create({
247
- id: s,
248
- type: "success",
249
- description: N,
250
- ...b
251
- });
252
- }
253
- }).catch(async (i) => {
254
- if (h = [
255
- "reject",
256
- i
257
- ], e.error !== void 0) {
258
- d = !1;
259
- const v = typeof e.error == "function" ? await e.error(i) : e.error, t = typeof e.description == "function" ? await e.description(i) : e.description, N = typeof v == "object" ? v : {
260
- message: v
261
- };
262
- this.create({
263
- id: s,
264
- type: "error",
265
- description: t,
266
- ...N
267
- });
268
- }
269
- }).finally(() => {
270
- d && (this.dismiss(s), s = void 0), e.finally == null || e.finally.call(e);
271
- }), f = () => new Promise((i, v) => E.then(() => h[0] === "reject" ? v(h[1]) : i(h[1])).catch(v));
272
- return typeof s != "string" && typeof s != "number" ? {
273
- unwrap: f
274
- } : Object.assign(s, {
275
- unwrap: f
276
- });
277
- }, this.custom = (o, e) => {
278
- const s = (e == null ? void 0 : e.id) || wt++;
279
- return this.create({
280
- jsx: o(s),
281
- id: s,
282
- ...e
283
- }), s;
284
- }, this.getActiveToasts = () => this.toasts.filter((o) => !this.dismissedToasts.has(o.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
285
- }
286
- }
287
- const k = new ie(), le = (n, o) => {
288
- const e = (o == null ? void 0 : o.id) || wt++;
289
- return k.addToast({
290
- title: n,
291
- ...o,
292
- id: e
293
- }), e;
294
- }, de = (n) => n && typeof n == "object" && "ok" in n && typeof n.ok == "boolean" && "status" in n && typeof n.status == "number", ce = le, ue = () => k.toasts, fe = () => k.getActiveToasts();
295
- Object.assign(ce, {
296
- success: k.success,
297
- info: k.info,
298
- warning: k.warning,
299
- error: k.error,
300
- custom: k.custom,
301
- message: k.message,
302
- promise: k.promise,
303
- dismiss: k.dismiss,
304
- loading: k.loading
305
- }, {
306
- getHistory: ue,
307
- getToasts: fe
308
- });
309
- Jt("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
310
- function ft(n) {
311
- return n.label !== void 0;
312
- }
313
- const me = 3, pe = "24px", ge = "16px", Rt = 4e3, he = 356, be = 14, ve = 45, ye = 200;
314
- function z(...n) {
315
- return n.filter(Boolean).join(" ");
316
- }
317
- function we(n) {
318
- const [o, e] = n.split("-"), s = [];
319
- return o && s.push(o), e && s.push(e), s;
320
- }
321
- const xe = (n) => {
322
- var o, e, s, x, d, h, E, f, i;
323
- const { invert: v, toast: t, unstyled: N, interacting: b, setHeights: S, visibleToasts: U, heights: c, index: B, toasts: nt, expanded: Q, removeToast: rt, defaultRichColors: D, closeButton: W, style: pt, cancelButtonStyle: it, actionButtonStyle: gt, className: lt = "", descriptionClassName: L = "", duration: X, position: Z, gap: ht, expandByDefault: O, classNames: l, icons: P, closeButtonAriaLabel: j = "Close toast" } = n, [C, tt] = a.useState(null), [u, p] = a.useState(null), [m, M] = a.useState(!1), [F, g] = a.useState(!1), [et, K] = a.useState(!1), [at, ot] = a.useState(!1), [Ct, xt] = a.useState(!1), [At, bt] = a.useState(0), [Ht, Et] = a.useState(0), st = a.useRef(t.duration || X || Rt), Tt = a.useRef(null), Y = a.useRef(null), Ot = B === 0, zt = B + 1 <= U, R = t.type, q = t.dismissible !== !1, Lt = t.className || "", Pt = t.descriptionClassName || "", dt = a.useMemo(() => c.findIndex((r) => r.toastId === t.id) || 0, [
324
- c,
325
- t.id
326
- ]), jt = a.useMemo(() => {
327
- var r;
328
- return (r = t.closeButton) != null ? r : W;
329
- }, [
330
- t.closeButton,
331
- W
332
- ]), St = a.useMemo(() => t.duration || X || Rt, [
333
- t.duration,
334
- X
335
- ]), vt = a.useRef(0), G = a.useRef(0), kt = a.useRef(0), J = a.useRef(null), [Yt, $t] = Z.split("-"), Nt = a.useMemo(() => c.reduce((r, y, T) => T >= dt ? r : r + y.height, 0), [
336
- c,
337
- dt
338
- ]), _t = re(), Ft = t.invert || v, yt = R === "loading";
339
- G.current = a.useMemo(() => dt * ht + Nt, [
340
- dt,
341
- Nt
342
- ]), a.useEffect(() => {
343
- st.current = St;
344
- }, [
345
- St
346
- ]), a.useEffect(() => {
347
- M(!0);
348
- }, []), a.useEffect(() => {
349
- const r = Y.current;
350
- if (r) {
351
- const y = r.getBoundingClientRect().height;
352
- return Et(y), S((T) => [
353
- {
354
- toastId: t.id,
355
- height: y,
356
- position: t.position
357
- },
358
- ...T
359
- ]), () => S((T) => T.filter((_) => _.toastId !== t.id));
360
- }
361
- }, [
362
- S,
363
- t.id
364
- ]), a.useLayoutEffect(() => {
365
- if (!m) return;
366
- const r = Y.current, y = r.style.height;
367
- r.style.height = "auto";
368
- const T = r.getBoundingClientRect().height;
369
- r.style.height = y, Et(T), S((_) => _.find((w) => w.toastId === t.id) ? _.map((w) => w.toastId === t.id ? {
370
- ...w,
371
- height: T
372
- } : w) : [
373
- {
374
- toastId: t.id,
375
- height: T,
376
- position: t.position
377
- },
378
- ..._
379
- ]);
380
- }, [
381
- m,
382
- t.title,
383
- t.description,
384
- S,
385
- t.id
386
- ]);
387
- const $ = a.useCallback(() => {
388
- g(!0), bt(G.current), S((r) => r.filter((y) => y.toastId !== t.id)), setTimeout(() => {
389
- rt(t);
390
- }, ye);
391
- }, [
392
- t,
393
- rt,
394
- S,
395
- G
396
- ]);
397
- a.useEffect(() => {
398
- if (t.promise && R === "loading" || t.duration === 1 / 0 || t.type === "loading") return;
399
- let r;
400
- return Q || b || _t ? (() => {
401
- if (kt.current < vt.current) {
402
- const _ = (/* @__PURE__ */ new Date()).getTime() - vt.current;
403
- st.current = st.current - _;
404
- }
405
- kt.current = (/* @__PURE__ */ new Date()).getTime();
406
- })() : (() => {
407
- st.current !== 1 / 0 && (vt.current = (/* @__PURE__ */ new Date()).getTime(), r = setTimeout(() => {
408
- t.onAutoClose == null || t.onAutoClose.call(t, t), $();
409
- }, st.current));
410
- })(), () => clearTimeout(r);
411
- }, [
412
- Q,
413
- b,
414
- t,
415
- R,
416
- _t,
417
- $
418
- ]), a.useEffect(() => {
419
- t.delete && $();
420
- }, [
421
- $,
422
- t.delete
423
- ]);
424
- function Vt() {
425
- var r;
426
- if (P != null && P.loading) {
427
- var y;
428
- return /* @__PURE__ */ a.createElement("div", {
429
- className: z(l == null ? void 0 : l.loader, t == null || (y = t.classNames) == null ? void 0 : y.loader, "sonner-loader"),
430
- "data-visible": R === "loading"
431
- }, P.loading);
432
- }
433
- return /* @__PURE__ */ a.createElement(te, {
434
- className: z(l == null ? void 0 : l.loader, t == null || (r = t.classNames) == null ? void 0 : r.loader),
435
- visible: R === "loading"
436
- });
437
- }
438
- var Bt, Dt;
439
- return /* @__PURE__ */ a.createElement("li", {
440
- tabIndex: 0,
441
- ref: Y,
442
- className: z(lt, Lt, l == null ? void 0 : l.toast, t == null || (o = t.classNames) == null ? void 0 : o.toast, l == null ? void 0 : l.default, l == null ? void 0 : l[R], t == null || (e = t.classNames) == null ? void 0 : e[R]),
443
- "data-sonner-toast": "",
444
- "data-rich-colors": (Bt = t.richColors) != null ? Bt : D,
445
- "data-styled": !(t.jsx || t.unstyled || N),
446
- "data-mounted": m,
447
- "data-promise": !!t.promise,
448
- "data-swiped": Ct,
449
- "data-removed": F,
450
- "data-visible": zt,
451
- "data-y-position": Yt,
452
- "data-x-position": $t,
453
- "data-index": B,
454
- "data-front": Ot,
455
- "data-swiping": et,
456
- "data-dismissible": q,
457
- "data-type": R,
458
- "data-invert": Ft,
459
- "data-swipe-out": at,
460
- "data-swipe-direction": u,
461
- "data-expanded": !!(Q || O && m),
462
- style: {
463
- "--index": B,
464
- "--toasts-before": B,
465
- "--z-index": nt.length - B,
466
- "--offset": `${F ? At : G.current}px`,
467
- "--initial-height": O ? "auto" : `${Ht}px`,
468
- ...pt,
469
- ...t.style
470
- },
471
- onDragEnd: () => {
472
- K(!1), tt(null), J.current = null;
473
- },
474
- onPointerDown: (r) => {
475
- yt || !q || (Tt.current = /* @__PURE__ */ new Date(), bt(G.current), r.target.setPointerCapture(r.pointerId), r.target.tagName !== "BUTTON" && (K(!0), J.current = {
476
- x: r.clientX,
477
- y: r.clientY
478
- }));
479
- },
480
- onPointerUp: () => {
481
- var r, y, T;
482
- if (at || !q) return;
483
- J.current = null;
484
- const _ = Number(((r = Y.current) == null ? void 0 : r.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), ct = Number(((y = Y.current) == null ? void 0 : y.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), w = (/* @__PURE__ */ new Date()).getTime() - ((T = Tt.current) == null ? void 0 : T.getTime()), I = C === "x" ? _ : ct, ut = Math.abs(I) / w;
485
- if (Math.abs(I) >= ve || ut > 0.11) {
486
- bt(G.current), t.onDismiss == null || t.onDismiss.call(t, t), p(C === "x" ? _ > 0 ? "right" : "left" : ct > 0 ? "down" : "up"), $(), ot(!0);
487
- return;
488
- } else {
489
- var A, H;
490
- (A = Y.current) == null || A.style.setProperty("--swipe-amount-x", "0px"), (H = Y.current) == null || H.style.setProperty("--swipe-amount-y", "0px");
491
- }
492
- xt(!1), K(!1), tt(null);
493
- },
494
- onPointerMove: (r) => {
495
- var y, T, _;
496
- if (!J.current || !q || ((y = window.getSelection()) == null ? void 0 : y.toString().length) > 0) return;
497
- const w = r.clientY - J.current.y, I = r.clientX - J.current.x;
498
- var ut;
499
- const A = (ut = n.swipeDirections) != null ? ut : we(Z);
500
- !C && (Math.abs(I) > 1 || Math.abs(w) > 1) && tt(Math.abs(I) > Math.abs(w) ? "x" : "y");
501
- let H = {
502
- x: 0,
503
- y: 0
504
- };
505
- const Mt = (V) => 1 / (1.5 + Math.abs(V) / 20);
506
- if (C === "y") {
507
- if (A.includes("top") || A.includes("bottom"))
508
- if (A.includes("top") && w < 0 || A.includes("bottom") && w > 0)
509
- H.y = w;
510
- else {
511
- const V = w * Mt(w);
512
- H.y = Math.abs(V) < Math.abs(w) ? V : w;
513
- }
514
- } else if (C === "x" && (A.includes("left") || A.includes("right")))
515
- if (A.includes("left") && I < 0 || A.includes("right") && I > 0)
516
- H.x = I;
517
- else {
518
- const V = I * Mt(I);
519
- H.x = Math.abs(V) < Math.abs(I) ? V : I;
520
- }
521
- (Math.abs(H.x) > 0 || Math.abs(H.y) > 0) && xt(!0), (T = Y.current) == null || T.style.setProperty("--swipe-amount-x", `${H.x}px`), (_ = Y.current) == null || _.style.setProperty("--swipe-amount-y", `${H.y}px`);
522
- }
523
- }, jt && !t.jsx && R !== "loading" ? /* @__PURE__ */ a.createElement("button", {
524
- "aria-label": j,
525
- "data-disabled": yt,
526
- "data-close-button": !0,
527
- onClick: yt || !q ? () => {
528
- } : () => {
529
- $(), t.onDismiss == null || t.onDismiss.call(t, t);
530
- },
531
- className: z(l == null ? void 0 : l.closeButton, t == null || (s = t.classNames) == null ? void 0 : s.closeButton)
532
- }, (Dt = P == null ? void 0 : P.close) != null ? Dt : ne) : null, R || t.icon || t.promise ? /* @__PURE__ */ a.createElement("div", {
533
- "data-icon": "",
534
- className: z(l == null ? void 0 : l.icon, t == null || (x = t.classNames) == null ? void 0 : x.icon)
535
- }, t.promise || t.type === "loading" && !t.icon ? t.icon || Vt() : null, t.type !== "loading" ? t.icon || (P == null ? void 0 : P[R]) || Qt(R) : null) : null, /* @__PURE__ */ a.createElement("div", {
536
- "data-content": "",
537
- className: z(l == null ? void 0 : l.content, t == null || (d = t.classNames) == null ? void 0 : d.content)
538
- }, /* @__PURE__ */ a.createElement("div", {
539
- "data-title": "",
540
- className: z(l == null ? void 0 : l.title, t == null || (h = t.classNames) == null ? void 0 : h.title)
541
- }, t.jsx ? t.jsx : typeof t.title == "function" ? t.title() : t.title), t.description ? /* @__PURE__ */ a.createElement("div", {
542
- "data-description": "",
543
- className: z(L, Pt, l == null ? void 0 : l.description, t == null || (E = t.classNames) == null ? void 0 : E.description)
544
- }, typeof t.description == "function" ? t.description() : t.description) : null), /* @__PURE__ */ a.isValidElement(t.cancel) ? t.cancel : t.cancel && ft(t.cancel) ? /* @__PURE__ */ a.createElement("button", {
545
- "data-button": !0,
546
- "data-cancel": !0,
547
- style: t.cancelButtonStyle || it,
548
- onClick: (r) => {
549
- ft(t.cancel) && q && (t.cancel.onClick == null || t.cancel.onClick.call(t.cancel, r), $());
550
- },
551
- className: z(l == null ? void 0 : l.cancelButton, t == null || (f = t.classNames) == null ? void 0 : f.cancelButton)
552
- }, t.cancel.label) : null, /* @__PURE__ */ a.isValidElement(t.action) ? t.action : t.action && ft(t.action) ? /* @__PURE__ */ a.createElement("button", {
553
- "data-button": !0,
554
- "data-action": !0,
555
- style: t.actionButtonStyle || gt,
556
- onClick: (r) => {
557
- ft(t.action) && (t.action.onClick == null || t.action.onClick.call(t.action, r), !r.defaultPrevented && $());
558
- },
559
- className: z(l == null ? void 0 : l.actionButton, t == null || (i = t.classNames) == null ? void 0 : i.actionButton)
560
- }, t.action.label) : null);
561
- };
562
- function It() {
563
- if (typeof window > "u" || typeof document > "u") return "ltr";
564
- const n = document.documentElement.getAttribute("dir");
565
- return n === "auto" || !n ? window.getComputedStyle(document.documentElement).direction : n;
566
- }
567
- function Ee(n, o) {
568
- const e = {};
569
- return [
570
- n,
571
- o
572
- ].forEach((s, x) => {
573
- const d = x === 1, h = d ? "--mobile-offset" : "--offset", E = d ? ge : pe;
574
- function f(i) {
575
- [
576
- "top",
577
- "right",
578
- "bottom",
579
- "left"
580
- ].forEach((v) => {
581
- e[`${h}-${v}`] = typeof i == "number" ? `${i}px` : i;
582
- });
583
- }
584
- typeof s == "number" || typeof s == "string" ? f(s) : typeof s == "object" ? [
585
- "top",
586
- "right",
587
- "bottom",
588
- "left"
589
- ].forEach((i) => {
590
- s[i] === void 0 ? e[`${h}-${i}`] = E : e[`${h}-${i}`] = typeof s[i] == "number" ? `${s[i]}px` : s[i];
591
- }) : f(E);
592
- }), e;
593
- }
594
- const Te = /* @__PURE__ */ a.forwardRef(function(o, e) {
595
- const { invert: s, position: x = "bottom-right", hotkey: d = [
596
- "altKey",
597
- "KeyT"
598
- ], expand: h, closeButton: E, className: f, offset: i, mobileOffset: v, theme: t = "light", richColors: N, duration: b, style: S, visibleToasts: U = me, toastOptions: c, dir: B = It(), gap: nt = be, icons: Q, containerAriaLabel: rt = "Notifications" } = o, [D, W] = a.useState([]), pt = a.useMemo(() => Array.from(new Set([
599
- x
600
- ].concat(D.filter((u) => u.position).map((u) => u.position)))), [
601
- D,
602
- x
603
- ]), [it, gt] = a.useState([]), [lt, L] = a.useState(!1), [X, Z] = a.useState(!1), [ht, O] = a.useState(t !== "system" ? t : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), l = a.useRef(null), P = d.join("+").replace(/Key/g, "").replace(/Digit/g, ""), j = a.useRef(null), C = a.useRef(!1), tt = a.useCallback((u) => {
604
- W((p) => {
605
- var m;
606
- return (m = p.find((M) => M.id === u.id)) != null && m.delete || k.dismiss(u.id), p.filter(({ id: M }) => M !== u.id);
607
- });
608
- }, []);
609
- return a.useEffect(() => k.subscribe((u) => {
610
- if (u.dismiss) {
611
- const p = D.map((m) => m.id === u.id ? {
612
- ...m,
613
- delete: !0
614
- } : m);
615
- requestAnimationFrame(() => {
616
- W(p);
617
- });
618
- return;
619
- }
620
- setTimeout(() => {
621
- Wt.flushSync(() => {
622
- W((p) => {
623
- const m = p.findIndex((M) => M.id === u.id);
624
- return m !== -1 ? [
625
- ...p.slice(0, m),
626
- {
627
- ...p[m],
628
- ...u
629
- },
630
- ...p.slice(m + 1)
631
- ] : [
632
- u,
633
- ...p
634
- ];
635
- });
636
- });
637
- });
638
- }), [
639
- D
640
- ]), a.useEffect(() => {
641
- if (t !== "system") {
642
- O(t);
643
- return;
644
- }
645
- if (t === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? O("dark") : O("light")), typeof window > "u") return;
646
- const u = window.matchMedia("(prefers-color-scheme: dark)");
647
- try {
648
- u.addEventListener("change", ({ matches: p }) => {
649
- O(p ? "dark" : "light");
650
- });
651
- } catch {
652
- u.addListener(({ matches: m }) => {
653
- try {
654
- O(m ? "dark" : "light");
655
- } catch (M) {
656
- console.error(M);
657
- }
658
- });
659
- }
660
- }, [
661
- t
662
- ]), a.useEffect(() => {
663
- D.length <= 1 && L(!1);
664
- }, [
665
- D
666
- ]), a.useEffect(() => {
667
- const u = (p) => {
668
- var m;
669
- if (d.every((g) => p[g] || p.code === g)) {
670
- var F;
671
- L(!0), (F = l.current) == null || F.focus();
672
- }
673
- p.code === "Escape" && (document.activeElement === l.current || (m = l.current) != null && m.contains(document.activeElement)) && L(!1);
674
- };
675
- return document.addEventListener("keydown", u), () => document.removeEventListener("keydown", u);
676
- }, [
677
- d
678
- ]), a.useEffect(() => {
679
- if (l.current)
680
- return () => {
681
- j.current && (j.current.focus({
682
- preventScroll: !0
683
- }), j.current = null, C.current = !1);
684
- };
685
- }, [
686
- l.current
687
- ]), // Remove item from normal navigation flow, only available via hotkey
688
- /* @__PURE__ */ a.createElement("section", {
689
- ref: e,
690
- "aria-label": `${rt} ${P}`,
691
- tabIndex: -1,
692
- "aria-live": "polite",
693
- "aria-relevant": "additions text",
694
- "aria-atomic": "false",
695
- suppressHydrationWarning: !0
696
- }, pt.map((u, p) => {
697
- var m;
698
- const [M, F] = u.split("-");
699
- return D.length ? /* @__PURE__ */ a.createElement("ol", {
700
- key: u,
701
- dir: B === "auto" ? It() : B,
702
- tabIndex: -1,
703
- ref: l,
704
- className: f,
705
- "data-sonner-toaster": !0,
706
- "data-sonner-theme": ht,
707
- "data-y-position": M,
708
- "data-lifted": lt && D.length > 1 && !h,
709
- "data-x-position": F,
710
- style: {
711
- "--front-toast-height": `${((m = it[0]) == null ? void 0 : m.height) || 0}px`,
712
- "--width": `${he}px`,
713
- "--gap": `${nt}px`,
714
- ...S,
715
- ...Ee(i, v)
716
- },
717
- onBlur: (g) => {
718
- C.current && !g.currentTarget.contains(g.relatedTarget) && (C.current = !1, j.current && (j.current.focus({
719
- preventScroll: !0
720
- }), j.current = null));
721
- },
722
- onFocus: (g) => {
723
- g.target instanceof HTMLElement && g.target.dataset.dismissible === "false" || C.current || (C.current = !0, j.current = g.relatedTarget);
724
- },
725
- onMouseEnter: () => L(!0),
726
- onMouseMove: () => L(!0),
727
- onMouseLeave: () => {
728
- X || L(!1);
729
- },
730
- onDragEnd: () => L(!1),
731
- onPointerDown: (g) => {
732
- g.target instanceof HTMLElement && g.target.dataset.dismissible === "false" || Z(!0);
733
- },
734
- onPointerUp: () => Z(!1)
735
- }, D.filter((g) => !g.position && p === 0 || g.position === u).map((g, et) => {
736
- var K, at;
737
- return /* @__PURE__ */ a.createElement(xe, {
738
- key: g.id,
739
- icons: Q,
740
- index: et,
741
- toast: g,
742
- defaultRichColors: N,
743
- duration: (K = c == null ? void 0 : c.duration) != null ? K : b,
744
- className: c == null ? void 0 : c.className,
745
- descriptionClassName: c == null ? void 0 : c.descriptionClassName,
746
- invert: s,
747
- visibleToasts: U,
748
- closeButton: (at = c == null ? void 0 : c.closeButton) != null ? at : E,
749
- interacting: X,
750
- position: u,
751
- style: c == null ? void 0 : c.style,
752
- unstyled: c == null ? void 0 : c.unstyled,
753
- classNames: c == null ? void 0 : c.classNames,
754
- cancelButtonStyle: c == null ? void 0 : c.cancelButtonStyle,
755
- actionButtonStyle: c == null ? void 0 : c.actionButtonStyle,
756
- closeButtonAriaLabel: c == null ? void 0 : c.closeButtonAriaLabel,
757
- removeToast: tt,
758
- toasts: D.filter((ot) => ot.position == g.position),
759
- heights: it.filter((ot) => ot.position == g.position),
760
- setHeights: gt,
761
- expandByDefault: h,
762
- gap: nt,
763
- expanded: lt,
764
- swipeDirections: o.swipeDirections
765
- });
766
- })) : null;
767
- }));
768
- }), Be = ({ ...n }) => {
769
- const { theme: o = "system" } = Gt();
770
- return /* @__PURE__ */ Ut(
771
- Te,
772
- {
773
- theme: o,
774
- className: "toaster group",
775
- toastOptions: {
776
- classNames: {
777
- toast: "group toast group-[.toaster]:bg-white group-[.toaster]:text-neutral-950 group-[.toaster]:border-neutral-200 group-[.toaster]:shadow-lg dark:group-[.toaster]:bg-neutral-950 dark:group-[.toaster]:text-neutral-50 dark:group-[.toaster]:border-neutral-800",
778
- description: "group-[.toast]:text-neutral-500 dark:group-[.toast]:text-neutral-400",
779
- actionButton: "group-[.toast]:bg-neutral-900 group-[.toast]:text-neutral-50 font-medium dark:group-[.toast]:bg-neutral-50 dark:group-[.toast]:text-neutral-900",
780
- cancelButton: "group-[.toast]:bg-neutral-100 group-[.toast]:text-neutral-500 font-medium dark:group-[.toast]:bg-neutral-800 dark:group-[.toast]:text-neutral-400"
781
- }
782
- },
783
- ...n
784
- }
785
- );
786
- };
787
- export {
788
- Be as Toaster
789
- };
790
- //# sourceMappingURL=sonner.js.map