@acronis-platform/ui-react 0.29.0 → 0.33.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.
Files changed (30) hide show
  1. package/README.md +18 -1
  2. package/dist/components/ui/input-date-picker/input-date-picker.js +104 -0
  3. package/dist/components/ui/input-date-picker/input-date-picker.js.map +1 -0
  4. package/dist/components/ui/input-select/input-select.js +257 -0
  5. package/dist/components/ui/input-select/input-select.js.map +1 -0
  6. package/dist/components/ui/input-text-area/input-text-area.js +72 -16
  7. package/dist/components/ui/input-text-area/input-text-area.js.map +1 -1
  8. package/dist/components/ui/link/link.js +39 -0
  9. package/dist/components/ui/link/link.js.map +1 -0
  10. package/dist/components/ui/sidebar-primary/sidebar-primary.js +85 -71
  11. package/dist/components/ui/sidebar-primary/sidebar-primary.js.map +1 -1
  12. package/dist/components/ui/sidebar-secondary/sidebar-secondary.js +125 -117
  13. package/dist/components/ui/sidebar-secondary/sidebar-secondary.js.map +1 -1
  14. package/dist/index.js +112 -94
  15. package/dist/index.js.map +1 -1
  16. package/dist/react.js +112 -94
  17. package/dist/react.js.map +1 -1
  18. package/dist/src/components/ui/input-date-picker/index.d.ts +1 -0
  19. package/dist/src/components/ui/input-date-picker/input-date-picker.d.ts +27 -0
  20. package/dist/src/components/ui/input-select/index.d.ts +1 -0
  21. package/dist/src/components/ui/input-select/input-select.d.ts +40 -0
  22. package/dist/src/components/ui/input-text-area/input-text-area.d.ts +14 -2
  23. package/dist/src/components/ui/link/index.d.ts +1 -0
  24. package/dist/src/components/ui/link/link.d.ts +15 -0
  25. package/dist/src/components/ui/select/select.d.ts +1 -14
  26. package/dist/src/index.d.ts +3 -0
  27. package/dist/ui-react.css +1 -1
  28. package/package.json +5 -1
  29. package/dist/components/ui/select/select.js +0 -105
  30. package/dist/components/ui/select/select.js.map +0 -1
