@octavius2929-personal/design-system 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +481 -342
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +36 -21
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +29 -2
- package/dist/index.d.ts +29 -2
- package/dist/index.js +434 -300
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -658,16 +658,142 @@ function Switch({ checked = false, onChange, label: label7, disabled: disabled3
|
|
|
658
658
|
] });
|
|
659
659
|
}
|
|
660
660
|
|
|
661
|
+
// src/components/base-field/index.tsx
|
|
662
|
+
import { useId } from "react";
|
|
663
|
+
|
|
664
|
+
// src/components/base-field/use-styles.ts
|
|
665
|
+
import { useMemo as useMemo12 } from "react";
|
|
666
|
+
|
|
667
|
+
// src/components/base-field/use-styles.css.ts
|
|
668
|
+
var field = "use-styles_field__1c3cgd3";
|
|
669
|
+
var helpText = "use-styles_helpText__1c3cgd8";
|
|
670
|
+
var helpTextError = "use-styles_helpTextError__1c3cgd9";
|
|
671
|
+
var input4 = "use-styles_input__1c3cgd4";
|
|
672
|
+
var inputError = "use-styles_inputError__1c3cgd5";
|
|
673
|
+
var inputStartPad = "use-styles_inputStartPad__1c3cgd6";
|
|
674
|
+
var inputTrailingPad = "use-styles_inputTrailingPad__1c3cgd7";
|
|
675
|
+
var labelText = "use-styles_labelText__1c3cgd1";
|
|
676
|
+
var labelTextError = "use-styles_labelTextError__1c3cgd2";
|
|
677
|
+
var root9 = "use-styles_root__1c3cgd0";
|
|
678
|
+
var startIconSlot = "use-styles_startIconSlot__1c3cgda";
|
|
679
|
+
var trailingSlot = "use-styles_trailingSlot__1c3cgdb";
|
|
680
|
+
|
|
681
|
+
// src/components/base-field/use-styles.ts
|
|
682
|
+
function useStyles11({ error, hasStartIcon, hasTrailing, className }) {
|
|
683
|
+
const { themeClass } = useTheme();
|
|
684
|
+
return useMemo12(() => {
|
|
685
|
+
const root24 = [themeClass, root9].filter(Boolean).join(" ");
|
|
686
|
+
const labelText2 = [labelText, error && labelTextError].filter(Boolean).join(" ");
|
|
687
|
+
const input6 = [
|
|
688
|
+
input4,
|
|
689
|
+
error && inputError,
|
|
690
|
+
hasStartIcon && inputStartPad,
|
|
691
|
+
hasTrailing && inputTrailingPad,
|
|
692
|
+
className
|
|
693
|
+
].filter(Boolean).join(" ");
|
|
694
|
+
const helpText2 = [helpText, error && helpTextError].filter(Boolean).join(" ");
|
|
695
|
+
return {
|
|
696
|
+
root: root24,
|
|
697
|
+
labelText: labelText2,
|
|
698
|
+
field,
|
|
699
|
+
input: input6,
|
|
700
|
+
helpText: helpText2,
|
|
701
|
+
startIconSlot,
|
|
702
|
+
trailingSlot
|
|
703
|
+
};
|
|
704
|
+
}, [themeClass, error, hasStartIcon, hasTrailing, className]);
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
// src/components/base-field/index.tsx
|
|
708
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
709
|
+
function BaseField({
|
|
710
|
+
label: label7,
|
|
711
|
+
help,
|
|
712
|
+
error,
|
|
713
|
+
startIcon: StartIcon,
|
|
714
|
+
trailing: trailing2,
|
|
715
|
+
id,
|
|
716
|
+
className,
|
|
717
|
+
children
|
|
718
|
+
}) {
|
|
719
|
+
const autoId = useId();
|
|
720
|
+
const controlId = id ?? autoId;
|
|
721
|
+
const helpId = help != null ? `${controlId}-help` : void 0;
|
|
722
|
+
const classes = useStyles11({
|
|
723
|
+
error,
|
|
724
|
+
hasStartIcon: StartIcon != null,
|
|
725
|
+
hasTrailing: trailing2 != null,
|
|
726
|
+
className
|
|
727
|
+
});
|
|
728
|
+
const control = {
|
|
729
|
+
id: controlId,
|
|
730
|
+
className: classes.input,
|
|
731
|
+
"aria-describedby": helpId,
|
|
732
|
+
"aria-invalid": error ? true : void 0
|
|
733
|
+
};
|
|
734
|
+
return /* @__PURE__ */ jsxs9("div", { className: classes.root, children: [
|
|
735
|
+
label7 != null && /* @__PURE__ */ jsx14("label", { htmlFor: controlId, className: classes.labelText, children: label7 }),
|
|
736
|
+
/* @__PURE__ */ jsxs9("div", { className: classes.field, children: [
|
|
737
|
+
StartIcon != null && /* @__PURE__ */ jsx14("span", { className: classes.startIconSlot, children: /* @__PURE__ */ jsx14(StartIcon, { size: 18 }) }),
|
|
738
|
+
children(control),
|
|
739
|
+
trailing2 != null && /* @__PURE__ */ jsx14("span", { className: classes.trailingSlot, children: trailing2 })
|
|
740
|
+
] }),
|
|
741
|
+
help != null && /* @__PURE__ */ jsx14("span", { id: helpId, className: classes.helpText, children: help })
|
|
742
|
+
] });
|
|
743
|
+
}
|
|
744
|
+
|
|
661
745
|
// src/components/text-field/index.tsx
|
|
662
|
-
import {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
746
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
747
|
+
function TextField({
|
|
748
|
+
label: label7,
|
|
749
|
+
help,
|
|
750
|
+
error,
|
|
751
|
+
startIcon,
|
|
752
|
+
multiline,
|
|
753
|
+
rows,
|
|
754
|
+
type = "text",
|
|
755
|
+
onChange,
|
|
756
|
+
className,
|
|
757
|
+
id,
|
|
758
|
+
...rest
|
|
759
|
+
}) {
|
|
760
|
+
return /* @__PURE__ */ jsx15(
|
|
761
|
+
BaseField,
|
|
762
|
+
{
|
|
763
|
+
label: label7,
|
|
764
|
+
help,
|
|
765
|
+
error,
|
|
766
|
+
startIcon,
|
|
767
|
+
id,
|
|
768
|
+
className,
|
|
769
|
+
children: (control) => multiline ? /* @__PURE__ */ jsx15(
|
|
770
|
+
"textarea",
|
|
771
|
+
{
|
|
772
|
+
...rest,
|
|
773
|
+
...control,
|
|
774
|
+
rows: rows ?? 4,
|
|
775
|
+
onChange: (e) => onChange?.(e.target.value)
|
|
776
|
+
}
|
|
777
|
+
) : /* @__PURE__ */ jsx15(
|
|
778
|
+
"input",
|
|
779
|
+
{
|
|
780
|
+
...rest,
|
|
781
|
+
...control,
|
|
782
|
+
type,
|
|
783
|
+
onChange: (e) => onChange?.(e.target.value)
|
|
784
|
+
}
|
|
785
|
+
)
|
|
786
|
+
}
|
|
787
|
+
);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
// src/components/password-field/index.tsx
|
|
791
|
+
import { useState as useState3 } from "react";
|
|
666
792
|
|
|
667
793
|
// src/components/icons/eye/index.tsx
|
|
668
|
-
import { jsx as
|
|
794
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
669
795
|
function EyeIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
670
|
-
return /* @__PURE__ */
|
|
796
|
+
return /* @__PURE__ */ jsxs10(
|
|
671
797
|
"svg",
|
|
672
798
|
{
|
|
673
799
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -682,17 +808,17 @@ function EyeIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
682
808
|
"aria-hidden": "true",
|
|
683
809
|
...rest,
|
|
684
810
|
children: [
|
|
685
|
-
/* @__PURE__ */
|
|
686
|
-
/* @__PURE__ */
|
|
811
|
+
/* @__PURE__ */ jsx16("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
|
|
812
|
+
/* @__PURE__ */ jsx16("circle", { cx: "12", cy: "12", r: "3" })
|
|
687
813
|
]
|
|
688
814
|
}
|
|
689
815
|
);
|
|
690
816
|
}
|
|
691
817
|
|
|
692
818
|
// src/components/icons/eye-off/index.tsx
|
|
693
|
-
import { jsx as
|
|
819
|
+
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
694
820
|
function EyeOffIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
695
|
-
return /* @__PURE__ */
|
|
821
|
+
return /* @__PURE__ */ jsxs11(
|
|
696
822
|
"svg",
|
|
697
823
|
{
|
|
698
824
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -707,136 +833,142 @@ function EyeOffIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
707
833
|
"aria-hidden": "true",
|
|
708
834
|
...rest,
|
|
709
835
|
children: [
|
|
710
|
-
/* @__PURE__ */
|
|
711
|
-
/* @__PURE__ */
|
|
712
|
-
/* @__PURE__ */
|
|
713
|
-
/* @__PURE__ */
|
|
836
|
+
/* @__PURE__ */ jsx17("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }),
|
|
837
|
+
/* @__PURE__ */ jsx17("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }),
|
|
838
|
+
/* @__PURE__ */ jsx17("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }),
|
|
839
|
+
/* @__PURE__ */ jsx17("path", { d: "m2 2 20 20" })
|
|
714
840
|
]
|
|
715
841
|
}
|
|
716
842
|
);
|
|
717
843
|
}
|
|
718
844
|
|
|
719
|
-
// src/components/
|
|
720
|
-
import { useMemo as
|
|
845
|
+
// src/components/password-field/use-styles.ts
|
|
846
|
+
import { useMemo as useMemo13 } from "react";
|
|
721
847
|
|
|
722
|
-
// src/components/
|
|
723
|
-
var
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
var inputRevealPad = "use-styles_inputRevealPad__vat8gv7";
|
|
729
|
-
var inputStartPad = "use-styles_inputStartPad__vat8gv6";
|
|
730
|
-
var labelText = "use-styles_labelText__vat8gv1";
|
|
731
|
-
var labelTextError = "use-styles_labelTextError__vat8gv2";
|
|
732
|
-
var revealButton = "use-styles_revealButton__vat8gvb";
|
|
733
|
-
var root9 = "use-styles_root__vat8gv0";
|
|
734
|
-
var startIcon = "use-styles_startIcon__vat8gva";
|
|
735
|
-
|
|
736
|
-
// src/components/text-field/use-styles.ts
|
|
737
|
-
function useStyles11({ error, hasStartIcon, hasReveal, className }) {
|
|
738
|
-
const { themeClass } = useTheme();
|
|
739
|
-
return useMemo12(() => {
|
|
740
|
-
const root24 = [themeClass, root9].filter(Boolean).join(" ");
|
|
741
|
-
const labelText2 = [labelText, error && labelTextError].filter(Boolean).join(" ");
|
|
742
|
-
const input6 = [
|
|
743
|
-
input4,
|
|
744
|
-
error && inputError,
|
|
745
|
-
hasStartIcon && inputStartPad,
|
|
746
|
-
hasReveal && inputRevealPad,
|
|
747
|
-
className
|
|
748
|
-
].filter(Boolean).join(" ");
|
|
749
|
-
const helpText2 = [helpText, error && helpTextError].filter(Boolean).join(" ");
|
|
750
|
-
return {
|
|
751
|
-
root: root24,
|
|
752
|
-
labelText: labelText2,
|
|
753
|
-
field,
|
|
754
|
-
input: input6,
|
|
755
|
-
helpText: helpText2,
|
|
756
|
-
startIcon,
|
|
757
|
-
revealButton
|
|
758
|
-
};
|
|
759
|
-
}, [themeClass, error, hasStartIcon, hasReveal, className]);
|
|
848
|
+
// src/components/password-field/use-styles.css.ts
|
|
849
|
+
var revealButton = "use-styles_revealButton__rsu9d50";
|
|
850
|
+
|
|
851
|
+
// src/components/password-field/use-styles.ts
|
|
852
|
+
function useStyles12() {
|
|
853
|
+
return useMemo13(() => ({ revealButton }), []);
|
|
760
854
|
}
|
|
761
855
|
|
|
762
|
-
// src/components/
|
|
763
|
-
import { jsx as
|
|
764
|
-
function
|
|
856
|
+
// src/components/password-field/index.tsx
|
|
857
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
858
|
+
function PasswordField({
|
|
765
859
|
label: label7,
|
|
766
860
|
help,
|
|
767
861
|
error,
|
|
768
|
-
startIcon
|
|
769
|
-
multiline,
|
|
770
|
-
rows,
|
|
771
|
-
type = "text",
|
|
862
|
+
startIcon,
|
|
772
863
|
onChange,
|
|
773
|
-
className,
|
|
774
864
|
id,
|
|
865
|
+
className,
|
|
775
866
|
...rest
|
|
776
867
|
}) {
|
|
777
868
|
const [reveal, setReveal] = useState3(false);
|
|
778
|
-
const
|
|
779
|
-
const
|
|
780
|
-
const effectiveType = isPassword ? reveal ? "text" : "password" : type;
|
|
781
|
-
const autoId = useId();
|
|
782
|
-
const controlId = id ?? autoId;
|
|
783
|
-
const classes = useStyles11({
|
|
784
|
-
error,
|
|
785
|
-
hasStartIcon: Boolean(StartIcon),
|
|
786
|
-
hasReveal,
|
|
787
|
-
className
|
|
788
|
-
});
|
|
789
|
-
const handleInputChange = (e) => {
|
|
790
|
-
onChange?.(e.target.value);
|
|
791
|
-
};
|
|
792
|
-
const handleTextareaChange = (e) => {
|
|
869
|
+
const classes = useStyles12();
|
|
870
|
+
const handleChange = (e) => {
|
|
793
871
|
onChange?.(e.target.value);
|
|
794
872
|
};
|
|
795
873
|
const handleToggleMouseDown = (e) => {
|
|
796
874
|
e.preventDefault();
|
|
797
875
|
};
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
876
|
+
const toggleButton = /* @__PURE__ */ jsx18(
|
|
877
|
+
"button",
|
|
878
|
+
{
|
|
879
|
+
type: "button",
|
|
880
|
+
tabIndex: -1,
|
|
881
|
+
className: classes.revealButton,
|
|
882
|
+
"aria-label": reveal ? "Ocultar contrase\xF1a" : "Mostrar contrase\xF1a",
|
|
883
|
+
onMouseDown: handleToggleMouseDown,
|
|
884
|
+
onClick: () => setReveal((r) => !r),
|
|
885
|
+
children: reveal ? /* @__PURE__ */ jsx18(EyeOffIcon, { size: 18 }) : /* @__PURE__ */ jsx18(EyeIcon, { size: 18 })
|
|
886
|
+
}
|
|
887
|
+
);
|
|
888
|
+
return /* @__PURE__ */ jsx18(
|
|
889
|
+
BaseField,
|
|
890
|
+
{
|
|
891
|
+
label: label7,
|
|
892
|
+
help,
|
|
893
|
+
error,
|
|
894
|
+
startIcon,
|
|
895
|
+
trailing: toggleButton,
|
|
896
|
+
id,
|
|
897
|
+
className,
|
|
898
|
+
children: (control) => /* @__PURE__ */ jsx18("input", { ...rest, ...control, type: reveal ? "text" : "password", onChange: handleChange })
|
|
899
|
+
}
|
|
900
|
+
);
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
// src/components/money-field/index.tsx
|
|
904
|
+
import { useMemo as useMemo14, useState as useState4 } from "react";
|
|
905
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
906
|
+
function parseAmount(raw) {
|
|
907
|
+
const cleaned = raw.replace(/[^0-9.-]/g, "");
|
|
908
|
+
if (cleaned === "" || cleaned === "-" || cleaned === ".") return null;
|
|
909
|
+
const n = Number.parseFloat(cleaned);
|
|
910
|
+
return Number.isNaN(n) ? null : n;
|
|
911
|
+
}
|
|
912
|
+
function MoneyField({
|
|
913
|
+
value,
|
|
914
|
+
onChange,
|
|
915
|
+
currency = "USD",
|
|
916
|
+
locale = "en-US",
|
|
917
|
+
label: label7,
|
|
918
|
+
help,
|
|
919
|
+
error,
|
|
920
|
+
startIcon,
|
|
921
|
+
id,
|
|
922
|
+
className,
|
|
923
|
+
onFocus,
|
|
924
|
+
onBlur,
|
|
925
|
+
...rest
|
|
926
|
+
}) {
|
|
927
|
+
const [focused, setFocused] = useState4(false);
|
|
928
|
+
const [draft, setDraft] = useState4("");
|
|
929
|
+
const formatter = useMemo14(
|
|
930
|
+
() => new Intl.NumberFormat(locale, { style: "currency", currency }),
|
|
931
|
+
[locale, currency]
|
|
932
|
+
);
|
|
933
|
+
const displayValue = focused ? draft : value != null ? formatter.format(value) : "";
|
|
934
|
+
const handleFocus = (e) => {
|
|
935
|
+
setDraft(value != null ? String(value) : "");
|
|
936
|
+
setFocused(true);
|
|
937
|
+
onFocus?.(e);
|
|
938
|
+
};
|
|
939
|
+
const handleChange = (e) => setDraft(e.target.value);
|
|
940
|
+
const handleBlur = (e) => {
|
|
941
|
+
setFocused(false);
|
|
942
|
+
onChange?.(parseAmount(draft));
|
|
943
|
+
onBlur?.(e);
|
|
944
|
+
};
|
|
945
|
+
return /* @__PURE__ */ jsx19(
|
|
946
|
+
BaseField,
|
|
947
|
+
{
|
|
948
|
+
label: label7,
|
|
949
|
+
help,
|
|
950
|
+
error,
|
|
951
|
+
startIcon,
|
|
952
|
+
id,
|
|
953
|
+
className,
|
|
954
|
+
children: (control) => /* @__PURE__ */ jsx19(
|
|
812
955
|
"input",
|
|
813
956
|
{
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
hasReveal && /* @__PURE__ */ jsx16(
|
|
822
|
-
"button",
|
|
823
|
-
{
|
|
824
|
-
type: "button",
|
|
825
|
-
tabIndex: -1,
|
|
826
|
-
className: classes.revealButton,
|
|
827
|
-
"aria-label": reveal ? "Ocultar contrase\xF1a" : "Mostrar contrase\xF1a",
|
|
828
|
-
onMouseDown: handleToggleMouseDown,
|
|
829
|
-
onClick: () => setReveal((r) => !r),
|
|
830
|
-
children: reveal ? /* @__PURE__ */ jsx16(EyeOffIcon, { size: 18 }) : /* @__PURE__ */ jsx16(EyeIcon, { size: 18 })
|
|
957
|
+
...rest,
|
|
958
|
+
...control,
|
|
959
|
+
inputMode: "decimal",
|
|
960
|
+
value: displayValue,
|
|
961
|
+
onFocus: handleFocus,
|
|
962
|
+
onChange: handleChange,
|
|
963
|
+
onBlur: handleBlur
|
|
831
964
|
}
|
|
832
965
|
)
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
] });
|
|
966
|
+
}
|
|
967
|
+
);
|
|
836
968
|
}
|
|
837
969
|
|
|
838
970
|
// src/components/icon-button/use-styles.ts
|
|
839
|
-
import { useMemo as
|
|
971
|
+
import { useMemo as useMemo15 } from "react";
|
|
840
972
|
|
|
841
973
|
// src/components/icon-button/use-styles.css.ts
|
|
842
974
|
var accent = "use-styles_accent__18np0q02";
|
|
@@ -844,12 +976,12 @@ var active = "use-styles_active__18np0q01";
|
|
|
844
976
|
var root10 = "use-styles_root__18np0q00";
|
|
845
977
|
|
|
846
978
|
// src/components/icon-button/use-styles.ts
|
|
847
|
-
function
|
|
979
|
+
function useStyles13({
|
|
848
980
|
active: active2 = false,
|
|
849
981
|
tone: tone4 = "ink"
|
|
850
982
|
}) {
|
|
851
983
|
const { themeClass } = useTheme();
|
|
852
|
-
const root24 =
|
|
984
|
+
const root24 = useMemo15(
|
|
853
985
|
() => [themeClass, root10, tone4 === "accent" && accent, active2 && active].filter(Boolean).join(" "),
|
|
854
986
|
[themeClass, active2, tone4]
|
|
855
987
|
);
|
|
@@ -857,14 +989,14 @@ function useStyles12({
|
|
|
857
989
|
}
|
|
858
990
|
|
|
859
991
|
// src/components/icon-button/index.tsx
|
|
860
|
-
import { jsx as
|
|
992
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
861
993
|
function IconButton({ icon: Icon, active: active2, tone: tone4, title, ...rest }) {
|
|
862
|
-
const { root: root24 } =
|
|
863
|
-
return /* @__PURE__ */
|
|
994
|
+
const { root: root24 } = useStyles13({ active: active2, tone: tone4 });
|
|
995
|
+
return /* @__PURE__ */ jsx20("button", { className: root24, "aria-label": title, title, ...rest, children: /* @__PURE__ */ jsx20(Icon, { size: 18 }) });
|
|
864
996
|
}
|
|
865
997
|
|
|
866
998
|
// src/components/card/use-styles.ts
|
|
867
|
-
import { useMemo as
|
|
999
|
+
import { useMemo as useMemo16 } from "react";
|
|
868
1000
|
|
|
869
1001
|
// src/components/card/use-styles.css.ts
|
|
870
1002
|
var body = "use-styles_body__1fuvd022";
|
|
@@ -873,29 +1005,29 @@ var header = "use-styles_header__1fuvd021";
|
|
|
873
1005
|
var root11 = "use-styles_root__1fuvd020";
|
|
874
1006
|
|
|
875
1007
|
// src/components/card/use-styles.ts
|
|
876
|
-
function
|
|
1008
|
+
function useStyles14() {
|
|
877
1009
|
const { themeClass } = useTheme();
|
|
878
|
-
const root24 =
|
|
1010
|
+
const root24 = useMemo16(() => `${themeClass} ${root11}`, [themeClass]);
|
|
879
1011
|
return { root: root24, header, body, footer };
|
|
880
1012
|
}
|
|
881
1013
|
|
|
882
1014
|
// src/components/card/index.tsx
|
|
883
|
-
import { jsx as
|
|
1015
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
884
1016
|
function CardRoot({ children, ...rest }) {
|
|
885
|
-
const { root: root24 } =
|
|
886
|
-
return /* @__PURE__ */
|
|
1017
|
+
const { root: root24 } = useStyles14();
|
|
1018
|
+
return /* @__PURE__ */ jsx21("div", { className: root24, ...rest, children });
|
|
887
1019
|
}
|
|
888
1020
|
function CardHeader({ children, ...rest }) {
|
|
889
|
-
const { header: header3 } =
|
|
890
|
-
return /* @__PURE__ */
|
|
1021
|
+
const { header: header3 } = useStyles14();
|
|
1022
|
+
return /* @__PURE__ */ jsx21("div", { className: header3, ...rest, children });
|
|
891
1023
|
}
|
|
892
1024
|
function CardBody({ children, ...rest }) {
|
|
893
|
-
const { body: body3 } =
|
|
894
|
-
return /* @__PURE__ */
|
|
1025
|
+
const { body: body3 } = useStyles14();
|
|
1026
|
+
return /* @__PURE__ */ jsx21("div", { className: body3, ...rest, children });
|
|
895
1027
|
}
|
|
896
1028
|
function CardFooter({ children, ...rest }) {
|
|
897
|
-
const { footer: footer2 } =
|
|
898
|
-
return /* @__PURE__ */
|
|
1029
|
+
const { footer: footer2 } = useStyles14();
|
|
1030
|
+
return /* @__PURE__ */ jsx21("div", { className: footer2, ...rest, children });
|
|
899
1031
|
}
|
|
900
1032
|
CardRoot.displayName = "Card";
|
|
901
1033
|
CardHeader.displayName = "Card.Header";
|
|
@@ -908,7 +1040,7 @@ var Card = Object.assign(CardRoot, {
|
|
|
908
1040
|
});
|
|
909
1041
|
|
|
910
1042
|
// src/components/icons/circle-check/index.tsx
|
|
911
|
-
import { jsx as
|
|
1043
|
+
import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
912
1044
|
function CircleCheckIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
913
1045
|
return /* @__PURE__ */ jsxs12(
|
|
914
1046
|
"svg",
|
|
@@ -925,15 +1057,15 @@ function CircleCheckIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
925
1057
|
"aria-hidden": "true",
|
|
926
1058
|
...rest,
|
|
927
1059
|
children: [
|
|
928
|
-
/* @__PURE__ */
|
|
929
|
-
/* @__PURE__ */
|
|
1060
|
+
/* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1061
|
+
/* @__PURE__ */ jsx22("path", { d: "m9 12 2 2 4-4" })
|
|
930
1062
|
]
|
|
931
1063
|
}
|
|
932
1064
|
);
|
|
933
1065
|
}
|
|
934
1066
|
|
|
935
1067
|
// src/components/icons/circle-x/index.tsx
|
|
936
|
-
import { jsx as
|
|
1068
|
+
import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
937
1069
|
function CircleXIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
938
1070
|
return /* @__PURE__ */ jsxs13(
|
|
939
1071
|
"svg",
|
|
@@ -950,16 +1082,16 @@ function CircleXIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
950
1082
|
"aria-hidden": "true",
|
|
951
1083
|
...rest,
|
|
952
1084
|
children: [
|
|
953
|
-
/* @__PURE__ */
|
|
954
|
-
/* @__PURE__ */
|
|
955
|
-
/* @__PURE__ */
|
|
1085
|
+
/* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1086
|
+
/* @__PURE__ */ jsx23("path", { d: "m15 9-6 6" }),
|
|
1087
|
+
/* @__PURE__ */ jsx23("path", { d: "m9 9 6 6" })
|
|
956
1088
|
]
|
|
957
1089
|
}
|
|
958
1090
|
);
|
|
959
1091
|
}
|
|
960
1092
|
|
|
961
1093
|
// src/components/icons/info/index.tsx
|
|
962
|
-
import { jsx as
|
|
1094
|
+
import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
963
1095
|
function InfoIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
964
1096
|
return /* @__PURE__ */ jsxs14(
|
|
965
1097
|
"svg",
|
|
@@ -976,16 +1108,16 @@ function InfoIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
976
1108
|
"aria-hidden": "true",
|
|
977
1109
|
...rest,
|
|
978
1110
|
children: [
|
|
979
|
-
/* @__PURE__ */
|
|
980
|
-
/* @__PURE__ */
|
|
981
|
-
/* @__PURE__ */
|
|
1111
|
+
/* @__PURE__ */ jsx24("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1112
|
+
/* @__PURE__ */ jsx24("path", { d: "M12 16v-4" }),
|
|
1113
|
+
/* @__PURE__ */ jsx24("path", { d: "M12 8h.01" })
|
|
982
1114
|
]
|
|
983
1115
|
}
|
|
984
1116
|
);
|
|
985
1117
|
}
|
|
986
1118
|
|
|
987
1119
|
// src/components/icons/triangle-alert/index.tsx
|
|
988
|
-
import { jsx as
|
|
1120
|
+
import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
989
1121
|
function TriangleAlertIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
990
1122
|
return /* @__PURE__ */ jsxs15(
|
|
991
1123
|
"svg",
|
|
@@ -1002,16 +1134,16 @@ function TriangleAlertIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
1002
1134
|
"aria-hidden": "true",
|
|
1003
1135
|
...rest,
|
|
1004
1136
|
children: [
|
|
1005
|
-
/* @__PURE__ */
|
|
1006
|
-
/* @__PURE__ */
|
|
1007
|
-
/* @__PURE__ */
|
|
1137
|
+
/* @__PURE__ */ jsx25("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
|
|
1138
|
+
/* @__PURE__ */ jsx25("path", { d: "M12 9v4" }),
|
|
1139
|
+
/* @__PURE__ */ jsx25("path", { d: "M12 17h.01" })
|
|
1008
1140
|
]
|
|
1009
1141
|
}
|
|
1010
1142
|
);
|
|
1011
1143
|
}
|
|
1012
1144
|
|
|
1013
1145
|
// src/components/alert/use-styles.ts
|
|
1014
|
-
import { useMemo as
|
|
1146
|
+
import { useMemo as useMemo17 } from "react";
|
|
1015
1147
|
|
|
1016
1148
|
// src/components/alert/use-styles.css.ts
|
|
1017
1149
|
var content = "use-styles_content__ivsh6u6";
|
|
@@ -1020,12 +1152,12 @@ var root12 = "use-styles_root__ivsh6u0";
|
|
|
1020
1152
|
var severity = { info: "use-styles_severity_info__ivsh6u1", ok: "use-styles_severity_ok__ivsh6u2", warn: "use-styles_severity_warn__ivsh6u3", danger: "use-styles_severity_danger__ivsh6u4" };
|
|
1021
1153
|
|
|
1022
1154
|
// src/components/alert/use-styles.ts
|
|
1023
|
-
function
|
|
1155
|
+
function useStyles15({
|
|
1024
1156
|
severity: severity2 = "info",
|
|
1025
1157
|
className
|
|
1026
1158
|
}) {
|
|
1027
1159
|
const { themeClass } = useTheme();
|
|
1028
|
-
const root24 =
|
|
1160
|
+
const root24 = useMemo17(
|
|
1029
1161
|
() => [themeClass, root12, severity[severity2], className].filter(Boolean).join(" "),
|
|
1030
1162
|
[themeClass, severity2, className]
|
|
1031
1163
|
);
|
|
@@ -1037,7 +1169,7 @@ function useStyles14({
|
|
|
1037
1169
|
}
|
|
1038
1170
|
|
|
1039
1171
|
// src/components/alert/index.tsx
|
|
1040
|
-
import { jsx as
|
|
1172
|
+
import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1041
1173
|
var defaultIcons = {
|
|
1042
1174
|
info: InfoIcon,
|
|
1043
1175
|
ok: CircleCheckIcon,
|
|
@@ -1052,22 +1184,22 @@ function Alert({
|
|
|
1052
1184
|
children,
|
|
1053
1185
|
...rest
|
|
1054
1186
|
}) {
|
|
1055
|
-
const styles =
|
|
1187
|
+
const styles = useStyles15({ severity: severity2, className });
|
|
1056
1188
|
const IconComponent = icon ?? defaultIcons[severity2];
|
|
1057
1189
|
return /* @__PURE__ */ jsxs16("div", { role: "alert", className: styles.root, ...rest, children: [
|
|
1058
|
-
/* @__PURE__ */
|
|
1190
|
+
/* @__PURE__ */ jsx26("span", { className: styles.iconSlot, children: /* @__PURE__ */ jsx26(IconComponent, {}) }),
|
|
1059
1191
|
/* @__PURE__ */ jsxs16("div", { className: styles.content, children: [
|
|
1060
|
-
title != null && /* @__PURE__ */
|
|
1061
|
-
children != null && /* @__PURE__ */
|
|
1192
|
+
title != null && /* @__PURE__ */ jsx26(Typography, { variant: "h4", children: title }),
|
|
1193
|
+
children != null && /* @__PURE__ */ jsx26(Typography, { variant: "body", color: "fg2", children })
|
|
1062
1194
|
] })
|
|
1063
1195
|
] });
|
|
1064
1196
|
}
|
|
1065
1197
|
|
|
1066
1198
|
// src/components/tooltip/index.tsx
|
|
1067
|
-
import { cloneElement, useId as useId2, useState as
|
|
1199
|
+
import { cloneElement, useId as useId2, useState as useState5 } from "react";
|
|
1068
1200
|
|
|
1069
1201
|
// src/components/tooltip/use-styles.ts
|
|
1070
|
-
import { useMemo as
|
|
1202
|
+
import { useMemo as useMemo18 } from "react";
|
|
1071
1203
|
|
|
1072
1204
|
// src/components/tooltip/use-styles.css.ts
|
|
1073
1205
|
var bubble = "use-styles_bubble__h9kvh1 surfaces_inkySurface__6hs0fg2";
|
|
@@ -1075,15 +1207,15 @@ var placement = { top: "use-styles_placement_top__h9kvh2", bottom: "use-styles_p
|
|
|
1075
1207
|
var wrapper = "use-styles_wrapper__h9kvh0";
|
|
1076
1208
|
|
|
1077
1209
|
// src/components/tooltip/use-styles.ts
|
|
1078
|
-
function
|
|
1210
|
+
function useStyles16({
|
|
1079
1211
|
placement: placement2 = "top"
|
|
1080
1212
|
}) {
|
|
1081
1213
|
const { themeClass } = useTheme();
|
|
1082
|
-
const wrapper4 =
|
|
1214
|
+
const wrapper4 = useMemo18(
|
|
1083
1215
|
() => [themeClass, wrapper].filter(Boolean).join(" "),
|
|
1084
1216
|
[themeClass]
|
|
1085
1217
|
);
|
|
1086
|
-
const bubble2 =
|
|
1218
|
+
const bubble2 = useMemo18(
|
|
1087
1219
|
() => [bubble, placement[placement2]].filter(Boolean).join(" "),
|
|
1088
1220
|
[placement2]
|
|
1089
1221
|
);
|
|
@@ -1091,11 +1223,11 @@ function useStyles15({
|
|
|
1091
1223
|
}
|
|
1092
1224
|
|
|
1093
1225
|
// src/components/tooltip/index.tsx
|
|
1094
|
-
import { jsx as
|
|
1226
|
+
import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1095
1227
|
function Tooltip({ label: label7, children, placement: placement2 }) {
|
|
1096
|
-
const [open, setOpen] =
|
|
1228
|
+
const [open, setOpen] = useState5(false);
|
|
1097
1229
|
const tooltipId = useId2();
|
|
1098
|
-
const { wrapper: wrapper4, bubble: bubble2 } =
|
|
1230
|
+
const { wrapper: wrapper4, bubble: bubble2 } = useStyles16({ placement: placement2 });
|
|
1099
1231
|
const show = () => setOpen(true);
|
|
1100
1232
|
const hide = () => setOpen(false);
|
|
1101
1233
|
const previousDescribedBy = children.props["aria-describedby"];
|
|
@@ -1103,17 +1235,17 @@ function Tooltip({ label: label7, children, placement: placement2 }) {
|
|
|
1103
1235
|
const trigger2 = cloneElement(children, { "aria-describedby": describedBy });
|
|
1104
1236
|
return /* @__PURE__ */ jsxs17("span", { className: wrapper4, onMouseEnter: show, onMouseLeave: hide, onFocus: show, onBlur: hide, children: [
|
|
1105
1237
|
trigger2,
|
|
1106
|
-
open && /* @__PURE__ */
|
|
1238
|
+
open && /* @__PURE__ */ jsx27("span", { id: tooltipId, role: "tooltip", className: bubble2, children: label7 })
|
|
1107
1239
|
] });
|
|
1108
1240
|
}
|
|
1109
1241
|
|
|
1110
1242
|
// src/components/select/index.tsx
|
|
1111
|
-
import { useEffect as useEffect3, useId as useId3, useRef as useRef2, useState as
|
|
1243
|
+
import { useEffect as useEffect3, useId as useId3, useRef as useRef2, useState as useState6 } from "react";
|
|
1112
1244
|
|
|
1113
1245
|
// src/components/icons/chevron-down/index.tsx
|
|
1114
|
-
import { jsx as
|
|
1246
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1115
1247
|
function ChevronDownIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
1116
|
-
return /* @__PURE__ */
|
|
1248
|
+
return /* @__PURE__ */ jsx28(
|
|
1117
1249
|
"svg",
|
|
1118
1250
|
{
|
|
1119
1251
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1127,13 +1259,13 @@ function ChevronDownIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
1127
1259
|
strokeLinejoin: "round",
|
|
1128
1260
|
"aria-hidden": "true",
|
|
1129
1261
|
...rest,
|
|
1130
|
-
children: /* @__PURE__ */
|
|
1262
|
+
children: /* @__PURE__ */ jsx28("path", { d: "m6 9 6 6 6-6" })
|
|
1131
1263
|
}
|
|
1132
1264
|
);
|
|
1133
1265
|
}
|
|
1134
1266
|
|
|
1135
1267
|
// src/components/select/use-styles.ts
|
|
1136
|
-
import { useMemo as
|
|
1268
|
+
import { useMemo as useMemo19 } from "react";
|
|
1137
1269
|
|
|
1138
1270
|
// src/components/select/use-styles.css.ts
|
|
1139
1271
|
var chevron = "use-styles_chevron__1w1czpb4";
|
|
@@ -1148,11 +1280,11 @@ var root13 = "use-styles_root__1w1czpb0";
|
|
|
1148
1280
|
var trigger = "use-styles_trigger__1w1czpb2";
|
|
1149
1281
|
|
|
1150
1282
|
// src/components/select/use-styles.ts
|
|
1151
|
-
function
|
|
1283
|
+
function useStyles17({
|
|
1152
1284
|
open = false
|
|
1153
1285
|
}) {
|
|
1154
1286
|
const { themeClass } = useTheme();
|
|
1155
|
-
return
|
|
1287
|
+
return useMemo19(() => {
|
|
1156
1288
|
const chevron3 = [chevron, open && chevronOpen].filter(Boolean).join(" ");
|
|
1157
1289
|
return {
|
|
1158
1290
|
root: [themeClass, root13].filter(Boolean).join(" "),
|
|
@@ -1167,10 +1299,10 @@ function useStyles16({
|
|
|
1167
1299
|
}
|
|
1168
1300
|
|
|
1169
1301
|
// src/components/select/index.tsx
|
|
1170
|
-
import { jsx as
|
|
1302
|
+
import { jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1171
1303
|
function Select({ options, value, onChange, placeholder: placeholder2, label: label7, disabled: disabled3 }) {
|
|
1172
|
-
const [open, setOpen] =
|
|
1173
|
-
const [activeIndex, setActiveIndex] =
|
|
1304
|
+
const [open, setOpen] = useState6(false);
|
|
1305
|
+
const [activeIndex, setActiveIndex] = useState6(0);
|
|
1174
1306
|
const rootRef = useRef2(null);
|
|
1175
1307
|
const baseId = useId3();
|
|
1176
1308
|
const labelId = `${baseId}-label`;
|
|
@@ -1183,7 +1315,7 @@ function Select({ options, value, onChange, placeholder: placeholder2, label: la
|
|
|
1183
1315
|
chevron: chevron3,
|
|
1184
1316
|
menu: menu2,
|
|
1185
1317
|
optionClass
|
|
1186
|
-
} =
|
|
1318
|
+
} = useStyles17({ open });
|
|
1187
1319
|
useEffect3(() => {
|
|
1188
1320
|
if (!open) return;
|
|
1189
1321
|
const onPointerDown = (event) => {
|
|
@@ -1245,7 +1377,7 @@ function Select({ options, value, onChange, placeholder: placeholder2, label: la
|
|
|
1245
1377
|
}
|
|
1246
1378
|
};
|
|
1247
1379
|
return /* @__PURE__ */ jsxs18("div", { ref: rootRef, className: root24, children: [
|
|
1248
|
-
label7 && /* @__PURE__ */
|
|
1380
|
+
label7 && /* @__PURE__ */ jsx29("span", { id: labelId, className: labelClass, children: label7 }),
|
|
1249
1381
|
/* @__PURE__ */ jsxs18(
|
|
1250
1382
|
"button",
|
|
1251
1383
|
{
|
|
@@ -1266,17 +1398,17 @@ function Select({ options, value, onChange, placeholder: placeholder2, label: la
|
|
|
1266
1398
|
},
|
|
1267
1399
|
onKeyDown: handleKeyDown,
|
|
1268
1400
|
children: [
|
|
1269
|
-
selected3 ? selected3.label : /* @__PURE__ */
|
|
1270
|
-
/* @__PURE__ */
|
|
1401
|
+
selected3 ? selected3.label : /* @__PURE__ */ jsx29("span", { className: placeholderClass, children: placeholder2 }),
|
|
1402
|
+
/* @__PURE__ */ jsx29("span", { className: chevron3, children: /* @__PURE__ */ jsx29(ChevronDownIcon, { size: 18 }) })
|
|
1271
1403
|
]
|
|
1272
1404
|
}
|
|
1273
1405
|
),
|
|
1274
|
-
open && /* @__PURE__ */
|
|
1406
|
+
open && /* @__PURE__ */ jsx29("div", { className: menu2, role: "listbox", children: options.map((option2, index) => {
|
|
1275
1407
|
const isSelected = option2.value === value;
|
|
1276
1408
|
const isActive = index === activeIndex;
|
|
1277
1409
|
return (
|
|
1278
1410
|
// biome-ignore lint/a11y/useKeyWithClickEvents: keyboard nav lives on the trigger via aria-activedescendant; options are not focusable.
|
|
1279
|
-
/* @__PURE__ */
|
|
1411
|
+
/* @__PURE__ */ jsx29(
|
|
1280
1412
|
"div",
|
|
1281
1413
|
{
|
|
1282
1414
|
id: optionId(index),
|
|
@@ -1295,7 +1427,7 @@ function Select({ options, value, onChange, placeholder: placeholder2, label: la
|
|
|
1295
1427
|
}
|
|
1296
1428
|
|
|
1297
1429
|
// src/components/slider/use-styles.ts
|
|
1298
|
-
import { useMemo as
|
|
1430
|
+
import { useMemo as useMemo20 } from "react";
|
|
1299
1431
|
|
|
1300
1432
|
// src/components/slider/use-styles.css.ts
|
|
1301
1433
|
var input5 = "use-styles_input__okw59n3";
|
|
@@ -1307,9 +1439,9 @@ var track3 = "use-styles_track__okw59n1";
|
|
|
1307
1439
|
var wrapper2 = "use-styles_wrapper__okw59n6";
|
|
1308
1440
|
|
|
1309
1441
|
// src/components/slider/use-styles.ts
|
|
1310
|
-
function
|
|
1442
|
+
function useStyles18() {
|
|
1311
1443
|
const { themeClass } = useTheme();
|
|
1312
|
-
return
|
|
1444
|
+
return useMemo20(() => {
|
|
1313
1445
|
const root24 = [themeClass, root14].filter(Boolean).join(" ");
|
|
1314
1446
|
return {
|
|
1315
1447
|
wrapper: wrapper2,
|
|
@@ -1324,7 +1456,7 @@ function useStyles17() {
|
|
|
1324
1456
|
}
|
|
1325
1457
|
|
|
1326
1458
|
// src/components/slider/index.tsx
|
|
1327
|
-
import { jsx as
|
|
1459
|
+
import { jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1328
1460
|
function Slider({
|
|
1329
1461
|
value = 0,
|
|
1330
1462
|
onChange,
|
|
@@ -1334,7 +1466,7 @@ function Slider({
|
|
|
1334
1466
|
disabled: disabled3,
|
|
1335
1467
|
label: label7
|
|
1336
1468
|
}) {
|
|
1337
|
-
const { wrapper: wrapper4, label: labelClass, root: root24, track: track4, range: range2, thumb: thumb2, input: input6 } =
|
|
1469
|
+
const { wrapper: wrapper4, label: labelClass, root: root24, track: track4, range: range2, thumb: thumb2, input: input6 } = useStyles18();
|
|
1338
1470
|
const span = max - min;
|
|
1339
1471
|
const percent = span > 0 ? (value - min) / span * 100 : 0;
|
|
1340
1472
|
const clamped = Math.max(0, Math.min(100, percent));
|
|
@@ -1342,11 +1474,11 @@ function Slider({
|
|
|
1342
1474
|
onChange?.(Number(e.target.value));
|
|
1343
1475
|
};
|
|
1344
1476
|
return /* @__PURE__ */ jsxs19("span", { className: wrapper4, children: [
|
|
1345
|
-
label7 ? /* @__PURE__ */
|
|
1477
|
+
label7 ? /* @__PURE__ */ jsx30("span", { className: labelClass, children: label7 }) : null,
|
|
1346
1478
|
/* @__PURE__ */ jsxs19("span", { className: root24, children: [
|
|
1347
|
-
/* @__PURE__ */
|
|
1348
|
-
/* @__PURE__ */
|
|
1349
|
-
/* @__PURE__ */
|
|
1479
|
+
/* @__PURE__ */ jsx30("span", { className: track4 }),
|
|
1480
|
+
/* @__PURE__ */ jsx30("span", { className: range2, style: { width: `${clamped}%` } }),
|
|
1481
|
+
/* @__PURE__ */ jsx30(
|
|
1350
1482
|
"input",
|
|
1351
1483
|
{
|
|
1352
1484
|
className: input6,
|
|
@@ -1359,16 +1491,16 @@ function Slider({
|
|
|
1359
1491
|
onChange: handleChange
|
|
1360
1492
|
}
|
|
1361
1493
|
),
|
|
1362
|
-
/* @__PURE__ */
|
|
1494
|
+
/* @__PURE__ */ jsx30("span", { className: thumb2, style: { left: `${clamped}%` } })
|
|
1363
1495
|
] })
|
|
1364
1496
|
] });
|
|
1365
1497
|
}
|
|
1366
1498
|
|
|
1367
1499
|
// src/components/accordion/index.tsx
|
|
1368
|
-
import { useState as
|
|
1500
|
+
import { useState as useState7 } from "react";
|
|
1369
1501
|
|
|
1370
1502
|
// src/components/accordion/use-styles.ts
|
|
1371
|
-
import { useMemo as
|
|
1503
|
+
import { useMemo as useMemo21 } from "react";
|
|
1372
1504
|
|
|
1373
1505
|
// src/components/accordion/use-styles.css.ts
|
|
1374
1506
|
var chevron2 = "use-styles_chevron__1cjrdh93";
|
|
@@ -1379,9 +1511,9 @@ var panel = "use-styles_panel__1cjrdh95";
|
|
|
1379
1511
|
var root15 = "use-styles_root__1cjrdh90";
|
|
1380
1512
|
|
|
1381
1513
|
// src/components/accordion/use-styles.ts
|
|
1382
|
-
function
|
|
1514
|
+
function useStyles19({ className }) {
|
|
1383
1515
|
const { themeClass } = useTheme();
|
|
1384
|
-
return
|
|
1516
|
+
return useMemo21(
|
|
1385
1517
|
() => ({
|
|
1386
1518
|
root: [themeClass, root15, className].filter(Boolean).join(" "),
|
|
1387
1519
|
item,
|
|
@@ -1394,15 +1526,15 @@ function useStyles18({ className }) {
|
|
|
1394
1526
|
}
|
|
1395
1527
|
|
|
1396
1528
|
// src/components/accordion/index.tsx
|
|
1397
|
-
import { jsx as
|
|
1529
|
+
import { jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1398
1530
|
function Accordion({
|
|
1399
1531
|
items,
|
|
1400
1532
|
multiple = false,
|
|
1401
1533
|
defaultOpen = [],
|
|
1402
1534
|
className
|
|
1403
1535
|
}) {
|
|
1404
|
-
const [open, setOpen] =
|
|
1405
|
-
const { root: root24, item: item3, header: header3, chevronFor, panel: panel2 } =
|
|
1536
|
+
const [open, setOpen] = useState7(defaultOpen);
|
|
1537
|
+
const { root: root24, item: item3, header: header3, chevronFor, panel: panel2 } = useStyles19({ className });
|
|
1406
1538
|
const toggle = (id) => {
|
|
1407
1539
|
setOpen((current2) => {
|
|
1408
1540
|
const isOpen = current2.includes(id);
|
|
@@ -1410,7 +1542,7 @@ function Accordion({
|
|
|
1410
1542
|
return multiple ? [...current2, id] : [id];
|
|
1411
1543
|
});
|
|
1412
1544
|
};
|
|
1413
|
-
return /* @__PURE__ */
|
|
1545
|
+
return /* @__PURE__ */ jsx31("div", { className: root24, children: items.map((it) => {
|
|
1414
1546
|
const isOpen = open.includes(it.id);
|
|
1415
1547
|
const panelId = `accordion-panel-${it.id}`;
|
|
1416
1548
|
const headerId = `accordion-header-${it.id}`;
|
|
@@ -1426,11 +1558,11 @@ function Accordion({
|
|
|
1426
1558
|
onClick: () => toggle(it.id),
|
|
1427
1559
|
children: [
|
|
1428
1560
|
it.title,
|
|
1429
|
-
/* @__PURE__ */
|
|
1561
|
+
/* @__PURE__ */ jsx31(ChevronDownIcon, { className: chevronFor(isOpen) })
|
|
1430
1562
|
]
|
|
1431
1563
|
}
|
|
1432
1564
|
),
|
|
1433
|
-
isOpen && /* @__PURE__ */
|
|
1565
|
+
isOpen && /* @__PURE__ */ jsx31("div", { id: panelId, className: panel2, role: "region", "aria-labelledby": headerId, children: it.content })
|
|
1434
1566
|
] }, it.id);
|
|
1435
1567
|
}) });
|
|
1436
1568
|
}
|
|
@@ -1439,9 +1571,9 @@ function Accordion({
|
|
|
1439
1571
|
import { Fragment } from "react";
|
|
1440
1572
|
|
|
1441
1573
|
// src/components/icons/chevron-right/index.tsx
|
|
1442
|
-
import { jsx as
|
|
1574
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1443
1575
|
function ChevronRightIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
1444
|
-
return /* @__PURE__ */
|
|
1576
|
+
return /* @__PURE__ */ jsx32(
|
|
1445
1577
|
"svg",
|
|
1446
1578
|
{
|
|
1447
1579
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1455,13 +1587,13 @@ function ChevronRightIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
1455
1587
|
strokeLinejoin: "round",
|
|
1456
1588
|
"aria-hidden": "true",
|
|
1457
1589
|
...rest,
|
|
1458
|
-
children: /* @__PURE__ */
|
|
1590
|
+
children: /* @__PURE__ */ jsx32("path", { d: "m9 18 6-6-6-6" })
|
|
1459
1591
|
}
|
|
1460
1592
|
);
|
|
1461
1593
|
}
|
|
1462
1594
|
|
|
1463
1595
|
// src/components/breadcrumbs/use-styles.ts
|
|
1464
|
-
import { useMemo as
|
|
1596
|
+
import { useMemo as useMemo22 } from "react";
|
|
1465
1597
|
|
|
1466
1598
|
// src/components/breadcrumbs/use-styles.css.ts
|
|
1467
1599
|
var crumb = "use-styles_crumb__7u0du61";
|
|
@@ -1470,9 +1602,9 @@ var root16 = "use-styles_root__7u0du60";
|
|
|
1470
1602
|
var separator = "use-styles_separator__7u0du63";
|
|
1471
1603
|
|
|
1472
1604
|
// src/components/breadcrumbs/use-styles.ts
|
|
1473
|
-
function
|
|
1605
|
+
function useStyles20({ className }) {
|
|
1474
1606
|
const { themeClass } = useTheme();
|
|
1475
|
-
const root24 =
|
|
1607
|
+
const root24 = useMemo22(
|
|
1476
1608
|
() => [themeClass, root16, className].filter(Boolean).join(" "),
|
|
1477
1609
|
[themeClass, className]
|
|
1478
1610
|
);
|
|
@@ -1480,23 +1612,23 @@ function useStyles19({ className }) {
|
|
|
1480
1612
|
}
|
|
1481
1613
|
|
|
1482
1614
|
// src/components/breadcrumbs/index.tsx
|
|
1483
|
-
import { jsx as
|
|
1615
|
+
import { jsx as jsx33, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1484
1616
|
function Breadcrumbs({ items, className, ...rest }) {
|
|
1485
|
-
const { root: root24, crumb: crumb2, current: current2, separator: separator2 } =
|
|
1486
|
-
return /* @__PURE__ */
|
|
1617
|
+
const { root: root24, crumb: crumb2, current: current2, separator: separator2 } = useStyles20({ className });
|
|
1618
|
+
return /* @__PURE__ */ jsx33("nav", { "aria-label": "Breadcrumb", className: root24, ...rest, children: items.map((item3, index) => {
|
|
1487
1619
|
const isLast = index === items.length - 1;
|
|
1488
1620
|
const key = index;
|
|
1489
1621
|
return /* @__PURE__ */ jsxs21(Fragment, { children: [
|
|
1490
|
-
isLast ? /* @__PURE__ */
|
|
1491
|
-
!isLast && /* @__PURE__ */
|
|
1622
|
+
isLast ? /* @__PURE__ */ jsx33("span", { className: current2, "aria-current": "page", children: item3.label }) : item3.href ? /* @__PURE__ */ jsx33("a", { className: crumb2, href: item3.href, children: item3.label }) : /* @__PURE__ */ jsx33("span", { className: crumb2, children: item3.label }),
|
|
1623
|
+
!isLast && /* @__PURE__ */ jsx33("span", { className: separator2, children: /* @__PURE__ */ jsx33(ChevronRightIcon, { size: 14 }) })
|
|
1492
1624
|
] }, key);
|
|
1493
1625
|
}) });
|
|
1494
1626
|
}
|
|
1495
1627
|
|
|
1496
1628
|
// src/components/icons/chevron-left/index.tsx
|
|
1497
|
-
import { jsx as
|
|
1629
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1498
1630
|
function ChevronLeftIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
1499
|
-
return /* @__PURE__ */
|
|
1631
|
+
return /* @__PURE__ */ jsx34(
|
|
1500
1632
|
"svg",
|
|
1501
1633
|
{
|
|
1502
1634
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1510,13 +1642,13 @@ function ChevronLeftIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
1510
1642
|
strokeLinejoin: "round",
|
|
1511
1643
|
"aria-hidden": "true",
|
|
1512
1644
|
...rest,
|
|
1513
|
-
children: /* @__PURE__ */
|
|
1645
|
+
children: /* @__PURE__ */ jsx34("path", { d: "m15 18-6-6 6-6" })
|
|
1514
1646
|
}
|
|
1515
1647
|
);
|
|
1516
1648
|
}
|
|
1517
1649
|
|
|
1518
1650
|
// src/components/pagination/use-styles.ts
|
|
1519
|
-
import { useMemo as
|
|
1651
|
+
import { useMemo as useMemo23 } from "react";
|
|
1520
1652
|
|
|
1521
1653
|
// src/components/pagination/use-styles.css.ts
|
|
1522
1654
|
var ellipsis = "use-styles_ellipsis__1azgzoh3";
|
|
@@ -1526,9 +1658,9 @@ var pageBtn = "use-styles_pageBtn__1azgzoh1";
|
|
|
1526
1658
|
var root17 = "use-styles_root__1azgzoh0";
|
|
1527
1659
|
|
|
1528
1660
|
// src/components/pagination/use-styles.ts
|
|
1529
|
-
function
|
|
1661
|
+
function useStyles21() {
|
|
1530
1662
|
const { themeClass } = useTheme();
|
|
1531
|
-
return
|
|
1663
|
+
return useMemo23(
|
|
1532
1664
|
() => ({
|
|
1533
1665
|
root: [themeClass, root17].filter(Boolean).join(" "),
|
|
1534
1666
|
pageBtnFor: (active2) => [pageBtn, active2 && pageActive].filter(Boolean).join(" "),
|
|
@@ -1540,7 +1672,7 @@ function useStyles20() {
|
|
|
1540
1672
|
}
|
|
1541
1673
|
|
|
1542
1674
|
// src/components/pagination/index.tsx
|
|
1543
|
-
import { jsx as
|
|
1675
|
+
import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1544
1676
|
function buildItems(count, page, siblingCount) {
|
|
1545
1677
|
const total = Math.max(1, count);
|
|
1546
1678
|
const first = 1;
|
|
@@ -1555,13 +1687,13 @@ function buildItems(count, page, siblingCount) {
|
|
|
1555
1687
|
return items;
|
|
1556
1688
|
}
|
|
1557
1689
|
function Pagination({ count, page = 1, onChange, siblingCount = 1 }) {
|
|
1558
|
-
const { root: root24, pageBtnFor, ellipsis: ellipsis2, nav: nav2 } =
|
|
1690
|
+
const { root: root24, pageBtnFor, ellipsis: ellipsis2, nav: nav2 } = useStyles21();
|
|
1559
1691
|
const total = Math.max(1, count);
|
|
1560
1692
|
const current2 = Math.min(Math.max(1, page), total);
|
|
1561
1693
|
const items = buildItems(total, current2, siblingCount);
|
|
1562
1694
|
const go = (n) => onChange?.(Math.min(Math.max(1, n), total));
|
|
1563
1695
|
return /* @__PURE__ */ jsxs22("nav", { className: root24, "aria-label": "Pagination", children: [
|
|
1564
|
-
/* @__PURE__ */
|
|
1696
|
+
/* @__PURE__ */ jsx35(
|
|
1565
1697
|
"button",
|
|
1566
1698
|
{
|
|
1567
1699
|
type: "button",
|
|
@@ -1569,14 +1701,14 @@ function Pagination({ count, page = 1, onChange, siblingCount = 1 }) {
|
|
|
1569
1701
|
"aria-label": "Previous page",
|
|
1570
1702
|
disabled: current2 <= 1,
|
|
1571
1703
|
onClick: () => go(current2 - 1),
|
|
1572
|
-
children: /* @__PURE__ */
|
|
1704
|
+
children: /* @__PURE__ */ jsx35(ChevronLeftIcon, { size: 18 })
|
|
1573
1705
|
}
|
|
1574
1706
|
),
|
|
1575
1707
|
items.map(
|
|
1576
1708
|
(item3, index) => item3 === "ellipsis" ? (
|
|
1577
1709
|
// biome-ignore lint/suspicious/noArrayIndexKey: ellipsis position is stable per render
|
|
1578
|
-
/* @__PURE__ */
|
|
1579
|
-
) : /* @__PURE__ */
|
|
1710
|
+
/* @__PURE__ */ jsx35("span", { className: ellipsis2, children: "\u2026" }, `ellipsis-${index}`)
|
|
1711
|
+
) : /* @__PURE__ */ jsx35(
|
|
1580
1712
|
"button",
|
|
1581
1713
|
{
|
|
1582
1714
|
type: "button",
|
|
@@ -1588,7 +1720,7 @@ function Pagination({ count, page = 1, onChange, siblingCount = 1 }) {
|
|
|
1588
1720
|
item3
|
|
1589
1721
|
)
|
|
1590
1722
|
),
|
|
1591
|
-
/* @__PURE__ */
|
|
1723
|
+
/* @__PURE__ */ jsx35(
|
|
1592
1724
|
"button",
|
|
1593
1725
|
{
|
|
1594
1726
|
type: "button",
|
|
@@ -1596,7 +1728,7 @@ function Pagination({ count, page = 1, onChange, siblingCount = 1 }) {
|
|
|
1596
1728
|
"aria-label": "Next page",
|
|
1597
1729
|
disabled: current2 >= total,
|
|
1598
1730
|
onClick: () => go(current2 + 1),
|
|
1599
|
-
children: /* @__PURE__ */
|
|
1731
|
+
children: /* @__PURE__ */ jsx35(ChevronRightIcon, { size: 18 })
|
|
1600
1732
|
}
|
|
1601
1733
|
)
|
|
1602
1734
|
] });
|
|
@@ -1606,7 +1738,7 @@ function Pagination({ count, page = 1, onChange, siblingCount = 1 }) {
|
|
|
1606
1738
|
import { Fragment as Fragment2 } from "react";
|
|
1607
1739
|
|
|
1608
1740
|
// src/components/stepper/use-styles.ts
|
|
1609
|
-
import { useMemo as
|
|
1741
|
+
import { useMemo as useMemo24 } from "react";
|
|
1610
1742
|
|
|
1611
1743
|
// src/components/stepper/use-styles.css.ts
|
|
1612
1744
|
var connector = "use-styles_connector__79pt4e7";
|
|
@@ -1619,9 +1751,9 @@ var root18 = "use-styles_root__79pt4e0";
|
|
|
1619
1751
|
var step = "use-styles_step__79pt4e1";
|
|
1620
1752
|
|
|
1621
1753
|
// src/components/stepper/use-styles.ts
|
|
1622
|
-
function
|
|
1754
|
+
function useStyles22({ className }) {
|
|
1623
1755
|
const { themeClass } = useTheme();
|
|
1624
|
-
return
|
|
1756
|
+
return useMemo24(() => {
|
|
1625
1757
|
const root24 = [themeClass, root18, className].filter(Boolean).join(" ");
|
|
1626
1758
|
const markerFor = (state) => [
|
|
1627
1759
|
marker,
|
|
@@ -1634,27 +1766,27 @@ function useStyles21({ className }) {
|
|
|
1634
1766
|
}
|
|
1635
1767
|
|
|
1636
1768
|
// src/components/stepper/index.tsx
|
|
1637
|
-
import { jsx as
|
|
1769
|
+
import { jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1638
1770
|
function Stepper({ steps, active: active2 = 0, className, ...rest }) {
|
|
1639
|
-
const { root: root24, step: step2, connector: connector2, markerFor, labelFor } =
|
|
1640
|
-
return /* @__PURE__ */
|
|
1771
|
+
const { root: root24, step: step2, connector: connector2, markerFor, labelFor } = useStyles22({ className });
|
|
1772
|
+
return /* @__PURE__ */ jsx36("div", { className: root24, ...rest, children: steps.map((s, index) => {
|
|
1641
1773
|
const state = index < active2 ? "done" : index === active2 ? "active" : "upcoming";
|
|
1642
1774
|
const isActive = state === "active";
|
|
1643
1775
|
return (
|
|
1644
1776
|
// biome-ignore lint/suspicious/noArrayIndexKey: steps are a static, ordered list with no stable id.
|
|
1645
1777
|
/* @__PURE__ */ jsxs23(Fragment2, { children: [
|
|
1646
1778
|
/* @__PURE__ */ jsxs23("div", { className: step2, "aria-current": isActive ? "step" : void 0, children: [
|
|
1647
|
-
/* @__PURE__ */
|
|
1648
|
-
/* @__PURE__ */
|
|
1779
|
+
/* @__PURE__ */ jsx36("span", { className: markerFor(state), children: state === "done" ? /* @__PURE__ */ jsx36(CheckIcon, { size: 14 }) : index + 1 }),
|
|
1780
|
+
/* @__PURE__ */ jsx36("span", { className: labelFor(isActive), children: s.label })
|
|
1649
1781
|
] }),
|
|
1650
|
-
index < steps.length - 1 && /* @__PURE__ */
|
|
1782
|
+
index < steps.length - 1 && /* @__PURE__ */ jsx36("span", { "data-part": "connector", className: connector2 })
|
|
1651
1783
|
] }, index)
|
|
1652
1784
|
);
|
|
1653
1785
|
}) });
|
|
1654
1786
|
}
|
|
1655
1787
|
|
|
1656
1788
|
// src/components/tabs/use-styles.ts
|
|
1657
|
-
import { useMemo as
|
|
1789
|
+
import { useMemo as useMemo25 } from "react";
|
|
1658
1790
|
|
|
1659
1791
|
// src/components/tabs/use-styles.css.ts
|
|
1660
1792
|
var root19 = "use-styles_root__1l4m7t40";
|
|
@@ -1662,9 +1794,9 @@ var tab = "use-styles_tab__1l4m7t41";
|
|
|
1662
1794
|
var tabActive = "use-styles_tabActive__1l4m7t42";
|
|
1663
1795
|
|
|
1664
1796
|
// src/components/tabs/use-styles.ts
|
|
1665
|
-
function
|
|
1797
|
+
function useStyles23() {
|
|
1666
1798
|
const { themeClass } = useTheme();
|
|
1667
|
-
return
|
|
1799
|
+
return useMemo25(() => {
|
|
1668
1800
|
const root24 = [themeClass, root19].filter(Boolean).join(" ");
|
|
1669
1801
|
const tabClass = (active2) => [tab, active2 && tabActive].filter(Boolean).join(" ");
|
|
1670
1802
|
return { root: root24, tab, tabClass };
|
|
@@ -1672,12 +1804,12 @@ function useStyles22() {
|
|
|
1672
1804
|
}
|
|
1673
1805
|
|
|
1674
1806
|
// src/components/tabs/index.tsx
|
|
1675
|
-
import { jsx as
|
|
1807
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1676
1808
|
function Tabs({ items, value, onChange }) {
|
|
1677
|
-
const { root: root24, tabClass } =
|
|
1678
|
-
return /* @__PURE__ */
|
|
1809
|
+
const { root: root24, tabClass } = useStyles23();
|
|
1810
|
+
return /* @__PURE__ */ jsx37("div", { role: "tablist", className: root24, children: items.map((item3) => {
|
|
1679
1811
|
const active2 = item3.value === value;
|
|
1680
|
-
return /* @__PURE__ */
|
|
1812
|
+
return /* @__PURE__ */ jsx37(
|
|
1681
1813
|
"button",
|
|
1682
1814
|
{
|
|
1683
1815
|
type: "button",
|
|
@@ -1697,11 +1829,11 @@ import {
|
|
|
1697
1829
|
cloneElement as cloneElement2,
|
|
1698
1830
|
useEffect as useEffect4,
|
|
1699
1831
|
useRef as useRef3,
|
|
1700
|
-
useState as
|
|
1832
|
+
useState as useState8
|
|
1701
1833
|
} from "react";
|
|
1702
1834
|
|
|
1703
1835
|
// src/components/menu/use-styles.ts
|
|
1704
|
-
import { useMemo as
|
|
1836
|
+
import { useMemo as useMemo26 } from "react";
|
|
1705
1837
|
|
|
1706
1838
|
// src/components/menu/use-styles.css.ts
|
|
1707
1839
|
var danger = "use-styles_danger__1uyxaj3";
|
|
@@ -1710,9 +1842,9 @@ var list = "use-styles_list__1uyxaj1 surfaces_panelSurface__6hs0fg1";
|
|
|
1710
1842
|
var wrapper3 = "use-styles_wrapper__1uyxaj0";
|
|
1711
1843
|
|
|
1712
1844
|
// src/components/menu/use-styles.ts
|
|
1713
|
-
function
|
|
1845
|
+
function useStyles24() {
|
|
1714
1846
|
const { themeClass } = useTheme();
|
|
1715
|
-
return
|
|
1847
|
+
return useMemo26(
|
|
1716
1848
|
() => ({
|
|
1717
1849
|
wrapper: [themeClass, wrapper3].filter(Boolean).join(" "),
|
|
1718
1850
|
list,
|
|
@@ -1724,14 +1856,14 @@ function useStyles23() {
|
|
|
1724
1856
|
}
|
|
1725
1857
|
|
|
1726
1858
|
// src/components/menu/index.tsx
|
|
1727
|
-
import { jsx as
|
|
1859
|
+
import { jsx as jsx38, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1728
1860
|
function assignRef(ref, value) {
|
|
1729
1861
|
if (typeof ref === "function") ref(value);
|
|
1730
1862
|
else if (ref) ref.current = value;
|
|
1731
1863
|
}
|
|
1732
1864
|
function Menu({ trigger: trigger2, items }) {
|
|
1733
|
-
const { wrapper: wrapper4, list: list2, item: item3, dangerItem } =
|
|
1734
|
-
const [open, setOpen] =
|
|
1865
|
+
const { wrapper: wrapper4, list: list2, item: item3, dangerItem } = useStyles24();
|
|
1866
|
+
const [open, setOpen] = useState8(false);
|
|
1735
1867
|
const rootRef = useRef3(null);
|
|
1736
1868
|
const listRef = useRef3(null);
|
|
1737
1869
|
const triggerRef = useRef3(null);
|
|
@@ -1813,7 +1945,7 @@ function Menu({ trigger: trigger2, items }) {
|
|
|
1813
1945
|
});
|
|
1814
1946
|
return /* @__PURE__ */ jsxs24("div", { ref: rootRef, className: wrapper4, children: [
|
|
1815
1947
|
clonedTrigger,
|
|
1816
|
-
open && /* @__PURE__ */
|
|
1948
|
+
open && /* @__PURE__ */ jsx38("div", { ref: listRef, role: "menu", className: list2, onKeyDown: onMenuKeyDown, children: items.map((entry, index) => /* @__PURE__ */ jsx38(
|
|
1817
1949
|
"button",
|
|
1818
1950
|
{
|
|
1819
1951
|
type: "button",
|
|
@@ -1840,7 +1972,7 @@ import {
|
|
|
1840
1972
|
import { createPortal } from "react-dom";
|
|
1841
1973
|
|
|
1842
1974
|
// src/components/dialog/use-styles.ts
|
|
1843
|
-
import { useMemo as
|
|
1975
|
+
import { useMemo as useMemo27 } from "react";
|
|
1844
1976
|
|
|
1845
1977
|
// src/components/dialog/use-styles.css.ts
|
|
1846
1978
|
var actions = "use-styles_actions__5tstu83";
|
|
@@ -1849,9 +1981,9 @@ var overlay = "use-styles_overlay__5tstu80";
|
|
|
1849
1981
|
var surface = "use-styles_surface__5tstu81";
|
|
1850
1982
|
|
|
1851
1983
|
// src/components/dialog/use-styles.ts
|
|
1852
|
-
function
|
|
1984
|
+
function useStyles25() {
|
|
1853
1985
|
const { themeClass } = useTheme();
|
|
1854
|
-
return
|
|
1986
|
+
return useMemo27(
|
|
1855
1987
|
() => ({
|
|
1856
1988
|
overlay: [themeClass, overlay].filter(Boolean).join(" "),
|
|
1857
1989
|
surface,
|
|
@@ -1863,10 +1995,10 @@ function useStyles24() {
|
|
|
1863
1995
|
}
|
|
1864
1996
|
|
|
1865
1997
|
// src/components/dialog/index.tsx
|
|
1866
|
-
import { jsx as
|
|
1998
|
+
import { jsx as jsx39, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1867
1999
|
var FOCUSABLE = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
1868
2000
|
function Dialog({ open, onClose, title, actions: actions3, children }) {
|
|
1869
|
-
const { overlay: overlay2, surface: surface2, body: body3, actions: actionsClass } =
|
|
2001
|
+
const { overlay: overlay2, surface: surface2, body: body3, actions: actionsClass } = useStyles25();
|
|
1870
2002
|
const surfaceRef = useRef4(null);
|
|
1871
2003
|
const previouslyFocused = useRef4(null);
|
|
1872
2004
|
const generatedId = useId4();
|
|
@@ -1923,7 +2055,7 @@ function Dialog({ open, onClose, title, actions: actions3, children }) {
|
|
|
1923
2055
|
};
|
|
1924
2056
|
return createPortal(
|
|
1925
2057
|
// biome-ignore lint/a11y/useKeyWithClickEvents: ESC handled by a document keydown listener.
|
|
1926
|
-
/* @__PURE__ */
|
|
2058
|
+
/* @__PURE__ */ jsx39("div", { className: overlay2, "data-testid": "dialog-overlay", onClick: onClose, children: /* @__PURE__ */ jsxs25(
|
|
1927
2059
|
"div",
|
|
1928
2060
|
{
|
|
1929
2061
|
ref: surfaceRef,
|
|
@@ -1935,9 +2067,9 @@ function Dialog({ open, onClose, title, actions: actions3, children }) {
|
|
|
1935
2067
|
onClick: stop,
|
|
1936
2068
|
onKeyDown: onSurfaceKeyDown,
|
|
1937
2069
|
children: [
|
|
1938
|
-
title != null && /* @__PURE__ */
|
|
1939
|
-
children != null && /* @__PURE__ */
|
|
1940
|
-
actions3 != null && /* @__PURE__ */
|
|
2070
|
+
title != null && /* @__PURE__ */ jsx39(Typography, { variant: "h3", as: "h2", id: titleId, children: title }),
|
|
2071
|
+
children != null && /* @__PURE__ */ jsx39("div", { className: body3, children: /* @__PURE__ */ jsx39(Typography, { variant: "body", color: "fg2", children }) }),
|
|
2072
|
+
actions3 != null && /* @__PURE__ */ jsx39("div", { className: actionsClass, children: actions3 })
|
|
1941
2073
|
]
|
|
1942
2074
|
}
|
|
1943
2075
|
) }),
|
|
@@ -1949,7 +2081,7 @@ function Dialog({ open, onClose, title, actions: actions3, children }) {
|
|
|
1949
2081
|
import { createPortal as createPortal2 } from "react-dom";
|
|
1950
2082
|
|
|
1951
2083
|
// src/components/snackbar/use-styles.ts
|
|
1952
|
-
import { useMemo as
|
|
2084
|
+
import { useMemo as useMemo28 } from "react";
|
|
1953
2085
|
|
|
1954
2086
|
// src/components/snackbar/use-styles.css.ts
|
|
1955
2087
|
var closeBtn = "use-styles_closeBtn__ihzsep2";
|
|
@@ -1957,9 +2089,9 @@ var message = "use-styles_message__ihzsep1";
|
|
|
1957
2089
|
var root20 = "use-styles_root__ihzsep0 surfaces_inkySurface__6hs0fg2";
|
|
1958
2090
|
|
|
1959
2091
|
// src/components/snackbar/use-styles.ts
|
|
1960
|
-
function
|
|
2092
|
+
function useStyles26() {
|
|
1961
2093
|
const { themeClass } = useTheme();
|
|
1962
|
-
return
|
|
2094
|
+
return useMemo28(
|
|
1963
2095
|
() => ({
|
|
1964
2096
|
root: [themeClass, root20].filter(Boolean).join(" "),
|
|
1965
2097
|
message,
|
|
@@ -1970,22 +2102,22 @@ function useStyles25() {
|
|
|
1970
2102
|
}
|
|
1971
2103
|
|
|
1972
2104
|
// src/components/snackbar/index.tsx
|
|
1973
|
-
import { jsx as
|
|
2105
|
+
import { jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1974
2106
|
function Snackbar({ open, message: message2, action, onClose }) {
|
|
1975
|
-
const { root: root24, message: messageClass, closeBtn: closeBtn2 } =
|
|
2107
|
+
const { root: root24, message: messageClass, closeBtn: closeBtn2 } = useStyles26();
|
|
1976
2108
|
if (!open || typeof document === "undefined") return null;
|
|
1977
2109
|
return createPortal2(
|
|
1978
2110
|
/* @__PURE__ */ jsxs26("div", { role: "status", className: root24, children: [
|
|
1979
|
-
/* @__PURE__ */
|
|
2111
|
+
/* @__PURE__ */ jsx40("span", { className: messageClass, children: message2 }),
|
|
1980
2112
|
action,
|
|
1981
|
-
onClose && /* @__PURE__ */
|
|
2113
|
+
onClose && /* @__PURE__ */ jsx40("button", { type: "button", "aria-label": "Close", className: closeBtn2, onClick: onClose, children: /* @__PURE__ */ jsx40(XIcon, { size: 18 }) })
|
|
1982
2114
|
] }),
|
|
1983
2115
|
document.body
|
|
1984
2116
|
);
|
|
1985
2117
|
}
|
|
1986
2118
|
|
|
1987
2119
|
// src/components/table/use-styles.ts
|
|
1988
|
-
import { useMemo as
|
|
2120
|
+
import { useMemo as useMemo29 } from "react";
|
|
1989
2121
|
|
|
1990
2122
|
// src/components/table/use-styles.css.ts
|
|
1991
2123
|
var alignRight = "use-styles_alignRight__1n2cz6i3";
|
|
@@ -1994,9 +2126,9 @@ var td = "use-styles_td__1n2cz6i2";
|
|
|
1994
2126
|
var th = "use-styles_th__1n2cz6i1";
|
|
1995
2127
|
|
|
1996
2128
|
// src/components/table/use-styles.ts
|
|
1997
|
-
function
|
|
2129
|
+
function useStyles27({ className }) {
|
|
1998
2130
|
const { themeClass } = useTheme();
|
|
1999
|
-
const root24 =
|
|
2131
|
+
const root24 = useMemo29(
|
|
2000
2132
|
() => [themeClass, root21, className].filter(Boolean).join(" "),
|
|
2001
2133
|
[themeClass, className]
|
|
2002
2134
|
);
|
|
@@ -2004,7 +2136,7 @@ function useStyles26({ className }) {
|
|
|
2004
2136
|
}
|
|
2005
2137
|
|
|
2006
2138
|
// src/components/table/index.tsx
|
|
2007
|
-
import { jsx as
|
|
2139
|
+
import { jsx as jsx41, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2008
2140
|
function Table({
|
|
2009
2141
|
columns,
|
|
2010
2142
|
rows,
|
|
@@ -2012,17 +2144,17 @@ function Table({
|
|
|
2012
2144
|
className,
|
|
2013
2145
|
...rest
|
|
2014
2146
|
}) {
|
|
2015
|
-
const { root: root24, th: th2, td: td2, alignRight: alignRight2 } =
|
|
2147
|
+
const { root: root24, th: th2, td: td2, alignRight: alignRight2 } = useStyles27({ className });
|
|
2016
2148
|
const headClass = (column) => column.align === "right" ? `${th2} ${alignRight2}` : th2;
|
|
2017
2149
|
const cellClass = (column) => column.align === "right" ? `${td2} ${alignRight2}` : td2;
|
|
2018
2150
|
return /* @__PURE__ */ jsxs27("table", { className: root24, ...rest, children: [
|
|
2019
|
-
/* @__PURE__ */
|
|
2020
|
-
/* @__PURE__ */
|
|
2151
|
+
/* @__PURE__ */ jsx41("thead", { children: /* @__PURE__ */ jsx41("tr", { children: columns.map((column) => /* @__PURE__ */ jsx41("th", { className: headClass(column), children: column.header }, column.key)) }) }),
|
|
2152
|
+
/* @__PURE__ */ jsx41("tbody", { children: rows.map((row, index) => /* @__PURE__ */ jsx41("tr", { children: columns.map((column) => /* @__PURE__ */ jsx41("td", { className: cellClass(column), children: column.render ? column.render(row) : String(row[column.key]) }, column.key)) }, getRowKey ? getRowKey(row, index) : index)) })
|
|
2021
2153
|
] });
|
|
2022
2154
|
}
|
|
2023
2155
|
|
|
2024
2156
|
// src/components/app-bar/use-styles.ts
|
|
2025
|
-
import { useMemo as
|
|
2157
|
+
import { useMemo as useMemo30 } from "react";
|
|
2026
2158
|
|
|
2027
2159
|
// src/components/app-bar/use-styles.css.ts
|
|
2028
2160
|
var actions2 = "use-styles_actions__1h133nh2";
|
|
@@ -2030,9 +2162,9 @@ var brand = "use-styles_brand__1h133nh1";
|
|
|
2030
2162
|
var root22 = "use-styles_root__1h133nh0";
|
|
2031
2163
|
|
|
2032
2164
|
// src/components/app-bar/use-styles.ts
|
|
2033
|
-
function
|
|
2165
|
+
function useStyles28({ className }) {
|
|
2034
2166
|
const { themeClass } = useTheme();
|
|
2035
|
-
const root24 =
|
|
2167
|
+
const root24 = useMemo30(
|
|
2036
2168
|
() => [themeClass, root22, className].filter(Boolean).join(" "),
|
|
2037
2169
|
[themeClass, className]
|
|
2038
2170
|
);
|
|
@@ -2040,18 +2172,18 @@ function useStyles27({ className }) {
|
|
|
2040
2172
|
}
|
|
2041
2173
|
|
|
2042
2174
|
// src/components/app-bar/index.tsx
|
|
2043
|
-
import { jsx as
|
|
2175
|
+
import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2044
2176
|
function AppBar({ brand: brand2, actions: actions3, className, children, ...rest }) {
|
|
2045
|
-
const styles =
|
|
2177
|
+
const styles = useStyles28({ className });
|
|
2046
2178
|
return /* @__PURE__ */ jsxs28("header", { className: styles.root, ...rest, children: [
|
|
2047
|
-
brand2 !== void 0 ? /* @__PURE__ */
|
|
2179
|
+
brand2 !== void 0 ? /* @__PURE__ */ jsx42("div", { className: styles.brand, children: brand2 }) : null,
|
|
2048
2180
|
children,
|
|
2049
|
-
actions3 !== void 0 ? /* @__PURE__ */
|
|
2181
|
+
actions3 !== void 0 ? /* @__PURE__ */ jsx42("div", { className: styles.actions, children: actions3 }) : null
|
|
2050
2182
|
] });
|
|
2051
2183
|
}
|
|
2052
2184
|
|
|
2053
2185
|
// src/components/list-item/use-styles.ts
|
|
2054
|
-
import { useMemo as
|
|
2186
|
+
import { useMemo as useMemo31 } from "react";
|
|
2055
2187
|
|
|
2056
2188
|
// src/components/list-item/use-styles.css.ts
|
|
2057
2189
|
var content2 = "use-styles_content__kbreq13";
|
|
@@ -2061,12 +2193,12 @@ var selected2 = "use-styles_selected__kbreq11";
|
|
|
2061
2193
|
var trailing = "use-styles_trailing__kbreq14";
|
|
2062
2194
|
|
|
2063
2195
|
// src/components/list-item/use-styles.ts
|
|
2064
|
-
function
|
|
2196
|
+
function useStyles29({
|
|
2065
2197
|
selected: selected3,
|
|
2066
2198
|
className
|
|
2067
2199
|
}) {
|
|
2068
2200
|
const { themeClass } = useTheme();
|
|
2069
|
-
const root24 =
|
|
2201
|
+
const root24 = useMemo31(
|
|
2070
2202
|
() => [themeClass, root23, selected3 && selected2, className].filter(Boolean).join(" "),
|
|
2071
2203
|
[themeClass, selected3, className]
|
|
2072
2204
|
);
|
|
@@ -2074,7 +2206,7 @@ function useStyles28({
|
|
|
2074
2206
|
}
|
|
2075
2207
|
|
|
2076
2208
|
// src/components/list-item/index.tsx
|
|
2077
|
-
import { jsx as
|
|
2209
|
+
import { jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2078
2210
|
function ListItem({
|
|
2079
2211
|
leading: leading2,
|
|
2080
2212
|
trailing: trailing2,
|
|
@@ -2083,18 +2215,18 @@ function ListItem({
|
|
|
2083
2215
|
children,
|
|
2084
2216
|
...rest
|
|
2085
2217
|
}) {
|
|
2086
|
-
const styles =
|
|
2218
|
+
const styles = useStyles29({ selected: selected3, className });
|
|
2087
2219
|
return /* @__PURE__ */ jsxs29("div", { className: styles.root, ...rest, children: [
|
|
2088
|
-
leading2 != null && /* @__PURE__ */
|
|
2089
|
-
/* @__PURE__ */
|
|
2090
|
-
trailing2 != null && /* @__PURE__ */
|
|
2220
|
+
leading2 != null && /* @__PURE__ */ jsx43("span", { className: styles.leading, children: leading2 }),
|
|
2221
|
+
/* @__PURE__ */ jsx43("span", { className: styles.content, children }),
|
|
2222
|
+
trailing2 != null && /* @__PURE__ */ jsx43("span", { className: styles.trailing, children: trailing2 })
|
|
2091
2223
|
] });
|
|
2092
2224
|
}
|
|
2093
2225
|
|
|
2094
2226
|
// src/components/icons/chevron-up/index.tsx
|
|
2095
|
-
import { jsx as
|
|
2227
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2096
2228
|
function ChevronUpIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
2097
|
-
return /* @__PURE__ */
|
|
2229
|
+
return /* @__PURE__ */ jsx44(
|
|
2098
2230
|
"svg",
|
|
2099
2231
|
{
|
|
2100
2232
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2108,13 +2240,13 @@ function ChevronUpIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
2108
2240
|
strokeLinejoin: "round",
|
|
2109
2241
|
"aria-hidden": "true",
|
|
2110
2242
|
...rest,
|
|
2111
|
-
children: /* @__PURE__ */
|
|
2243
|
+
children: /* @__PURE__ */ jsx44("path", { d: "m18 15-6-6-6 6" })
|
|
2112
2244
|
}
|
|
2113
2245
|
);
|
|
2114
2246
|
}
|
|
2115
2247
|
|
|
2116
2248
|
// src/components/icons/search/index.tsx
|
|
2117
|
-
import { jsx as
|
|
2249
|
+
import { jsx as jsx45, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2118
2250
|
function SearchIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
2119
2251
|
return /* @__PURE__ */ jsxs30(
|
|
2120
2252
|
"svg",
|
|
@@ -2131,15 +2263,15 @@ function SearchIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
2131
2263
|
"aria-hidden": "true",
|
|
2132
2264
|
...rest,
|
|
2133
2265
|
children: [
|
|
2134
|
-
/* @__PURE__ */
|
|
2135
|
-
/* @__PURE__ */
|
|
2266
|
+
/* @__PURE__ */ jsx45("circle", { cx: "11", cy: "11", r: "8" }),
|
|
2267
|
+
/* @__PURE__ */ jsx45("path", { d: "m21 21-4.3-4.3" })
|
|
2136
2268
|
]
|
|
2137
2269
|
}
|
|
2138
2270
|
);
|
|
2139
2271
|
}
|
|
2140
2272
|
|
|
2141
2273
|
// src/components/icons/plus/index.tsx
|
|
2142
|
-
import { jsx as
|
|
2274
|
+
import { jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2143
2275
|
function PlusIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
2144
2276
|
return /* @__PURE__ */ jsxs31(
|
|
2145
2277
|
"svg",
|
|
@@ -2156,17 +2288,17 @@ function PlusIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
2156
2288
|
"aria-hidden": "true",
|
|
2157
2289
|
...rest,
|
|
2158
2290
|
children: [
|
|
2159
|
-
/* @__PURE__ */
|
|
2160
|
-
/* @__PURE__ */
|
|
2291
|
+
/* @__PURE__ */ jsx46("path", { d: "M5 12h14" }),
|
|
2292
|
+
/* @__PURE__ */ jsx46("path", { d: "M12 5v14" })
|
|
2161
2293
|
]
|
|
2162
2294
|
}
|
|
2163
2295
|
);
|
|
2164
2296
|
}
|
|
2165
2297
|
|
|
2166
2298
|
// src/components/icons/minus/index.tsx
|
|
2167
|
-
import { jsx as
|
|
2299
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
2168
2300
|
function MinusIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
2169
|
-
return /* @__PURE__ */
|
|
2301
|
+
return /* @__PURE__ */ jsx47(
|
|
2170
2302
|
"svg",
|
|
2171
2303
|
{
|
|
2172
2304
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2180,13 +2312,13 @@ function MinusIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
2180
2312
|
strokeLinejoin: "round",
|
|
2181
2313
|
"aria-hidden": "true",
|
|
2182
2314
|
...rest,
|
|
2183
|
-
children: /* @__PURE__ */
|
|
2315
|
+
children: /* @__PURE__ */ jsx47("path", { d: "M5 12h14" })
|
|
2184
2316
|
}
|
|
2185
2317
|
);
|
|
2186
2318
|
}
|
|
2187
2319
|
|
|
2188
2320
|
// src/components/icons/more-horizontal/index.tsx
|
|
2189
|
-
import { jsx as
|
|
2321
|
+
import { jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2190
2322
|
function MoreHorizontalIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
2191
2323
|
return /* @__PURE__ */ jsxs32(
|
|
2192
2324
|
"svg",
|
|
@@ -2203,9 +2335,9 @@ function MoreHorizontalIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
2203
2335
|
"aria-hidden": "true",
|
|
2204
2336
|
...rest,
|
|
2205
2337
|
children: [
|
|
2206
|
-
/* @__PURE__ */
|
|
2207
|
-
/* @__PURE__ */
|
|
2208
|
-
/* @__PURE__ */
|
|
2338
|
+
/* @__PURE__ */ jsx48("circle", { cx: "12", cy: "12", r: "1" }),
|
|
2339
|
+
/* @__PURE__ */ jsx48("circle", { cx: "19", cy: "12", r: "1" }),
|
|
2340
|
+
/* @__PURE__ */ jsx48("circle", { cx: "5", cy: "12", r: "1" })
|
|
2209
2341
|
]
|
|
2210
2342
|
}
|
|
2211
2343
|
);
|
|
@@ -2237,8 +2369,10 @@ export {
|
|
|
2237
2369
|
ListItem,
|
|
2238
2370
|
Menu,
|
|
2239
2371
|
MinusIcon,
|
|
2372
|
+
MoneyField,
|
|
2240
2373
|
MoreHorizontalIcon,
|
|
2241
2374
|
Pagination,
|
|
2375
|
+
PasswordField,
|
|
2242
2376
|
PlusIcon,
|
|
2243
2377
|
Progress,
|
|
2244
2378
|
Radio,
|