@aortl/admin-react 0.3.0 → 0.5.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/Accordion.d.ts.map +1 -1
- package/dist/AdminRoot.d.ts +12 -1
- package/dist/AdminRoot.d.ts.map +1 -1
- package/dist/Alert.d.ts.map +1 -1
- package/dist/AppShell.d.ts.map +1 -1
- package/dist/Badge.d.ts.map +1 -1
- package/dist/BrandTile.d.ts.map +1 -1
- package/dist/Breadcrumbs.d.ts.map +1 -1
- package/dist/ButtonGroup.d.ts.map +1 -1
- package/dist/Card.d.ts.map +1 -1
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/Footer.d.ts.map +1 -1
- package/dist/InputGroup.d.ts.map +1 -1
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Navbar.d.ts.map +1 -1
- package/dist/Pagination.d.ts.map +1 -1
- package/dist/Progress.d.ts.map +1 -1
- package/dist/Sidebar.d.ts.map +1 -1
- package/dist/Spinner.d.ts.map +1 -1
- package/dist/Table.d.ts.map +1 -1
- package/dist/Textarea.d.ts.map +1 -1
- package/dist/admin.scoped.css +476 -412
- package/dist/cn.d.ts +9 -3
- package/dist/cn.d.ts.map +1 -1
- package/dist/index.cjs +145 -101
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +145 -101
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/admin.css +0 -3477
package/dist/index.cjs
CHANGED
|
@@ -13,28 +13,49 @@ let _base_ui_react_field = require("@base-ui/react/field");
|
|
|
13
13
|
let _base_ui_react_tabs = require("@base-ui/react/tabs");
|
|
14
14
|
let _base_ui_react_tooltip = require("@base-ui/react/tooltip");
|
|
15
15
|
let _base_ui_react_dialog = require("@base-ui/react/dialog");
|
|
16
|
+
//#region src/cn.ts
|
|
17
|
+
/**
|
|
18
|
+
* Every admin class name is prefixed so the bundle can coexist with a host
|
|
19
|
+
* page's CSS without colliding on common names like `.btn` or `.card`. The
|
|
20
|
+
* matching CSS lives in `@aortl/admin-css/admin.scoped.css` (built by
|
|
21
|
+
* `wrap-scoped.mjs`), which carries the same prefix on every selector.
|
|
22
|
+
*/
|
|
23
|
+
var PREFIX = "_ao-";
|
|
24
|
+
function prefixTokens(value) {
|
|
25
|
+
if (!value) return "";
|
|
26
|
+
return value.split(/\s+/).filter(Boolean).map((token) => `${PREFIX}${token}`).join(" ");
|
|
27
|
+
}
|
|
28
|
+
function join(...parts) {
|
|
29
|
+
return parts.filter(Boolean).join(" ");
|
|
30
|
+
}
|
|
31
|
+
function cn(base, className) {
|
|
32
|
+
const baseClasses = prefixTokens((0, clsx.clsx)(base));
|
|
33
|
+
if (typeof className === "function") return (state) => join(baseClasses, className(state) ?? void 0);
|
|
34
|
+
return join(baseClasses, className);
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
16
37
|
//#region src/Accordion.tsx
|
|
17
38
|
function AccordionRoot({ className, ...rest }) {
|
|
18
39
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
19
|
-
className: (
|
|
40
|
+
className: cn("accordion", className),
|
|
20
41
|
...rest
|
|
21
42
|
});
|
|
22
43
|
}
|
|
23
44
|
function AccordionItem({ className, ...rest }) {
|
|
24
45
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("details", {
|
|
25
|
-
className: (
|
|
46
|
+
className: cn("accordion-item", className),
|
|
26
47
|
...rest
|
|
27
48
|
});
|
|
28
49
|
}
|
|
29
50
|
function AccordionSummary({ className, ...rest }) {
|
|
30
51
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", {
|
|
31
|
-
className: (
|
|
52
|
+
className: cn("accordion-summary", className),
|
|
32
53
|
...rest
|
|
33
54
|
});
|
|
34
55
|
}
|
|
35
56
|
function AccordionContent({ className, ...rest }) {
|
|
36
57
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
37
|
-
className: (
|
|
58
|
+
className: cn("accordion-content", className),
|
|
38
59
|
...rest
|
|
39
60
|
});
|
|
40
61
|
}
|
|
@@ -45,10 +66,16 @@ var Accordion = Object.assign(AccordionRoot, {
|
|
|
45
66
|
});
|
|
46
67
|
//#endregion
|
|
47
68
|
//#region src/AdminRoot.tsx
|
|
48
|
-
function AdminRoot({ className, ...rest }) {
|
|
69
|
+
function AdminRoot({ className, theme, systemAccent, style, ...rest }) {
|
|
70
|
+
const rootStyle = systemAccent !== void 0 ? {
|
|
71
|
+
...style,
|
|
72
|
+
"--color-system-accent": systemAccent
|
|
73
|
+
} : style;
|
|
49
74
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
50
|
-
className: (
|
|
51
|
-
|
|
75
|
+
className: cn("admin-root", className),
|
|
76
|
+
style: rootStyle,
|
|
77
|
+
...rest,
|
|
78
|
+
...theme !== void 0 && { "data-theme": theme }
|
|
52
79
|
});
|
|
53
80
|
}
|
|
54
81
|
//#endregion
|
|
@@ -74,7 +101,7 @@ function renderIcon(icon, size = 16) {
|
|
|
74
101
|
function AlertRoot({ variant = "info", icon, title, description, className, role, children, ...rest }) {
|
|
75
102
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
76
103
|
role: role ?? (variant === "danger" || variant === "warning" ? "alert" : "status"),
|
|
77
|
-
className: (
|
|
104
|
+
className: cn(["alert", `alert-${variant}`], className),
|
|
78
105
|
...rest,
|
|
79
106
|
children: [
|
|
80
107
|
renderIcon(icon),
|
|
@@ -86,13 +113,13 @@ function AlertRoot({ variant = "info", icon, title, description, className, role
|
|
|
86
113
|
}
|
|
87
114
|
function AlertTitle({ className, ...rest }) {
|
|
88
115
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
|
|
89
|
-
className: (
|
|
116
|
+
className: cn("alert-title", className),
|
|
90
117
|
...rest
|
|
91
118
|
});
|
|
92
119
|
}
|
|
93
120
|
function AlertDescription({ className, ...rest }) {
|
|
94
121
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
95
|
-
className: (
|
|
122
|
+
className: cn("alert-description", className),
|
|
96
123
|
...rest
|
|
97
124
|
});
|
|
98
125
|
}
|
|
@@ -130,7 +157,11 @@ function AppShellRoot({ hasSidebar = false, hasFooter = false, mobileDrawerOpen,
|
|
|
130
157
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AppShellContext.Provider, {
|
|
131
158
|
value,
|
|
132
159
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
133
|
-
className: (
|
|
160
|
+
className: cn([
|
|
161
|
+
"app-shell",
|
|
162
|
+
hasSidebar && "app-shell-with-sidebar",
|
|
163
|
+
hasFooter && "app-shell-with-footer"
|
|
164
|
+
], className),
|
|
134
165
|
style: rootStyle,
|
|
135
166
|
...rest,
|
|
136
167
|
children
|
|
@@ -139,7 +170,7 @@ function AppShellRoot({ hasSidebar = false, hasFooter = false, mobileDrawerOpen,
|
|
|
139
170
|
}
|
|
140
171
|
function AppShellMain({ className, ...rest }) {
|
|
141
172
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("main", {
|
|
142
|
-
className: (
|
|
173
|
+
className: cn("app-shell-main", className),
|
|
143
174
|
...rest
|
|
144
175
|
});
|
|
145
176
|
}
|
|
@@ -148,7 +179,11 @@ var AppShell = Object.assign(AppShellRoot, { Main: AppShellMain });
|
|
|
148
179
|
//#region src/Badge.tsx
|
|
149
180
|
function Badge({ variant = "neutral", size = "md", icon, className, children, ...rest }) {
|
|
150
181
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
151
|
-
className: (
|
|
182
|
+
className: cn([
|
|
183
|
+
"badge",
|
|
184
|
+
`badge-${variant}`,
|
|
185
|
+
size !== "md" && `badge-${size}`
|
|
186
|
+
], className),
|
|
152
187
|
...rest,
|
|
153
188
|
children: [renderIcon(icon, size === "sm" ? 10 : 12), children]
|
|
154
189
|
});
|
|
@@ -157,26 +192,13 @@ function Badge({ variant = "neutral", size = "md", icon, className, children, ..
|
|
|
157
192
|
//#region src/BrandTile.tsx
|
|
158
193
|
function BrandTile({ monogram, icon, className, children, ...rest }) {
|
|
159
194
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
160
|
-
className: (
|
|
195
|
+
className: cn("brand-tile", className),
|
|
161
196
|
"aria-hidden": true,
|
|
162
197
|
...rest,
|
|
163
198
|
children: icon ? renderIcon(icon, 14) : children ?? monogram
|
|
164
199
|
});
|
|
165
200
|
}
|
|
166
201
|
//#endregion
|
|
167
|
-
//#region src/cn.ts
|
|
168
|
-
/**
|
|
169
|
-
* className merger that preserves Base UI's render-prop className form.
|
|
170
|
-
*
|
|
171
|
-
* Base UI components accept `className: string | ((state) => string | undefined)`. The plain
|
|
172
|
-
* `clsx()` path is correct for strings, but a function form has to be deferred
|
|
173
|
-
* until Base UI invokes it with the component state.
|
|
174
|
-
*/
|
|
175
|
-
function cn(base, className) {
|
|
176
|
-
if (typeof className === "function") return (state) => (0, clsx.clsx)(base, className(state));
|
|
177
|
-
return (0, clsx.clsx)(base, className);
|
|
178
|
-
}
|
|
179
|
-
//#endregion
|
|
180
202
|
//#region src/Button.tsx
|
|
181
203
|
function Button({ variant = "primary", size = "md", fullWidth, loading, icon, iconTrailing, className, type = "button", disabled, children, ...rest }) {
|
|
182
204
|
const iconOnly = children == null && (icon != null || iconTrailing != null);
|
|
@@ -205,7 +227,7 @@ function Button({ variant = "primary", size = "md", fullWidth, loading, icon, ic
|
|
|
205
227
|
function ButtonGroup({ orientation = "horizontal", role = "group", className, ...rest }) {
|
|
206
228
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
207
229
|
role,
|
|
208
|
-
className: (
|
|
230
|
+
className: cn(["btn-group", orientation === "vertical" && "btn-group-vertical"], className),
|
|
209
231
|
...rest
|
|
210
232
|
});
|
|
211
233
|
}
|
|
@@ -215,7 +237,7 @@ function BreadcrumbsRoot({ separator, className, children, "aria-label": ariaLab
|
|
|
215
237
|
const items = react.Children.toArray(children).filter(react.isValidElement);
|
|
216
238
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
217
239
|
"aria-label": ariaLabel,
|
|
218
|
-
className: (
|
|
240
|
+
className: cn("breadcrumbs", className),
|
|
219
241
|
...rest,
|
|
220
242
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", { children: items.map((child, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [child, i < items.length - 1 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BreadcrumbSeparator, { children: separator }) : null] }, child.key ?? i)) })
|
|
221
243
|
});
|
|
@@ -224,7 +246,7 @@ function BreadcrumbItem(props) {
|
|
|
224
246
|
if (props.href !== void 0) {
|
|
225
247
|
const { className, current, icon, children, ...rest } = props;
|
|
226
248
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
|
|
227
|
-
className: (
|
|
249
|
+
className: cn("breadcrumb-item", className),
|
|
228
250
|
"aria-current": current ? "page" : void 0,
|
|
229
251
|
...rest,
|
|
230
252
|
children: [renderIcon(icon, 14), children]
|
|
@@ -232,7 +254,7 @@ function BreadcrumbItem(props) {
|
|
|
232
254
|
}
|
|
233
255
|
const { className, current, icon, children, ...rest } = props;
|
|
234
256
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
235
|
-
className: (
|
|
257
|
+
className: cn("breadcrumb-item", className),
|
|
236
258
|
"aria-current": current ? "page" : void 0,
|
|
237
259
|
...rest,
|
|
238
260
|
children: [renderIcon(icon, 14), children]
|
|
@@ -241,7 +263,7 @@ function BreadcrumbItem(props) {
|
|
|
241
263
|
function BreadcrumbSeparator({ className, children, ...rest }) {
|
|
242
264
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
243
265
|
"aria-hidden": "true",
|
|
244
|
-
className: (
|
|
266
|
+
className: cn("breadcrumb-separator", className),
|
|
245
267
|
...rest,
|
|
246
268
|
children
|
|
247
269
|
});
|
|
@@ -280,13 +302,13 @@ function FileInput({ variant = "bordered", inputSize = "md", className, ...rest
|
|
|
280
302
|
//#region src/InputGroup.tsx
|
|
281
303
|
function InputGroupRoot({ className, ...rest }) {
|
|
282
304
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
283
|
-
className: (
|
|
305
|
+
className: cn("input-group", className),
|
|
284
306
|
...rest
|
|
285
307
|
});
|
|
286
308
|
}
|
|
287
309
|
function InputGroupAddon({ className, ...rest }) {
|
|
288
310
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
289
|
-
className: (
|
|
311
|
+
className: cn("input-group-addon", className),
|
|
290
312
|
...rest
|
|
291
313
|
});
|
|
292
314
|
}
|
|
@@ -371,10 +393,10 @@ function Pagination({ page, total, onPageChange, siblingCount = 1, boundaryCount
|
|
|
371
393
|
const next = nextIcon !== void 0 ? renderIcon(nextIcon, 16) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChevronRightIcon, {});
|
|
372
394
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
373
395
|
"aria-label": ariaLabel,
|
|
374
|
-
className: (
|
|
396
|
+
className: cn("pagination", className),
|
|
375
397
|
...rest,
|
|
376
398
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { children: items.map((item, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
|
|
377
|
-
className: "page-item",
|
|
399
|
+
className: cn("page-item", void 0),
|
|
378
400
|
children: renderItem ? renderItem(item) : defaultRender(item, onPageChange, prev, next)
|
|
379
401
|
}, paginationItemKey(item, i))) })
|
|
380
402
|
});
|
|
@@ -420,7 +442,7 @@ function defaultRender(item, onPageChange, prev, next) {
|
|
|
420
442
|
switch (item.type) {
|
|
421
443
|
case "previous": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
422
444
|
type: "button",
|
|
423
|
-
className: "page-link",
|
|
445
|
+
className: cn("page-link", void 0),
|
|
424
446
|
"aria-label": "Previous page",
|
|
425
447
|
"aria-disabled": item.disabled || void 0,
|
|
426
448
|
disabled: item.disabled,
|
|
@@ -429,7 +451,7 @@ function defaultRender(item, onPageChange, prev, next) {
|
|
|
429
451
|
});
|
|
430
452
|
case "next": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
431
453
|
type: "button",
|
|
432
|
-
className: "page-link",
|
|
454
|
+
className: cn("page-link", void 0),
|
|
433
455
|
"aria-label": "Next page",
|
|
434
456
|
"aria-disabled": item.disabled || void 0,
|
|
435
457
|
disabled: item.disabled,
|
|
@@ -437,13 +459,13 @@ function defaultRender(item, onPageChange, prev, next) {
|
|
|
437
459
|
children: next
|
|
438
460
|
});
|
|
439
461
|
case "ellipsis": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
440
|
-
className: "page-ellipsis",
|
|
462
|
+
className: cn("page-ellipsis", void 0),
|
|
441
463
|
"aria-hidden": "true",
|
|
442
464
|
children: "…"
|
|
443
465
|
});
|
|
444
466
|
case "page": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
445
467
|
type: "button",
|
|
446
|
-
className: (
|
|
468
|
+
className: cn(["page-link", item.selected && "active"], void 0),
|
|
447
469
|
"aria-current": item.selected ? "page" : void 0,
|
|
448
470
|
"aria-label": `Page ${item.page}`,
|
|
449
471
|
onClick: () => onPageChange(item.page),
|
|
@@ -455,7 +477,11 @@ function defaultRender(item, onPageChange, prev, next) {
|
|
|
455
477
|
//#region src/Textarea.tsx
|
|
456
478
|
function Textarea({ variant = "bordered", textareaSize = "md", className, ...rest }) {
|
|
457
479
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
458
|
-
className: (
|
|
480
|
+
className: cn([
|
|
481
|
+
"textarea",
|
|
482
|
+
`textarea-${variant}`,
|
|
483
|
+
textareaSize !== "md" && `textarea-${textareaSize}`
|
|
484
|
+
], className),
|
|
459
485
|
...rest
|
|
460
486
|
});
|
|
461
487
|
}
|
|
@@ -517,7 +543,11 @@ function Progress({ value, max = 100, variant = "primary", size = "md", classNam
|
|
|
517
543
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("progress", {
|
|
518
544
|
value,
|
|
519
545
|
max,
|
|
520
|
-
className: (
|
|
546
|
+
className: cn([
|
|
547
|
+
"progress",
|
|
548
|
+
variant !== "primary" && `progress-${variant}`,
|
|
549
|
+
size !== "md" && `progress-${size}`
|
|
550
|
+
], className),
|
|
521
551
|
...rest
|
|
522
552
|
});
|
|
523
553
|
}
|
|
@@ -526,7 +556,7 @@ function Progress({ value, max = 100, variant = "primary", size = "md", classNam
|
|
|
526
556
|
function Spinner({ size = "md", label = "Loading", className, ...rest }) {
|
|
527
557
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("output", {
|
|
528
558
|
"aria-label": label,
|
|
529
|
-
className: (
|
|
559
|
+
className: cn(["spinner", size !== "md" && `spinner-${size}`], className),
|
|
530
560
|
...rest
|
|
531
561
|
});
|
|
532
562
|
}
|
|
@@ -653,7 +683,11 @@ var Select = Object.assign(SelectRoot, {
|
|
|
653
683
|
*/
|
|
654
684
|
function CardContainer({ bordered, compact, className, ...rest }) {
|
|
655
685
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
656
|
-
className: (
|
|
686
|
+
className: cn([
|
|
687
|
+
"card",
|
|
688
|
+
bordered && "card-bordered",
|
|
689
|
+
compact && "card-compact"
|
|
690
|
+
], className),
|
|
657
691
|
...rest
|
|
658
692
|
});
|
|
659
693
|
}
|
|
@@ -682,26 +716,26 @@ function CardRoot({ bordered, compact, icon, title, description, actions, classN
|
|
|
682
716
|
}
|
|
683
717
|
function CardBody({ className, ...rest }) {
|
|
684
718
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
685
|
-
className: (
|
|
719
|
+
className: cn("card-body", className),
|
|
686
720
|
...rest
|
|
687
721
|
});
|
|
688
722
|
}
|
|
689
723
|
function CardTitle({ icon, className, children, ...rest }) {
|
|
690
724
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("h3", {
|
|
691
|
-
className: (
|
|
725
|
+
className: cn("card-title", className),
|
|
692
726
|
...rest,
|
|
693
727
|
children: [renderIcon(icon), children]
|
|
694
728
|
});
|
|
695
729
|
}
|
|
696
730
|
function CardDescription({ className, ...rest }) {
|
|
697
731
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
698
|
-
className: (
|
|
732
|
+
className: cn("card-description", className),
|
|
699
733
|
...rest
|
|
700
734
|
});
|
|
701
735
|
}
|
|
702
736
|
function CardActions({ className, ...rest }) {
|
|
703
737
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
704
|
-
className: (
|
|
738
|
+
className: cn("card-actions", className),
|
|
705
739
|
...rest
|
|
706
740
|
});
|
|
707
741
|
}
|
|
@@ -755,7 +789,7 @@ function DialogContainer({ open, onOpenChange, size = "md", closedby = "any", cl
|
|
|
755
789
|
value: { close: () => ref.current?.close() },
|
|
756
790
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dialog", {
|
|
757
791
|
ref,
|
|
758
|
-
className: (
|
|
792
|
+
className: cn(["dialog", size !== "md" && `dialog-${size}`], className),
|
|
759
793
|
closedby,
|
|
760
794
|
...rest,
|
|
761
795
|
children
|
|
@@ -764,32 +798,32 @@ function DialogContainer({ open, onOpenChange, size = "md", closedby = "any", cl
|
|
|
764
798
|
}
|
|
765
799
|
function DialogHeader({ className, ...rest }) {
|
|
766
800
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
767
|
-
className: (
|
|
801
|
+
className: cn("dialog-header", className),
|
|
768
802
|
...rest
|
|
769
803
|
});
|
|
770
804
|
}
|
|
771
805
|
function DialogTitle({ icon, className, children, ...rest }) {
|
|
772
806
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("h2", {
|
|
773
|
-
className: (
|
|
807
|
+
className: cn("dialog-title", className),
|
|
774
808
|
...rest,
|
|
775
809
|
children: [renderIcon(icon), children]
|
|
776
810
|
});
|
|
777
811
|
}
|
|
778
812
|
function DialogDescription({ className, ...rest }) {
|
|
779
813
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
780
|
-
className: (
|
|
814
|
+
className: cn("dialog-description", className),
|
|
781
815
|
...rest
|
|
782
816
|
});
|
|
783
817
|
}
|
|
784
818
|
function DialogBody({ className, ...rest }) {
|
|
785
819
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
786
|
-
className: (
|
|
820
|
+
className: cn("dialog-body", className),
|
|
787
821
|
...rest
|
|
788
822
|
});
|
|
789
823
|
}
|
|
790
824
|
function DialogFooter({ className, ...rest }) {
|
|
791
825
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
792
|
-
className: (
|
|
826
|
+
className: cn("dialog-footer", className),
|
|
793
827
|
...rest
|
|
794
828
|
});
|
|
795
829
|
}
|
|
@@ -797,7 +831,7 @@ function DialogCloseButton({ icon, className, children, onClick, type = "button"
|
|
|
797
831
|
const ctx = (0, react.useContext)(DialogContext);
|
|
798
832
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
799
833
|
type,
|
|
800
|
-
className: (
|
|
834
|
+
className: cn("dialog-close", className),
|
|
801
835
|
"aria-label": ariaLabel,
|
|
802
836
|
onClick: (event) => {
|
|
803
837
|
onClick?.(event);
|
|
@@ -821,7 +855,7 @@ function DialogRoot({ icon, title, description, actions, dismissible = true, clo
|
|
|
821
855
|
showHeader ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DialogHeader, { children: [hasTitle ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogTitle, {
|
|
822
856
|
icon,
|
|
823
857
|
children: title
|
|
824
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "flex-1" }), dismissible ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogCloseButton, { "aria-label": closeLabel }) : null] }) : null,
|
|
858
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: cn("flex-1", void 0) }), dismissible ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogCloseButton, { "aria-label": closeLabel }) : null] }) : null,
|
|
825
859
|
description !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogDescription, { children: description }) : null,
|
|
826
860
|
children !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogBody, { children }) : null,
|
|
827
861
|
actions !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogFooter, { children: actions }) : null
|
|
@@ -873,26 +907,26 @@ var Field = Object.assign(FieldRoot, {
|
|
|
873
907
|
//#region src/Footer.tsx
|
|
874
908
|
function FooterRoot({ className, ...rest }) {
|
|
875
909
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("footer", {
|
|
876
|
-
className: (
|
|
910
|
+
className: cn("footer", className),
|
|
877
911
|
...rest
|
|
878
912
|
});
|
|
879
913
|
}
|
|
880
914
|
function FooterLinks({ className, ...rest }) {
|
|
881
915
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
882
|
-
className: (
|
|
916
|
+
className: cn("footer-links", className),
|
|
883
917
|
...rest
|
|
884
918
|
});
|
|
885
919
|
}
|
|
886
920
|
function FooterLink({ className, children, ...rest }) {
|
|
887
921
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
888
|
-
className: (
|
|
922
|
+
className: cn("footer-link", className),
|
|
889
923
|
...rest,
|
|
890
924
|
children
|
|
891
925
|
});
|
|
892
926
|
}
|
|
893
927
|
function FooterMeta({ className, ...rest }) {
|
|
894
928
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
895
|
-
className: (
|
|
929
|
+
className: cn("footer-meta", className),
|
|
896
930
|
...rest
|
|
897
931
|
});
|
|
898
932
|
}
|
|
@@ -905,20 +939,20 @@ var Footer = Object.assign(FooterRoot, {
|
|
|
905
939
|
//#region src/Menu.tsx
|
|
906
940
|
function MenuRoot({ className, ...rest }) {
|
|
907
941
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("details", {
|
|
908
|
-
className: (
|
|
942
|
+
className: cn("menu", className),
|
|
909
943
|
...rest
|
|
910
944
|
});
|
|
911
945
|
}
|
|
912
946
|
function MenuTrigger({ className, ...rest }) {
|
|
913
947
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", {
|
|
914
|
-
className: (
|
|
948
|
+
className: cn("menu-trigger", className),
|
|
915
949
|
...rest
|
|
916
950
|
});
|
|
917
951
|
}
|
|
918
952
|
function MenuPopup({ className, role = "menu", ...rest }) {
|
|
919
953
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
920
954
|
role,
|
|
921
|
-
className: (
|
|
955
|
+
className: cn("menu-popup", className),
|
|
922
956
|
...rest
|
|
923
957
|
});
|
|
924
958
|
}
|
|
@@ -927,7 +961,7 @@ function MenuItem(props) {
|
|
|
927
961
|
const { className, role = "menuitem", icon, children, ...rest } = props;
|
|
928
962
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
|
|
929
963
|
role,
|
|
930
|
-
className: (
|
|
964
|
+
className: cn("menu-item", className),
|
|
931
965
|
...rest,
|
|
932
966
|
children: [renderIcon(icon), children]
|
|
933
967
|
});
|
|
@@ -936,27 +970,27 @@ function MenuItem(props) {
|
|
|
936
970
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
937
971
|
type,
|
|
938
972
|
role,
|
|
939
|
-
className: (
|
|
973
|
+
className: cn("menu-item", className),
|
|
940
974
|
...rest,
|
|
941
975
|
children: [renderIcon(icon), children]
|
|
942
976
|
});
|
|
943
977
|
}
|
|
944
978
|
function MenuSeparator({ className, ...rest }) {
|
|
945
979
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hr", {
|
|
946
|
-
className: (
|
|
980
|
+
className: cn("menu-separator", className),
|
|
947
981
|
...rest
|
|
948
982
|
});
|
|
949
983
|
}
|
|
950
984
|
function MenuGroup({ className, role = "group", ...rest }) {
|
|
951
985
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
952
986
|
role,
|
|
953
|
-
className: (
|
|
987
|
+
className: cn("menu-group", className),
|
|
954
988
|
...rest
|
|
955
989
|
});
|
|
956
990
|
}
|
|
957
991
|
function MenuGroupLabel({ className, ...rest }) {
|
|
958
992
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
959
|
-
className: (
|
|
993
|
+
className: cn("menu-group-label", className),
|
|
960
994
|
...rest
|
|
961
995
|
});
|
|
962
996
|
}
|
|
@@ -972,25 +1006,25 @@ var Menu = Object.assign(MenuRoot, {
|
|
|
972
1006
|
//#region src/Navbar.tsx
|
|
973
1007
|
function NavbarRoot({ className, ...rest }) {
|
|
974
1008
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
|
|
975
|
-
className: (
|
|
1009
|
+
className: cn("navbar", className),
|
|
976
1010
|
...rest
|
|
977
1011
|
});
|
|
978
1012
|
}
|
|
979
1013
|
function NavbarBrand({ className, ...rest }) {
|
|
980
1014
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
981
|
-
className: (
|
|
1015
|
+
className: cn("navbar-brand", className),
|
|
982
1016
|
...rest
|
|
983
1017
|
});
|
|
984
1018
|
}
|
|
985
1019
|
function NavbarItems({ className, ...rest }) {
|
|
986
1020
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
987
|
-
className: (
|
|
1021
|
+
className: cn("navbar-items", className),
|
|
988
1022
|
...rest
|
|
989
1023
|
});
|
|
990
1024
|
}
|
|
991
1025
|
function NavbarItem({ active, icon, className, children, ...rest }) {
|
|
992
1026
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
|
|
993
|
-
className: (
|
|
1027
|
+
className: cn("navbar-item", className),
|
|
994
1028
|
"aria-current": active ? "page" : void 0,
|
|
995
1029
|
...rest,
|
|
996
1030
|
children: [renderIcon(icon), children]
|
|
@@ -1001,14 +1035,14 @@ function NavbarDropdown({ label, className, children, ...rest }) {
|
|
|
1001
1035
|
className,
|
|
1002
1036
|
...rest,
|
|
1003
1037
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Menu.Trigger, {
|
|
1004
|
-
className: "navbar-item",
|
|
1038
|
+
className: cn("navbar-item", void 0),
|
|
1005
1039
|
children: label
|
|
1006
1040
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Menu.Popup, { children })]
|
|
1007
1041
|
});
|
|
1008
1042
|
}
|
|
1009
1043
|
function NavbarActions({ className, ...rest }) {
|
|
1010
1044
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1011
|
-
className: (
|
|
1045
|
+
className: cn("navbar-actions", className),
|
|
1012
1046
|
...rest
|
|
1013
1047
|
});
|
|
1014
1048
|
}
|
|
@@ -1020,7 +1054,7 @@ function NavbarMobileToggle({ label = "Open menu", className, type = "button", .
|
|
|
1020
1054
|
"aria-label": label,
|
|
1021
1055
|
"aria-expanded": open,
|
|
1022
1056
|
onClick: () => shell?.setMobileDrawerOpen(!open),
|
|
1023
|
-
className: (
|
|
1057
|
+
className: cn("navbar-mobile-toggle", className),
|
|
1024
1058
|
...rest
|
|
1025
1059
|
});
|
|
1026
1060
|
}
|
|
@@ -1121,38 +1155,44 @@ var Tooltip = Object.assign(TooltipShorthand, {
|
|
|
1121
1155
|
//#region src/Table.tsx
|
|
1122
1156
|
function TableRoot({ striped, bordered, relaxed, sticky, className, ...rest }) {
|
|
1123
1157
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("table", {
|
|
1124
|
-
className: (
|
|
1158
|
+
className: cn([
|
|
1159
|
+
"table",
|
|
1160
|
+
striped && "table-striped",
|
|
1161
|
+
bordered && "table-bordered",
|
|
1162
|
+
relaxed && "table-relaxed",
|
|
1163
|
+
sticky && "table-sticky"
|
|
1164
|
+
], className),
|
|
1125
1165
|
...rest
|
|
1126
1166
|
});
|
|
1127
1167
|
}
|
|
1128
1168
|
function TableHead({ className, ...rest }) {
|
|
1129
1169
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", {
|
|
1130
|
-
className
|
|
1170
|
+
className,
|
|
1131
1171
|
...rest
|
|
1132
1172
|
});
|
|
1133
1173
|
}
|
|
1134
1174
|
function TableBody({ className, ...rest }) {
|
|
1135
1175
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", {
|
|
1136
|
-
className
|
|
1176
|
+
className,
|
|
1137
1177
|
...rest
|
|
1138
1178
|
});
|
|
1139
1179
|
}
|
|
1140
1180
|
function TableFoot({ className, ...rest }) {
|
|
1141
1181
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tfoot", {
|
|
1142
|
-
className
|
|
1182
|
+
className,
|
|
1143
1183
|
...rest
|
|
1144
1184
|
});
|
|
1145
1185
|
}
|
|
1146
1186
|
function TableRow({ selected, asLink, className, ...rest }) {
|
|
1147
1187
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
|
|
1148
|
-
className: (
|
|
1188
|
+
className: cn(asLink && "table-row-link", className),
|
|
1149
1189
|
"data-selected": selected || void 0,
|
|
1150
1190
|
...rest
|
|
1151
1191
|
});
|
|
1152
1192
|
}
|
|
1153
1193
|
function TableHeaderCell({ align, gutter, className, scope, ...rest }) {
|
|
1154
1194
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
|
|
1155
|
-
className: (
|
|
1195
|
+
className: cn(["table-header-cell", gutter && "table-cell-gutter"], className),
|
|
1156
1196
|
"data-align": align && align !== "left" ? align : void 0,
|
|
1157
1197
|
scope: scope ?? "col",
|
|
1158
1198
|
...rest
|
|
@@ -1160,7 +1200,11 @@ function TableHeaderCell({ align, gutter, className, scope, ...rest }) {
|
|
|
1160
1200
|
}
|
|
1161
1201
|
function TableCell({ align, gutter, numeric, className, ...rest }) {
|
|
1162
1202
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
1163
|
-
className: (
|
|
1203
|
+
className: cn([
|
|
1204
|
+
"table-cell",
|
|
1205
|
+
gutter && "table-cell-gutter",
|
|
1206
|
+
numeric && "table-cell-numeric"
|
|
1207
|
+
], className),
|
|
1164
1208
|
"data-align": align && align !== "left" ? align : void 0,
|
|
1165
1209
|
...rest
|
|
1166
1210
|
});
|
|
@@ -1186,14 +1230,14 @@ function SidebarRoot({ collapsed, defaultCollapsed, onCollapsedChange, drawerLab
|
|
|
1186
1230
|
onCollapsedChange
|
|
1187
1231
|
},
|
|
1188
1232
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("aside", {
|
|
1189
|
-
className: (
|
|
1233
|
+
className: cn("sidebar", className),
|
|
1190
1234
|
...rest,
|
|
1191
1235
|
children: drawerOpen ? null : children
|
|
1192
1236
|
}), shell ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Root, {
|
|
1193
1237
|
open: drawerOpen,
|
|
1194
1238
|
onOpenChange: (open) => shell.setMobileDrawerOpen(open),
|
|
1195
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_dialog.Dialog.Portal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Backdrop, { className: "sidebar-drawer-backdrop" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Popup, {
|
|
1196
|
-
className: "sidebar-drawer",
|
|
1239
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_dialog.Dialog.Portal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Backdrop, { className: cn("sidebar-drawer-backdrop", void 0) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Popup, {
|
|
1240
|
+
className: cn("sidebar-drawer", void 0),
|
|
1197
1241
|
"aria-label": drawerLabel,
|
|
1198
1242
|
onClick: (event) => {
|
|
1199
1243
|
if (event.target.closest("a, [data-drawer-close]")) shell.setMobileDrawerOpen(false);
|
|
@@ -1205,31 +1249,31 @@ function SidebarRoot({ collapsed, defaultCollapsed, onCollapsedChange, drawerLab
|
|
|
1205
1249
|
}
|
|
1206
1250
|
function SidebarHeader({ className, ...rest }) {
|
|
1207
1251
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1208
|
-
className: (
|
|
1252
|
+
className: cn("sidebar-header", className),
|
|
1209
1253
|
...rest
|
|
1210
1254
|
});
|
|
1211
1255
|
}
|
|
1212
1256
|
function SidebarNav({ className, ...rest }) {
|
|
1213
1257
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
1214
|
-
className: (
|
|
1258
|
+
className: cn("sidebar-nav", className),
|
|
1215
1259
|
...rest
|
|
1216
1260
|
});
|
|
1217
1261
|
}
|
|
1218
1262
|
function SidebarGroup({ className, ...rest }) {
|
|
1219
1263
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1220
|
-
className: (
|
|
1264
|
+
className: cn("sidebar-group", className),
|
|
1221
1265
|
...rest
|
|
1222
1266
|
});
|
|
1223
1267
|
}
|
|
1224
1268
|
function SidebarGroupLabel({ className, ...rest }) {
|
|
1225
1269
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1226
|
-
className: (
|
|
1270
|
+
className: cn("sidebar-group-label", className),
|
|
1227
1271
|
...rest
|
|
1228
1272
|
});
|
|
1229
1273
|
}
|
|
1230
1274
|
function SidebarItem({ active, icon, badge, className, children, ...rest }) {
|
|
1231
1275
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
|
|
1232
|
-
className: (
|
|
1276
|
+
className: cn("sidebar-item", className),
|
|
1233
1277
|
"aria-current": active ? "page" : void 0,
|
|
1234
1278
|
...rest,
|
|
1235
1279
|
children: [
|
|
@@ -1242,19 +1286,19 @@ function SidebarItem({ active, icon, badge, className, children, ...rest }) {
|
|
|
1242
1286
|
function SidebarIcon({ className, ...rest }) {
|
|
1243
1287
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1244
1288
|
"aria-hidden": true,
|
|
1245
|
-
className: (
|
|
1289
|
+
className: cn("sidebar-icon", className),
|
|
1246
1290
|
...rest
|
|
1247
1291
|
});
|
|
1248
1292
|
}
|
|
1249
1293
|
function SidebarLabel({ className, ...rest }) {
|
|
1250
1294
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1251
|
-
className: (
|
|
1295
|
+
className: cn("sidebar-label", className),
|
|
1252
1296
|
...rest
|
|
1253
1297
|
});
|
|
1254
1298
|
}
|
|
1255
1299
|
function SidebarBadge({ className, ...rest }) {
|
|
1256
1300
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1257
|
-
className: (
|
|
1301
|
+
className: cn("sidebar-badge", className),
|
|
1258
1302
|
...rest
|
|
1259
1303
|
});
|
|
1260
1304
|
}
|
|
@@ -1264,7 +1308,7 @@ function SidebarCollapsible({ icon, label, trigger, children, className, open, d
|
|
|
1264
1308
|
const isOpen = isControlled ? open : internalOpen;
|
|
1265
1309
|
const triggerContent = trigger ?? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [icon != null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarIcon, { children: renderIcon(icon) }) : null, label !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarLabel, { children: label }) : null] });
|
|
1266
1310
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
1267
|
-
className: (
|
|
1311
|
+
className: cn("sidebar-collapsible", className),
|
|
1268
1312
|
open: isOpen,
|
|
1269
1313
|
onToggle: (event) => {
|
|
1270
1314
|
const next = event.currentTarget.open;
|
|
@@ -1273,17 +1317,17 @@ function SidebarCollapsible({ icon, label, trigger, children, className, open, d
|
|
|
1273
1317
|
},
|
|
1274
1318
|
...rest,
|
|
1275
1319
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", {
|
|
1276
|
-
className: "sidebar-collapsible-trigger",
|
|
1320
|
+
className: cn("sidebar-collapsible-trigger", void 0),
|
|
1277
1321
|
children: triggerContent
|
|
1278
1322
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1279
|
-
className: "sidebar-collapsible-panel",
|
|
1323
|
+
className: cn("sidebar-collapsible-panel", void 0),
|
|
1280
1324
|
children
|
|
1281
1325
|
})]
|
|
1282
1326
|
});
|
|
1283
1327
|
}
|
|
1284
1328
|
function SidebarSubItem({ active, icon, badge, className, children, ...rest }) {
|
|
1285
1329
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
|
|
1286
|
-
className: (
|
|
1330
|
+
className: cn("sidebar-subitem", className),
|
|
1287
1331
|
"aria-current": active ? "page" : void 0,
|
|
1288
1332
|
...rest,
|
|
1289
1333
|
children: [
|
|
@@ -1295,7 +1339,7 @@ function SidebarSubItem({ active, icon, badge, className, children, ...rest }) {
|
|
|
1295
1339
|
}
|
|
1296
1340
|
function SidebarFooter({ className, ...rest }) {
|
|
1297
1341
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1298
|
-
className: (
|
|
1342
|
+
className: cn("sidebar-footer", className),
|
|
1299
1343
|
...rest
|
|
1300
1344
|
});
|
|
1301
1345
|
}
|
|
@@ -1304,18 +1348,18 @@ function SidebarCollapseToggle({ label = "Toggle sidebar", className, children,
|
|
|
1304
1348
|
const controlledChecked = ctx?.collapsed;
|
|
1305
1349
|
const isControlled = controlledChecked !== void 0;
|
|
1306
1350
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1307
|
-
className: (
|
|
1351
|
+
className: cn("sidebar-collapse-toggle", className),
|
|
1308
1352
|
...rest,
|
|
1309
1353
|
children: [
|
|
1310
1354
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1311
1355
|
type: "checkbox",
|
|
1312
|
-
className: "sidebar-toggle",
|
|
1356
|
+
className: cn("sidebar-toggle", void 0),
|
|
1313
1357
|
"aria-label": label,
|
|
1314
1358
|
...isControlled ? { checked: controlledChecked } : { defaultChecked: ctx?.defaultCollapsed },
|
|
1315
1359
|
onChange: (event) => ctx?.onCollapsedChange?.(event.currentTarget.checked)
|
|
1316
1360
|
}),
|
|
1317
1361
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1318
|
-
className: "sr-only",
|
|
1362
|
+
className: cn("sr-only", void 0),
|
|
1319
1363
|
children: label
|
|
1320
1364
|
}),
|
|
1321
1365
|
children
|