@acronis-platform/ui-react 0.53.0 → 0.55.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 (69) hide show
  1. package/dist/components/ui/avatar/avatar.js +1 -1
  2. package/dist/components/ui/avatar/avatar.js.map +1 -1
  3. package/dist/components/ui/breadcrumb/breadcrumb.js +5 -5
  4. package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
  5. package/dist/components/ui/chip/chip.js +1 -1
  6. package/dist/components/ui/chip/chip.js.map +1 -1
  7. package/dist/components/ui/combobox/combobox.js +51 -47
  8. package/dist/components/ui/combobox/combobox.js.map +1 -1
  9. package/dist/components/ui/data-table/data-table-column-header.js +7 -7
  10. package/dist/components/ui/data-table/data-table-column-header.js.map +1 -1
  11. package/dist/components/ui/data-table/data-table-view-options.js +4 -4
  12. package/dist/components/ui/data-table/data-table-view-options.js.map +1 -1
  13. package/dist/components/ui/data-table/data-table.js +1 -1
  14. package/dist/components/ui/data-table/data-table.js.map +1 -1
  15. package/dist/components/ui/dialog/dialog.js +36 -35
  16. package/dist/components/ui/dialog/dialog.js.map +1 -1
  17. package/dist/components/ui/dropdown-menu/dropdown-menu.js +55 -54
  18. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  19. package/dist/components/ui/filter-search/filter-search.js +28 -0
  20. package/dist/components/ui/filter-search/filter-search.js.map +1 -0
  21. package/dist/components/ui/input-date-picker/input-date-picker.js +8 -8
  22. package/dist/components/ui/input-date-picker/input-date-picker.js.map +1 -1
  23. package/dist/components/ui/input-search/input-search.js +11 -12
  24. package/dist/components/ui/input-search/input-search.js.map +1 -1
  25. package/dist/components/ui/input-select/input-select.js +72 -68
  26. package/dist/components/ui/input-select/input-select.js.map +1 -1
  27. package/dist/components/ui/input-text/input-text.js +6 -6
  28. package/dist/components/ui/input-text/input-text.js.map +1 -1
  29. package/dist/components/ui/popover/popover.js +18 -17
  30. package/dist/components/ui/popover/popover.js.map +1 -1
  31. package/dist/components/ui/resizable/resizable.js +24 -32
  32. package/dist/components/ui/resizable/resizable.js.map +1 -1
  33. package/dist/components/ui/scroll-area/scroll-area.js +61 -0
  34. package/dist/components/ui/scroll-area/scroll-area.js.map +1 -0
  35. package/dist/components/ui/sheet/sheet.js +38 -37
  36. package/dist/components/ui/sheet/sheet.js.map +1 -1
  37. package/dist/components/ui/sidebar-primary/sidebar-primary.js +203 -141
  38. package/dist/components/ui/sidebar-primary/sidebar-primary.js.map +1 -1
  39. package/dist/components/ui/sidebar-secondary/sidebar-secondary.js +509 -351
  40. package/dist/components/ui/sidebar-secondary/sidebar-secondary.js.map +1 -1
  41. package/dist/components/ui/switch/switch.js +6 -6
  42. package/dist/components/ui/switch/switch.js.map +1 -1
  43. package/dist/components/ui/table/table.js +7 -7
  44. package/dist/components/ui/table/table.js.map +1 -1
  45. package/dist/components/ui/tabs/tabs.js +11 -11
  46. package/dist/components/ui/tabs/tabs.js.map +1 -1
  47. package/dist/components/ui/toast/toast.js +35 -33
  48. package/dist/components/ui/toast/toast.js.map +1 -1
  49. package/dist/components/ui/tooltip/tooltip.js +41 -37
  50. package/dist/components/ui/tooltip/tooltip.js.map +1 -1
  51. package/dist/index.js +353 -349
  52. package/dist/index.js.map +1 -1
  53. package/dist/lib/portal-container.js +14 -0
  54. package/dist/lib/portal-container.js.map +1 -0
  55. package/dist/react.js +353 -349
  56. package/dist/react.js.map +1 -1
  57. package/dist/src/components/ui/filter-search/filter-search.d.ts +6 -0
  58. package/dist/src/components/ui/filter-search/index.d.ts +2 -0
  59. package/dist/src/components/ui/resizable/index.d.ts +2 -1
  60. package/dist/src/components/ui/resizable/resizable.d.ts +2 -5
  61. package/dist/src/components/ui/scroll-area/index.d.ts +1 -0
  62. package/dist/src/components/ui/scroll-area/scroll-area.d.ts +10 -0
  63. package/dist/src/components/ui/sidebar-primary/sidebar-primary.d.ts +48 -3
  64. package/dist/src/components/ui/sidebar-secondary/index.d.ts +1 -1
  65. package/dist/src/components/ui/sidebar-secondary/sidebar-secondary.d.ts +38 -33
  66. package/dist/src/index.d.ts +3 -0
  67. package/dist/src/lib/portal-container.d.ts +36 -0
  68. package/dist/ui-react.css +1 -1
  69. package/package.json +2 -3