@@ -1,55 +1,55 @@
1
- import { jsx as a, jsxs as b, Fragment as T } from "react/jsx-runtime";
2
- import * as d from "react";
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
- import { cva as z } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
8
- import { cn as o } from "../../../lib/utils.js";
9
- const C = d.createContext(null);
10
- function y() {
11
- return d.useContext(C) ?? {
1
+ import { jsx as a, jsxs as m, Fragment as T } from "react/jsx-runtime";
2
+ import * as t from "react";
3
+ import { mergeProps as h } from "@base-ui/react/merge-props";
4
+ import { useRender as N } from "@base-ui/react/use-render";
5
+ import { Collapsible as x } from "@base-ui/react/collapsible";
6
+ import { ChevronRightIcon as k, ChevronDownIcon as R, SquareArrowUpRightIcon as I } from "@acronis-platform/icons-react/stroke-mono";
7
+ import { cva as E } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
8
+ import { cn as d } from "../../../lib/utils.js";
9
+ const M = t.createContext(null);
10
+ function g() {
11
+ return t.useContext(M) ?? {
12
12
  expanded: !0,
13
13
  toggleExpanded: () => {
14
14
  }
15
15
  };
16
16
  }
17
- function E(n, e, r) {
18
- const [s, i] = d.useState(e), t = n !== void 0, c = t ? n : s, l = d.useCallback(
17
+ function z(n, e, r) {
18
+ const [s, i] = t.useState(e), o = n !== void 0, c = o ? n : s, l = t.useCallback(
19
19
  (u) => {
20
- t || i(u), r == null || r(u);
20
+ o || i(u), r == null || r(u);
21
21
  },
22
- [t, r]
22
+ [o, r]
23
23
  );
24
24
  return [c, l];
25
25
  }
26
- const P = d.forwardRef(
26
+ const P = t.forwardRef(
27
27
  ({
28
28
  className: n,
29
29
  expanded: e,
30
30
  defaultExpanded: r = !0,
31
31
  onExpandedChange: s,
32
32
  "aria-label": i = "Section navigation",
33
- render: t,
33
+ render: o,
34
34
  children: c,
35
35
  ...l
36
36
  }, u) => {
37
- const [m, g] = E(
37
+ const [b, p] = z(
38
38
  e,
39
39
  r,
40
40
  s
41
- ), R = d.useMemo(
42
- () => ({ expanded: m, toggleExpanded: () => g(!m) }),
43
- [m, g]
44
- ), M = S({
45
- render: t,
41
+ ), S = t.useMemo(
42
+ () => ({ expanded: b, toggleExpanded: () => p(!b) }),
43
+ [b, p]
44
+ ), y = N({
45
+ render: o,
46
46
  ref: u,
47
47
  defaultTagName: "nav",
48
- props: v(
48
+ props: h(
49
49
  {
50
50
  "aria-label": i,
51
- "data-state": m ? "expanded" : "collapsed",
52
- className: o(
51
+ "data-state": b ? "expanded" : "collapsed",
52
+ className: d(
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
54
  n
55
55
  ),
@@ -58,15 +58,15 @@ const P = d.forwardRef(
58
58
  l
59
59
  )
60
60
  });
61
- return /* @__PURE__ */ a(C.Provider, { value: R, children: M });
61
+ return /* @__PURE__ */ a(M.Provider, { value: S, children: y });
62
62
  }
63
63
  );
64
64
  P.displayName = "SidebarSecondary";
65
- const L = d.forwardRef(({ className: n, label: e, children: r, ...s }, i) => /* @__PURE__ */ a(
65
+ const L = t.forwardRef(({ className: n, label: e, children: r, ...s }, i) => /* @__PURE__ */ a(
66
66
  "div",
67
67
  {
68
68
  ref: i,
69
- className: o(
69
+ className: d(
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)]",
@@ -77,14 +77,14 @@ const L = d.forwardRef(({ className: n, label: e, children: r, ...s }, i) => /*
77
77
  }
78
78
  ));
79
79
  L.displayName = "SidebarSecondaryHeader";
80
- const _ = d.forwardRef(({ className: n, ...e }, r) => (
80
+ const A = t.forwardRef(({ className: n, ...e }, r) => (
81
81
  // Expanded: the section list. Hidden in collapsed mode, where the
82
82
  // CollapsedBreadcrumb sibling takes over.
83
83
  /* @__PURE__ */ a(
84
84
  "div",
85
85
  {
86
86
  ref: r,
87
- className: o(
87
+ className: d(
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
90
  n
@@ -93,16 +93,16 @@ const _ = d.forwardRef(({ className: n, ...e }, r) => (
93
93
  }
94
94
  )
95
95
  ));
96
- _.displayName = "SidebarSecondaryContent";
97
- const A = d.forwardRef(({ className: n, parentLabel: e, currentLabel: r, separator: s, ...i }, t) => (
96
+ A.displayName = "SidebarSecondaryContent";
97
+ const _ = t.forwardRef(({ className: n, parentLabel: e, currentLabel: r, separator: s, ...i }, o) => (
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__ */ b(
101
+ /* @__PURE__ */ m(
102
102
  "div",
103
103
  {
104
- ref: t,
105
- className: o(
104
+ ref: o,
105
+ className: d(
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",
@@ -124,12 +124,12 @@ const A = d.forwardRef(({ className: n, parentLabel: e, currentLabel: r, separat
124
124
  }
125
125
  )
126
126
  ));
127
- A.displayName = "SidebarSecondaryCollapsedBreadcrumb";
128
- const B = d.forwardRef(({ className: n, ...e }, r) => /* @__PURE__ */ a(
127
+ _.displayName = "SidebarSecondaryCollapsedBreadcrumb";
128
+ const B = t.forwardRef(({ className: n, ...e }, r) => /* @__PURE__ */ a(
129
129
  "div",
130
130
  {
131
131
  ref: r,
132
- className: o(
132
+ className: d(
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)]",
@@ -139,14 +139,14 @@ const B = d.forwardRef(({ className: n, ...e }, r) => /* @__PURE__ */ a(
139
139
  }
140
140
  ));
141
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(
142
+ const f = t.createContext({ expandable: !1 }), V = { expandable: !1 }, F = { expandable: !0 }, H = t.forwardRef(
143
+ ({ className: n, expandable: e = !1, open: r, defaultOpen: s = !0, onOpenChange: i, children: o, ...c }, l) => {
144
+ const u = d(
145
145
  "flex flex-col py-[var(--ui-sidebar-secondary-section-container-padding-y)]",
146
146
  n
147
147
  );
148
- return e ? /* @__PURE__ */ a(x.Provider, { value: H, children: /* @__PURE__ */ a(
149
- p.Root,
148
+ return e ? /* @__PURE__ */ a(f.Provider, { value: F, children: /* @__PURE__ */ a(
149
+ x.Root,
150
150
  {
151
151
  ref: l,
152
152
  open: r,
@@ -154,21 +154,21 @@ const x = d.createContext({ expandable: !1 }), F = { expandable: !1 }, H = { exp
154
154
  onOpenChange: i,
155
155
  render: /* @__PURE__ */ a("div", { className: u }),
156
156
  ...c,
157
- children: t
157
+ children: o
158
158
  }
159
- ) }) : /* @__PURE__ */ a(x.Provider, { value: F, children: /* @__PURE__ */ a("div", { ref: l, className: u, ...c, children: t }) });
159
+ ) }) : /* @__PURE__ */ a(f.Provider, { value: V, children: /* @__PURE__ */ a("div", { ref: l, className: u, ...c, children: o }) });
160
160
  }
161
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);
162
+ H.displayName = "SidebarSecondarySection";
163
+ const w = "ui-sidebar-secondary-section-label-section-text-style text-[var(--ui-sidebar-secondary-section-label-section-color)]", C = "pb-[var(--ui-sidebar-secondary-section-container-header-padding-y)] px-[var(--ui-sidebar-secondary-section-container-header-padding-x)]", j = t.forwardRef(({ className: n, actions: e, unreadRollup: r, children: s, ...i }, o) => {
164
+ const { expandable: c } = t.useContext(f);
165
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(
166
+ const l = d(w, C, n);
167
+ return e == null ? /* @__PURE__ */ a("div", { ref: o, className: l, ...i, children: s }) : /* @__PURE__ */ m(
168
168
  "div",
169
169
  {
170
- ref: t,
171
- className: o(
170
+ ref: o,
171
+ className: d(
172
172
  l,
173
173
  "flex items-center gap-[var(--ui-sidebar-secondary-section-container-header-gap)]"
174
174
  ),
@@ -180,28 +180,28 @@ const h = "ui-sidebar-secondary-section-label-section-text-style text-[var(--ui-
180
180
  }
181
181
  );
182
182
  }
183
- return /* @__PURE__ */ b(
183
+ return /* @__PURE__ */ m(
184
184
  "div",
185
185
  {
186
- ref: t,
187
- className: o(
186
+ ref: o,
187
+ className: d(
188
188
  "flex items-center gap-[var(--ui-sidebar-secondary-section-container-header-gap)]",
189
- N,
189
+ C,
190
190
  n
191
191
  ),
192
192
  ...i,
193
193
  children: [
194
- /* @__PURE__ */ b(
195
- p.Trigger,
194
+ /* @__PURE__ */ m(
195
+ x.Trigger,
196
196
  {
197
- className: o(
197
+ className: d(
198
198
  "group/section flex min-w-0 flex-1 items-center gap-[var(--ui-sidebar-secondary-section-container-header-gap)] text-left",
199
- h,
199
+ w,
200
200
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-brand)] focus-visible:ring-inset"
201
201
  ),
202
202
  children: [
203
203
  /* @__PURE__ */ a(
204
- w,
204
+ R,
205
205
  {
206
206
  size: 16,
207
207
  "aria-hidden": "true",
@@ -219,22 +219,22 @@ const h = "ui-sidebar-secondary-section-label-section-text-style text-[var(--ui-
219
219
  );
220
220
  });
221
221
  j.displayName = "SidebarSecondarySectionLabel";
222
- const D = d.forwardRef(({ className: n, ...e }, r) => {
223
- const { expandable: s } = d.useContext(x), i = /* @__PURE__ */ a(
222
+ const D = t.forwardRef(({ className: n, ...e }, r) => {
223
+ const { expandable: s } = t.useContext(f), i = /* @__PURE__ */ a(
224
224
  "ul",
225
225
  {
226
226
  ref: r,
227
- className: o(
227
+ className: d(
228
228
  "flex flex-col gap-[var(--ui-sidebar-secondary-section-menu-item-list-gap)]",
229
229
  n
230
230
  ),
231
231
  ...e
232
232
  }
233
233
  );
234
- return s ? /* @__PURE__ */ a(p.Panel, { children: i }) : i;
234
+ return s ? /* @__PURE__ */ a(x.Panel, { children: i }) : i;
235
235
  });
236
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, {
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)]", v = E(O, {
238
238
  variants: {
239
239
  variant: {
240
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)]",
@@ -244,60 +244,68 @@ const O = "group/row flex w-full items-center gap-[var(--ui-sidebar-secondary-me
244
244
  defaultVariants: {
245
245
  variant: "unselected"
246
246
  }
247
- }), U = d.forwardRef(({ className: n, selected: e = !1, icon: r, render: s, children: i, ...t }, c) => {
248
- const { expanded: l } = y(), u = S({
247
+ }), U = t.forwardRef(({ className: n, selected: e = !1, icon: r, render: s, children: i, ...o }, c) => {
248
+ const { expanded: l } = g(), u = t.Children.toArray(i), b = u.filter(
249
+ (y) => t.isValidElement(y) && y.type.displayName === "SidebarSecondaryMenuItemExtras"
250
+ ), p = u.filter(
251
+ (y) => !b.includes(y)
252
+ ), S = N({
249
253
  render: s,
250
254
  ref: c,
251
255
  defaultTagName: "a",
252
- props: v(
256
+ props: h(
253
257
  {
254
- className: o(
255
- f({
258
+ className: d(
259
+ v({
256
260
  variant: e ? "selected" : "unselected"
257
261
  }),
258
262
  n
259
263
  ),
260
264
  "aria-current": e ? "page" : void 0,
261
- children: /* @__PURE__ */ b(T, { children: [
265
+ children: /* @__PURE__ */ m(T, { children: [
262
266
  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
267
  /* @__PURE__ */ a(
264
268
  "span",
265
269
  {
266
- className: o("flex-1 truncate text-left", !l && "sr-only"),
267
- children: i
270
+ className: d(
271
+ "min-w-0 flex-1 truncate text-left",
272
+ !l && "sr-only"
273
+ ),
274
+ children: p
268
275
  }
269
- )
276
+ ),
277
+ b.length > 0 && /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center", children: b })
270
278
  ] })
271
279
  },
272
- t
280
+ o
273
281
  )
274
282
  });
275
- return /* @__PURE__ */ a("li", { className: "contents", children: u });
283
+ return /* @__PURE__ */ a("li", { className: "contents", children: S });
276
284
  });
277
285
  U.displayName = "SidebarSecondaryMenuItem";
278
- const q = d.forwardRef(({ className: n, render: e, ...r }, s) => (
286
+ const q = t.forwardRef(({ className: n, render: e, ...r }, s) => (
279
287
  // Disclosure row: Base UI Collapsible gives per-row open state +
280
288
  // aria-expanded/aria-controls. Rendered as the list `<li>` wrapper.
281
289
  /* @__PURE__ */ a(
282
- p.Root,
290
+ x.Root,
283
291
  {
284
292
  ref: s,
285
293
  render: e ?? /* @__PURE__ */ a("li", {}),
286
- className: o("contents", n),
294
+ className: d("contents", n),
287
295
  ...r
288
296
  }
289
297
  )
290
298
  ));
291
299
  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,
300
+ const X = t.forwardRef(({ className: n, selected: e = !1, icon: r, children: s, ...i }, o) => {
301
+ const { expanded: c } = g();
302
+ return /* @__PURE__ */ m(
303
+ x.Trigger,
296
304
  {
297
- ref: t,
305
+ ref: o,
298
306
  "aria-current": e ? "page" : void 0,
299
- className: o(
300
- f({
307
+ className: d(
308
+ v({
301
309
  variant: e ? "selected" : "unselected"
302
310
  }),
303
311
  "text-left",
@@ -306,13 +314,13 @@ const X = d.forwardRef(({ className: n, selected: e = !1, icon: r, children: s,
306
314
  ...i,
307
315
  children: [
308
316
  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 }),
317
+ /* @__PURE__ */ a("span", { className: d("flex-1 truncate", !c && "sr-only"), children: s }),
310
318
  /* @__PURE__ */ a(
311
- w,
319
+ R,
312
320
  {
313
321
  size: 16,
314
322
  "aria-hidden": "true",
315
- className: o(
323
+ className: d(
316
324
  "shrink-0 transition-transform group-data-[panel-open]/row:rotate-180",
317
325
  !c && "hidden"
318
326
  )
@@ -323,17 +331,17 @@ const X = d.forwardRef(({ className: n, selected: e = !1, icon: r, children: s,
323
331
  );
324
332
  });
325
333
  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 }) }));
334
+ const G = t.forwardRef(({ className: n, children: e, ...r }, s) => /* @__PURE__ */ a(x.Panel, { ref: s, className: d(n), ...r, children: /* @__PURE__ */ a("ul", { className: "flex flex-col gap-[var(--ui-sidebar-secondary-section-menu-item-list-gap)]", children: e }) }));
327
335
  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({
336
+ const J = t.forwardRef(({ className: n, selected: e = !1, render: r, children: s, ...i }, o) => {
337
+ const { expanded: c } = g(), l = N({
330
338
  render: r,
331
- ref: t,
339
+ ref: o,
332
340
  defaultTagName: "a",
333
- props: v(
341
+ props: h(
334
342
  {
335
- className: o(
336
- f({
343
+ className: d(
344
+ v({
337
345
  variant: e ? "selected" : "unselected"
338
346
  }),
339
347
  // Level-2 left indent (no icon column). The dedicated level-2 padding
@@ -344,7 +352,7 @@ const J = d.forwardRef(({ className: n, selected: e = !1, render: r, children: s
344
352
  n
345
353
  ),
346
354
  "aria-current": e ? "page" : void 0,
347
- children: /* @__PURE__ */ a("span", { className: o("flex-1 truncate text-left", !c && "sr-only"), children: s })
355
+ children: /* @__PURE__ */ a("span", { className: d("flex-1 truncate text-left", !c && "sr-only"), children: s })
348
356
  },
349
357
  i
350
358
  )
@@ -352,22 +360,22 @@ const J = d.forwardRef(({ className: n, selected: e = !1, render: r, children: s
352
360
  return /* @__PURE__ */ a("li", { className: "contents", children: l });
353
361
  });
354
362
  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(
363
+ const K = t.forwardRef(({ className: n, variant: e, shortcut: r, tag: s, children: i, ...o }, c) => {
364
+ const { expanded: l } = g(), u = e === "tag" || e === "tag-externalLink", b = e === "externalLink" || e === "tag-externalLink", p = e === "shortcut";
365
+ return /* @__PURE__ */ m(
358
366
  "span",
359
367
  {
360
368
  ref: c,
361
- className: o(
369
+ className: d(
362
370
  "inline-flex items-center gap-[var(--ui-sidebar-secondary-menu-item-extras-global-container-gap)]",
363
371
  !l && "hidden",
364
372
  n
365
373
  ),
366
- ...t,
374
+ ...o,
367
375
  children: [
368
376
  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(
377
+ p && /* @__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 }),
378
+ b && /* @__PURE__ */ a(
371
379
  I,
372
380
  {
373
381
  size: 16,
@@ -379,16 +387,16 @@ const K = d.forwardRef(({ className: n, variant: e, shortcut: r, tag: s, childre
379
387
  );
380
388
  });
381
389
  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(
390
+ const Q = t.forwardRef(({ className: n, icon: e, children: r, onClick: s, ...i }, o) => {
391
+ const { expanded: c, toggleExpanded: l } = g();
392
+ return /* @__PURE__ */ a("li", { className: "contents", children: /* @__PURE__ */ m(
385
393
  "button",
386
394
  {
387
- ref: t,
395
+ ref: o,
388
396
  type: "button",
389
397
  "aria-expanded": c,
390
- className: o(
391
- f({ variant: "unselected" }),
398
+ className: d(
399
+ v({ variant: "unselected" }),
392
400
  "text-left",
393
401
  n
394
402
  ),
@@ -398,7 +406,7 @@ const Q = d.forwardRef(({ className: n, icon: e, children: r, onClick: s, ...i }
398
406
  ...i,
399
407
  children: [
400
408
  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 })
409
+ /* @__PURE__ */ a("span", { className: d("flex-1 truncate", !c && "sr-only"), children: r })
402
410
  ]
403
411
  }
404
412
  ) });
@@ -407,8 +415,8 @@ Q.displayName = "SidebarSecondaryCollapseTrigger";
407
415
  export {
408
416
  P as SidebarSecondary,
409
417
  Q as SidebarSecondaryCollapseTrigger,
410
- A as SidebarSecondaryCollapsedBreadcrumb,
411
- _ as SidebarSecondaryContent,
418
+ _ as SidebarSecondaryCollapsedBreadcrumb,
419
+ A as SidebarSecondaryContent,
412
420
  B as SidebarSecondaryFooter,
413
421
  L as SidebarSecondaryHeader,
414
422
  D as SidebarSecondaryMenu,
@@ -418,8 +426,8 @@ export {
418
426
  G as SidebarSecondaryMenuSubContent,
419
427
  J as SidebarSecondaryMenuSubItem,
420
428
  X as SidebarSecondaryMenuSubTrigger,
421
- V as SidebarSecondarySection,
429
+ H as SidebarSecondarySection,
422
430
  j as SidebarSecondarySectionLabel,
423
- f as sidebarSecondaryMenuItemVariants
431
+ v as sidebarSecondaryMenuItemVariants
424
432
  };
425
433
  //# sourceMappingURL=sidebar-secondary.js.map