@devalok/shilp-sutra 0.17.2 → 0.18.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 (318) hide show
  1. package/dist/_chunks/avatar.js +21 -19
  2. package/dist/_chunks/button-group.js +27 -0
  3. package/dist/_chunks/button.js +53 -35
  4. package/dist/_chunks/card.js +50 -0
  5. package/dist/_chunks/checkbox.js +11 -9
  6. package/dist/_chunks/date-utils.js +13 -0
  7. package/dist/_chunks/form.js +20 -20
  8. package/dist/_chunks/link-context.js +19 -0
  9. package/dist/_chunks/motion.js +1376 -0
  10. package/dist/_chunks/motion2.js +35 -0
  11. package/dist/_chunks/primitives.js +3499 -3920
  12. package/dist/_chunks/sidebar.js +225 -211
  13. package/dist/_chunks/spinner.js +58 -28
  14. package/dist/_chunks/tiptap.js +1 -1
  15. package/dist/_chunks/tooltip.js +27 -10
  16. package/dist/_chunks/tree-view.js +180 -178
  17. package/dist/_chunks/use-calendar.js +531 -515
  18. package/dist/_chunks/utils.js +3 -3
  19. package/dist/_chunks/vendor-client.js +1792 -1049
  20. package/dist/_chunks/vendor-utils.js +5123 -1169
  21. package/dist/composed/activity-feed.d.ts.map +1 -1
  22. package/dist/composed/activity-feed.js +71 -74
  23. package/dist/composed/avatar-group.js +36 -36
  24. package/dist/composed/command-palette.d.ts +1 -1
  25. package/dist/composed/command-palette.d.ts.map +1 -1
  26. package/dist/composed/command-palette.js +207 -158
  27. package/dist/composed/confirm-dialog.d.ts +3 -5
  28. package/dist/composed/confirm-dialog.d.ts.map +1 -1
  29. package/dist/composed/confirm-dialog.js +46 -41
  30. package/dist/composed/content-card.d.ts +1 -1
  31. package/dist/composed/content-card.js +29 -29
  32. package/dist/composed/date-picker/calendar-grid.d.ts +1 -1
  33. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
  34. package/dist/composed/date-picker/date-picker.d.ts +1 -1
  35. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  36. package/dist/composed/date-picker/date-range-picker.d.ts +1 -1
  37. package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
  38. package/dist/composed/date-picker/date-time-picker.d.ts +1 -1
  39. package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
  40. package/dist/composed/date-picker/month-picker.d.ts +1 -1
  41. package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
  42. package/dist/composed/date-picker/presets.d.ts +1 -1
  43. package/dist/composed/date-picker/presets.d.ts.map +1 -1
  44. package/dist/composed/date-picker/time-picker.d.ts +1 -1
  45. package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
  46. package/dist/composed/date-picker/year-picker.d.ts +1 -1
  47. package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
  48. package/dist/composed/empty-state.d.ts +1 -0
  49. package/dist/composed/empty-state.d.ts.map +1 -1
  50. package/dist/composed/empty-state.js +51 -47
  51. package/dist/composed/error-boundary.d.ts +1 -1
  52. package/dist/composed/error-boundary.d.ts.map +1 -1
  53. package/dist/composed/error-boundary.js +48 -48
  54. package/dist/composed/extensions/mention-suggestion.d.ts +1 -1
  55. package/dist/composed/extensions/mention-suggestion.d.ts.map +1 -1
  56. package/dist/composed/global-loading.d.ts +1 -1
  57. package/dist/composed/global-loading.d.ts.map +1 -1
  58. package/dist/composed/global-loading.js +23 -20
  59. package/dist/composed/index.d.ts +2 -4
  60. package/dist/composed/index.d.ts.map +1 -1
  61. package/dist/composed/index.js +26 -29
  62. package/dist/composed/loading-skeleton.d.ts +1 -1
  63. package/dist/composed/loading-skeleton.d.ts.map +1 -1
  64. package/dist/composed/loading-skeleton.js +92 -87
  65. package/dist/composed/member-picker.d.ts +1 -1
  66. package/dist/composed/member-picker.d.ts.map +1 -1
  67. package/dist/composed/member-picker.js +47 -43
  68. package/dist/composed/page-header.js +36 -36
  69. package/dist/composed/page-skeletons.d.ts +9 -3
  70. package/dist/composed/page-skeletons.d.ts.map +1 -1
  71. package/dist/composed/page-skeletons.js +58 -58
  72. package/dist/composed/priority-indicator.js +19 -19
  73. package/dist/composed/rich-text-editor.d.ts +3 -3
  74. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  75. package/dist/composed/rich-text-editor.js +316 -309
  76. package/dist/composed/schedule-view.js +88 -88
  77. package/dist/composed/simple-tooltip.d.ts +2 -5
  78. package/dist/composed/simple-tooltip.d.ts.map +1 -1
  79. package/dist/composed/simple-tooltip.js +19 -14
  80. package/dist/composed/status-badge.d.ts +2 -1
  81. package/dist/composed/status-badge.d.ts.map +1 -1
  82. package/dist/composed/status-badge.js +76 -63
  83. package/dist/hooks/index.d.ts +2 -1
  84. package/dist/hooks/index.d.ts.map +1 -1
  85. package/dist/hooks/index.js +3 -4
  86. package/dist/hooks/use-toast.d.ts +15 -45
  87. package/dist/hooks/use-toast.d.ts.map +1 -1
  88. package/dist/hooks/use-toast.js +2 -95
  89. package/dist/motion/index.d.ts +4 -0
  90. package/dist/motion/index.d.ts.map +1 -0
  91. package/dist/motion/index.js +10 -0
  92. package/dist/motion/motion-provider.d.ts +18 -0
  93. package/dist/motion/motion-provider.d.ts.map +1 -0
  94. package/dist/motion/motion-provider.js +24 -0
  95. package/dist/motion/primitives-index.d.ts +3 -0
  96. package/dist/motion/primitives-index.d.ts.map +1 -0
  97. package/dist/motion/primitives-index.js +11 -0
  98. package/dist/motion/primitives.d.ts +38 -0
  99. package/dist/motion/primitives.d.ts.map +1 -0
  100. package/dist/motion/primitives.js +187 -0
  101. package/dist/shell/app-command-palette.d.ts +14 -5
  102. package/dist/shell/app-command-palette.d.ts.map +1 -1
  103. package/dist/shell/app-command-palette.js +152 -130
  104. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  105. package/dist/shell/bottom-navbar.js +90 -92
  106. package/dist/shell/command-registry.d.ts +23 -0
  107. package/dist/shell/command-registry.d.ts.map +1 -0
  108. package/dist/shell/command-registry.js +18 -0
  109. package/dist/shell/index.d.ts +2 -1
  110. package/dist/shell/index.d.ts.map +1 -1
  111. package/dist/shell/index.js +14 -11
  112. package/dist/shell/link-context.d.ts +6 -10
  113. package/dist/shell/link-context.d.ts.map +1 -1
  114. package/dist/shell/link-context.js +3 -16
  115. package/dist/shell/notification-center.d.ts.map +1 -1
  116. package/dist/shell/notification-center.js +137 -132
  117. package/dist/shell/notification-preferences.d.ts +10 -5
  118. package/dist/shell/notification-preferences.d.ts.map +1 -1
  119. package/dist/shell/notification-preferences.js +168 -165
  120. package/dist/shell/sidebar.js +119 -119
  121. package/dist/shell/top-bar.js +65 -65
  122. package/dist/tailwind/index.cjs +118 -297
  123. package/dist/tailwind/preset.d.ts.map +1 -1
  124. package/dist/tailwind/preset.js +118 -297
  125. package/dist/tokens/generate-scale.d.ts +86 -0
  126. package/dist/tokens/generate-scale.d.ts.map +1 -0
  127. package/dist/tokens/primitives.css +415 -187
  128. package/dist/tokens/semantic.css +244 -270
  129. package/dist/tokens/typography.css +6 -6
  130. package/dist/ui/accordion.d.ts.map +1 -1
  131. package/dist/ui/accordion.js +32 -22
  132. package/dist/ui/alert-dialog.d.ts +4 -1
  133. package/dist/ui/alert-dialog.d.ts.map +1 -1
  134. package/dist/ui/alert-dialog.js +114 -73
  135. package/dist/ui/alert.d.ts +6 -1
  136. package/dist/ui/alert.d.ts.map +1 -1
  137. package/dist/ui/alert.js +64 -49
  138. package/dist/ui/aspect-ratio.d.ts +2 -1
  139. package/dist/ui/aspect-ratio.d.ts.map +1 -1
  140. package/dist/ui/aspect-ratio.js +14 -4
  141. package/dist/ui/autocomplete.d.ts +11 -2
  142. package/dist/ui/autocomplete.d.ts.map +1 -1
  143. package/dist/ui/autocomplete.js +82 -57
  144. package/dist/ui/avatar.d.ts.map +1 -1
  145. package/dist/ui/avatar.js +45 -34
  146. package/dist/ui/badge.d.ts +1 -1
  147. package/dist/ui/badge.d.ts.map +1 -1
  148. package/dist/ui/badge.js +70 -65
  149. package/dist/ui/banner.d.ts.map +1 -1
  150. package/dist/ui/banner.js +53 -39
  151. package/dist/ui/breadcrumb.d.ts +2 -0
  152. package/dist/ui/breadcrumb.d.ts.map +1 -1
  153. package/dist/ui/breadcrumb.js +21 -21
  154. package/dist/ui/button.d.ts +10 -1
  155. package/dist/ui/button.d.ts.map +1 -1
  156. package/dist/ui/button.js +103 -67
  157. package/dist/ui/card.d.ts +2 -2
  158. package/dist/ui/card.d.ts.map +1 -1
  159. package/dist/ui/card.js +61 -53
  160. package/dist/ui/charts/_internal/animation.d.ts +1 -1
  161. package/dist/ui/charts/_internal/animation.d.ts.map +1 -1
  162. package/dist/ui/charts/area-chart.d.ts +3 -5
  163. package/dist/ui/charts/area-chart.d.ts.map +1 -1
  164. package/dist/ui/charts/bar-chart.d.ts +3 -5
  165. package/dist/ui/charts/bar-chart.d.ts.map +1 -1
  166. package/dist/ui/charts/chart-container.d.ts +2 -5
  167. package/dist/ui/charts/chart-container.d.ts.map +1 -1
  168. package/dist/ui/charts/gauge-chart.d.ts +3 -5
  169. package/dist/ui/charts/gauge-chart.d.ts.map +1 -1
  170. package/dist/ui/charts/index.js +1204 -1095
  171. package/dist/ui/charts/line-chart.d.ts +3 -5
  172. package/dist/ui/charts/line-chart.d.ts.map +1 -1
  173. package/dist/ui/charts/pie-chart.d.ts +2 -5
  174. package/dist/ui/charts/pie-chart.d.ts.map +1 -1
  175. package/dist/ui/charts/radar-chart.d.ts +3 -5
  176. package/dist/ui/charts/radar-chart.d.ts.map +1 -1
  177. package/dist/ui/charts/sparkline.d.ts +5 -5
  178. package/dist/ui/charts/sparkline.d.ts.map +1 -1
  179. package/dist/ui/checkbox.d.ts.map +1 -1
  180. package/dist/ui/checkbox.js +31 -19
  181. package/dist/ui/chip.d.ts +3 -2
  182. package/dist/ui/chip.d.ts.map +1 -1
  183. package/dist/ui/chip.js +62 -54
  184. package/dist/ui/code.js +16 -16
  185. package/dist/ui/collapsible.d.ts.map +1 -1
  186. package/dist/ui/collapsible.js +23 -15
  187. package/dist/ui/color-input.d.ts +1 -1
  188. package/dist/ui/color-input.d.ts.map +1 -1
  189. package/dist/ui/color-input.js +27 -27
  190. package/dist/ui/combobox.d.ts +2 -0
  191. package/dist/ui/combobox.d.ts.map +1 -1
  192. package/dist/ui/combobox.js +177 -166
  193. package/dist/ui/context-menu.d.ts +4 -2
  194. package/dist/ui/context-menu.d.ts.map +1 -1
  195. package/dist/ui/context-menu.js +146 -86
  196. package/dist/ui/data-table-toolbar.d.ts +3 -2
  197. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  198. package/dist/ui/data-table-toolbar.js +61 -59
  199. package/dist/ui/data-table.d.ts.map +1 -1
  200. package/dist/ui/data-table.js +289 -254
  201. package/dist/ui/dialog.d.ts +3 -1
  202. package/dist/ui/dialog.d.ts.map +1 -1
  203. package/dist/ui/dialog.js +114 -74
  204. package/dist/ui/dropdown-menu.d.ts +5 -3
  205. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  206. package/dist/ui/dropdown-menu.js +150 -89
  207. package/dist/ui/file-upload.d.ts.map +1 -1
  208. package/dist/ui/file-upload.js +169 -127
  209. package/dist/ui/form.d.ts.map +1 -1
  210. package/dist/ui/form.js +29 -26
  211. package/dist/ui/hover-card.d.ts +1 -1
  212. package/dist/ui/hover-card.d.ts.map +1 -1
  213. package/dist/ui/hover-card.js +53 -21
  214. package/dist/ui/index.d.ts +18 -18
  215. package/dist/ui/index.d.ts.map +1 -1
  216. package/dist/ui/index.js +432 -449
  217. package/dist/ui/input-otp.d.ts +2 -0
  218. package/dist/ui/input-otp.d.ts.map +1 -1
  219. package/dist/ui/input-otp.js +7 -7
  220. package/dist/ui/input.d.ts.map +1 -1
  221. package/dist/ui/input.js +36 -34
  222. package/dist/ui/label.js +12 -12
  223. package/dist/ui/lib/date-utils.d.ts +6 -0
  224. package/dist/ui/lib/date-utils.d.ts.map +1 -0
  225. package/dist/ui/lib/index.d.ts +7 -0
  226. package/dist/ui/lib/index.d.ts.map +1 -0
  227. package/dist/ui/lib/link-context.d.ts +13 -0
  228. package/dist/ui/lib/link-context.d.ts.map +1 -0
  229. package/dist/ui/lib/motion.d.ts +44 -9
  230. package/dist/ui/lib/motion.d.ts.map +1 -1
  231. package/dist/ui/lib/use-ripple.d.ts.map +1 -1
  232. package/dist/ui/lib/utils.js +1 -1
  233. package/dist/ui/link.js +11 -11
  234. package/dist/ui/menubar.d.ts +4 -2
  235. package/dist/ui/menubar.d.ts.map +1 -1
  236. package/dist/ui/menubar.js +141 -97
  237. package/dist/ui/navigation-menu.d.ts +2 -0
  238. package/dist/ui/navigation-menu.d.ts.map +1 -1
  239. package/dist/ui/navigation-menu.js +176 -73
  240. package/dist/ui/number-input.d.ts.map +1 -1
  241. package/dist/ui/number-input.js +56 -49
  242. package/dist/ui/pagination.js +22 -22
  243. package/dist/ui/popover.d.ts +2 -1
  244. package/dist/ui/popover.d.ts.map +1 -1
  245. package/dist/ui/popover.js +54 -22
  246. package/dist/ui/progress.d.ts.map +1 -1
  247. package/dist/ui/progress.js +58 -42
  248. package/dist/ui/radio.js +19 -19
  249. package/dist/ui/search-input.d.ts.map +1 -1
  250. package/dist/ui/search-input.js +28 -33
  251. package/dist/ui/segmented-control.d.ts +2 -2
  252. package/dist/ui/segmented-control.d.ts.map +1 -1
  253. package/dist/ui/segmented-control.js +143 -124
  254. package/dist/ui/select.d.ts.map +1 -1
  255. package/dist/ui/select.js +72 -61
  256. package/dist/ui/separator.js +11 -11
  257. package/dist/ui/sheet.d.ts +1 -1
  258. package/dist/ui/sheet.d.ts.map +1 -1
  259. package/dist/ui/sheet.js +111 -75
  260. package/dist/ui/sidebar.d.ts +6 -1
  261. package/dist/ui/sidebar.d.ts.map +1 -1
  262. package/dist/ui/sidebar.js +27 -25
  263. package/dist/ui/skeleton.js +1 -1
  264. package/dist/ui/slider.d.ts +9 -0
  265. package/dist/ui/slider.d.ts.map +1 -1
  266. package/dist/ui/slider.js +33 -27
  267. package/dist/ui/spinner.d.ts +32 -25
  268. package/dist/ui/spinner.d.ts.map +1 -1
  269. package/dist/ui/spinner.js +199 -40
  270. package/dist/ui/stat-card.d.ts.map +1 -1
  271. package/dist/ui/stat-card.js +183 -116
  272. package/dist/ui/stepper.d.ts +22 -1
  273. package/dist/ui/stepper.d.ts.map +1 -1
  274. package/dist/ui/stepper.js +121 -43
  275. package/dist/ui/switch.d.ts.map +1 -1
  276. package/dist/ui/switch.js +39 -26
  277. package/dist/ui/table.d.ts +3 -0
  278. package/dist/ui/table.d.ts.map +1 -1
  279. package/dist/ui/table.js +47 -47
  280. package/dist/ui/tabs.d.ts +4 -1
  281. package/dist/ui/tabs.d.ts.map +1 -1
  282. package/dist/ui/tabs.js +94 -44
  283. package/dist/ui/text.d.ts +3 -3
  284. package/dist/ui/text.js +1 -1
  285. package/dist/ui/textarea.d.ts.map +1 -1
  286. package/dist/ui/textarea.js +29 -27
  287. package/dist/ui/toast-types.d.ts +43 -0
  288. package/dist/ui/toast-types.d.ts.map +1 -0
  289. package/dist/ui/toast-types.js +2 -0
  290. package/dist/ui/toast.d.ts +60 -26
  291. package/dist/ui/toast.d.ts.map +1 -1
  292. package/dist/ui/toast.js +535 -89
  293. package/dist/ui/toaster.d.ts +19 -23
  294. package/dist/ui/toaster.d.ts.map +1 -1
  295. package/dist/ui/toaster.js +31 -21
  296. package/dist/ui/toggle-group.d.ts +2 -2
  297. package/dist/ui/toggle-group.d.ts.map +1 -1
  298. package/dist/ui/toggle-group.js +29 -26
  299. package/dist/ui/toggle.d.ts +2 -2
  300. package/dist/ui/toggle.d.ts.map +1 -1
  301. package/dist/ui/toggle.js +21 -17
  302. package/dist/ui/tooltip.d.ts +2 -1
  303. package/dist/ui/tooltip.d.ts.map +1 -1
  304. package/dist/ui/tooltip.js +58 -21
  305. package/dist/ui/tree-view/tree-view.d.ts +1 -1
  306. package/dist/ui/tree-view/tree-view.d.ts.map +1 -1
  307. package/llms-full.txt +221 -102
  308. package/llms.txt +65 -12
  309. package/package.json +26 -8
  310. package/dist/_chunks/switch.js +0 -10
  311. package/dist/composed/upload-progress.d.ts +0 -33
  312. package/dist/composed/upload-progress.d.ts.map +0 -1
  313. package/dist/composed/upload-progress.js +0 -386
  314. package/dist/ui/lib/use-reduced-motion.d.ts +0 -4
  315. package/dist/ui/lib/use-reduced-motion.d.ts.map +0 -1
  316. package/dist/ui/transitions.d.ts +0 -17
  317. package/dist/ui/transitions.d.ts.map +0 -1
  318. package/dist/ui/transitions.js +0 -111
