@lssm/lib.ui-kit-web 0.0.0-canary-20251120170226

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 (426) hide show
  1. package/README.md +73 -0
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.js +0 -0
  4. package/dist/node_modules/sonner/dist/index.js +912 -0
  5. package/dist/node_modules/sonner/dist/index.js.map +1 -0
  6. package/dist/tsconfig.tsbuildinfo +1 -0
  7. package/dist/ui/accordion.d.ts +25 -0
  8. package/dist/ui/accordion.d.ts.map +1 -0
  9. package/dist/ui/accordion.js +49 -0
  10. package/dist/ui/accordion.js.map +1 -0
  11. package/dist/ui/alert-dialog.d.ts +49 -0
  12. package/dist/ui/alert-dialog.d.ts.map +1 -0
  13. package/dist/ui/alert-dialog.js +86 -0
  14. package/dist/ui/alert-dialog.js.map +1 -0
  15. package/dist/ui/alert.d.ts +25 -0
  16. package/dist/ui/alert.d.ts.map +1 -0
  17. package/dist/ui/alert.js +39 -0
  18. package/dist/ui/alert.js.map +1 -0
  19. package/dist/ui/aspect-ratio.d.ts +8 -0
  20. package/dist/ui/aspect-ratio.d.ts.map +1 -0
  21. package/dist/ui/aspect-ratio.js +11 -0
  22. package/dist/ui/aspect-ratio.js.map +1 -0
  23. package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +8 -0
  24. package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts.map +1 -0
  25. package/dist/ui/atoms/FilterSelect/FilterSelect.js +53 -0
  26. package/dist/ui/atoms/FilterSelect/FilterSelect.js.map +1 -0
  27. package/dist/ui/atoms/FilterSelect/index.d.ts +3 -0
  28. package/dist/ui/atoms/FilterSelect/index.js +3 -0
  29. package/dist/ui/atoms/FilterSelect/types.d.ts +19 -0
  30. package/dist/ui/atoms/FilterSelect/types.d.ts.map +1 -0
  31. package/dist/ui/atoms/FilterSelect/types.js +0 -0
  32. package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +23 -0
  33. package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts.map +1 -0
  34. package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +46 -0
  35. package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js.map +1 -0
  36. package/dist/ui/atoms/LoadingSpinner/index.d.ts +2 -0
  37. package/dist/ui/atoms/LoadingSpinner/index.js +3 -0
  38. package/dist/ui/atoms/Pagination/Pagination.d.ts +8 -0
  39. package/dist/ui/atoms/Pagination/Pagination.d.ts.map +1 -0
  40. package/dist/ui/atoms/Pagination/Pagination.js +157 -0
  41. package/dist/ui/atoms/Pagination/Pagination.js.map +1 -0
  42. package/dist/ui/atoms/Pagination/index.d.ts +3 -0
  43. package/dist/ui/atoms/Pagination/index.js +3 -0
  44. package/dist/ui/atoms/Pagination/types.d.ts +16 -0
  45. package/dist/ui/atoms/Pagination/types.d.ts.map +1 -0
  46. package/dist/ui/atoms/Pagination/types.js +0 -0
  47. package/dist/ui/atoms/SearchInput/SearchInput.d.ts +8 -0
  48. package/dist/ui/atoms/SearchInput/SearchInput.d.ts.map +1 -0
  49. package/dist/ui/atoms/SearchInput/SearchInput.js +50 -0
  50. package/dist/ui/atoms/SearchInput/SearchInput.js.map +1 -0
  51. package/dist/ui/atoms/SearchInput/index.d.ts +3 -0
  52. package/dist/ui/atoms/SearchInput/index.js +3 -0
  53. package/dist/ui/atoms/SearchInput/types.d.ts +13 -0
  54. package/dist/ui/atoms/SearchInput/types.d.ts.map +1 -0
  55. package/dist/ui/atoms/SearchInput/types.js +0 -0
  56. package/dist/ui/avatar.d.ts +20 -0
  57. package/dist/ui/avatar.d.ts.map +1 -0
  58. package/dist/ui/avatar.js +34 -0
  59. package/dist/ui/avatar.js.map +1 -0
  60. package/dist/ui/badge.d.ts +20 -0
  61. package/dist/ui/badge.d.ts.map +1 -0
  62. package/dist/ui/badge.js +27 -0
  63. package/dist/ui/badge.js.map +1 -0
  64. package/dist/ui/breadcrumb.d.ts +38 -0
  65. package/dist/ui/breadcrumb.d.ts.map +1 -0
  66. package/dist/ui/breadcrumb.js +72 -0
  67. package/dist/ui/breadcrumb.js.map +1 -0
  68. package/dist/ui/button.d.ts +23 -0
  69. package/dist/ui/button.d.ts.map +1 -0
  70. package/dist/ui/button.js +44 -0
  71. package/dist/ui/button.js.map +1 -0
  72. package/dist/ui/calendar.d.ts +27 -0
  73. package/dist/ui/calendar.d.ts.map +1 -0
  74. package/dist/ui/calendar.js +110 -0
  75. package/dist/ui/calendar.js.map +1 -0
  76. package/dist/ui/card.d.ts +35 -0
  77. package/dist/ui/card.d.ts.map +1 -0
  78. package/dist/ui/card.js +58 -0
  79. package/dist/ui/card.js.map +1 -0
  80. package/dist/ui/carousel.d.ts +48 -0
  81. package/dist/ui/carousel.d.ts.map +1 -0
  82. package/dist/ui/carousel.js +137 -0
  83. package/dist/ui/carousel.js.map +1 -0
  84. package/dist/ui/checkbox.d.ts +12 -0
  85. package/dist/ui/checkbox.d.ts.map +1 -0
  86. package/dist/ui/checkbox.js +26 -0
  87. package/dist/ui/checkbox.js.map +1 -0
  88. package/dist/ui/collapsible.d.ts +16 -0
  89. package/dist/ui/collapsible.d.ts.map +1 -0
  90. package/dist/ui/collapsible.js +29 -0
  91. package/dist/ui/collapsible.js.map +1 -0
  92. package/dist/ui/command.d.ts +53 -0
  93. package/dist/ui/command.d.ts.map +1 -0
  94. package/dist/ui/command.js +91 -0
  95. package/dist/ui/command.js.map +1 -0
  96. package/dist/ui/confirm-dialog.d.ts +31 -0
  97. package/dist/ui/confirm-dialog.d.ts.map +1 -0
  98. package/dist/ui/confirm-dialog.js +34 -0
  99. package/dist/ui/confirm-dialog.js.map +1 -0
  100. package/dist/ui/context-menu.d.ts +35 -0
  101. package/dist/ui/context-menu.d.ts.map +1 -0
  102. package/dist/ui/context-menu.js +85 -0
  103. package/dist/ui/context-menu.js.map +1 -0
  104. package/dist/ui/cta.d.ts +15 -0
  105. package/dist/ui/cta.d.ts.map +1 -0
  106. package/dist/ui/cta.js +39 -0
  107. package/dist/ui/cta.js.map +1 -0
  108. package/dist/ui/date-picker.d.ts +26 -0
  109. package/dist/ui/date-picker.d.ts.map +1 -0
  110. package/dist/ui/date-picker.js +102 -0
  111. package/dist/ui/date-picker.js.map +1 -0
  112. package/dist/ui/date-range-picker.d.ts +26 -0
  113. package/dist/ui/date-range-picker.d.ts.map +1 -0
  114. package/dist/ui/date-range-picker.js +55 -0
  115. package/dist/ui/date-range-picker.js.map +1 -0
  116. package/dist/ui/datetime-picker.d.ts +28 -0
  117. package/dist/ui/datetime-picker.d.ts.map +1 -0
  118. package/dist/ui/datetime-picker.js +45 -0
  119. package/dist/ui/datetime-picker.js.map +1 -0
  120. package/dist/ui/dialog.d.ts +48 -0
  121. package/dist/ui/dialog.d.ts.map +1 -0
  122. package/dist/ui/dialog.js +91 -0
  123. package/dist/ui/dialog.js.map +1 -0
  124. package/dist/ui/drawer.d.ts +45 -0
  125. package/dist/ui/drawer.d.ts.map +1 -0
  126. package/dist/ui/drawer.js +83 -0
  127. package/dist/ui/drawer.js.map +1 -0
  128. package/dist/ui/dropdown-menu.d.ts +78 -0
  129. package/dist/ui/dropdown-menu.d.ts.map +1 -0
  130. package/dist/ui/dropdown-menu.js +128 -0
  131. package/dist/ui/dropdown-menu.js.map +1 -0
  132. package/dist/ui/empty-state.d.ts +29 -0
  133. package/dist/ui/empty-state.d.ts.map +1 -0
  134. package/dist/ui/empty-state.js +43 -0
  135. package/dist/ui/empty-state.js.map +1 -0
  136. package/dist/ui/empty.d.ts +36 -0
  137. package/dist/ui/empty.d.ts.map +1 -0
  138. package/dist/ui/empty.js +62 -0
  139. package/dist/ui/empty.js.map +1 -0
  140. package/dist/ui/field.d.ts +65 -0
  141. package/dist/ui/field.d.ts.map +1 -0
  142. package/dist/ui/field.js +122 -0
  143. package/dist/ui/field.js.map +1 -0
  144. package/dist/ui/focus-on-route-change.d.ts +9 -0
  145. package/dist/ui/focus-on-route-change.d.ts.map +1 -0
  146. package/dist/ui/focus-on-route-change.js +17 -0
  147. package/dist/ui/focus-on-route-change.js.map +1 -0
  148. package/dist/ui/form.d.ts +47 -0
  149. package/dist/ui/form.d.ts.map +1 -0
  150. package/dist/ui/form.js +95 -0
  151. package/dist/ui/form.js.map +1 -0
  152. package/dist/ui/hover-card.d.ts +20 -0
  153. package/dist/ui/hover-card.d.ts.map +1 -0
  154. package/dist/ui/hover-card.js +37 -0
  155. package/dist/ui/hover-card.js.map +1 -0
  156. package/dist/ui/input-group.d.ts +44 -0
  157. package/dist/ui/input-group.d.ts.map +1 -0
  158. package/dist/ui/input-group.js +84 -0
  159. package/dist/ui/input-group.js.map +1 -0
  160. package/dist/ui/input-otp.d.ts +39 -0
  161. package/dist/ui/input-otp.d.ts.map +1 -0
  162. package/dist/ui/input-otp.js +47 -0
  163. package/dist/ui/input-otp.js.map +1 -0
  164. package/dist/ui/input.d.ts +13 -0
  165. package/dist/ui/input.d.ts.map +1 -0
  166. package/dist/ui/input.js +17 -0
  167. package/dist/ui/input.js.map +1 -0
  168. package/dist/ui/label.d.ts +12 -0
  169. package/dist/ui/label.d.ts.map +1 -0
  170. package/dist/ui/label.js +20 -0
  171. package/dist/ui/label.js.map +1 -0
  172. package/dist/ui/link.d.ts +9 -0
  173. package/dist/ui/link.d.ts.map +1 -0
  174. package/dist/ui/link.js +18 -0
  175. package/dist/ui/link.js.map +1 -0
  176. package/dist/ui/live-region.d.ts +17 -0
  177. package/dist/ui/live-region.d.ts.map +1 -0
  178. package/dist/ui/live-region.js +48 -0
  179. package/dist/ui/live-region.js.map +1 -0
  180. package/dist/ui/loading-button.d.ts +20 -0
  181. package/dist/ui/loading-button.d.ts.map +1 -0
  182. package/dist/ui/loading-button.js +21 -0
  183. package/dist/ui/loading-button.js.map +1 -0
  184. package/dist/ui/map/MapBase.d.ts +29 -0
  185. package/dist/ui/map/MapBase.d.ts.map +1 -0
  186. package/dist/ui/map/MapBase.js +48 -0
  187. package/dist/ui/map/MapBase.js.map +1 -0
  188. package/dist/ui/map/MapGeoJsonOverlay.d.ts +16 -0
  189. package/dist/ui/map/MapGeoJsonOverlay.d.ts.map +1 -0
  190. package/dist/ui/map/MapGeoJsonOverlay.js +39 -0
  191. package/dist/ui/map/MapGeoJsonOverlay.js.map +1 -0
  192. package/dist/ui/map/MapHeatmapH3.d.ts +18 -0
  193. package/dist/ui/map/MapHeatmapH3.d.ts.map +1 -0
  194. package/dist/ui/map/MapHeatmapH3.js +52 -0
  195. package/dist/ui/map/MapHeatmapH3.js.map +1 -0
  196. package/dist/ui/map/MapMarkers.d.ts +20 -0
  197. package/dist/ui/map/MapMarkers.d.ts.map +1 -0
  198. package/dist/ui/map/MapMarkers.js +35 -0
  199. package/dist/ui/map/MapMarkers.js.map +1 -0
  200. package/dist/ui/map/index.d.ts +5 -0
  201. package/dist/ui/map/index.js +6 -0
  202. package/dist/ui/marketing/FeatureGrid.d.ts +21 -0
  203. package/dist/ui/marketing/FeatureGrid.d.ts.map +1 -0
  204. package/dist/ui/marketing/FeatureGrid.js +35 -0
  205. package/dist/ui/marketing/FeatureGrid.js.map +1 -0
  206. package/dist/ui/marketing/Hero.d.ts +28 -0
  207. package/dist/ui/marketing/Hero.d.ts.map +1 -0
  208. package/dist/ui/marketing/Hero.js +53 -0
  209. package/dist/ui/marketing/Hero.js.map +1 -0
  210. package/dist/ui/marketing/PricingTable.d.ts +25 -0
  211. package/dist/ui/marketing/PricingTable.d.ts.map +1 -0
  212. package/dist/ui/marketing/PricingTable.js +60 -0
  213. package/dist/ui/marketing/PricingTable.js.map +1 -0
  214. package/dist/ui/marketing/index.d.ts +4 -0
  215. package/dist/ui/marketing/index.js +5 -0
  216. package/dist/ui/menubar.d.ts +85 -0
  217. package/dist/ui/menubar.d.ts.map +1 -0
  218. package/dist/ui/menubar.js +138 -0
  219. package/dist/ui/menubar.js.map +1 -0
  220. package/dist/ui/molecules/Autocomplete/index.d.ts +7 -0
  221. package/dist/ui/molecules/Autocomplete/index.d.ts.map +1 -0
  222. package/dist/ui/molecules/Autocomplete/index.js +86 -0
  223. package/dist/ui/molecules/Autocomplete/index.js.map +1 -0
  224. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +8 -0
  225. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts.map +1 -0
  226. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +103 -0
  227. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js.map +1 -0
  228. package/dist/ui/molecules/SearchAndFilter/index.d.ts +3 -0
  229. package/dist/ui/molecules/SearchAndFilter/index.js +3 -0
  230. package/dist/ui/molecules/SearchAndFilter/types.d.ts +24 -0
  231. package/dist/ui/molecules/SearchAndFilter/types.d.ts.map +1 -0
  232. package/dist/ui/molecules/SearchAndFilter/types.js +0 -0
  233. package/dist/ui/molecules/SkeletonList.d.ts +16 -0
  234. package/dist/ui/molecules/SkeletonList.d.ts.map +1 -0
  235. package/dist/ui/molecules/SkeletonList.js +15 -0
  236. package/dist/ui/molecules/SkeletonList.js.map +1 -0
  237. package/dist/ui/nav-layout.d.ts +71 -0
  238. package/dist/ui/nav-layout.d.ts.map +1 -0
  239. package/dist/ui/nav-layout.js +133 -0
  240. package/dist/ui/nav-layout.js.map +1 -0
  241. package/dist/ui/navigation-menu.d.ts +47 -0
  242. package/dist/ui/navigation-menu.d.ts.map +1 -0
  243. package/dist/ui/navigation-menu.js +83 -0
  244. package/dist/ui/navigation-menu.js.map +1 -0
  245. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +30 -0
  246. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts.map +1 -0
  247. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +108 -0
  248. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js.map +1 -0
  249. package/dist/ui/organisms/ErrorBoundary/index.d.ts +2 -0
  250. package/dist/ui/organisms/ErrorBoundary/index.js +3 -0
  251. package/dist/ui/organisms/ListPage/ListPage.d.ts +29 -0
  252. package/dist/ui/organisms/ListPage/ListPage.d.ts.map +1 -0
  253. package/dist/ui/organisms/ListPage/ListPage.js +198 -0
  254. package/dist/ui/organisms/ListPage/ListPage.js.map +1 -0
  255. package/dist/ui/organisms/ListPage/index.d.ts +3 -0
  256. package/dist/ui/organisms/ListPage/index.js +3 -0
  257. package/dist/ui/organisms/ListPage/types.d.ts +41 -0
  258. package/dist/ui/organisms/ListPage/types.d.ts.map +1 -0
  259. package/dist/ui/organisms/ListPage/types.js +0 -0
  260. package/dist/ui/page-header.d.ts +27 -0
  261. package/dist/ui/page-header.d.ts.map +1 -0
  262. package/dist/ui/page-header.js +40 -0
  263. package/dist/ui/page-header.js.map +1 -0
  264. package/dist/ui/pagination.d.ts +50 -0
  265. package/dist/ui/pagination.d.ts.map +1 -0
  266. package/dist/ui/pagination.js +65 -0
  267. package/dist/ui/pagination.js.map +1 -0
  268. package/dist/ui/popover.d.ts +23 -0
  269. package/dist/ui/popover.d.ts.map +1 -0
  270. package/dist/ui/popover.js +40 -0
  271. package/dist/ui/popover.js.map +1 -0
  272. package/dist/ui/progress.d.ts +13 -0
  273. package/dist/ui/progress.d.ts.map +1 -0
  274. package/dist/ui/progress.js +25 -0
  275. package/dist/ui/progress.js.map +1 -0
  276. package/dist/ui/radio-group.d.ts +16 -0
  277. package/dist/ui/radio-group.d.ts.map +1 -0
  278. package/dist/ui/radio-group.js +33 -0
  279. package/dist/ui/radio-group.js.map +1 -0
  280. package/dist/ui/resizable.d.ts +36 -0
  281. package/dist/ui/resizable.d.ts.map +1 -0
  282. package/dist/ui/resizable.js +26 -0
  283. package/dist/ui/resizable.js.map +1 -0
  284. package/dist/ui/route-announcer.d.ts +11 -0
  285. package/dist/ui/route-announcer.d.ts.map +1 -0
  286. package/dist/ui/route-announcer.js +23 -0
  287. package/dist/ui/route-announcer.js.map +1 -0
  288. package/dist/ui/scroll-area.d.ts +18 -0
  289. package/dist/ui/scroll-area.d.ts.map +1 -0
  290. package/dist/ui/scroll-area.js +41 -0
  291. package/dist/ui/scroll-area.js.map +1 -0
  292. package/dist/ui/section.d.ts +27 -0
  293. package/dist/ui/section.d.ts.map +1 -0
  294. package/dist/ui/section.js +63 -0
  295. package/dist/ui/section.js.map +1 -0
  296. package/dist/ui/select.d.ts +52 -0
  297. package/dist/ui/select.d.ts.map +1 -0
  298. package/dist/ui/select.js +101 -0
  299. package/dist/ui/select.js.map +1 -0
  300. package/dist/ui/separator.d.ts +14 -0
  301. package/dist/ui/separator.d.ts.map +1 -0
  302. package/dist/ui/separator.js +22 -0
  303. package/dist/ui/separator.js.map +1 -0
  304. package/dist/ui/sheet.d.ts +41 -0
  305. package/dist/ui/sheet.d.ts.map +1 -0
  306. package/dist/ui/sheet.js +87 -0
  307. package/dist/ui/sheet.js.map +1 -0
  308. package/dist/ui/sidebar.d.ts +167 -0
  309. package/dist/ui/sidebar.d.ts.map +1 -0
  310. package/dist/ui/sidebar.js +380 -0
  311. package/dist/ui/sidebar.js.map +1 -0
  312. package/dist/ui/skeleton.d.ts +10 -0
  313. package/dist/ui/skeleton.d.ts.map +1 -0
  314. package/dist/ui/skeleton.js +15 -0
  315. package/dist/ui/skeleton.js.map +1 -0
  316. package/dist/ui/skip-link.d.ts +17 -0
  317. package/dist/ui/skip-link.d.ts.map +1 -0
  318. package/dist/ui/skip-link.js +17 -0
  319. package/dist/ui/skip-link.js.map +1 -0
  320. package/dist/ui/slider.d.ts +16 -0
  321. package/dist/ui/slider.d.ts.map +1 -0
  322. package/dist/ui/slider.js +41 -0
  323. package/dist/ui/slider.js.map +1 -0
  324. package/dist/ui/sonner.d.ts +10 -0
  325. package/dist/ui/sonner.d.ts.map +1 -0
  326. package/dist/ui/sonner.js +25 -0
  327. package/dist/ui/sonner.js.map +1 -0
  328. package/dist/ui/stack.d.ts +48 -0
  329. package/dist/ui/stack.d.ts.map +1 -0
  330. package/dist/ui/stack.js +158 -0
  331. package/dist/ui/stack.js.map +1 -0
  332. package/dist/ui/stat-card-group.d.ts +19 -0
  333. package/dist/ui/stat-card-group.d.ts.map +1 -0
  334. package/dist/ui/stat-card-group.js +39 -0
  335. package/dist/ui/stat-card-group.js.map +1 -0
  336. package/dist/ui/stepper.d.ts +23 -0
  337. package/dist/ui/stepper.d.ts.map +1 -0
  338. package/dist/ui/stepper.js +37 -0
  339. package/dist/ui/stepper.js.map +1 -0
  340. package/dist/ui/switch.d.ts +12 -0
  341. package/dist/ui/switch.d.ts.map +1 -0
  342. package/dist/ui/switch.js +24 -0
  343. package/dist/ui/switch.js.map +1 -0
  344. package/dist/ui/table.d.ts +39 -0
  345. package/dist/ui/table.d.ts.map +1 -0
  346. package/dist/ui/table.js +72 -0
  347. package/dist/ui/table.js.map +1 -0
  348. package/dist/ui/tabs.d.ts +24 -0
  349. package/dist/ui/tabs.d.ts.map +1 -0
  350. package/dist/ui/tabs.js +41 -0
  351. package/dist/ui/tabs.js.map +1 -0
  352. package/dist/ui/text.d.ts +16 -0
  353. package/dist/ui/text.d.ts.map +1 -0
  354. package/dist/ui/text.js +16 -0
  355. package/dist/ui/text.js.map +1 -0
  356. package/dist/ui/textarea.d.ts +12 -0
  357. package/dist/ui/textarea.d.ts.map +1 -0
  358. package/dist/ui/textarea.js +16 -0
  359. package/dist/ui/textarea.js.map +1 -0
  360. package/dist/ui/time-picker.d.ts +22 -0
  361. package/dist/ui/time-picker.d.ts.map +1 -0
  362. package/dist/ui/time-picker.js +82 -0
  363. package/dist/ui/time-picker.js.map +1 -0
  364. package/dist/ui/toast.d.ts +20 -0
  365. package/dist/ui/toast.d.ts.map +1 -0
  366. package/dist/ui/toast.js +63 -0
  367. package/dist/ui/toast.js.map +1 -0
  368. package/dist/ui/toaster.d.ts +7 -0
  369. package/dist/ui/toaster.d.ts.map +1 -0
  370. package/dist/ui/toaster.js +28 -0
  371. package/dist/ui/toaster.js.map +1 -0
  372. package/dist/ui/toggle-group.d.ts +24 -0
  373. package/dist/ui/toggle-group.d.ts.map +1 -0
  374. package/dist/ui/toggle-group.js +49 -0
  375. package/dist/ui/toggle-group.js.map +1 -0
  376. package/dist/ui/toggle.d.ts +20 -0
  377. package/dist/ui/toggle.d.ts.map +1 -0
  378. package/dist/ui/toggle.js +42 -0
  379. package/dist/ui/toggle.js.map +1 -0
  380. package/dist/ui/tooltip.d.ts +24 -0
  381. package/dist/ui/tooltip.d.ts.map +1 -0
  382. package/dist/ui/tooltip.js +41 -0
  383. package/dist/ui/tooltip.js.map +1 -0
  384. package/dist/ui/typography.d.ts +65 -0
  385. package/dist/ui/typography.d.ts.map +1 -0
  386. package/dist/ui/typography.js +87 -0
  387. package/dist/ui/typography.js.map +1 -0
  388. package/dist/ui/use-media-query.d.ts +5 -0
  389. package/dist/ui/use-media-query.d.ts.map +1 -0
  390. package/dist/ui/use-media-query.js +20 -0
  391. package/dist/ui/use-media-query.js.map +1 -0
  392. package/dist/ui/use-mobile.d.ts +5 -0
  393. package/dist/ui/use-mobile.d.ts.map +1 -0
  394. package/dist/ui/use-mobile.js +21 -0
  395. package/dist/ui/use-mobile.js.map +1 -0
  396. package/dist/ui/use-reduced-motion.d.ts +5 -0
  397. package/dist/ui/use-reduced-motion.d.ts.map +1 -0
  398. package/dist/ui/use-reduced-motion.js +18 -0
  399. package/dist/ui/use-reduced-motion.js.map +1 -0
  400. package/dist/ui/use-toast.d.ts +50 -0
  401. package/dist/ui/use-toast.d.ts.map +1 -0
  402. package/dist/ui/use-toast.js +123 -0
  403. package/dist/ui/use-toast.js.map +1 -0
  404. package/dist/ui/useListState.d.ts +34 -0
  405. package/dist/ui/useListState.d.ts.map +1 -0
  406. package/dist/ui/useListState.js +75 -0
  407. package/dist/ui/useListState.js.map +1 -0
  408. package/dist/ui/usecases/UseCaseCard.d.ts +19 -0
  409. package/dist/ui/usecases/UseCaseCard.d.ts.map +1 -0
  410. package/dist/ui/usecases/UseCaseCard.js +35 -0
  411. package/dist/ui/usecases/UseCaseCard.js.map +1 -0
  412. package/dist/ui/usecases/UserStoryCard.d.ts +15 -0
  413. package/dist/ui/usecases/UserStoryCard.d.ts.map +1 -0
  414. package/dist/ui/usecases/UserStoryCard.js +36 -0
  415. package/dist/ui/usecases/UserStoryCard.js.map +1 -0
  416. package/dist/ui/usecases/index.d.ts +3 -0
  417. package/dist/ui/usecases/index.js +4 -0
  418. package/dist/ui/utils.d.ts +7 -0
  419. package/dist/ui/utils.d.ts.map +1 -0
  420. package/dist/ui/utils.js +11 -0
  421. package/dist/ui/utils.js.map +1 -0
  422. package/dist/ui/visually-hidden.d.ts +10 -0
  423. package/dist/ui/visually-hidden.d.ts.map +1 -0
  424. package/dist/ui/visually-hidden.js +31 -0
  425. package/dist/ui/visually-hidden.js.map +1 -0
  426. package/package.json +222 -0
