@actioneer/ads 0.6.0 → 0.7.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 (112) hide show
  1. package/components/ai-elements/agent-trace.d.ts +2 -2
  2. package/components/ai-elements/agent-trace.js +163 -104
  3. package/components/ai-elements/chain-of-thought.d.ts +2 -2
  4. package/components/ai-elements/chain-of-thought.js +1 -1
  5. package/components/ai-elements/index.d.ts +0 -5
  6. package/components/ai-elements/inline-citation.js +1 -1
  7. package/components/alert.d.ts +6 -6
  8. package/components/alert.js +89 -53
  9. package/components/answer-sources.d.ts +2 -6
  10. package/components/answer-sources.js +58 -60
  11. package/components/answer.d.ts +5 -0
  12. package/components/answer.js +311 -271
  13. package/components/assistant-ui/composer-harness.js +15 -20
  14. package/components/assistant-ui/composer.d.ts +3 -1
  15. package/components/assistant-ui/composer.js +148 -144
  16. package/components/assistant-ui/index.d.ts +0 -3
  17. package/components/assistant-ui/thread-context.d.ts +3 -1
  18. package/components/assistant-ui/thread.js +50 -42
  19. package/components/avatar.js +42 -42
  20. package/components/badge.d.ts +5 -6
  21. package/components/badge.js +13 -76
  22. package/components/body-page-header.d.ts +15 -0
  23. package/components/body-page-header.js +24 -0
  24. package/components/brand-loader.d.ts +0 -3
  25. package/components/brand-loader.js +10 -32
  26. package/components/breadcrumbs.d.ts +0 -7
  27. package/components/breadcrumbs.js +54 -71
  28. package/components/button.d.ts +1 -1
  29. package/components/button.js +55 -49
  30. package/components/chart.js +298 -296
  31. package/components/chip.d.ts +13 -1
  32. package/components/chip.js +93 -80
  33. package/components/collection-header.d.ts +17 -0
  34. package/components/collection-header.js +31 -0
  35. package/components/connector-card.d.ts +6 -6
  36. package/components/connector-card.js +31 -32
  37. package/components/date-range-picker.d.ts +2 -1
  38. package/components/date-range-picker.js +158 -122
  39. package/components/drawer.d.ts +19 -3
  40. package/components/drawer.js +109 -100
  41. package/components/dropdown.d.ts +1 -2
  42. package/components/dropdown.js +88 -89
  43. package/components/field.js +39 -34
  44. package/components/file-dropzone.js +1 -1
  45. package/components/index.d.ts +4 -4
  46. package/components/index.js +499 -546
  47. package/components/infinite-canvas.js +24 -24
  48. package/components/input-field.d.ts +18 -3
  49. package/components/input-field.js +88 -72
  50. package/components/input.js +16 -15
  51. package/components/modal.d.ts +31 -3
  52. package/components/modal.js +243 -169
  53. package/components/number-field.js +45 -42
  54. package/components/page-body.d.ts +12 -0
  55. package/components/page-body.js +18 -0
  56. package/components/pagination.js +36 -36
  57. package/components/select.d.ts +21 -0
  58. package/components/select.js +189 -148
  59. package/components/setting-row.d.ts +6 -5
  60. package/components/setting-row.js +33 -32
  61. package/components/sidebar.d.ts +2 -0
  62. package/components/sidebar.js +165 -155
  63. package/components/skeleton.js +8 -7
  64. package/components/slider.js +1 -1
  65. package/components/surface-loader.d.ts +11 -0
  66. package/components/surface-loader.js +35 -0
  67. package/components/table.d.ts +16 -10
  68. package/components/table.js +426 -410
  69. package/components/tabs.d.ts +2 -0
  70. package/components/tabs.js +159 -294
  71. package/components/textarea.js +9 -9
  72. package/components/toast.d.ts +1 -1
  73. package/components/toast.js +181 -118
  74. package/components/tree.d.ts +5 -1
  75. package/components/tree.js +54 -49
  76. package/components/typography.d.ts +4 -4
  77. package/components/typography.js +13 -13
  78. package/components/ui/button.d.ts +1 -1
  79. package/components/ui/dialog.js +33 -33
  80. package/demo/components/add-to-artifact.js +6 -10
  81. package/lib/cn.js +11 -4
  82. package/lib/icons.d.ts +4 -0
  83. package/lib/icons.js +107 -106
  84. package/lib/interactive.d.ts +1 -1
  85. package/llms.txt +95 -152
  86. package/manifest.json +1628 -2729
  87. package/package.json +1 -2
  88. package/styles.css +347 -223
  89. package/theme.css +303 -177
  90. package/components/agent-icon.d.ts +0 -76
  91. package/components/agent-icon.js +0 -265
  92. package/components/ai-elements/queue.d.ts +0 -60
  93. package/components/ai-elements/queue.js +0 -193
  94. package/components/ai-elements/speech-input.d.ts +0 -16
  95. package/components/ai-elements/speech-input.js +0 -151
  96. package/components/ai-elements/task-progress.d.ts +0 -41
  97. package/components/ai-elements/task-progress.js +0 -224
  98. package/components/ai-elements/task.d.ts +0 -39
  99. package/components/ai-elements/task.js +0 -105
  100. package/components/ai-elements/voice.d.ts +0 -90
  101. package/components/ai-elements/voice.js +0 -496
  102. package/components/assistant-ui/follow-up-suggestions.d.ts +0 -11
  103. package/components/assistant-ui/follow-up-suggestions.js +0 -72
  104. package/components/assistant-ui/suggestions.d.ts +0 -7
  105. package/components/assistant-ui/suggestions.js +0 -19
  106. package/components/assistant-ui/voice.d.ts +0 -18
  107. package/components/link.d.ts +0 -14
  108. package/components/link.js +0 -72
  109. package/components/navbar.d.ts +0 -15
  110. package/components/navbar.js +0 -68
  111. package/components/pixel-icon.d.ts +0 -37
  112. package/components/pixel-icon.js +0 -859
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { jsx as i, jsxs as b } from "react/jsx-runtime";
3
- import * as a from "react";
4
- import { createPortal as E } from "react-dom";
5
- import { MotionConfig as y, AnimatePresence as z, motion as w } from "motion/react";
6
- import { Close as R } from "../lib/icons.js";
7
- import { cva as j } from "class-variance-authority";
2
+ import { jsx as i, jsxs as y } from "react/jsx-runtime";
3
+ import * as s from "react";
4
+ import { createPortal as R } from "react-dom";
5
+ import { MotionConfig as z, AnimatePresence as D, motion as g } from "motion/react";
6
+ import { Close as j } from "../lib/icons.js";
7
+ import { cva as F } from "class-variance-authority";
8
8
  import { cn as n } from "../lib/cn.js";