@@ -1,227 +1,269 @@
1
1
  "use client";
2
- import { jsxs as m, jsx as n } from "react/jsx-runtime";
2
+ import { jsxs as p, jsx as t } from "react/jsx-runtime";
3
3
  import * as r from "react";
4
- import { IconLoader2 as R, IconPaperclip as _, IconUpload as S } from "@tabler/icons-react";
4
+ import { IconPaperclip as X, IconCheck as Z, IconUpload as q } from "@tabler/icons-react";
5
5
  import { c as h } from "../_chunks/utils.js";
6
- const V = 10 * 1024 * 1024;
7
- function X(t, l) {
8
- return l.split(",").map((o) => o.trim()).some((o) => o.startsWith(".") ? t.name.toLowerCase().endsWith(o.toLowerCase()) : o.endsWith("/*") ? t.type.startsWith(o.slice(0, o.indexOf("/") + 1)) : t.type === o);
6
+ import { s as D, t as N } from "../_chunks/motion2.js";
7
+ import { S as B } from "../_chunks/spinner.js";
8
+ import { m as c, A as M } from "../_chunks/motion.js";
9
+ const G = 10 * 1024 * 1024;
10
+ function H(a, l) {
11
+ return l.split(",").map((i) => i.trim()).some((i) => i.startsWith(".") ? a.name.toLowerCase().endsWith(i.toLowerCase()) : i.endsWith("/*") ? a.type.startsWith(i.slice(0, i.indexOf("/") + 1)) : a.type === i);
9
12
  }
10
- function $(t) {
11
- return t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : `${(t / (1024 * 1024)).toFixed(1)} MB`;
13
+ function U(a) {
14
+ return a < 1024 ? `${a} B` : a < 1024 * 1024 ? `${(a / 1024).toFixed(1)} KB` : `${(a / (1024 * 1024)).toFixed(1)} MB`;
12
15
  }
13
- const Z = r.forwardRef(
16
+ const J = r.forwardRef(
14
17
  ({
15
- accept: t,
16
- maxSize: l = V,
17
- multiple: o = !1,
18
- uploading: i = !1,
19
- progress: k = 0,
20
- onFiles: C,
21
- error: P,
22
- compact: B = !1,
23
- disabled: a = !1,
24
- className: D,
25
- label: p,
26
- sublabel: M,
27
- ...w
28
- }, N) => {
29
- const x = r.useRef(null), [I, c] = r.useState(!1), [O, d] = r.useState(
18
+ accept: a,
19
+ maxSize: l = G,
20
+ multiple: i = !1,
21
+ uploading: o = !1,
22
+ progress: x = 0,
23
+ onFiles: A,
24
+ error: I,
25
+ compact: W = !1,
26
+ disabled: s = !1,
27
+ className: F,
28
+ label: v,
29
+ sublabel: j,
30
+ ...E
31
+ }, L) => {
32
+ const y = r.useRef(null), [b, d] = r.useState(!1), [S, f] = r.useState(
30
33
  null
31
- ), v = r.useRef(!1), b = r.useRef(!1), f = P || O, y = r.useCallback(() => {
34
+ ), g = r.useRef(!1), k = r.useRef(!1), u = I || S, C = r.useCallback(() => {
32
35
  var e;
33
- a || i || (e = x.current) == null || e.click();
34
- }, [a, i]), u = r.useCallback(
36
+ s || o || (e = y.current) == null || e.click();
37
+ }, [s, o]), m = r.useCallback(
35
38
  (e) => {
36
- d(null);
37
- for (const s of e) {
38
- if (s.size > l) {
39
- d(
40
- `File "${s.name}" exceeds the maximum size of ${$(l)}`
39
+ f(null);
40
+ for (const n of e) {
41
+ if (n.size > l) {
42
+ f(
43
+ `File "${n.name}" exceeds the maximum size of ${U(l)}`
41
44
  );
42
45
  return;
43
46
  }
44
- if (t && !X(s, t)) {
45
- d(
46
- `File "${s.name}" is not an accepted file type`
47
+ if (a && !H(n, a)) {
48
+ f(
49
+ `File "${n.name}" is not an accepted file type`
47
50
  );
48
51
  return;
49
52
  }
50
53
  }
51
- C(e);
54
+ A(e);
52
55
  },
53
- [l, t, C]
54
- ), A = r.useCallback(
56
+ [l, a, A]
57
+ ), R = r.useCallback(
55
58
  (e) => {
56
- b.current = !0;
57
- const s = e.target.files;
58
- !s || s.length === 0 || (u(Array.from(s)), e.target.value = "");
59
+ k.current = !0;
60
+ const n = e.target.files;
61
+ !n || n.length === 0 || (m(Array.from(n)), e.target.value = "");
59
62
  },
60
- [u]
61
- ), F = r.useCallback(() => {
62
- v.current = !0, b.current = !1;
63
- }, []), E = r.useCallback(() => {
64
- v.current && !b.current && t && d("File type is not accepted"), v.current = !1;
65
- }, [t]), U = r.useCallback(
63
+ [m]
64
+ ), $ = r.useCallback(() => {
65
+ g.current = !0, k.current = !1;
66
+ }, []), P = r.useCallback(() => {
67
+ g.current && !k.current && a && f("File type is not accepted"), g.current = !1;
68
+ }, [a]), z = r.useCallback(
66
69
  (e) => {
67
- e.preventDefault(), e.stopPropagation(), !a && !i && c(!0);
70
+ e.preventDefault(), e.stopPropagation(), !s && !o && d(!0);
68
71
  },
69
- [a, i]
70
- ), W = r.useCallback(
72
+ [s, o]
73
+ ), K = r.useCallback(
71
74
  (e) => {
72
- e.preventDefault(), e.stopPropagation(), !a && !i && c(!0);
75
+ e.preventDefault(), e.stopPropagation(), !s && !o && d(!0);
73
76
  },
74
- [a, i]
75
- ), j = r.useCallback(
77
+ [s, o]
78
+ ), T = r.useCallback(
76
79
  (e) => {
77
- e.preventDefault(), e.stopPropagation(), c(!1);
80
+ e.preventDefault(), e.stopPropagation(), d(!1);
78
81
  },
79
82
  []
80
- ), K = r.useCallback(
83
+ ), _ = r.useCallback(
81
84
  (e) => {
82
- if (e.preventDefault(), e.stopPropagation(), c(!1), a || i) return;
83
- const s = e.dataTransfer.files;
84
- !s || s.length === 0 || u(Array.from(s));
85
+ if (e.preventDefault(), e.stopPropagation(), d(!1), s || o) return;
86
+ const n = e.dataTransfer.files;
87
+ !n || n.length === 0 || m(Array.from(n));
85
88
  },
86
- [a, i, u]
87
- ), L = p ?? "Drop files here or click to browse", T = M ?? `Max file size: ${$(l)}`, g = r.useId();
88
- return B ? /* @__PURE__ */ m("div", { ref: N, className: h("inline-flex flex-col", D), ...w, children: [
89
- /* @__PURE__ */ m(
89
+ [s, o, m]
90
+ ), O = v ?? "Drop files here or click to browse", V = j ?? `Max file size: ${U(l)}`, w = r.useId();
91
+ return W ? /* @__PURE__ */ p("div", { ref: L, className: h("inline-flex flex-col", F), ...E, children: [
92
+ /* @__PURE__ */ p(
90
93
  "button",
91
94
  {
92
95
  type: "button",
93
- onClick: y,
94
- disabled: a,
96
+ onClick: C,
97
+ disabled: s,
95
98
  className: h(
96
99
  "inline-flex items-center gap-ds-02 rounded-ds-md px-ds-03 py-ds-02",
97
100
  "text-ds-sm font-medium",
98
- "border border-border",
99
- "bg-field text-text-secondary",
100
- "hover:bg-interactive-subtle",
101
- "disabled:opacity-[0.38] disabled:cursor-not-allowed",
101
+ "border border-surface-border-strong",
102
+ "bg-surface-3 text-surface-fg-muted",
103
+ "hover:bg-accent-2",
104
+ "disabled:opacity-action-disabled disabled:cursor-not-allowed",
102
105
  "transition-colors"
103
106
  ),
104
107
  children: [
105
- i ? /* @__PURE__ */ n(R, { className: "h-ico-sm w-ico-sm animate-spin motion-reduce:animate-none" }) : /* @__PURE__ */ n(_, { className: "h-ico-sm w-ico-sm" }),
106
- p ?? "Attach files"
108
+ o ? /* @__PURE__ */ t(B, { size: "sm" }) : /* @__PURE__ */ t(X, { className: "h-ico-sm w-ico-sm" }),
109
+ v ?? "Attach files"
107
110
  ]
108
111
  }
109
112
  ),
110
- /* @__PURE__ */ n(
113
+ /* @__PURE__ */ t(
111
114
  "input",
112
115
  {
113
- ref: x,
114
- id: g,
116
+ ref: y,
117
+ id: w,
115
118
  type: "file",
116
119
  className: "sr-only",
117
120
  style: { visibility: "hidden" },
118
121
  "aria-hidden": "true",
119
- "aria-label": p ?? "Attach files",
120
- accept: t,
121
- multiple: o,
122
- disabled: a,
123
- onChange: A,
124
- onClick: F,
125
- onFocus: E,
122
+ "aria-label": v ?? "Attach files",
123
+ accept: a,
124
+ multiple: i,
125
+ disabled: s,
126
+ onChange: R,
127
+ onClick: $,
128
+ onFocus: P,
126
129
  tabIndex: -1
127
130
  }
128
131
  ),
129
- f && /* @__PURE__ */ n(
132
+ u && /* @__PURE__ */ t(
130
133
  "p",
131
134
  {
132
135
  role: "alert",
133
136
  "aria-live": "polite",
134
- className: "mt-ds-02 text-ds-xs text-error",
135
- children: f
137
+ className: "mt-ds-02 text-ds-xs text-error-11",
138
+ children: u
136
139
  }
137
140
  )
138
- ] }) : /* @__PURE__ */ m(
141
+ ] }) : /* @__PURE__ */ p(
139
142
  "div",
140
143
  {
141
- ref: N,
142
- ...w,
144
+ ref: L,
145
+ ...E,
143
146
  role: "presentation",
144
- className: h("flex flex-col", D),
145
- "data-drag-active": I ? "true" : void 0,
146
- onDragEnter: U,
147
- onDragOver: W,
148
- onDragLeave: j,
149
- onDrop: K,
147
+ className: h("flex flex-col", F),
148
+ "data-drag-active": b ? "true" : void 0,
149
+ onDragEnter: z,
150
+ onDragOver: K,
151
+ onDragLeave: T,
152
+ onDrop: _,
150
153
  children: [
151
- /* @__PURE__ */ m(
152
- "div",
154
+ /* @__PURE__ */ p(
155
+ c.div,
153
156
  {
154
157
  role: "button",
155
158
  tabIndex: 0,
156
- "aria-disabled": a || void 0,
157
- onClick: a ? void 0 : y,
159
+ "aria-disabled": s || void 0,
160
+ onClick: s ? void 0 : C,
158
161
  onKeyDown: (e) => {
159
- !a && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), y());
162
+ !s && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), C());
160
163
  },
161
164
  className: h(
162
165
  "flex flex-col items-center justify-center gap-ds-03 rounded-ds-lg",
163
166
  "border-2 border-dashed p-ds-08",
164
- "transition-colors cursor-pointer",
165
- "border-border bg-field",
166
- I && "border-interactive bg-interactive-subtle",
167
- a && "opacity-[0.38] cursor-not-allowed"
167
+ "cursor-pointer",
168
+ "border-surface-border-strong bg-surface-3",
169
+ b && "border-accent-7 bg-accent-2",
170
+ s && "opacity-action-disabled cursor-not-allowed"
168
171
  ),
172
+ animate: {
173
+ scale: b ? 1.02 : 1
174
+ },
175
+ transition: D.snappy,
169
176
  children: [
170
- i ? /* @__PURE__ */ n(R, { className: "h-ds-sm w-ds-sm animate-spin motion-reduce:animate-none text-icon-secondary" }) : /* @__PURE__ */ n(S, { className: "h-ds-sm w-ds-sm text-icon-secondary" }),
171
- /* @__PURE__ */ n("span", { id: g + "-label", className: "text-ds-sm text-text-secondary", children: L }),
172
- i ? /* @__PURE__ */ n("div", { className: "w-full max-w-xs", children: /* @__PURE__ */ n(
177
+ /* @__PURE__ */ t(M, { mode: "wait", children: o ? /* @__PURE__ */ t(
178
+ c.div,
179
+ {
180
+ initial: { opacity: 0, scale: 0.5 },
181
+ animate: { opacity: 1, scale: 1 },
182
+ exit: { opacity: 0, scale: 0.5 },
183
+ transition: N.fade,
184
+ children: /* @__PURE__ */ t(B, { size: "md" })
185
+ },
186
+ "spinner"
187
+ ) : x === 100 && !I ? /* @__PURE__ */ t(
188
+ c.div,
189
+ {
190
+ initial: { opacity: 0, scale: 0.5 },
191
+ animate: { opacity: 1, scale: 1 },
192
+ exit: { opacity: 0, scale: 0.5 },
193
+ transition: D.bouncy,
194
+ children: /* @__PURE__ */ t(Z, { className: "h-ds-sm w-ds-sm text-success-11" })
195
+ },
196
+ "complete"
197
+ ) : /* @__PURE__ */ t(
198
+ c.div,
199
+ {
200
+ initial: { opacity: 0 },
201
+ animate: { opacity: 1 },
202
+ exit: { opacity: 0 },
203
+ transition: N.fade,
204
+ children: /* @__PURE__ */ t(q, { className: "h-ds-sm w-ds-sm text-surface-fg-subtle" })
205
+ },
206
+ "upload"
207
+ ) }),
208
+ /* @__PURE__ */ t("span", { id: w + "-label", className: "text-ds-sm text-surface-fg-muted", children: O }),
209
+ o ? /* @__PURE__ */ t("div", { className: "w-full max-w-xs", children: /* @__PURE__ */ t(
173
210
  "div",
174
211
  {
175
212
  role: "progressbar",
176
- "aria-valuenow": k,
213
+ "aria-valuenow": x,
177
214
  "aria-valuemin": 0,
178
215
  "aria-valuemax": 100,
179
- className: "h-2 w-full overflow-hidden rounded-ds-full bg-field",
180
- children: /* @__PURE__ */ n(
181
- "div",
216
+ className: "h-2 w-full overflow-hidden rounded-ds-full bg-surface-3",
217
+ children: /* @__PURE__ */ t(
218
+ c.div,
182
219
  {
183
- className: "h-full rounded-ds-full bg-interactive transition-all",
184
- style: { width: `${k}%` }
220
+ className: "h-full rounded-ds-full bg-accent-9",
221
+ animate: { width: `${x}%` },
222
+ transition: D.smooth
185
223
  }
186
224
  )
187
225
  }
188
- ) }) : /* @__PURE__ */ n("span", { className: "text-ds-xs text-text-tertiary", children: T })
226
+ ) }) : /* @__PURE__ */ t("span", { className: "text-ds-xs text-surface-fg-subtle", children: V })
189
227
  ]
190
228
  }
191
229
  ),
192
- /* @__PURE__ */ n(
230
+ /* @__PURE__ */ t(
193
231
  "input",
194
232
  {
195
- ref: x,
196
- id: g,
233
+ ref: y,
234
+ id: w,
197
235
  type: "file",
198
236
  className: "sr-only",
199
237
  style: { visibility: "hidden" },
200
238
  "aria-hidden": "true",
201
- "aria-label": L,
202
- accept: t,
203
- multiple: o,
204
- disabled: a,
205
- onChange: A,
206
- onClick: F,
207
- onFocus: E,
239
+ "aria-label": O,
240
+ accept: a,
241
+ multiple: i,
242
+ disabled: s,
243
+ onChange: R,
244
+ onClick: $,
245
+ onFocus: P,
208
246
  tabIndex: -1
209
247
  }
210
248
  ),
211
- f && /* @__PURE__ */ n(
212
- "p",
249
+ /* @__PURE__ */ t(M, { children: u && /* @__PURE__ */ t(
250
+ c.p,
213
251
  {
214
252
  role: "alert",
215
- className: "mt-ds-02 text-ds-xs text-error",
216
- children: f
253
+ className: "mt-ds-02 text-ds-xs text-error-11",
254
+ initial: { opacity: 0, x: 0 },
255
+ animate: { opacity: 1, x: [0, -4, 4, -4, 4, 0] },
256
+ exit: { opacity: 0 },
257
+ transition: { opacity: N.fade, x: { type: "tween", duration: 0.4, ease: "easeOut" } },
258
+ children: u
217
259
  }
218
- )
260
+ ) })
219
261
  ]
220
262
  }
221
263
  );
222
264
  }
223
265
  );
224
- Z.displayName = "FileUpload";
266
+ J.displayName = "FileUpload";
225
267
  export {
226
- Z as FileUpload
268
+ J as FileUpload
227
269
  };
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/ui/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAExE,UAAU,qBAAqB;IAC7B,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AACD,QAAA,MAAM,gBAAgB,sCAAiD,CAAA;AAEvE;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1E;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kFAAkF;IAClF,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,SAAS,uFAiBd,CAAA;AAMD,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC;IACrF,KAAK,CAAC,EAAE,eAAe,CAAA;CACxB;AASD,QAAA,MAAM,cAAc,kGAgBnB,CAAA;AAGD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,IAAI,qBAAqB,CAEpD;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/ui/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAExE,UAAU,qBAAqB;IAC7B,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AACD,QAAA,MAAM,gBAAgB,sCAAiD,CAAA;AAEvE;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1E;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kFAAkF;IAClF,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,SAAS,uFAqBd,CAAA;AAMD,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC;IACrF,KAAK,CAAC,EAAE,eAAe,CAAA;CACxB;AASD,QAAA,MAAM,cAAc,kGAgBnB,CAAA;AAGD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,IAAI,qBAAqB,CAEpD;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAA"}
package/dist/ui/form.js CHANGED
@@ -2,48 +2,51 @@
2
2
  import { jsx as d } from "react/jsx-runtime";
3
3
  import * as e from "react";
4
4
  import { c as i } from "../_chunks/utils.js";
5
- const x = e.createContext({}), m = e.forwardRef(
6
- ({ className: o, helperTextId: s, state: l = "helper", required: a, children: n, ...t }, r) => {
7
- const c = e.useId(), p = s || `${c}-helper`;
8
- return /* @__PURE__ */ d(x.Provider, { value: { state: l, helperTextId: p, required: a }, children: /* @__PURE__ */ d(
5
+ const x = e.createContext({}), u = e.forwardRef(
6
+ ({ className: l, helperTextId: n, state: t = "helper", required: r, children: a, ...o }, s) => {
7
+ const c = e.useId(), m = n || `${c}-helper`, p = e.useMemo(
8
+ () => ({ state: t, helperTextId: m, required: r }),
9
+ [t, m, r]
10
+ );
11
+ return /* @__PURE__ */ d(x.Provider, { value: p, children: /* @__PURE__ */ d(
9
12
  "div",
10
13
  {
11
- ref: r,
12
- className: i("flex flex-col gap-ds-02", o),
13
- ...t,
14
- children: n
14
+ ref: s,
15
+ className: i("flex flex-col gap-ds-02", l),
16
+ ...o,
17
+ children: a
15
18
  }
16
19
  ) });
17
20
  }
18
21
  );
19
- m.displayName = "FormField";
20
- const u = {
21
- helper: "text-text-helper",
22
- error: "text-text-error",
23
- warning: "text-text-warning",
24
- success: "text-text-success"
25
- }, f = e.forwardRef(
26
- ({ className: o, id: s, state: l, ...a }, n) => {
27
- const t = e.useContext(x), r = l ?? t.state ?? "helper", c = s ?? t.helperTextId;
22
+ u.displayName = "FormField";
23
+ const f = {
24
+ helper: "text-surface-fg-subtle",
25
+ error: "text-error-11",
26
+ warning: "text-warning-11",
27
+ success: "text-success-11"
28
+ }, F = e.forwardRef(
29
+ ({ className: l, id: n, state: t, ...r }, a) => {
30
+ const o = e.useContext(x), s = t ?? o.state ?? "helper", c = n ?? o.helperTextId;
28
31
  return /* @__PURE__ */ d(
29
32
  "p",
30
33
  {
31
- ref: n,
34
+ ref: a,
32
35
  id: c,
33
- role: r === "error" ? "alert" : void 0,
34
- className: i("text-ds-sm", u[r], o),
35
- ...a
36
+ role: s === "error" ? "alert" : void 0,
37
+ className: i("text-ds-sm", f[s], l),
38
+ ...r
36
39
  }
37
40
  );
38
41
  }
39
42
  );
40
- f.displayName = "FormHelperText";
41
- function v() {
43
+ F.displayName = "FormHelperText";
44
+ function C() {
42
45
  return e.useContext(x);
43
46
  }
44
47
  export {
45
- m as FormField,
48
+ u as FormField,
46
49
  x as FormFieldContext,
47
- f as FormHelperText,
48
- v as useFormField
50
+ F as FormHelperText,
51
+ C as useFormField
49
52
  };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import * as React from 'react';
3
3
  import * as HoverCardPrimitive from '../primitives/react-hover-card';
4
- declare const HoverCard: React.FC<HoverCardPrimitive.HoverCardProps>;
4
+ declare const HoverCard: React.FC<React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Root>>;
5
5
  declare const HoverCardTrigger: React.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React.RefAttributes<HTMLAnchorElement>>;
6
6
  declare const HoverCardContent: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
7
  export type HoverCardContentProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>;
@@ -1 +1 @@
1
- {"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../src/ui/hover-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,kBAAkB,MAAM,8BAA8B,CAAA;AAIlE,QAAA,MAAM,SAAS,6CAA0B,CAAA;AAEzC,QAAA,MAAM,gBAAgB,oHAA6B,CAAA;AAEnD,QAAA,MAAM,gBAAgB,oKAgBpB,CAAA;AAGF,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAA;AAErG,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
1
+ {"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../src/ui/hover-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,kBAAkB,MAAM,8BAA8B,CAAA;AAUlE,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAuBvF,CAAA;AAGD,QAAA,MAAM,gBAAgB,oHAA6B,CAAA;AAEnD,QAAA,MAAM,gBAAgB,oKAmCpB,CAAA;AAGF,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAA;AAErG,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
@@ -1,24 +1,56 @@
1
1
  "use client";
2
- import { jsx as t } from "react/jsx-runtime";
3
- import * as i from "react";
4
- import { w as n, x as o, y as m, z as l } from "../_chunks/primitives.js";
5
- import { c as p } from "../_chunks/utils.js";
6
- const u = m, C = l, f = i.forwardRef(({ className: a, align: e = "center", sideOffset: r = 4, ...d }, s) => /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(
7
- o,
8
- {
9
- ref: s,
10
- align: e,
11
- sideOffset: r,
12
- className: p(
13
- "z-popover w-64 rounded-ds-lg border border-border bg-layer-01 p-ds-05 shadow-03 outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
14
- a
15
- ),
16
- ...d
17
- }
18
- ) }));
19
- f.displayName = o.displayName;
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ import * as t from "react";
4
+ import { w as u, x as p, y as C, z as v } from "../_chunks/primitives.js";
5
+ import { c as y } from "../_chunks/utils.js";
6
+ import { t as x, s as b } from "../_chunks/motion2.js";
7
+ import { A as g, m as w } from "../_chunks/motion.js";
8
+ const m = t.createContext(!1), H = ({
9
+ open: s,
10
+ defaultOpen: a = !1,
11
+ onOpenChange: e,
12
+ ...n
13
+ }) => {
14
+ const [i, c] = t.useState(a), o = s !== void 0, d = o ? s : i, f = t.useCallback(
15
+ (l) => {
16
+ o || c(l), e == null || e(l);
17
+ },
18
+ [o, e]
19
+ );
20
+ return /* @__PURE__ */ r(m.Provider, { value: d, children: /* @__PURE__ */ r(v, { open: d, onOpenChange: f, ...n }) });
21
+ };
22
+ H.displayName = "HoverCard";
23
+ const M = C, h = t.forwardRef(({ className: s, align: a = "center", sideOffset: e = 4, children: n, ...i }, c) => {
24
+ const o = t.useContext(m);
25
+ return /* @__PURE__ */ r(g, { children: o && /* @__PURE__ */ r(u, { forceMount: !0, children: /* @__PURE__ */ r(
26
+ p,
27
+ {
28
+ ref: c,
29
+ align: a,
30
+ sideOffset: e,
31
+ forceMount: !0,
32
+ asChild: !0,
33
+ ...i,
34
+ children: /* @__PURE__ */ r(
35
+ w.div,
36
+ {
37
+ initial: { opacity: 0, scale: 0.95 },
38
+ animate: { opacity: 1, scale: 1 },
39
+ exit: { opacity: 0, scale: 0.95 },
40
+ transition: { ...b.snappy, opacity: x.fade },
41
+ className: y(
42
+ "z-popover w-64 rounded-ds-lg border border-surface-border-strong bg-surface-1 p-ds-05 shadow-03 outline-none",
43
+ s
44
+ ),
45
+ children: n
46
+ }
47
+ )
48
+ }
49
+ ) }) });
50
+ });
51
+ h.displayName = p.displayName;
20
52
  export {
21
- u as HoverCard,
22
- f as HoverCardContent,
23
- C as HoverCardTrigger
53
+ H as HoverCard,
54
+ h as HoverCardContent,
55
+ M as HoverCardTrigger
24
56
  };