@@ -0,0 +1,912 @@
1
+ 'use client';
2
+
3
+
4
+ import React from "react";
5
+ import ReactDOM from "react-dom";
6
+
7
+ //#region ../../../node_modules/sonner/dist/index.mjs
8
+ function __insertCSS(code) {
9
+ if (!code || typeof document == "undefined") return;
10
+ let head = document.head || document.getElementsByTagName("head")[0];
11
+ let style = document.createElement("style");
12
+ style.type = "text/css";
13
+ head.appendChild(style);
14
+ style.styleSheet ? style.styleSheet.cssText = code : style.appendChild(document.createTextNode(code));
15
+ }
16
+ const getAsset = (type) => {
17
+ switch (type) {
18
+ case "success": return SuccessIcon;
19
+ case "info": return InfoIcon;
20
+ case "warning": return WarningIcon;
21
+ case "error": return ErrorIcon;
22
+ default: return null;
23
+ }
24
+ };
25
+ const bars = Array(12).fill(0);
26
+ const Loader = ({ visible, className }) => {
27
+ return /* @__PURE__ */ React.createElement("div", {
28
+ className: ["sonner-loading-wrapper", className].filter(Boolean).join(" "),
29
+ "data-visible": visible
30
+ }, /* @__PURE__ */ React.createElement("div", { className: "sonner-spinner" }, bars.map((_, i) => /* @__PURE__ */ React.createElement("div", {
31
+ className: "sonner-loading-bar",
32
+ key: `spinner-bar-${i}`
33
+ }))));
34
+ };
35
+ const SuccessIcon = /* @__PURE__ */ React.createElement("svg", {
36
+ xmlns: "http://www.w3.org/2000/svg",
37
+ viewBox: "0 0 20 20",
38
+ fill: "currentColor",
39
+ height: "20",
40
+ width: "20"
41
+ }, /* @__PURE__ */ React.createElement("path", {
42
+ fillRule: "evenodd",
43
+ 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",
44
+ clipRule: "evenodd"
45
+ }));
46
+ const WarningIcon = /* @__PURE__ */ React.createElement("svg", {
47
+ xmlns: "http://www.w3.org/2000/svg",
48
+ viewBox: "0 0 24 24",
49
+ fill: "currentColor",
50
+ height: "20",
51
+ width: "20"
52
+ }, /* @__PURE__ */ React.createElement("path", {
53
+ fillRule: "evenodd",
54
+ 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",
55
+ clipRule: "evenodd"
56
+ }));
57
+ const InfoIcon = /* @__PURE__ */ React.createElement("svg", {
58
+ xmlns: "http://www.w3.org/2000/svg",
59
+ viewBox: "0 0 20 20",
60
+ fill: "currentColor",
61
+ height: "20",
62
+ width: "20"
63
+ }, /* @__PURE__ */ React.createElement("path", {
64
+ fillRule: "evenodd",
65
+ 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",
66
+ clipRule: "evenodd"
67
+ }));
68
+ const ErrorIcon = /* @__PURE__ */ React.createElement("svg", {
69
+ xmlns: "http://www.w3.org/2000/svg",
70
+ viewBox: "0 0 20 20",
71
+ fill: "currentColor",
72
+ height: "20",
73
+ width: "20"
74
+ }, /* @__PURE__ */ React.createElement("path", {
75
+ fillRule: "evenodd",
76
+ 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",
77
+ clipRule: "evenodd"
78
+ }));
79
+ const CloseIcon = /* @__PURE__ */ React.createElement("svg", {
80
+ xmlns: "http://www.w3.org/2000/svg",
81
+ width: "12",
82
+ height: "12",
83
+ viewBox: "0 0 24 24",
84
+ fill: "none",
85
+ stroke: "currentColor",
86
+ strokeWidth: "1.5",
87
+ strokeLinecap: "round",
88
+ strokeLinejoin: "round"
89
+ }, /* @__PURE__ */ React.createElement("line", {
90
+ x1: "18",
91
+ y1: "6",
92
+ x2: "6",
93
+ y2: "18"
94
+ }), /* @__PURE__ */ React.createElement("line", {
95
+ x1: "6",
96
+ y1: "6",
97
+ x2: "18",
98
+ y2: "18"
99
+ }));
100
+ const useIsDocumentHidden = () => {
101
+ const [isDocumentHidden, setIsDocumentHidden] = React.useState(document.hidden);
102
+ React.useEffect(() => {
103
+ const callback = () => {
104
+ setIsDocumentHidden(document.hidden);
105
+ };
106
+ document.addEventListener("visibilitychange", callback);
107
+ return () => window.removeEventListener("visibilitychange", callback);
108
+ }, []);
109
+ return isDocumentHidden;
110
+ };
111
+ let toastsCounter = 1;
112
+ var Observer = class {
113
+ constructor() {
114
+ this.subscribe = (subscriber) => {
115
+ this.subscribers.push(subscriber);
116
+ return () => {
117
+ const index = this.subscribers.indexOf(subscriber);
118
+ this.subscribers.splice(index, 1);
119
+ };
120
+ };
121
+ this.publish = (data) => {
122
+ this.subscribers.forEach((subscriber) => subscriber(data));
123
+ };
124
+ this.addToast = (data) => {
125
+ this.publish(data);
126
+ this.toasts = [...this.toasts, data];
127
+ };
128
+ this.create = (data) => {
129
+ var _data_id;
130
+ const { message,...rest } = data;
131
+ const id = typeof (data == null ? void 0 : data.id) === "number" || ((_data_id = data.id) == null ? void 0 : _data_id.length) > 0 ? data.id : toastsCounter++;
132
+ const alreadyExists = this.toasts.find((toast$1) => {
133
+ return toast$1.id === id;
134
+ });
135
+ const dismissible = data.dismissible === void 0 ? true : data.dismissible;
136
+ if (this.dismissedToasts.has(id)) this.dismissedToasts.delete(id);
137
+ if (alreadyExists) this.toasts = this.toasts.map((toast$1) => {
138
+ if (toast$1.id === id) {
139
+ this.publish({
140
+ ...toast$1,
141
+ ...data,
142
+ id,
143
+ title: message
144
+ });
145
+ return {
146
+ ...toast$1,
147
+ ...data,
148
+ id,
149
+ dismissible,
150
+ title: message
151
+ };
152
+ }
153
+ return toast$1;
154
+ });
155
+ else this.addToast({
156
+ title: message,
157
+ ...rest,
158
+ dismissible,
159
+ id
160
+ });
161
+ return id;
162
+ };
163
+ this.dismiss = (id) => {
164
+ if (id) {
165
+ this.dismissedToasts.add(id);
166
+ requestAnimationFrame(() => this.subscribers.forEach((subscriber) => subscriber({
167
+ id,
168
+ dismiss: true
169
+ })));
170
+ } else this.toasts.forEach((toast$1) => {
171
+ this.subscribers.forEach((subscriber) => subscriber({
172
+ id: toast$1.id,
173
+ dismiss: true
174
+ }));
175
+ });
176
+ return id;
177
+ };
178
+ this.message = (message, data) => {
179
+ return this.create({
180
+ ...data,
181
+ message
182
+ });
183
+ };
184
+ this.error = (message, data) => {
185
+ return this.create({
186
+ ...data,
187
+ message,
188
+ type: "error"
189
+ });
190
+ };
191
+ this.success = (message, data) => {
192
+ return this.create({
193
+ ...data,
194
+ type: "success",
195
+ message
196
+ });
197
+ };
198
+ this.info = (message, data) => {
199
+ return this.create({
200
+ ...data,
201
+ type: "info",
202
+ message
203
+ });
204
+ };
205
+ this.warning = (message, data) => {
206
+ return this.create({
207
+ ...data,
208
+ type: "warning",
209
+ message
210
+ });
211
+ };
212
+ this.loading = (message, data) => {
213
+ return this.create({
214
+ ...data,
215
+ type: "loading",
216
+ message
217
+ });
218
+ };
219
+ this.promise = (promise, data) => {
220
+ if (!data) return;
221
+ let id = void 0;
222
+ if (data.loading !== void 0) id = this.create({
223
+ ...data,
224
+ promise,
225
+ type: "loading",
226
+ message: data.loading,
227
+ description: typeof data.description !== "function" ? data.description : void 0
228
+ });
229
+ const p = Promise.resolve(promise instanceof Function ? promise() : promise);
230
+ let shouldDismiss = id !== void 0;
231
+ let result;
232
+ const originalPromise = p.then(async (response) => {
233
+ result = ["resolve", response];
234
+ if (React.isValidElement(response)) {
235
+ shouldDismiss = false;
236
+ this.create({
237
+ id,
238
+ type: "default",
239
+ message: response
240
+ });
241
+ } else if (isHttpResponse(response) && !response.ok) {
242
+ shouldDismiss = false;
243
+ const promiseData = typeof data.error === "function" ? await data.error(`HTTP error! status: ${response.status}`) : data.error;
244
+ const description = typeof data.description === "function" ? await data.description(`HTTP error! status: ${response.status}`) : data.description;
245
+ const toastSettings = typeof promiseData === "object" && !React.isValidElement(promiseData) ? promiseData : { message: promiseData };
246
+ this.create({
247
+ id,
248
+ type: "error",
249
+ description,
250
+ ...toastSettings
251
+ });
252
+ } else if (response instanceof Error) {
253
+ shouldDismiss = false;
254
+ const promiseData = typeof data.error === "function" ? await data.error(response) : data.error;
255
+ const description = typeof data.description === "function" ? await data.description(response) : data.description;
256
+ const toastSettings = typeof promiseData === "object" && !React.isValidElement(promiseData) ? promiseData : { message: promiseData };
257
+ this.create({
258
+ id,
259
+ type: "error",
260
+ description,
261
+ ...toastSettings
262
+ });
263
+ } else if (data.success !== void 0) {
264
+ shouldDismiss = false;
265
+ const promiseData = typeof data.success === "function" ? await data.success(response) : data.success;
266
+ const description = typeof data.description === "function" ? await data.description(response) : data.description;
267
+ const toastSettings = typeof promiseData === "object" && !React.isValidElement(promiseData) ? promiseData : { message: promiseData };
268
+ this.create({
269
+ id,
270
+ type: "success",
271
+ description,
272
+ ...toastSettings
273
+ });
274
+ }
275
+ }).catch(async (error) => {
276
+ result = ["reject", error];
277
+ if (data.error !== void 0) {
278
+ shouldDismiss = false;
279
+ const promiseData = typeof data.error === "function" ? await data.error(error) : data.error;
280
+ const description = typeof data.description === "function" ? await data.description(error) : data.description;
281
+ const toastSettings = typeof promiseData === "object" && !React.isValidElement(promiseData) ? promiseData : { message: promiseData };
282
+ this.create({
283
+ id,
284
+ type: "error",
285
+ description,
286
+ ...toastSettings
287
+ });
288
+ }
289
+ }).finally(() => {
290
+ if (shouldDismiss) {
291
+ this.dismiss(id);
292
+ id = void 0;
293
+ }
294
+ data.finally == null || data.finally.call(data);
295
+ });
296
+ const unwrap = () => new Promise((resolve, reject) => originalPromise.then(() => result[0] === "reject" ? reject(result[1]) : resolve(result[1])).catch(reject));
297
+ if (typeof id !== "string" && typeof id !== "number") return { unwrap };
298
+ else return Object.assign(id, { unwrap });
299
+ };
300
+ this.custom = (jsx, data) => {
301
+ const id = (data == null ? void 0 : data.id) || toastsCounter++;
302
+ this.create({
303
+ jsx: jsx(id),
304
+ id,
305
+ ...data
306
+ });
307
+ return id;
308
+ };
309
+ this.getActiveToasts = () => {
310
+ return this.toasts.filter((toast$1) => !this.dismissedToasts.has(toast$1.id));
311
+ };
312
+ this.subscribers = [];
313
+ this.toasts = [];
314
+ this.dismissedToasts = /* @__PURE__ */ new Set();
315
+ }
316
+ };
317
+ const ToastState = new Observer();
318
+ const toastFunction = (message, data) => {
319
+ const id = (data == null ? void 0 : data.id) || toastsCounter++;
320
+ ToastState.addToast({
321
+ title: message,
322
+ ...data,
323
+ id
324
+ });
325
+ return id;
326
+ };
327
+ const isHttpResponse = (data) => {
328
+ return data && typeof data === "object" && "ok" in data && typeof data.ok === "boolean" && "status" in data && typeof data.status === "number";
329
+ };
330
+ const basicToast = toastFunction;
331
+ const getHistory = () => ToastState.toasts;
332
+ const getToasts = () => ToastState.getActiveToasts();
333
+ const toast = Object.assign(basicToast, {
334
+ success: ToastState.success,
335
+ info: ToastState.info,
336
+ warning: ToastState.warning,
337
+ error: ToastState.error,
338
+ custom: ToastState.custom,
339
+ message: ToastState.message,
340
+ promise: ToastState.promise,
341
+ dismiss: ToastState.dismiss,
342
+ loading: ToastState.loading
343
+ }, {
344
+ getHistory,
345
+ getToasts
346
+ });
347
+ __insertCSS("[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}@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-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[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][data-expanded=true]::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%)}");
348
+ function isAction(action) {
349
+ return action.label !== void 0;
350
+ }
351
+ const VISIBLE_TOASTS_AMOUNT = 3;
352
+ const VIEWPORT_OFFSET = "24px";
353
+ const MOBILE_VIEWPORT_OFFSET = "16px";
354
+ const TOAST_LIFETIME = 4e3;
355
+ const TOAST_WIDTH = 356;
356
+ const GAP = 14;
357
+ const SWIPE_THRESHOLD = 45;
358
+ const TIME_BEFORE_UNMOUNT = 200;
359
+ function cn(...classes) {
360
+ return classes.filter(Boolean).join(" ");
361
+ }
362
+ function getDefaultSwipeDirections(position) {
363
+ const [y, x] = position.split("-");
364
+ const directions = [];
365
+ if (y) directions.push(y);
366
+ if (x) directions.push(x);
367
+ return directions;
368
+ }
369
+ const Toast = (props) => {
370
+ var _toast_classNames, _toast_classNames1, _toast_classNames2, _toast_classNames3, _toast_classNames4, _toast_classNames5, _toast_classNames6, _toast_classNames7, _toast_classNames8;
371
+ const { invert: ToasterInvert, toast: toast$1, unstyled, interacting, setHeights, visibleToasts, heights, index, toasts, expanded, removeToast, defaultRichColors, closeButton: closeButtonFromToaster, style, cancelButtonStyle, actionButtonStyle, className = "", descriptionClassName = "", duration: durationFromToaster, position, gap, expandByDefault, classNames, icons, closeButtonAriaLabel = "Close toast" } = props;
372
+ const [swipeDirection, setSwipeDirection] = React.useState(null);
373
+ const [swipeOutDirection, setSwipeOutDirection] = React.useState(null);
374
+ const [mounted, setMounted] = React.useState(false);
375
+ const [removed, setRemoved] = React.useState(false);
376
+ const [swiping, setSwiping] = React.useState(false);
377
+ const [swipeOut, setSwipeOut] = React.useState(false);
378
+ const [isSwiped, setIsSwiped] = React.useState(false);
379
+ const [offsetBeforeRemove, setOffsetBeforeRemove] = React.useState(0);
380
+ const [initialHeight, setInitialHeight] = React.useState(0);
381
+ const remainingTime = React.useRef(toast$1.duration || durationFromToaster || TOAST_LIFETIME);
382
+ const dragStartTime = React.useRef(null);
383
+ const toastRef = React.useRef(null);
384
+ const isFront = index === 0;
385
+ const isVisible = index + 1 <= visibleToasts;
386
+ const toastType = toast$1.type;
387
+ const dismissible = toast$1.dismissible !== false;
388
+ const toastClassname = toast$1.className || "";
389
+ const toastDescriptionClassname = toast$1.descriptionClassName || "";
390
+ const heightIndex = React.useMemo(() => heights.findIndex((height) => height.toastId === toast$1.id) || 0, [heights, toast$1.id]);
391
+ const closeButton = React.useMemo(() => {
392
+ var _toast_closeButton;
393
+ return (_toast_closeButton = toast$1.closeButton) != null ? _toast_closeButton : closeButtonFromToaster;
394
+ }, [toast$1.closeButton, closeButtonFromToaster]);
395
+ const duration = React.useMemo(() => toast$1.duration || durationFromToaster || TOAST_LIFETIME, [toast$1.duration, durationFromToaster]);
396
+ const closeTimerStartTimeRef = React.useRef(0);
397
+ const offset = React.useRef(0);
398
+ const lastCloseTimerStartTimeRef = React.useRef(0);
399
+ const pointerStartRef = React.useRef(null);
400
+ const [y, x] = position.split("-");
401
+ const toastsHeightBefore = React.useMemo(() => {
402
+ return heights.reduce((prev, curr, reducerIndex) => {
403
+ if (reducerIndex >= heightIndex) return prev;
404
+ return prev + curr.height;
405
+ }, 0);
406
+ }, [heights, heightIndex]);
407
+ const isDocumentHidden = useIsDocumentHidden();
408
+ const invert = toast$1.invert || ToasterInvert;
409
+ const disabled = toastType === "loading";
410
+ offset.current = React.useMemo(() => heightIndex * gap + toastsHeightBefore, [heightIndex, toastsHeightBefore]);
411
+ React.useEffect(() => {
412
+ remainingTime.current = duration;
413
+ }, [duration]);
414
+ React.useEffect(() => {
415
+ setMounted(true);
416
+ }, []);
417
+ React.useEffect(() => {
418
+ const toastNode = toastRef.current;
419
+ if (toastNode) {
420
+ const height = toastNode.getBoundingClientRect().height;
421
+ setInitialHeight(height);
422
+ setHeights((h) => [{
423
+ toastId: toast$1.id,
424
+ height,
425
+ position: toast$1.position
426
+ }, ...h]);
427
+ return () => setHeights((h) => h.filter((height$1) => height$1.toastId !== toast$1.id));
428
+ }
429
+ }, [setHeights, toast$1.id]);
430
+ React.useLayoutEffect(() => {
431
+ if (!mounted) return;
432
+ const toastNode = toastRef.current;
433
+ const originalHeight = toastNode.style.height;
434
+ toastNode.style.height = "auto";
435
+ const newHeight = toastNode.getBoundingClientRect().height;
436
+ toastNode.style.height = originalHeight;
437
+ setInitialHeight(newHeight);
438
+ setHeights((heights$1) => {
439
+ if (!heights$1.find((height) => height.toastId === toast$1.id)) return [{
440
+ toastId: toast$1.id,
441
+ height: newHeight,
442
+ position: toast$1.position
443
+ }, ...heights$1];
444
+ else return heights$1.map((height) => height.toastId === toast$1.id ? {
445
+ ...height,
446
+ height: newHeight
447
+ } : height);
448
+ });
449
+ }, [
450
+ mounted,
451
+ toast$1.title,
452
+ toast$1.description,
453
+ setHeights,
454
+ toast$1.id,
455
+ toast$1.jsx,
456
+ toast$1.action,
457
+ toast$1.cancel
458
+ ]);
459
+ const deleteToast = React.useCallback(() => {
460
+ setRemoved(true);
461
+ setOffsetBeforeRemove(offset.current);
462
+ setHeights((h) => h.filter((height) => height.toastId !== toast$1.id));
463
+ setTimeout(() => {
464
+ removeToast(toast$1);
465
+ }, TIME_BEFORE_UNMOUNT);
466
+ }, [
467
+ toast$1,
468
+ removeToast,
469
+ setHeights,
470
+ offset
471
+ ]);
472
+ React.useEffect(() => {
473
+ if (toast$1.promise && toastType === "loading" || toast$1.duration === Infinity || toast$1.type === "loading") return;
474
+ let timeoutId;
475
+ const pauseTimer = () => {
476
+ if (lastCloseTimerStartTimeRef.current < closeTimerStartTimeRef.current) {
477
+ const elapsedTime = (/* @__PURE__ */ new Date()).getTime() - closeTimerStartTimeRef.current;
478
+ remainingTime.current = remainingTime.current - elapsedTime;
479
+ }
480
+ lastCloseTimerStartTimeRef.current = (/* @__PURE__ */ new Date()).getTime();
481
+ };
482
+ const startTimer = () => {
483
+ if (remainingTime.current === Infinity) return;
484
+ closeTimerStartTimeRef.current = (/* @__PURE__ */ new Date()).getTime();
485
+ timeoutId = setTimeout(() => {
486
+ toast$1.onAutoClose == null || toast$1.onAutoClose.call(toast$1, toast$1);
487
+ deleteToast();
488
+ }, remainingTime.current);
489
+ };
490
+ if (expanded || interacting || isDocumentHidden) pauseTimer();
491
+ else startTimer();
492
+ return () => clearTimeout(timeoutId);
493
+ }, [
494
+ expanded,
495
+ interacting,
496
+ toast$1,
497
+ toastType,
498
+ isDocumentHidden,
499
+ deleteToast
500
+ ]);
501
+ React.useEffect(() => {
502
+ if (toast$1.delete) {
503
+ deleteToast();
504
+ toast$1.onDismiss == null || toast$1.onDismiss.call(toast$1, toast$1);
505
+ }
506
+ }, [deleteToast, toast$1.delete]);
507
+ function getLoadingIcon() {
508
+ var _toast_classNames$1;
509
+ if (icons == null ? void 0 : icons.loading) {
510
+ var _toast_classNames1$1;
511
+ return /* @__PURE__ */ React.createElement("div", {
512
+ className: cn(classNames == null ? void 0 : classNames.loader, toast$1 == null ? void 0 : (_toast_classNames1$1 = toast$1.classNames) == null ? void 0 : _toast_classNames1$1.loader, "sonner-loader"),
513
+ "data-visible": toastType === "loading"
514
+ }, icons.loading);
515
+ }
516
+ return /* @__PURE__ */ React.createElement(Loader, {
517
+ className: cn(classNames == null ? void 0 : classNames.loader, toast$1 == null ? void 0 : (_toast_classNames$1 = toast$1.classNames) == null ? void 0 : _toast_classNames$1.loader),
518
+ visible: toastType === "loading"
519
+ });
520
+ }
521
+ const icon = toast$1.icon || (icons == null ? void 0 : icons[toastType]) || getAsset(toastType);
522
+ var _toast_richColors, _icons_close;
523
+ return /* @__PURE__ */ React.createElement("li", {
524
+ tabIndex: 0,
525
+ ref: toastRef,
526
+ className: cn(className, toastClassname, classNames == null ? void 0 : classNames.toast, toast$1 == null ? void 0 : (_toast_classNames = toast$1.classNames) == null ? void 0 : _toast_classNames.toast, classNames == null ? void 0 : classNames.default, classNames == null ? void 0 : classNames[toastType], toast$1 == null ? void 0 : (_toast_classNames1 = toast$1.classNames) == null ? void 0 : _toast_classNames1[toastType]),
527
+ "data-sonner-toast": "",
528
+ "data-rich-colors": (_toast_richColors = toast$1.richColors) != null ? _toast_richColors : defaultRichColors,
529
+ "data-styled": !Boolean(toast$1.jsx || toast$1.unstyled || unstyled),
530
+ "data-mounted": mounted,
531
+ "data-promise": Boolean(toast$1.promise),
532
+ "data-swiped": isSwiped,
533
+ "data-removed": removed,
534
+ "data-visible": isVisible,
535
+ "data-y-position": y,
536
+ "data-x-position": x,
537
+ "data-index": index,
538
+ "data-front": isFront,
539
+ "data-swiping": swiping,
540
+ "data-dismissible": dismissible,
541
+ "data-type": toastType,
542
+ "data-invert": invert,
543
+ "data-swipe-out": swipeOut,
544
+ "data-swipe-direction": swipeOutDirection,
545
+ "data-expanded": Boolean(expanded || expandByDefault && mounted),
546
+ "data-testid": toast$1.testId,
547
+ style: {
548
+ "--index": index,
549
+ "--toasts-before": index,
550
+ "--z-index": toasts.length - index,
551
+ "--offset": `${removed ? offsetBeforeRemove : offset.current}px`,
552
+ "--initial-height": expandByDefault ? "auto" : `${initialHeight}px`,
553
+ ...style,
554
+ ...toast$1.style
555
+ },
556
+ onDragEnd: () => {
557
+ setSwiping(false);
558
+ setSwipeDirection(null);
559
+ pointerStartRef.current = null;
560
+ },
561
+ onPointerDown: (event) => {
562
+ if (event.button === 2) return;
563
+ if (disabled || !dismissible) return;
564
+ dragStartTime.current = /* @__PURE__ */ new Date();
565
+ setOffsetBeforeRemove(offset.current);
566
+ event.target.setPointerCapture(event.pointerId);
567
+ if (event.target.tagName === "BUTTON") return;
568
+ setSwiping(true);
569
+ pointerStartRef.current = {
570
+ x: event.clientX,
571
+ y: event.clientY
572
+ };
573
+ },
574
+ onPointerUp: () => {
575
+ var _toastRef_current, _toastRef_current1, _dragStartTime_current;
576
+ if (swipeOut || !dismissible) return;
577
+ pointerStartRef.current = null;
578
+ const swipeAmountX = Number(((_toastRef_current = toastRef.current) == null ? void 0 : _toastRef_current.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0);
579
+ const swipeAmountY = Number(((_toastRef_current1 = toastRef.current) == null ? void 0 : _toastRef_current1.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0);
580
+ const timeTaken = (/* @__PURE__ */ new Date()).getTime() - ((_dragStartTime_current = dragStartTime.current) == null ? void 0 : _dragStartTime_current.getTime());
581
+ const swipeAmount = swipeDirection === "x" ? swipeAmountX : swipeAmountY;
582
+ const velocity = Math.abs(swipeAmount) / timeTaken;
583
+ if (Math.abs(swipeAmount) >= SWIPE_THRESHOLD || velocity > .11) {
584
+ setOffsetBeforeRemove(offset.current);
585
+ toast$1.onDismiss == null || toast$1.onDismiss.call(toast$1, toast$1);
586
+ if (swipeDirection === "x") setSwipeOutDirection(swipeAmountX > 0 ? "right" : "left");
587
+ else setSwipeOutDirection(swipeAmountY > 0 ? "down" : "up");
588
+ deleteToast();
589
+ setSwipeOut(true);
590
+ return;
591
+ } else {
592
+ var _toastRef_current2, _toastRef_current3;
593
+ (_toastRef_current2 = toastRef.current) == null || _toastRef_current2.style.setProperty("--swipe-amount-x", `0px`);
594
+ (_toastRef_current3 = toastRef.current) == null || _toastRef_current3.style.setProperty("--swipe-amount-y", `0px`);
595
+ }
596
+ setIsSwiped(false);
597
+ setSwiping(false);
598
+ setSwipeDirection(null);
599
+ },
600
+ onPointerMove: (event) => {
601
+ var _window_getSelection, _toastRef_current, _toastRef_current1;
602
+ if (!pointerStartRef.current || !dismissible) return;
603
+ if (((_window_getSelection = window.getSelection()) == null ? void 0 : _window_getSelection.toString().length) > 0) return;
604
+ const yDelta = event.clientY - pointerStartRef.current.y;
605
+ const xDelta = event.clientX - pointerStartRef.current.x;
606
+ var _props_swipeDirections;
607
+ const swipeDirections = (_props_swipeDirections = props.swipeDirections) != null ? _props_swipeDirections : getDefaultSwipeDirections(position);
608
+ if (!swipeDirection && (Math.abs(xDelta) > 1 || Math.abs(yDelta) > 1)) setSwipeDirection(Math.abs(xDelta) > Math.abs(yDelta) ? "x" : "y");
609
+ let swipeAmount = {
610
+ x: 0,
611
+ y: 0
612
+ };
613
+ const getDampening = (delta) => {
614
+ return 1 / (1.5 + Math.abs(delta) / 20);
615
+ };
616
+ if (swipeDirection === "y") {
617
+ if (swipeDirections.includes("top") || swipeDirections.includes("bottom")) if (swipeDirections.includes("top") && yDelta < 0 || swipeDirections.includes("bottom") && yDelta > 0) swipeAmount.y = yDelta;
618
+ else {
619
+ const dampenedDelta = yDelta * getDampening(yDelta);
620
+ swipeAmount.y = Math.abs(dampenedDelta) < Math.abs(yDelta) ? dampenedDelta : yDelta;
621
+ }
622
+ } else if (swipeDirection === "x") {
623
+ if (swipeDirections.includes("left") || swipeDirections.includes("right")) if (swipeDirections.includes("left") && xDelta < 0 || swipeDirections.includes("right") && xDelta > 0) swipeAmount.x = xDelta;
624
+ else {
625
+ const dampenedDelta = xDelta * getDampening(xDelta);
626
+ swipeAmount.x = Math.abs(dampenedDelta) < Math.abs(xDelta) ? dampenedDelta : xDelta;
627
+ }
628
+ }
629
+ if (Math.abs(swipeAmount.x) > 0 || Math.abs(swipeAmount.y) > 0) setIsSwiped(true);
630
+ (_toastRef_current = toastRef.current) == null || _toastRef_current.style.setProperty("--swipe-amount-x", `${swipeAmount.x}px`);
631
+ (_toastRef_current1 = toastRef.current) == null || _toastRef_current1.style.setProperty("--swipe-amount-y", `${swipeAmount.y}px`);
632
+ }
633
+ }, closeButton && !toast$1.jsx && toastType !== "loading" ? /* @__PURE__ */ React.createElement("button", {
634
+ "aria-label": closeButtonAriaLabel,
635
+ "data-disabled": disabled,
636
+ "data-close-button": true,
637
+ onClick: disabled || !dismissible ? () => {} : () => {
638
+ deleteToast();
639
+ toast$1.onDismiss == null || toast$1.onDismiss.call(toast$1, toast$1);
640
+ },
641
+ className: cn(classNames == null ? void 0 : classNames.closeButton, toast$1 == null ? void 0 : (_toast_classNames2 = toast$1.classNames) == null ? void 0 : _toast_classNames2.closeButton)
642
+ }, (_icons_close = icons == null ? void 0 : icons.close) != null ? _icons_close : CloseIcon) : null, (toastType || toast$1.icon || toast$1.promise) && toast$1.icon !== null && ((icons == null ? void 0 : icons[toastType]) !== null || toast$1.icon) ? /* @__PURE__ */ React.createElement("div", {
643
+ "data-icon": "",
644
+ className: cn(classNames == null ? void 0 : classNames.icon, toast$1 == null ? void 0 : (_toast_classNames3 = toast$1.classNames) == null ? void 0 : _toast_classNames3.icon)
645
+ }, toast$1.promise || toast$1.type === "loading" && !toast$1.icon ? toast$1.icon || getLoadingIcon() : null, toast$1.type !== "loading" ? icon : null) : null, /* @__PURE__ */ React.createElement("div", {
646
+ "data-content": "",
647
+ className: cn(classNames == null ? void 0 : classNames.content, toast$1 == null ? void 0 : (_toast_classNames4 = toast$1.classNames) == null ? void 0 : _toast_classNames4.content)
648
+ }, /* @__PURE__ */ React.createElement("div", {
649
+ "data-title": "",
650
+ className: cn(classNames == null ? void 0 : classNames.title, toast$1 == null ? void 0 : (_toast_classNames5 = toast$1.classNames) == null ? void 0 : _toast_classNames5.title)
651
+ }, toast$1.jsx ? toast$1.jsx : typeof toast$1.title === "function" ? toast$1.title() : toast$1.title), toast$1.description ? /* @__PURE__ */ React.createElement("div", {
652
+ "data-description": "",
653
+ className: cn(descriptionClassName, toastDescriptionClassname, classNames == null ? void 0 : classNames.description, toast$1 == null ? void 0 : (_toast_classNames6 = toast$1.classNames) == null ? void 0 : _toast_classNames6.description)
654
+ }, typeof toast$1.description === "function" ? toast$1.description() : toast$1.description) : null), /* @__PURE__ */ React.isValidElement(toast$1.cancel) ? toast$1.cancel : toast$1.cancel && isAction(toast$1.cancel) ? /* @__PURE__ */ React.createElement("button", {
655
+ "data-button": true,
656
+ "data-cancel": true,
657
+ style: toast$1.cancelButtonStyle || cancelButtonStyle,
658
+ onClick: (event) => {
659
+ if (!isAction(toast$1.cancel)) return;
660
+ if (!dismissible) return;
661
+ toast$1.cancel.onClick == null || toast$1.cancel.onClick.call(toast$1.cancel, event);
662
+ deleteToast();
663
+ },
664
+ className: cn(classNames == null ? void 0 : classNames.cancelButton, toast$1 == null ? void 0 : (_toast_classNames7 = toast$1.classNames) == null ? void 0 : _toast_classNames7.cancelButton)
665
+ }, toast$1.cancel.label) : null, /* @__PURE__ */ React.isValidElement(toast$1.action) ? toast$1.action : toast$1.action && isAction(toast$1.action) ? /* @__PURE__ */ React.createElement("button", {
666
+ "data-button": true,
667
+ "data-action": true,
668
+ style: toast$1.actionButtonStyle || actionButtonStyle,
669
+ onClick: (event) => {
670
+ if (!isAction(toast$1.action)) return;
671
+ toast$1.action.onClick == null || toast$1.action.onClick.call(toast$1.action, event);
672
+ if (event.defaultPrevented) return;
673
+ deleteToast();
674
+ },
675
+ className: cn(classNames == null ? void 0 : classNames.actionButton, toast$1 == null ? void 0 : (_toast_classNames8 = toast$1.classNames) == null ? void 0 : _toast_classNames8.actionButton)
676
+ }, toast$1.action.label) : null);
677
+ };
678
+ function getDocumentDirection() {
679
+ if (typeof window === "undefined") return "ltr";
680
+ if (typeof document === "undefined") return "ltr";
681
+ const dirAttribute = document.documentElement.getAttribute("dir");
682
+ if (dirAttribute === "auto" || !dirAttribute) return window.getComputedStyle(document.documentElement).direction;
683
+ return dirAttribute;
684
+ }
685
+ function assignOffset(defaultOffset, mobileOffset) {
686
+ const styles = {};
687
+ [defaultOffset, mobileOffset].forEach((offset, index) => {
688
+ const isMobile = index === 1;
689
+ const prefix = isMobile ? "--mobile-offset" : "--offset";
690
+ const defaultValue = isMobile ? MOBILE_VIEWPORT_OFFSET : VIEWPORT_OFFSET;
691
+ function assignAll(offset$1) {
692
+ [
693
+ "top",
694
+ "right",
695
+ "bottom",
696
+ "left"
697
+ ].forEach((key) => {
698
+ styles[`${prefix}-${key}`] = typeof offset$1 === "number" ? `${offset$1}px` : offset$1;
699
+ });
700
+ }
701
+ if (typeof offset === "number" || typeof offset === "string") assignAll(offset);
702
+ else if (typeof offset === "object") [
703
+ "top",
704
+ "right",
705
+ "bottom",
706
+ "left"
707
+ ].forEach((key) => {
708
+ if (offset[key] === void 0) styles[`${prefix}-${key}`] = defaultValue;
709
+ else styles[`${prefix}-${key}`] = typeof offset[key] === "number" ? `${offset[key]}px` : offset[key];
710
+ });
711
+ else assignAll(defaultValue);
712
+ });
713
+ return styles;
714
+ }
715
+ const Toaster = /* @__PURE__ */ React.forwardRef(function Toaster$1(props, ref) {
716
+ const { id, invert, position = "bottom-right", hotkey = ["altKey", "KeyT"], expand, closeButton, className, offset, mobileOffset, theme = "light", richColors, duration, style, visibleToasts = VISIBLE_TOASTS_AMOUNT, toastOptions, dir = getDocumentDirection(), gap = GAP, icons, containerAriaLabel = "Notifications" } = props;
717
+ const [toasts, setToasts] = React.useState([]);
718
+ const filteredToasts = React.useMemo(() => {
719
+ if (id) return toasts.filter((toast$1) => toast$1.toasterId === id);
720
+ return toasts.filter((toast$1) => !toast$1.toasterId);
721
+ }, [toasts, id]);
722
+ const possiblePositions = React.useMemo(() => {
723
+ return Array.from(new Set([position].concat(filteredToasts.filter((toast$1) => toast$1.position).map((toast$1) => toast$1.position))));
724
+ }, [filteredToasts, position]);
725
+ const [heights, setHeights] = React.useState([]);
726
+ const [expanded, setExpanded] = React.useState(false);
727
+ const [interacting, setInteracting] = React.useState(false);
728
+ const [actualTheme, setActualTheme] = React.useState(theme !== "system" ? theme : typeof window !== "undefined" ? window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : "light");
729
+ const listRef = React.useRef(null);
730
+ const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
731
+ const lastFocusedElementRef = React.useRef(null);
732
+ const isFocusWithinRef = React.useRef(false);
733
+ const removeToast = React.useCallback((toastToRemove) => {
734
+ setToasts((toasts$1) => {
735
+ var _toasts_find;
736
+ if (!((_toasts_find = toasts$1.find((toast$1) => toast$1.id === toastToRemove.id)) == null ? void 0 : _toasts_find.delete)) ToastState.dismiss(toastToRemove.id);
737
+ return toasts$1.filter(({ id: id$1 }) => id$1 !== toastToRemove.id);
738
+ });
739
+ }, []);
740
+ React.useEffect(() => {
741
+ return ToastState.subscribe((toast$1) => {
742
+ if (toast$1.dismiss) {
743
+ requestAnimationFrame(() => {
744
+ setToasts((toasts$1) => toasts$1.map((t) => t.id === toast$1.id ? {
745
+ ...t,
746
+ delete: true
747
+ } : t));
748
+ });
749
+ return;
750
+ }
751
+ setTimeout(() => {
752
+ ReactDOM.flushSync(() => {
753
+ setToasts((toasts$1) => {
754
+ const indexOfExistingToast = toasts$1.findIndex((t) => t.id === toast$1.id);
755
+ if (indexOfExistingToast !== -1) return [
756
+ ...toasts$1.slice(0, indexOfExistingToast),
757
+ {
758
+ ...toasts$1[indexOfExistingToast],
759
+ ...toast$1
760
+ },
761
+ ...toasts$1.slice(indexOfExistingToast + 1)
762
+ ];
763
+ return [toast$1, ...toasts$1];
764
+ });
765
+ });
766
+ });
767
+ });
768
+ }, [toasts]);
769
+ React.useEffect(() => {
770
+ if (theme !== "system") {
771
+ setActualTheme(theme);
772
+ return;
773
+ }
774
+ if (theme === "system") if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) setActualTheme("dark");
775
+ else setActualTheme("light");
776
+ if (typeof window === "undefined") return;
777
+ const darkMediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
778
+ try {
779
+ darkMediaQuery.addEventListener("change", ({ matches }) => {
780
+ if (matches) setActualTheme("dark");
781
+ else setActualTheme("light");
782
+ });
783
+ } catch (error) {
784
+ darkMediaQuery.addListener(({ matches }) => {
785
+ try {
786
+ if (matches) setActualTheme("dark");
787
+ else setActualTheme("light");
788
+ } catch (e) {
789
+ console.error(e);
790
+ }
791
+ });
792
+ }
793
+ }, [theme]);
794
+ React.useEffect(() => {
795
+ if (toasts.length <= 1) setExpanded(false);
796
+ }, [toasts]);
797
+ React.useEffect(() => {
798
+ const handleKeyDown = (event) => {
799
+ var _listRef_current;
800
+ if (hotkey.every((key) => event[key] || event.code === key)) {
801
+ var _listRef_current1;
802
+ setExpanded(true);
803
+ (_listRef_current1 = listRef.current) == null || _listRef_current1.focus();
804
+ }
805
+ if (event.code === "Escape" && (document.activeElement === listRef.current || ((_listRef_current = listRef.current) == null ? void 0 : _listRef_current.contains(document.activeElement)))) setExpanded(false);
806
+ };
807
+ document.addEventListener("keydown", handleKeyDown);
808
+ return () => document.removeEventListener("keydown", handleKeyDown);
809
+ }, [hotkey]);
810
+ React.useEffect(() => {
811
+ if (listRef.current) return () => {
812
+ if (lastFocusedElementRef.current) {
813
+ lastFocusedElementRef.current.focus({ preventScroll: true });
814
+ lastFocusedElementRef.current = null;
815
+ isFocusWithinRef.current = false;
816
+ }
817
+ };
818
+ }, [listRef.current]);
819
+ return /* @__PURE__ */ React.createElement("section", {
820
+ ref,
821
+ "aria-label": `${containerAriaLabel} ${hotkeyLabel}`,
822
+ tabIndex: -1,
823
+ "aria-live": "polite",
824
+ "aria-relevant": "additions text",
825
+ "aria-atomic": "false",
826
+ suppressHydrationWarning: true
827
+ }, possiblePositions.map((position$1, index) => {
828
+ var _heights_;
829
+ const [y, x] = position$1.split("-");
830
+ if (!filteredToasts.length) return null;
831
+ return /* @__PURE__ */ React.createElement("ol", {
832
+ key: position$1,
833
+ dir: dir === "auto" ? getDocumentDirection() : dir,
834
+ tabIndex: -1,
835
+ ref: listRef,
836
+ className,
837
+ "data-sonner-toaster": true,
838
+ "data-sonner-theme": actualTheme,
839
+ "data-y-position": y,
840
+ "data-x-position": x,
841
+ style: {
842
+ "--front-toast-height": `${((_heights_ = heights[0]) == null ? void 0 : _heights_.height) || 0}px`,
843
+ "--width": `${TOAST_WIDTH}px`,
844
+ "--gap": `${gap}px`,
845
+ ...style,
846
+ ...assignOffset(offset, mobileOffset)
847
+ },
848
+ onBlur: (event) => {
849
+ if (isFocusWithinRef.current && !event.currentTarget.contains(event.relatedTarget)) {
850
+ isFocusWithinRef.current = false;
851
+ if (lastFocusedElementRef.current) {
852
+ lastFocusedElementRef.current.focus({ preventScroll: true });
853
+ lastFocusedElementRef.current = null;
854
+ }
855
+ }
856
+ },
857
+ onFocus: (event) => {
858
+ if (event.target instanceof HTMLElement && event.target.dataset.dismissible === "false") return;
859
+ if (!isFocusWithinRef.current) {
860
+ isFocusWithinRef.current = true;
861
+ lastFocusedElementRef.current = event.relatedTarget;
862
+ }
863
+ },
864
+ onMouseEnter: () => setExpanded(true),
865
+ onMouseMove: () => setExpanded(true),
866
+ onMouseLeave: () => {
867
+ if (!interacting) setExpanded(false);
868
+ },
869
+ onDragEnd: () => setExpanded(false),
870
+ onPointerDown: (event) => {
871
+ if (event.target instanceof HTMLElement && event.target.dataset.dismissible === "false") return;
872
+ setInteracting(true);
873
+ },
874
+ onPointerUp: () => setInteracting(false)
875
+ }, filteredToasts.filter((toast$1) => !toast$1.position && index === 0 || toast$1.position === position$1).map((toast$1, index$1) => {
876
+ var _toastOptions_duration, _toastOptions_closeButton;
877
+ return /* @__PURE__ */ React.createElement(Toast, {
878
+ key: toast$1.id,
879
+ icons,
880
+ index: index$1,
881
+ toast: toast$1,
882
+ defaultRichColors: richColors,
883
+ duration: (_toastOptions_duration = toastOptions == null ? void 0 : toastOptions.duration) != null ? _toastOptions_duration : duration,
884
+ className: toastOptions == null ? void 0 : toastOptions.className,
885
+ descriptionClassName: toastOptions == null ? void 0 : toastOptions.descriptionClassName,
886
+ invert,
887
+ visibleToasts,
888
+ closeButton: (_toastOptions_closeButton = toastOptions == null ? void 0 : toastOptions.closeButton) != null ? _toastOptions_closeButton : closeButton,
889
+ interacting,
890
+ position: position$1,
891
+ style: toastOptions == null ? void 0 : toastOptions.style,
892
+ unstyled: toastOptions == null ? void 0 : toastOptions.unstyled,
893
+ classNames: toastOptions == null ? void 0 : toastOptions.classNames,
894
+ cancelButtonStyle: toastOptions == null ? void 0 : toastOptions.cancelButtonStyle,
895
+ actionButtonStyle: toastOptions == null ? void 0 : toastOptions.actionButtonStyle,
896
+ closeButtonAriaLabel: toastOptions == null ? void 0 : toastOptions.closeButtonAriaLabel,
897
+ removeToast,
898
+ toasts: filteredToasts.filter((t) => t.position == toast$1.position),
899
+ heights: heights.filter((h) => h.position == toast$1.position),
900
+ setHeights,
901
+ expandByDefault: expand,
902
+ gap,
903
+ expanded,
904
+ swipeDirections: props.swipeDirections
905
+ });
906
+ }));
907
+ }));
908
+ });
909
+
910
+ //#endregion
911
+ export { Toaster };
912
+ //# sourceMappingURL=index.js.map