@actioneer/ads 0.5.6 → 0.5.8

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 (149) hide show
  1. package/bin/ads-init.mjs +6 -0
  2. package/components/accordion.js +50 -48
  3. package/components/agent-icon.d.ts +12 -0
  4. package/components/agent-icon.js +135 -121
  5. package/components/ai-elements/chain-of-thought-icon.d.ts +10 -12
  6. package/components/ai-elements/chain-of-thought-icon.js +341 -201
  7. package/components/ai-elements/chain-of-thought.d.ts +2 -2
  8. package/components/ai-elements/chain-of-thought.js +108 -108
  9. package/components/ai-elements/chart.js +16 -14
  10. package/components/ai-elements/inline-citation.js +41 -41
  11. package/components/ai-elements/message.js +4 -4
  12. package/components/ai-elements/queue.js +7 -7
  13. package/components/ai-elements/research-activity.js +114 -114
  14. package/components/ai-elements/shimmer.d.ts +2 -2
  15. package/components/ai-elements/speech-input.js +28 -28
  16. package/components/ai-elements/task-progress.js +26 -16
  17. package/components/ai-elements/task.js +17 -17
  18. package/components/ai-elements/tool.js +6 -6
  19. package/components/ai-elements/transcript.js +6 -5
  20. package/components/ai-elements/voice.js +1 -1
  21. package/components/alert.js +10 -10
  22. package/components/answer-sources.d.ts +42 -0
  23. package/components/answer-sources.js +111 -0
  24. package/components/answer.js +115 -114
  25. package/components/assistant-ui/action-bar.js +94 -48
  26. package/components/assistant-ui/attachment.js +131 -103
  27. package/components/assistant-ui/badge.d.ts +1 -1
  28. package/components/assistant-ui/badge.js +17 -17
  29. package/components/assistant-ui/chain-of-thought.d.ts +1 -1
  30. package/components/assistant-ui/composer-add-context.js +9 -9
  31. package/components/assistant-ui/composer-deep-research.js +5 -5
  32. package/components/assistant-ui/composer-harness.js +12 -9
  33. package/components/assistant-ui/composer-trigger-popover.js +45 -34
  34. package/components/assistant-ui/composer.js +59 -59
  35. package/components/assistant-ui/error.js +14 -14
  36. package/components/assistant-ui/file.d.ts +1 -1
  37. package/components/assistant-ui/image.d.ts +1 -1
  38. package/components/assistant-ui/image.js +113 -103
  39. package/components/assistant-ui/markdown-text.js +18 -18
  40. package/components/assistant-ui/message.js +46 -45
  41. package/components/assistant-ui/quote.js +1 -1
  42. package/components/assistant-ui/reasoning.d.ts +1 -1
  43. package/components/assistant-ui/reasoning.js +66 -77
  44. package/components/assistant-ui/suggestions.js +4 -4
  45. package/components/assistant-ui/thread-context.d.ts +2 -0
  46. package/components/assistant-ui/thread.js +41 -40
  47. package/components/assistant-ui/tool-fallback.js +60 -63
  48. package/components/assistant-ui/tool-group.d.ts +1 -1
  49. package/components/assistant-ui/tool-group.js +36 -42
  50. package/components/audio-waveform.js +25 -24
  51. package/components/autocomplete.d.ts +1 -0
  52. package/components/autocomplete.js +45 -43
  53. package/components/avatar.js +30 -30
  54. package/components/badge.d.ts +1 -1
  55. package/components/breadcrumbs.js +2 -2
  56. package/components/button.d.ts +2 -2
  57. package/components/button.js +22 -20
  58. package/components/card.js +8 -8
  59. package/components/carousel.js +105 -104
  60. package/components/chart.js +9 -7
  61. package/components/checkbox.js +74 -38
  62. package/components/chip.d.ts +1 -1
  63. package/components/code-block.js +3 -3
  64. package/components/collapsible.js +67 -23
  65. package/components/connector-card.js +6 -6
  66. package/components/drawer.d.ts +15 -10
  67. package/components/drawer.js +78 -77
  68. package/components/dropdown.d.ts +3 -1
  69. package/components/dropdown.js +88 -79
  70. package/components/empty-state.d.ts +4 -4
  71. package/components/empty-state.js +7 -7
  72. package/components/field.d.ts +4 -0
  73. package/components/field.js +45 -34
  74. package/components/file-dropzone.js +12 -12
  75. package/components/index.d.ts +4 -0
  76. package/components/index.js +584 -553
  77. package/components/infinite-canvas.js +1 -1
  78. package/components/input-field.js +51 -46
  79. package/components/input.js +20 -20
  80. package/components/link.js +9 -9
  81. package/components/modal.js +105 -73
  82. package/components/navbar.d.ts +1 -1
  83. package/components/navbar.js +1 -1
  84. package/components/number-field.js +38 -29
  85. package/components/page-header.js +12 -12
  86. package/components/pagination.js +19 -19
  87. package/components/panel.js +2 -2
  88. package/components/pixel-blast-svg.js +3 -3
  89. package/components/pixel-icon.d.ts +3 -1
  90. package/components/pixel-icon.js +294 -215
  91. package/components/popover.d.ts +1 -1
  92. package/components/popover.js +66 -64
  93. package/components/progress-circle.js +36 -32
  94. package/components/progress.js +28 -24
  95. package/components/radio.js +59 -49
  96. package/components/resizable-panel.js +1 -1
  97. package/components/reveal.d.ts +2 -2
  98. package/components/ripple.d.ts +3 -3
  99. package/components/scroll-area.js +17 -16
  100. package/components/segmented.d.ts +4 -1
  101. package/components/segmented.js +26 -25
  102. package/components/select.d.ts +2 -0
  103. package/components/select.js +61 -57
  104. package/components/setting-row.js +45 -42
  105. package/components/sidebar.d.ts +2 -2
  106. package/components/sidebar.js +131 -127
  107. package/components/skeleton.js +5 -5
  108. package/components/spinner.d.ts +13 -4
  109. package/components/spinner.js +42 -42
  110. package/components/stepper.js +21 -21
  111. package/components/switch.js +52 -32
  112. package/components/table.d.ts +24 -7
  113. package/components/table.js +457 -220
  114. package/components/tabs.js +149 -137
  115. package/components/textarea.js +1 -2
  116. package/components/toast.js +66 -66
  117. package/components/tooltip.js +2 -2
  118. package/components/tree.js +62 -51
  119. package/components/typography.d.ts +2 -1
  120. package/components/typography.js +33 -32
  121. package/components/ui/button.d.ts +2 -2
  122. package/components/ui/button.js +19 -19
  123. package/components/ui/collapsible.d.ts +1 -5
  124. package/components/ui/dialog.d.ts +3 -3
  125. package/components/ui/dialog.js +95 -58
  126. package/components/ui/tooltip.d.ts +2 -2
  127. package/components/ui/tooltip.js +67 -33
  128. package/components/viz-charts.js +95 -95
  129. package/demo/components/add-to-artifact.js +341 -0
  130. package/demo/lib/artifact-library.js +134 -0
  131. package/fonts/aribau-grotesk-medium.woff2 +0 -0
  132. package/fonts/aribau-grotesk-regular.woff2 +0 -0
  133. package/fonts.css +11 -11
  134. package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
  135. package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
  136. package/lib/icons.d.ts +12 -0
  137. package/lib/icons.js +107 -104
  138. package/lib/motion.d.ts +42 -39
  139. package/lib/motion.js +112 -52
  140. package/lib/spinner-mark.d.ts +9 -0
  141. package/lib/spinner-mark.js +98 -0
  142. package/llms.txt +69 -26
  143. package/manifest.json +344 -42
  144. package/package.json +1 -1
  145. package/styles.css +175 -161
  146. package/theme.css +104 -128
  147. package/components/ui/collapsible.js +0 -35
  148. package/fonts/aribau-grotesk-500.otf +0 -0
  149. package/fonts/aribau-grotesk-600.woff2 +0 -0
