@acronis-platform/ui-react 0.24.0 → 0.25.1

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,104 +1,104 @@
1
- import { jsx as n, jsxs as m, Fragment as w } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as b, Fragment as T } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
- import { mergeProps as x } from "@base-ui/react/merge-props";
4
- import { useRender as f } from "@base-ui/react/use-render";
5
- import { Collapsible as v } from "@base-ui/react/collapsible";
6
- import { ChevronRightIcon as R, ChevronDownIcon as M, SquareArrowUpRightIcon as C } from "@acronis-platform/icons-react/stroke-mono";
3
+ import { mergeProps as v } from "@base-ui/react/merge-props";
4
+ import { useRender as S } from "@base-ui/react/use-render";
5
+ import { Collapsible as p } from "@base-ui/react/collapsible";
6
+ import { ChevronRightIcon as k, ChevronDownIcon as w, SquareArrowUpRightIcon as I } from "@acronis-platform/icons-react/stroke-mono";
7
7
  import { cva as z } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
8
8
  import { cn as o } from "../../../lib/utils.js";
9
- const S = d.createContext(null);
10
- function p() {
11
- return d.useContext(S) ?? {
9
+ const C = d.createContext(null);
10
+ function y() {
11
+ return d.useContext(C) ?? {
12
12
  expanded: !0,
13
13
  toggleExpanded: () => {
14
14
  }
15
15
  };
16
16
  }
17
- function I(r, e, a) {
18
- const [i, s] = d.useState(e), t = r !== void 0, c = t ? r : i, l = d.useCallback(
17
+ function E(n, e, r) {
18
+ const [s, i] = d.useState(e), t = n !== void 0, c = t ? n : s, l = d.useCallback(
19
19
  (u) => {
20
- t || s(u), a == null || a(u);
20
+ t || i(u), r == null || r(u);
21
21
  },
22
- [t, a]
22
+ [t, r]
23
23
  );
24
24
  return [c, l];
25
25
  }
26
- const k = d.forwardRef(
26
+ const P = d.forwardRef(
27
27
  ({
28
- className: r,
28
+ className: n,
29
29
  expanded: e,
30
- defaultExpanded: a = !0,
31
- onExpandedChange: i,
32
- "aria-label": s = "Section navigation",
30
+ defaultExpanded: r = !0,
31
+ onExpandedChange: s,
32
+ "aria-label": i = "Section navigation",
33
33
  render: t,
34
34
  children: c,
35
35
  ...l
36
36
  }, u) => {
37
- const [b, y] = I(
37
+ const [m, g] = E(
38
38
  e,
39
- a,
40
- i
41
- ), h = d.useMemo(
42
- () => ({ expanded: b, toggleExpanded: () => y(!b) }),
43
- [b, y]
44
- ), N = f({
39
+ r,
40
+ s
41
+ ), R = d.useMemo(
42
+ () => ({ expanded: m, toggleExpanded: () => g(!m) }),
43
+ [m, g]
44
+ ), M = S({
45
45
  render: t,
46
46
  ref: u,
47
47
  defaultTagName: "nav",
48
- props: x(
48
+ props: v(
49
49
  {
50
- "aria-label": s,
51
- "data-state": b ? "expanded" : "collapsed",
50
+ "aria-label": i,
51
+ "data-state": m ? "expanded" : "collapsed",
52
52
  className: o(
53
53
  "group/sidebar flex h-full flex-col bg-[var(--ui-sidebar-secondary-global-container-color)] border-r border-[var(--ui-sidebar-secondary-global-container-border-color)] [border-right-width:var(--ui-sidebar-secondary-global-container-border-width)] w-[var(--ui-sidebar-secondary-collapsed-container-width)] data-[state=expanded]:w-[var(--ui-sidebar-secondary-expanded-container-width)] transition-[width]",
54
- r
54
+ n
55
55
  ),
56
56
  children: c
57
57
  },
58
58
  l
59
59
  )
60
60
  });
61
- return /* @__PURE__ */ n(S.Provider, { value: h, children: N });
61
+ return /* @__PURE__ */ a(C.Provider, { value: R, children: M });
62
62
  }
63
63
  );
64
- k.displayName = "SidebarSecondary";
65
- const T = d.forwardRef(({ className: r, label: e, children: a, ...i }, s) => /* @__PURE__ */ n(
64
+ P.displayName = "SidebarSecondary";
65
+ const L = d.forwardRef(({ className: n, label: e, children: r, ...s }, i) => /* @__PURE__ */ a(
66
66
  "div",
67
67
  {
68
- ref: s,
68
+ ref: i,
69
69
  className: o(
70
70
  "flex items-center shrink-0",
71
71
  "px-[var(--ui-sidebar-secondary-collapsed-container-header-padding-x)] py-[var(--ui-sidebar-secondary-collapsed-container-header-padding-y)]",
72
72
  "group-data-[state=expanded]/sidebar:px-[var(--ui-sidebar-secondary-expanded-container-header-padding-x)] group-data-[state=expanded]/sidebar:py-[var(--ui-sidebar-secondary-expanded-container-header-padding-y)]",
73
- r
73
+ n
74
74
  ),
75
- ...i,
76
- children: /* @__PURE__ */ n("h2", { className: "ui-sidebar-secondary-global-header-label-text-style truncate text-[var(--ui-sidebar-secondary-global-header-label-color)]", children: e ?? a })
75
+ ...s,
76
+ children: /* @__PURE__ */ a("h2", { className: "ui-sidebar-secondary-global-header-label-text-style truncate text-[var(--ui-sidebar-secondary-global-header-label-color)]", children: e ?? r })
77
77
  }
78
78
  ));
79
- T.displayName = "SidebarSecondaryHeader";
80
- const E = d.forwardRef(({ className: r, ...e }, a) => (
79
+ L.displayName = "SidebarSecondaryHeader";
80
+ const _ = d.forwardRef(({ className: n, ...e }, r) => (
81
81
  // Expanded: the section list. Hidden in collapsed mode, where the
82
82
  // CollapsedBreadcrumb sibling takes over.
83
- /* @__PURE__ */ n(
83
+ /* @__PURE__ */ a(
84
84
  "div",
85
85
  {
86
- ref: a,
86
+ ref: r,
87
87
  className: o(
88
88
  "flex flex-1 flex-col overflow-y-auto gap-[var(--ui-sidebar-secondary-global-section-list-gap)]",
89
89
  "hidden group-data-[state=expanded]/sidebar:flex",
90
- r
90
+ n
91
91
  ),
92
92
  ...e
93
93
  }
94
94
  )
95
95
  ));
96
- E.displayName = "SidebarSecondaryContent";
97
- const L = d.forwardRef(({ className: r, parentLabel: e, currentLabel: a, separator: i, ...s }, t) => (
96
+ _.displayName = "SidebarSecondaryContent";
97
+ const A = d.forwardRef(({ className: n, parentLabel: e, currentLabel: r, separator: s, ...i }, t) => (
98
98
  // Shown only in collapsed mode — toggled by the same data-[state] selector so
99
99
  // it stays in the DOM (SSR-present) with no JS branch. Laid out vertically:
100
100
  // parent → separator → current page.
101
- /* @__PURE__ */ m(
101
+ /* @__PURE__ */ b(
102
102
  "div",
103
103
  {
104
104
  ref: t,
@@ -106,82 +106,135 @@ const L = d.forwardRef(({ className: r, parentLabel: e, currentLabel: a, separat
106
106
  "flex flex-col items-center shrink-0",
107
107
  "gap-[var(--ui-sidebar-secondary-collapsed-container-content-gap)] py-[var(--ui-sidebar-secondary-collapsed-container-content-padding-y)]",
108
108
  "flex group-data-[state=expanded]/sidebar:hidden",
109
- r
109
+ n
110
110
  ),
111
- ...s,
111
+ ...i,
112
112
  children: [
113
- /* @__PURE__ */ n("span", { className: "ui-sidebar-secondary-collapsed-breadcrumb-label-text-style text-[var(--ui-sidebar-secondary-collapsed-breadcrumb-label-color)]", children: e }),
114
- /* @__PURE__ */ n(
113
+ /* @__PURE__ */ a("span", { className: "ui-sidebar-secondary-collapsed-breadcrumb-label-text-style text-[var(--ui-sidebar-secondary-collapsed-breadcrumb-label-color)]", children: e }),
114
+ /* @__PURE__ */ a(
115
115
  "span",
116
116
  {
117
117
  "aria-hidden": "true",
118
118
  className: "inline-flex items-center text-[var(--ui-sidebar-secondary-collapsed-icon-separator-color)] [&>svg]:size-[var(--ui-sidebar-secondary-collapsed-icon-separator-size)]",
119
- children: i ?? /* @__PURE__ */ n(R, { size: 16 })
119
+ children: s ?? /* @__PURE__ */ a(k, { size: 16 })
120
120
  }
121
121
  ),
122
- /* @__PURE__ */ n("span", { className: "ui-sidebar-secondary-collapsed-label-current-page-text-style text-[var(--ui-sidebar-secondary-collapsed-label-current-page-color)]", children: a })
122
+ /* @__PURE__ */ a("span", { className: "ui-sidebar-secondary-collapsed-label-current-page-text-style text-[var(--ui-sidebar-secondary-collapsed-label-current-page-color)]", children: r })
123
123
  ]
124
124
  }
125
125
  )
126
126
  ));
127
- L.displayName = "SidebarSecondaryCollapsedBreadcrumb";
128
- const P = d.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ n(
127
+ A.displayName = "SidebarSecondaryCollapsedBreadcrumb";
128
+ const B = d.forwardRef(({ className: n, ...e }, r) => /* @__PURE__ */ a(
129
129
  "div",
130
130
  {
131
- ref: a,
131
+ ref: r,
132
132
  className: o(
133
133
  "flex flex-col shrink-0",
134
134
  "border-t border-[var(--ui-sidebar-secondary-global-container-footer-border-color)] [border-top-width:var(--ui-sidebar-secondary-global-container-footer-border-width)]",
135
135
  "py-[var(--ui-sidebar-secondary-section-container-padding-y)]",
136
- r
136
+ n
137
137
  ),
138
138
  ...e
139
139
  }
140
140
  ));
141
- P.displayName = "SidebarSecondaryFooter";
142
- const B = d.forwardRef(({ className: r, ...e }, a) => (
143
- // Sections are separated by vertical padding + the section label; the next-gen
144
- // token sync removed the inter-section divider (no
145
- // `--ui-sidebar-secondary-section-container-border-*` token survives).
146
- /* @__PURE__ */ n(
141
+ B.displayName = "SidebarSecondaryFooter";
142
+ const x = d.createContext({ expandable: !1 }), F = { expandable: !1 }, H = { expandable: !0 }, V = d.forwardRef(
143
+ ({ className: n, expandable: e = !1, open: r, defaultOpen: s = !0, onOpenChange: i, children: t, ...c }, l) => {
144
+ const u = o(
145
+ "flex flex-col py-[var(--ui-sidebar-secondary-section-container-padding-y)]",
146
+ n
147
+ );
148
+ return e ? /* @__PURE__ */ a(x.Provider, { value: H, children: /* @__PURE__ */ a(
149
+ p.Root,
150
+ {
151
+ ref: l,
152
+ open: r,
153
+ defaultOpen: s,
154
+ onOpenChange: i,
155
+ render: /* @__PURE__ */ a("div", { className: u }),
156
+ ...c,
157
+ children: t
158
+ }
159
+ ) }) : /* @__PURE__ */ a(x.Provider, { value: F, children: /* @__PURE__ */ a("div", { ref: l, className: u, ...c, children: t }) });
160
+ }
161
+ );
162
+ V.displayName = "SidebarSecondarySection";
163
+ const h = "ui-sidebar-secondary-section-label-section-text-style text-[var(--ui-sidebar-secondary-section-label-section-color)]", N = "pb-[var(--ui-sidebar-secondary-section-container-header-padding-y)] px-[var(--ui-sidebar-secondary-section-container-header-padding-x)]", j = d.forwardRef(({ className: n, actions: e, unreadRollup: r, children: s, ...i }, t) => {
164
+ const { expandable: c } = d.useContext(x);
165
+ if (!c) {
166
+ const l = o(h, N, n);
167
+ return e == null ? /* @__PURE__ */ a("div", { ref: t, className: l, ...i, children: s }) : /* @__PURE__ */ b(
168
+ "div",
169
+ {
170
+ ref: t,
171
+ className: o(
172
+ l,
173
+ "flex items-center gap-[var(--ui-sidebar-secondary-section-container-header-gap)]"
174
+ ),
175
+ ...i,
176
+ children: [
177
+ /* @__PURE__ */ a("span", { className: "min-w-0 flex-1 truncate", children: s }),
178
+ /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center", children: e })
179
+ ]
180
+ }
181
+ );
182
+ }
183
+ return /* @__PURE__ */ b(
147
184
  "div",
148
185
  {
149
- ref: a,
186
+ ref: t,
150
187
  className: o(
151
- "flex flex-col py-[var(--ui-sidebar-secondary-section-container-padding-y)]",
152
- r
188
+ "flex items-center gap-[var(--ui-sidebar-secondary-section-container-header-gap)]",
189
+ N,
190
+ n
191
+ ),
192
+ ...i,
193
+ children: [
194
+ /* @__PURE__ */ b(
195
+ p.Trigger,
196
+ {
197
+ className: o(
198
+ "group/section flex min-w-0 flex-1 items-center gap-[var(--ui-sidebar-secondary-section-container-header-gap)] text-left",
199
+ h,
200
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-brand)] focus-visible:ring-inset"
201
+ ),
202
+ children: [
203
+ /* @__PURE__ */ a(
204
+ w,
205
+ {
206
+ size: 16,
207
+ "aria-hidden": "true",
208
+ className: "shrink-0 -rotate-90 transition-transform group-data-[panel-open]/section:rotate-0 text-[var(--ui-sidebar-secondary-section-icon-arrow-color)]"
209
+ }
210
+ ),
211
+ /* @__PURE__ */ a("span", { className: "min-w-0 flex-1 truncate", children: s }),
212
+ r != null && /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center group-data-[panel-open]/section:hidden", children: r })
213
+ ]
214
+ }
215
+ ),
216
+ e != null && /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center", children: e })
217
+ ]
218
+ }
219
+ );
220
+ });
221
+ j.displayName = "SidebarSecondarySectionLabel";
222
+ const D = d.forwardRef(({ className: n, ...e }, r) => {
223
+ const { expandable: s } = d.useContext(x), i = /* @__PURE__ */ a(
224
+ "ul",
225
+ {
226
+ ref: r,
227
+ className: o(
228
+ "flex flex-col gap-[var(--ui-sidebar-secondary-section-menu-item-list-gap)]",
229
+ n
153
230
  ),
154
231
  ...e
155
232
  }
156
- )
157
- ));
158
- B.displayName = "SidebarSecondarySection";
159
- const F = d.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ n(
160
- "div",
161
- {
162
- ref: a,
163
- className: o(
164
- "ui-sidebar-secondary-section-label-section-text-style text-[var(--ui-sidebar-secondary-section-label-section-color)]",
165
- "pb-[var(--ui-sidebar-secondary-section-container-header-padding-y)] px-[var(--ui-sidebar-secondary-section-container-header-padding-x)]",
166
- r
167
- ),
168
- ...e
169
- }
170
- ));
171
- F.displayName = "SidebarSecondarySectionLabel";
172
- const V = d.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ n(
173
- "ul",
174
- {
175
- ref: a,
176
- className: o(
177
- "flex flex-col gap-[var(--ui-sidebar-secondary-section-menu-item-list-gap)]",
178
- r
179
- ),
180
- ...e
181
- }
182
- ));
183
- V.displayName = "SidebarSecondaryMenu";
184
- const _ = "group/row flex w-full items-center gap-[var(--ui-sidebar-secondary-menu-item-global-container-gap)] min-h-[var(--ui-sidebar-secondary-menu-item-global-container-height-min)] px-[var(--ui-sidebar-secondary-menu-item-global-container-padding-x)] py-[var(--ui-sidebar-secondary-menu-item-global-container-padding-y)] no-underline ui-sidebar-secondary-menu-item-global-label-text-style transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-brand)] focus-visible:ring-inset text-[var(--ui-sidebar-secondary-menu-item-global-label-color-color)] [&_svg]:shrink-0 [&_svg]:size-[var(--ui-sidebar-secondary-menu-item-global-icon-size)] [&_svg]:text-[var(--ui-sidebar-secondary-menu-item-global-icon-color-color)]", g = z(_, {
233
+ );
234
+ return s ? /* @__PURE__ */ a(p.Panel, { children: i }) : i;
235
+ });
236
+ D.displayName = "SidebarSecondaryMenu";
237
+ const O = "group/row flex w-full items-center gap-[var(--ui-sidebar-secondary-menu-item-global-container-gap)] min-h-[var(--ui-sidebar-secondary-menu-item-global-container-height-min)] px-[var(--ui-sidebar-secondary-menu-item-global-container-padding-x)] py-[var(--ui-sidebar-secondary-menu-item-global-container-padding-y)] no-underline ui-sidebar-secondary-menu-item-global-label-text-style transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-brand)] focus-visible:ring-inset text-[var(--ui-sidebar-secondary-menu-item-global-label-color-color)] [&_svg]:shrink-0 [&_svg]:size-[var(--ui-sidebar-secondary-menu-item-global-icon-size)] [&_svg]:text-[var(--ui-sidebar-secondary-menu-item-global-icon-color-color)]", f = z(O, {
185
238
  variants: {
186
239
  variant: {
187
240
  unselected: "bg-[var(--ui-sidebar-secondary-menu-item-unselected-container-color-idle)] hover:bg-[var(--ui-sidebar-secondary-menu-item-unselected-container-color-hover)] active:bg-[var(--ui-sidebar-secondary-menu-item-unselected-container-color-active)]",
@@ -191,27 +244,27 @@ const _ = "group/row flex w-full items-center gap-[var(--ui-sidebar-secondary-me
191
244
  defaultVariants: {
192
245
  variant: "unselected"
193
246
  }
194
- }), j = d.forwardRef(({ className: r, selected: e = !1, icon: a, render: i, children: s, ...t }, c) => {
195
- const { expanded: l } = p(), u = f({
196
- render: i,
247
+ }), U = d.forwardRef(({ className: n, selected: e = !1, icon: r, render: s, children: i, ...t }, c) => {
248
+ const { expanded: l } = y(), u = S({
249
+ render: s,
197
250
  ref: c,
198
251
  defaultTagName: "a",
199
- props: x(
252
+ props: v(
200
253
  {
201
254
  className: o(
202
- g({
255
+ f({
203
256
  variant: e ? "selected" : "unselected"
204
257
  }),
205
- r
258
+ n
206
259
  ),
207
260
  "aria-current": e ? "page" : void 0,
208
- children: /* @__PURE__ */ m(w, { children: [
209
- a != null && /* @__PURE__ */ n("span", { className: "flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)]", children: a }),
210
- /* @__PURE__ */ n(
261
+ children: /* @__PURE__ */ b(T, { children: [
262
+ r != null && /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)]", children: r }),
263
+ /* @__PURE__ */ a(
211
264
  "span",
212
265
  {
213
266
  className: o("flex-1 truncate text-left", !l && "sr-only"),
214
- children: s
267
+ children: i
215
268
  }
216
269
  )
217
270
  ] })
@@ -219,43 +272,43 @@ const _ = "group/row flex w-full items-center gap-[var(--ui-sidebar-secondary-me
219
272
  t
220
273
  )
221
274
  });
222
- return /* @__PURE__ */ n("li", { className: "contents", children: u });
275
+ return /* @__PURE__ */ a("li", { className: "contents", children: u });
223
276
  });
224
- j.displayName = "SidebarSecondaryMenuItem";
225
- const H = d.forwardRef(({ className: r, render: e, ...a }, i) => (
277
+ U.displayName = "SidebarSecondaryMenuItem";
278
+ const q = d.forwardRef(({ className: n, render: e, ...r }, s) => (
226
279
  // Disclosure row: Base UI Collapsible gives per-row open state +
227
280
  // aria-expanded/aria-controls. Rendered as the list `<li>` wrapper.
228
- /* @__PURE__ */ n(
229
- v.Root,
281
+ /* @__PURE__ */ a(
282
+ p.Root,
230
283
  {
231
- ref: i,
232
- render: e ?? /* @__PURE__ */ n("li", {}),
233
- className: o("contents", r),
234
- ...a
284
+ ref: s,
285
+ render: e ?? /* @__PURE__ */ a("li", {}),
286
+ className: o("contents", n),
287
+ ...r
235
288
  }
236
289
  )
237
290
  ));
238
- H.displayName = "SidebarSecondaryMenuSub";
239
- const U = d.forwardRef(({ className: r, selected: e = !1, icon: a, children: i, ...s }, t) => {
240
- const { expanded: c } = p();
241
- return /* @__PURE__ */ m(
242
- v.Trigger,
291
+ q.displayName = "SidebarSecondaryMenuSub";
292
+ const X = d.forwardRef(({ className: n, selected: e = !1, icon: r, children: s, ...i }, t) => {
293
+ const { expanded: c } = y();
294
+ return /* @__PURE__ */ b(
295
+ p.Trigger,
243
296
  {
244
297
  ref: t,
245
298
  "aria-current": e ? "page" : void 0,
246
299
  className: o(
247
- g({
300
+ f({
248
301
  variant: e ? "selected" : "unselected"
249
302
  }),
250
303
  "text-left",
251
- r
304
+ n
252
305
  ),
253
- ...s,
306
+ ...i,
254
307
  children: [
255
- a != null && /* @__PURE__ */ n("span", { className: "flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)]", children: a }),
256
- /* @__PURE__ */ n("span", { className: o("flex-1 truncate", !c && "sr-only"), children: i }),
257
- /* @__PURE__ */ n(
258
- M,
308
+ r != null && /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)]", children: r }),
309
+ /* @__PURE__ */ a("span", { className: o("flex-1 truncate", !c && "sr-only"), children: s }),
310
+ /* @__PURE__ */ a(
311
+ w,
259
312
  {
260
313
  size: 16,
261
314
  "aria-hidden": "true",
@@ -269,18 +322,18 @@ const U = d.forwardRef(({ className: r, selected: e = !1, icon: a, children: i,
269
322
  }
270
323
  );
271
324
  });
272
- U.displayName = "SidebarSecondaryMenuSubTrigger";
273
- const q = d.forwardRef(({ className: r, children: e, ...a }, i) => /* @__PURE__ */ n(v.Panel, { ref: i, className: o(r), ...a, children: /* @__PURE__ */ n("ul", { className: "flex flex-col gap-[var(--ui-sidebar-secondary-section-menu-item-list-gap)]", children: e }) }));
274
- q.displayName = "SidebarSecondaryMenuSubContent";
275
- const A = d.forwardRef(({ className: r, selected: e = !1, render: a, children: i, ...s }, t) => {
276
- const { expanded: c } = p(), l = f({
277
- render: a,
325
+ X.displayName = "SidebarSecondaryMenuSubTrigger";
326
+ const G = d.forwardRef(({ className: n, children: e, ...r }, s) => /* @__PURE__ */ a(p.Panel, { ref: s, className: o(n), ...r, children: /* @__PURE__ */ a("ul", { className: "flex flex-col gap-[var(--ui-sidebar-secondary-section-menu-item-list-gap)]", children: e }) }));
327
+ G.displayName = "SidebarSecondaryMenuSubContent";
328
+ const J = d.forwardRef(({ className: n, selected: e = !1, render: r, children: s, ...i }, t) => {
329
+ const { expanded: c } = y(), l = S({
330
+ render: r,
278
331
  ref: t,
279
332
  defaultTagName: "a",
280
- props: x(
333
+ props: v(
281
334
  {
282
335
  className: o(
283
- g({
336
+ f({
284
337
  variant: e ? "selected" : "unselected"
285
338
  }),
286
339
  // Level-2 left indent (no icon column). The dedicated level-2 padding
@@ -288,34 +341,34 @@ const A = d.forwardRef(({ className: r, selected: e = !1, render: a, children: i
288
341
  // surviving tokens so the label aligns under level-1 labels (row
289
342
  // padding + icon column + gap).
290
343
  "pl-[calc(var(--ui-sidebar-secondary-menu-item-global-container-padding-x)+var(--ui-sidebar-secondary-menu-item-global-icon-size)+var(--ui-sidebar-secondary-menu-item-global-container-gap))]",
291
- r
344
+ n
292
345
  ),
293
346
  "aria-current": e ? "page" : void 0,
294
- children: /* @__PURE__ */ n("span", { className: o("flex-1 truncate text-left", !c && "sr-only"), children: i })
347
+ children: /* @__PURE__ */ a("span", { className: o("flex-1 truncate text-left", !c && "sr-only"), children: s })
295
348
  },
296
- s
349
+ i
297
350
  )
298
351
  });
299
- return /* @__PURE__ */ n("li", { className: "contents", children: l });
352
+ return /* @__PURE__ */ a("li", { className: "contents", children: l });
300
353
  });
301
- A.displayName = "SidebarSecondaryMenuSubItem";
302
- const D = d.forwardRef(({ className: r, variant: e, shortcut: a, tag: i, children: s, ...t }, c) => {
303
- const { expanded: l } = p(), u = e === "tag" || e === "tag-externalLink", b = e === "externalLink" || e === "tag-externalLink", y = e === "shortcut";
304
- return /* @__PURE__ */ m(
354
+ J.displayName = "SidebarSecondaryMenuSubItem";
355
+ const K = d.forwardRef(({ className: n, variant: e, shortcut: r, tag: s, children: i, ...t }, c) => {
356
+ const { expanded: l } = y(), u = e === "tag" || e === "tag-externalLink", m = e === "externalLink" || e === "tag-externalLink", g = e === "shortcut";
357
+ return /* @__PURE__ */ b(
305
358
  "span",
306
359
  {
307
360
  ref: c,
308
361
  className: o(
309
362
  "inline-flex items-center gap-[var(--ui-sidebar-secondary-menu-item-extras-global-container-gap)]",
310
363
  !l && "hidden",
311
- r
364
+ n
312
365
  ),
313
366
  ...t,
314
367
  children: [
315
- u && (i ?? s),
316
- y && /* @__PURE__ */ n("span", { className: "ui-sidebar-secondary-menu-item-extras-global-shortcut-text-style text-[var(--ui-sidebar-secondary-menu-item-extras-global-shortcut-color)]", children: a ?? s }),
317
- b && /* @__PURE__ */ n(
318
- C,
368
+ u && (s ?? i),
369
+ g && /* @__PURE__ */ a("span", { className: "ui-sidebar-secondary-menu-item-extras-global-shortcut-text-style text-[var(--ui-sidebar-secondary-menu-item-extras-global-shortcut-color)]", children: r ?? i }),
370
+ m && /* @__PURE__ */ a(
371
+ I,
319
372
  {
320
373
  size: 16,
321
374
  className: "text-[var(--ui-sidebar-secondary-menu-item-extras-global-external-icon-color)] size-[var(--ui-sidebar-secondary-menu-item-extras-global-external-icon-size)]"
@@ -325,48 +378,48 @@ const D = d.forwardRef(({ className: r, variant: e, shortcut: a, tag: i, childre
325
378
  }
326
379
  );
327
380
  });
328
- D.displayName = "SidebarSecondaryMenuItemExtras";
329
- const G = d.forwardRef(({ className: r, icon: e, children: a, onClick: i, ...s }, t) => {
330
- const { expanded: c, toggleExpanded: l } = p();
331
- return /* @__PURE__ */ n("li", { className: "contents", children: /* @__PURE__ */ m(
381
+ K.displayName = "SidebarSecondaryMenuItemExtras";
382
+ const Q = d.forwardRef(({ className: n, icon: e, children: r, onClick: s, ...i }, t) => {
383
+ const { expanded: c, toggleExpanded: l } = y();
384
+ return /* @__PURE__ */ a("li", { className: "contents", children: /* @__PURE__ */ b(
332
385
  "button",
333
386
  {
334
387
  ref: t,
335
388
  type: "button",
336
389
  "aria-expanded": c,
337
390
  className: o(
338
- g({ variant: "unselected" }),
391
+ f({ variant: "unselected" }),
339
392
  "text-left",
340
- r
393
+ n
341
394
  ),
342
395
  onClick: (u) => {
343
- i == null || i(u), u.defaultPrevented || l();
396
+ s == null || s(u), u.defaultPrevented || l();
344
397
  },
345
- ...s,
398
+ ...i,
346
399
  children: [
347
- e != null && /* @__PURE__ */ n("span", { className: "flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)]", children: e }),
348
- /* @__PURE__ */ n("span", { className: o("flex-1 truncate", !c && "sr-only"), children: a })
400
+ e != null && /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)]", children: e }),
401
+ /* @__PURE__ */ a("span", { className: o("flex-1 truncate", !c && "sr-only"), children: r })
349
402
  ]
350
403
  }
351
404
  ) });
352
405
  });
353
- G.displayName = "SidebarSecondaryCollapseTrigger";
406
+ Q.displayName = "SidebarSecondaryCollapseTrigger";
354
407
  export {
355
- k as SidebarSecondary,
356
- G as SidebarSecondaryCollapseTrigger,
357
- L as SidebarSecondaryCollapsedBreadcrumb,
358
- E as SidebarSecondaryContent,
359
- P as SidebarSecondaryFooter,
360
- T as SidebarSecondaryHeader,
361
- V as SidebarSecondaryMenu,
362
- j as SidebarSecondaryMenuItem,
363
- D as SidebarSecondaryMenuItemExtras,
364
- H as SidebarSecondaryMenuSub,
365
- q as SidebarSecondaryMenuSubContent,
366
- A as SidebarSecondaryMenuSubItem,
367
- U as SidebarSecondaryMenuSubTrigger,
368
- B as SidebarSecondarySection,
369
- F as SidebarSecondarySectionLabel,
370
- g as sidebarSecondaryMenuItemVariants
408
+ P as SidebarSecondary,
409
+ Q as SidebarSecondaryCollapseTrigger,
410
+ A as SidebarSecondaryCollapsedBreadcrumb,
411
+ _ as SidebarSecondaryContent,
412
+ B as SidebarSecondaryFooter,
413
+ L as SidebarSecondaryHeader,
414
+ D as SidebarSecondaryMenu,
415
+ U as SidebarSecondaryMenuItem,
416
+ K as SidebarSecondaryMenuItemExtras,
417
+ q as SidebarSecondaryMenuSub,
418
+ G as SidebarSecondaryMenuSubContent,
419
+ J as SidebarSecondaryMenuSubItem,
420
+ X as SidebarSecondaryMenuSubTrigger,
421
+ V as SidebarSecondarySection,
422
+ j as SidebarSecondarySectionLabel,
423
+ f as sidebarSecondaryMenuItemVariants
371
424
  };
372
425
  //# sourceMappingURL=sidebar-secondary.js.map