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