@actioneer/ads 0.5.7 → 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 (140) 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 +133 -120
  5. package/components/ai-elements/chain-of-thought.d.ts +1 -1
  6. package/components/ai-elements/chain-of-thought.js +108 -108
  7. package/components/ai-elements/chart.js +16 -14
  8. package/components/ai-elements/inline-citation.js +41 -41
  9. package/components/ai-elements/message.js +4 -4
  10. package/components/ai-elements/queue.js +7 -7
  11. package/components/ai-elements/research-activity.js +114 -114
  12. package/components/ai-elements/shimmer.d.ts +2 -2
  13. package/components/ai-elements/speech-input.js +28 -28
  14. package/components/ai-elements/task-progress.js +26 -16
  15. package/components/ai-elements/task.js +17 -17
  16. package/components/ai-elements/tool.js +6 -6
  17. package/components/ai-elements/transcript.js +6 -5
  18. package/components/ai-elements/voice.js +1 -1
  19. package/components/alert.js +10 -10
  20. package/components/answer-sources.js +1 -1
  21. package/components/answer.js +115 -114
  22. package/components/assistant-ui/action-bar.js +94 -48
  23. package/components/assistant-ui/attachment.js +103 -75
  24. package/components/assistant-ui/badge.d.ts +1 -1
  25. package/components/assistant-ui/badge.js +17 -17
  26. package/components/assistant-ui/chain-of-thought.d.ts +1 -1
  27. package/components/assistant-ui/composer-add-context.js +9 -9
  28. package/components/assistant-ui/composer-deep-research.js +5 -5
  29. package/components/assistant-ui/composer-harness.js +11 -9
  30. package/components/assistant-ui/composer-trigger-popover.js +45 -34
  31. package/components/assistant-ui/composer.js +59 -59
  32. package/components/assistant-ui/error.js +14 -14
  33. package/components/assistant-ui/file.d.ts +1 -1
  34. package/components/assistant-ui/image.d.ts +1 -1
  35. package/components/assistant-ui/image.js +113 -103
  36. package/components/assistant-ui/markdown-text.js +18 -18
  37. package/components/assistant-ui/message.js +46 -45
  38. package/components/assistant-ui/quote.js +1 -1
  39. package/components/assistant-ui/reasoning.d.ts +1 -1
  40. package/components/assistant-ui/reasoning.js +66 -77
  41. package/components/assistant-ui/suggestions.js +4 -4
  42. package/components/assistant-ui/thread.js +22 -22
  43. package/components/assistant-ui/tool-fallback.js +60 -63
  44. package/components/assistant-ui/tool-group.d.ts +1 -1
  45. package/components/assistant-ui/tool-group.js +36 -42
  46. package/components/audio-waveform.js +25 -24
  47. package/components/autocomplete.d.ts +1 -0
  48. package/components/autocomplete.js +45 -43
  49. package/components/avatar.js +24 -24
  50. package/components/badge.d.ts +1 -1
  51. package/components/breadcrumbs.js +2 -2
  52. package/components/button.d.ts +2 -2
  53. package/components/button.js +22 -20
  54. package/components/card.js +8 -8
  55. package/components/carousel.js +105 -104
  56. package/components/chart.js +9 -7
  57. package/components/checkbox.js +74 -38
  58. package/components/chip.d.ts +1 -1
  59. package/components/code-block.js +3 -3
  60. package/components/collapsible.js +67 -23
  61. package/components/connector-card.js +6 -6
  62. package/components/drawer.d.ts +15 -10
  63. package/components/drawer.js +78 -77
  64. package/components/dropdown.d.ts +2 -0
  65. package/components/dropdown.js +88 -79
  66. package/components/empty-state.d.ts +1 -1
  67. package/components/empty-state.js +7 -7
  68. package/components/field.d.ts +4 -0
  69. package/components/field.js +45 -34
  70. package/components/file-dropzone.js +12 -12
  71. package/components/index.d.ts +3 -0
  72. package/components/index.js +584 -558
  73. package/components/input-field.js +51 -46
  74. package/components/input.js +20 -20
  75. package/components/link.js +9 -9
  76. package/components/modal.js +105 -73
  77. package/components/navbar.d.ts +1 -1
  78. package/components/navbar.js +1 -1
  79. package/components/number-field.js +38 -29
  80. package/components/page-header.js +12 -12
  81. package/components/pagination.js +19 -19
  82. package/components/panel.js +2 -2
  83. package/components/pixel-blast-svg.js +3 -3
  84. package/components/pixel-icon.js +0 -1
  85. package/components/popover.d.ts +1 -1
  86. package/components/popover.js +66 -64
  87. package/components/progress-circle.js +36 -32
  88. package/components/progress.js +28 -24
  89. package/components/radio.js +59 -49
  90. package/components/resizable-panel.js +1 -1
  91. package/components/reveal.d.ts +2 -2
  92. package/components/ripple.d.ts +3 -3
  93. package/components/scroll-area.js +17 -16
  94. package/components/segmented.js +26 -26
  95. package/components/select.d.ts +2 -0
  96. package/components/select.js +61 -57
  97. package/components/setting-row.js +45 -42
  98. package/components/sidebar.js +131 -127
  99. package/components/skeleton.js +5 -5
  100. package/components/spinner.d.ts +13 -4
  101. package/components/spinner.js +42 -42
  102. package/components/stepper.js +21 -21
  103. package/components/switch.js +41 -39
  104. package/components/table.d.ts +9 -0
  105. package/components/table.js +370 -247
  106. package/components/tabs.js +149 -137
  107. package/components/toast.js +66 -66
  108. package/components/tooltip.js +2 -2
  109. package/components/tree.js +62 -51
  110. package/components/typography.d.ts +2 -1
  111. package/components/typography.js +33 -32
  112. package/components/ui/button.d.ts +2 -2
  113. package/components/ui/button.js +19 -19
  114. package/components/ui/collapsible.d.ts +1 -5
  115. package/components/ui/dialog.d.ts +3 -3
  116. package/components/ui/dialog.js +95 -58
  117. package/components/ui/tooltip.d.ts +2 -2
  118. package/components/ui/tooltip.js +67 -33
  119. package/components/viz-charts.js +95 -95
  120. package/demo/components/add-to-artifact.js +341 -0
  121. package/demo/lib/artifact-library.js +134 -0
  122. package/fonts/aribau-grotesk-medium.woff2 +0 -0
  123. package/fonts/aribau-grotesk-regular.woff2 +0 -0
  124. package/fonts.css +11 -11
  125. package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
  126. package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
  127. package/lib/icons.d.ts +4 -0
  128. package/lib/icons.js +103 -102
  129. package/lib/motion.d.ts +42 -39
  130. package/lib/motion.js +112 -52
  131. package/lib/spinner-mark.d.ts +9 -0
  132. package/lib/spinner-mark.js +98 -0
  133. package/llms.txt +52 -18
  134. package/manifest.json +240 -31
  135. package/package.json +1 -1
  136. package/styles.css +143 -124
  137. package/theme.css +90 -93
  138. package/components/ui/collapsible.js +0 -35
  139. package/fonts/aribau-grotesk-500.otf +0 -0
  140. package/fonts/aribau-grotesk-600.woff2 +0 -0
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
3
  declare const chipVariants: (props?: ({
4
- variant?: "soft" | "solid" | "outline" | "dot" | null | undefined;
4
+ variant?: "soft" | "outline" | "solid" | "dot" | null | undefined;
5
5
  color?: "success" | "warning" | "danger" | "info" | "default" | "primary" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export interface ChipProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "color">, VariantProps<typeof chipVariants> {
@@ -81,7 +81,7 @@ const G = _(
81
81
  comment: "text-tertiary",
82
82
  string: "text-foreground",
83
83
  number: "text-foreground",
84
- keyword: "font-semibold text-foreground",
84
+ keyword: "font-medium text-foreground",
85
85
  function: "font-medium text-foreground",
86
86
  tag: "font-medium text-foreground",
87
87
  punct: "text-tertiary"
@@ -208,7 +208,7 @@ const J = s.forwardRef(
208
208
  "span",
209
209
  {
210
210
  className: u(
211
- "absolute top-2 right-2 z-10 opacity-0 transition-opacity duration-(--duration-fast) ease-out",
211
+ "absolute top-2 right-2 z-10 opacity-0 transition-opacity duration-150 ease-out",
212
212
  "group-hover/code-block:opacity-100 focus-within:opacity-100",
213
213
  "motion-reduce:transition-none"
214
214
  ),
@@ -256,7 +256,7 @@ const J = s.forwardRef(
256
256
  className: u(
257
257
  "select-none text-right text-tertiary",
258
258
  d === "highlighted" && "text-info-700",
259
- d === "added" && "font-semibold text-foreground",
259
+ d === "added" && "font-medium text-foreground",
260
260
  d === "removed" && "text-danger-700"
261
261
  ),
262
262
  children: c
@@ -1,31 +1,75 @@
1
1
  "use client";
2
- import { jsx as e } from "react/jsx-runtime";
3
- import * as s from "react";
4
- import { Collapsible as t } from "radix-ui";
5
- const i = s.forwardRef(({ children: l, ...o }, a) => /* @__PURE__ */ e(t.Root, { ref: a, "data-slot": "collapsible", ...o, children: l }));
6
- i.displayName = "Collapsible";
7
- const r = s.forwardRef(({ children: l, ...o }, a) => /* @__PURE__ */ e(
8
- t.CollapsibleTrigger,
2
+ import { jsx as l } from "react/jsx-runtime";
3
+ import * as t from "react";
4
+ import { Collapsible as r } from "radix-ui";
5
+ import { MotionConfig as u, AnimatePresence as g, motion as h } from "motion/react";
6
+ import { springDisclosure as y } from "../lib/motion.js";
7
+ const C = t.createContext(!1), v = t.forwardRef(({ children: o, open: i, defaultOpen: a = !1, onOpenChange: e, ...s }, n) => {
8
+ const c = i !== void 0, [f, b] = t.useState(a), p = c ? i : f, m = t.useCallback(
9
+ (d) => {
10
+ c || b(d), e == null || e(d);
11
+ },
12
+ [c, e]
13
+ );
14
+ return /* @__PURE__ */ l(C.Provider, { value: p, children: /* @__PURE__ */ l(
15
+ r.Root,
16
+ {
17
+ ref: n,
18
+ "data-slot": "collapsible",
19
+ open: p,
20
+ onOpenChange: m,
21
+ ...s,
22
+ children: o
23
+ }
24
+ ) });
25
+ });
26
+ v.displayName = "Collapsible";
27
+ const x = t.forwardRef(({ children: o, ...i }, a) => /* @__PURE__ */ l(
28
+ r.CollapsibleTrigger,
9
29
  {
10
30
  ref: a,
11
31
  "data-slot": "collapsible-trigger",
12
- ...o,
13
- children: l
32
+ ...i,
33
+ children: o
14
34
  }
15
35
  ));
16
- r.displayName = "CollapsibleTrigger";
17
- const p = s.forwardRef(({ children: l, ...o }, a) => /* @__PURE__ */ e(
18
- t.CollapsibleContent,
19
- {
20
- ref: a,
21
- "data-slot": "collapsible-content",
22
- ...o,
23
- children: l
24
- }
25
- ));
26
- p.displayName = "CollapsibleContent";
36
+ x.displayName = "CollapsibleTrigger";
37
+ const R = t.forwardRef(({ children: o, asChild: i, forceMount: a, ...e }, s) => {
38
+ const n = t.useContext(C);
39
+ return i ? /* @__PURE__ */ l(
40
+ r.CollapsibleContent,
41
+ {
42
+ ref: s,
43
+ "data-slot": "collapsible-content",
44
+ asChild: !0,
45
+ forceMount: a,
46
+ ...e,
47
+ children: o
48
+ }
49
+ ) : /* @__PURE__ */ l(
50
+ r.CollapsibleContent,
51
+ {
52
+ ref: s,
53
+ "data-slot": "collapsible-content",
54
+ ...e,
55
+ forceMount: !0,
56
+ children: /* @__PURE__ */ l(u, { reducedMotion: "user", children: /* @__PURE__ */ l(g, { initial: !1, children: n && /* @__PURE__ */ l(
57
+ h.div,
58
+ {
59
+ initial: { height: 0, opacity: 0, y: -4 },
60
+ animate: { height: "auto", opacity: 1, y: 0 },
61
+ exit: { height: 0, opacity: 0, y: -4 },
62
+ transition: y,
63
+ className: "overflow-hidden",
64
+ children: o
65
+ }
66
+ ) }) })
67
+ }
68
+ );
69
+ });
70
+ R.displayName = "CollapsibleContent";
27
71
  export {
28
- i as Collapsible,
29
- p as CollapsibleContent,
30
- r as CollapsibleTrigger
72
+ v as Collapsible,
73
+ R as CollapsibleContent,
74
+ x as CollapsibleTrigger
31
75
  };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs as r, Fragment as g, jsx as t } from "react/jsx-runtime";
2
+ import { jsxs as r, Fragment as f, jsx as t } from "react/jsx-runtime";
3
3
  import * as h from "react";
4
4
  import { Database as x, ChevronRight as b } from "../lib/icons.js";
5
5
  import { cn as o } from "../lib/cn.js";
@@ -68,7 +68,7 @@ function N({ strip: s }) {
68
68
  const v = h.forwardRef(
69
69
  ({ className: s, card: e, onOpen: n, ...a }, i) => {
70
70
  var m;
71
- const c = !!n, f = ((m = e.action) == null ? void 0 : m.tone) === "reconnect", l = /* @__PURE__ */ r(g, { children: [
71
+ const c = !!n, g = ((m = e.action) == null ? void 0 : m.tone) === "reconnect", l = /* @__PURE__ */ r(f, { children: [
72
72
  /* @__PURE__ */ r("div", { className: "rounded-t-xl p-[var(--card-padding)]", children: [
73
73
  /* @__PURE__ */ r("div", { className: "mb-5 flex items-center gap-3.5", children: [
74
74
  e.logo ? /* @__PURE__ */ t(
@@ -81,7 +81,7 @@ const v = h.forwardRef(
81
81
  ) : /* @__PURE__ */ t("span", { className: "grid size-10 shrink-0 place-items-center rounded-md bg-muted text-secondary", children: /* @__PURE__ */ t(x, { className: "size-5", "aria-hidden": !0 }) }),
82
82
  /* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
83
83
  /* @__PURE__ */ r("div", { className: "flex items-baseline justify-between gap-3", children: [
84
- /* @__PURE__ */ t("div", { className: "min-w-0 truncate text-base font-semibold leading-tight text-foreground", children: e.name }),
84
+ /* @__PURE__ */ t("div", { className: "min-w-0 truncate text-base font-medium leading-tight text-foreground", children: e.name }),
85
85
  /* @__PURE__ */ t(
86
86
  y,
87
87
  {
@@ -101,7 +101,7 @@ const v = h.forwardRef(
101
101
  {
102
102
  className: o(
103
103
  "min-w-0 truncate text-xs",
104
- e.footer.faint ? "text-tertiary/70" : "text-secondary"
104
+ "text-secondary"
105
105
  ),
106
106
  children: e.footer.text
107
107
  }
@@ -111,7 +111,7 @@ const v = h.forwardRef(
111
111
  {
112
112
  className: o(
113
113
  "inline-flex shrink-0 items-center gap-0.5 text-xs font-normal",
114
- f ? "text-danger" : "text-foreground"
114
+ g ? "text-danger" : "text-foreground"
115
115
  ),
116
116
  children: [
117
117
  e.action.label,
@@ -127,7 +127,7 @@ const v = h.forwardRef(
127
127
  // aliasing under transform is a real browser gotcha; forcing a
128
128
  // compositor layer fixes it deterministically).
129
129
  "rounded-xl bg-card text-card-foreground transform-gpu [will-change:transform] [backface-visibility:hidden]",
130
- c && "shadow-elevation transition-[transform,box-shadow] duration-(--duration-fast) ease-out motion-reduce:transition-none",
130
+ c && "shadow-elevation transition-[transform,box-shadow] duration-150 ease-out motion-reduce:transition-none",
131
131
  s
132
132
  );
133
133
  return c ? /* @__PURE__ */ t(
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
3
  declare const panelVariants: (props?: ({
4
- side?: "left" | "right" | "bottom" | null | undefined;
4
+ side?: "bottom" | "left" | "right" | null | undefined;
5
5
  size?: "sm" | "md" | "lg" | "xl" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export interface DrawerProps extends VariantProps<typeof panelVariants> {
@@ -33,20 +33,25 @@ export declare function ModalDrawer({ open, onOpenChange, side: sideProp, size,
33
33
  * Drawer in ADS. Use `ModalDrawer` when a page-blocking overlay is genuinely
34
34
  * required.
35
35
  *
36
- * REQUIRES A TINTED GROUND. The panel is flat white (`bg-card`) with no shadow
37
- * and no border — it separates from its neighbour purely by fill contrast, so
38
- * it is INVISIBLE on a white (`bg-background`) parent. Place it and its sibling
39
- * content inside a `bg-surface` flex row; the tint is the parent's job, not the
40
- * panel's (the inline Drawer renders no ground of its own):
36
+ * REQUIRES THE CANVAS GROUND. The panel is flat white (`bg-card`) with no
37
+ * shadow and no border — it separates from its neighbour purely by fill
38
+ * contrast, so it is INVISIBLE on a pure-white (`bg-card`) parent. Place it
39
+ * and its sibling content inside a `bg-background` flex row — the SHELL
40
+ * CANVAS tint (ink-100), the same color as the frame around the screen. Do
41
+ * NOT use `bg-surface` (ink-200) for this row: it is one Radix step darker
42
+ * than the shell frame, so the gutter between the panels renders as a dark
43
+ * seam stripe instead of reading as canvas (field report 2026-08-06,
44
+ * Artifacts v2). The ground is the parent's job, not the panel's (the inline
45
+ * Drawer renders no ground of its own):
41
46
  *
42
- * <div className="flex gap-3 bg-surface p-3">
47
+ * <div className="flex gap-3 bg-background p-3">
43
48
  * <main className="flex-1 rounded-xl bg-card">…content…</main>
44
49
  * <Drawer open={open} onOpenChange={setOpen} aria-label="…">…</Drawer>
45
50
  * </div>
46
51
  *
47
- * This mirrors the shell's main + chat layout — white panels on a tinted
48
- * ground. If the panel doesn't read, fix the ground; never add a border or
49
- * shadow to force it (that fights principle 1).
52
+ * This mirrors the shell's main + chat layout — white panels on the canvas.
53
+ * If the panel doesn't read, fix the ground; never add a border or shadow to
54
+ * force it (that fights principle 1).
50
55
  */
51
56
  export declare function Drawer({ open, onOpenChange, side: sideProp, size, className, children, "aria-label": ariaLabel, }: DrawerProps): React.JSX.Element;
52
57
  /** @deprecated Alias for `Drawer` — the canonical drawer is now the inline
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as g } from "react/jsx-runtime";
2
+ import { jsx as i, jsxs as v } from "react/jsx-runtime";
3
3
  import * as a from "react";
4
- import { createPortal as E } from "react-dom";
5
- import { MotionConfig as y, AnimatePresence as p, motion as v } from "motion/react";
4
+ import { createPortal as D } from "react-dom";
5
+ import { MotionConfig as p, AnimatePresence as b, motion as h } from "motion/react";
6
6
  import { Close as R } from "../lib/icons.js";
7
- import { cva as j } from "class-variance-authority";
7
+ import { cva as E } from "class-variance-authority";
8
8
  import { cn as o } from "../lib/cn.js";
9
- import { drawerExitTransition as b, drawerOffset as m, drawerEnterTransition as z, drawerBackdropVariants as F } from "../lib/motion.js";
10
- const N = j(
9
+ import { springSheet as f, drawerOffset as u, drawerBackdropVariants as j } from "../lib/motion.js";
10
+ const z = E(
11
11
  [
12
12
  "relative flex flex-col",
13
13
  "bg-elevated text-foreground",
@@ -43,16 +43,16 @@ const N = j(
43
43
  ],
44
44
  defaultVariants: { side: "right", size: "md" }
45
45
  }
46
- ), A = {
46
+ ), F = {
47
47
  right: "justify-end items-stretch",
48
48
  left: "justify-start items-stretch",
49
49
  bottom: "justify-center items-end"
50
50
  };
51
- function k({
51
+ function N({
52
52
  onClick: t,
53
53
  className: e
54
54
  }) {
55
- return /* @__PURE__ */ r(
55
+ return /* @__PURE__ */ i(
56
56
  "button",
57
57
  {
58
58
  type: "button",
@@ -60,49 +60,49 @@ function k({
60
60
  "aria-label": "Close",
61
61
  className: o(
62
62
  "absolute inline-flex size-8 items-center justify-center",
63
- "rounded-md text-muted-foreground",
64
- "transition-[background,color,transform] duration-(--duration-fast) ease-out hover:bg-muted hover:text-foreground",
65
- "active:scale-(--scale-press)",
63
+ "rounded-sm text-muted-foreground",
64
+ "transition-[background,color,transform] duration-150 ease-out motion-reduce:transition-none hover:bg-muted hover:text-foreground",
65
+ "active:scale-[0.97] motion-reduce:active:scale-100",
66
66
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
67
67
  "[&_svg]:size-4 [&_svg]:shrink-0",
68
68
  e
69
69
  ),
70
- children: /* @__PURE__ */ r(R, { "aria-hidden": !0 })
70
+ children: /* @__PURE__ */ i(R, { "aria-hidden": !0 })
71
71
  }
72
72
  );
73
73
  }
74
- function G({
74
+ function q({
75
75
  open: t,
76
76
  onOpenChange: e,
77
- side: s,
78
- size: u,
79
- className: w,
80
- children: x
77
+ side: r,
78
+ size: w,
79
+ className: x,
80
+ children: g
81
81
  }) {
82
- const l = s ?? "right", n = a.useRef(null), d = a.useRef(null);
82
+ const l = r ?? "right", n = a.useRef(null), d = a.useRef(null);
83
83
  return a.useEffect(() => {
84
84
  if (!t) return;
85
85
  d.current = document.activeElement;
86
86
  const c = document.body.style.overflow;
87
87
  document.body.style.overflow = "hidden";
88
- const f = (i) => {
89
- i.key === "Escape" && (i.stopPropagation(), e(!1));
88
+ const m = (s) => {
89
+ s.key === "Escape" && (s.stopPropagation(), e(!1));
90
90
  };
91
- document.addEventListener("keydown", f);
92
- const D = requestAnimationFrame(() => {
93
- var i;
94
- (i = n.current) == null || i.focus();
91
+ document.addEventListener("keydown", m);
92
+ const k = requestAnimationFrame(() => {
93
+ var s;
94
+ (s = n.current) == null || s.focus();
95
95
  });
96
96
  return () => {
97
- var i, h;
98
- document.removeEventListener("keydown", f), document.body.style.overflow = c, cancelAnimationFrame(D), (h = (i = d.current) == null ? void 0 : i.focus) == null || h.call(i);
97
+ var s, y;
98
+ document.removeEventListener("keydown", m), document.body.style.overflow = c, cancelAnimationFrame(k), (y = (s = d.current) == null ? void 0 : s.focus) == null || y.call(s);
99
99
  };
100
- }, [t, e]), E(
101
- /* @__PURE__ */ r(y, { reducedMotion: "user", children: /* @__PURE__ */ r(p, { children: t && /* @__PURE__ */ g("div", { className: o("fixed inset-0 z-50 flex", A[l]), children: [
102
- /* @__PURE__ */ r(
103
- v.div,
100
+ }, [t, e]), D(
101
+ /* @__PURE__ */ i(p, { reducedMotion: "user", children: /* @__PURE__ */ i(b, { children: t && /* @__PURE__ */ v("div", { className: o("fixed inset-0 z-50 flex", F[l]), children: [
102
+ /* @__PURE__ */ i(
103
+ h.div,
104
104
  {
105
- variants: F,
105
+ variants: j,
106
106
  initial: "hidden",
107
107
  animate: "visible",
108
108
  exit: "hidden",
@@ -112,26 +112,26 @@ function G({
112
112
  },
113
113
  "backdrop"
114
114
  ),
115
- /* @__PURE__ */ g(
116
- v.div,
115
+ /* @__PURE__ */ v(
116
+ h.div,
117
117
  {
118
118
  ref: n,
119
- initial: m[l],
120
- animate: { transform: "translate3d(0, 0, 0)", transition: z },
121
- exit: { ...m[l], transition: b },
119
+ initial: u[l],
120
+ animate: { transform: "translate3d(0, 0, 0)", opacity: 1, transition: f },
121
+ exit: { ...u[l], transition: f },
122
122
  role: "dialog",
123
123
  "aria-modal": "true",
124
124
  tabIndex: -1,
125
- className: o(N({ side: l, size: u }), "relative outline-none", w),
125
+ className: o(z({ side: l, size: w }), "relative outline-none", x),
126
126
  children: [
127
- /* @__PURE__ */ r(
128
- k,
127
+ /* @__PURE__ */ i(
128
+ N,
129
129
  {
130
130
  onClick: () => e(!1),
131
131
  className: "right-4 top-4"
132
132
  }
133
133
  ),
134
- x
134
+ g
135
135
  ]
136
136
  },
137
137
  "panel"
@@ -140,81 +140,82 @@ function G({
140
140
  document.body
141
141
  );
142
142
  }
143
- function B({
143
+ function A({
144
144
  open: t,
145
145
  onOpenChange: e,
146
- side: s,
147
- size: u,
148
- className: w,
149
- children: x,
146
+ side: r,
147
+ size: w,
148
+ className: x,
149
+ children: g,
150
150
  "aria-label": l
151
151
  }) {
152
- const n = s ?? "right", d = a.useRef(null);
152
+ const n = r ?? "right", d = a.useRef(null);
153
153
  return a.useEffect(() => {
154
154
  if (!t) return;
155
- const c = (f) => {
156
- f.key === "Escape" && e(!1);
155
+ const c = (m) => {
156
+ m.key === "Escape" && e(!1);
157
157
  };
158
158
  return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
159
- }, [t, e]), /* @__PURE__ */ r(y, { reducedMotion: "user", children: /* @__PURE__ */ r(p, { initial: !1, children: t && /* @__PURE__ */ g(
160
- v.aside,
159
+ }, [t, e]), /* @__PURE__ */ i(p, { reducedMotion: "user", children: /* @__PURE__ */ i(b, { initial: !1, children: t && /* @__PURE__ */ v(
160
+ h.aside,
161
161
  {
162
162
  ref: d,
163
- initial: m[n],
164
- animate: { transform: "translate3d(0, 0, 0)", transition: z },
165
- exit: { ...m[n], transition: b },
163
+ initial: u[n],
164
+ animate: { transform: "translate3d(0, 0, 0)", opacity: 1, transition: f },
165
+ exit: { ...u[n], transition: f },
166
166
  role: "complementary",
167
167
  "aria-label": l,
168
168
  className: o(
169
- N({ side: n, size: u }),
169
+ z({ side: n, size: w }),
170
170
  "relative shrink-0 overflow-hidden rounded-lg bg-card shadow-none outline-none",
171
- w
171
+ x
172
172
  ),
173
173
  children: [
174
- /* @__PURE__ */ r(
175
- k,
174
+ /* @__PURE__ */ i(
175
+ N,
176
176
  {
177
177
  onClick: () => e(!1),
178
178
  className: "right-2 top-1"
179
179
  }
180
180
  ),
181
- x
181
+ g
182
182
  ]
183
183
  },
184
184
  "inline-drawer"
185
185
  ) }) });
186
186
  }
187
- const J = B, L = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r(
187
+ const S = A, B = a.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
188
188
  "div",
189
189
  {
190
- ref: s,
190
+ ref: r,
191
191
  className: o("flex flex-col gap-1 px-6 py-4 pr-14", t),
192
192
  ...e
193
193
  }
194
194
  ));
195
- L.displayName = "DrawerHeader";
196
- const M = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r(
195
+ B.displayName = "DrawerHeader";
196
+ const L = a.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
197
197
  "h2",
198
198
  {
199
- ref: s,
200
- className: o("text-lg font-semibold text-foreground", t),
199
+ ref: r,
200
+ className: o("text-lg font-medium text-foreground", t),
201
201
  ...e
202
202
  }
203
203
  ));
204
- M.displayName = "DrawerTitle";
205
- const T = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r(
204
+ L.displayName = "DrawerTitle";
205
+ const M = a.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
206
206
  "div",
207
207
  {
208
- ref: s,
208
+ ref: r,
209
+ tabIndex: 0,
209
210
  className: o("flex-1 overflow-y-auto px-6 py-4 text-xs text-foreground", t),
210
211
  ...e
211
212
  }
212
213
  ));
213
- T.displayName = "DrawerBody";
214
- const V = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r(
214
+ M.displayName = "DrawerBody";
215
+ const V = a.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
215
216
  "div",
216
217
  {
217
- ref: s,
218
+ ref: r,
218
219
  className: o(
219
220
  "flex items-center justify-end gap-2 px-6 py-4",
220
221
  t
@@ -224,11 +225,11 @@ const V = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r(
224
225
  ));
225
226
  V.displayName = "DrawerFooter";
226
227
  export {
227
- B as Drawer,
228
- T as DrawerBody,
228
+ A as Drawer,
229
+ M as DrawerBody,
229
230
  V as DrawerFooter,
230
- L as DrawerHeader,
231
- M as DrawerTitle,
232
- J as InlineDrawer,
233
- G as ModalDrawer
231
+ B as DrawerHeader,
232
+ L as DrawerTitle,
233
+ S as InlineDrawer,
234
+ q as ModalDrawer
234
235
  };
@@ -26,6 +26,8 @@ export interface DropdownItemProps extends Omit<React.HTMLAttributes<HTMLDivElem
26
26
  startContent?: React.ReactNode;
27
27
  danger?: boolean;
28
28
  disabled?: boolean;
29
+ /** Keep focus with a newly opened surface instead of returning to the menu trigger. */
30
+ restoreFocus?: boolean;
29
31
  onSelect?: () => void;
30
32
  }
31
33
  export declare const DropdownItem: React.ForwardRefExoticComponent<DropdownItemProps & React.RefAttributes<HTMLDivElement>>;