9
- import { springSheet as l, drawerOffset as h, drawerBackdropVariants as F } from "../lib/motion.js";
10
- const N = j(
9
+ import { springSheet as l, drawerOffset as v, drawerBackdropVariants as A } from "../lib/motion.js";
10
+ const N = F(
11
11
  [
12
12
  "relative flex flex-col",
13
13
  "bg-elevated text-foreground",
@@ -43,25 +43,25 @@ const N = j(
43
43
  ],
44
44
  defaultVariants: { side: "right", size: "md" }
45
45
  }
46
- ), A = {
46
+ ), B = {
47
47
  right: "justify-end items-stretch",
48
48
  left: "justify-start items-stretch",
49
49
  bottom: "justify-center items-end"
50
- }, B = {
50
+ }, L = {
51
51
  sm: "25%",
52
52
  md: "33.333333%",
53
53
  lg: "50%",
54
54
  xl: "66.666667%"
55
55
  };
56
56
  function k({
57
- onClick: t,
58
- className: e
57
+ onClick: e,
58
+ className: t
59
59
  }) {
60
60
  return /* @__PURE__ */ i(
61
61
  "button",
62
62
  {
63
63
  type: "button",
64
- onClick: t,
64
+ onClick: e,
65
65
  "aria-label": "Close",
66
66
  className: n(
67
67
  "absolute inline-flex size-8 items-center justify-center",
@@ -70,75 +70,75 @@ function k({
70
70
  "active:scale-[0.97] motion-reduce:active:scale-100",
71
71
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
72
72
  "[&_svg]:size-4 [&_svg]:shrink-0",
73
- e
73
+ t
74
74
  ),
75
- children: /* @__PURE__ */ i(R, { "aria-hidden": !0 })
75
+ children: /* @__PURE__ */ i(j, { "aria-hidden": !0 })
76
76
  }
77
77
  );
78
78
  }
79
79
  function G({
80
- open: t,
81
- onOpenChange: e,
82
- side: s,
83
- size: d,
84
- className: v,
85
- children: x,
86
- "aria-label": g
80
+ open: e,
81
+ onOpenChange: t,
82
+ side: o,
83
+ size: c,
84
+ className: x,
85
+ children: m,
86
+ "aria-label": p
87
87
  }) {
88
- const r = s ?? "right", c = a.useRef(null), m = a.useRef(null);
89
- return a.useEffect(() => {
90
- if (!t) return;
91
- m.current = document.activeElement;
92
- const f = document.body.style.overflow;
88
+ const d = o ?? "right", f = s.useRef(null), u = s.useRef(null);
89
+ return s.useEffect(() => {
90
+ if (!e) return;
91
+ u.current = document.activeElement;
92
+ const a = document.body.style.overflow;
93
93
  document.body.style.overflow = "hidden";
94
- const u = (o) => {
95
- o.key === "Escape" && (o.stopPropagation(), e(!1));
94
+ const w = (r) => {
95
+ r.key === "Escape" && (r.stopPropagation(), t(!1));
96
96
  };
97
- document.addEventListener("keydown", u);
98
- const D = requestAnimationFrame(() => {
99
- var o;
100
- (o = c.current) == null || o.focus();
97
+ document.addEventListener("keydown", w);
98
+ const b = requestAnimationFrame(() => {
99
+ var r;
100
+ (r = f.current) == null || r.focus();
101
101
  });
102
102
  return () => {
103
- var o, p;
104
- document.removeEventListener("keydown", u), document.body.style.overflow = f, cancelAnimationFrame(D), (p = (o = m.current) == null ? void 0 : o.focus) == null || p.call(o);
103
+ var r, h;
104
+ document.removeEventListener("keydown", w), document.body.style.overflow = a, cancelAnimationFrame(b), (h = (r = u.current) == null ? void 0 : r.focus) == null || h.call(r);
105
105
  };
106
- }, [t, e]), E(
107
- /* @__PURE__ */ i(y, { reducedMotion: "user", children: /* @__PURE__ */ i(z, { children: t && /* @__PURE__ */ b("div", { className: n("fixed inset-0 z-50 flex", A[r]), children: [
106
+ }, [e, t]), R(
107
+ /* @__PURE__ */ i(z, { reducedMotion: "user", children: /* @__PURE__ */ i(D, { children: e && /* @__PURE__ */ y("div", { className: n("fixed inset-0 z-50 flex", B[d]), children: [
108
108
  /* @__PURE__ */ i(
109
- w.div,
109
+ g.div,
110
110
  {
111
- variants: F,
111
+ variants: A,
112
112
  initial: "hidden",
113
113
  animate: "visible",
114
114
  exit: "hidden",
115
115
  className: "absolute inset-0 bg-overlay",
116
- onClick: () => e(!1),
116
+ onClick: () => t(!1),
117
117
  "aria-hidden": !0
118
118
  },
119
119
  "backdrop"
120
120
  ),
121
- /* @__PURE__ */ b(
122
- w.div,
121
+ /* @__PURE__ */ y(
122
+ g.div,
123
123
  {
124
- ref: c,
125
- initial: h[r],
124
+ ref: f,
125
+ initial: v[d],
126
126
  animate: { transform: "translate3d(0, 0, 0)", opacity: 1, transition: l },
127
- exit: { ...h[r], pointerEvents: "none", transition: l },
127
+ exit: { ...v[d], pointerEvents: "none", transition: l },
128
128
  role: "dialog",
129
129
  "aria-modal": "true",
130
- "aria-label": g,
130
+ "aria-label": p,
131
131
  tabIndex: -1,
132
- className: n(N({ side: r, size: d }), "relative outline-none", v),
132
+ className: n(N({ side: d, size: c }), "relative outline-none", x),
133
133
  children: [
134
134
  /* @__PURE__ */ i(
135
135
  k,
136
136
  {
137
- onClick: () => e(!1),
137
+ onClick: () => t(!1),
138
138
  className: "right-4 top-4"
139
139
  }
140
140
  ),
141
- x
141
+ m
142
142
  ]
143
143
  },
144
144
  "panel"
@@ -147,56 +147,61 @@ function G({
147
147
  document.body
148
148
  );
149
149
  }
150
- function L({
151
- open: t,
152
- onOpenChange: e,
153
- side: s,
154
- size: d,
155
- className: v,
156
- children: x,
157
- "aria-label": g
150
+ function E({
151
+ open: e,
152
+ onOpenChange: t,
153
+ appearance: o = "flat",
154
+ dismissible: c = !0,
155
+ side: x,
156
+ size: m,
157
+ containerClassName: p,
158
+ className: d,
159
+ children: f,
160
+ "aria-label": u
158
161
  }) {
159
- const r = s ?? "right", c = d ?? "md", m = a.useRef(null);
160
- return a.useEffect(() => {
161
- if (!t) return;
162
- const f = (u) => {
163
- u.key === "Escape" && e(!1);
162
+ const a = x ?? "right", w = m ?? "md", b = s.useRef(null);
163
+ return s.useEffect(() => {
164
+ if (!e || !c) return;
165
+ const r = (h) => {
166
+ h.key === "Escape" && t(!1);
164
167
  };
165
- return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
166
- }, [t, e]), /* @__PURE__ */ i(y, { reducedMotion: "user", children: /* @__PURE__ */ i(z, { initial: !1, children: t && /* @__PURE__ */ i(
167
- w.div,
168
+ return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
169
+ }, [e, t, c]), /* @__PURE__ */ i(z, { reducedMotion: "user", children: /* @__PURE__ */ i(D, { initial: !1, children: e && /* @__PURE__ */ i(
170
+ g.div,
168
171
  {
169
- initial: r === "bottom" ? { height: "0%" } : { width: 0 },
170
- animate: r === "bottom" ? { height: B[c], transition: l } : { width: "auto", transition: l },
171
- exit: r === "bottom" ? { height: "0%", pointerEvents: "none", transition: l } : { width: 0, pointerEvents: "none", transition: l },
172
+ initial: a === "bottom" ? { height: "0%" } : { width: 0 },
173
+ animate: a === "bottom" ? { height: L[w], transition: l } : { width: "auto", transition: l },
174
+ exit: a === "bottom" ? { height: "0%", pointerEvents: "none", transition: l } : { width: 0, pointerEvents: "none", transition: l },
172
175
  className: n(
173
176
  "shrink-0 overflow-hidden",
174
- r === "bottom" ? "w-full" : "h-full"
177
+ a === "bottom" ? "w-full" : "h-full",
178
+ p
175
179
  ),
176
- children: /* @__PURE__ */ b(
177
- w.aside,
180
+ children: /* @__PURE__ */ y(
181
+ g.aside,
178
182
  {
179
- ref: m,
180
- initial: h[r],
183
+ ref: b,
184
+ initial: v[a],
181
185
  animate: { transform: "translate3d(0, 0, 0)", opacity: 1, transition: l },
182
- exit: { ...h[r], pointerEvents: "none", transition: l },
186
+ exit: { ...v[a], pointerEvents: "none", transition: l },
183
187
  role: "complementary",
184
- "aria-label": g,
188
+ "aria-label": u,
185
189
  className: n(
186
- N({ side: r, size: d }),
187
- "relative shrink-0 overflow-hidden rounded-lg bg-card shadow-none outline-none",
188
- r === "bottom" && "h-full",
189
- v
190
+ N({ side: a, size: m }),
191
+ "relative shrink-0 overflow-hidden rounded-lg bg-card outline-none",
192
+ o === "floating" ? "border border-ng3 shadow-400" : "border-0 shadow-none",
193
+ a === "bottom" && "h-full",
194
+ d
190
195
  ),
191
196
  children: [
192
- /* @__PURE__ */ i(
197
+ c && /* @__PURE__ */ i(
193
198
  k,
194
199
  {
195
- onClick: () => e(!1),
200
+ onClick: () => t(!1),
196
201
  className: "right-2 top-1"
197
202
  }
198
203
  ),
199
- x
204
+ f
200
205
  ]
201
206
  }
202
207
  )
@@ -204,52 +209,56 @@ function L({
204
209
  "inline-drawer-slot"
205
210
  ) }) });
206
211
  }
207
- const J = L, M = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ i(
212
+ function J(e) {
213
+ return /* @__PURE__ */ i(E, { ...e, appearance: "floating" });
214
+ }
215
+ const Q = E, M = s.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ i(
208
216
  "div",
209
217
  {
210
- ref: s,
211
- className: n("flex flex-col gap-1 px-6 py-4 pr-14", t),
212
- ...e
218
+ ref: o,
219
+ className: n("flex flex-col gap-1 px-6 py-4 pr-14", e),
220
+ ...t
213
221
  }
214
222
  ));
215
223
  M.displayName = "DrawerHeader";
216
- const V = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ i(
224
+ const V = s.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ i(
217
225
  "h2",
218
226
  {
219
- ref: s,
220
- className: n("text-lg font-medium text-foreground", t),
221
- ...e
227
+ ref: o,
228
+ className: n("text-lg font-medium text-foreground", e),
229
+ ...t
222
230
  }
223
231
  ));
224
232
  V.displayName = "DrawerTitle";
225
- const I = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ i(
233
+ const I = s.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ i(
226
234
  "div",
227
235
  {
228
- ref: s,
236
+ ref: o,
229
237
  tabIndex: 0,
230
- className: n("flex-1 overflow-y-auto px-6 py-4 text-xs text-foreground", t),
231
- ...e
238
+ className: n("flex-1 overflow-y-auto px-6 py-4 text-xs text-foreground", e),
239
+ ...t
232
240
  }
233
241
  ));
234
242
  I.displayName = "DrawerBody";
235
- const P = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ i(
243
+ const P = s.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ i(
236
244
  "div",
237
245
  {
238
- ref: s,
246
+ ref: o,
239
247
  className: n(
240
248
  "flex items-center justify-end gap-2 px-6 py-4",
241
- t
249
+ e
242
250
  ),
243
- ...e
251
+ ...t
244
252
  }
245
253
  ));
246
254
  P.displayName = "DrawerFooter";
247
255
  export {
248
- L as Drawer,
256
+ E as Drawer,
249
257
  I as DrawerBody,
250
258
  P as DrawerFooter,
251
259
  M as DrawerHeader,
252
260
  V as DrawerTitle,
253
- J as InlineDrawer,
261
+ J as FloatingDrawer,
262
+ Q as InlineDrawer,
254
263
  G as ModalDrawer
255
264
  };
@@ -17,11 +17,10 @@ export interface DropdownContentProps extends React.HTMLAttributes<HTMLDivElemen
17
17
  align?: "start" | "end";
18
18
  /** Which side of the trigger the menu opens on. Default below. */
19
19
  side?: "top" | "bottom";
20
- sideOffset?: number;
21
20
  /** Opt in to focusing the first item when the menu opens. */
22
21
  autoFocusFirstItem?: boolean;
23
22
  }
24
- export declare function DropdownContent({ className, align, side, sideOffset, autoFocusFirstItem, children, ...props }: DropdownContentProps): React.ReactPortal;
23
+ export declare function DropdownContent({ className, align, side, autoFocusFirstItem, children, ...props }: DropdownContentProps): React.ReactPortal;
25
24
  export interface DropdownItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> {
26
25
  startContent?: React.ReactNode;
27
26
  danger?: boolean;
@@ -1,82 +1,81 @@
1
1
  "use client";
2
- import { jsxs as L, jsx as v } from "react/jsx-runtime";
2
+ import { jsxs as N, jsx as h } from "react/jsx-runtime";
3
3
  import * as s from "react";
4
- import { createPortal as I } from "react-dom";
5
- import { MotionConfig as P, AnimatePresence as z, motion as O } from "motion/react";
6
- import { cn as y } from "../lib/cn.js";
7
- import { menuVariants as q } from "../lib/motion.js";
8
- import { Ripple as $ } from "./ripple.js";
9
- const C = (r, t) => `${r === "top" ? "bottom" : "top"} ${t === "start" ? "left" : "right"}`, N = s.createContext(null);
4
+ import { createPortal as A } from "react-dom";
5
+ import { MotionConfig as I, AnimatePresence as P, motion as z } from "motion/react";
6
+ import { cn as R } from "../lib/cn.js";
7
+ import { menuVariants as S } from "../lib/motion.js";
8
+ import { Ripple as _ } from "./ripple.js";
9
+ const C = 6, L = (r, t) => `${r === "top" ? "bottom" : "top"} ${t === "start" ? "left" : "right"}`, O = s.createContext(null);
10
10
  function k(r) {
11
- const t = s.useContext(N);
11
+ const t = s.useContext(O);
12
12
  if (!t)
13
13
  throw new Error(`${r} must be used within a <Dropdown>.`);
14
14
  return t;
15
15
  }
16
- function U({ children: r, defaultOpen: t = !1 }) {
17
- const [n, u] = s.useState(t), l = s.useRef(null), p = s.useRef(null);
18
- return /* @__PURE__ */ v(N.Provider, { value: { open: n, setOpen: u, triggerRef: l, contentRef: p }, children: r });
16
+ function B({ children: r, defaultOpen: t = !1 }) {
17
+ const [n, f] = s.useState(t), p = s.useRef(null), d = s.useRef(null);
18
+ return /* @__PURE__ */ h(O.Provider, { value: { open: n, setOpen: f, triggerRef: p, contentRef: d }, children: r });
19
19
  }
20
- function V({ children: r }) {
21
- const { open: t, setOpen: n, triggerRef: u } = k("DropdownTrigger"), l = r;
22
- return s.cloneElement(l, {
23
- ref: u,
20
+ function U({ children: r }) {
21
+ const { open: t, setOpen: n, triggerRef: f } = k("DropdownTrigger"), p = r;
22
+ return s.cloneElement(p, {
23
+ ref: f,
24
24
  "aria-expanded": t,
25
25
  "aria-haspopup": "menu",
26
- onClick: (p) => {
27
- var b, a;
28
- (a = (b = l.props).onClick) == null || a.call(b, p), n(!t);
26
+ onClick: (d) => {
27
+ var a, m;
28
+ (m = (a = p.props).onClick) == null || m.call(a, d), n(!t);
29
29
  }
30
30
  });
31
31
  }
32
- function W({
32
+ function V({
33
33
  className: r,
34
34
  align: t = "start",
35
35
  side: n = "bottom",
36
- sideOffset: u = 6,
37
- autoFocusFirstItem: l = !1,
36
+ autoFocusFirstItem: f = !1,
38
37
  children: p,
39
- ...b
38
+ ...d
40
39
  }) {
41
- const { open: a, setOpen: h, triggerRef: g, contentRef: c } = k("DropdownContent"), [f, m] = s.useState(null);
40
+ const { open: a, setOpen: m, triggerRef: w, contentRef: c } = k("DropdownContent"), [l, D] = s.useState(null);
42
41
  s.useLayoutEffect(() => {
43
42
  if (!a) return;
44
- const i = g.current;
43
+ const i = w.current;
45
44
  if (!i) return;
46
45
  const e = () => {
47
- var x, D;
48
- const o = i.getBoundingClientRect(), d = ((x = c.current) == null ? void 0 : x.offsetWidth) ?? 0, w = ((D = c.current) == null ? void 0 : D.offsetHeight) ?? 0, E = t === "end" ? o.right - d : o.left, R = n === "top" ? o.top - w - u : o.bottom + u;
49
- m({ top: R, left: E });
46
+ var x, b;
47
+ const o = i.getBoundingClientRect(), u = ((x = c.current) == null ? void 0 : x.offsetWidth) ?? 0, v = ((b = c.current) == null ? void 0 : b.offsetHeight) ?? 0, y = t === "end" ? o.right - u : o.left, E = n === "top" ? o.top - v - C : o.bottom + C;
48
+ D({ top: E, left: y });
50
49
  };
51
50
  return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
52
51
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
53
52
  };
54
- }, [a, t, n, u, g, c]), s.useEffect(() => {
53
+ }, [a, t, n, w, c]), s.useEffect(() => {
55
54
  if (!a) return;
56
55
  const i = requestAnimationFrame(() => {
57
56
  var e, o;
58
- if (l) {
59
- const d = (e = c.current) == null ? void 0 : e.querySelector(
57
+ if (f) {
58
+ const u = (e = c.current) == null ? void 0 : e.querySelector(
60
59
  '[role="menuitem"]:not([aria-disabled="true"])'
61
60
  );
62
- d == null || d.focus();
61
+ u == null || u.focus();
63
62
  } else
64
63
  (o = c.current) == null || o.focus();
65
64
  });
66
65
  return () => cancelAnimationFrame(i);
67
- }, [a, l, c]), s.useEffect(() => {
66
+ }, [a, f, c]), s.useEffect(() => {
68
67
  if (!a) return;
69
68
  const i = (e) => {
70
- var d, w;
69
+ var u, v;
71
70
  const o = e.target;
72
- (d = c.current) != null && d.contains(o) || (w = g.current) != null && w.contains(o) || h(!1);
71
+ (u = c.current) != null && u.contains(o) || (v = w.current) != null && v.contains(o) || m(!1);
73
72
  };
74
73
  return document.addEventListener("pointerdown", i), () => document.removeEventListener("pointerdown", i);
75
- }, [a, h, g, c]);
76
- const A = (i) => {
77
- var d, w, E, R, x, D;
74
+ }, [a, m, w, c]);
75
+ const g = (i) => {
76
+ var u, v, y, E, x, b;
78
77
  const e = Array.from(
79
- ((d = c.current) == null ? void 0 : d.querySelectorAll(
78
+ ((u = c.current) == null ? void 0 : u.querySelectorAll(
80
79
  '[role="menuitem"]:not([aria-disabled="true"])'
81
80
  )) ?? []
82
81
  );
@@ -84,49 +83,49 @@ function W({
84
83
  const o = e.indexOf(document.activeElement);
85
84
  switch (i.key) {
86
85
  case "Escape":
87
- i.preventDefault(), h(!1), (w = g.current) == null || w.focus();
86
+ i.preventDefault(), m(!1), (v = w.current) == null || v.focus();
88
87
  break;
89
88
  case "ArrowDown":
90
- i.preventDefault(), (E = e[o < 0 ? 0 : (o + 1) % e.length]) == null || E.focus();
89
+ i.preventDefault(), (y = e[o < 0 ? 0 : (o + 1) % e.length]) == null || y.focus();
91
90
  break;
92
91
  case "ArrowUp":
93
- i.preventDefault(), (R = e[o < 0 ? e.length - 1 : (o - 1 + e.length) % e.length]) == null || R.focus();
92
+ i.preventDefault(), (E = e[o < 0 ? e.length - 1 : (o - 1 + e.length) % e.length]) == null || E.focus();
94
93
  break;
95
94
  case "Home":
96
95
  i.preventDefault(), (x = e[0]) == null || x.focus();
97
96
  break;
98
97
  case "End":
99
- i.preventDefault(), (D = e[e.length - 1]) == null || D.focus();
98
+ i.preventDefault(), (b = e[e.length - 1]) == null || b.focus();
100
99
  break;
101
100
  }
102
101
  };
103
- return I(
104
- /* @__PURE__ */ v(P, { reducedMotion: "user", children: /* @__PURE__ */ v(z, { children: a && /* @__PURE__ */ L(
105
- O.div,
102
+ return A(
103
+ /* @__PURE__ */ h(I, { reducedMotion: "user", children: /* @__PURE__ */ h(P, { children: a && /* @__PURE__ */ N(
104
+ z.div,
106
105
  {
107
106
  ref: c,
108
107
  role: "menu",
109
108
  tabIndex: -1,
110
- onKeyDown: A,
111
- variants: q,
109
+ onKeyDown: g,
110
+ variants: S,
112
111
  initial: "hidden",
113
112
  animate: "visible",
114
113
  exit: "hidden",
115
114
  style: {
116
115
  position: "fixed",
117
- top: (f == null ? void 0 : f.top) ?? 0,
118
- left: (f == null ? void 0 : f.left) ?? 0,
119
- visibility: f ? "visible" : "hidden",
120
- transformOrigin: C(n, t)
116
+ top: (l == null ? void 0 : l.top) ?? 0,
117
+ left: (l == null ? void 0 : l.left) ?? 0,
118
+ visibility: l ? "visible" : "hidden",
119
+ transformOrigin: L(n, t)
121
120
  },
122
- className: y(
123
- "relative z-50 min-w-44 rounded-lg border border-border bg-elevated p-1",
121
+ className: R(
122
+ "relative z-50 min-w-44 rounded-lg border border-menu-stroke bg-elevated p-1",
124
123
  "text-foreground shadow-elevation outline-none",
125
124
  r
126
125
  ),
127
- ...b,
126
+ ...d,
128
127
  children: [
129
- /* @__PURE__ */ v($, { origin: C(n, t) }),
128
+ /* @__PURE__ */ h(_, { origin: L(n, t) }),
130
129
  p
131
130
  ]
132
131
  }
@@ -134,78 +133,78 @@ function W({
134
133
  document.body
135
134
  );
136
135
  }
137
- const j = s.forwardRef(
136
+ const q = s.forwardRef(
138
137
  ({
139
138
  className: r,
140
139
  startContent: t,
141
140
  danger: n,
142
- disabled: u,
143
- restoreFocus: l = !0,
144
- onSelect: p,
145
- children: b,
146
- ...a
147
- }, h) => {
148
- const { setOpen: g, triggerRef: c } = k("DropdownItem"), f = () => {
149
- var m;
150
- u || (p == null || p(), g(!1), l && ((m = c.current) == null || m.focus()));
141
+ disabled: f,
142
+ restoreFocus: p = !0,
143
+ onSelect: d,
144
+ children: a,
145
+ ...m
146
+ }, w) => {
147
+ const { setOpen: c, triggerRef: l } = k("DropdownItem"), D = () => {
148
+ var g;
149
+ f || (d == null || d(), c(!1), p && ((g = l.current) == null || g.focus()));
151
150
  };
152
- return /* @__PURE__ */ L(
151
+ return /* @__PURE__ */ N(
153
152
  "div",
154
153
  {
155
- ref: h,
154
+ ref: w,
156
155
  role: "menuitem",
157
156
  tabIndex: -1,
158
- "aria-disabled": u || void 0,
159
- onClick: f,
160
- onKeyDown: (m) => {
161
- (m.key === "Enter" || m.key === " ") && (m.preventDefault(), f());
157
+ "aria-disabled": f || void 0,
158
+ onClick: D,
159
+ onKeyDown: (g) => {
160
+ (g.key === "Enter" || g.key === " ") && (g.preventDefault(), D());
162
161
  },
163
- className: y(
164
- "flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-xs",
162
+ className: R(
163
+ "flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-m font-medium",
165
164
  "outline-none transition-colors duration-150",
166
165
  "focus-visible:ring-3 focus-visible:ring-ring",
167
166
  n ? "text-danger" : "text-foreground",
168
- u ? "pointer-events-none opacity-50" : y("hover:bg-muted focus:bg-muted", n && "hover:bg-danger/10 focus:bg-danger/10"),
167
+ f ? "pointer-events-none opacity-50" : n ? "hover:bg-danger/10 focus:bg-danger/10" : "hover:bg-action-primary-soft hover:text-action-primary-text focus:bg-action-primary-soft focus:text-action-primary-text",
169
168
  "[&_svg]:size-4 [&_svg]:shrink-0",
170
169
  r
171
170
  ),
172
- ...a,
171
+ ...m,
173
172
  children: [
174
173
  t,
175
- /* @__PURE__ */ v("span", { className: "flex-1", children: b })
174
+ /* @__PURE__ */ h("span", { className: "flex-1", children: a })
176
175
  ]
177
176
  }
178
177
  );
179
178
  }
180
179
  );
181
- j.displayName = "DropdownItem";
182
- const H = s.forwardRef(({ className: r, ...t }, n) => /* @__PURE__ */ v(
180
+ q.displayName = "DropdownItem";
181
+ const F = s.forwardRef(({ className: r, ...t }, n) => /* @__PURE__ */ h(
183
182
  "div",
184
183
  {
185
184
  ref: n,
186
185
  role: "separator",
187
- className: y("my-1 h-px bg-border", r),
186
+ className: R("my-1 h-px bg-menu-stroke", r),
188
187
  ...t
189
188
  }
190
189
  ));
191
- H.displayName = "DropdownSeparator";
192
- const K = s.forwardRef(({ className: r, ...t }, n) => /* @__PURE__ */ v(
190
+ F.displayName = "DropdownSeparator";
191
+ const T = s.forwardRef(({ className: r, ...t }, n) => /* @__PURE__ */ h(
193
192
  "div",
194
193
  {
195
194
  ref: n,
196
- className: y(
195
+ className: R(
197
196
  "px-2 py-1.5 text-xs font-normal text-muted-foreground select-none",
198
197
  r
199
198
  ),
200
199
  ...t
201
200
  }
202
201
  ));
203
- K.displayName = "DropdownLabel";
202
+ T.displayName = "DropdownLabel";
204
203
  export {
205
- U as Dropdown,
206
- W as DropdownContent,
207
- j as DropdownItem,
208
- K as DropdownLabel,
209
- H as DropdownSeparator,
210
- V as DropdownTrigger
204
+ B as Dropdown,
205
+ V as DropdownContent,
206
+ q as DropdownItem,
207
+ T as DropdownLabel,
208
+ F as DropdownSeparator,
209
+ U as DropdownTrigger
211
210
  };