@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
@@ -4,8 +4,11 @@ declare const segmentedListVariants: (props?: ({
4
4
  size?: "sm" | "md" | "lg" | null | undefined;
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
6
  export interface SegmentedOption {
7
- label: string;
7
+ /** Visible option content — text or an icon element. */
8
+ label: React.ReactNode;
8
9
  value: string;
10
+ /** Accessible name; required when `label` is icon-only. */
11
+ ariaLabel?: string;
9
12
  }
10
13
  export interface SegmentedControlProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "role">, VariantProps<typeof segmentedListVariants> {
11
14
  options: SegmentedOption[];
@@ -1,40 +1,40 @@
1
1
  "use client";
2
- import { jsx as n, jsxs as b } from "react/jsx-runtime";
3
- import * as l from "react";
2
+ import { jsx as n, jsxs as x } from "react/jsx-runtime";
3
+ import * as d from "react";
4
4
  import { MotionConfig as h, motion as v } from "motion/react";
5
- import { cva as d } from "class-variance-authority";
5
+ import { cva as l } from "class-variance-authority";
6
6
  import { cn as c } from "../lib/cn.js";
7
- import { EASE_OUT as w } from "../lib/motion.js";
8
- const y = d(
7
+ import { springControl as w } from "../lib/motion.js";
8
+ const y = l(
9
9
  // Borderless recessed track on ink-200 (bg-surface) — matches the Tabs
10
- // primary track (the pill provides the definition; a stroke around the
10
+ // primary track (the selected segment provides the definition; a stroke around the
11
11
  // track read as a second, heavier control).
12
- "inline-flex items-center gap-1 rounded-full bg-surface p-1",
12
+ "inline-flex items-center gap-1 bg-surface p-1",
13
13
  {
14
14
  variants: {
15
15
  size: {
16
- sm: "text-xs",
17
- md: "text-xs",
18
- lg: "text-base"
16
+ sm: "rounded-sm text-xs",
17
+ md: "rounded-md text-xs",
18
+ lg: "rounded-md text-base"
19
19
  }
20
20
  },
21
21
  defaultVariants: { size: "md" }
22
22
  }
23
- ), D = d(
23
+ ), D = l(
24
24
  c(
25
- // The active pill is a shared motion thumb that SLIDES between options
25
+ // The active segment is a shared motion thumb that SLIDES between options
26
26
  // (layoutId), so the option itself only carries text color.
27
- "relative inline-flex items-center justify-center whitespace-nowrap rounded-full font-normal select-none",
28
- "transition-colors duration-(--duration-fast) cursor-pointer",
27
+ "relative inline-flex items-center justify-center whitespace-nowrap font-normal select-none",
28
+ "transition-colors duration-150 cursor-pointer",
29
29
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
30
30
  "disabled:pointer-events-none disabled:opacity-50"
31
31
  ),
32
32
  {
33
33
  variants: {
34
34
  size: {
35
- sm: "h-6 px-2.5",
36
- md: "h-8 px-3",
37
- lg: "h-9 px-4"
35
+ sm: "h-6 rounded-sm px-2.5",
36
+ md: "h-8 rounded-md px-3",
37
+ lg: "h-9 rounded-md px-4"
38
38
  },
39
39
  selected: {
40
40
  true: "text-foreground",
@@ -43,9 +43,9 @@ const y = d(
43
43
  },
44
44
  defaultVariants: { size: "md", selected: !1 }
45
45
  }
46
- ), k = l.forwardRef(({ options: r, value: a, onChange: o, size: s, className: u, ...m }, f) => {
47
- const p = l.useId(), i = (e) => {
48
- const t = r.findIndex((x) => x.value === a), g = ((t < 0 ? 0 : t) + e + r.length) % r.length;
46
+ ), k = d.forwardRef(({ options: r, value: a, onChange: o, size: s, className: m, ...u }, f) => {
47
+ const p = d.useId(), i = (e) => {
48
+ const t = r.findIndex((b) => b.value === a), g = ((t < 0 ? 0 : t) + e + r.length) % r.length;
49
49
  o(r[g].value);
50
50
  };
51
51
  return /* @__PURE__ */ n(
@@ -65,16 +65,17 @@ const y = d(
65
65
  break;
66
66
  }
67
67
  },
68
- className: c(y({ size: s }), u),
69
- ...m,
68
+ className: c(y({ size: s }), m),
69
+ ...u,
70
70
  children: /* @__PURE__ */ n(h, { reducedMotion: "user", children: r.map((e) => {
71
71
  const t = e.value === a;
72
- return /* @__PURE__ */ b(
72
+ return /* @__PURE__ */ x(
73
73
  "button",
74
74
  {
75
75
  type: "button",
76
76
  role: "radio",
77
77
  "aria-checked": t,
78
+ "aria-label": e.ariaLabel,
78
79
  tabIndex: t ? 0 : -1,
79
80
  onClick: () => o(e.value),
80
81
  className: D({ size: s, selected: t }),
@@ -85,8 +86,8 @@ const y = d(
85
86
  layoutId: p,
86
87
  "aria-hidden": !0,
87
88
  layoutDependency: a,
88
- transition: { duration: 0.2, ease: w },
89
- className: "absolute inset-0 rounded-full bg-elevated shadow-elevation"
89
+ transition: w,
90
+ className: "absolute inset-0 rounded-[inherit] bg-elevated shadow-elevation"
90
91
  }
91
92
  ),
92
93
  /* @__PURE__ */ n("span", { className: "relative", children: e.label })
@@ -17,6 +17,8 @@ export interface SelectProps extends VariantProps<typeof selectTriggerVariants>
17
17
  isInvalid?: boolean;
18
18
  className?: string;
19
19
  id?: string;
20
+ "aria-label"?: string;
21
+ "aria-describedby"?: string;
20
22
  /**
21
23
  * Which side the listbox opens toward. Use `"top"` when the trigger sits
22
24
  * at the bottom of a clipped container (e.g. a table footer inside an
@@ -1,107 +1,111 @@
1
1
  "use client";
2
- import { jsxs as m, jsx as i } from "react/jsx-runtime";
3
- import * as s from "react";
4
- import { cva as j } from "class-variance-authority";
5
- import { MotionConfig as M, AnimatePresence as V, motion as $ } from "motion/react";
6
- import { ChevronDown as C, Check as K } from "../lib/icons.js";
2
+ import { jsxs as b, jsx as i } from "react/jsx-runtime";
3
+ import * as a from "react";
4
+ import { cva as V } from "class-variance-authority";
5
+ import { MotionConfig as $, AnimatePresence as C, motion as K } from "motion/react";
6
+ import { ChevronDown as L, Check as O } from "../lib/icons.js";
7
7
  import { cn as d } from "../lib/cn.js";
8
- import { inputBaseClass as L } from "./field.js";
9
- import { floatVariants as O } from "../lib/motion.js";
10
- import { Ripple as P } from "./ripple.js";
11
- const T = j(
8
+ import { inputBaseClass as P } from "./field.js";
9
+ import { floatVariants as T } from "../lib/motion.js";
10
+ import { Ripple as _ } from "./ripple.js";
11
+ const B = V(
12
12
  d(
13
- L,
13
+ P,
14
14
  "items-center justify-between gap-2 text-left cursor-pointer",
15
15
  "[&_svg]:pointer-events-none [&_svg]:shrink-0"
16
16
  ),
17
17
  {
18
18
  variants: {
19
19
  size: {
20
- sm: "h-8 text-xs",
21
- md: "h-10 text-xs",
22
- lg: "h-11 text-base"
20
+ sm: "h-8 rounded-sm text-xs",
21
+ md: "h-10 rounded-md text-xs",
22
+ lg: "h-11 rounded-md text-base"
23
23
  }
24
24
  },
25
25
  defaultVariants: { size: "md" }
26
26
  }
27
- ), _ = s.forwardRef(
27
+ ), U = a.forwardRef(
28
28
  ({
29
- items: r,
29
+ items: o,
30
30
  value: c,
31
- onChange: b,
31
+ onChange: m,
32
32
  placeholder: I = "Select…",
33
33
  size: N,
34
34
  disabled: w,
35
35
  isInvalid: E,
36
36
  className: R,
37
37
  id: A,
38
- placement: v = "bottom"
39
- }, S) => {
40
- const [o, l] = s.useState(!1), [a, x] = s.useState(-1), g = s.useRef(null), k = s.useRef(null), u = s.useId(), h = r.find((e) => e.value === c), z = s.useCallback(() => {
41
- const e = r.findIndex((t) => t.value === c);
42
- return e >= 0 && !r[e].disabled ? e : r.findIndex((t) => !t.disabled);
43
- }, [r, c]);
44
- s.useEffect(() => {
45
- if (!o) return;
38
+ placement: v = "bottom",
39
+ "aria-label": S,
40
+ "aria-describedby": z
41
+ }, j) => {
42
+ const [r, l] = a.useState(!1), [s, x] = a.useState(-1), g = a.useRef(null), k = a.useRef(null), u = a.useId(), h = o.find((e) => e.value === c), M = a.useCallback(() => {
43
+ const e = o.findIndex((t) => t.value === c);
44
+ return e >= 0 && !o[e].disabled ? e : o.findIndex((t) => !t.disabled);
45
+ }, [o, c]);
46
+ a.useEffect(() => {
47
+ if (!r) return;
46
48
  const e = (t) => {
47
49
  var n;
48
50
  (n = g.current) != null && n.contains(t.target) || l(!1);
49
51
  };
50
52
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
51
- }, [o]), s.useEffect(() => {
53
+ }, [r]), a.useEffect(() => {
52
54
  var t;
53
- if (!o || a < 0) return;
54
- const e = (t = k.current) == null ? void 0 : t.children[a];
55
+ if (!r || s < 0) return;
56
+ const e = (t = k.current) == null ? void 0 : t.children[s];
55
57
  e == null || e.scrollIntoView({ block: "nearest" });
56
- }, [o, a]);
58
+ }, [r, s]);
57
59
  const f = () => {
58
- w || (x(z()), l(!0));
60
+ w || (x(M()), l(!0));
59
61
  }, y = (e) => {
60
62
  x((t) => {
61
63
  let n = t;
62
- for (let p = 0; p < r.length; p++)
63
- if (n = (n + e + r.length) % r.length, !r[n].disabled) return n;
64
+ for (let p = 0; p < o.length; p++)
65
+ if (n = (n + e + o.length) % o.length, !o[n].disabled) return n;
64
66
  return t;
65
67
  });
66
68
  }, D = (e) => {
67
- const t = r[e];
68
- !t || t.disabled || (b == null || b(t.value), l(!1));
69
+ const t = o[e];
70
+ !t || t.disabled || (m == null || m(t.value), l(!1));
69
71
  };
70
- return /* @__PURE__ */ m("div", { ref: g, className: "relative", children: [
71
- /* @__PURE__ */ m(
72
+ return /* @__PURE__ */ b("div", { ref: g, className: "relative", children: [
73
+ /* @__PURE__ */ b(
72
74
  "button",
73
75
  {
74
- ref: S,
76
+ ref: j,
75
77
  id: A,
76
78
  type: "button",
77
79
  role: "combobox",
78
80
  "aria-haspopup": "listbox",
79
- "aria-expanded": o,
81
+ "aria-expanded": r,
80
82
  "aria-controls": u,
81
83
  "aria-invalid": E || void 0,
84
+ "aria-label": S,
85
+ "aria-describedby": z,
82
86
  disabled: w,
83
- onClick: () => o ? l(!1) : f(),
87
+ onClick: () => r ? l(!1) : f(),
84
88
  onKeyDown: (e) => {
85
89
  switch (e.key) {
86
90
  case "ArrowDown":
87
- e.preventDefault(), o ? y(1) : f();
91
+ e.preventDefault(), r ? y(1) : f();
88
92
  break;
89
93
  case "ArrowUp":
90
- e.preventDefault(), o ? y(-1) : f();
94
+ e.preventDefault(), r ? y(-1) : f();
91
95
  break;
92
96
  case "Enter":
93
97
  case " ":
94
- e.preventDefault(), o ? D(a) : f();
98
+ e.preventDefault(), r ? D(s) : f();
95
99
  break;
96
100
  case "Escape":
97
- o && (e.preventDefault(), l(!1));
101
+ r && (e.preventDefault(), l(!1));
98
102
  break;
99
103
  case "Tab":
100
104
  l(!1);
101
105
  break;
102
106
  }
103
107
  },
104
- className: d(T({ size: N }), R),
108
+ className: d(B({ size: N }), R),
105
109
  children: [
106
110
  /* @__PURE__ */ i(
107
111
  "span",
@@ -114,11 +118,11 @@ const T = j(
114
118
  }
115
119
  ),
116
120
  /* @__PURE__ */ i(
117
- C,
121
+ L,
118
122
  {
119
123
  className: d(
120
- "size-4 text-muted-foreground transition-transform duration-(--duration-fast) ease-out motion-reduce:transition-none",
121
- o && "rotate-180"
124
+ "size-4 text-muted-foreground transition-transform duration-150 ease-out motion-reduce:transition-none",
125
+ r && "rotate-180"
122
126
  ),
123
127
  "aria-hidden": !0
124
128
  }
@@ -126,14 +130,14 @@ const T = j(
126
130
  ]
127
131
  }
128
132
  ),
129
- /* @__PURE__ */ i(M, { reducedMotion: "user", children: /* @__PURE__ */ i(V, { children: o && /* @__PURE__ */ m(
130
- $.ul,
133
+ /* @__PURE__ */ i($, { reducedMotion: "user", children: /* @__PURE__ */ i(C, { children: r && /* @__PURE__ */ b(
134
+ K.ul,
131
135
  {
132
136
  ref: k,
133
137
  id: u,
134
138
  role: "listbox",
135
- "aria-activedescendant": a >= 0 ? `${u}-opt-${a}` : void 0,
136
- variants: O,
139
+ "aria-activedescendant": s >= 0 ? `${u}-opt-${s}` : void 0,
140
+ variants: T,
137
141
  initial: "hidden",
138
142
  animate: "visible",
139
143
  exit: "hidden",
@@ -146,10 +150,10 @@ const T = j(
146
150
  v === "top" ? "bottom-full mb-1.5" : "top-full mt-1.5"
147
151
  ),
148
152
  children: [
149
- /* @__PURE__ */ i(P, { origin: v === "top" ? "bottom" : "top" }),
150
- r.map((e, t) => {
151
- const n = e.value === c, p = t === a;
152
- return /* @__PURE__ */ m(
153
+ /* @__PURE__ */ i(_, { origin: v === "top" ? "bottom" : "top" }),
154
+ o.map((e, t) => {
155
+ const n = e.value === c, p = t === s;
156
+ return /* @__PURE__ */ b(
153
157
  "li",
154
158
  {
155
159
  id: `${u}-opt-${t}`,
@@ -166,7 +170,7 @@ const T = j(
166
170
  ),
167
171
  children: [
168
172
  /* @__PURE__ */ i("span", { className: "truncate", children: e.label }),
169
- n && /* @__PURE__ */ i(K, { className: "size-4 shrink-0", "aria-hidden": !0 })
173
+ n && /* @__PURE__ */ i(O, { className: "size-4 shrink-0", "aria-hidden": !0 })
170
174
  ]
171
175
  },
172
176
  e.value
@@ -178,7 +182,7 @@ const T = j(
178
182
  ] });
179
183
  }
180
184
  );
181
- _.displayName = "Select";
185
+ U.displayName = "Select";
182
186
  export {
183
- _ as Select
187
+ U as Select
184
188
  };
@@ -1,61 +1,64 @@
1
1
  "use client";
2
- import { jsxs as c, jsx as s } from "react/jsx-runtime";
3
- import * as f from "react";
2
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
3
+ import * as d from "react";
4
4
  import { cva as g } from "class-variance-authority";
5
- import { cn as o } from "../lib/cn.js";
6
- const x = g(
5
+ import { cn as a } from "../lib/cn.js";
6
+ const p = g(
7
7
  "flex w-full items-center gap-3 rounded-lg bg-card px-4 py-3 text-left",
8
8
  {
9
9
  variants: {
10
10
  isPressable: {
11
- true: o(
12
- "cursor-pointer outline-none",
13
- "transition-[background-color,transform] duration-(--duration-fast) ease-out",
14
- "hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring",
15
- "active:scale-(--scale-press) motion-reduce:transition-none"
16
- ),
11
+ true: "relative",
17
12
  false: ""
18
13
  }
19
14
  },
20
15
  defaultVariants: { isPressable: !1 }
21
16
  }
22
- ), p = f.forwardRef(
23
- ({ className: r, icon: i, label: n, description: l, action: d, onSelect: e, ...m }, u) => {
24
- const a = !!e;
17
+ ), x = d.forwardRef(
18
+ ({ className: i, icon: s, label: t, description: n, action: r, onSelect: o, ...f }, m) => {
19
+ const l = !!o;
25
20
  return /* @__PURE__ */ c(
26
21
  "div",
27
22
  {
28
- ref: u,
23
+ ref: m,
29
24
  "data-slot": "setting-row",
30
- role: a ? "button" : void 0,
31
- tabIndex: a ? 0 : void 0,
32
- onClick: e,
33
- onKeyDown: a ? (t) => {
34
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), e == null || e());
35
- } : void 0,
36
- className: o(x({ isPressable: a }), r),
37
- ...m,
25
+ className: a(p({ isPressable: l }), i),
26
+ ...f,
38
27
  children: [
39
- i && /* @__PURE__ */ s(
28
+ l && /* @__PURE__ */ e(
29
+ "button",
30
+ {
31
+ type: "button",
32
+ "aria-label": typeof t == "string" ? t : "Open setting",
33
+ onClick: o,
34
+ className: a(
35
+ "absolute inset-0 rounded-lg outline-none",
36
+ "transition-[background-color,transform] duration-150 ease-out",
37
+ "hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring",
38
+ "active:scale-[0.97] motion-reduce:transition-none"
39
+ )
40
+ }
41
+ ),
42
+ s && /* @__PURE__ */ e(
40
43
  "span",
41
44
  {
42
45
  "aria-hidden": !0,
43
- className: "flex size-5 shrink-0 items-center justify-center text-tertiary [&>svg]:size-4.5",
44
- children: i
46
+ className: "relative z-10 flex size-5 shrink-0 items-center justify-center text-tertiary pointer-events-none [&>svg]:size-4.5",
47
+ children: s
45
48
  }
46
49
  ),
47
- /* @__PURE__ */ c("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
48
- /* @__PURE__ */ s("div", { className: "min-w-0 truncate text-base text-foreground", children: n }),
49
- l && /* @__PURE__ */ s("div", { className: "min-w-0 text-xs text-tertiary", children: l })
50
+ /* @__PURE__ */ c("div", { className: "relative z-10 flex min-w-0 flex-1 flex-col gap-0.5 pointer-events-none", children: [
51
+ /* @__PURE__ */ e("div", { className: "min-w-0 truncate text-base text-foreground", children: t }),
52
+ n && /* @__PURE__ */ e("div", { className: "min-w-0 text-xs text-tertiary", children: n })
50
53
  ] }),
51
- d && // The trailing control owns its own click — a pressable row must not
54
+ r && // The trailing control owns its own click — a pressable row must not
52
55
  // also fire when the reader aims at the button inside it.
53
- /* @__PURE__ */ s(
56
+ /* @__PURE__ */ e(
54
57
  "span",
55
58
  {
56
- className: "shrink-0",
57
- onClick: (t) => t.stopPropagation(),
58
- children: d
59
+ className: "relative z-20 shrink-0",
60
+ onClick: (u) => u.stopPropagation(),
61
+ children: r
59
62
  }
60
63
  )
61
64
  ]
@@ -63,24 +66,24 @@ const x = g(
63
66
  );
64
67
  }
65
68
  );
66
- p.displayName = "SettingRow";
67
- const v = f.forwardRef(
68
- ({ className: r, ...i }, n) => /* @__PURE__ */ s(
69
+ x.displayName = "SettingRow";
70
+ const v = d.forwardRef(
71
+ ({ className: i, ...s }, t) => /* @__PURE__ */ e(
69
72
  "div",
70
73
  {
71
- ref: n,
74
+ ref: t,
72
75
  "data-slot": "setting-list",
73
- className: o(
76
+ className: a(
74
77
  "flex w-full flex-col gap-0.5 rounded-xl bg-surface p-1",
75
- r
78
+ i
76
79
  ),
77
- ...i
80
+ ...s
78
81
  }
79
82
  )
80
83
  );
81
84
  v.displayName = "SettingList";
82
85
  export {
83
86
  v as SettingList,
84
- p as SettingRow,
85
- x as settingRowVariants
87
+ x as SettingRow,
88
+ p as settingRowVariants
86
89
  };
@@ -79,8 +79,8 @@ export interface SidebarActionProps extends React.ButtonHTMLAttributes<HTMLButto
79
79
  icon?: React.ReactNode;
80
80
  }
81
81
  /**
82
- * Primary action for the rail (e.g. "Ask …"). An elevated, subtly-stroked pill
83
- * that collapses to a centered square icon button.
82
+ * Primary action for the rail (e.g. "Ask …"). It shares the quiet navigation
83
+ * treatment at rest and collapses to a centered square icon button.
84
84
  */
85
85
  export declare const SidebarAction: React.ForwardRefExoticComponent<SidebarActionProps & React.RefAttributes<HTMLButtonElement>>;
86
86
  export interface SidebarHistoryProps extends React.HTMLAttributes<HTMLDivElement> {