@@ -17,4 +17,4 @@ export interface PopoverContentProps extends React.HTMLAttributes<HTMLDivElement
17
17
  align?: "start" | "center" | "end";
18
18
  sideOffset?: number;
19
19
  }
20
- export declare function PopoverContent({ className, align, sideOffset, children, ...props }: PopoverContentProps): React.ReactPortal;
20
+ export declare function PopoverContent({ className, align, sideOffset, children, "aria-label": ariaLabel, ...props }: PopoverContentProps): React.ReactPortal;
@@ -1,97 +1,99 @@
1
1
  "use client";
2
- import { jsx as g, jsxs as b } from "react/jsx-runtime";
2
+ import { jsx as g, jsxs as C } from "react/jsx-runtime";
3
3
  import * as n from "react";
4
- import { createPortal as C } from "react-dom";
5
- import { MotionConfig as y, AnimatePresence as L, motion as R } from "motion/react";
6
- import { cn as k } from "../lib/cn.js";
7
- import { floatVariants as z } from "../lib/motion.js";
8
- import { Ripple as O } from "./ripple.js";
9
- const h = {
4
+ import { createPortal as y } from "react-dom";
5
+ import { MotionConfig as L, AnimatePresence as R, motion as k } from "motion/react";
6
+ import { cn as z } from "../lib/cn.js";
7
+ import { floatVariants as O } from "../lib/motion.js";
8
+ import { Ripple as j } from "./ripple.js";
9
+ const x = {
10
10
  start: "top left",
11
11
  center: "top",
12
12
  end: "top right"
13
- }, x = n.createContext(null);
14
- function E(o) {
15
- const e = n.useContext(x);
13
+ }, P = n.createContext(null);
14
+ function E(i) {
15
+ const e = n.useContext(P);
16
16
  if (!e)
17
- throw new Error(`${o} must be used within a <Popover>.`);
17
+ throw new Error(`${i} must be used within a <Popover>.`);
18
18
  return e;
19
19
  }
20
- function T({ children: o, defaultOpen: e = !1 }) {
21
- const [d, a] = n.useState(e), u = n.useRef(null);
22
- return /* @__PURE__ */ g(x.Provider, { value: { open: d, setOpen: a, triggerRef: u }, children: o });
20
+ function W({ children: i, defaultOpen: e = !1 }) {
21
+ const [c, l] = n.useState(e), d = n.useRef(null);
22
+ return /* @__PURE__ */ g(P.Provider, { value: { open: c, setOpen: l, triggerRef: d }, children: i });
23
23
  }
24
- function W({ children: o }) {
25
- const { open: e, setOpen: d, triggerRef: a } = E("PopoverTrigger"), u = o;
26
- return n.cloneElement(u, {
27
- ref: a,
24
+ function K({ children: i }) {
25
+ const { open: e, setOpen: c, triggerRef: l } = E("PopoverTrigger"), d = i;
26
+ return n.cloneElement(d, {
27
+ ref: l,
28
28
  "aria-expanded": e,
29
29
  "aria-haspopup": !0,
30
- onClick: (i) => {
31
- var f, s;
32
- (s = (f = u.props).onClick) == null || s.call(f, i), d(!e);
30
+ onClick: (w) => {
31
+ var r, u;
32
+ (u = (r = d.props).onClick) == null || u.call(r, w), c(!e);
33
33
  }
34
34
  });
35
35
  }
36
- function K({
37
- className: o,
36
+ function N({
37
+ className: i,
38
38
  align: e = "start",
39
- sideOffset: d = 8,
40
- children: a,
41
- ...u
39
+ sideOffset: c = 8,
40
+ children: l,
41
+ "aria-label": d = "Popover",
42
+ ...w
42
43
  }) {
43
- const { open: i, setOpen: f, triggerRef: s } = E("PopoverContent"), w = n.useRef(null), [c, P] = n.useState(null);
44
+ const { open: r, setOpen: u, triggerRef: v } = E("PopoverContent"), h = n.useRef(null), [s, b] = n.useState(null);
44
45
  return n.useLayoutEffect(() => {
45
- if (!i) return;
46
- const p = s.current;
47
- if (!p) return;
48
- const r = () => {
49
- var v;
50
- const t = p.getBoundingClientRect(), m = ((v = w.current) == null ? void 0 : v.offsetWidth) ?? 0;
51
- let l = t.left;
52
- e === "center" ? l = t.left + t.width / 2 - m / 2 : e === "end" && (l = t.right - m), P({ top: t.bottom + d, left: l });
46
+ if (!r) return;
47
+ const f = v.current;
48
+ if (!f) return;
49
+ const o = () => {
50
+ var m;
51
+ const t = f.getBoundingClientRect(), p = ((m = h.current) == null ? void 0 : m.offsetWidth) ?? 0;
52
+ let a = t.left;
53
+ e === "center" ? a = t.left + t.width / 2 - p / 2 : e === "end" && (a = t.right - p), b({ top: t.bottom + c, left: a });
53
54
  };
54
- return r(), window.addEventListener("resize", r), window.addEventListener("scroll", r, !0), () => {
55
- window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0);
55
+ return o(), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), () => {
56
+ window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0);
56
57
  };
57
- }, [i, e, d, s]), n.useEffect(() => {
58
- if (!i) return;
59
- const p = (t) => {
60
- t.key === "Escape" && f(!1);
61
- }, r = (t) => {
62
- var l, v;
63
- const m = t.target;
64
- (l = w.current) != null && l.contains(m) || (v = s.current) != null && v.contains(m) || f(!1);
58
+ }, [r, e, c, v]), n.useEffect(() => {
59
+ if (!r) return;
60
+ const f = (t) => {
61
+ t.key === "Escape" && u(!1);
62
+ }, o = (t) => {
63
+ var a, m;
64
+ const p = t.target;
65
+ (a = h.current) != null && a.contains(p) || (m = v.current) != null && m.contains(p) || u(!1);
65
66
  };
66
- return document.addEventListener("keydown", p), document.addEventListener("pointerdown", r), () => {
67
- document.removeEventListener("keydown", p), document.removeEventListener("pointerdown", r);
67
+ return document.addEventListener("keydown", f), document.addEventListener("pointerdown", o), () => {
68
+ document.removeEventListener("keydown", f), document.removeEventListener("pointerdown", o);
68
69
  };
69
- }, [i, f, s]), C(
70
- /* @__PURE__ */ g(y, { reducedMotion: "user", children: /* @__PURE__ */ g(L, { children: i && /* @__PURE__ */ b(
71
- R.div,
70
+ }, [r, u, v]), y(
71
+ /* @__PURE__ */ g(L, { reducedMotion: "user", children: /* @__PURE__ */ g(R, { children: r && /* @__PURE__ */ C(
72
+ k.div,
72
73
  {
73
- ref: w,
74
+ ref: h,
74
75
  role: "dialog",
75
- variants: z,
76
+ "aria-label": d,
77
+ variants: O,
76
78
  initial: "hidden",
77
79
  animate: "visible",
78
80
  exit: "hidden",
79
81
  style: {
80
82
  position: "fixed",
81
- top: (c == null ? void 0 : c.top) ?? 0,
82
- left: (c == null ? void 0 : c.left) ?? 0,
83
- visibility: c ? "visible" : "hidden",
84
- transformOrigin: h[e]
83
+ top: (s == null ? void 0 : s.top) ?? 0,
84
+ left: (s == null ? void 0 : s.left) ?? 0,
85
+ visibility: s ? "visible" : "hidden",
86
+ transformOrigin: x[e]
85
87
  },
86
- className: k(
88
+ className: z(
87
89
  "relative z-50 min-w-44 rounded-lg border border-border bg-elevated p-3",
88
90
  "text-xs text-foreground shadow-elevation",
89
- o
91
+ i
90
92
  ),
91
- ...u,
93
+ ...w,
92
94
  children: [
93
- /* @__PURE__ */ g(O, { origin: h[e] }),
94
- a
95
+ /* @__PURE__ */ g(j, { origin: x[e] }),
96
+ l
95
97
  ]
96
98
  }
97
99
  ) }) }),
@@ -99,7 +101,7 @@ function K({
99
101
  );
100
102
  }
101
103
  export {
102
- T as Popover,
103
- K as PopoverContent,
104
- W as PopoverTrigger
104
+ W as Popover,
105
+ N as PopoverContent,
106
+ K as PopoverTrigger
105
107
  };
@@ -1,32 +1,34 @@
1
1
  "use client";
2
- import { jsx as c, jsxs as g } from "react/jsx-runtime";
2
+ import { jsx as o, jsxs as v } from "react/jsx-runtime";
3
3
  import * as x from "react";
4
+ import { MotionConfig as w, motion as y } from "motion/react";
4
5
  import { cn as l } from "../lib/cn.js";
5
- const w = x.forwardRef(
6
+ import { springProgress as M } from "../lib/motion.js";
7
+ const N = x.forwardRef(
6
8
  ({
7
- className: f,
8
- value: m = 0,
9
- max: a = 100,
9
+ className: m,
10
+ value: f = 0,
11
+ max: e = 100,
10
12
  size: r = 40,
11
- strokeWidth: o = 4,
13
+ strokeWidth: i = 4,
12
14
  isIndeterminate: n = !1,
13
15
  label: d,
14
- ...u
16
+ ...p
15
17
  }, h) => {
16
- const i = Math.min(Math.max(m, 0), a), p = a > 0 ? i / a : 0, t = (r - o) / 2, s = 2 * Math.PI * t, v = n ? s * 0.75 : s * (1 - p), e = r / 2;
17
- return /* @__PURE__ */ c(
18
+ const c = Math.min(Math.max(f, 0), e), u = e > 0 ? c / e : 0, s = (r - i) / 2, t = 2 * Math.PI * s, g = n ? t * 0.75 : t * (1 - u), a = r / 2;
19
+ return /* @__PURE__ */ o(
18
20
  "div",
19
21
  {
20
22
  ref: h,
21
23
  role: "progressbar",
22
24
  "aria-label": d,
23
25
  "aria-valuemin": 0,
24
- "aria-valuemax": a,
25
- "aria-valuenow": n ? void 0 : i,
26
- className: l("inline-flex", f),
26
+ "aria-valuemax": e,
27
+ "aria-valuenow": n ? void 0 : c,
28
+ className: l("inline-flex", m),
27
29
  style: { width: r, height: r },
28
- ...u,
29
- children: /* @__PURE__ */ g(
30
+ ...p,
31
+ children: /* @__PURE__ */ v(
30
32
  "svg",
31
33
  {
32
34
  width: r,
@@ -34,34 +36,36 @@ const w = x.forwardRef(
34
36
  viewBox: `0 0 ${r} ${r}`,
35
37
  className: l(
36
38
  "-rotate-90",
37
- n && "animate-[ads-spin_var(--duration-spin)_linear_infinite]"
39
+ n && "animate-[ads-spin_800ms_linear_infinite]"
38
40
  ),
39
41
  children: [
40
- /* @__PURE__ */ c(
42
+ /* @__PURE__ */ o(
41
43
  "circle",
42
44
  {
43
45
  className: "stroke-muted",
44
46
  fill: "none",
45
- cx: e,
46
- cy: e,
47
- r: t,
48
- strokeWidth: o
47
+ cx: a,
48
+ cy: a,
49
+ r: s,
50
+ strokeWidth: i
49
51
  }
50
52
  ),
51
- /* @__PURE__ */ c(
52
- "circle",
53
+ /* @__PURE__ */ o(w, { reducedMotion: "user", children: /* @__PURE__ */ o(
54
+ y.circle,
53
55
  {
54
- className: "stroke-brand transition-[stroke-dashoffset] duration-(--duration-normal) ease-out motion-reduce:transition-none",
56
+ className: "stroke-brand",
55
57
  fill: "none",
56
- cx: e,
57
- cy: e,
58
- r: t,
59
- strokeWidth: o,
58
+ cx: a,
59
+ cy: a,
60
+ r: s,
61
+ strokeWidth: i,
60
62
  strokeLinecap: "round",
61
- strokeDasharray: s,
62
- strokeDashoffset: v
63
+ strokeDasharray: t,
64
+ initial: !1,
65
+ animate: { strokeDashoffset: g },
66
+ transition: M
63
67
  }
64
- )
68
+ ) })
65
69
  ]
66
70
  }
67
71
  )
@@ -69,7 +73,7 @@ const w = x.forwardRef(
69
73
  );
70
74
  }
71
75
  );
72
- w.displayName = "ProgressCircle";
76
+ N.displayName = "ProgressCircle";
73
77
  export {
74
- w as ProgressCircle
78
+ N as ProgressCircle
75
79
  };
@@ -1,8 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as r } from "react/jsx-runtime";
3
3
  import * as g from "react";
4
- import { cn as a } from "../lib/cn.js";
5
- const p = {
4
+ import { MotionConfig as p, motion as b } from "motion/react";
5
+ import { cn as i } from "../lib/cn.js";
6
+ import { springProgress as v } from "../lib/motion.js";
7
+ const h = {
6
8
  sm: "h-1.5",
7
9
  md: "h-2"
8
10
  }, s = {
@@ -11,18 +13,18 @@ const p = {
11
13
  warning: "bg-warning",
12
14
  danger: "bg-danger",
13
15
  info: "bg-info"
14
- }, b = g.forwardRef(
16
+ }, w = g.forwardRef(
15
17
  ({
16
18
  className: l,
17
19
  value: t = 0,
18
20
  max: e = 100,
19
- isIndeterminate: n = !1,
21
+ isIndeterminate: a = !1,
20
22
  size: d = "md",
21
- color: i = "primary",
23
+ color: n = "primary",
22
24
  label: m,
23
- ...u
25
+ ...f
24
26
  }, c) => {
25
- const o = Math.min(Math.max(t, 0), e), f = e > 0 ? o / e * 100 : 0;
27
+ const o = Math.min(Math.max(t, 0), e), u = e > 0 ? o / e * 100 : 0;
26
28
  return /* @__PURE__ */ r(
27
29
  "div",
28
30
  {
@@ -31,36 +33,38 @@ const p = {
31
33
  "aria-label": m,
32
34
  "aria-valuemin": 0,
33
35
  "aria-valuemax": e,
34
- "aria-valuenow": n ? void 0 : o,
35
- className: a(
36
+ "aria-valuenow": a ? void 0 : o,
37
+ className: i(
36
38
  "relative w-full overflow-hidden rounded-full bg-muted",
37
- p[d],
39
+ h[d],
38
40
  l
39
41
  ),
40
- ...u,
41
- children: n ? /* @__PURE__ */ r(
42
+ ...f,
43
+ children: a ? /* @__PURE__ */ r(
42
44
  "div",
43
45
  {
44
- className: a(
45
- "absolute inset-y-0 left-0 w-2/5 rounded-full animate-[ads-indeterminate_var(--duration-pulse)_linear_infinite] motion-reduce:animate-none",
46
- s[i]
46
+ className: i(
47
+ "absolute inset-y-0 left-0 w-2/5 rounded-full animate-[ads-indeterminate_1.5s_linear_infinite] motion-reduce:animate-none",
48
+ s[n]
47
49
  )
48
50
  }
49
- ) : /* @__PURE__ */ r(
50
- "div",
51
+ ) : /* @__PURE__ */ r(p, { reducedMotion: "user", children: /* @__PURE__ */ r(
52
+ b.div,
51
53
  {
52
- className: a(
53
- "h-full w-full origin-left rounded-full transition-transform duration-(--duration-normal) ease-out motion-reduce:transition-none",
54
- s[i]
54
+ className: i(
55
+ "h-full w-full origin-left rounded-full",
56
+ s[n]
55
57
  ),
56
- style: { transform: `scaleX(${f / 100})` }
58
+ initial: !1,
59
+ animate: { scaleX: u / 100 },
60
+ transition: v
57
61
  }
58
- )
62
+ ) })
59
63
  }
60
64
  );
61
65
  }
62
66
  );
63
- b.displayName = "Progress";
67
+ w.displayName = "Progress";
64
68
  export {
65
- b as Progress
69
+ w as Progress
66
70
  };
@@ -1,101 +1,111 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as b } from "react/jsx-runtime";
2
+ import { jsx as r, jsxs as R } from "react/jsx-runtime";
3
3
  import * as i from "react";
4
- import { cn as p } from "../lib/cn.js";
5
- import { Field as x } from "./field.js";
6
- const f = i.createContext(null), y = i.forwardRef(
4
+ import { MotionConfig as v, motion as y } from "motion/react";
5
+ import { cn as b } from "../lib/cn.js";
6
+ import { Field as N } from "./field.js";
7
+ import { springRadio as w } from "../lib/motion.js";
8
+ const x = i.createContext(null), k = i.forwardRef(
7
9
  ({
8
- className: l,
9
- name: a,
10
+ className: d,
11
+ name: n,
10
12
  value: o,
11
- onChange: n,
12
- label: c,
13
- description: u,
14
- error: e,
15
- orientation: s = "vertical",
16
- disabled: t,
17
- children: d,
18
- ...m
19
- }, g) => {
20
- const h = i.useMemo(
21
- () => ({ name: a, value: o, onValueChange: n, disabled: t }),
22
- [a, o, n, t]
13
+ onChange: t,
14
+ label: a,
15
+ description: c,
16
+ error: u,
17
+ orientation: p = "vertical",
18
+ disabled: e,
19
+ children: s,
20
+ ...l
21
+ }, f) => {
22
+ const m = i.useMemo(
23
+ () => ({ name: n, value: o, onValueChange: t, disabled: e }),
24
+ [n, o, t, e]
23
25
  );
24
26
  return /* @__PURE__ */ r(
25
- x,
27
+ N,
26
28
  {
27
- ref: g,
28
- label: c,
29
- description: u,
30
- error: e,
29
+ ref: f,
30
+ label: a,
31
+ description: c,
32
+ error: u,
31
33
  role: "radiogroup",
32
- className: l,
33
- ...m,
34
- children: /* @__PURE__ */ r(f.Provider, { value: h, children: /* @__PURE__ */ r(
34
+ className: d,
35
+ ...l,
36
+ children: /* @__PURE__ */ r(x.Provider, { value: m, children: /* @__PURE__ */ r(
35
37
  "div",
36
38
  {
37
- className: p(
39
+ className: b(
38
40
  "flex gap-3",
39
- s === "vertical" ? "flex-col" : "flex-row flex-wrap"
41
+ p === "vertical" ? "flex-col" : "flex-row flex-wrap"
40
42
  ),
41
- children: d
43
+ children: s
42
44
  }
43
45
  ) })
44
46
  }
45
47
  );
46
48
  }
47
49
  );
48
- y.displayName = "RadioGroup";
49
- const R = i.forwardRef(
50
- ({ className: l, children: a, value: o, disabled: n, ...c }, u) => {
51
- const e = i.useContext(f), s = n || (e == null ? void 0 : e.disabled);
52
- return /* @__PURE__ */ b(
50
+ k.displayName = "RadioGroup";
51
+ const j = i.forwardRef(
52
+ ({ className: d, children: n, value: o, disabled: t, checked: a, defaultChecked: c, ...u }, p) => {
53
+ const e = i.useContext(x), s = t || (e == null ? void 0 : e.disabled), l = a !== void 0, [f, m] = i.useState(!!c), g = e ? e.value === o : l ? a : f;
54
+ return /* @__PURE__ */ R(
53
55
  "label",
54
56
  {
55
- className: p(
57
+ className: b(
56
58
  "group inline-flex items-center gap-2 text-xs text-foreground select-none",
57
59
  s ? "cursor-not-allowed opacity-50" : "cursor-pointer",
58
- l
60
+ d
59
61
  ),
60
62
  children: [
61
63
  /* @__PURE__ */ r(
62
64
  "input",
63
65
  {
64
- ref: u,
66
+ ref: p,
65
67
  type: "radio",
66
68
  name: e == null ? void 0 : e.name,
67
69
  value: o,
68
- checked: e ? e.value === o : void 0,
70
+ checked: g,
69
71
  disabled: s,
70
- onChange: (t) => {
71
- var d;
72
- t.target.checked && ((d = e == null ? void 0 : e.onValueChange) == null || d.call(e, o));
72
+ onChange: (C) => {
73
+ var h;
74
+ C.target.checked && (e ? (h = e.onValueChange) == null || h.call(e, o) : l || m(!0));
73
75
  },
74
76
  className: "peer sr-only",
75
- ...c
77
+ ...u
76
78
  }
77
79
  ),
78
80
  /* @__PURE__ */ r(
79
81
  "span",
80
82
  {
81
83
  "aria-hidden": !0,
82
- className: p(
84
+ className: b(
83
85
  "flex size-4.5 shrink-0 items-center justify-center rounded-full border border-input bg-elevated",
84
- "transition-[border-color,box-shadow] duration-(--duration-fast) ease-out",
86
+ "transition-[border-color,box-shadow] duration-150 ease-out",
85
87
  "peer-checked:border-brand",
86
88
  "peer-focus-visible:ring-3 peer-focus-visible:ring-ring"
87
89
  ),
88
- children: /* @__PURE__ */ r("span", { className: "size-2 scale-90 rounded-full bg-brand opacity-0 transition-[opacity,transform] duration-(--duration-fast) ease-out group-has-[:checked]:scale-100 group-has-[:checked]:opacity-100 motion-reduce:transition-none" })
90
+ children: /* @__PURE__ */ r(v, { reducedMotion: "user", children: /* @__PURE__ */ r(
91
+ y.span,
92
+ {
93
+ className: "size-2 rounded-full bg-brand",
94
+ initial: !1,
95
+ animate: { opacity: g ? 1 : 0, scale: g ? 1 : 0.9 },
96
+ transition: w
97
+ }
98
+ ) })
89
99
  }
90
100
  ),
91
- a && /* @__PURE__ */ r("span", { children: a })
101
+ n && /* @__PURE__ */ r("span", { children: n })
92
102
  ]
93
103
  }
94
104
  );
95
105
  }
96
106
  );
97
- R.displayName = "Radio";
107
+ j.displayName = "Radio";
98
108
  export {
99
- R as Radio,
100
- y as RadioGroup
109
+ j as Radio,
110
+ k as RadioGroup
101
111
  };
@@ -83,7 +83,7 @@ const H = t.forwardRef(
83
83
  "aria-hidden": !0,
84
84
  className: f(
85
85
  "my-3 w-px rounded-full bg-transparent",
86
- "transition-colors duration-(--duration-fast) ease-out motion-reduce:transition-none",
86
+ "transition-colors duration-150 ease-out motion-reduce:transition-none",
87
87
  "group-hover/resize:bg-border-strong group-focus-visible/resize:bg-ring",
88
88
  c && "bg-ring"
89
89
  )
@@ -5,8 +5,8 @@ import { ComponentProps } from 'react';
5
5
  * arrives in hierarchy: shells rise, labels and values ink in, visualizations
6
6
  * draw left to right — each slot offset by a shared stagger step.
7
7
  *
8
- * Pure CSS animations (off the main thread), tokens for easing, and a
9
- * reduced-motion fallback that keeps only the fade. Durations are deliberate:
8
+ * Pure CSS animations (off the main thread) with a reduced-motion fallback
9
+ * that keeps only the fade. Durations are deliberate:
10
10
  * data drawing is explanatory motion, so the wipe may breathe past the <300ms
11
11
  * UI-chrome rule; interactive chrome must never use these classes.
12
12
  */
@@ -11,9 +11,9 @@
11
11
  *
12
12
  * It is an absolute, `pointer-events-none`, `z-0` layer clipped to the panel
13
13
  * radius (`rounded-[inherit]`), so it sits under the content and never
14
- * intercepts input. All timing/curve/tint come from tokens (`--ripple-*`,
15
- * `--ease-out`); reduced-motion drops it entirely. Remount it (via `key`) to
16
- * replay on each open.
14
+ * intercepts input. Its one-off duration is local; the origin and tint use
15
+ * `--ripple-*` visual variables. Reduced motion drops it entirely. Remount it
16
+ * (via `key`) to replay on each open.
17
17
  */
18
18
  export interface RippleProps {
19
19
  /**
@@ -1,41 +1,42 @@
1
1
  "use client";
2
- import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
+ import { jsxs as m, jsx as o } from "react/jsx-runtime";
3
3
  import * as i from "react";
4
4
  import { ScrollArea as e } from "radix-ui";
5
- import { cn as s } from "../lib/cn.js";
6
- const m = i.forwardRef(
7
- ({ className: a, children: l, orientation: r = "vertical", viewportClassName: t, ...n }, d) => /* @__PURE__ */ f(
5
+ import { cn as c } from "../lib/cn.js";
6
+ const f = i.forwardRef(
7
+ ({ className: a, children: l, orientation: r = "vertical", viewportClassName: t, ...n }, d) => /* @__PURE__ */ m(
8
8
  e.Root,
9
9
  {
10
10
  ref: d,
11
11
  "data-slot": "scroll-area",
12
- className: s("relative overflow-hidden border border-border", a),
12
+ className: c("relative overflow-hidden border border-border", a),
13
13
  ...n,
14
14
  children: [
15
15
  /* @__PURE__ */ o(
16
16
  e.Viewport,
17
17
  {
18
- className: s("size-full rounded-[inherit]", t),
18
+ tabIndex: 0,
19
+ className: c("size-full rounded-[inherit]", t),
19
20
  children: l
20
21
  }
21
22
  ),
22
- (r === "vertical" || r === "both") && /* @__PURE__ */ o(c, { orientation: "vertical" }),
23
- (r === "horizontal" || r === "both") && /* @__PURE__ */ o(c, { orientation: "horizontal" }),
23
+ (r === "vertical" || r === "both") && /* @__PURE__ */ o(s, { orientation: "vertical" }),
24
+ (r === "horizontal" || r === "both") && /* @__PURE__ */ o(s, { orientation: "horizontal" }),
24
25
  /* @__PURE__ */ o(e.Corner, {})
25
26
  ]
26
27
  }
27
28
  )
28
29
  );
29
- m.displayName = "ScrollArea";
30
- const c = i.forwardRef(({ className: a, orientation: l = "vertical", ...r }, t) => /* @__PURE__ */ o(
30
+ f.displayName = "ScrollArea";
31
+ const s = i.forwardRef(({ className: a, orientation: l = "vertical", ...r }, t) => /* @__PURE__ */ o(
31
32
  e.ScrollAreaScrollbar,
32
33
  {
33
34
  ref: t,
34
35
  orientation: l,
35
36
  "data-slot": "scroll-bar",
36
- className: s(
37
+ className: c(
37
38
  "flex touch-none select-none p-0.5",
38
- "transition-colors duration-(--duration-fast) ease-out motion-reduce:transition-none",
39
+ "transition-colors duration-150 ease-out motion-reduce:transition-none",
39
40
  l === "vertical" && "h-full w-2.5",
40
41
  l === "horizontal" && "h-2.5 flex-col",
41
42
  a
@@ -45,13 +46,13 @@ const c = i.forwardRef(({ className: a, orientation: l = "vertical", ...r }, t)
45
46
  e.ScrollAreaThumb,
46
47
  {
47
48
  "data-slot": "scroll-bar-thumb",
48
- className: "relative flex-1 rounded-full bg-fill transition-colors duration-(--duration-fast) ease-out hover:bg-border-strong motion-reduce:transition-none"
49
+ className: "relative flex-1 rounded-full bg-fill transition-colors duration-150 ease-out hover:bg-border-strong motion-reduce:transition-none"
49
50
  }
50
51
  )
51
52
  }
52
53
  ));
53
- c.displayName = "ScrollBar";
54
+ s.displayName = "ScrollBar";
54
55
  export {
55
- m as ScrollArea,
56
- c as ScrollBar
56
+ f as ScrollArea,
57
+ s as ScrollBar
57
58
  };