@devalok/shilp-sutra 0.56.0 → 0.59.0

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 (374) hide show
  1. package/MIGRATION.md +198 -0
  2. package/dist/_chunks/badge-group.js +75 -174
  3. package/dist/_chunks/badge-group.js.map +1 -1
  4. package/dist/_chunks/chat.js +270 -253
  5. package/dist/_chunks/chat.js.map +1 -1
  6. package/dist/_chunks/document-preview.js +1 -1
  7. package/dist/_chunks/document-preview.js.map +1 -1
  8. package/dist/_chunks/emoji-suggestion.js +1 -1
  9. package/dist/_chunks/emoji-suggestion.js.map +1 -1
  10. package/dist/_chunks/image-preview.js +71 -70
  11. package/dist/_chunks/image-preview.js.map +1 -1
  12. package/dist/_chunks/mention-suggestion.js +2 -2
  13. package/dist/_chunks/mention-suggestion.js.map +1 -1
  14. package/dist/_chunks/motion-preference.js +15 -0
  15. package/dist/_chunks/motion-preference.js.map +1 -0
  16. package/dist/_chunks/motion-provider.js +1 -1
  17. package/dist/_chunks/motion-provider.js.map +1 -1
  18. package/dist/_chunks/oauth-button.js +1 -1
  19. package/dist/_chunks/oauth-button.js.map +1 -1
  20. package/dist/_chunks/popover.js +50 -49
  21. package/dist/_chunks/popover.js.map +1 -1
  22. package/dist/_chunks/primitives-internal.js +29 -29
  23. package/dist/_chunks/primitives-internal.js.map +1 -1
  24. package/dist/_chunks/shared.js +48 -47
  25. package/dist/_chunks/shared.js.map +1 -1
  26. package/dist/_chunks/success.js +36 -36
  27. package/dist/_chunks/success.js.map +1 -1
  28. package/dist/_chunks/tree-view.js +1 -1
  29. package/dist/_chunks/tree-view.js.map +1 -1
  30. package/dist/_chunks/use-calendar.js +4 -4
  31. package/dist/_chunks/use-calendar.js.map +1 -1
  32. package/dist/ai/block-renderer.js +8 -8
  33. package/dist/ai/blocks/text.js +1 -1
  34. package/dist/ai/blocks/text.js.map +1 -1
  35. package/dist/ai/command-bar.js +67 -67
  36. package/dist/ai/command-bar.js.map +1 -1
  37. package/dist/ai/conversation.js +35 -35
  38. package/dist/ai/conversation.js.map +1 -1
  39. package/dist/ai/index.js +4 -4
  40. package/dist/composed/activity-feed.d.ts.map +1 -1
  41. package/dist/composed/activity-feed.js +109 -108
  42. package/dist/composed/activity-feed.js.map +1 -1
  43. package/dist/composed/avatar-group.d.ts +7 -2
  44. package/dist/composed/avatar-group.d.ts.map +1 -1
  45. package/dist/composed/avatar-group.js +3 -3
  46. package/dist/composed/avatar-group.js.map +1 -1
  47. package/dist/composed/command-palette.js +137 -137
  48. package/dist/composed/command-palette.js.map +1 -1
  49. package/dist/composed/content-card.js +2 -2
  50. package/dist/composed/content-card.js.map +1 -1
  51. package/dist/composed/date-picker/index.js +9 -9
  52. package/dist/composed/date-picker/index.js.map +1 -1
  53. package/dist/composed/diff.d.ts +23 -2
  54. package/dist/composed/diff.d.ts.map +1 -1
  55. package/dist/composed/diff.js +341 -260
  56. package/dist/composed/diff.js.map +1 -1
  57. package/dist/composed/emoji-picker.js +3 -3
  58. package/dist/composed/emoji-picker.js.map +1 -1
  59. package/dist/composed/empty-state.js +4 -4
  60. package/dist/composed/error-boundary.js +2 -2
  61. package/dist/composed/error-boundary.js.map +1 -1
  62. package/dist/composed/file-preview/image-preview.d.ts.map +1 -1
  63. package/dist/composed/file-preview/shared.d.ts.map +1 -1
  64. package/dist/composed/file-preview/video-preview.d.ts.map +1 -1
  65. package/dist/composed/file-preview.js +152 -151
  66. package/dist/composed/file-preview.js.map +1 -1
  67. package/dist/composed/filter-bar.d.ts.map +1 -1
  68. package/dist/composed/filter-bar.js +53 -52
  69. package/dist/composed/filter-bar.js.map +1 -1
  70. package/dist/composed/form-section.d.ts.map +1 -1
  71. package/dist/composed/form-section.js +38 -37
  72. package/dist/composed/form-section.js.map +1 -1
  73. package/dist/composed/inline-edit.js +1 -1
  74. package/dist/composed/inline-edit.js.map +1 -1
  75. package/dist/composed/loading-skeleton.js +3 -3
  76. package/dist/composed/loading-skeleton.js.map +1 -1
  77. package/dist/composed/master-detail.d.ts.map +1 -1
  78. package/dist/composed/master-detail.js +1 -1
  79. package/dist/composed/master-detail.js.map +1 -1
  80. package/dist/composed/member-picker.js +1 -1
  81. package/dist/composed/member-picker.js.map +1 -1
  82. package/dist/composed/multi-select-popover.d.ts.map +1 -1
  83. package/dist/composed/multi-select-popover.js +109 -108
  84. package/dist/composed/multi-select-popover.js.map +1 -1
  85. package/dist/composed/page-skeletons.js +4 -4
  86. package/dist/composed/page-skeletons.js.map +1 -1
  87. package/dist/composed/responsive-modal.js +1 -1
  88. package/dist/composed/responsive-modal.js.map +1 -1
  89. package/dist/composed/rich-chat-input/attachment-strip.d.ts.map +1 -1
  90. package/dist/composed/rich-chat-input/reply-banner.d.ts.map +1 -1
  91. package/dist/composed/rich-chat-input/schedule-send.d.ts.map +1 -1
  92. package/dist/composed/rich-chat-input.d.ts.map +1 -1
  93. package/dist/composed/rich-chat-input.js +473 -472
  94. package/dist/composed/rich-chat-input.js.map +1 -1
  95. package/dist/composed/rich-text-editor.js +6 -6
  96. package/dist/composed/rich-text-editor.js.map +1 -1
  97. package/dist/composed/schedule-view.js +5 -5
  98. package/dist/composed/schedule-view.js.map +1 -1
  99. package/dist/composed/status-badge.d.ts.map +1 -1
  100. package/dist/composed/status-badge.js +29 -28
  101. package/dist/composed/status-badge.js.map +1 -1
  102. package/dist/hooks/index.d.ts +1 -0
  103. package/dist/hooks/index.d.ts.map +1 -1
  104. package/dist/hooks/index.js +4 -3
  105. package/dist/hooks/use-container-size.d.ts +18 -0
  106. package/dist/hooks/use-container-size.d.ts.map +1 -0
  107. package/dist/hooks/use-container-size.js +28 -0
  108. package/dist/hooks/use-container-size.js.map +1 -0
  109. package/dist/motion/index.d.ts +1 -0
  110. package/dist/motion/index.d.ts.map +1 -1
  111. package/dist/motion/index.js +2 -15
  112. package/dist/motion/motion-preference.d.ts +36 -0
  113. package/dist/motion/motion-preference.d.ts.map +1 -0
  114. package/dist/motion/motion-provider.d.ts +2 -1
  115. package/dist/motion/motion-provider.d.ts.map +1 -1
  116. package/dist/motion/primitives-index.js +103 -102
  117. package/dist/motion/primitives-index.js.map +1 -1
  118. package/dist/motion/primitives.d.ts.map +1 -1
  119. package/dist/shell/app-shell.d.ts +101 -0
  120. package/dist/shell/app-shell.d.ts.map +1 -0
  121. package/dist/shell/app-shell.js +76 -0
  122. package/dist/shell/app-shell.js.map +1 -0
  123. package/dist/shell/bottom-navbar.js +21 -21
  124. package/dist/shell/bottom-navbar.js.map +1 -1
  125. package/dist/shell/index.d.ts +2 -1
  126. package/dist/shell/index.d.ts.map +1 -1
  127. package/dist/shell/index.js +6 -5
  128. package/dist/shell/notification-center.d.ts +17 -0
  129. package/dist/shell/notification-center.d.ts.map +1 -1
  130. package/dist/shell/notification-center.js +110 -105
  131. package/dist/shell/notification-center.js.map +1 -1
  132. package/dist/shell/notification-preferences.js +1 -1
  133. package/dist/shell/notification-preferences.js.map +1 -1
  134. package/dist/shell/top-bar.js +7 -7
  135. package/dist/shell/top-bar.js.map +1 -1
  136. package/dist/tokens/generate-scale.d.ts +49 -0
  137. package/dist/tokens/generate-scale.d.ts.map +1 -1
  138. package/dist/tokens/index.css +1 -0
  139. package/dist/tokens/palettes.css +292 -0
  140. package/dist/tokens/primitives.css +29 -26
  141. package/dist/tokens/semantic.css +170 -47
  142. package/dist/tokens/shilp-sutra.css +1 -0
  143. package/dist/tokens/utilities.css +10 -7
  144. package/dist/tokens/variants.css +1 -1
  145. package/dist/ui/accordion.d.ts.map +1 -1
  146. package/dist/ui/accordion.js +27 -26
  147. package/dist/ui/accordion.js.map +1 -1
  148. package/dist/ui/alert-dialog.d.ts.map +1 -1
  149. package/dist/ui/alert-dialog.js +60 -59
  150. package/dist/ui/alert-dialog.js.map +1 -1
  151. package/dist/ui/alert.d.ts.map +1 -1
  152. package/dist/ui/alert.js +55 -113
  153. package/dist/ui/alert.js.map +1 -1
  154. package/dist/ui/autocomplete.js +80 -80
  155. package/dist/ui/autocomplete.js.map +1 -1
  156. package/dist/ui/avatar.d.ts.map +1 -1
  157. package/dist/ui/avatar.js +71 -70
  158. package/dist/ui/avatar.js.map +1 -1
  159. package/dist/ui/badge-indicator.d.ts +4 -8
  160. package/dist/ui/badge-indicator.d.ts.map +1 -1
  161. package/dist/ui/badge-indicator.js +3 -8
  162. package/dist/ui/badge-indicator.js.map +1 -1
  163. package/dist/ui/badge.d.ts +55 -34
  164. package/dist/ui/badge.d.ts.map +1 -1
  165. package/dist/ui/banner.d.ts.map +1 -1
  166. package/dist/ui/banner.js +43 -41
  167. package/dist/ui/banner.js.map +1 -1
  168. package/dist/ui/button-group.d.ts.map +1 -1
  169. package/dist/ui/button-group.js +3 -23
  170. package/dist/ui/button-group.js.map +1 -1
  171. package/dist/ui/button.d.ts +10 -1
  172. package/dist/ui/button.d.ts.map +1 -1
  173. package/dist/ui/button.js +79 -212
  174. package/dist/ui/button.js.map +1 -1
  175. package/dist/ui/card.d.ts.map +1 -1
  176. package/dist/ui/card.js +78 -75
  177. package/dist/ui/card.js.map +1 -1
  178. package/dist/ui/charts/radar-chart.d.ts.map +1 -1
  179. package/dist/ui/charts/radar-chart.js +1 -1
  180. package/dist/ui/charts/radar-chart.js.map +1 -1
  181. package/dist/ui/chat/date-separator.d.ts +8 -1
  182. package/dist/ui/chat/date-separator.d.ts.map +1 -1
  183. package/dist/ui/chat/message-list.d.ts.map +1 -1
  184. package/dist/ui/chat/message.d.ts.map +1 -1
  185. package/dist/ui/chat/typing-indicator.d.ts.map +1 -1
  186. package/dist/ui/checkbox.js +1 -1
  187. package/dist/ui/checkbox.js.map +1 -1
  188. package/dist/ui/code.js +2 -2
  189. package/dist/ui/code.js.map +1 -1
  190. package/dist/ui/color-input.d.ts.map +1 -1
  191. package/dist/ui/color-input.js +151 -150
  192. package/dist/ui/color-input.js.map +1 -1
  193. package/dist/ui/combobox.d.ts +14 -0
  194. package/dist/ui/combobox.d.ts.map +1 -1
  195. package/dist/ui/combobox.js +156 -152
  196. package/dist/ui/combobox.js.map +1 -1
  197. package/dist/ui/context-menu.d.ts.map +1 -1
  198. package/dist/ui/context-menu.js +70 -69
  199. package/dist/ui/context-menu.js.map +1 -1
  200. package/dist/ui/data-table-body.d.ts +3 -1
  201. package/dist/ui/data-table-body.d.ts.map +1 -1
  202. package/dist/ui/data-table-body.js +93 -92
  203. package/dist/ui/data-table-body.js.map +1 -1
  204. package/dist/ui/data-table-bulk-actions.d.ts +7 -1
  205. package/dist/ui/data-table-bulk-actions.d.ts.map +1 -1
  206. package/dist/ui/data-table-bulk-actions.js +14 -8
  207. package/dist/ui/data-table-bulk-actions.js.map +1 -1
  208. package/dist/ui/data-table-card.d.ts.map +1 -1
  209. package/dist/ui/data-table-card.js +66 -47
  210. package/dist/ui/data-table-card.js.map +1 -1
  211. package/dist/ui/data-table-context.d.ts +4 -0
  212. package/dist/ui/data-table-context.d.ts.map +1 -1
  213. package/dist/ui/data-table-context.js +2 -2
  214. package/dist/ui/data-table-context.js.map +1 -1
  215. package/dist/ui/data-table-header.d.ts.map +1 -1
  216. package/dist/ui/data-table-header.js +50 -46
  217. package/dist/ui/data-table-header.js.map +1 -1
  218. package/dist/ui/data-table-pagination.js +3 -3
  219. package/dist/ui/data-table-pagination.js.map +1 -1
  220. package/dist/ui/data-table-toolbar.d.ts +11 -1
  221. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  222. package/dist/ui/data-table-toolbar.js +7 -7
  223. package/dist/ui/data-table-toolbar.js.map +1 -1
  224. package/dist/ui/data-table.d.ts +52 -5
  225. package/dist/ui/data-table.d.ts.map +1 -1
  226. package/dist/ui/data-table.js +181 -169
  227. package/dist/ui/data-table.js.map +1 -1
  228. package/dist/ui/dialog.d.ts.map +1 -1
  229. package/dist/ui/dialog.js +62 -61
  230. package/dist/ui/dialog.js.map +1 -1
  231. package/dist/ui/dot.d.ts.map +1 -1
  232. package/dist/ui/dot.js +10 -41
  233. package/dist/ui/dot.js.map +1 -1
  234. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  235. package/dist/ui/dropdown-menu.js +79 -78
  236. package/dist/ui/dropdown-menu.js.map +1 -1
  237. package/dist/ui/file-upload.d.ts.map +1 -1
  238. package/dist/ui/file-upload.js +117 -116
  239. package/dist/ui/file-upload.js.map +1 -1
  240. package/dist/ui/form.d.ts.map +1 -1
  241. package/dist/ui/form.js +27 -26
  242. package/dist/ui/form.js.map +1 -1
  243. package/dist/ui/hover-card.d.ts.map +1 -1
  244. package/dist/ui/hover-card.js +26 -25
  245. package/dist/ui/hover-card.js.map +1 -1
  246. package/dist/ui/icon.js +7 -7
  247. package/dist/ui/index.d.ts +2 -2
  248. package/dist/ui/index.d.ts.map +1 -1
  249. package/dist/ui/index.js +3 -3
  250. package/dist/ui/index.js.map +1 -1
  251. package/dist/ui/input-otp.js +1 -1
  252. package/dist/ui/input-otp.js.map +1 -1
  253. package/dist/ui/input.js +8 -8
  254. package/dist/ui/input.js.map +1 -1
  255. package/dist/ui/menubar.d.ts.map +1 -1
  256. package/dist/ui/menubar.js +73 -72
  257. package/dist/ui/menubar.js.map +1 -1
  258. package/dist/ui/navigation-menu.d.ts.map +1 -1
  259. package/dist/ui/navigation-menu.js +80 -79
  260. package/dist/ui/navigation-menu.js.map +1 -1
  261. package/dist/ui/number-input.js +3 -3
  262. package/dist/ui/number-input.js.map +1 -1
  263. package/dist/ui/pagination.js +1 -1
  264. package/dist/ui/pagination.js.map +1 -1
  265. package/dist/ui/popover.d.ts.map +1 -1
  266. package/dist/ui/progress-ring.js +2 -2
  267. package/dist/ui/progress-ring.js.map +1 -1
  268. package/dist/ui/progress.d.ts.map +1 -1
  269. package/dist/ui/progress.js +82 -74
  270. package/dist/ui/progress.js.map +1 -1
  271. package/dist/ui/radio.d.ts.map +1 -1
  272. package/dist/ui/radio.js +32 -31
  273. package/dist/ui/radio.js.map +1 -1
  274. package/dist/ui/search-input.d.ts.map +1 -1
  275. package/dist/ui/search-input.js +28 -27
  276. package/dist/ui/search-input.js.map +1 -1
  277. package/dist/ui/select.d.ts.map +1 -1
  278. package/dist/ui/select.js +67 -66
  279. package/dist/ui/select.js.map +1 -1
  280. package/dist/ui/sheet.js +1 -1
  281. package/dist/ui/sheet.js.map +1 -1
  282. package/dist/ui/sidebar.d.ts.map +1 -1
  283. package/dist/ui/sidebar.js +14 -14
  284. package/dist/ui/sidebar.js.map +1 -1
  285. package/dist/ui/slider.d.ts +63 -9
  286. package/dist/ui/slider.d.ts.map +1 -1
  287. package/dist/ui/slider.js +75 -33
  288. package/dist/ui/slider.js.map +1 -1
  289. package/dist/ui/split-button.d.ts +8 -2
  290. package/dist/ui/split-button.d.ts.map +1 -1
  291. package/dist/ui/split-button.js +49 -95
  292. package/dist/ui/split-button.js.map +1 -1
  293. package/dist/ui/stat-card.d.ts.map +1 -1
  294. package/dist/ui/stat-card.js +89 -88
  295. package/dist/ui/stat-card.js.map +1 -1
  296. package/dist/ui/stat-flash.js +16 -16
  297. package/dist/ui/stepper.d.ts.map +1 -1
  298. package/dist/ui/stepper.js +63 -62
  299. package/dist/ui/stepper.js.map +1 -1
  300. package/dist/ui/surface.d.ts.map +1 -1
  301. package/dist/ui/surface.js +2 -2
  302. package/dist/ui/surface.js.map +1 -1
  303. package/dist/ui/switch.js +1 -1
  304. package/dist/ui/switch.js.map +1 -1
  305. package/dist/ui/table.js +3 -3
  306. package/dist/ui/table.js.map +1 -1
  307. package/dist/ui/tabs.d.ts.map +1 -1
  308. package/dist/ui/tabs.js +68 -67
  309. package/dist/ui/tabs.js.map +1 -1
  310. package/dist/ui/textarea.js +5 -5
  311. package/dist/ui/textarea.js.map +1 -1
  312. package/dist/ui/toast.d.ts.map +1 -1
  313. package/dist/ui/toast.js +196 -195
  314. package/dist/ui/toast.js.map +1 -1
  315. package/dist/ui/toggle.d.ts.map +1 -1
  316. package/dist/ui/toggle.js +26 -24
  317. package/dist/ui/toggle.js.map +1 -1
  318. package/dist/ui/tooltip.d.ts.map +1 -1
  319. package/dist/ui/tooltip.js +37 -36
  320. package/dist/ui/tooltip.js.map +1 -1
  321. package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
  322. package/docs/components/composed/avatar-group.md +4 -4
  323. package/docs/components/composed/diff.md +10 -2
  324. package/docs/components/composed/schedule-view.md +1 -1
  325. package/docs/components/shell/app-shell.md +132 -0
  326. package/docs/components/ui/avatar.md +1 -1
  327. package/docs/components/ui/button.md +1 -1
  328. package/docs/components/ui/chat.md +7 -1
  329. package/docs/components/ui/color-swatch.md +1 -1
  330. package/docs/components/ui/data-table-toolbar.md +6 -2
  331. package/docs/components/ui/data-table.md +41 -7
  332. package/docs/components/ui/dot.md +1 -1
  333. package/docs/components/ui/progress.md +1 -0
  334. package/docs/components/ui/surface.md +3 -3
  335. package/docs/components/ui/table.md +2 -2
  336. package/docs/recipes/customize-brand.md +58 -0
  337. package/docs/recipes/install-astro.md +1 -0
  338. package/docs/recipes/install-next-app-router.md +1 -0
  339. package/docs/recipes/install-next-pages.md +22 -1
  340. package/docs/recipes/install-remix.md +1 -0
  341. package/docs/recipes/install-tanstack-start.md +1 -0
  342. package/docs/recipes/install-vite.md +2 -0
  343. package/docs/recipes/server-components.md +7 -4
  344. package/docs/recipes/troubleshoot.md +1 -0
  345. package/llms.txt +2 -1
  346. package/make-kit/Guidelines.md +2 -2
  347. package/make-kit/components/button.md +1 -1
  348. package/make-kit/components/card.md +6 -6
  349. package/make-kit/components/surface.md +4 -4
  350. package/make-kit/foundations/color.md +4 -4
  351. package/make-kit/foundations/dark-mode.md +1 -1
  352. package/make-kit/foundations/radius.md +1 -1
  353. package/make-kit/foundations/surfaces.md +9 -9
  354. package/mcp-manifest.json +358 -35
  355. package/package.json +8 -4
  356. package/skill/SKILL.md +12 -6
  357. package/skill/references/components.md +2 -1
  358. package/skill/references/customize-brand.md +58 -0
  359. package/skill/references/server-components.md +7 -4
  360. package/skill/references/setup-astro.md +1 -0
  361. package/skill/references/setup-next-app-router.md +1 -0
  362. package/skill/references/setup-next-pages.md +22 -1
  363. package/skill/references/setup-remix.md +1 -0
  364. package/skill/references/setup-tanstack-start.md +1 -0
  365. package/skill/references/setup-vite.md +2 -0
  366. package/skill/references/troubleshoot.md +1 -0
  367. package/dist/motion/check-motion-provider.d.ts +0 -2
  368. package/dist/motion/check-motion-provider.d.ts.map +0 -1
  369. package/dist/motion/index.js.map +0 -1
  370. package/dist/primitives/react-toast.d.ts +0 -120
  371. package/dist/ui/charts/_internal/scales.d.ts +0 -5
  372. package/dist/ui/charts/_internal/scales.d.ts.map +0 -1
  373. package/dist/ui/lib/slot.d.ts +0 -8
  374. package/dist/ui/lib/slot.d.ts.map +0 -1