@@ -1,251 +1,467 @@
1
- import { jsx as a, jsxs as m, Fragment as T } from "react/jsx-runtime";
2
- import * as o 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, SquareArrowUpRightIcon as I, ChevronDownIcon as R } 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 t } from "../../../lib/utils.js";
9
- const M = o.createContext(null);
10
- function g() {
11
- return o.useContext(M) ?? {
1
+ import { jsxs as f, Fragment as _, jsx as e } from "react/jsx-runtime";
2
+ import * as n from "react";
3
+ import { mergeProps as j } from "@base-ui/react/merge-props";
4
+ import { useRender as q } from "@base-ui/react/use-render";
5
+ import { Collapsible as X } from "@base-ui/react/collapsible";
6
+ import { SquareArrowUpRightIcon as ae, ChevronDownIcon as G } from "@acronis-platform/icons-react/stroke-mono";
7
+ import { cva as te } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
8
+ import { cn as b } from "../../../lib/utils.js";
9
+ import { Tooltip as P, TooltipTrigger as A, TooltipContent as M } from "../tooltip/tooltip.js";
10
+ function J() {
11
+ const [t, r] = n.useState("ltr");
12
+ return n.useEffect(() => {
13
+ r(document.documentElement.dir === "rtl" ? "rtl" : "ltr");
14
+ }, []), t;
15
+ }
16
+ function K(t, { enabled: r }) {
17
+ const [s, l] = n.useState(!1);
18
+ return n.useEffect(() => {
19
+ const i = t.current;
20
+ if (!r || !i) {
21
+ l(!1);
22
+ return;
23
+ }
24
+ const a = () => l(i.scrollWidth > i.clientWidth);
25
+ a();
26
+ const o = new ResizeObserver(a);
27
+ return o.observe(i), () => o.disconnect();
28
+ }, [t, r]), s;
29
+ }
30
+ const R = 256, Q = R * 2, Y = /* @__PURE__ */ f(_, { children: [
31
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: "Resize:" }),
32
+ " Drag",
33
+ /* @__PURE__ */ e("br", {}),
34
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: "Collapse:" }),
35
+ " Click",
36
+ /* @__PURE__ */ e("br", {}),
37
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: "Reset size:" }),
38
+ " Double click"
39
+ ] }), Z = /* @__PURE__ */ f(_, { children: [
40
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: "Resize:" }),
41
+ " Drag",
42
+ /* @__PURE__ */ e("br", {}),
43
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: "Expand:" }),
44
+ " Click"
45
+ ] }), $ = n.createContext(null);
46
+ function I() {
47
+ return n.useContext($) ?? {
12
48
  expanded: !0,
13
49
  toggleExpanded: () => {
14
- }
50
+ },
51
+ resizable: !1,
52
+ width: R,
53
+ setWidth: () => {
54
+ },
55
+ minWidth: R,
56
+ maxWidth: Q,
57
+ defaultWidth: R,
58
+ headerLabel: void 0,
59
+ setHeaderLabel: () => {
60
+ },
61
+ selectedLabel: void 0,
62
+ setSelectedLabel: () => {
63
+ },
64
+ resizeAriaLabel: "Resize sidebar",
65
+ resizeTooltipExpanded: Y,
66
+ resizeTooltipCollapsed: Z
15
67
  };
16
68
  }
