@tomny-dev/uzi 0.1.6 → 0.1.8
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/index.cjs +109 -166
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +4 -3
- package/dist/index.css.map +1 -1
- package/dist/index.js +109 -166
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -78,26 +78,23 @@ function cx(...values) {
|
|
|
78
78
|
return values.filter(Boolean).join(" ");
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
// src/components/button/button.module.css
|
|
82
|
-
var button_default = {};
|
|
83
|
-
|
|
84
81
|
// src/components/button/Button.tsx
|
|
85
82
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
86
83
|
var variantClass = {
|
|
87
|
-
default:
|
|
88
|
-
primary:
|
|
89
|
-
secondary:
|
|
90
|
-
outline:
|
|
91
|
-
ghost:
|
|
92
|
-
destructive:
|
|
93
|
-
link:
|
|
84
|
+
default: "variant-primary",
|
|
85
|
+
primary: "variant-primary",
|
|
86
|
+
secondary: "variant-secondary",
|
|
87
|
+
outline: "variant-outline",
|
|
88
|
+
ghost: "variant-ghost",
|
|
89
|
+
destructive: "variant-destructive",
|
|
90
|
+
link: "variant-link"
|
|
94
91
|
};
|
|
95
92
|
var sizeClass = {
|
|
96
|
-
default:
|
|
97
|
-
sm:
|
|
98
|
-
md:
|
|
99
|
-
lg:
|
|
100
|
-
icon:
|
|
93
|
+
default: "size-md",
|
|
94
|
+
sm: "size-sm",
|
|
95
|
+
md: "size-md",
|
|
96
|
+
lg: "size-lg",
|
|
97
|
+
icon: "size-icon"
|
|
101
98
|
};
|
|
102
99
|
function Button({
|
|
103
100
|
as,
|
|
@@ -109,7 +106,7 @@ function Button({
|
|
|
109
106
|
...rest
|
|
110
107
|
}) {
|
|
111
108
|
const classes = cx(
|
|
112
|
-
|
|
109
|
+
"button",
|
|
113
110
|
variantClass[variant],
|
|
114
111
|
sizeClass[size],
|
|
115
112
|
className
|
|
@@ -140,11 +137,6 @@ function Button({
|
|
|
140
137
|
|
|
141
138
|
// src/components/avatar/Avatar.tsx
|
|
142
139
|
var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"), 1);
|
|
143
|
-
|
|
144
|
-
// src/components/avatar/avatar.module.css
|
|
145
|
-
var avatar_default = {};
|
|
146
|
-
|
|
147
|
-
// src/components/avatar/Avatar.tsx
|
|
148
140
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
149
141
|
function Avatar({
|
|
150
142
|
className,
|
|
@@ -154,7 +146,7 @@ function Avatar({
|
|
|
154
146
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
155
147
|
AvatarPrimitive.Root,
|
|
156
148
|
{
|
|
157
|
-
className: cx(
|
|
149
|
+
className: cx("avatar", size === "sm" ? "size-sm" : size === "lg" ? "size-lg" : "size-md", className),
|
|
158
150
|
...props
|
|
159
151
|
}
|
|
160
152
|
);
|
|
@@ -166,7 +158,7 @@ function AvatarImage({
|
|
|
166
158
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
167
159
|
AvatarPrimitive.Image,
|
|
168
160
|
{
|
|
169
|
-
className: cx(
|
|
161
|
+
className: cx("image", className),
|
|
170
162
|
...props
|
|
171
163
|
}
|
|
172
164
|
);
|
|
@@ -178,15 +170,12 @@ function AvatarFallback({
|
|
|
178
170
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
179
171
|
AvatarPrimitive.Fallback,
|
|
180
172
|
{
|
|
181
|
-
className: cx(
|
|
173
|
+
className: cx("fallback", className),
|
|
182
174
|
...props
|
|
183
175
|
}
|
|
184
176
|
);
|
|
185
177
|
}
|
|
186
178
|
|
|
187
|
-
// src/components/card/card.module.css
|
|
188
|
-
var card_default = {};
|
|
189
|
-
|
|
190
179
|
// src/components/card/Card.tsx
|
|
191
180
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
192
181
|
function Card({
|
|
@@ -199,20 +188,18 @@ function Card({
|
|
|
199
188
|
...rest
|
|
200
189
|
}) {
|
|
201
190
|
const Component = as ?? "div";
|
|
202
|
-
const
|
|
191
|
+
const TONE_CLASS2 = { default: null, muted: "tone-muted", contrast: "tone-contrast" };
|
|
192
|
+
const PADDING_CLASS = { none: "padding-none", sm: "padding-sm", md: "padding-md", lg: "padding-lg" };
|
|
203
193
|
const classes = cx(
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
interactive &&
|
|
194
|
+
"card",
|
|
195
|
+
TONE_CLASS2[tone],
|
|
196
|
+
PADDING_CLASS[padding],
|
|
197
|
+
interactive && "interactive",
|
|
208
198
|
className
|
|
209
199
|
);
|
|
210
200
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Component, { className: classes, ...rest, children });
|
|
211
201
|
}
|
|
212
202
|
|
|
213
|
-
// src/components/pill/pill.module.css
|
|
214
|
-
var pill_default = {};
|
|
215
|
-
|
|
216
203
|
// src/components/pill/Pill.tsx
|
|
217
204
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
218
205
|
function Pill({
|
|
@@ -225,20 +212,15 @@ function Pill({
|
|
|
225
212
|
...rest
|
|
226
213
|
}) {
|
|
227
214
|
const Component = as ?? "span";
|
|
228
|
-
const classes = cx(
|
|
215
|
+
const classes = cx("pill", `tone-${tone}`, `size-${size}`, className);
|
|
229
216
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Component, { className: classes, ...rest, children: [
|
|
230
|
-
icon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className:
|
|
231
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className:
|
|
217
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "icon", "aria-hidden": "true", children: icon }) : null,
|
|
218
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "content", children })
|
|
232
219
|
] });
|
|
233
220
|
}
|
|
234
221
|
|
|
235
222
|
// src/components/modal/Modal.tsx
|
|
236
223
|
var import_react = require("react");
|
|
237
|
-
|
|
238
|
-
// src/components/modal/modal.module.css
|
|
239
|
-
var modal_default = {};
|
|
240
|
-
|
|
241
|
-
// src/components/modal/Modal.tsx
|
|
242
224
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
243
225
|
function ModalOverlay({ open, onClose, className, children }) {
|
|
244
226
|
const mouseDownOnBackdrop = (0, import_react.useRef)(false);
|
|
@@ -257,7 +239,7 @@ function ModalOverlay({ open, onClose, className, children }) {
|
|
|
257
239
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
258
240
|
"div",
|
|
259
241
|
{
|
|
260
|
-
className: cx(
|
|
242
|
+
className: cx("backdrop", className),
|
|
261
243
|
role: "dialog",
|
|
262
244
|
"aria-modal": "true",
|
|
263
245
|
onMouseDown: (e) => {
|
|
@@ -272,38 +254,36 @@ function ModalOverlay({ open, onClose, className, children }) {
|
|
|
272
254
|
);
|
|
273
255
|
}
|
|
274
256
|
function Modal({ open, onClose, title, subtitle, size = "md", children, footer }) {
|
|
275
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ModalOverlay, { open, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: cx(
|
|
276
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className:
|
|
277
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className:
|
|
278
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className:
|
|
279
|
-
subtitle && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className:
|
|
257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ModalOverlay, { open, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: cx("modal", `size-${size}`), children: [
|
|
258
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "header", children: [
|
|
259
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "titles", children: [
|
|
260
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "title", children: title }),
|
|
261
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "subtitle", children: subtitle })
|
|
280
262
|
] }),
|
|
281
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { className:
|
|
263
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { className: "closeButton", onClick: onClose, "aria-label": "Close", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
282
264
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
283
265
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
284
266
|
] }) })
|
|
285
267
|
] }),
|
|
286
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className:
|
|
287
|
-
footer && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className:
|
|
268
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "body", children }),
|
|
269
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "footer", children: footer })
|
|
288
270
|
] }) });
|
|
289
271
|
}
|
|
290
272
|
|
|
291
|
-
// src/components/alert/alert.module.css
|
|
292
|
-
var alert_default = {};
|
|
293
|
-
|
|
294
273
|
// src/components/alert/Alert.tsx
|
|
295
274
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
275
|
+
var TONE_CLASS = {
|
|
276
|
+
success: "success",
|
|
277
|
+
error: "error",
|
|
278
|
+
warning: "warning",
|
|
279
|
+
info: "info"
|
|
280
|
+
};
|
|
296
281
|
function Alert({ tone, children, className }) {
|
|
297
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cx(
|
|
282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cx("alert", TONE_CLASS[tone], className), role: "alert", children });
|
|
298
283
|
}
|
|
299
284
|
|
|
300
285
|
// src/components/toast/ToastContext.tsx
|
|
301
286
|
var import_react2 = require("react");
|
|
302
|
-
|
|
303
|
-
// src/components/toast/toast.module.css
|
|
304
|
-
var toast_default = {};
|
|
305
|
-
|
|
306
|
-
// src/components/toast/ToastContext.tsx
|
|
307
287
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
308
288
|
var DEFAULT_CONFIG = {
|
|
309
289
|
position: "top-right",
|
|
@@ -405,24 +385,24 @@ function ToastContainer({
|
|
|
405
385
|
const posClass = (() => {
|
|
406
386
|
switch (position) {
|
|
407
387
|
case "top-left":
|
|
408
|
-
return
|
|
388
|
+
return "topLeft";
|
|
409
389
|
case "top-center":
|
|
410
|
-
return
|
|
390
|
+
return "topCenter";
|
|
411
391
|
case "bottom-right":
|
|
412
|
-
return
|
|
392
|
+
return "bottomRight";
|
|
413
393
|
case "bottom-left":
|
|
414
|
-
return
|
|
394
|
+
return "bottomLeft";
|
|
415
395
|
case "bottom-center":
|
|
416
|
-
return
|
|
396
|
+
return "bottomCenter";
|
|
417
397
|
case "top-right":
|
|
418
398
|
default:
|
|
419
|
-
return
|
|
399
|
+
return "topRight";
|
|
420
400
|
}
|
|
421
401
|
})();
|
|
422
402
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
423
403
|
"div",
|
|
424
404
|
{
|
|
425
|
-
className: cx(
|
|
405
|
+
className: cx("stack", posClass),
|
|
426
406
|
role: "presentation",
|
|
427
407
|
onMouseEnter: () => pauseOnHover && onPauseChange(true),
|
|
428
408
|
onMouseLeave: () => pauseOnHover && onPauseChange(false),
|
|
@@ -488,15 +468,15 @@ function ToastItem({
|
|
|
488
468
|
}
|
|
489
469
|
}, [isPaused, schedule, toast.duration]);
|
|
490
470
|
const icon = getIcon(toast.type);
|
|
491
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cx(
|
|
492
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className:
|
|
493
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className:
|
|
494
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className:
|
|
495
|
-
toast.action && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className:
|
|
471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cx("toast", exiting && "exit"), style: styleVars, role: "status", "aria-live": "polite", children: [
|
|
472
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "icon", "aria-hidden": true, children: icon }),
|
|
473
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "body", children: [
|
|
474
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "message", children: toast.message }),
|
|
475
|
+
toast.action && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "actions", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
496
476
|
"button",
|
|
497
477
|
{
|
|
498
478
|
type: "button",
|
|
499
|
-
className:
|
|
479
|
+
className: "actionButton",
|
|
500
480
|
onClick: () => {
|
|
501
481
|
toast.action?.onClick();
|
|
502
482
|
triggerDismiss();
|
|
@@ -509,7 +489,7 @@ function ToastItem({
|
|
|
509
489
|
"button",
|
|
510
490
|
{
|
|
511
491
|
type: "button",
|
|
512
|
-
className:
|
|
492
|
+
className: "closeButton",
|
|
513
493
|
onClick: triggerDismiss,
|
|
514
494
|
"aria-label": "Dismiss notification",
|
|
515
495
|
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
@@ -586,11 +566,6 @@ function getIcon(type) {
|
|
|
586
566
|
|
|
587
567
|
// src/components/input/Input.tsx
|
|
588
568
|
var React = __toESM(require("react"), 1);
|
|
589
|
-
|
|
590
|
-
// src/components/input/input.module.css
|
|
591
|
-
var input_default = {};
|
|
592
|
-
|
|
593
|
-
// src/components/input/Input.tsx
|
|
594
569
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
595
570
|
var Input = React.forwardRef(
|
|
596
571
|
({ className, type, ...props }, ref) => {
|
|
@@ -599,7 +574,7 @@ var Input = React.forwardRef(
|
|
|
599
574
|
{
|
|
600
575
|
ref,
|
|
601
576
|
type,
|
|
602
|
-
className: cx(
|
|
577
|
+
className: cx("input", className),
|
|
603
578
|
...props
|
|
604
579
|
}
|
|
605
580
|
);
|
|
@@ -609,24 +584,14 @@ Input.displayName = "Input";
|
|
|
609
584
|
|
|
610
585
|
// src/components/label/Label.tsx
|
|
611
586
|
var React2 = __toESM(require("react"), 1);
|
|
612
|
-
|
|
613
|
-
// src/components/label/label.module.css
|
|
614
|
-
var label_default = {};
|
|
615
|
-
|
|
616
|
-
// src/components/label/Label.tsx
|
|
617
587
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
618
588
|
var Label = React2.forwardRef(
|
|
619
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { ref, className: cx(
|
|
589
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { ref, className: cx("label", className), ...props })
|
|
620
590
|
);
|
|
621
591
|
Label.displayName = "Label";
|
|
622
592
|
|
|
623
593
|
// src/components/checkbox/Checkbox.tsx
|
|
624
594
|
var React3 = __toESM(require("react"), 1);
|
|
625
|
-
|
|
626
|
-
// src/components/checkbox/checkbox.module.css
|
|
627
|
-
var checkbox_default = {};
|
|
628
|
-
|
|
629
|
-
// src/components/checkbox/Checkbox.tsx
|
|
630
595
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
631
596
|
var Checkbox = React3.forwardRef(
|
|
632
597
|
({ className, ...props }, ref) => {
|
|
@@ -635,7 +600,7 @@ var Checkbox = React3.forwardRef(
|
|
|
635
600
|
{
|
|
636
601
|
ref,
|
|
637
602
|
type: "checkbox",
|
|
638
|
-
className: cx(
|
|
603
|
+
className: cx("checkbox", className),
|
|
639
604
|
...props
|
|
640
605
|
}
|
|
641
606
|
);
|
|
@@ -645,11 +610,6 @@ Checkbox.displayName = "Checkbox";
|
|
|
645
610
|
|
|
646
611
|
// src/components/dropdown/Dropdown.tsx
|
|
647
612
|
var import_react3 = require("react");
|
|
648
|
-
|
|
649
|
-
// src/components/dropdown/dropdown.module.css
|
|
650
|
-
var dropdown_default = {};
|
|
651
|
-
|
|
652
|
-
// src/components/dropdown/Dropdown.tsx
|
|
653
613
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
654
614
|
function Dropdown({
|
|
655
615
|
options,
|
|
@@ -674,27 +634,27 @@ function Dropdown({
|
|
|
674
634
|
document.addEventListener("mousedown", handleClickOutside);
|
|
675
635
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
676
636
|
}, []);
|
|
677
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cx(
|
|
637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cx("wrapper", className), ref, children: [
|
|
678
638
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
679
639
|
"button",
|
|
680
640
|
{
|
|
681
641
|
type: "button",
|
|
682
|
-
className: cx(
|
|
642
|
+
className: cx("trigger", isActive && "trigger-active"),
|
|
683
643
|
onClick: () => setOpen((o) => !o),
|
|
684
644
|
"aria-labelledby": ariaLabelledBy,
|
|
685
645
|
"aria-label": ariaLabel,
|
|
686
646
|
children: [
|
|
687
647
|
selected ? selected.label : placeholder,
|
|
688
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: cx(
|
|
648
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: cx("chevron", open && "chevron-open"), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M2 3.5L5 6.5L8 3.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
689
649
|
]
|
|
690
650
|
}
|
|
691
651
|
),
|
|
692
|
-
open && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className:
|
|
652
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "menu", children: [
|
|
693
653
|
allowClear && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
694
654
|
"button",
|
|
695
655
|
{
|
|
696
656
|
type: "button",
|
|
697
|
-
className: cx(
|
|
657
|
+
className: cx("option", value === "" && "option-selected"),
|
|
698
658
|
onClick: () => {
|
|
699
659
|
onChange("");
|
|
700
660
|
setOpen(false);
|
|
@@ -706,7 +666,7 @@ function Dropdown({
|
|
|
706
666
|
"button",
|
|
707
667
|
{
|
|
708
668
|
type: "button",
|
|
709
|
-
className: cx(
|
|
669
|
+
className: cx("option", value === opt.value && "option-selected"),
|
|
710
670
|
onClick: () => {
|
|
711
671
|
onChange(opt.value);
|
|
712
672
|
setOpen(false);
|
|
@@ -721,11 +681,6 @@ function Dropdown({
|
|
|
721
681
|
|
|
722
682
|
// src/components/dropdown-menu/DropdownMenu.tsx
|
|
723
683
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
724
|
-
|
|
725
|
-
// src/components/dropdown-menu/dropdown-menu.module.css
|
|
726
|
-
var dropdown_menu_default = {};
|
|
727
|
-
|
|
728
|
-
// src/components/dropdown-menu/DropdownMenu.tsx
|
|
729
684
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
730
685
|
function DropdownMenu(props) {
|
|
731
686
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownMenuPrimitive.Root, { ...props });
|
|
@@ -754,7 +709,7 @@ function DropdownMenuContent({
|
|
|
754
709
|
DropdownMenuPrimitive.Content,
|
|
755
710
|
{
|
|
756
711
|
sideOffset,
|
|
757
|
-
className: cx(
|
|
712
|
+
className: cx("content", className),
|
|
758
713
|
...props
|
|
759
714
|
}
|
|
760
715
|
) });
|
|
@@ -770,8 +725,8 @@ function DropdownMenuItem({
|
|
|
770
725
|
{
|
|
771
726
|
"data-inset": inset ? "true" : void 0,
|
|
772
727
|
className: cx(
|
|
773
|
-
|
|
774
|
-
variant === "destructive" &&
|
|
728
|
+
"item",
|
|
729
|
+
variant === "destructive" && "destructive",
|
|
775
730
|
className
|
|
776
731
|
),
|
|
777
732
|
...props
|
|
@@ -786,17 +741,17 @@ function DropdownMenuCheckboxItem({
|
|
|
786
741
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
787
742
|
DropdownMenuPrimitive.CheckboxItem,
|
|
788
743
|
{
|
|
789
|
-
className: cx(
|
|
744
|
+
className: cx("item", "insetItem", className),
|
|
790
745
|
...props,
|
|
791
746
|
children: [
|
|
792
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className:
|
|
747
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "indicator", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
793
748
|
"svg",
|
|
794
749
|
{
|
|
795
750
|
viewBox: "0 0 16 16",
|
|
796
751
|
width: "16",
|
|
797
752
|
height: "16",
|
|
798
753
|
"aria-hidden": "true",
|
|
799
|
-
className:
|
|
754
|
+
className: "indicatorIcon",
|
|
800
755
|
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
801
756
|
"path",
|
|
802
757
|
{
|
|
@@ -823,10 +778,10 @@ function DropdownMenuRadioItem({
|
|
|
823
778
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
824
779
|
DropdownMenuPrimitive.RadioItem,
|
|
825
780
|
{
|
|
826
|
-
className: cx(
|
|
781
|
+
className: cx("item", "insetItem", className),
|
|
827
782
|
...props,
|
|
828
783
|
children: [
|
|
829
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className:
|
|
784
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "indicator", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "radioDot" }) }) }),
|
|
830
785
|
children
|
|
831
786
|
]
|
|
832
787
|
}
|
|
@@ -841,7 +796,7 @@ function DropdownMenuLabel({
|
|
|
841
796
|
DropdownMenuPrimitive.Label,
|
|
842
797
|
{
|
|
843
798
|
"data-inset": inset ? "true" : void 0,
|
|
844
|
-
className: cx(
|
|
799
|
+
className: cx("label", className),
|
|
845
800
|
...props
|
|
846
801
|
}
|
|
847
802
|
);
|
|
@@ -853,7 +808,7 @@ function DropdownMenuSeparator({
|
|
|
853
808
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
854
809
|
DropdownMenuPrimitive.Separator,
|
|
855
810
|
{
|
|
856
|
-
className: cx(
|
|
811
|
+
className: cx("separator", className),
|
|
857
812
|
...props
|
|
858
813
|
}
|
|
859
814
|
);
|
|
@@ -868,7 +823,7 @@ function DropdownMenuSubTrigger({
|
|
|
868
823
|
DropdownMenuPrimitive.SubTrigger,
|
|
869
824
|
{
|
|
870
825
|
"data-inset": inset ? "true" : void 0,
|
|
871
|
-
className: cx(
|
|
826
|
+
className: cx("item", className),
|
|
872
827
|
...props,
|
|
873
828
|
children: [
|
|
874
829
|
children,
|
|
@@ -879,7 +834,7 @@ function DropdownMenuSubTrigger({
|
|
|
879
834
|
width: "16",
|
|
880
835
|
height: "16",
|
|
881
836
|
"aria-hidden": "true",
|
|
882
|
-
className:
|
|
837
|
+
className: "chevron",
|
|
883
838
|
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
884
839
|
"path",
|
|
885
840
|
{
|
|
@@ -904,7 +859,7 @@ function DropdownMenuSubContent({
|
|
|
904
859
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
905
860
|
DropdownMenuPrimitive.SubContent,
|
|
906
861
|
{
|
|
907
|
-
className: cx(
|
|
862
|
+
className: cx("content", className),
|
|
908
863
|
...props
|
|
909
864
|
}
|
|
910
865
|
);
|
|
@@ -1026,9 +981,6 @@ function useTheme() {
|
|
|
1026
981
|
return context;
|
|
1027
982
|
}
|
|
1028
983
|
|
|
1029
|
-
// src/components/theme-toggle-button/theme-toggle-button.module.css
|
|
1030
|
-
var theme_toggle_button_default = {};
|
|
1031
|
-
|
|
1032
984
|
// src/components/theme-toggle-button/ThemeToggleButton.tsx
|
|
1033
985
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1034
986
|
function MoonIcon() {
|
|
@@ -1073,7 +1025,7 @@ function ThemeToggleButton({
|
|
|
1073
1025
|
type: "button",
|
|
1074
1026
|
variant: "ghost",
|
|
1075
1027
|
size: showLabel ? "sm" : "icon",
|
|
1076
|
-
className: cx(showLabel &&
|
|
1028
|
+
className: cx(showLabel && "withLabel", className),
|
|
1077
1029
|
"aria-label": `Switch to ${nextThemeLabel.toLowerCase()}`,
|
|
1078
1030
|
title: `Switch to ${nextThemeLabel.toLowerCase()}`,
|
|
1079
1031
|
onClick: (event) => {
|
|
@@ -1089,9 +1041,6 @@ function ThemeToggleButton({
|
|
|
1089
1041
|
);
|
|
1090
1042
|
}
|
|
1091
1043
|
|
|
1092
|
-
// src/components/top-bar/top-bar.module.css
|
|
1093
|
-
var top_bar_default = {};
|
|
1094
|
-
|
|
1095
1044
|
// src/components/top-bar/TopBar.tsx
|
|
1096
1045
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1097
1046
|
function TopBar({
|
|
@@ -1112,23 +1061,23 @@ function TopBar({
|
|
|
1112
1061
|
...rest
|
|
1113
1062
|
}) {
|
|
1114
1063
|
const shouldStick = isSticky ?? sticky;
|
|
1115
|
-
const brandNode = !brand ? null : brandHref ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: brandHref, className:
|
|
1064
|
+
const brandNode = !brand ? null : brandHref ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: brandHref, className: "topBarBrand", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "topBarBrandContent", children: brand }) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "topBarBrand", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "topBarBrandContent", children: brand }) });
|
|
1116
1065
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1117
1066
|
"header",
|
|
1118
1067
|
{
|
|
1119
|
-
className: cx(
|
|
1068
|
+
className: cx("topBar", !shouldStick && "topBarStatic", className),
|
|
1120
1069
|
...rest,
|
|
1121
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cx(
|
|
1122
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className:
|
|
1070
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cx("topBarInner", innerClassName), children: [
|
|
1071
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "topBarStart", children: [
|
|
1123
1072
|
leading,
|
|
1124
1073
|
brandingLocation === "left" && brandNode,
|
|
1125
1074
|
start
|
|
1126
1075
|
] }),
|
|
1127
|
-
brandNode && brandingLocation === "center" || center || children ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className:
|
|
1076
|
+
brandNode && brandingLocation === "center" || center || children ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "topBarCenter", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "topBarCenterGroup", children: [
|
|
1128
1077
|
brandingLocation === "center" && brandNode,
|
|
1129
1078
|
center ?? children
|
|
1130
1079
|
] }) }) : null,
|
|
1131
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className:
|
|
1080
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "topBarActions", children: [
|
|
1132
1081
|
showThemeToggle && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ThemeToggleButton, { ...themeToggleProps }),
|
|
1133
1082
|
actions
|
|
1134
1083
|
] })
|
|
@@ -1137,9 +1086,6 @@ function TopBar({
|
|
|
1137
1086
|
);
|
|
1138
1087
|
}
|
|
1139
1088
|
|
|
1140
|
-
// src/components/app-shell/app-shell.module.css
|
|
1141
|
-
var app_shell_default = {};
|
|
1142
|
-
|
|
1143
1089
|
// src/components/app-shell/AppShell.tsx
|
|
1144
1090
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1145
1091
|
var DESKTOP_BREAKPOINT = 960;
|
|
@@ -1235,12 +1181,12 @@ function AppShell({
|
|
|
1235
1181
|
const sidebarWidthValue = sidebarWidth === void 0 ? void 0 : typeof sidebarWidth === "number" ? `${sidebarWidth}px` : sidebarWidth;
|
|
1236
1182
|
const shellStyle = sidebarWidthValue ? { ["--app-shell-sidebar-width"]: sidebarWidthValue } : void 0;
|
|
1237
1183
|
const shellClasses = cx(
|
|
1238
|
-
|
|
1239
|
-
transitionsReady &&
|
|
1240
|
-
sidebarOpen ?
|
|
1184
|
+
"appShell",
|
|
1185
|
+
transitionsReady && "appShellAnimated",
|
|
1186
|
+
sidebarOpen ? "appShellOpen" : "appShellCollapsed",
|
|
1241
1187
|
className
|
|
1242
1188
|
);
|
|
1243
|
-
const sidebarClasses = cx(
|
|
1189
|
+
const sidebarClasses = cx("appShellSidebar", sidebarOpen && "appShellSidebarOpen", sidebarClassName);
|
|
1244
1190
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1245
1191
|
"div",
|
|
1246
1192
|
{
|
|
@@ -1253,13 +1199,13 @@ function AppShell({
|
|
|
1253
1199
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1254
1200
|
TopBar,
|
|
1255
1201
|
{
|
|
1256
|
-
className: cx(
|
|
1202
|
+
className: cx("appShellTopbar", topbarClassName),
|
|
1257
1203
|
leading: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1258
1204
|
"button",
|
|
1259
1205
|
{
|
|
1260
1206
|
ref: hamburgerRef,
|
|
1261
1207
|
type: "button",
|
|
1262
|
-
className:
|
|
1208
|
+
className: "appShellHamburger",
|
|
1263
1209
|
onClick: toggleSidebar,
|
|
1264
1210
|
"aria-label": hamburgerLabel,
|
|
1265
1211
|
"aria-expanded": sidebarOpen,
|
|
@@ -1276,17 +1222,14 @@ function AppShell({
|
|
|
1276
1222
|
themeToggleProps
|
|
1277
1223
|
}
|
|
1278
1224
|
),
|
|
1279
|
-
!isDesktop && sidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className:
|
|
1225
|
+
!isDesktop && sidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "appShellBackdrop", onClick: () => setSidebarOpen(false), onTouchStart: () => setSidebarOpen(false), "aria-hidden": "true" }),
|
|
1280
1226
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("aside", { ref: sidebarRef, id: sidebarId, className: sidebarClasses, "aria-label": "Sidebar navigation", children: sidebar }),
|
|
1281
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("main", { ref: mainRef, className: cx(
|
|
1227
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("main", { ref: mainRef, className: cx("appShellMain", mainClassName), children })
|
|
1282
1228
|
]
|
|
1283
1229
|
}
|
|
1284
1230
|
);
|
|
1285
1231
|
}
|
|
1286
1232
|
|
|
1287
|
-
// src/components/sidebar-nav/sidebar-nav.module.css
|
|
1288
|
-
var sidebar_nav_default = {};
|
|
1289
|
-
|
|
1290
1233
|
// src/components/sidebar-nav/SidebarNav.tsx
|
|
1291
1234
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1292
1235
|
var defaultIsActive = (item, path) => {
|
|
@@ -1318,18 +1261,18 @@ function SidebarNav({
|
|
|
1318
1261
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1319
1262
|
"nav",
|
|
1320
1263
|
{
|
|
1321
|
-
className: cx(
|
|
1264
|
+
className: cx("uziSidebarNav", collapsed && "uziSidebarNavCollapsed", className),
|
|
1322
1265
|
"aria-label": ariaLabel,
|
|
1323
1266
|
style,
|
|
1324
1267
|
children: [
|
|
1325
|
-
header ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className:
|
|
1326
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className:
|
|
1268
|
+
header ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uziSidebarNavHeader", children: header }) : null,
|
|
1269
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uziSidebarNavSections", children: resolvedSections.map((section, sectionIndex) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1327
1270
|
"div",
|
|
1328
1271
|
{
|
|
1329
|
-
className: cx(
|
|
1272
|
+
className: cx("uziSidebarNavSection", sectionClassName),
|
|
1330
1273
|
children: [
|
|
1331
|
-
section.label && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className:
|
|
1332
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className:
|
|
1274
|
+
section.label && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uziSidebarNavSectionLabel", children: section.label }) : null,
|
|
1275
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uziSidebarNavSectionItems", children: section.items.map((item, itemIndex) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1333
1276
|
SidebarNavEntry,
|
|
1334
1277
|
{
|
|
1335
1278
|
item,
|
|
@@ -1344,7 +1287,7 @@ function SidebarNav({
|
|
|
1344
1287
|
},
|
|
1345
1288
|
section.id ?? `section-${sectionIndex}`
|
|
1346
1289
|
)) }),
|
|
1347
|
-
footer ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className:
|
|
1290
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uziSidebarNavFooter", children: footer }) : null
|
|
1348
1291
|
]
|
|
1349
1292
|
}
|
|
1350
1293
|
);
|
|
@@ -1359,20 +1302,20 @@ function SidebarNavEntry({
|
|
|
1359
1302
|
const rel = item.rel ?? (item.target === "_blank" ? "noreferrer" : void 0);
|
|
1360
1303
|
const title = item.title ?? (typeof item.label === "string" ? item.label : void 0);
|
|
1361
1304
|
const classes = cx(
|
|
1362
|
-
|
|
1363
|
-
active &&
|
|
1364
|
-
collapsed &&
|
|
1365
|
-
item.disabled &&
|
|
1305
|
+
"uziSidebarNavItem",
|
|
1306
|
+
active && "uziSidebarNavItemActive",
|
|
1307
|
+
collapsed && "uziSidebarNavItemCollapsed",
|
|
1308
|
+
item.disabled && "uziSidebarNavItemDisabled",
|
|
1366
1309
|
itemClassName
|
|
1367
1310
|
);
|
|
1368
1311
|
const content = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
1369
|
-
item.icon && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className:
|
|
1370
|
-
!collapsed ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className:
|
|
1371
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className:
|
|
1372
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className:
|
|
1373
|
-
item.badge && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className:
|
|
1312
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uziSidebarNavIcon", children: item.icon }),
|
|
1313
|
+
!collapsed ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "uziSidebarNavItemBody", children: [
|
|
1314
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "uziSidebarNavLabelRow", children: [
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uziSidebarNavLabel", children: item.label }),
|
|
1316
|
+
item.badge && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uziSidebarNavBadge", children: item.badge })
|
|
1374
1317
|
] }),
|
|
1375
|
-
item.description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className:
|
|
1318
|
+
item.description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uziSidebarNavDescription", children: item.description }) : null
|
|
1376
1319
|
] }) : null
|
|
1377
1320
|
] });
|
|
1378
1321
|
const handleClick = () => {
|