@cognite/aura 0.1.6 → 0.1.7

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.
@@ -1,199 +1,267 @@
1
- import { jsx as t, jsxs as E } from "react/jsx-runtime";
2
- import { createContext as R, forwardRef as x, useState as y, useMemo as z, useEffect as L, useContext as B } from "react";
3
- import { IconCheck as S, IconCopy as j, IconSelector as M, IconDownload as U } from "@tabler/icons-react";
4
- import { isStorybookTestEnv as h, highlightCode as F, cn as i } from "../../../../lib/utils.js";
5
- import { Button as I } from "../button/button.js";
6
- const g = R({
1
+ import { jsxs as L, jsx as r } from "react/jsx-runtime";
2
+ import { createContext as F, forwardRef as w, useState as x, useMemo as D, useEffect as O, useContext as H } from "react";
3
+ import { IconCheck as K, IconCopy as V, IconSelector as $, IconDownload as q } from "@tabler/icons-react";
4
+ import { isStorybookTestEnv as v, highlightCode as M, cn as f } from "../../../../lib/utils.js";
5
+ import { Button as S } from "../button/button.js";
6
+ const I = F({
7
7
  code: "",
8
8
  copyText: "",
9
9
  isCollapsed: !1,
10
10
  setIsCollapsed: () => {
11
11
  },
12
12
  lineCount: 0
13
- }), A = (e) => e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;"), O = x(
13
+ }), P = (e) => e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;"), E = 14, N = 8e3, W = 400, G = 16384;
14
+ function J(e) {
15
+ const t = e.split(`
16
+ `);
17
+ let n = !1, o = t.slice(0, E).join(`
18
+ `);
19
+ t.length > E && (n = !0), o.length > N && (o = o.slice(0, N), n = !0);
20
+ const a = o.length === 0 ? " " : o;
21
+ return n ? `${a}
22
+ …` : a;
23
+ }
24
+ function Q(e) {
25
+ return e.split(`
26
+ `).length > E || e.length > N;
27
+ }
28
+ function Y(e, t) {
29
+ return t > W || e.length > G;
30
+ }
31
+ function Z(e) {
32
+ return `<pre><code>${P(e)}</code></pre>`;
33
+ }
34
+ const ee = "min(60vh, 32rem)", oe = "dark:hidden [&>pre]:m-0 [&>pre]:min-h-10 [&>pre]:bg-card-background [&>pre]:p-2 [&>pre]:text-secondary-foreground [&>pre]:leading-[18px] [&>pre]:tracking-[-0.08px] [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm [&>pre]:overflow-x-auto", te = "hidden dark:block [&>pre]:m-0 [&>pre]:min-h-10 [&>pre]:bg-card-background [&>pre]:p-2 [&>pre]:text-secondary-foreground [&>pre]:leading-[18px] [&>pre]:tracking-[-0.08px] [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm [&>pre]:overflow-x-auto", ne = w(
14
35
  ({
15
36
  code: e,
16
- copyText: l,
17
- language: a,
18
- showLineNumbers: r = !1,
19
- collapsed: s = !1,
20
- className: d,
21
- children: c,
22
- ...m
23
- }, p) => {
24
- const [f, n] = y(""), [u, o] = y(""), [k, D] = y(s), b = e.length === 0 ? " " : e, N = e.split(`
25
- `).length, T = l ?? e, _ = z(
26
- () => h ? `<pre><code>${A(b)}</code></pre>` : "",
27
- [b]
37
+ copyText: t,
38
+ language: n,
39
+ showLineNumbers: o = !1,
40
+ collapsed: a = !1,
41
+ className: h,
42
+ children: i,
43
+ style: C,
44
+ ...k
45
+ }, b) => {
46
+ const [d, p] = x(""), [c, _] = x(""), [l, R] = x(a), s = e.length === 0 ? " " : e, y = e.split(`
47
+ `).length, A = t ?? e, T = D(
48
+ () => v ? `<pre><code>${P(s)}</code></pre>` : "",
49
+ [s]
28
50
  );
29
- L(() => {
30
- if (h) return;
31
- let w = !1;
32
- return F(b, a, r).then(([v, C]) => {
33
- w || (n(v), o(C));
34
- }).catch((v) => {
35
- if (console.error("Failed to highlight code:", v), !w) {
36
- const C = `<pre><code>${A(b)}</code></pre>`;
37
- n(C), o(C);
51
+ O(() => {
52
+ if (v) return;
53
+ let g = !1;
54
+ const B = (u) => {
55
+ if (!g) {
56
+ const m = Z(u);
57
+ p(m), _(m);
38
58
  }
39
- }), () => {
40
- w = !0;
41
59
  };
42
- }, [b, a, r]);
43
- const H = z(
60
+ if (l && Q(s)) {
61
+ const u = J(s);
62
+ return M(u, n, o).then(([m, j]) => {
63
+ g || (p(m), _(j));
64
+ }).catch((m) => {
65
+ console.error("Failed to highlight code:", m), B(u);
66
+ }), () => {
67
+ g = !0;
68
+ };
69
+ }
70
+ return !l && Y(s, y) ? (queueMicrotask(() => {
71
+ B(s);
72
+ }), () => {
73
+ g = !0;
74
+ }) : (M(s, n, o).then(([u, m]) => {
75
+ g || (p(u), _(m));
76
+ }).catch((u) => {
77
+ console.error("Failed to highlight code:", u), B(s);
78
+ }), () => {
79
+ g = !0;
80
+ });
81
+ }, [s, n, o, l, y]);
82
+ const z = D(
44
83
  () => ({
45
84
  code: e,
46
- copyText: T,
47
- isCollapsed: k,
48
- setIsCollapsed: D,
49
- lineCount: N
85
+ copyText: A,
86
+ isCollapsed: l,
87
+ setIsCollapsed: R,
88
+ lineCount: y
50
89
  }),
51
- [e, T, k, N]
52
- );
53
- return /* @__PURE__ */ t(g.Provider, { value: H, children: /* @__PURE__ */ E(
90
+ [e, A, l, y]
91
+ ), U = /* @__PURE__ */ L("div", { className: "relative", children: [
92
+ /* @__PURE__ */ r(
93
+ "div",
94
+ {
95
+ className: f(
96
+ oe,
97
+ l && "max-h-26 overflow-y-hidden"
98
+ ),
99
+ dangerouslySetInnerHTML: {
100
+ __html: v ? T : d
101
+ }
102
+ }
103
+ ),
104
+ /* @__PURE__ */ r(
105
+ "div",
106
+ {
107
+ className: f(
108
+ te,
109
+ l && "max-h-26 overflow-y-hidden"
110
+ ),
111
+ dangerouslySetInnerHTML: {
112
+ __html: v ? T : c
113
+ }
114
+ }
115
+ ),
116
+ l && /* @__PURE__ */ r("div", { className: "pointer-events-none absolute bottom-0 left-0 right-0 h-3/4 bg-linear-to-b from-transparent via-card-background/70 to-card-background" })
117
+ ] }), X = i != null ? /* @__PURE__ */ r(
118
+ "div",
119
+ {
120
+ "data-slot": "code-block-actions",
121
+ className: f(
122
+ /* Sibling of scroll inner: pinned while code scrolls; even inset from top/right (scrollbar gutter on inner) */
123
+ "pointer-events-none absolute top-5 right-5 z-20 flex items-center gap-1 bg-transparent p-0 shadow-none ring-0 outline-none",
124
+ "opacity-0 transition-opacity",
125
+ "group-hover/code-block:pointer-events-auto group-hover/code-block:opacity-100",
126
+ "group-focus-within/code-block:pointer-events-auto group-focus-within/code-block:opacity-100",
127
+ v && "pointer-events-auto opacity-100"
128
+ ),
129
+ children: i
130
+ }
131
+ ) : null;
132
+ return /* @__PURE__ */ r(I.Provider, { value: z, children: /* @__PURE__ */ L(
54
133
  "div",
55
134
  {
56
- ref: p,
135
+ ref: b,
57
136
  "data-slot": "code-block",
58
- className: i(
59
- "group/code-block relative w-full overflow-hidden rounded-xl bg-background text-foreground",
60
- d
137
+ className: f(
138
+ "group/code-block relative w-full rounded-xl bg-background text-foreground",
139
+ l ? "overflow-hidden" : (
140
+ /* Expanded: flex + clip so actions overlay without a reserved top row */
141
+ "flex min-h-0 max-h-[min(60vh,_32rem)] flex-col overflow-hidden"
142
+ ),
143
+ h
61
144
  ),
62
- ...m,
145
+ style: {
146
+ ...l ? {} : {
147
+ maxHeight: ee,
148
+ minHeight: 0
149
+ },
150
+ ...C
151
+ },
152
+ ...k,
63
153
  children: [
64
- /* @__PURE__ */ E("div", { className: "relative", children: [
65
- /* @__PURE__ */ t(
66
- "div",
67
- {
68
- className: i(
69
- "dark:hidden [&>pre]:m-0 [&>pre]:min-h-10 [&>pre]:bg-card-background [&>pre]:p-2 [&>pre]:text-secondary-foreground [&>pre]:leading-[18px] [&>pre]:tracking-[-0.08px] [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm [&>pre]:overflow-x-auto",
70
- k && "max-h-26 overflow-y-hidden"
71
- ),
72
- dangerouslySetInnerHTML: {
73
- __html: h ? _ : f
74
- }
75
- }
76
- ),
77
- /* @__PURE__ */ t(
78
- "div",
79
- {
80
- className: i(
81
- "hidden dark:block [&>pre]:m-0 [&>pre]:min-h-10 [&>pre]:bg-card-background [&>pre]:p-2 [&>pre]:text-secondary-foreground [&>pre]:leading-[18px] [&>pre]:tracking-[-0.08px] [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm [&>pre]:overflow-x-auto",
82
- k && "max-h-26 overflow-y-hidden"
83
- ),
84
- dangerouslySetInnerHTML: {
85
- __html: h ? _ : u
86
- }
87
- }
88
- ),
89
- k && /* @__PURE__ */ t("div", { className: "pointer-events-none absolute bottom-0 left-0 right-0 h-3/4 bg-linear-to-b from-transparent via-card-background/70 to-card-background" })
90
- ] }),
91
- c ? /* @__PURE__ */ t(
154
+ /* @__PURE__ */ r(
92
155
  "div",
93
156
  {
94
- "data-slot": "code-block-actions",
95
- className: i(
96
- "absolute top-2 right-2 flex items-center gap-1 opacity-0 transition-opacity group-hover/code-block:opacity-100 group-focus-within/code-block:opacity-100",
97
- h && "opacity-100"
157
+ className: f(
158
+ /* Match <pre> card tone so transparent actions are not over root bg-background */
159
+ "relative min-h-0 bg-card-background",
160
+ !l && "min-h-0 flex-1 overflow-x-auto overflow-y-auto [scrollbar-gutter:stable]"
98
161
  ),
99
- children: c
162
+ children: U
100
163
  }
101
- ) : null
164
+ ),
165
+ X
102
166
  ]
103
167
  }
104
168
  ) });
105
169
  }
106
170
  );
107
- O.displayName = "CodeBlock";
108
- const P = x(({ onCopy: e, onError: l, timeout: a = 2e3, children: r, className: s, ...d }, c) => {
109
- const [m, p] = y(!1), { copyText: f } = B(g), n = async () => {
171
+ ne.displayName = "CodeBlock";
172
+ const re = w(({ onCopy: e, onError: t, timeout: n = 2e3, children: o, className: a, ...h }, i) => {
173
+ const [C, k] = x(!1), { copyText: b } = H(I), d = async () => {
110
174
  if (typeof window > "u" || !navigator?.clipboard?.writeText) {
111
- l?.(new Error("Clipboard API not available"));
175
+ t?.(new Error("Clipboard API not available"));
112
176
  return;
113
177
  }
114
178
  try {
115
- await navigator.clipboard.writeText(f), p(!0), e?.(), setTimeout(() => p(!1), a);
116
- } catch (o) {
117
- console.warn("Clipboard write failed:", o), l?.(
118
- o instanceof Error ? o : new Error("Clipboard write failed")
179
+ await navigator.clipboard.writeText(b), k(!0), e?.(), setTimeout(() => k(!1), n);
180
+ } catch (c) {
181
+ console.warn("Clipboard write failed:", c), t?.(
182
+ c instanceof Error ? c : new Error("Clipboard write failed")
119
183
  );
120
184
  }
121
- }, u = m ? S : j;
122
- return /* @__PURE__ */ t(
123
- I,
185
+ }, p = C ? K : V;
186
+ return /* @__PURE__ */ r(
187
+ S,
124
188
  {
125
- ref: c,
189
+ ref: i,
126
190
  "data-slot": "code-block-copy-button",
127
- className: i("shrink-0", s),
128
- onClick: n,
191
+ className: f("shrink-0", a),
192
+ onClick: d,
129
193
  size: "icon-sm",
130
194
  variant: "secondary",
131
- ...d,
132
- children: r ?? /* @__PURE__ */ t(u, { size: 14 })
195
+ ...h,
196
+ children: o ?? /* @__PURE__ */ r(p, { size: 14 })
133
197
  }
134
198
  );
135
199
  });
136
- P.displayName = "CodeBlockCopyButton";
137
- const $ = x(({ children: e, className: l, ...a }, r) => {
138
- const { isCollapsed: s, setIsCollapsed: d, lineCount: c } = B(g);
139
- return c <= 1 ? null : /* @__PURE__ */ t(
140
- I,
200
+ re.displayName = "CodeBlockCopyButton";
201
+ const le = w(({ children: e, className: t, ...n }, o) => {
202
+ const { isCollapsed: a, setIsCollapsed: h, lineCount: i } = H(I);
203
+ return i <= 1 ? null : /* @__PURE__ */ r(
204
+ S,
141
205
  {
142
- ref: r,
206
+ ref: o,
143
207
  "data-slot": "code-block-collapse-button",
144
- className: i("shrink-0", l),
145
- onClick: () => d(!s),
208
+ className: f("shrink-0", t),
209
+ onClick: () => h(!a),
146
210
  size: "icon-sm",
147
211
  variant: "secondary",
148
- ...a,
149
- children: e ?? /* @__PURE__ */ t(M, { size: 14 })
212
+ ...n,
213
+ children: e ?? /* @__PURE__ */ r($, { size: 14 })
150
214
  }
151
215
  );
152
216
  });
153
- $.displayName = "CodeBlockCollapseButton";
154
- const q = x(
217
+ le.displayName = "CodeBlockCollapseButton";
218
+ const ae = w(
155
219
  ({
156
220
  fileName: e = "code.txt",
157
- mimeType: l = "text/plain;charset=utf-8",
158
- onDownload: a,
159
- onError: r,
160
- children: s,
161
- className: d,
162
- ...c
163
- }, m) => {
164
- const { code: p } = B(g), f = () => {
221
+ mimeType: t = "text/plain;charset=utf-8",
222
+ onDownload: n,
223
+ onError: o,
224
+ children: a,
225
+ className: h,
226
+ ...i
227
+ }, C) => {
228
+ const { code: k } = H(I), b = () => {
165
229
  if (typeof window > "u" || typeof document > "u") {
166
- r?.(new Error("Download not available"));
230
+ o?.(new Error("Download not available"));
167
231
  return;
168
232
  }
169
233
  try {
170
- const n = new Blob([p], { type: l }), u = URL.createObjectURL(n), o = document.createElement("a");
171
- o.href = u, o.download = e, o.rel = "noopener", o.click(), URL.revokeObjectURL(u), a?.();
172
- } catch (n) {
173
- r?.(
174
- n instanceof Error ? n : new Error("Download failed")
234
+ const d = new Blob([k], { type: t }), p = URL.createObjectURL(d), c = document.createElement("a");
235
+ c.href = p, c.download = e, c.rel = "noopener", c.click(), URL.revokeObjectURL(p), n?.();
236
+ } catch (d) {
237
+ o?.(
238
+ d instanceof Error ? d : new Error("Download failed")
175
239
  );
176
240
  }
177
241
  };
178
- return /* @__PURE__ */ t(
179
- I,
242
+ return /* @__PURE__ */ r(
243
+ S,
180
244
  {
181
- ref: m,
245
+ ref: C,
182
246
  "data-slot": "code-block-download-button",
183
- className: i("shrink-0", d),
184
- onClick: f,
247
+ className: f("shrink-0", h),
248
+ onClick: b,
185
249
  size: "icon-sm",
186
250
  variant: "secondary",
187
- ...c,
188
- children: s ?? /* @__PURE__ */ t(U, { size: 14 })
251
+ ...i,
252
+ children: a ?? /* @__PURE__ */ r(q, { size: 14 })
189
253
  }
190
254
  );
191
255
  }
192
256
  );
193
- q.displayName = "CodeBlockDownloadButton";
257
+ ae.displayName = "CodeBlockDownloadButton";
194
258
  export {
195
- O as CodeBlock,
196
- $ as CodeBlockCollapseButton,
197
- P as CodeBlockCopyButton,
198
- q as CodeBlockDownloadButton
259
+ ne as CodeBlock,
260
+ le as CodeBlockCollapseButton,
261
+ re as CodeBlockCopyButton,
262
+ ae as CodeBlockDownloadButton,
263
+ J as getCollapsedPreviewDisplay,
264
+ Q as isContentLargerThanPreview,
265
+ Z as plainPreMarkup,
266
+ Y as shouldUsePlainTextInsteadOfShiki
199
267
  };
@@ -4,7 +4,7 @@ declare function DropdownMenu({ ...props }: MenuPrimitive.Root.Props): import("r
4
4
  declare namespace DropdownMenu {
5
5
  var displayName: string;
6
6
  }
7
- declare function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props): import("react/jsx-runtime").JSX.Element;
7
+ declare function DropdownMenuPortal({ container, ...props }: MenuPrimitive.Portal.Props): import("react/jsx-runtime").JSX.Element;
8
8
  declare namespace DropdownMenuPortal {
9
9
  var displayName: string;
10
10
  }
@@ -1,21 +1,24 @@
1
- import { jsx as t, jsxs as p } from "react/jsx-runtime";
1
+ import { jsx as n, jsxs as c } from "react/jsx-runtime";
2
2
  import { forwardRef as u } from "react";
3
3
  import { Menu as r } from "@base-ui/react/menu";
4
- import { IconCheck as c, IconChevronRight as f } from "@tabler/icons-react";
4
+ import { IconCheck as p, IconChevronRight as f } from "@tabler/icons-react";
5
5
  import { usePortalContainer as b } from "../../../../lib/portal-container-context.js";
6
6
  import { cn as d } from "../../../../lib/utils.js";
7
7
  function v({ ...e }) {
8
- return /* @__PURE__ */ t(r.Root, { "data-slot": "dropdown-menu", ...e });
8
+ return /* @__PURE__ */ n(r.Root, { "data-slot": "dropdown-menu", ...e });
9
9
  }
10
10
  v.displayName = "DropdownMenu";
11
- function l({ ...e }) {
12
- const o = b();
13
- return /* @__PURE__ */ t(
11
+ function l({
12
+ container: e,
13
+ ...o
14
+ }) {
15
+ const t = b();
16
+ return /* @__PURE__ */ n(
14
17
  r.Portal,
15
18
  {
16
19
  "data-slot": "dropdown-menu-portal",
17
- container: o,
18
- ...e
20
+ container: e ?? t,
21
+ ...o
19
22
  }
20
23
  );
21
24
  }
@@ -24,27 +27,27 @@ function w({
24
27
  children: e,
25
28
  ...o
26
29
  }) {
27
- return /* @__PURE__ */ t(r.Trigger, { "data-slot": "dropdown-menu-trigger", ...o, children: e });
30
+ return /* @__PURE__ */ n(r.Trigger, { "data-slot": "dropdown-menu-trigger", ...o, children: e });
28
31
  }
29
32
  w.displayName = "DropdownMenuTrigger";
30
33
  function m({
31
34
  align: e = "start",
32
35
  alignOffset: o = 0,
33
- side: n = "bottom",
36
+ side: t = "bottom",
34
37
  sideOffset: a = 4,
35
38
  className: s,
36
39
  container: i,
37
40
  ...g
38
41
  }) {
39
- return /* @__PURE__ */ t(l, { container: i, children: /* @__PURE__ */ t(
42
+ return /* @__PURE__ */ n(l, { container: i, children: /* @__PURE__ */ n(
40
43
  r.Positioner,
41
44
  {
42
45
  className: "isolate z-50 outline-none",
43
46
  align: e,
44
47
  alignOffset: o,
45
- side: n,
48
+ side: t,
46
49
  sideOffset: a,
47
- children: /* @__PURE__ */ t(
50
+ children: /* @__PURE__ */ n(
48
51
  r.Popup,
49
52
  {
50
53
  "data-slot": "dropdown-menu-content",
@@ -60,16 +63,16 @@ function m({
60
63
  }
61
64
  m.displayName = "DropdownMenuContent";
62
65
  function x({ ...e }) {
63
- return /* @__PURE__ */ t(r.Group, { "data-slot": "dropdown-menu-group", ...e });
66
+ return /* @__PURE__ */ n(r.Group, { "data-slot": "dropdown-menu-group", ...e });
64
67
  }
65
68
  x.displayName = "DropdownMenuGroup";
66
- const h = u(({ className: e, inset: o, variant: n = "default", children: a, ...s }, i) => /* @__PURE__ */ t(
69
+ const h = u(({ className: e, inset: o, variant: t = "default", children: a, ...s }, i) => /* @__PURE__ */ n(
67
70
  r.Item,
68
71
  {
69
72
  ref: i,
70
73
  "data-slot": "dropdown-menu-item",
71
74
  "data-inset": o,
72
- "data-variant": n,
75
+ "data-variant": t,
73
76
  className: d(
74
77
  "focus:bg-accent-background focus:text-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive-background-hover dark:data-[variant=destructive]:focus:bg-destructive-background-hover data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:text-destructive-foreground data-[variant=destructive]:hover:bg-destructive-background-hover dark:data-[variant=destructive]:hover:bg-destructive-background-hover [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm p-2 text-base outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
75
78
  e
@@ -79,7 +82,7 @@ const h = u(({ className: e, inset: o, variant: n = "default", children: a, ...s
79
82
  }
80
83
  ));
81
84
  h.displayName = "DropdownMenuItem";
82
- const M = u(({ className: e, children: o, checked: n, ...a }, s) => /* @__PURE__ */ p(
85
+ const M = u(({ className: e, children: o, checked: t, ...a }, s) => /* @__PURE__ */ c(
83
86
  r.CheckboxItem,
84
87
  {
85
88
  ref: s,
@@ -88,17 +91,17 @@ const M = u(({ className: e, children: o, checked: n, ...a }, s) => /* @__PURE__
88
91
  "focus:bg-accent-background focus:text-foreground h-9 relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
89
92
  e
90
93
  ),
91
- checked: n,
94
+ checked: t,
92
95
  ...a,
93
96
  children: [
94
- /* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(r.CheckboxItemIndicator, { children: /* @__PURE__ */ t(c, { className: "size-4 text-foreground" }) }) }),
97
+ /* @__PURE__ */ n("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ n(r.CheckboxItemIndicator, { children: /* @__PURE__ */ n(p, { className: "size-4 text-foreground" }) }) }),
95
98
  o
96
99
  ]
97
100
  }
98
101
  ));
99
102
  M.displayName = "DropdownMenuCheckboxItem";
100
103
  function D({ ...e }) {
101
- return /* @__PURE__ */ t(
104
+ return /* @__PURE__ */ n(
102
105
  r.RadioGroup,
103
106
  {
104
107
  "data-slot": "dropdown-menu-radio-group",
@@ -107,7 +110,7 @@ function D({ ...e }) {
107
110
  );
108
111
  }
109
112
  D.displayName = "DropdownMenuRadioGroup";
110
- const N = u(({ className: e, children: o, ...n }, a) => /* @__PURE__ */ p(
113
+ const N = u(({ className: e, children: o, ...t }, a) => /* @__PURE__ */ c(
111
114
  r.RadioItem,
112
115
  {
113
116
  ref: a,
@@ -116,15 +119,15 @@ const N = u(({ className: e, children: o, ...n }, a) => /* @__PURE__ */ p(
116
119
  "focus:bg-accent-background focus:text-foreground h-9 relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
117
120
  e
118
121
  ),
119
- ...n,
122
+ ...t,
120
123
  children: [
121
- /* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(r.RadioItemIndicator, { children: /* @__PURE__ */ t(c, { className: "size-4 text-foreground" }) }) }),
124
+ /* @__PURE__ */ n("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ n(r.RadioItemIndicator, { children: /* @__PURE__ */ n(p, { className: "size-4 text-foreground" }) }) }),
122
125
  o
123
126
  ]
124
127
  }
125
128
  ));
126
129
  N.displayName = "DropdownMenuRadioItem";
127
- const y = u(({ className: e, inset: o, ...n }, a) => /* @__PURE__ */ t(
130
+ const y = u(({ className: e, inset: o, ...t }, a) => /* @__PURE__ */ n(
128
131
  r.GroupLabel,
129
132
  {
130
133
  ref: a,
@@ -134,14 +137,14 @@ const y = u(({ className: e, inset: o, ...n }, a) => /* @__PURE__ */ t(
134
137
  "-mx-1 -mt-1 mb-1 px-2 py-1.5 text-sm border-b border-border font-medium data-inset:pl-8 text-foreground dark:text-foreground",
135
138
  e
136
139
  ),
137
- ...n
140
+ ...t
138
141
  }
139
142
  ));
140
143
  y.displayName = "DropdownMenuLabel";
141
- const k = u(({ className: e, ...o }, n) => /* @__PURE__ */ t(
144
+ const k = u(({ className: e, ...o }, t) => /* @__PURE__ */ n(
142
145
  "div",
143
146
  {
144
- ref: n,
147
+ ref: t,
145
148
  "data-slot": "dropdown-menu-header",
146
149
  className: d(
147
150
  "-mx-1 -mt-1 mb-1 flex flex-row items-center gap-2 border-b border-border px-2 py-2 pointer-events-none",
@@ -151,20 +154,20 @@ const k = u(({ className: e, ...o }, n) => /* @__PURE__ */ t(
151
154
  }
152
155
  ));
153
156
  k.displayName = "DropdownMenuHeader";
154
- const z = u(({ className: e, ...o }, n) => /* @__PURE__ */ t(
157
+ const z = u(({ className: e, ...o }, t) => /* @__PURE__ */ n(
155
158
  r.Separator,
156
159
  {
157
- ref: n,
160
+ ref: t,
158
161
  "data-slot": "dropdown-menu-separator",
159
162
  className: d("bg-border -mx-1 my-1 h-px", e),
160
163
  ...o
161
164
  }
162
165
  ));
163
166
  z.displayName = "DropdownMenuSeparator";
164
- const I = u(({ className: e, ...o }, n) => /* @__PURE__ */ t(
167
+ const I = u(({ className: e, ...o }, t) => /* @__PURE__ */ n(
165
168
  "span",
166
169
  {
167
- ref: n,
170
+ ref: t,
168
171
  "data-slot": "dropdown-menu-shortcut",
169
172
  className: d(
170
173
  "text-muted-foreground ml-auto text-xs tracking-widest",
@@ -175,10 +178,10 @@ const I = u(({ className: e, ...o }, n) => /* @__PURE__ */ t(
175
178
  ));
176
179
  I.displayName = "DropdownMenuShortcut";
177
180
  function S({ ...e }) {
178
- return /* @__PURE__ */ t(r.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...e });
181
+ return /* @__PURE__ */ n(r.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...e });
179
182
  }
180
183
  S.displayName = "DropdownMenuSub";
181
- const _ = u(({ className: e, inset: o, children: n, ...a }, s) => /* @__PURE__ */ p(
184
+ const _ = u(({ className: e, inset: o, children: t, ...a }, s) => /* @__PURE__ */ c(
182
185
  r.SubmenuTrigger,
183
186
  {
184
187
  ref: s,
@@ -190,8 +193,8 @@ const _ = u(({ className: e, inset: o, children: n, ...a }, s) => /* @__PURE__ *
190
193
  ),
191
194
  ...a,
192
195
  children: [
193
- n,
194
- /* @__PURE__ */ t(f, { className: "ml-auto size-4" })
196
+ t,
197
+ /* @__PURE__ */ n(f, { className: "ml-auto size-4" })
195
198
  ]
196
199
  }
197
200
  ));
@@ -199,29 +202,29 @@ _.displayName = "DropdownMenuSubTrigger";
199
202
  function C({
200
203
  align: e = "start",
201
204
  alignOffset: o = -3,
202
- side: n = "right",
205
+ side: t = "right",
203
206
  sideOffset: a = 0,
204
207
  className: s,
205
208
  ...i
206
209
  }) {
207
- return /* @__PURE__ */ t(
210
+ return /* @__PURE__ */ n(
208
211
  m,
209
212
  {
210
213
  "data-slot": "dropdown-menu-sub-content",
211
214
  className: d("min-w-32 w-auto", s),
212
215
  align: e,
213
216
  alignOffset: o,
214
- side: n,
217
+ side: t,
215
218
  sideOffset: a,
216
219
  ...i
217
220
  }
218
221
  );
219
222
  }
220
223
  C.displayName = "DropdownMenuSubContent";
221
- const R = u(({ className: e, ...o }, n) => /* @__PURE__ */ t(
224
+ const R = u(({ className: e, ...o }, t) => /* @__PURE__ */ n(
222
225
  "div",
223
226
  {
224
- ref: n,
227
+ ref: t,
225
228
  "data-slot": "dropdown-menu-section-label",
226
229
  className: d(
227
230
  "px-2 py-1 text-sm text-muted-foreground dark:text-muted-foreground",
@@ -0,0 +1,3 @@
1
+ declare const ScrollArea: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ScrollAreaRootProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
2
+ declare const ScrollBar: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ScrollAreaScrollbarProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
3
+ export { ScrollArea, ScrollBar };