@tomny-dev/uzi 0.1.8 → 0.1.9-pr.2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -1
- package/dist/index.cjs +373 -161
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +263 -44
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +69 -14
- package/dist/index.d.ts +69 -14
- package/dist/index.js +372 -164
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -546,105 +546,257 @@ var Checkbox = React3.forwardRef(
|
|
|
546
546
|
);
|
|
547
547
|
Checkbox.displayName = "Checkbox";
|
|
548
548
|
|
|
549
|
-
// src/components/
|
|
550
|
-
import
|
|
551
|
-
import
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
549
|
+
// src/components/multi-select/MultiSelect.tsx
|
|
550
|
+
import * as React4 from "react";
|
|
551
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
552
|
+
import { Fragment, jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
553
|
+
var MultiSelect = React4.forwardRef(
|
|
554
|
+
({
|
|
555
|
+
options,
|
|
556
|
+
value,
|
|
557
|
+
onChange,
|
|
558
|
+
placeholder = "Select options",
|
|
559
|
+
fullWidth = true,
|
|
560
|
+
maxVisibleValues = 2,
|
|
561
|
+
className,
|
|
562
|
+
disabled = false,
|
|
563
|
+
name,
|
|
564
|
+
"aria-label": ariaLabel,
|
|
565
|
+
"aria-labelledby": ariaLabelledBy
|
|
566
|
+
}, ref) => {
|
|
567
|
+
const selectedSet = React4.useMemo(() => new Set(value), [value]);
|
|
568
|
+
const selectedOptions = React4.useMemo(
|
|
569
|
+
() => options.filter((opt) => selectedSet.has(opt.value)),
|
|
570
|
+
[options, selectedSet]
|
|
571
|
+
);
|
|
572
|
+
const toggleValue = React4.useCallback(
|
|
573
|
+
(nextValue) => {
|
|
574
|
+
if (selectedSet.has(nextValue)) {
|
|
575
|
+
onChange(value.filter((entry) => entry !== nextValue));
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
onChange([...value, nextValue]);
|
|
579
|
+
},
|
|
580
|
+
[onChange, selectedSet, value]
|
|
581
|
+
);
|
|
582
|
+
const visibleCount = Math.max(1, maxVisibleValues);
|
|
583
|
+
const visibleOptions = selectedOptions.slice(0, visibleCount);
|
|
584
|
+
const overflowCount = Math.max(
|
|
585
|
+
0,
|
|
586
|
+
selectedOptions.length - visibleOptions.length
|
|
587
|
+
);
|
|
588
|
+
return /* @__PURE__ */ jsx11(DropdownMenuPrimitive.Root, { modal: false, children: /* @__PURE__ */ jsxs4(
|
|
589
|
+
"div",
|
|
578
590
|
{
|
|
579
|
-
|
|
580
|
-
className: cx("trigger", isActive && "trigger-active"),
|
|
581
|
-
onClick: () => setOpen((o) => !o),
|
|
582
|
-
"aria-labelledby": ariaLabelledBy,
|
|
583
|
-
"aria-label": ariaLabel,
|
|
591
|
+
className: cx("wrapper", fullWidth && "wrapper-fullWidth", className),
|
|
584
592
|
children: [
|
|
585
|
-
|
|
586
|
-
|
|
593
|
+
/* @__PURE__ */ jsx11(DropdownMenuPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs4(
|
|
594
|
+
"button",
|
|
595
|
+
{
|
|
596
|
+
ref,
|
|
597
|
+
type: "button",
|
|
598
|
+
className: cx(
|
|
599
|
+
"trigger",
|
|
600
|
+
selectedOptions.length > 0 && "trigger-hasValue"
|
|
601
|
+
),
|
|
602
|
+
"aria-label": ariaLabel,
|
|
603
|
+
"aria-labelledby": ariaLabelledBy,
|
|
604
|
+
disabled,
|
|
605
|
+
children: [
|
|
606
|
+
/* @__PURE__ */ jsx11("span", { className: "value", children: selectedOptions.length === 0 ? /* @__PURE__ */ jsx11("span", { className: "placeholder", children: placeholder }) : /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
607
|
+
visibleOptions.map((option) => /* @__PURE__ */ jsx11("span", { className: "chip", children: option.label }, option.value)),
|
|
608
|
+
overflowCount > 0 ? /* @__PURE__ */ jsxs4("span", { className: "chip chip-summary", children: [
|
|
609
|
+
"+",
|
|
610
|
+
overflowCount
|
|
611
|
+
] }) : null
|
|
612
|
+
] }) }),
|
|
613
|
+
/* @__PURE__ */ jsx11("span", { className: "chevron", "aria-hidden": "true", children: /* @__PURE__ */ jsx11(
|
|
614
|
+
"svg",
|
|
615
|
+
{
|
|
616
|
+
viewBox: "0 0 10 10",
|
|
617
|
+
fill: "none",
|
|
618
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
619
|
+
width: "10",
|
|
620
|
+
height: "10",
|
|
621
|
+
children: /* @__PURE__ */ jsx11(
|
|
622
|
+
"path",
|
|
623
|
+
{
|
|
624
|
+
d: "M2 3.5L5 6.5L8 3.5",
|
|
625
|
+
stroke: "currentColor",
|
|
626
|
+
strokeWidth: "1.5",
|
|
627
|
+
strokeLinecap: "round",
|
|
628
|
+
strokeLinejoin: "round"
|
|
629
|
+
}
|
|
630
|
+
)
|
|
631
|
+
}
|
|
632
|
+
) })
|
|
633
|
+
]
|
|
634
|
+
}
|
|
635
|
+
) }),
|
|
636
|
+
name ? value.map((entry) => /* @__PURE__ */ jsx11("input", { type: "hidden", name, value: entry }, entry)) : null,
|
|
637
|
+
/* @__PURE__ */ jsx11(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx11(
|
|
638
|
+
DropdownMenuPrimitive.Content,
|
|
639
|
+
{
|
|
640
|
+
className: "menu",
|
|
641
|
+
sideOffset: 4,
|
|
642
|
+
align: "start",
|
|
643
|
+
children: options.map((option) => {
|
|
644
|
+
const selected = selectedSet.has(option.value);
|
|
645
|
+
return /* @__PURE__ */ jsxs4(
|
|
646
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
647
|
+
{
|
|
648
|
+
className: cx(
|
|
649
|
+
"option",
|
|
650
|
+
selected && "option-selected",
|
|
651
|
+
option.disabled && "option-disabled"
|
|
652
|
+
),
|
|
653
|
+
checked: selected,
|
|
654
|
+
disabled: option.disabled,
|
|
655
|
+
onCheckedChange: () => toggleValue(option.value),
|
|
656
|
+
onSelect: (event) => event.preventDefault(),
|
|
657
|
+
children: [
|
|
658
|
+
/* @__PURE__ */ jsx11(
|
|
659
|
+
"span",
|
|
660
|
+
{
|
|
661
|
+
className: cx(
|
|
662
|
+
"indicator",
|
|
663
|
+
selected && "indicator-selected",
|
|
664
|
+
option.disabled && "indicator-disabled"
|
|
665
|
+
),
|
|
666
|
+
"aria-hidden": "true",
|
|
667
|
+
children: /* @__PURE__ */ jsx11(DropdownMenuPrimitive.ItemIndicator, { forceMount: true, children: /* @__PURE__ */ jsx11(
|
|
668
|
+
"svg",
|
|
669
|
+
{
|
|
670
|
+
viewBox: "0 0 16 16",
|
|
671
|
+
width: "16",
|
|
672
|
+
height: "16",
|
|
673
|
+
fill: "none",
|
|
674
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
675
|
+
children: /* @__PURE__ */ jsx11(
|
|
676
|
+
"path",
|
|
677
|
+
{
|
|
678
|
+
d: "M3.5 8.5 6.5 11.5 12.5 4.5",
|
|
679
|
+
stroke: "currentColor",
|
|
680
|
+
strokeWidth: "1.8",
|
|
681
|
+
strokeLinecap: "round",
|
|
682
|
+
strokeLinejoin: "round"
|
|
683
|
+
}
|
|
684
|
+
)
|
|
685
|
+
}
|
|
686
|
+
) })
|
|
687
|
+
}
|
|
688
|
+
),
|
|
689
|
+
/* @__PURE__ */ jsx11("span", { className: "option-label", children: option.label })
|
|
690
|
+
]
|
|
691
|
+
},
|
|
692
|
+
option.value
|
|
693
|
+
);
|
|
694
|
+
})
|
|
695
|
+
}
|
|
696
|
+
) })
|
|
587
697
|
]
|
|
588
698
|
}
|
|
589
|
-
)
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
699
|
+
) });
|
|
700
|
+
}
|
|
701
|
+
);
|
|
702
|
+
MultiSelect.displayName = "MultiSelect";
|
|
703
|
+
|
|
704
|
+
// src/components/dropdown/Dropdown.tsx
|
|
705
|
+
import * as React6 from "react";
|
|
706
|
+
|
|
707
|
+
// src/components/select/Select.tsx
|
|
708
|
+
import * as React5 from "react";
|
|
709
|
+
import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
710
|
+
var Select = React5.forwardRef(
|
|
711
|
+
({
|
|
712
|
+
options,
|
|
713
|
+
value,
|
|
714
|
+
onChange,
|
|
715
|
+
placeholder,
|
|
716
|
+
allowEmptyOption = false,
|
|
717
|
+
fullWidth = true,
|
|
718
|
+
className,
|
|
719
|
+
...rest
|
|
720
|
+
}, ref) => {
|
|
721
|
+
const isPlaceholderShown = Boolean(placeholder) && value === "";
|
|
722
|
+
return /* @__PURE__ */ jsxs5("div", { className: cx("wrapper", fullWidth && "wrapper-fullWidth", className), children: [
|
|
723
|
+
/* @__PURE__ */ jsxs5(
|
|
724
|
+
"select",
|
|
593
725
|
{
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
children:
|
|
726
|
+
ref,
|
|
727
|
+
value,
|
|
728
|
+
onChange: (e) => onChange(e.target.value),
|
|
729
|
+
className: cx("select", isPlaceholderShown && "select-placeholder"),
|
|
730
|
+
"data-placeholder-shown": isPlaceholderShown ? "true" : void 0,
|
|
731
|
+
...rest,
|
|
732
|
+
children: [
|
|
733
|
+
placeholder ? /* @__PURE__ */ jsx12("option", { value: "", disabled: !allowEmptyOption, children: placeholder }) : null,
|
|
734
|
+
options.map((opt) => /* @__PURE__ */ jsx12("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value))
|
|
735
|
+
]
|
|
601
736
|
}
|
|
602
737
|
),
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
738
|
+
/* @__PURE__ */ jsx12("span", { className: "chevron", "aria-hidden": "true", children: /* @__PURE__ */ jsx12("svg", { viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", children: /* @__PURE__ */ jsx12("path", { d: "M2 3.5L5 6.5L8 3.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
739
|
+
] });
|
|
740
|
+
}
|
|
741
|
+
);
|
|
742
|
+
Select.displayName = "Select";
|
|
743
|
+
|
|
744
|
+
// src/components/dropdown/Dropdown.tsx
|
|
745
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
746
|
+
var Dropdown = React6.forwardRef(
|
|
747
|
+
({
|
|
748
|
+
options,
|
|
749
|
+
value,
|
|
750
|
+
onChange,
|
|
751
|
+
placeholder = "All",
|
|
752
|
+
allowClear = true,
|
|
753
|
+
...rest
|
|
754
|
+
}, ref) => {
|
|
755
|
+
return /* @__PURE__ */ jsx13(
|
|
756
|
+
Select,
|
|
757
|
+
{
|
|
758
|
+
ref,
|
|
759
|
+
options,
|
|
760
|
+
value,
|
|
761
|
+
onChange,
|
|
762
|
+
placeholder,
|
|
763
|
+
allowEmptyOption: allowClear,
|
|
764
|
+
fullWidth: false,
|
|
765
|
+
...rest
|
|
766
|
+
}
|
|
767
|
+
);
|
|
768
|
+
}
|
|
769
|
+
);
|
|
770
|
+
Dropdown.displayName = "Dropdown";
|
|
619
771
|
|
|
620
772
|
// src/components/dropdown-menu/DropdownMenu.tsx
|
|
621
|
-
import * as
|
|
622
|
-
import { jsx as
|
|
773
|
+
import * as DropdownMenuPrimitive2 from "@radix-ui/react-dropdown-menu";
|
|
774
|
+
import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
623
775
|
function DropdownMenu(props) {
|
|
624
|
-
return /* @__PURE__ */
|
|
776
|
+
return /* @__PURE__ */ jsx14(DropdownMenuPrimitive2.Root, { ...props });
|
|
625
777
|
}
|
|
626
778
|
function DropdownMenuTrigger(props) {
|
|
627
|
-
return /* @__PURE__ */
|
|
779
|
+
return /* @__PURE__ */ jsx14(DropdownMenuPrimitive2.Trigger, { ...props });
|
|
628
780
|
}
|
|
629
781
|
function DropdownMenuGroup(props) {
|
|
630
|
-
return /* @__PURE__ */
|
|
782
|
+
return /* @__PURE__ */ jsx14(DropdownMenuPrimitive2.Group, { ...props });
|
|
631
783
|
}
|
|
632
784
|
function DropdownMenuPortal(props) {
|
|
633
|
-
return /* @__PURE__ */
|
|
785
|
+
return /* @__PURE__ */ jsx14(DropdownMenuPrimitive2.Portal, { ...props });
|
|
634
786
|
}
|
|
635
787
|
function DropdownMenuSub(props) {
|
|
636
|
-
return /* @__PURE__ */
|
|
788
|
+
return /* @__PURE__ */ jsx14(DropdownMenuPrimitive2.Sub, { ...props });
|
|
637
789
|
}
|
|
638
790
|
function DropdownMenuRadioGroup(props) {
|
|
639
|
-
return /* @__PURE__ */
|
|
791
|
+
return /* @__PURE__ */ jsx14(DropdownMenuPrimitive2.RadioGroup, { ...props });
|
|
640
792
|
}
|
|
641
793
|
function DropdownMenuContent({
|
|
642
794
|
className,
|
|
643
795
|
sideOffset = 4,
|
|
644
796
|
...props
|
|
645
797
|
}) {
|
|
646
|
-
return /* @__PURE__ */
|
|
647
|
-
|
|
798
|
+
return /* @__PURE__ */ jsx14(DropdownMenuPrimitive2.Portal, { children: /* @__PURE__ */ jsx14(
|
|
799
|
+
DropdownMenuPrimitive2.Content,
|
|
648
800
|
{
|
|
649
801
|
sideOffset,
|
|
650
802
|
className: cx("content", className),
|
|
@@ -658,8 +810,8 @@ function DropdownMenuItem({
|
|
|
658
810
|
variant = "default",
|
|
659
811
|
...props
|
|
660
812
|
}) {
|
|
661
|
-
return /* @__PURE__ */
|
|
662
|
-
|
|
813
|
+
return /* @__PURE__ */ jsx14(
|
|
814
|
+
DropdownMenuPrimitive2.Item,
|
|
663
815
|
{
|
|
664
816
|
"data-inset": inset ? "true" : void 0,
|
|
665
817
|
className: cx(
|
|
@@ -676,13 +828,13 @@ function DropdownMenuCheckboxItem({
|
|
|
676
828
|
children,
|
|
677
829
|
...props
|
|
678
830
|
}) {
|
|
679
|
-
return /* @__PURE__ */
|
|
680
|
-
|
|
831
|
+
return /* @__PURE__ */ jsxs6(
|
|
832
|
+
DropdownMenuPrimitive2.CheckboxItem,
|
|
681
833
|
{
|
|
682
834
|
className: cx("item", "insetItem", className),
|
|
683
835
|
...props,
|
|
684
836
|
children: [
|
|
685
|
-
/* @__PURE__ */
|
|
837
|
+
/* @__PURE__ */ jsx14("span", { className: "indicator", children: /* @__PURE__ */ jsx14(DropdownMenuPrimitive2.ItemIndicator, { children: /* @__PURE__ */ jsx14(
|
|
686
838
|
"svg",
|
|
687
839
|
{
|
|
688
840
|
viewBox: "0 0 16 16",
|
|
@@ -690,7 +842,7 @@ function DropdownMenuCheckboxItem({
|
|
|
690
842
|
height: "16",
|
|
691
843
|
"aria-hidden": "true",
|
|
692
844
|
className: "indicatorIcon",
|
|
693
|
-
children: /* @__PURE__ */
|
|
845
|
+
children: /* @__PURE__ */ jsx14(
|
|
694
846
|
"path",
|
|
695
847
|
{
|
|
696
848
|
d: "M3.5 8.5 6.5 11.5 12.5 4.5",
|
|
@@ -713,13 +865,13 @@ function DropdownMenuRadioItem({
|
|
|
713
865
|
children,
|
|
714
866
|
...props
|
|
715
867
|
}) {
|
|
716
|
-
return /* @__PURE__ */
|
|
717
|
-
|
|
868
|
+
return /* @__PURE__ */ jsxs6(
|
|
869
|
+
DropdownMenuPrimitive2.RadioItem,
|
|
718
870
|
{
|
|
719
871
|
className: cx("item", "insetItem", className),
|
|
720
872
|
...props,
|
|
721
873
|
children: [
|
|
722
|
-
/* @__PURE__ */
|
|
874
|
+
/* @__PURE__ */ jsx14("span", { className: "indicator", children: /* @__PURE__ */ jsx14(DropdownMenuPrimitive2.ItemIndicator, { children: /* @__PURE__ */ jsx14("span", { className: "radioDot" }) }) }),
|
|
723
875
|
children
|
|
724
876
|
]
|
|
725
877
|
}
|
|
@@ -730,8 +882,8 @@ function DropdownMenuLabel({
|
|
|
730
882
|
inset,
|
|
731
883
|
...props
|
|
732
884
|
}) {
|
|
733
|
-
return /* @__PURE__ */
|
|
734
|
-
|
|
885
|
+
return /* @__PURE__ */ jsx14(
|
|
886
|
+
DropdownMenuPrimitive2.Label,
|
|
735
887
|
{
|
|
736
888
|
"data-inset": inset ? "true" : void 0,
|
|
737
889
|
className: cx("label", className),
|
|
@@ -743,8 +895,8 @@ function DropdownMenuSeparator({
|
|
|
743
895
|
className,
|
|
744
896
|
...props
|
|
745
897
|
}) {
|
|
746
|
-
return /* @__PURE__ */
|
|
747
|
-
|
|
898
|
+
return /* @__PURE__ */ jsx14(
|
|
899
|
+
DropdownMenuPrimitive2.Separator,
|
|
748
900
|
{
|
|
749
901
|
className: cx("separator", className),
|
|
750
902
|
...props
|
|
@@ -757,15 +909,15 @@ function DropdownMenuSubTrigger({
|
|
|
757
909
|
children,
|
|
758
910
|
...props
|
|
759
911
|
}) {
|
|
760
|
-
return /* @__PURE__ */
|
|
761
|
-
|
|
912
|
+
return /* @__PURE__ */ jsxs6(
|
|
913
|
+
DropdownMenuPrimitive2.SubTrigger,
|
|
762
914
|
{
|
|
763
915
|
"data-inset": inset ? "true" : void 0,
|
|
764
916
|
className: cx("item", className),
|
|
765
917
|
...props,
|
|
766
918
|
children: [
|
|
767
919
|
children,
|
|
768
|
-
/* @__PURE__ */
|
|
920
|
+
/* @__PURE__ */ jsx14(
|
|
769
921
|
"svg",
|
|
770
922
|
{
|
|
771
923
|
viewBox: "0 0 16 16",
|
|
@@ -773,7 +925,7 @@ function DropdownMenuSubTrigger({
|
|
|
773
925
|
height: "16",
|
|
774
926
|
"aria-hidden": "true",
|
|
775
927
|
className: "chevron",
|
|
776
|
-
children: /* @__PURE__ */
|
|
928
|
+
children: /* @__PURE__ */ jsx14(
|
|
777
929
|
"path",
|
|
778
930
|
{
|
|
779
931
|
d: "M6 3.5 10.5 8 6 12.5",
|
|
@@ -794,8 +946,8 @@ function DropdownMenuSubContent({
|
|
|
794
946
|
className,
|
|
795
947
|
...props
|
|
796
948
|
}) {
|
|
797
|
-
return /* @__PURE__ */
|
|
798
|
-
|
|
949
|
+
return /* @__PURE__ */ jsx14(
|
|
950
|
+
DropdownMenuPrimitive2.SubContent,
|
|
799
951
|
{
|
|
800
952
|
className: cx("content", className),
|
|
801
953
|
...props
|
|
@@ -805,20 +957,20 @@ function DropdownMenuSubContent({
|
|
|
805
957
|
|
|
806
958
|
// src/components/app-shell/AppShell.tsx
|
|
807
959
|
import {
|
|
808
|
-
useEffect as
|
|
960
|
+
useEffect as useEffect4,
|
|
809
961
|
useId,
|
|
810
|
-
useRef as
|
|
811
|
-
useState as
|
|
962
|
+
useRef as useRef3,
|
|
963
|
+
useState as useState3
|
|
812
964
|
} from "react";
|
|
813
965
|
|
|
814
966
|
// src/theme/ThemeProvider.tsx
|
|
815
967
|
import {
|
|
816
968
|
createContext as createContext2,
|
|
817
|
-
useCallback as
|
|
969
|
+
useCallback as useCallback3,
|
|
818
970
|
useContext as useContext2,
|
|
819
|
-
useEffect as
|
|
820
|
-
useMemo as
|
|
821
|
-
useState as
|
|
971
|
+
useEffect as useEffect3,
|
|
972
|
+
useMemo as useMemo3,
|
|
973
|
+
useState as useState2
|
|
822
974
|
} from "react";
|
|
823
975
|
|
|
824
976
|
// src/theme/constants.ts
|
|
@@ -828,7 +980,7 @@ var THEME_STORAGE_KEY = "uzi-theme";
|
|
|
828
980
|
var ACCENT_STORAGE_KEY = "uzi-accent";
|
|
829
981
|
|
|
830
982
|
// src/theme/ThemeProvider.tsx
|
|
831
|
-
import { jsx as
|
|
983
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
832
984
|
var THEME_STORAGE_KEY2 = THEME_STORAGE_KEY;
|
|
833
985
|
var ACCENT_STORAGE_KEY2 = ACCENT_STORAGE_KEY;
|
|
834
986
|
var THEME_ATTRIBUTE = "data-uzi-theme";
|
|
@@ -856,10 +1008,10 @@ function ThemeProvider({
|
|
|
856
1008
|
accentStorageKey = ACCENT_STORAGE_KEY2,
|
|
857
1009
|
disableStorage = false
|
|
858
1010
|
}) {
|
|
859
|
-
const [internalTheme, setInternalTheme] =
|
|
860
|
-
const [internalAccent, setInternalAccent] =
|
|
861
|
-
const [systemTheme, setSystemTheme] =
|
|
862
|
-
|
|
1011
|
+
const [internalTheme, setInternalTheme] = useState2(defaultTheme);
|
|
1012
|
+
const [internalAccent, setInternalAccent] = useState2(defaultAccent);
|
|
1013
|
+
const [systemTheme, setSystemTheme] = useState2("light");
|
|
1014
|
+
useEffect3(() => {
|
|
863
1015
|
setSystemTheme(getSystemTheme());
|
|
864
1016
|
if (!disableStorage) {
|
|
865
1017
|
const storedTheme = window.localStorage.getItem(storageKey);
|
|
@@ -873,7 +1025,7 @@ function ThemeProvider({
|
|
|
873
1025
|
const currentTheme = isThemeControlled ? theme : internalTheme;
|
|
874
1026
|
const currentAccent = isAccentControlled ? accent : internalAccent;
|
|
875
1027
|
const resolvedTheme = currentTheme === "system" ? systemTheme : currentTheme;
|
|
876
|
-
|
|
1028
|
+
useEffect3(() => {
|
|
877
1029
|
if (typeof window === "undefined") return;
|
|
878
1030
|
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
879
1031
|
const handleChange = () => setSystemTheme(mediaQuery.matches ? "dark" : "light");
|
|
@@ -881,7 +1033,7 @@ function ThemeProvider({
|
|
|
881
1033
|
mediaQuery.addEventListener("change", handleChange);
|
|
882
1034
|
return () => mediaQuery.removeEventListener("change", handleChange);
|
|
883
1035
|
}, []);
|
|
884
|
-
|
|
1036
|
+
useEffect3(() => {
|
|
885
1037
|
if (typeof document === "undefined") return;
|
|
886
1038
|
const root = document.documentElement;
|
|
887
1039
|
root.setAttribute(THEME_ATTRIBUTE, resolvedTheme);
|
|
@@ -889,7 +1041,7 @@ function ThemeProvider({
|
|
|
889
1041
|
root.style.colorScheme = resolvedTheme;
|
|
890
1042
|
root.classList.toggle("dark", resolvedTheme === "dark");
|
|
891
1043
|
}, [currentAccent, resolvedTheme]);
|
|
892
|
-
const setTheme =
|
|
1044
|
+
const setTheme = useCallback3(
|
|
893
1045
|
(nextTheme) => {
|
|
894
1046
|
if (!isThemeControlled) setInternalTheme(nextTheme);
|
|
895
1047
|
if (!disableStorage && typeof window !== "undefined") {
|
|
@@ -899,7 +1051,7 @@ function ThemeProvider({
|
|
|
899
1051
|
},
|
|
900
1052
|
[disableStorage, isThemeControlled, onThemeChange, storageKey]
|
|
901
1053
|
);
|
|
902
|
-
const setAccent =
|
|
1054
|
+
const setAccent = useCallback3(
|
|
903
1055
|
(nextAccent) => {
|
|
904
1056
|
if (!isAccentControlled) setInternalAccent(nextAccent);
|
|
905
1057
|
if (!disableStorage && typeof window !== "undefined") {
|
|
@@ -909,10 +1061,10 @@ function ThemeProvider({
|
|
|
909
1061
|
},
|
|
910
1062
|
[accentStorageKey, disableStorage, isAccentControlled, onAccentChange]
|
|
911
1063
|
);
|
|
912
|
-
const toggleTheme =
|
|
1064
|
+
const toggleTheme = useCallback3(() => {
|
|
913
1065
|
setTheme(resolvedTheme === "dark" ? "light" : "dark");
|
|
914
1066
|
}, [resolvedTheme, setTheme]);
|
|
915
|
-
const value =
|
|
1067
|
+
const value = useMemo3(
|
|
916
1068
|
() => ({
|
|
917
1069
|
theme: currentTheme,
|
|
918
1070
|
resolvedTheme,
|
|
@@ -923,7 +1075,7 @@ function ThemeProvider({
|
|
|
923
1075
|
}),
|
|
924
1076
|
[currentAccent, currentTheme, resolvedTheme, setAccent, setTheme, toggleTheme]
|
|
925
1077
|
);
|
|
926
|
-
return /* @__PURE__ */
|
|
1078
|
+
return /* @__PURE__ */ jsx15(ThemeContext.Provider, { value, children });
|
|
927
1079
|
}
|
|
928
1080
|
function useTheme() {
|
|
929
1081
|
const context = useContext2(ThemeContext);
|
|
@@ -932,9 +1084,9 @@ function useTheme() {
|
|
|
932
1084
|
}
|
|
933
1085
|
|
|
934
1086
|
// src/components/theme-toggle-button/ThemeToggleButton.tsx
|
|
935
|
-
import { jsx as
|
|
1087
|
+
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
936
1088
|
function MoonIcon() {
|
|
937
|
-
return /* @__PURE__ */
|
|
1089
|
+
return /* @__PURE__ */ jsx16("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", width: "16", height: "16", fill: "none", children: /* @__PURE__ */ jsx16(
|
|
938
1090
|
"path",
|
|
939
1091
|
{
|
|
940
1092
|
d: "M20 15.2A8.5 8.5 0 0 1 8.8 4 9 9 0 1 0 20 15.2Z",
|
|
@@ -946,9 +1098,9 @@ function MoonIcon() {
|
|
|
946
1098
|
) });
|
|
947
1099
|
}
|
|
948
1100
|
function SunIcon() {
|
|
949
|
-
return /* @__PURE__ */
|
|
950
|
-
/* @__PURE__ */
|
|
951
|
-
/* @__PURE__ */
|
|
1101
|
+
return /* @__PURE__ */ jsxs7("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", width: "16", height: "16", fill: "none", children: [
|
|
1102
|
+
/* @__PURE__ */ jsx16("circle", { cx: "12", cy: "12", r: "4", stroke: "currentColor", strokeWidth: "1.8" }),
|
|
1103
|
+
/* @__PURE__ */ jsx16(
|
|
952
1104
|
"path",
|
|
953
1105
|
{
|
|
954
1106
|
d: "M12 2.75v2.5M12 18.75v2.5M21.25 12h-2.5M5.25 12h-2.5M18.54 5.46l-1.77 1.77M7.23 16.77l-1.77 1.77M18.54 18.54l-1.77-1.77M7.23 7.23 5.46 5.46",
|
|
@@ -969,7 +1121,7 @@ function ThemeToggleButton({
|
|
|
969
1121
|
}) {
|
|
970
1122
|
const { resolvedTheme, toggleTheme } = useTheme();
|
|
971
1123
|
const nextThemeLabel = resolvedTheme === "dark" ? lightLabel : darkLabel;
|
|
972
|
-
return /* @__PURE__ */
|
|
1124
|
+
return /* @__PURE__ */ jsxs7(
|
|
973
1125
|
Button,
|
|
974
1126
|
{
|
|
975
1127
|
type: "button",
|
|
@@ -984,15 +1136,15 @@ function ThemeToggleButton({
|
|
|
984
1136
|
},
|
|
985
1137
|
...rest,
|
|
986
1138
|
children: [
|
|
987
|
-
resolvedTheme === "dark" ? /* @__PURE__ */
|
|
988
|
-
showLabel && /* @__PURE__ */
|
|
1139
|
+
resolvedTheme === "dark" ? /* @__PURE__ */ jsx16(SunIcon, {}) : /* @__PURE__ */ jsx16(MoonIcon, {}),
|
|
1140
|
+
showLabel && /* @__PURE__ */ jsx16("span", { children: nextThemeLabel })
|
|
989
1141
|
]
|
|
990
1142
|
}
|
|
991
1143
|
);
|
|
992
1144
|
}
|
|
993
1145
|
|
|
994
1146
|
// src/components/top-bar/TopBar.tsx
|
|
995
|
-
import { jsx as
|
|
1147
|
+
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
996
1148
|
function TopBar({
|
|
997
1149
|
leading,
|
|
998
1150
|
brand,
|
|
@@ -1011,24 +1163,24 @@ function TopBar({
|
|
|
1011
1163
|
...rest
|
|
1012
1164
|
}) {
|
|
1013
1165
|
const shouldStick = isSticky ?? sticky;
|
|
1014
|
-
const brandNode = !brand ? null : brandHref ? /* @__PURE__ */
|
|
1015
|
-
return /* @__PURE__ */
|
|
1166
|
+
const brandNode = !brand ? null : brandHref ? /* @__PURE__ */ jsx17("a", { href: brandHref, className: "topBarBrand", children: /* @__PURE__ */ jsx17("span", { className: "topBarBrandContent", children: brand }) }) : /* @__PURE__ */ jsx17("div", { className: "topBarBrand", children: /* @__PURE__ */ jsx17("span", { className: "topBarBrandContent", children: brand }) });
|
|
1167
|
+
return /* @__PURE__ */ jsx17(
|
|
1016
1168
|
"header",
|
|
1017
1169
|
{
|
|
1018
1170
|
className: cx("topBar", !shouldStick && "topBarStatic", className),
|
|
1019
1171
|
...rest,
|
|
1020
|
-
children: /* @__PURE__ */
|
|
1021
|
-
/* @__PURE__ */
|
|
1172
|
+
children: /* @__PURE__ */ jsxs8("div", { className: cx("topBarInner", innerClassName), children: [
|
|
1173
|
+
/* @__PURE__ */ jsxs8("div", { className: "topBarStart", children: [
|
|
1022
1174
|
leading,
|
|
1023
1175
|
brandingLocation === "left" && brandNode,
|
|
1024
1176
|
start
|
|
1025
1177
|
] }),
|
|
1026
|
-
brandNode && brandingLocation === "center" || center || children ? /* @__PURE__ */
|
|
1178
|
+
brandNode && brandingLocation === "center" || center || children ? /* @__PURE__ */ jsx17("div", { className: "topBarCenter", children: /* @__PURE__ */ jsxs8("div", { className: "topBarCenterGroup", children: [
|
|
1027
1179
|
brandingLocation === "center" && brandNode,
|
|
1028
1180
|
center ?? children
|
|
1029
1181
|
] }) }) : null,
|
|
1030
|
-
/* @__PURE__ */
|
|
1031
|
-
showThemeToggle && /* @__PURE__ */
|
|
1182
|
+
/* @__PURE__ */ jsxs8("div", { className: "topBarActions", children: [
|
|
1183
|
+
showThemeToggle && /* @__PURE__ */ jsx17(ThemeToggleButton, { ...themeToggleProps }),
|
|
1032
1184
|
actions
|
|
1033
1185
|
] })
|
|
1034
1186
|
] })
|
|
@@ -1037,7 +1189,7 @@ function TopBar({
|
|
|
1037
1189
|
}
|
|
1038
1190
|
|
|
1039
1191
|
// src/components/app-shell/AppShell.tsx
|
|
1040
|
-
import { jsx as
|
|
1192
|
+
import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1041
1193
|
var DESKTOP_BREAKPOINT = 960;
|
|
1042
1194
|
function getIsDesktop() {
|
|
1043
1195
|
if (typeof window === "undefined") return false;
|
|
@@ -1062,16 +1214,16 @@ function AppShell({
|
|
|
1062
1214
|
hamburgerLabel = "Toggle navigation",
|
|
1063
1215
|
onSidebarToggle
|
|
1064
1216
|
}) {
|
|
1065
|
-
const [isDesktop, setIsDesktop] =
|
|
1066
|
-
const [sidebarOpen, setSidebarOpen] =
|
|
1067
|
-
const [transitionsReady, setTransitionsReady] =
|
|
1068
|
-
const prevIsDesktopRef =
|
|
1069
|
-
const closeKeyRef =
|
|
1070
|
-
const sidebarRef =
|
|
1071
|
-
const hamburgerRef =
|
|
1072
|
-
const mainRef =
|
|
1217
|
+
const [isDesktop, setIsDesktop] = useState3(false);
|
|
1218
|
+
const [sidebarOpen, setSidebarOpen] = useState3(false);
|
|
1219
|
+
const [transitionsReady, setTransitionsReady] = useState3(false);
|
|
1220
|
+
const prevIsDesktopRef = useRef3(false);
|
|
1221
|
+
const closeKeyRef = useRef3(closeSidebarOnChangeKey);
|
|
1222
|
+
const sidebarRef = useRef3(null);
|
|
1223
|
+
const hamburgerRef = useRef3(null);
|
|
1224
|
+
const mainRef = useRef3(null);
|
|
1073
1225
|
const sidebarId = useId();
|
|
1074
|
-
|
|
1226
|
+
useEffect4(() => {
|
|
1075
1227
|
const desktop = getIsDesktop();
|
|
1076
1228
|
setIsDesktop(desktop);
|
|
1077
1229
|
setSidebarOpen(desktop);
|
|
@@ -1093,7 +1245,7 @@ function AppShell({
|
|
|
1093
1245
|
window.removeEventListener("resize", handleResize);
|
|
1094
1246
|
};
|
|
1095
1247
|
}, []);
|
|
1096
|
-
|
|
1248
|
+
useEffect4(() => {
|
|
1097
1249
|
if (isDesktop || !sidebarOpen) return;
|
|
1098
1250
|
const mainElement = mainRef.current;
|
|
1099
1251
|
const closeSidebar = () => setSidebarOpen(false);
|
|
@@ -1118,13 +1270,13 @@ function AppShell({
|
|
|
1118
1270
|
document.removeEventListener("touchmove", closeSidebar);
|
|
1119
1271
|
};
|
|
1120
1272
|
}, [sidebarOpen, isDesktop]);
|
|
1121
|
-
|
|
1273
|
+
useEffect4(() => {
|
|
1122
1274
|
if (!isDesktop && closeKeyRef.current !== closeSidebarOnChangeKey) {
|
|
1123
1275
|
setSidebarOpen(false);
|
|
1124
1276
|
}
|
|
1125
1277
|
closeKeyRef.current = closeSidebarOnChangeKey;
|
|
1126
1278
|
}, [closeSidebarOnChangeKey, isDesktop]);
|
|
1127
|
-
|
|
1279
|
+
useEffect4(() => {
|
|
1128
1280
|
onSidebarToggle?.(sidebarOpen);
|
|
1129
1281
|
}, [sidebarOpen, onSidebarToggle]);
|
|
1130
1282
|
const toggleSidebar = () => setSidebarOpen((open) => !open);
|
|
@@ -1137,7 +1289,7 @@ function AppShell({
|
|
|
1137
1289
|
className
|
|
1138
1290
|
);
|
|
1139
1291
|
const sidebarClasses = cx("appShellSidebar", sidebarOpen && "appShellSidebarOpen", sidebarClassName);
|
|
1140
|
-
return /* @__PURE__ */
|
|
1292
|
+
return /* @__PURE__ */ jsxs9(
|
|
1141
1293
|
"div",
|
|
1142
1294
|
{
|
|
1143
1295
|
className: shellClasses,
|
|
@@ -1146,11 +1298,11 @@ function AppShell({
|
|
|
1146
1298
|
"data-desktop": isDesktop ? "true" : "false",
|
|
1147
1299
|
"data-sidebar-open": sidebarOpen ? "true" : "false",
|
|
1148
1300
|
children: [
|
|
1149
|
-
/* @__PURE__ */
|
|
1301
|
+
/* @__PURE__ */ jsx18(
|
|
1150
1302
|
TopBar,
|
|
1151
1303
|
{
|
|
1152
1304
|
className: cx("appShellTopbar", topbarClassName),
|
|
1153
|
-
leading: /* @__PURE__ */
|
|
1305
|
+
leading: /* @__PURE__ */ jsx18(
|
|
1154
1306
|
"button",
|
|
1155
1307
|
{
|
|
1156
1308
|
ref: hamburgerRef,
|
|
@@ -1160,7 +1312,7 @@ function AppShell({
|
|
|
1160
1312
|
"aria-label": hamburgerLabel,
|
|
1161
1313
|
"aria-expanded": sidebarOpen,
|
|
1162
1314
|
"aria-controls": sidebarId,
|
|
1163
|
-
children: /* @__PURE__ */
|
|
1315
|
+
children: /* @__PURE__ */ jsx18("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx18("path", { d: "M3 6h18M3 12h18M3 18h18", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" }) })
|
|
1164
1316
|
}
|
|
1165
1317
|
),
|
|
1166
1318
|
brand,
|
|
@@ -1172,16 +1324,16 @@ function AppShell({
|
|
|
1172
1324
|
themeToggleProps
|
|
1173
1325
|
}
|
|
1174
1326
|
),
|
|
1175
|
-
!isDesktop && sidebarOpen && /* @__PURE__ */
|
|
1176
|
-
/* @__PURE__ */
|
|
1177
|
-
/* @__PURE__ */
|
|
1327
|
+
!isDesktop && sidebarOpen && /* @__PURE__ */ jsx18("div", { className: "appShellBackdrop", onClick: () => setSidebarOpen(false), onTouchStart: () => setSidebarOpen(false), "aria-hidden": "true" }),
|
|
1328
|
+
/* @__PURE__ */ jsx18("aside", { ref: sidebarRef, id: sidebarId, className: sidebarClasses, "aria-label": "Sidebar navigation", children: sidebar }),
|
|
1329
|
+
/* @__PURE__ */ jsx18("main", { ref: mainRef, className: cx("appShellMain", mainClassName), children })
|
|
1178
1330
|
]
|
|
1179
1331
|
}
|
|
1180
1332
|
);
|
|
1181
1333
|
}
|
|
1182
1334
|
|
|
1183
1335
|
// src/components/sidebar-nav/SidebarNav.tsx
|
|
1184
|
-
import { Fragment, jsx as
|
|
1336
|
+
import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1185
1337
|
var defaultIsActive = (item, path) => {
|
|
1186
1338
|
if (item.active !== void 0) return item.active;
|
|
1187
1339
|
if (!item.href) return false;
|
|
@@ -1208,21 +1360,21 @@ function SidebarNav({
|
|
|
1208
1360
|
const style = iconSize !== void 0 ? {
|
|
1209
1361
|
["--sidebar-nav-icon-size"]: typeof iconSize === "number" ? `${iconSize}px` : iconSize
|
|
1210
1362
|
} : void 0;
|
|
1211
|
-
return /* @__PURE__ */
|
|
1363
|
+
return /* @__PURE__ */ jsxs10(
|
|
1212
1364
|
"nav",
|
|
1213
1365
|
{
|
|
1214
1366
|
className: cx("uziSidebarNav", collapsed && "uziSidebarNavCollapsed", className),
|
|
1215
1367
|
"aria-label": ariaLabel,
|
|
1216
1368
|
style,
|
|
1217
1369
|
children: [
|
|
1218
|
-
header ? /* @__PURE__ */
|
|
1219
|
-
/* @__PURE__ */
|
|
1370
|
+
header ? /* @__PURE__ */ jsx19("div", { className: "uziSidebarNavHeader", children: header }) : null,
|
|
1371
|
+
/* @__PURE__ */ jsx19("div", { className: "uziSidebarNavSections", children: resolvedSections.map((section, sectionIndex) => /* @__PURE__ */ jsxs10(
|
|
1220
1372
|
"div",
|
|
1221
1373
|
{
|
|
1222
1374
|
className: cx("uziSidebarNavSection", sectionClassName),
|
|
1223
1375
|
children: [
|
|
1224
|
-
section.label && !collapsed ? /* @__PURE__ */
|
|
1225
|
-
/* @__PURE__ */
|
|
1376
|
+
section.label && !collapsed ? /* @__PURE__ */ jsx19("div", { className: "uziSidebarNavSectionLabel", children: section.label }) : null,
|
|
1377
|
+
/* @__PURE__ */ jsx19("div", { className: "uziSidebarNavSectionItems", children: section.items.map((item, itemIndex) => /* @__PURE__ */ jsx19(
|
|
1226
1378
|
SidebarNavEntry,
|
|
1227
1379
|
{
|
|
1228
1380
|
item,
|
|
@@ -1237,7 +1389,7 @@ function SidebarNav({
|
|
|
1237
1389
|
},
|
|
1238
1390
|
section.id ?? `section-${sectionIndex}`
|
|
1239
1391
|
)) }),
|
|
1240
|
-
footer ? /* @__PURE__ */
|
|
1392
|
+
footer ? /* @__PURE__ */ jsx19("div", { className: "uziSidebarNavFooter", children: footer }) : null
|
|
1241
1393
|
]
|
|
1242
1394
|
}
|
|
1243
1395
|
);
|
|
@@ -1258,14 +1410,14 @@ function SidebarNavEntry({
|
|
|
1258
1410
|
item.disabled && "uziSidebarNavItemDisabled",
|
|
1259
1411
|
itemClassName
|
|
1260
1412
|
);
|
|
1261
|
-
const content = /* @__PURE__ */
|
|
1262
|
-
item.icon && /* @__PURE__ */
|
|
1263
|
-
!collapsed ? /* @__PURE__ */
|
|
1264
|
-
/* @__PURE__ */
|
|
1265
|
-
/* @__PURE__ */
|
|
1266
|
-
item.badge && /* @__PURE__ */
|
|
1413
|
+
const content = /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
1414
|
+
item.icon && /* @__PURE__ */ jsx19("span", { className: "uziSidebarNavIcon", children: item.icon }),
|
|
1415
|
+
!collapsed ? /* @__PURE__ */ jsxs10("span", { className: "uziSidebarNavItemBody", children: [
|
|
1416
|
+
/* @__PURE__ */ jsxs10("span", { className: "uziSidebarNavLabelRow", children: [
|
|
1417
|
+
/* @__PURE__ */ jsx19("span", { className: "uziSidebarNavLabel", children: item.label }),
|
|
1418
|
+
item.badge && /* @__PURE__ */ jsx19("span", { className: "uziSidebarNavBadge", children: item.badge })
|
|
1267
1419
|
] }),
|
|
1268
|
-
item.description ? /* @__PURE__ */
|
|
1420
|
+
item.description ? /* @__PURE__ */ jsx19("span", { className: "uziSidebarNavDescription", children: item.description }) : null
|
|
1269
1421
|
] }) : null
|
|
1270
1422
|
] });
|
|
1271
1423
|
const handleClick = () => {
|
|
@@ -1274,7 +1426,7 @@ function SidebarNavEntry({
|
|
|
1274
1426
|
onItemClick?.(item);
|
|
1275
1427
|
};
|
|
1276
1428
|
if (!item.href) {
|
|
1277
|
-
return /* @__PURE__ */
|
|
1429
|
+
return /* @__PURE__ */ jsx19(
|
|
1278
1430
|
"button",
|
|
1279
1431
|
{
|
|
1280
1432
|
type: "button",
|
|
@@ -1289,7 +1441,7 @@ function SidebarNavEntry({
|
|
|
1289
1441
|
);
|
|
1290
1442
|
}
|
|
1291
1443
|
if (item.disabled) {
|
|
1292
|
-
return /* @__PURE__ */
|
|
1444
|
+
return /* @__PURE__ */ jsx19(
|
|
1293
1445
|
"div",
|
|
1294
1446
|
{
|
|
1295
1447
|
className: classes,
|
|
@@ -1300,7 +1452,7 @@ function SidebarNavEntry({
|
|
|
1300
1452
|
}
|
|
1301
1453
|
);
|
|
1302
1454
|
}
|
|
1303
|
-
return /* @__PURE__ */
|
|
1455
|
+
return /* @__PURE__ */ jsx19(
|
|
1304
1456
|
"a",
|
|
1305
1457
|
{
|
|
1306
1458
|
className: classes,
|
|
@@ -1314,6 +1466,58 @@ function SidebarNavEntry({
|
|
|
1314
1466
|
}
|
|
1315
1467
|
);
|
|
1316
1468
|
}
|
|
1469
|
+
|
|
1470
|
+
// src/components/skeleton/Skeleton.tsx
|
|
1471
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1472
|
+
function Skeleton({
|
|
1473
|
+
width,
|
|
1474
|
+
height,
|
|
1475
|
+
radius = "md",
|
|
1476
|
+
className,
|
|
1477
|
+
style,
|
|
1478
|
+
...rest
|
|
1479
|
+
}) {
|
|
1480
|
+
return /* @__PURE__ */ jsx20(
|
|
1481
|
+
"div",
|
|
1482
|
+
{
|
|
1483
|
+
className: cx("skeleton", `radius-${radius}`, className),
|
|
1484
|
+
style: { width, height, ...style },
|
|
1485
|
+
"aria-hidden": "true",
|
|
1486
|
+
...rest
|
|
1487
|
+
}
|
|
1488
|
+
);
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
// src/components/progress/Progress.tsx
|
|
1492
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1493
|
+
function Progress({
|
|
1494
|
+
value,
|
|
1495
|
+
tone = "default",
|
|
1496
|
+
className,
|
|
1497
|
+
"aria-label": ariaLabel,
|
|
1498
|
+
...rest
|
|
1499
|
+
}) {
|
|
1500
|
+
const clamped = Math.max(0, Math.min(100, value));
|
|
1501
|
+
return /* @__PURE__ */ jsx21(
|
|
1502
|
+
"div",
|
|
1503
|
+
{
|
|
1504
|
+
className: cx("track", className),
|
|
1505
|
+
role: "progressbar",
|
|
1506
|
+
"aria-valuenow": clamped,
|
|
1507
|
+
"aria-valuemin": 0,
|
|
1508
|
+
"aria-valuemax": 100,
|
|
1509
|
+
"aria-label": ariaLabel,
|
|
1510
|
+
...rest,
|
|
1511
|
+
children: /* @__PURE__ */ jsx21(
|
|
1512
|
+
"div",
|
|
1513
|
+
{
|
|
1514
|
+
className: cx("fill", `tone-${tone}`),
|
|
1515
|
+
style: { width: `${clamped}%` }
|
|
1516
|
+
}
|
|
1517
|
+
)
|
|
1518
|
+
}
|
|
1519
|
+
);
|
|
1520
|
+
}
|
|
1317
1521
|
export {
|
|
1318
1522
|
Alert,
|
|
1319
1523
|
AppShell,
|
|
@@ -1342,8 +1546,12 @@ export {
|
|
|
1342
1546
|
Label,
|
|
1343
1547
|
Modal,
|
|
1344
1548
|
ModalOverlay,
|
|
1549
|
+
MultiSelect,
|
|
1345
1550
|
Pill,
|
|
1551
|
+
Progress,
|
|
1552
|
+
Select,
|
|
1346
1553
|
SidebarNav,
|
|
1554
|
+
Skeleton,
|
|
1347
1555
|
ThemeProvider,
|
|
1348
1556
|
ThemeToggleButton,
|
|
1349
1557
|
ToastProvider,
|