@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.
- package/dist/components/ui/button/button.js +7 -7
- package/dist/components/ui/button/button.js.map +1 -1
- package/dist/components/ui/sidebar-secondary/sidebar-secondary.js +223 -170
- package/dist/components/ui/sidebar-secondary/sidebar-secondary.js.map +1 -1
- package/dist/src/components/ui/sidebar-secondary/sidebar-secondary.d.ts +24 -2
- package/dist/ui-react.css +1 -1
- package/package.json +3 -3
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
import { jsx as
|
|
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
|
|
4
|
-
import { useRender as
|
|
5
|
-
import { Collapsible as
|
|
6
|
-
import { ChevronRightIcon as
|
|
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
|
|
10
|
-
function
|
|
11
|
-
return d.useContext(
|
|
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
|
|
18
|
-
const [
|
|
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 ||
|
|
20
|
+
t || i(u), r == null || r(u);
|
|
21
21
|
},
|
|
22
|
-
[t,
|
|
22
|
+
[t, r]
|
|
23
23
|
);
|
|
24
24
|
return [c, l];
|
|
25
25
|
}
|
|
26
|
-
const
|
|
26
|
+
const P = d.forwardRef(
|
|
27
27
|
({
|
|
28
|
-
className:
|
|
28
|
+
className: n,
|
|
29
29
|
expanded: e,
|
|
30
|
-
defaultExpanded:
|
|
31
|
-
onExpandedChange:
|
|
32
|
-
"aria-label":
|
|
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 [
|
|
37
|
+
const [m, g] = E(
|
|
38
38
|
e,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
),
|
|
42
|
-
() => ({ expanded:
|
|
43
|
-
[
|
|
44
|
-
),
|
|
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:
|
|
48
|
+
props: v(
|
|
49
49
|
{
|
|
50
|
-
"aria-label":
|
|
51
|
-
"data-state":
|
|
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
|
-
|
|
54
|
+
n
|
|
55
55
|
),
|
|
56
56
|
children: c
|
|
57
57
|
},
|
|
58
58
|
l
|
|
59
59
|
)
|
|
60
60
|
});
|
|
61
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ a(C.Provider, { value: R, children: M });
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
|
-
|
|
65
|
-
const
|
|
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:
|
|
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
|
-
|
|
73
|
+
n
|
|
74
74
|
),
|
|
75
|
-
...
|
|
76
|
-
children: /* @__PURE__ */
|
|
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
|
-
|
|
80
|
-
const
|
|
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__ */
|
|
83
|
+
/* @__PURE__ */ a(
|
|
84
84
|
"div",
|
|
85
85
|
{
|
|
86
|
-
ref:
|
|
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
|
-
|
|
90
|
+
n
|
|
91
91
|
),
|
|
92
92
|
...e
|
|
93
93
|
}
|
|
94
94
|
)
|
|
95
95
|
));
|
|
96
|
-
|
|
97
|
-
const
|
|
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__ */
|
|
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
|
-
|
|
109
|
+
n
|
|
110
110
|
),
|
|
111
|
-
...
|
|
111
|
+
...i,
|
|
112
112
|
children: [
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
/* @__PURE__ */
|
|
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:
|
|
119
|
+
children: s ?? /* @__PURE__ */ a(k, { size: 16 })
|
|
120
120
|
}
|
|
121
121
|
),
|
|
122
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
128
|
-
const
|
|
127
|
+
A.displayName = "SidebarSecondaryCollapsedBreadcrumb";
|
|
128
|
+
const B = d.forwardRef(({ className: n, ...e }, r) => /* @__PURE__ */ a(
|
|
129
129
|
"div",
|
|
130
130
|
{
|
|
131
|
-
ref:
|
|
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
|
-
|
|
136
|
+
n
|
|
137
137
|
),
|
|
138
138
|
...e
|
|
139
139
|
}
|
|
140
140
|
));
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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:
|
|
186
|
+
ref: t,
|
|
150
187
|
className: o(
|
|
151
|
-
"flex
|
|
152
|
-
|
|
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
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
}),
|
|
195
|
-
const { expanded: l } =
|
|
196
|
-
render:
|
|
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:
|
|
252
|
+
props: v(
|
|
200
253
|
{
|
|
201
254
|
className: o(
|
|
202
|
-
|
|
255
|
+
f({
|
|
203
256
|
variant: e ? "selected" : "unselected"
|
|
204
257
|
}),
|
|
205
|
-
|
|
258
|
+
n
|
|
206
259
|
),
|
|
207
260
|
"aria-current": e ? "page" : void 0,
|
|
208
|
-
children: /* @__PURE__ */
|
|
209
|
-
|
|
210
|
-
/* @__PURE__ */
|
|
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:
|
|
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__ */
|
|
275
|
+
return /* @__PURE__ */ a("li", { className: "contents", children: u });
|
|
223
276
|
});
|
|
224
|
-
|
|
225
|
-
const
|
|
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__ */
|
|
229
|
-
|
|
281
|
+
/* @__PURE__ */ a(
|
|
282
|
+
p.Root,
|
|
230
283
|
{
|
|
231
|
-
ref:
|
|
232
|
-
render: e ?? /* @__PURE__ */
|
|
233
|
-
className: o("contents",
|
|
234
|
-
...
|
|
284
|
+
ref: s,
|
|
285
|
+
render: e ?? /* @__PURE__ */ a("li", {}),
|
|
286
|
+
className: o("contents", n),
|
|
287
|
+
...r
|
|
235
288
|
}
|
|
236
289
|
)
|
|
237
290
|
));
|
|
238
|
-
|
|
239
|
-
const
|
|
240
|
-
const { expanded: c } =
|
|
241
|
-
return /* @__PURE__ */
|
|
242
|
-
|
|
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
|
-
|
|
300
|
+
f({
|
|
248
301
|
variant: e ? "selected" : "unselected"
|
|
249
302
|
}),
|
|
250
303
|
"text-left",
|
|
251
|
-
|
|
304
|
+
n
|
|
252
305
|
),
|
|
253
|
-
...
|
|
306
|
+
...i,
|
|
254
307
|
children: [
|
|
255
|
-
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
|
|
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
|
-
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
const
|
|
276
|
-
const { expanded: c } =
|
|
277
|
-
render:
|
|
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:
|
|
333
|
+
props: v(
|
|
281
334
|
{
|
|
282
335
|
className: o(
|
|
283
|
-
|
|
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
|
-
|
|
344
|
+
n
|
|
292
345
|
),
|
|
293
346
|
"aria-current": e ? "page" : void 0,
|
|
294
|
-
children: /* @__PURE__ */
|
|
347
|
+
children: /* @__PURE__ */ a("span", { className: o("flex-1 truncate text-left", !c && "sr-only"), children: s })
|
|
295
348
|
},
|
|
296
|
-
|
|
349
|
+
i
|
|
297
350
|
)
|
|
298
351
|
});
|
|
299
|
-
return /* @__PURE__ */
|
|
352
|
+
return /* @__PURE__ */ a("li", { className: "contents", children: l });
|
|
300
353
|
});
|
|
301
|
-
|
|
302
|
-
const
|
|
303
|
-
const { expanded: l } =
|
|
304
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
364
|
+
n
|
|
312
365
|
),
|
|
313
366
|
...t,
|
|
314
367
|
children: [
|
|
315
|
-
u && (
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
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
|
-
|
|
329
|
-
const
|
|
330
|
-
const { expanded: c, toggleExpanded: l } =
|
|
331
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
391
|
+
f({ variant: "unselected" }),
|
|
339
392
|
"text-left",
|
|
340
|
-
|
|
393
|
+
n
|
|
341
394
|
),
|
|
342
395
|
onClick: (u) => {
|
|
343
|
-
|
|
396
|
+
s == null || s(u), u.defaultPrevented || l();
|
|
344
397
|
},
|
|
345
|
-
...
|
|
398
|
+
...i,
|
|
346
399
|
children: [
|
|
347
|
-
e != null && /* @__PURE__ */
|
|
348
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
406
|
+
Q.displayName = "SidebarSecondaryCollapseTrigger";
|
|
354
407
|
export {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
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
|