package/dist/ui/toast.js CHANGED
@@ -1,17 +1,18 @@
1
1
  "use client";
2
2
  import { springs as e, tweens as t } from "./lib/motion.js";
3
- import { cn as n } from "./lib/utils.js";
4
- import { Spinner as r } from "./spinner.js";
5
- import { Icon as i } from "./icon.js";
6
- import { Progress as a } from "./progress.js";
7
- import { assertToasterMounted as o } from "./toast-registry.js";
8
- import * as s from "react";
9
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
10
- import { IconAlertCircle as u, IconAlertTriangle as d, IconCheck as f, IconCircleCheck as p, IconCircleX as m, IconFile as h, IconInfoCircle as g, IconPhoto as _, IconRefresh as v, IconUpload as y, IconX as b } from "@tabler/icons-react";
11
- import { AnimatePresence as x, motion as S } from "framer-motion";
12
- import { toast as C } from "sonner";
3
+ import { MotionPreference as n } from "../_chunks/motion-preference.js";
4
+ import { cn as r } from "./lib/utils.js";
5
+ import { Spinner as i } from "./spinner.js";
6
+ import { Icon as a } from "./icon.js";
7
+ import { Progress as o } from "./progress.js";
8
+ import { assertToasterMounted as s } from "./toast-registry.js";
9
+ import * as c from "react";
10
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
11
+ import { IconAlertCircle as d, IconAlertTriangle as f, IconCheck as p, IconCircleCheck as m, IconCircleX as h, IconFile as g, IconInfoCircle as _, IconPhoto as v, IconRefresh as y, IconUpload as b, IconX as x } from "@tabler/icons-react";
12
+ import { AnimatePresence as S, motion as C } from "framer-motion";
13
+ import { toast as w } from "sonner";
13
14
  //#region src/ui/toast.tsx
