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