17
- function z(n, e, r) {
18
- const [s, i] = o.useState(e), d = n !== void 0, c = d ? n : s, l = o.useCallback(
19
- (u) => {
20
- d || i(u), r == null || r(u);
69
+ function ne(t, r, s) {
70
+ const [l, i] = n.useState(r), a = t !== void 0, o = a ? t : l, u = n.useCallback(
71
+ (d) => {
72
+ a || i(d), s == null || s(d);
21
73
  },
22
- [d, r]
74
+ [a, s]
23
75
  );
24
- return [c, l];
76
+ return [o, u];
25
77
  }
26
- const P = o.forwardRef(
78
+ function ie() {
79
+ const t = I(), { expanded: r, toggleExpanded: s, resizable: l } = t, i = J(), a = n.useRef(t);
80
+ a.current = t;
81
+ const o = n.useRef(!1), [u, d] = n.useState(!1), [c, v] = n.useState(!1), m = n.useRef(
82
+ null
83
+ );
84
+ if (n.useEffect(() => () => {
85
+ m.current && clearTimeout(m.current);
86
+ }, []), !l) return null;
87
+ const S = (p) => {
88
+ p.preventDefault();
89
+ const C = p.currentTarget;
90
+ C.setPointerCapture(p.pointerId), o.current = !1, v(!0), d(!1);
91
+ const h = C.closest("[data-state]");
92
+ if (!h) {
93
+ v(!1), C.releasePointerCapture(p.pointerId);
94
+ return;
95
+ }
96
+ h.style.transitionProperty = "none";
97
+ const w = getComputedStyle(h).direction === "rtl", N = h.getBoundingClientRect(), { minWidth: x, maxWidth: T } = a.current, y = x / 2, z = (O) => {
98
+ o.current = !0;
99
+ const D = w ? N.right - O.clientX : O.clientX - N.left, { expanded: B } = a.current;
100
+ B ? D < y ? a.current.toggleExpanded() : a.current.setWidth(
101
+ Math.min(Math.max(D, x), T)
102
+ ) : D > y && a.current.toggleExpanded();
103
+ }, W = () => {
104
+ v(!1), h && (h.style.transitionProperty = ""), window.removeEventListener("pointermove", z), window.removeEventListener("pointerup", W);
105
+ };
106
+ window.addEventListener("pointermove", z), window.addEventListener("pointerup", W);
107
+ }, E = () => {
108
+ o.current || (m.current && clearTimeout(m.current), m.current = setTimeout(() => {
109
+ s();
110
+ }, 250));
111
+ }, L = () => {
112
+ m.current && (clearTimeout(m.current), m.current = null), r || s(), a.current.setWidth(a.current.defaultWidth);
113
+ }, g = (p) => {
114
+ const {
115
+ minWidth: C,
116
+ maxWidth: h,
117
+ defaultWidth: w,
118
+ width: N,
119
+ setWidth: x,
120
+ expanded: T,
121
+ toggleExpanded: y
122
+ } = a.current, z = 16, W = i === "rtl" ? "ArrowLeft" : "ArrowRight", O = i === "rtl" ? "ArrowRight" : "ArrowLeft";
123
+ if (p.key === W && T)
124
+ p.preventDefault(), x(Math.min(N + z, h));
125
+ else if (p.key === O && T) {
126
+ p.preventDefault();
127
+ const D = N - z;
128
+ D < C ? y() : x(D);
129
+ } else p.key === "Enter" ? (p.preventDefault(), y()) : p.key === "Home" && (p.preventDefault(), T || y(), x(w));
130
+ };
131
+ return /* @__PURE__ */ f(P, { open: u, onOpenChange: (p) => {
132
+ c || d(p);
133
+ }, children: [
134
+ /* @__PURE__ */ e(
135
+ A,
136
+ {
137
+ render: /* @__PURE__ */ e(
138
+ "div",
139
+ {
140
+ role: "separator",
141
+ "aria-orientation": "vertical",
142
+ "aria-label": t.resizeAriaLabel,
143
+ className: b(
144
+ // 9px hit area matching ResizableHandle, absolutely positioned on inline-end edge.
145
+ // No after: divider — the sidebar's own border-e changes color via :has() on hover/active/focus.
146
+ "absolute end-0 top-0 h-full w-[9px] ltr:translate-x-1/2 rtl:-translate-x-1/2 cursor-[var(--ui-resizable-cursor,ew-resize)] z-10",
147
+ "focus-visible:outline-none"
148
+ ),
149
+ tabIndex: 0,
150
+ onKeyDown: g,
151
+ onPointerDown: S,
152
+ onClick: E,
153
+ onDoubleClick: L
154
+ }
155
+ )
156
+ }
157
+ ),
158
+ (r ? t.resizeTooltipExpanded : t.resizeTooltipCollapsed) != null && /* @__PURE__ */ e(M, { side: i === "rtl" ? "left" : "right", align: "center", children: r ? t.resizeTooltipExpanded : t.resizeTooltipCollapsed })
159
+ ] });
160
+ }
161
+ const se = n.forwardRef(
27
162
  ({
28
- className: n,
29
- expanded: e,
30
- defaultExpanded: r = !0,
31
- onExpandedChange: s,
32
- "aria-label": i = "Section navigation",
33
- render: d,
34
- children: c,
35
- ...l
36
- }, u) => {
37
- const [b, p] = z(
38
- e,
163
+ className: t,
164
+ expanded: r,
165
+ defaultExpanded: s = !0,
166
+ onExpandedChange: l,
167
+ resizable: i = !0,
168
+ width: a,
169
+ onWidthChange: o,
170
+ resizeAriaLabel: u = "Resize sidebar",
171
+ resizeTooltipExpanded: d = Y,
172
+ resizeTooltipCollapsed: c = Z,
173
+ "aria-label": v = "Section navigation",
174
+ render: m,
175
+ children: S,
176
+ ...E
177
+ }, L) => {
178
+ const [g, k] = ne(
39
179
  r,
40
- s
41
- ), S = o.useMemo(
42
- () => ({ expanded: b, toggleExpanded: () => p(!b) }),
43
- [b, p]
44
- ), y = N({
45
- render: d,
46
- ref: u,
180
+ s,
181
+ l
182
+ ), [p, C] = n.useState(R), h = a !== void 0, w = h ? a : p, N = n.useCallback(
183
+ (F) => {
184
+ h || C(F), o == null || o(F);
185
+ },
186
+ [h, o]
187
+ ), [x, T] = n.useState(void 0), [y, z] = n.useState(void 0), W = n.useMemo(
188
+ () => ({
189
+ expanded: g,
190
+ toggleExpanded: () => k(!g),
191
+ resizable: i,
192
+ width: w,
193
+ setWidth: N,
194
+ minWidth: R,
195
+ maxWidth: Q,
196
+ defaultWidth: R,
197
+ headerLabel: x,
198
+ setHeaderLabel: T,
199
+ selectedLabel: y,
200
+ setSelectedLabel: z,
201
+ resizeAriaLabel: u,
202
+ resizeTooltipExpanded: d,
203
+ resizeTooltipCollapsed: c
204
+ }),
205
+ [
206
+ g,
207
+ k,
208
+ i,
209
+ w,
210
+ N,
211
+ x,
212
+ y,
213
+ u,
214
+ d,
215
+ c
216
+ ]
217
+ ), B = q({
218
+ render: m,
219
+ ref: L,
47
220
  defaultTagName: "nav",
48
- props: h(
221
+ props: j(
49
222
  {
50
- "aria-label": i,
51
- "data-state": b ? "expanded" : "collapsed",
52
- className: t(
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
- n
223
+ "aria-label": v,
224
+ "data-state": g ? "expanded" : "collapsed",
225
+ style: i && g && (h || w !== R) ? { width: w } : void 0,
226
+ className: b(
227
+ "group/sidebar relative flex h-full flex-col bg-[var(--ui-sidebar-secondary-global-container-color)] border-e border-[var(--ui-sidebar-secondary-global-container-border-color)] [border-inline-end-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]",
228
+ i && "transition-[width,border-color] has-[[role=separator]:hover]:border-[var(--ui-resizable-border-color-hover)] has-[[role=separator]:active]:border-[var(--ui-resizable-border-color-active)] has-[[role=separator]:focus-visible]:border-[var(--ui-resizable-border-color-hover)] has-[[role=separator]:focus-visible]:ring-[3px] has-[[role=separator]:focus-visible]:ring-[var(--ui-focus-primary)]",
229
+ t
55
230
  ),
56
- children: c
231
+ children: /* @__PURE__ */ f(_, { children: [
232
+ /* @__PURE__ */ e(ee, {}),
233
+ S,
234
+ /* @__PURE__ */ e(ie, {})
235
+ ] })
57
236
  },
58
- l
237
+ E
59
238
  )
60
239
  });
61
- return /* @__PURE__ */ a(M.Provider, { value: S, children: y });
240
+ return /* @__PURE__ */ e($.Provider, { value: W, children: B });
62
241
  }
63
242
  );
64
- P.displayName = "SidebarSecondary";
65
- const L = o.forwardRef(({ className: n, label: e, children: r, ...s }, i) => (
66
- // Hidden in collapsed mode — the CollapsedBreadcrumb's parent label carries the
67
- // section context in the rail, so a truncated single-letter heading is omitted.
68
- /* @__PURE__ */ a(
243
+ se.displayName = "SidebarSecondary";
244
+ const oe = n.forwardRef(({ className: t, label: r, children: s, ...l }, i) => {
245
+ const { setHeaderLabel: a } = I(), o = r ?? s;
246
+ return n.useEffect(() => {
247
+ a(o);
248
+ }, [o, a]), /* @__PURE__ */ e(
69
249
  "div",
70
250
  {
71
251
  ref: i,
72
- className: t(
73
- "flex items-center shrink-0",
74
- "hidden group-data-[state=expanded]/sidebar:flex",
75
- "px-[var(--ui-sidebar-secondary-collapsed-container-header-padding-x)] py-[var(--ui-sidebar-secondary-collapsed-container-header-padding-y)]",
76
- "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
- n
252
+ className: b(
253
+ "hidden items-center shrink-0",
254
+ "group-data-[state=expanded]/sidebar:flex",
255
+ "px-[var(--ui-sidebar-secondary-global-container-header-padding-x)] py-[var(--ui-sidebar-secondary-global-container-header-padding-y)]",
256
+ t
78
257
  ),
79
- ...s,
80
- 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 })
258
+ ...l,
259
+ children: /* @__PURE__ */ e("h2", { className: "ui-sidebar-secondary-global-header-label-text-style truncate text-[var(--ui-sidebar-secondary-global-header-label-color)]", children: o })
81
260
  }
82
- )
83
- ));
84
- L.displayName = "SidebarSecondaryHeader";
85
- const A = o.forwardRef(({ className: n, ...e }, r) => (
261
+ );
262
+ });
263
+ oe.displayName = "SidebarSecondaryHeader";
264
+ const le = n.forwardRef(({ className: t, ...r }, s) => (
86
265
  // Expanded: the section list. Hidden in collapsed mode, where the
87
266
  // CollapsedBreadcrumb sibling takes over.
88
- /* @__PURE__ */ a(
267
+ /* @__PURE__ */ e(
89
268
  "div",
90
269
  {
91
- ref: r,
92
- className: t(
270
+ ref: s,
271
+ className: b(
93
272
  "flex flex-1 flex-col overflow-y-auto gap-[var(--ui-sidebar-secondary-global-section-list-gap)]",
94
273
  "hidden group-data-[state=expanded]/sidebar:flex",
95
- n
274
+ t
96
275
  ),
97
- ...e
276
+ ...r
98
277
  }
99
278
  )
100
279
  ));
101
- A.displayName = "SidebarSecondaryContent";
102
- const _ = o.forwardRef(({ className: n, parentLabel: e, currentLabel: r, separator: s, ...i }, d) => (
103
- // Shown only in collapsed mode — toggled by the same data-[state] selector so
104
- // it stays in the DOM (SSR-present) with no JS branch. Stacked top→bottom:
105
- // parent → separator → current page. In the ~48px rail the labels are rotated
106
- // to read vertically (`writing-mode: vertical-rl`, glyphs tilted 90° clockwise,
107
- // reading top-to-bottom) so long labels run down the rail instead of clipping;
108
- // the separator chevron is turned to point down to match that flow.
109
- /* @__PURE__ */ m(
110
- "div",
111
- {
112
- ref: d,
113
- className: t(
114
- // `flex-1` so the rail fills the space between the (hidden) header and the
115
- // footer, keeping the collapse trigger pinned to the bottom; the breadcrumb
116
- // content stays at the top of that space.
117
- "flex flex-1 flex-col items-center",
118
- "gap-[var(--ui-sidebar-secondary-collapsed-container-content-gap)] py-[var(--ui-sidebar-secondary-collapsed-container-content-padding-y)]",
119
- "flex group-data-[state=expanded]/sidebar:hidden",
120
- n
121
- ),
122
- ...i,
123
- children: [
124
- /* @__PURE__ */ a("span", { className: "ui-sidebar-secondary-collapsed-breadcrumb-label-text-style whitespace-nowrap [writing-mode:vertical-rl] text-[var(--ui-sidebar-secondary-collapsed-breadcrumb-label-color)]", children: e }),
125
- /* @__PURE__ */ a(
126
- "span",
127
- {
128
- "aria-hidden": "true",
129
- className: "inline-flex items-center text-[var(--ui-sidebar-secondary-collapsed-icon-separator-color)] [&>svg]:size-[var(--ui-sidebar-secondary-collapsed-icon-separator-size)]",
130
- children: s ?? /* @__PURE__ */ a(k, { size: 16, className: "rotate-90" })
131
- }
280
+ le.displayName = "SidebarSecondaryContent";
281
+ const ee = n.forwardRef(({ className: t, parentLabel: r, currentLabel: s, separator: l, ...i }, a) => {
282
+ const { headerLabel: o, selectedLabel: u } = I(), d = r ?? o, c = s ?? u;
283
+ return (
284
+ // Shown only in collapsed mode — toggled by the same data-[state] selector so
285
+ // it stays in the DOM (SSR-present) with no JS branch. Laid out vertically:
286
+ // parent → separator → current page.
287
+ /* @__PURE__ */ f(
288
+ "div",
289
+ {
290
+ ref: a,
291
+ className: b(
292
+ "flex flex-1 flex-col items-center min-h-0",
293
+ "gap-[var(--ui-sidebar-secondary-collapsed-container-content-gap)] py-[var(--ui-sidebar-secondary-collapsed-container-content-padding-y)]",
294
+ "flex group-data-[state=expanded]/sidebar:hidden",
295
+ t
132
296
  ),
133
- /* @__PURE__ */ a("span", { className: "ui-sidebar-secondary-collapsed-label-current-page-text-style whitespace-nowrap [writing-mode:vertical-rl] text-[var(--ui-sidebar-secondary-collapsed-label-current-page-color)]", children: r })
134
- ]
135
- }
136
- )
137
- ));
138
- _.displayName = "SidebarSecondaryCollapsedBreadcrumb";
139
- const B = o.forwardRef(({ className: n, ...e }, r) => /* @__PURE__ */ a(
297
+ ...i,
298
+ children: [
299
+ /* @__PURE__ */ e("span", { className: "[writing-mode:vertical-rl] [direction:ltr] shrink-0 ui-sidebar-secondary-collapsed-breadcrumb-label-text-style text-[var(--ui-sidebar-secondary-collapsed-breadcrumb-label-color)]", children: d }),
300
+ /* @__PURE__ */ e(
301
+ "span",
302
+ {
303
+ "aria-hidden": "true",
304
+ className: "inline-flex items-center text-[var(--ui-sidebar-secondary-collapsed-icon-separator-color)] [&>svg]:size-[var(--ui-sidebar-secondary-collapsed-icon-separator-size)]",
305
+ children: l ?? /* @__PURE__ */ e(G, { size: 16 })
306
+ }
307
+ ),
308
+ /* @__PURE__ */ e("span", { className: "[writing-mode:vertical-rl] [direction:ltr] flex-1 min-h-0 overflow-hidden ui-sidebar-secondary-collapsed-label-current-page-text-style text-[var(--ui-sidebar-secondary-collapsed-label-current-page-color)]", children: c })
309
+ ]
310
+ }
311
+ )
312
+ );
313
+ });
314
+ ee.displayName = "SidebarSecondaryCollapsedBreadcrumb";
315
+ const de = n.forwardRef(({ className: t, ...r }, s) => /* @__PURE__ */ e(
140
316
  "div",
141
317
  {
142
- ref: r,
143
- className: t(
318
+ ref: s,
319
+ className: b(
144
320
  "flex flex-col shrink-0",
145
321
  "border-t border-[var(--ui-sidebar-secondary-global-container-footer-border-color)] [border-top-width:var(--ui-sidebar-secondary-global-container-footer-border-width)]",
146
322
  "py-[var(--ui-sidebar-secondary-section-container-padding-y)]",
147
- n
323
+ t
148
324
  ),
149
- ...e
325
+ ...r
150
326
  }
151
327
  ));
152
- B.displayName = "SidebarSecondaryFooter";
153
- const f = o.createContext({ expandable: !1 }), V = { expandable: !1 }, F = { expandable: !0 }, H = o.forwardRef(
154
- ({ className: n, expandable: e = !1, open: r, defaultOpen: s = !0, onOpenChange: i, children: d, ...c }, l) => {
155
- const u = t(
328
+ de.displayName = "SidebarSecondaryFooter";
329
+ const H = n.createContext({
330
+ expandable: !1
331
+ }), ce = {
332
+ expandable: !1
333
+ }, ue = {
334
+ expandable: !0
335
+ }, be = n.forwardRef(
336
+ ({
337
+ className: t,
338
+ expandable: r = !1,
339
+ open: s,
340
+ defaultOpen: l = !0,
341
+ onOpenChange: i,
342
+ children: a,
343
+ ...o
344
+ }, u) => {
345
+ const d = b(
156
346
  "flex flex-col py-[var(--ui-sidebar-secondary-section-container-padding-y)]",
157
- n
347
+ t
158
348
  );
159
- return e ? /* @__PURE__ */ a(f.Provider, { value: F, children: /* @__PURE__ */ a(
160
- x.Root,
349
+ return r ? /* @__PURE__ */ e(H.Provider, { value: ue, children: /* @__PURE__ */ e(
350
+ X.Root,
161
351
  {
162
- ref: l,
163
- open: r,
164
- defaultOpen: s,
352
+ ref: u,
353
+ open: s,
354
+ defaultOpen: l,
165
355
  onOpenChange: i,
166
- render: /* @__PURE__ */ a("div", { className: u }),
167
- ...c,
168
- children: d
356
+ render: /* @__PURE__ */ e("div", { className: d }),
357
+ ...o,
358
+ children: a
169
359
  }
170
- ) }) : /* @__PURE__ */ a(f.Provider, { value: V, children: /* @__PURE__ */ a("div", { ref: l, className: u, ...c, children: d }) });
360
+ ) }) : /* @__PURE__ */ e(H.Provider, { value: ce, children: /* @__PURE__ */ e("div", { ref: u, className: d, ...o, children: a }) });
171
361
  }
172
362
  );
173
- H.displayName = "SidebarSecondarySection";
174
- 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 = o.forwardRef(({ className: n, actions: e, unreadRollup: r, children: s, ...i }, d) => {
175
- const { expandable: c } = o.useContext(f);
176
- if (!c) {
177
- const l = t(w, C, n);
178
- return e == null ? /* @__PURE__ */ a("div", { ref: d, className: l, ...i, children: s }) : /* @__PURE__ */ m(
363
+ be.displayName = "SidebarSecondarySection";
364
+ const U = "ui-sidebar-secondary-section-label-section-text-style text-[var(--ui-sidebar-secondary-section-label-section-color)]", V = "min-h-[var(--ui-sidebar-secondary-menu-item-global-container-height-min)] py-[var(--ui-sidebar-secondary-section-container-header-padding-y)] px-[var(--ui-sidebar-secondary-section-container-header-padding-x)]", pe = n.forwardRef(({ className: t, actions: r, unreadRollup: s, children: l, ...i }, a) => {
365
+ const { expandable: o } = n.useContext(H), u = n.useRef(null), d = K(u, { enabled: !0 }), c = /* @__PURE__ */ f(P, { disabled: !d, children: [
366
+ /* @__PURE__ */ e(
367
+ A,
368
+ {
369
+ render: /* @__PURE__ */ e(
370
+ "span",
371
+ {
372
+ ref: u,
373
+ className: "min-w-0 flex-1 truncate"
374
+ }
375
+ ),
376
+ children: l
377
+ }
378
+ ),
379
+ /* @__PURE__ */ e(M, { children: l })
380
+ ] });
381
+ if (!o) {
382
+ const v = b(U, V, t);
383
+ return r == null ? /* @__PURE__ */ e(
179
384
  "div",
180
385
  {
181
- ref: d,
182
- className: t(
183
- l,
386
+ ref: a,
387
+ className: b(
388
+ v,
389
+ "flex items-center"
390
+ ),
391
+ ...i,
392
+ children: c
393
+ }
394
+ ) : /* @__PURE__ */ f(
395
+ "div",
396
+ {
397
+ ref: a,
398
+ className: b(
399
+ v,
184
400
  "flex items-center gap-[var(--ui-sidebar-secondary-section-container-header-gap)]"
185
401
  ),
186
402
  ...i,
187
403
  children: [
188
- /* @__PURE__ */ a("span", { className: "min-w-0 flex-1 truncate", children: s }),
189
- /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center", children: e })
404
+ c,
405
+ /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: r })
190
406
  ]
191
407
  }
192
408
  );
193
409
  }
194
- return /* @__PURE__ */ m(
410
+ return /* @__PURE__ */ f(
195
411
  "div",
196
412
  {
197
- ref: d,
198
- className: t(
413
+ ref: a,
414
+ className: b(
199
415
  "flex items-center gap-[var(--ui-sidebar-secondary-section-container-header-gap)]",
200
- C,
201
- n
416
+ V,
417
+ t
202
418
  ),
203
419
  ...i,
204
420
  children: [
205
- /* @__PURE__ */ m(
206
- x.Trigger,
421
+ /* @__PURE__ */ f(
422
+ X.Trigger,
207
423
  {
208
- className: t(
209
- "group/section flex min-w-0 flex-1 items-center gap-[var(--ui-sidebar-secondary-section-container-header-gap)] text-left",
210
- w,
424
+ className: b(
425
+ "group/section flex min-w-0 flex-1 items-center gap-[var(--ui-sidebar-secondary-section-container-header-gap)] text-start",
426
+ U,
211
427
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-brand)] focus-visible:ring-inset"
212
428
  ),
213
429
  children: [
214
- /* @__PURE__ */ a(
215
- R,
430
+ /* @__PURE__ */ e(
431
+ G,
216
432
  {
217
433
  size: 16,
218
434
  "aria-hidden": "true",
219
- className: "shrink-0 -rotate-90 transition-transform group-data-[panel-open]/section:rotate-0 text-[var(--ui-sidebar-secondary-section-icon-arrow-color)]"
435
+ className: "shrink-0 ltr:-rotate-90 rtl:rotate-90 transition-transform group-data-[panel-open]/section:rotate-0 text-[var(--ui-sidebar-secondary-section-icon-arrow-color)]"
220
436
  }
221
437
  ),
222
- /* @__PURE__ */ a("span", { className: "min-w-0 flex-1 truncate", children: s }),
223
- r != null && /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center group-data-[panel-open]/section:hidden", children: r })
438
+ c,
439
+ s != null && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center group-data-[panel-open]/section:hidden", children: s })
224
440
  ]
225
441
  }
226
442
  ),
227
- e != null && /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center", children: e })
443
+ r != null && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: r })
228
444
  ]
229
445
  }
230
446
  );
231
447
  });
232
- j.displayName = "SidebarSecondarySectionLabel";
233
- const D = o.forwardRef(({ className: n, ...e }, r) => {
234
- const { expandable: s } = o.useContext(f), i = /* @__PURE__ */ a(
448
+ pe.displayName = "SidebarSecondarySectionLabel";
449
+ const me = n.forwardRef(({ className: t, ...r }, s) => {
450
+ const { expandable: l } = n.useContext(H), i = /* @__PURE__ */ e(
235
451
  "ul",
236
452
  {
237
- ref: r,
238
- className: t(
453
+ ref: s,
454
+ className: b(
239
455
  "flex flex-col gap-[var(--ui-sidebar-secondary-section-menu-item-list-gap)]",
240
- n
456
+ t
241
457
  ),
242
- ...e
458
+ ...r
243
459
  }
244
460
  );
245
- return s ? /* @__PURE__ */ a(x.Panel, { children: i }) : i;
461
+ return l ? /* @__PURE__ */ e(X.Panel, { children: i }) : i;
246
462
  });
247
- D.displayName = "SidebarSecondaryMenu";
248
- 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, {
463
+ me.displayName = "SidebarSecondaryMenu";
464
+ const fe = "group/row flex w-full items-start 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)]", re = te(fe, {
249
465
  variants: {
250
466
  variant: {
251
467
  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)]",
@@ -255,139 +471,77 @@ const O = "group/row flex w-full items-center gap-[var(--ui-sidebar-secondary-me
255
471
  defaultVariants: {
256
472
  variant: "unselected"
257
473
  }
258
- }), U = o.forwardRef(({ className: n, selected: e = !1, icon: r, render: s, children: i, ...d }, c) => {
259
- const { expanded: l } = g(), u = o.Children.toArray(i), b = u.filter(
260
- (y) => o.isValidElement(y) && y.type.displayName === "SidebarSecondaryMenuItemExtras"
261
- ), p = u.filter(
262
- (y) => !b.includes(y)
263
- ), S = N({
264
- render: s,
265
- ref: c,
266
- defaultTagName: "a",
267
- props: h(
268
- {
269
- className: t(
270
- v({
271
- variant: e ? "selected" : "unselected"
272
- }),
273
- n
274
- ),
275
- "aria-current": e ? "page" : void 0,
276
- children: /* @__PURE__ */ m(T, { children: [
277
- 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 }),
278
- /* @__PURE__ */ a(
279
- "span",
280
- {
281
- className: t(
282
- "min-w-0 flex-1 truncate text-left",
283
- !l && "sr-only"
284
- ),
285
- children: p
286
- }
474
+ }), ve = n.forwardRef(
475
+ ({ className: t, selected: r = !1, icon: s, extras: l, render: i, children: a, ...o }, u) => {
476
+ const { expanded: d, setSelectedLabel: c } = I(), { expandable: v } = n.useContext(H), m = n.useRef(null), S = K(m, { enabled: d });
477
+ n.useEffect(() => {
478
+ r && c(a);
479
+ }, [r, a, c]);
480
+ const E = q({
481
+ render: i,
482
+ ref: u,
483
+ defaultTagName: "a",
484
+ props: j(
485
+ {
486
+ className: b(
487
+ re({
488
+ variant: r ? "selected" : "unselected"
489
+ }),
490
+ // Inside an expandable section, increase start padding so the
491
+ // label aligns with the section header text (after chevron + gap)
492
+ // while keeping the container full-width for hover/active fills.
493
+ v && "ps-[calc(var(--ui-sidebar-secondary-menu-item-global-container-padding-x)+var(--ui-sidebar-secondary-section-container-header-gap)+16px)]",
494
+ t
287
495
  ),
288
- b.length > 0 && /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center", children: b })
289
- ] })
290
- },
291
- d
292
- )
293
- });
294
- return /* @__PURE__ */ a("li", { className: "contents", children: S });
295
- });
296
- U.displayName = "SidebarSecondaryMenuItem";
297
- const q = o.forwardRef(({ className: n, render: e, ...r }, s) => (
298
- // Disclosure row: Base UI Collapsible gives per-row open state +
299
- // aria-expanded/aria-controls. Rendered as the list `<li>` wrapper.
300
- /* @__PURE__ */ a(
301
- x.Root,
302
- {
303
- ref: s,
304
- render: e ?? /* @__PURE__ */ a("li", {}),
305
- className: t("contents", n),
306
- ...r
307
- }
308
- )
309
- ));
310
- q.displayName = "SidebarSecondaryMenuSub";
311
- const X = o.forwardRef(({ className: n, selected: e = !1, icon: r, children: s, ...i }, d) => {
312
- const { expanded: c } = g();
313
- return /* @__PURE__ */ m(
314
- x.Trigger,
315
- {
316
- ref: d,
317
- "aria-current": e ? "page" : void 0,
318
- className: t(
319
- v({
320
- variant: e ? "selected" : "unselected"
321
- }),
322
- "text-left",
323
- n
324
- ),
325
- ...i,
326
- children: [
327
- 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 }),
328
- /* @__PURE__ */ a("span", { className: t("flex-1 truncate", !c && "sr-only"), children: s }),
329
- /* @__PURE__ */ a(
330
- R,
331
- {
332
- size: 16,
333
- "aria-hidden": "true",
334
- className: t(
335
- "shrink-0 transition-transform group-data-[panel-open]/row:rotate-180",
336
- !c && "hidden"
337
- )
338
- }
339
- )
340
- ]
341
- }
342
- );
343
- });
344
- X.displayName = "SidebarSecondaryMenuSubTrigger";
345
- const G = o.forwardRef(({ className: n, children: e, ...r }, s) => /* @__PURE__ */ a(x.Panel, { ref: s, className: t(n), ...r, children: /* @__PURE__ */ a("ul", { className: "flex flex-col gap-[var(--ui-sidebar-secondary-section-menu-item-list-gap)]", children: e }) }));
346
- G.displayName = "SidebarSecondaryMenuSubContent";
347
- const J = o.forwardRef(({ className: n, selected: e = !1, render: r, children: s, ...i }, d) => {
348
- const { expanded: c } = g(), l = N({
349
- render: r,
350
- ref: d,
351
- defaultTagName: "a",
352
- props: h(
353
- {
354
- className: t(
355
- v({
356
- variant: e ? "selected" : "unselected"
357
- }),
358
- // Level-2 left indent (no icon column). The dedicated level-2 padding
359
- // token was removed in the next-gen sync; reconstruct the indent from
360
- // surviving tokens so the label aligns under level-1 labels (row
361
- // padding + icon column + gap).
362
- "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))]",
363
- n
364
- ),
365
- "aria-current": e ? "page" : void 0,
366
- children: /* @__PURE__ */ a("span", { className: t("flex-1 truncate text-left", !c && "sr-only"), children: s })
367
- },
368
- i
369
- )
370
- });
371
- return /* @__PURE__ */ a("li", { className: "contents", children: l });
372
- });
373
- J.displayName = "SidebarSecondaryMenuSubItem";
374
- const K = o.forwardRef(({ className: n, variant: e, shortcut: r, tag: s, children: i, ...d }, c) => {
375
- const { expanded: l } = g(), u = e === "tag" || e === "tag-externalLink", b = e === "externalLink" || e === "tag-externalLink", p = e === "shortcut";
376
- return /* @__PURE__ */ m(
496
+ "aria-current": r ? "page" : void 0,
497
+ children: /* @__PURE__ */ f(_, { children: [
498
+ s != null && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)]", children: s }),
499
+ /* @__PURE__ */ f(P, { disabled: !S, children: [
500
+ /* @__PURE__ */ e(
501
+ A,
502
+ {
503
+ render: /* @__PURE__ */ e(
504
+ "span",
505
+ {
506
+ ref: m,
507
+ className: b(
508
+ "flex-1 min-w-[60px] truncate text-start",
509
+ !d && "sr-only"
510
+ )
511
+ }
512
+ ),
513
+ children: a
514
+ }
515
+ ),
516
+ /* @__PURE__ */ e(M, { children: a })
517
+ ] }),
518
+ l
519
+ ] })
520
+ },
521
+ o
522
+ )
523
+ });
524
+ return /* @__PURE__ */ e("li", { className: "contents", children: E });
525
+ }
526
+ );
527
+ ve.displayName = "SidebarSecondaryMenuItem";
528
+ const he = n.forwardRef(({ className: t, variant: r, shortcut: s, tag: l, children: i, ...a }, o) => {
529
+ const { expanded: u } = I(), d = r === "tag" || r === "tag-externalLink", c = r === "externalLink" || r === "tag-externalLink", v = r === "shortcut";
530
+ return /* @__PURE__ */ f(
377
531
  "span",
378
532
  {
379
- ref: c,
380
- className: t(
381
- "inline-flex items-center gap-[var(--ui-sidebar-secondary-menu-item-extras-global-container-gap)]",
382
- !l && "hidden",
383
- n
533
+ ref: o,
534
+ className: b(
535
+ "inline-flex items-center shrink-0 min-h-6 overflow-clip gap-[var(--ui-sidebar-secondary-menu-item-extras-global-container-gap)]",
536
+ !u && "hidden",
537
+ t
384
538
  ),
385
- ...d,
539
+ ...a,
386
540
  children: [
387
- u && (s ?? i),
388
- 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 }),
389
- b && /* @__PURE__ */ a(
390
- I,
541
+ d && (l ?? i),
542
+ v && /* @__PURE__ */ e("span", { className: "ui-sidebar-secondary-menu-item-extras-global-shortcut-text-style text-[var(--ui-sidebar-secondary-menu-item-extras-global-shortcut-color)]", children: s ?? i }),
543
+ c && /* @__PURE__ */ e(
544
+ ae,
391
545
  {
392
546
  size: 16,
393
547
  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)]"
@@ -397,70 +551,74 @@ const K = o.forwardRef(({ className: n, variant: e, shortcut: r, tag: s, childre
397
551
  }
398
552
  );
399
553
  });
400
- K.displayName = "SidebarSecondaryMenuItemExtras";
401
- const Q = o.forwardRef(({ className: n, icon: e, shortcut: r, children: s, onClick: i, ...d }, c) => {
402
- const { expanded: l, toggleExpanded: u } = g();
403
- return /* @__PURE__ */ a("li", { className: "contents", children: /* @__PURE__ */ m(
404
- "button",
405
- {
406
- ref: c,
407
- type: "button",
408
- "aria-expanded": l,
409
- className: t(
410
- v({ variant: "unselected" }),
411
- "text-left",
412
- n
413
- ),
414
- onClick: (b) => {
415
- i == null || i(b), b.defaultPrevented || u();
416
- },
417
- ...d,
418
- children: [
419
- e != null && // Flip the chevron when collapsed so a chevron-left ("collapse")
420
- // becomes a chevron-right ("expand") — the icon always points toward
421
- // the action it triggers.
422
- /* @__PURE__ */ a(
423
- "span",
424
- {
425
- className: t(
426
- "flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)] transition-transform",
427
- !l && "rotate-180"
428
- ),
429
- children: e
430
- }
554
+ he.displayName = "SidebarSecondaryMenuItemExtras";
555
+ const ge = n.forwardRef(
556
+ ({
557
+ className: t,
558
+ icon: r,
559
+ expandIcon: s,
560
+ expandTooltip: l = "Expand",
561
+ extras: i,
562
+ children: a,
563
+ onClick: o,
564
+ ...u
565
+ }, d) => {
566
+ const { expanded: c, toggleExpanded: v } = I(), m = J(), S = n.useRef(null), E = K(S, { enabled: c }), L = c ? r : s ?? r, g = /* @__PURE__ */ f(
567
+ "button",
568
+ {
569
+ ref: d,
570
+ type: "button",
571
+ "aria-expanded": c,
572
+ className: b(
573
+ re({ variant: "unselected" }),
574
+ "text-start",
575
+ t
431
576
  ),
432
- /* @__PURE__ */ a("span", { className: t("flex-1 truncate", !l && "sr-only"), children: s }),
433
- r != null && /* @__PURE__ */ a(
434
- "span",
435
- {
436
- className: t(
437
- "shrink-0 ui-sidebar-secondary-menu-item-extras-global-shortcut-text-style text-[var(--ui-sidebar-secondary-menu-item-extras-global-shortcut-color)]",
438
- !l && "sr-only"
577
+ onClick: (k) => {
578
+ o == null || o(k), k.defaultPrevented || v();
579
+ },
580
+ ...u,
581
+ children: [
582
+ L != null && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center self-start mt-[var(--ui-sidebar-secondary-menu-item-global-icon-margin-t)] rtl:-scale-x-100", children: L }),
583
+ /* @__PURE__ */ f(P, { disabled: !E, children: [
584
+ /* @__PURE__ */ e(
585
+ A,
586
+ {
587
+ render: /* @__PURE__ */ e(
588
+ "span",
589
+ {
590
+ ref: S,
591
+ className: b("flex-1 min-w-[60px] truncate", !c && "sr-only")
592
+ }
593
+ ),
594
+ children: a
595
+ }
439
596
  ),
440
- children: r
441
- }
442
- )
443
- ]
444
- }
445
- ) });
446
- });
447
- Q.displayName = "SidebarSecondaryCollapseTrigger";
597
+ /* @__PURE__ */ e(M, { children: a })
598
+ ] }),
599
+ i
600
+ ]
601
+ }
602
+ );
603
+ return /* @__PURE__ */ e("li", { className: "contents", children: c ? g : /* @__PURE__ */ f(P, { children: [
604
+ /* @__PURE__ */ e(A, { render: g }),
605
+ /* @__PURE__ */ e(M, { side: m === "rtl" ? "left" : "right", children: l })
606
+ ] }) });
607
+ }
608
+ );
609
+ ge.displayName = "SidebarSecondaryCollapseTrigger";
448
610
  export {
449
- P as SidebarSecondary,
450
- Q as SidebarSecondaryCollapseTrigger,
451
- _ as SidebarSecondaryCollapsedBreadcrumb,
452
- A as SidebarSecondaryContent,
453
- B as SidebarSecondaryFooter,
454
- L as SidebarSecondaryHeader,
455
- D as SidebarSecondaryMenu,
456
- U as SidebarSecondaryMenuItem,
457
- K as SidebarSecondaryMenuItemExtras,
458
- q as SidebarSecondaryMenuSub,
459
- G as SidebarSecondaryMenuSubContent,
460
- J as SidebarSecondaryMenuSubItem,
461
- X as SidebarSecondaryMenuSubTrigger,
462
- H as SidebarSecondarySection,
463
- j as SidebarSecondarySectionLabel,
464
- v as sidebarSecondaryMenuItemVariants
611
+ se as SidebarSecondary,
612
+ ge as SidebarSecondaryCollapseTrigger,
613
+ ee as SidebarSecondaryCollapsedBreadcrumb,
614
+ le as SidebarSecondaryContent,
615
+ de as SidebarSecondaryFooter,
616
+ oe as SidebarSecondaryHeader,
617
+ me as SidebarSecondaryMenu,
618
+ ve as SidebarSecondaryMenuItem,
619
+ he as SidebarSecondaryMenuItemExtras,
620
+ be as SidebarSecondarySection,
621
+ pe as SidebarSecondarySectionLabel,
622
+ re as sidebarSecondaryMenuItemVariants
465
623
  };
466
624
  //# sourceMappingURL=sidebar-secondary.js.map