14
- var w = 5e3, T = 8e3, E = 3e3, D = {
15
+ var T = 5e3, E = 8e3, D = 3e3, O = {
15
16
  message: {
16
17
  accentClass: "",
17
18
  iconClass: "",
@@ -21,25 +22,25 @@ var w = 5e3, T = 8e3, E = 3e3, D = {
21
22
  success: {
22
23
  accentClass: "bg-success-9",
23
24
  iconClass: "text-success-11",
24
- icon: p,
25
+ icon: m,
25
26
  timerBarClass: "bg-success-9"
26
27
  },
27
28
  error: {
28
29
  accentClass: "bg-error-9",
29
30
  iconClass: "text-error-11",
30
- icon: m,
31
+ icon: h,
31
32
  timerBarClass: "bg-error-9"
32
33
  },
33
34
  warning: {
34
35
  accentClass: "bg-warning-9",
35
36
  iconClass: "text-warning-11",
36
- icon: d,
37
+ icon: f,
37
38
  timerBarClass: "bg-warning-9"
38
39
  },
39
40
  info: {
40
41
  accentClass: "bg-info-9",
41
42
  iconClass: "text-info-11",
42
- icon: g,
43
+ icon: _,
43
44
  timerBarClass: "bg-info-9"
44
45
  },
45
46
  loading: {
@@ -49,57 +50,57 @@ var w = 5e3, T = 8e3, E = 3e3, D = {
49
50
  timerBarClass: "bg-accent-9"
50
51
  }
51
52
  };
52
- function O({ duration: e, type: t, paused: r }) {
53
- let i = D[t];
54
- return /* @__PURE__ */ c("div", {
53
+ function k({ duration: e, type: t, paused: n }) {
54
+ let i = O[t];
55
+ return /* @__PURE__ */ l("div", {
55
56
  className: "absolute bottom-0 left-0 right-0 h-ds-01 overflow-hidden",
56
- children: /* @__PURE__ */ c("div", {
57
- className: n("h-full w-full origin-left opacity-30", i.timerBarClass, "motion-safe:animate-timer-bar"),
57
+ children: /* @__PURE__ */ l("div", {
58
+ className: r("h-full w-full origin-left opacity-30", i.timerBarClass, "motion-safe:animate-timer-bar"),
58
59
  style: {
59
60
  animationDuration: `${e}ms`,
60
- animationPlayState: r ? "paused" : "running"
61
+ animationPlayState: n ? "paused" : "running"
61
62
  }
62
63
  })
63
64
  });
64
65
  }
65
- function k({ type: a, title: o, description: u, action: d, cancel: f, duration: p = w, showTimerBar: m = !0, showAccent: h = !1, selfDismissId: g }) {
66
- let [_, v] = s.useState(!1), [y, b] = s.useState(!1), T = _ || y, E = D[a], k = E.icon, A = s.useRef(p), j = s.useRef(0);
67
- s.useEffect(() => {
68
- if (g == null || p === Infinity) return;
69
- if (T) {
70
- let e = Date.now() - j.current;
71
- A.current = Math.max(0, A.current - e);
66
+ function A({ type: o, title: s, description: d, action: f, cancel: p, duration: m = T, showTimerBar: h = !0, showAccent: g = !1, selfDismissId: _ }) {
67
+ let [v, y] = c.useState(!1), [b, x] = c.useState(!1), E = v || b, D = O[o], A = D.icon, j = c.useRef(m), M = c.useRef(0);
68
+ c.useEffect(() => {
69
+ if (_ == null || m === Infinity) return;
70
+ if (E) {
71
+ let e = Date.now() - M.current;
72
+ j.current = Math.max(0, j.current - e);
72
73
  return;
73
74
  }
74
- j.current = Date.now();
75
+ M.current = Date.now();
75
76
  let e = setTimeout(() => {
76
- C.dismiss(g);
77
- }, A.current);
77
+ w.dismiss(_);
78
+ }, j.current);
78
79
  return () => clearTimeout(e);
79
80
  }, [
80
- g,
81
- p,
82
- T
81
+ _,
82
+ m,
83
+ E
83
84
  ]);
84
- let M = a === "error";
85
- return /* @__PURE__ */ l(S.div, {
85
+ let N = o === "error";
86
+ return /* @__PURE__ */ l(n, { children: /* @__PURE__ */ u(C.div, {
86
87
  layout: "position",
87
- role: M ? "alert" : "status",
88
- "aria-live": M ? "assertive" : "polite",
88
+ role: N ? "alert" : "status",
89
+ "aria-live": N ? "assertive" : "polite",
89
90
  "aria-atomic": "true",
90
- className: n("group relative flex w-full overflow-hidden rounded-overlay-sm bg-surface-overlay shadow-floating", a === "error" && "bg-error-2"),
91
- onMouseEnter: () => v(!0),
92
- onMouseLeave: () => v(!1),
93
- onFocusCapture: () => b(!0),
94
- onBlurCapture: () => b(!1),
91
+ className: r("group relative flex w-full overflow-hidden rounded-overlay-sm bg-surface-overlay shadow-floating", o === "error" && "bg-error-2"),
92
+ onMouseEnter: () => y(!0),
93
+ onMouseLeave: () => y(!1),
94
+ onFocusCapture: () => x(!0),
95
+ onBlurCapture: () => x(!1),
95
96
  transition: e.smooth,
96
97
  children: [
97
- h && E.accentClass && /* @__PURE__ */ c("div", { className: n("w-1 shrink-0 rounded-l-overlay-sm", E.accentClass) }),
98
- /* @__PURE__ */ l("div", {
98
+ g && D.accentClass && /* @__PURE__ */ l("div", { className: r("w-1 shrink-0 rounded-l-overlay-sm", D.accentClass) }),
99
+ /* @__PURE__ */ u("div", {
99
100
  className: "flex min-w-0 flex-1 items-start gap-ds-03 p-ds-04",
100
- children: [/* @__PURE__ */ c(x, {
101
+ children: [/* @__PURE__ */ l(S, {
101
102
  mode: "wait",
102
- children: a === "loading" ? /* @__PURE__ */ c(S.div, {
103
+ children: o === "loading" ? /* @__PURE__ */ l(C.div, {
103
104
  initial: {
104
105
  opacity: 0,
105
106
  scale: .5
@@ -114,11 +115,11 @@ function k({ type: a, title: o, description: u, action: d, cancel: f, duration:
114
115
  },
115
116
  transition: t.fade,
116
117
  className: "mt-0.5 shrink-0",
117
- children: /* @__PURE__ */ c(r, {
118
+ children: /* @__PURE__ */ l(i, {
118
119
  size: "sm",
119
120
  className: "h-4 w-4"
120
121
  })
121
- }, "loading") : k ? /* @__PURE__ */ c(S.div, {
122
+ }, "loading") : A ? /* @__PURE__ */ l(C.div, {
122
123
  initial: {
123
124
  opacity: 0,
124
125
  scale: .5
@@ -133,49 +134,49 @@ function k({ type: a, title: o, description: u, action: d, cancel: f, duration:
133
134
  },
134
135
  transition: e.bouncy,
135
136
  className: "mt-0.5 shrink-0",
136
- children: /* @__PURE__ */ c(i, {
137
- icon: k,
137
+ children: /* @__PURE__ */ l(a, {
138
+ icon: A,
138
139
  size: "sm",
139
- className: E.iconClass
140
+ className: D.iconClass
140
141
  })
141
- }, a) : null
142
- }), /* @__PURE__ */ l("div", {
142
+ }, o) : null
143
+ }), /* @__PURE__ */ u("div", {
143
144
  className: "min-w-0 flex-1",
144
145
  children: [
145
- o && /* @__PURE__ */ c("p", {
146
+ s && /* @__PURE__ */ l("p", {
146
147
  className: "text-body-md font-semibold text-surface-fg",
147
- children: o
148
+ children: s
148
149
  }),
149
- u && /* @__PURE__ */ c("p", {
150
- className: n("text-body-sm text-surface-fg-muted", o && "mt-0.5"),
151
- children: u
150
+ d && /* @__PURE__ */ l("p", {
151
+ className: r("text-body-sm text-surface-fg-muted", s && "mt-0.5"),
152
+ children: d
152
153
  }),
153
- (d || f) && /* @__PURE__ */ l("div", {
154
+ (f || p) && /* @__PURE__ */ u("div", {
154
155
  className: "mt-ds-03 flex items-center gap-ds-03",
155
- children: [d && /* @__PURE__ */ c("button", {
156
- type: "button",
157
- onClick: d.onClick,
158
- className: "text-body-sm font-medium text-accent-11 underline-offset-2 hover:underline hover:bg-surface-raised-hover rounded-control-inner px-ds-02 py-ds-01 transition-[color,background-color] duration-fast-01 ease-productive-standard focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:rounded-control-inner",
159
- children: d.label
160
- }), f && /* @__PURE__ */ c("button", {
156
+ children: [f && /* @__PURE__ */ l("button", {
161
157
  type: "button",
162
158
  onClick: f.onClick,
163
- className: "text-body-sm text-surface-fg-muted hover:text-surface-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:rounded-control-inner",
159
+ className: "text-body-sm font-medium text-accent-11 underline-offset-2 hover:underline hover:bg-surface-panel-hover rounded-control-inner px-ds-02 py-ds-01 transition-[color,background-color] duration-fast-01 ease-productive-standard focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:rounded-control-inner",
164
160
  children: f.label
161
+ }), p && /* @__PURE__ */ l("button", {
162
+ type: "button",
163
+ onClick: p.onClick,
164
+ className: "text-body-sm text-surface-fg-muted hover:text-surface-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:rounded-control-inner",
165
+ children: p.label
165
166
  })]
166
167
  })
167
168
  ]
168
169
  })]
169
170
  }),
170
- m && a !== "loading" && /* @__PURE__ */ c(O, {
171
- duration: p,
172
- type: a,
173
- paused: T
171
+ h && o !== "loading" && /* @__PURE__ */ l(k, {
172
+ duration: m,
173
+ type: o,
174
+ paused: E
174
175
  })
175
176
  ]
176
- });
177
+ }) });
177
178
  }
178
- var A = /* @__PURE__ */ new Set([
179
+ var j = /* @__PURE__ */ new Set([
179
180
  "jpg",
180
181
  "jpeg",
181
182
  "png",
@@ -186,19 +187,19 @@ var A = /* @__PURE__ */ new Set([
186
187
  "ico",
187
188
  "avif"
188
189
  ]);
189
- function j(e) {
190
+ function M(e) {
190
191
  if (e.previewUrl) return !0;
191
192
  let t = e.name.split(".").pop()?.toLowerCase() ?? "";
192
- return A.has(t);
193
+ return j.has(t);
193
194
  }
194
- function M(e) {
195
+ function N(e) {
195
196
  switch (e) {
196
197
  case "complete": return "success";
197
198
  case "error": return "error";
198
199
  default: return "accent";
199
200
  }
200
201
  }
201
- function N(e) {
202
+ function P(e) {
202
203
  switch (e.status) {
203
204
  case "pending": return 0;
204
205
  case "uploading": return e.progress ?? 0;
@@ -207,12 +208,12 @@ function N(e) {
207
208
  case "error": return e.progress ?? 0;
208
209
  }
209
210
  }
210
- function P(e) {
211
+ function F(e) {
211
212
  return !e || e < 0 || !Number.isFinite(e) ? "0 B" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(1)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
212
213
  }
213
- function F({ file: n, onRetry: o, onRemove: s }) {
214
- let d = n.status === "complete" || n.status === "error", p = n.status === "uploading" || n.status === "processing";
215
- return /* @__PURE__ */ l(S.div, {
214
+ function I({ file: r, onRetry: s, onRemove: c }) {
215
+ let f = r.status === "complete" || r.status === "error", m = r.status === "uploading" || r.status === "processing";
216
+ return /* @__PURE__ */ l(n, { children: /* @__PURE__ */ u(C.div, {
216
217
  layout: !0,
217
218
  className: "flex items-center gap-ds-02 py-1",
218
219
  initial: !1,
@@ -227,11 +228,11 @@ function F({ file: n, onRetry: o, onRemove: s }) {
227
228
  },
228
229
  transition: e.snappy,
229
230
  children: [
230
- /* @__PURE__ */ c("div", {
231
+ /* @__PURE__ */ l("div", {
231
232
  className: "flex h-5 w-5 shrink-0 items-center justify-center",
232
- children: /* @__PURE__ */ c(x, {
233
+ children: /* @__PURE__ */ l(S, {
233
234
  mode: "wait",
234
- children: n.status === "complete" ? /* @__PURE__ */ c(S.div, {
235
+ children: r.status === "complete" ? /* @__PURE__ */ l(C.div, {
235
236
  initial: {
236
237
  opacity: 0,
237
238
  scale: .5
@@ -245,12 +246,12 @@ function F({ file: n, onRetry: o, onRemove: s }) {
245
246
  scale: .5
246
247
  },
247
248
  transition: e.bouncy,
248
- children: /* @__PURE__ */ c(i, {
249
- icon: f,
249
+ children: /* @__PURE__ */ l(a, {
250
+ icon: p,
250
251
  size: "xs",
251
252
  className: "text-success-11"
252
253
  })
253
- }, "complete") : n.status === "error" ? /* @__PURE__ */ c(S.div, {
254
+ }, "complete") : r.status === "error" ? /* @__PURE__ */ l(C.div, {
254
255
  initial: {
255
256
  opacity: 0,
256
257
  scale: .5
@@ -264,128 +265,128 @@ function F({ file: n, onRetry: o, onRemove: s }) {
264
265
  scale: .5
265
266
  },
266
267
  transition: t.fade,
267
- children: /* @__PURE__ */ c(i, {
268
- icon: u,
268
+ children: /* @__PURE__ */ l(a, {
269
+ icon: d,
269
270
  size: "xs",
270
271
  className: "text-error-11"
271
272
  })
272
- }, "error") : n.status === "processing" ? /* @__PURE__ */ c(S.div, {
273
+ }, "error") : r.status === "processing" ? /* @__PURE__ */ l(C.div, {
273
274
  initial: { opacity: 0 },
274
275
  animate: { opacity: 1 },
275
276
  exit: { opacity: 0 },
276
277
  transition: t.fade,
277
- children: /* @__PURE__ */ c(r, {
278
+ children: /* @__PURE__ */ l(i, {
278
279
  size: "sm",
279
280
  className: "h-3.5 w-3.5"
280
281
  })
281
- }, "processing") : j(n) ? /* @__PURE__ */ c(S.div, {
282
+ }, "processing") : M(r) ? /* @__PURE__ */ l(C.div, {
282
283
  initial: { opacity: 0 },
283
284
  animate: { opacity: 1 },
284
285
  exit: { opacity: 0 },
285
286
  transition: t.fade,
286
- children: /* @__PURE__ */ c(i, {
287
- icon: _,
287
+ children: /* @__PURE__ */ l(a, {
288
+ icon: v,
288
289
  size: "xs",
289
290
  className: "text-surface-fg-muted"
290
291
  })
291
- }, "image") : /* @__PURE__ */ c(S.div, {
292
+ }, "image") : /* @__PURE__ */ l(C.div, {
292
293
  initial: { opacity: 0 },
293
294
  animate: { opacity: 1 },
294
295
  exit: { opacity: 0 },
295
296
  transition: t.fade,
296
- children: /* @__PURE__ */ c(i, {
297
- icon: h,
297
+ children: /* @__PURE__ */ l(a, {
298
+ icon: g,
298
299
  size: "xs",
299
300
  className: "text-surface-fg-muted"
300
301
  })
301
302
  }, "file")
302
303
  })
303
304
  }),
304
- /* @__PURE__ */ c("span", {
305
+ /* @__PURE__ */ l("span", {
305
306
  className: "min-w-0 flex-1 truncate text-body-xs text-surface-fg",
306
- children: n.name
307
+ children: r.name
307
308
  }),
308
- p ? /* @__PURE__ */ l("div", {
309
+ m ? /* @__PURE__ */ u("div", {
309
310
  className: "flex w-16 items-center gap-1",
310
- children: [/* @__PURE__ */ c(a, {
311
+ children: [/* @__PURE__ */ l(o, {
311
312
  size: "sm",
312
- color: M(n.status),
313
- value: N(n),
313
+ color: N(r.status),
314
+ value: P(r),
314
315
  className: "flex-1"
315
- }), n.progress !== void 0 && /* @__PURE__ */ l("span", {
316
+ }), r.progress !== void 0 && /* @__PURE__ */ u("span", {
316
317
  className: "shrink-0 text-caption tabular-nums text-surface-fg-muted",
317
- children: [n.progress, "%"]
318
+ children: [r.progress, "%"]
318
319
  })]
319
- }) : n.status === "complete" ? /* @__PURE__ */ c("span", {
320
+ }) : r.status === "complete" ? /* @__PURE__ */ l("span", {
320
321
  className: "text-body-xs text-success-11",
321
322
  children: "Done"
322
- }) : n.status === "error" ? /* @__PURE__ */ c("span", {
323
+ }) : r.status === "error" ? /* @__PURE__ */ l("span", {
323
324
  className: "max-w-[60px] truncate text-body-xs text-error-11",
324
- children: n.error || "Failed"
325
- }) : /* @__PURE__ */ c("span", {
325
+ children: r.error || "Failed"
326
+ }) : /* @__PURE__ */ l("span", {
326
327
  className: "text-caption text-surface-fg-muted",
327
- children: P(n.size)
328
+ children: F(r.size)
328
329
  }),
329
- n.status === "error" && o && /* @__PURE__ */ c("button", {
330
+ r.status === "error" && s && /* @__PURE__ */ l("button", {
330
331
  type: "button",
331
- onClick: () => o(n.id),
332
+ onClick: () => s(r.id),
332
333
  className: "touch-target flex min-h-6 min-w-6 items-center justify-center rounded-control-inner text-surface-fg-muted hover:text-surface-fg",
333
- "aria-label": `Retry ${n.name}`,
334
+ "aria-label": `Retry ${r.name}`,
334
335
  title: "Retry",
335
- children: /* @__PURE__ */ c(v, { className: "h-3.5 w-3.5" })
336
+ children: /* @__PURE__ */ l(y, { className: "h-3.5 w-3.5" })
336
337
  }),
337
- !d && s && /* @__PURE__ */ c("button", {
338
+ !f && c && /* @__PURE__ */ l("button", {
338
339
  type: "button",
339
- onClick: () => s(n.id),
340
+ onClick: () => c(r.id),
340
341
  className: "touch-target flex min-h-6 min-w-6 items-center justify-center rounded-control-inner text-surface-fg-muted hover:text-surface-fg",
341
- "aria-label": `Cancel ${n.name}`,
342
+ "aria-label": `Cancel ${r.name}`,
342
343
  title: "Remove",
343
- children: /* @__PURE__ */ c(b, { className: "h-3.5 w-3.5" })
344
+ children: /* @__PURE__ */ l(x, { className: "h-3.5 w-3.5" })
344
345
  })
345
346
  ]
346
- });
347
+ }) });
347
348
  }
348
- function I({ files: r, onRetry: a, onRemove: o, selfDismissId: d, showAccent: p = !1 }) {
349
- let [m, h] = s.useState(!1), [g, _] = s.useState(!1), v = m || g, b = r.filter((e) => e.status === "complete").length, w = r.filter((e) => e.status === "error").length, T = r.every((e) => e.status === "complete" || e.status === "error"), D = s.useRef(E), k = s.useRef(0);
350
- s.useEffect(() => {
351
- if (d == null || !T) return;
352
- if (v) {
353
- let e = Date.now() - k.current;
354
- D.current = Math.max(0, D.current - e);
349
+ function L({ files: i, onRetry: o, onRemove: s, selfDismissId: f, showAccent: m = !1 }) {
350
+ let [h, g] = c.useState(!1), [_, v] = c.useState(!1), y = h || _, x = i.filter((e) => e.status === "complete").length, T = i.filter((e) => e.status === "error").length, E = i.every((e) => e.status === "complete" || e.status === "error"), O = c.useRef(D), A = c.useRef(0);
351
+ c.useEffect(() => {
352
+ if (f == null || !E) return;
353
+ if (y) {
354
+ let e = Date.now() - A.current;
355
+ O.current = Math.max(0, O.current - e);
355
356
  return;
356
357
  }
357
- k.current = Date.now();
358
+ A.current = Date.now();
358
359
  let e = setTimeout(() => {
359
- C.dismiss(d);
360
- }, D.current);
360
+ w.dismiss(f);
361
+ }, O.current);
361
362
  return () => clearTimeout(e);
362
363
  }, [
363
- d,
364
- T,
365
- v
364
+ f,
365
+ E,
366
+ y
366
367
  ]);
367
- let A = T ? w > 0 ? "bg-error-7" : "bg-success-7" : "bg-accent-9", j = T ? w > 0 ? "error" : "success" : "loading", M = T && w > 0;
368
- return /* @__PURE__ */ l(S.div, {
368
+ let j = E ? T > 0 ? "bg-error-7" : "bg-success-7" : "bg-accent-9", M = E ? T > 0 ? "error" : "success" : "loading", N = E && T > 0;
369
+ return /* @__PURE__ */ l(n, { children: /* @__PURE__ */ u(C.div, {
369
370
  layout: !0,
370
- role: M ? "alert" : "status",
371
- "aria-live": M ? "assertive" : "polite",
371
+ role: N ? "alert" : "status",
372
+ "aria-live": N ? "assertive" : "polite",
372
373
  "aria-label": "File uploads",
373
- className: n("group relative flex w-full overflow-hidden rounded-overlay-sm bg-surface-overlay shadow-floating", M && "bg-error-2"),
374
- onMouseEnter: () => h(!0),
375
- onMouseLeave: () => h(!1),
376
- onFocusCapture: () => _(!0),
377
- onBlurCapture: () => _(!1),
374
+ className: r("group relative flex w-full overflow-hidden rounded-overlay-sm bg-surface-overlay shadow-floating", N && "bg-error-2"),
375
+ onMouseEnter: () => g(!0),
376
+ onMouseLeave: () => g(!1),
377
+ onFocusCapture: () => v(!0),
378
+ onBlurCapture: () => v(!1),
378
379
  transition: e.smooth,
379
380
  children: [
380
- p && /* @__PURE__ */ c("div", { className: n("w-1 shrink-0 rounded-l-overlay-sm", A) }),
381
- /* @__PURE__ */ l("div", {
381
+ m && /* @__PURE__ */ l("div", { className: r("w-1 shrink-0 rounded-l-overlay-sm", j) }),
382
+ /* @__PURE__ */ u("div", {
382
383
  className: "min-w-0 flex-1 p-ds-04",
383
384
  children: [
384
- /* @__PURE__ */ l("div", {
385
+ /* @__PURE__ */ u("div", {
385
386
  className: "flex items-center gap-ds-02",
386
- children: [/* @__PURE__ */ c(x, {
387
+ children: [/* @__PURE__ */ l(S, {
387
388
  mode: "wait",
388
- children: T ? w > 0 ? /* @__PURE__ */ c(S.div, {
389
+ children: E ? T > 0 ? /* @__PURE__ */ l(C.div, {
389
390
  initial: {
390
391
  opacity: 0,
391
392
  scale: .5
@@ -399,12 +400,12 @@ function I({ files: r, onRetry: a, onRemove: o, selfDismissId: d, showAccent: p
399
400
  scale: .5
400
401
  },
401
402
  transition: e.bouncy,
402
- children: /* @__PURE__ */ c(i, {
403
- icon: u,
403
+ children: /* @__PURE__ */ l(a, {
404
+ icon: d,
404
405
  size: "sm",
405
406
  className: "shrink-0 text-error-11"
406
407
  })
407
- }, "error-icon") : /* @__PURE__ */ c(S.div, {
408
+ }, "error-icon") : /* @__PURE__ */ l(C.div, {
408
409
  initial: {
409
410
  opacity: 0,
410
411
  scale: .5
@@ -418,78 +419,78 @@ function I({ files: r, onRetry: a, onRemove: o, selfDismissId: d, showAccent: p
418
419
  scale: .5
419
420
  },
420
421
  transition: e.bouncy,
421
- children: /* @__PURE__ */ c(i, {
422
- icon: f,
422
+ children: /* @__PURE__ */ l(a, {
423
+ icon: p,
423
424
  size: "sm",
424
425
  className: "shrink-0 text-success-11"
425
426
  })
426
- }, "success-icon") : /* @__PURE__ */ c(S.div, {
427
+ }, "success-icon") : /* @__PURE__ */ l(C.div, {
427
428
  initial: { opacity: 0 },
428
429
  animate: { opacity: 1 },
429
430
  exit: { opacity: 0 },
430
431
  transition: t.fade,
431
- children: /* @__PURE__ */ c(i, {
432
- icon: y,
432
+ children: /* @__PURE__ */ l(a, {
433
+ icon: b,
433
434
  size: "sm",
434
435
  className: "shrink-0 text-surface-fg-muted"
435
436
  })
436
437
  }, "upload-icon")
437
- }), /* @__PURE__ */ c("p", {
438
+ }), /* @__PURE__ */ l("p", {
438
439
  className: "text-body-md font-semibold text-surface-fg",
439
- children: T ? w > 0 ? `${b} of ${r.length} uploaded` : `${r.length} file${r.length > 1 ? "s" : ""} uploaded` : `Uploading ${r.length} file${r.length > 1 ? "s" : ""}`
440
+ children: E ? T > 0 ? `${x} of ${i.length} uploaded` : `${i.length} file${i.length > 1 ? "s" : ""} uploaded` : `Uploading ${i.length} file${i.length > 1 ? "s" : ""}`
440
441
  })]
441
442
  }),
442
- !T && /* @__PURE__ */ l("p", {
443
+ !E && /* @__PURE__ */ u("p", {
443
444
  className: "mt-0.5 text-caption text-surface-fg-muted",
444
445
  children: [
445
- b,
446
+ x,
446
447
  " of ",
447
- r.length,
448
+ i.length,
448
449
  " complete",
449
- w > 0 && ` · ${w} failed`
450
+ T > 0 && ` · ${T} failed`
450
451
  ]
451
452
  }),
452
- /* @__PURE__ */ c("div", {
453
+ /* @__PURE__ */ l("div", {
453
454
  className: "mt-ds-02 max-h-[140px] overflow-y-auto",
454
- children: /* @__PURE__ */ c(x, { children: r.map((e) => /* @__PURE__ */ c(F, {
455
+ children: /* @__PURE__ */ l(S, { children: i.map((e) => /* @__PURE__ */ l(I, {
455
456
  file: e,
456
- onRetry: a,
457
- onRemove: o
457
+ onRetry: o,
458
+ onRemove: s
458
459
  }, e.id)) })
459
460
  }),
460
- /* @__PURE__ */ l("div", {
461
+ /* @__PURE__ */ u("div", {
461
462
  className: "sr-only",
462
463
  "aria-live": "polite",
463
464
  children: [
464
- b,
465
+ x,
465
466
  " of ",
466
- r.length,
467
+ i.length,
467
468
  " files uploaded",
468
- w > 0 && `, ${w} failed`
469
+ T > 0 && `, ${T} failed`
469
470
  ]
470
471
  })
471
472
  ]
472
473
  }),
473
- T && /* @__PURE__ */ c(O, {
474
- duration: E,
475
- type: j,
474
+ E && /* @__PURE__ */ l(k, {
475
+ duration: D,
476
+ type: M,
476
477
  paused: !1
477
478
  })
478
479
  ]
479
- });
480
+ }) });
480
481
  }
481
- function L(e, t) {
482
+ function R(e, t) {
482
483
  return {
483
484
  id: e?.id,
484
- duration: e?.duration ?? t ?? w,
485
+ duration: e?.duration ?? t ?? T,
485
486
  unstyled: !0,
486
487
  classNames: { toast: "w-full" }
487
488
  };
488
489
  }
489
- function R(e, t, n) {
490
- o();
491
- let r = n?.duration ?? w;
492
- return C.custom(() => /* @__PURE__ */ c(k, {
490
+ function z(e, t, n) {
491
+ s();
492
+ let r = n?.duration ?? T;
493
+ return w.custom(() => /* @__PURE__ */ l(A, {
493
494
  type: e,
494
495
  title: t,
495
496
  description: n?.description,
@@ -497,16 +498,16 @@ function R(e, t, n) {
497
498
  cancel: n?.cancel,
498
499
  duration: r,
499
500
  showAccent: n?.showAccent
500
- }), L(n, r));
501
+ }), R(n, r));
501
502
  }
502
- function z(e, t) {
503
- return R("message", e, t);
503
+ function B(e, t) {
504
+ return z("message", e, t);
504
505
  }
505
- z.message = (e, t) => R("message", e, t), z.success = (e, t) => R("success", e, t), z.error = (e, t) => R("error", e, t), z.warning = (e, t) => R("warning", e, t), z.info = (e, t) => R("info", e, t), z.loading = (e, t) => R("loading", e, {
506
+ B.message = (e, t) => z("message", e, t), B.success = (e, t) => z("success", e, t), B.error = (e, t) => z("error", e, t), B.warning = (e, t) => z("warning", e, t), B.info = (e, t) => z("info", e, t), B.loading = (e, t) => z("loading", e, {
506
507
  ...t,
507
508
  duration: t?.duration ?? Infinity
508
- }), z.promise = (e, t) => {
509
- let n = C.custom(() => /* @__PURE__ */ c(k, {
509
+ }), B.promise = (e, t) => {
510
+ let n = w.custom(() => /* @__PURE__ */ l(A, {
510
511
  type: "loading",
511
512
  title: t.loading,
512
513
  showTimerBar: !1
@@ -515,10 +516,10 @@ z.message = (e, t) => R("message", e, t), z.success = (e, t) => R("success", e,
515
516
  unstyled: !0,
516
517
  classNames: { toast: "w-full" }
517
518
  }), r = (e, t) => {
518
- C.custom(() => /* @__PURE__ */ c(k, {
519
+ w.custom(() => /* @__PURE__ */ l(A, {
519
520
  type: e,
520
521
  title: t,
521
- duration: w,
522
+ duration: T,
522
523
  selfDismissId: n
523
524
  }), {
524
525
  id: n,
@@ -534,9 +535,9 @@ z.message = (e, t) => R("message", e, t), z.success = (e, t) => R("success", e,
534
535
  let n = typeof t.error == "function" ? t.error(e) : t.error;
535
536
  r("error", n);
536
537
  }), n;
537
- }, z.undo = (e, t) => {
538
- let n = t.duration ?? T;
539
- return C.custom(() => /* @__PURE__ */ c(k, {
538
+ }, B.undo = (e, t) => {
539
+ let n = t.duration ?? E;
540
+ return w.custom(() => /* @__PURE__ */ l(A, {
540
541
  type: "message",
541
542
  title: e,
542
543
  description: t.description,
@@ -550,9 +551,9 @@ z.message = (e, t) => R("message", e, t), z.success = (e, t) => R("success", e,
550
551
  unstyled: !0,
551
552
  classNames: { toast: "w-full" }
552
553
  });
553
- }, z.upload = (e) => {
554
+ }, B.upload = (e) => {
554
555
  let t = e.id ?? String(Date.now());
555
- return C.custom(() => /* @__PURE__ */ c(I, {
556
+ return w.custom(() => /* @__PURE__ */ l(L, {
556
557
  files: e.files,
557
558
  onRetry: e.onRetry,
558
559
  onRemove: e.onRemove,
@@ -564,15 +565,15 @@ z.message = (e, t) => R("message", e, t), z.success = (e, t) => R("success", e,
564
565
  unstyled: !0,
565
566
  classNames: { toast: "w-full" }
566
567
  }), t;
567
- }, z.custom = (e, t) => C.custom(e, {
568
+ }, B.custom = (e, t) => w.custom(e, {
568
569
  ...t,
569
570
  unstyled: !0,
570
571
  classNames: {
571
572
  toast: "w-full",
572
573
  ...t?.classNames
573
574
  }
574
- }), z.dismiss = (e) => {
575
- e === void 0 ? C.dismiss() : C.dismiss(e);
575
+ }), B.dismiss = (e) => {
576
+ e === void 0 ? w.dismiss() : w.dismiss(e);
576
577
  };
577
578
  //#endregion
578
- export { O as TimerBar, k as ToastContent, F as UploadFileRow, I as UploadToastContent, P as formatFileSize, z as toast };
579
+ export { k as TimerBar, A as ToastContent, I as UploadFileRow, L as UploadToastContent, F as formatFileSize, B as toast };