@firecms/ui 3.0.0-beta.11 → 3.0.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Avatar.d.ts +1 -0
- package/dist/components/BooleanSwitch.d.ts +1 -1
- package/dist/components/BooleanSwitchWithLabel.d.ts +1 -1
- package/dist/components/Button.d.ts +6 -4
- package/dist/components/CircularProgress.d.ts +1 -1
- package/dist/components/DateTimeField.d.ts +1 -1
- package/dist/components/Dialog.d.ts +2 -1
- package/dist/components/Menu.d.ts +4 -1
- package/dist/components/MultiSelect.d.ts +14 -22
- package/dist/components/Select.d.ts +10 -9
- package/dist/components/Sheet.d.ts +2 -0
- package/dist/components/TextField.d.ts +38 -3
- package/dist/index.es.js +788 -684
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +788 -684
- package/dist/index.umd.js.map +1 -1
- package/package.json +30 -29
- package/src/components/Avatar.tsx +4 -1
- package/src/components/BooleanSwitch.tsx +1 -1
- package/src/components/BooleanSwitchWithLabel.tsx +7 -2
- package/src/components/Button.tsx +16 -17
- package/src/components/Chip.tsx +1 -0
- package/src/components/CircularProgress.tsx +7 -3
- package/src/components/DateTimeField.tsx +29 -23
- package/src/components/Dialog.tsx +3 -1
- package/src/components/DialogContent.tsx +1 -1
- package/src/components/FileUpload.tsx +2 -1
- package/src/components/Menu.tsx +13 -4
- package/src/components/Menubar.tsx +1 -1
- package/src/components/MultiSelect.tsx +54 -51
- package/src/components/SearchBar.tsx +1 -1
- package/src/components/Select.tsx +70 -55
- package/src/components/Sheet.tsx +9 -1
- package/src/components/Tabs.tsx +3 -1
- package/src/components/TextField.tsx +190 -153
- package/src/components/TextareaAutosize.tsx +2 -2
- package/src/components/Tooltip.tsx +0 -1
package/dist/index.es.js
CHANGED
|
@@ -614,7 +614,7 @@ const Alert = (t0) => {
|
|
|
614
614
|
return t7;
|
|
615
615
|
};
|
|
616
616
|
const AvatarInner = (t0, ref) => {
|
|
617
|
-
const $ = c(
|
|
617
|
+
const $ = c(25);
|
|
618
618
|
let alt;
|
|
619
619
|
let children;
|
|
620
620
|
let className;
|
|
@@ -622,6 +622,7 @@ const AvatarInner = (t0, ref) => {
|
|
|
622
622
|
let props;
|
|
623
623
|
let src;
|
|
624
624
|
let style;
|
|
625
|
+
let t1;
|
|
625
626
|
if ($[0] !== t0) {
|
|
626
627
|
({
|
|
627
628
|
src,
|
|
@@ -630,6 +631,7 @@ const AvatarInner = (t0, ref) => {
|
|
|
630
631
|
className,
|
|
631
632
|
style,
|
|
632
633
|
outerClassName,
|
|
634
|
+
hover: t1,
|
|
633
635
|
...props
|
|
634
636
|
} = t0);
|
|
635
637
|
$[0] = t0;
|
|
@@ -640,6 +642,7 @@ const AvatarInner = (t0, ref) => {
|
|
|
640
642
|
$[5] = props;
|
|
641
643
|
$[6] = src;
|
|
642
644
|
$[7] = style;
|
|
645
|
+
$[8] = t1;
|
|
643
646
|
} else {
|
|
644
647
|
alt = $[1];
|
|
645
648
|
children = $[2];
|
|
@@ -648,51 +651,55 @@ const AvatarInner = (t0, ref) => {
|
|
|
648
651
|
props = $[5];
|
|
649
652
|
src = $[6];
|
|
650
653
|
style = $[7];
|
|
654
|
+
t1 = $[8];
|
|
651
655
|
}
|
|
656
|
+
const hover = t1 === void 0 ? true : t1;
|
|
652
657
|
const [isImageError, setIsImageError] = useState(false);
|
|
653
|
-
let
|
|
654
|
-
if ($[
|
|
655
|
-
|
|
658
|
+
let t2;
|
|
659
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
660
|
+
t2 = () => {
|
|
656
661
|
setIsImageError(true);
|
|
657
662
|
};
|
|
658
|
-
$[
|
|
663
|
+
$[9] = t2;
|
|
659
664
|
} else {
|
|
660
|
-
|
|
665
|
+
t2 = $[9];
|
|
661
666
|
}
|
|
662
|
-
const handleImageError =
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
$[10] =
|
|
667
|
+
const handleImageError = t2;
|
|
668
|
+
const t3 = hover && "hover:bg-surface-accent-200 hover:dark:bg-surface-accent-700";
|
|
669
|
+
let t4;
|
|
670
|
+
if ($[10] !== outerClassName || $[11] !== t3) {
|
|
671
|
+
t4 = cls("rounded-full flex items-center justify-center overflow-hidden", "p-1 w-12 h-12 min-w-12 min-h-12", t3, outerClassName);
|
|
672
|
+
$[10] = outerClassName;
|
|
673
|
+
$[11] = t3;
|
|
674
|
+
$[12] = t4;
|
|
668
675
|
} else {
|
|
669
|
-
|
|
676
|
+
t4 = $[12];
|
|
670
677
|
}
|
|
671
|
-
let
|
|
672
|
-
if ($[
|
|
673
|
-
|
|
674
|
-
$[
|
|
675
|
-
$[
|
|
676
|
-
$[
|
|
677
|
-
$[
|
|
678
|
-
$[
|
|
679
|
-
$[
|
|
678
|
+
let t5;
|
|
679
|
+
if ($[13] !== alt || $[14] !== children || $[15] !== className || $[16] !== isImageError || $[17] !== src) {
|
|
680
|
+
t5 = src && !isImageError ? /* @__PURE__ */ jsx("img", { className: cls("bg-surface-accent-100 dark:bg-surface-accent-800", "w-full h-full object-cover rounded-full", className), src, alt, onError: handleImageError }) : /* @__PURE__ */ jsx("span", { className: cls("bg-surface-accent-100 dark:bg-surface-accent-800", "flex items-center justify-center", "w-full h-full py-1.5 text-lg font-medium text-surface-accent-900 dark:text-white rounded-full", className), children });
|
|
681
|
+
$[13] = alt;
|
|
682
|
+
$[14] = children;
|
|
683
|
+
$[15] = className;
|
|
684
|
+
$[16] = isImageError;
|
|
685
|
+
$[17] = src;
|
|
686
|
+
$[18] = t5;
|
|
680
687
|
} else {
|
|
681
|
-
|
|
688
|
+
t5 = $[18];
|
|
682
689
|
}
|
|
683
|
-
let
|
|
684
|
-
if ($[
|
|
685
|
-
|
|
686
|
-
$[
|
|
687
|
-
$[
|
|
688
|
-
$[
|
|
689
|
-
$[20] = t2;
|
|
690
|
-
$[21] = t3;
|
|
690
|
+
let t6;
|
|
691
|
+
if ($[19] !== props || $[20] !== ref || $[21] !== style || $[22] !== t4 || $[23] !== t5) {
|
|
692
|
+
t6 = /* @__PURE__ */ jsx("button", { ref, style, ...props, className: t4, children: t5 });
|
|
693
|
+
$[19] = props;
|
|
694
|
+
$[20] = ref;
|
|
695
|
+
$[21] = style;
|
|
691
696
|
$[22] = t4;
|
|
697
|
+
$[23] = t5;
|
|
698
|
+
$[24] = t6;
|
|
692
699
|
} else {
|
|
693
|
-
|
|
700
|
+
t6 = $[24];
|
|
694
701
|
}
|
|
695
|
-
return
|
|
702
|
+
return t6;
|
|
696
703
|
};
|
|
697
704
|
const Avatar = React__default.forwardRef(AvatarInner);
|
|
698
705
|
const BooleanSwitch = React__default.forwardRef(function BooleanSwitch2({
|
|
@@ -731,13 +738,13 @@ const BooleanSwitch = React__default.forwardRef(function BooleanSwitch2({
|
|
|
731
738
|
const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
|
|
732
739
|
value,
|
|
733
740
|
position = "end",
|
|
741
|
+
size = "medium",
|
|
734
742
|
invisible,
|
|
735
743
|
onValueChange,
|
|
736
744
|
error,
|
|
737
745
|
label,
|
|
738
746
|
autoFocus,
|
|
739
747
|
disabled,
|
|
740
|
-
size,
|
|
741
748
|
className,
|
|
742
749
|
fullWidth = true,
|
|
743
750
|
inputClassName,
|
|
@@ -751,7 +758,12 @@ const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
|
|
|
751
758
|
React__default.useEffect(() => {
|
|
752
759
|
}, []);
|
|
753
760
|
const focus = document.activeElement === refInput?.current || document.activeElement === ref?.current;
|
|
754
|
-
return /* @__PURE__ */ jsxs("div", { ref, onFocus, onBlur, tabIndex: -1, className: cls(!invisible && fieldBackgroundMixin, !invisible && (disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin), disabled ? "cursor-default" : "cursor-pointer", "rounded-md max-w-full justify-between box-border relative inline-flex items-center", !invisible && focus && !disabled ? focusedClasses : "", error ? "text-red-500 dark:text-red-600" : focus && !disabled ? "text-primary" : !disabled ? "text-text-primary dark:text-text-primary-dark" : "text-text-secondary dark:text-text-secondary-dark",
|
|
761
|
+
return /* @__PURE__ */ jsxs("div", { ref, onFocus, onBlur, tabIndex: -1, className: cls(!invisible && fieldBackgroundMixin, !invisible && (disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin), disabled ? "cursor-default" : "cursor-pointer", "rounded-md max-w-full justify-between box-border relative inline-flex items-center", !invisible && focus && !disabled ? focusedClasses : "", error ? "text-red-500 dark:text-red-600" : focus && !disabled ? "text-primary" : !disabled ? "text-text-primary dark:text-text-primary-dark" : "text-text-secondary dark:text-text-secondary-dark", {
|
|
762
|
+
"min-h-[28px]": size === "smallest",
|
|
763
|
+
"min-h-[32px]": size === "small",
|
|
764
|
+
"min-h-[42px]": size === "medium",
|
|
765
|
+
"min-h-[64px]": size === "large"
|
|
766
|
+
}, size === "small" ? "pl-2" : "pl-4", size === "small" ? "pr-4" : "pr-6", position === "end" ? "flex-row-reverse" : "flex-row", fullWidth ? "w-full" : "", className), onClick: disabled ? void 0 : (e) => {
|
|
755
767
|
if (props.allowIndeterminate) {
|
|
756
768
|
if (value === null || value === void 0) onValueChange?.(true);
|
|
757
769
|
else if (value) onValueChange?.(false);
|
|
@@ -823,20 +835,20 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
|
|
|
823
835
|
const t9 = variant === "filled" && color === "secondary" && !disabled;
|
|
824
836
|
const t10 = variant === "filled" && color === "error" && !disabled;
|
|
825
837
|
const t11 = variant === "filled" && color === "text" && !disabled;
|
|
826
|
-
const t12 = variant === "
|
|
827
|
-
const t13 = variant === "text" && color === "
|
|
828
|
-
const t14 = variant === "text" && color === "
|
|
829
|
-
const t15 = variant === "text" && color === "
|
|
830
|
-
const t16 = variant === "
|
|
831
|
-
const t17 = variant === "
|
|
832
|
-
const t18 = variant === "outlined" && color === "
|
|
833
|
-
const t19 = variant === "outlined" && color === "
|
|
834
|
-
const t20 = variant === "
|
|
835
|
-
const t21 = variant === "
|
|
836
|
-
const t22 = variant === "
|
|
838
|
+
const t12 = variant === "filled" && color === "neutral" && !disabled;
|
|
839
|
+
const t13 = variant === "text" && color === "primary" && !disabled;
|
|
840
|
+
const t14 = variant === "text" && color === "secondary" && !disabled;
|
|
841
|
+
const t15 = variant === "text" && color === "error" && !disabled;
|
|
842
|
+
const t16 = variant === "text" && color === "text" && !disabled;
|
|
843
|
+
const t17 = variant === "text" && color === "neutral" && !disabled;
|
|
844
|
+
const t18 = variant === "outlined" && color === "primary" && !disabled;
|
|
845
|
+
const t19 = variant === "outlined" && color === "secondary" && !disabled;
|
|
846
|
+
const t20 = variant === "outlined" && color === "error" && !disabled;
|
|
847
|
+
const t21 = variant === "outlined" && color === "text" && !disabled;
|
|
848
|
+
const t22 = variant === "outlined" && color === "neutral" && !disabled;
|
|
837
849
|
const t23 = variant === "text" && disabled;
|
|
838
850
|
const t24 = variant === "outlined" && disabled;
|
|
839
|
-
const t25 =
|
|
851
|
+
const t25 = variant === "filled" && disabled;
|
|
840
852
|
let t26;
|
|
841
853
|
let t27;
|
|
842
854
|
let t28;
|
|
@@ -852,21 +864,21 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
|
|
|
852
864
|
"border border-secondary bg-secondary focus:ring-secondary shadow hover:ring-1 hover:ring-secondary text-white hover:text-white": t9,
|
|
853
865
|
"border border-red-500 bg-red-500 hover:bg-red-500 focus:ring-red-500 shadow hover:ring-1 hover:ring-red-600 text-white hover:text-white": t10,
|
|
854
866
|
"border border-surface-accent-200 bg-surface-accent-200 hover:bg-surface-accent-300 focus:ring-surface-accent-400 shadow hover:ring-1 hover:ring-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": t11,
|
|
855
|
-
"border border-transparent
|
|
856
|
-
"border border-transparent text-
|
|
857
|
-
"border border-transparent text-
|
|
858
|
-
"border border-transparent text-
|
|
859
|
-
"border border-primary text-primary hover:text-primary hover:bg-
|
|
860
|
-
"border border-
|
|
861
|
-
"border border-
|
|
862
|
-
"border border-
|
|
863
|
-
"border border-
|
|
864
|
-
"border border-
|
|
865
|
-
"border border-
|
|
867
|
+
"border border-transparent bg-surface-100 hover:bg-surface-accent-200 text-text-primary dark:bg-surface-800 dark:hover:bg-surface-accent-700 dark:text-text-primary-dark": t12,
|
|
868
|
+
"border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t13,
|
|
869
|
+
"border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t14,
|
|
870
|
+
"border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": t15,
|
|
871
|
+
"border border-transparent text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark hover:bg-surface-accent-200 hover:dark:bg-surface-700": t16,
|
|
872
|
+
"border border-transparent text-text-primary hover:text-text-primary hover:bg-surface-accent-200 dark:text-text-primary-dark dark:hover:bg-surface-accent-700": t17,
|
|
873
|
+
"border border-primary text-primary hover:text-primary hover:bg-primary-bg": t18,
|
|
874
|
+
"border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t19,
|
|
875
|
+
"border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t20,
|
|
876
|
+
"border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:bg-surface-accent-200": t21,
|
|
877
|
+
"border border-surface-400 text-text-primary hover:bg-surface-accent-200 dark:border-surface-600 dark:text-text-primary-dark dark:hover:bg-surface-accent-700": t22,
|
|
866
878
|
"text-text-disabled dark:text-text-disabled-dark": disabled,
|
|
867
879
|
"border border-transparent opacity-50": t23,
|
|
868
880
|
"border border-surface-500 opacity-50": t24,
|
|
869
|
-
"border border-surface-
|
|
881
|
+
"border border-transparent bg-surface-300 dark:bg-surface-500 opacity-40": t25
|
|
870
882
|
});
|
|
871
883
|
const sizeClasses2 = cls({
|
|
872
884
|
"py-1 px-2": size === "small",
|
|
@@ -1152,23 +1164,31 @@ function CircularProgress(t0) {
|
|
|
1152
1164
|
} = t0;
|
|
1153
1165
|
const size = t1 === void 0 ? "medium" : t1;
|
|
1154
1166
|
let sizeClasses2;
|
|
1155
|
-
if (size === "
|
|
1167
|
+
if (size === "smallest") {
|
|
1156
1168
|
sizeClasses2 = "w-4 h-4";
|
|
1157
1169
|
} else {
|
|
1158
|
-
if (size === "
|
|
1159
|
-
sizeClasses2 = "w-
|
|
1170
|
+
if (size === "small") {
|
|
1171
|
+
sizeClasses2 = "w-6 h-6";
|
|
1160
1172
|
} else {
|
|
1161
|
-
|
|
1173
|
+
if (size === "medium") {
|
|
1174
|
+
sizeClasses2 = "w-8 h-8 m-1";
|
|
1175
|
+
} else {
|
|
1176
|
+
sizeClasses2 = "w-10 h-10 m-1";
|
|
1177
|
+
}
|
|
1162
1178
|
}
|
|
1163
1179
|
}
|
|
1164
1180
|
let borderClasses;
|
|
1165
|
-
if (size === "
|
|
1181
|
+
if (size === "smallest") {
|
|
1166
1182
|
borderClasses = "border-[3px]";
|
|
1167
1183
|
} else {
|
|
1168
|
-
if (size === "
|
|
1169
|
-
borderClasses = "border-
|
|
1184
|
+
if (size === "small") {
|
|
1185
|
+
borderClasses = "border-[4px]";
|
|
1170
1186
|
} else {
|
|
1171
|
-
|
|
1187
|
+
if (size === "medium") {
|
|
1188
|
+
borderClasses = "border-4";
|
|
1189
|
+
} else {
|
|
1190
|
+
borderClasses = "border-[6px]";
|
|
1191
|
+
}
|
|
1172
1192
|
}
|
|
1173
1193
|
}
|
|
1174
1194
|
let t2;
|
|
@@ -27318,7 +27338,7 @@ function Chip(t0) {
|
|
|
27318
27338
|
const t6 = error ? "text-red-500 dark:text-red-400" : "";
|
|
27319
27339
|
let t7;
|
|
27320
27340
|
if ($[2] !== className || $[3] !== t3 || $[4] !== t4 || $[5] !== t5 || $[6] !== t6) {
|
|
27321
|
-
t7 = cls("rounded-lg max-w-full w-max h-fit font-regular inline-flex gap-1", "text-ellipsis", t3, t4, t5, t6, className);
|
|
27341
|
+
t7 = cls("rounded-lg max-w-full w-max h-fit font-regular inline-flex gap-1", "text-ellipsis", "items-center", t3, t4, t5, t6, className);
|
|
27322
27342
|
$[2] = className;
|
|
27323
27343
|
$[3] = t3;
|
|
27324
27344
|
$[4] = t4;
|
|
@@ -27670,7 +27690,7 @@ function Typography(t0) {
|
|
|
27670
27690
|
return t15;
|
|
27671
27691
|
}
|
|
27672
27692
|
const DateTimeField = (t0) => {
|
|
27673
|
-
const $ = c(
|
|
27693
|
+
const $ = c(57);
|
|
27674
27694
|
const {
|
|
27675
27695
|
value,
|
|
27676
27696
|
label,
|
|
@@ -27744,161 +27764,176 @@ const DateTimeField = (t0) => {
|
|
|
27744
27764
|
}
|
|
27745
27765
|
const t6 = !invisible && fieldBackgroundMixin;
|
|
27746
27766
|
const t7 = disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin;
|
|
27747
|
-
const t8 = size === "
|
|
27748
|
-
const t9 = size === "
|
|
27749
|
-
|
|
27750
|
-
|
|
27751
|
-
|
|
27752
|
-
|
|
27753
|
-
|
|
27767
|
+
const t8 = size === "smallest";
|
|
27768
|
+
const t9 = size === "small";
|
|
27769
|
+
const t10 = size === "medium";
|
|
27770
|
+
const t11 = size === "large";
|
|
27771
|
+
let t12;
|
|
27772
|
+
if ($[6] !== className || $[7] !== t10 || $[8] !== t11 || $[9] !== t6 || $[10] !== t7 || $[11] !== t8 || $[12] !== t9) {
|
|
27773
|
+
t12 = cls("rounded-md relative max-w-full", t6, t7, {
|
|
27774
|
+
"min-h-[28px]": t8,
|
|
27775
|
+
"min-h-[32px]": t9,
|
|
27776
|
+
"min-h-[42px]": t10,
|
|
27777
|
+
"min-h-[64px]": t11
|
|
27754
27778
|
}, className);
|
|
27755
27779
|
$[6] = className;
|
|
27756
|
-
$[7] =
|
|
27757
|
-
$[8] =
|
|
27758
|
-
$[9] =
|
|
27759
|
-
$[10] =
|
|
27760
|
-
$[11] =
|
|
27780
|
+
$[7] = t10;
|
|
27781
|
+
$[8] = t11;
|
|
27782
|
+
$[9] = t6;
|
|
27783
|
+
$[10] = t7;
|
|
27784
|
+
$[11] = t8;
|
|
27785
|
+
$[12] = t9;
|
|
27786
|
+
$[13] = t12;
|
|
27761
27787
|
} else {
|
|
27762
|
-
|
|
27788
|
+
t12 = $[13];
|
|
27763
27789
|
}
|
|
27764
|
-
let
|
|
27765
|
-
if ($[
|
|
27766
|
-
|
|
27790
|
+
let t13;
|
|
27791
|
+
if ($[14] !== disabled) {
|
|
27792
|
+
t13 = () => {
|
|
27767
27793
|
if (!disabled) {
|
|
27768
27794
|
inputRef.current?.focus();
|
|
27769
27795
|
}
|
|
27770
27796
|
};
|
|
27771
|
-
$[12] = disabled;
|
|
27772
|
-
$[13] = t11;
|
|
27773
|
-
} else {
|
|
27774
|
-
t11 = $[13];
|
|
27775
|
-
}
|
|
27776
|
-
let t12;
|
|
27777
|
-
if ($[14] !== disabled || $[15] !== error || $[16] !== focused || $[17] !== label) {
|
|
27778
|
-
t12 = label && /* @__PURE__ */ jsx(InputLabel, { className: cls("absolute top-1 pointer-events-none", !error ? focused ? "text-primary" : "text-text-secondary dark:text-text-secondary-dark" : "text-red-500 dark:text-red-500", disabled ? "opacity-50" : ""), shrink: true, children: label });
|
|
27779
27797
|
$[14] = disabled;
|
|
27780
|
-
$[15] =
|
|
27781
|
-
$[16] = focused;
|
|
27782
|
-
$[17] = label;
|
|
27783
|
-
$[18] = t12;
|
|
27798
|
+
$[15] = t13;
|
|
27784
27799
|
} else {
|
|
27785
|
-
|
|
27800
|
+
t13 = $[15];
|
|
27786
27801
|
}
|
|
27787
|
-
|
|
27788
|
-
|
|
27789
|
-
|
|
27790
|
-
|
|
27791
|
-
|
|
27792
|
-
|
|
27793
|
-
|
|
27794
|
-
$[
|
|
27795
|
-
|
|
27796
|
-
|
|
27797
|
-
|
|
27798
|
-
|
|
27799
|
-
|
|
27800
|
-
|
|
27801
|
-
|
|
27802
|
-
|
|
27803
|
-
|
|
27804
|
-
|
|
27805
|
-
|
|
27806
|
-
|
|
27807
|
-
|
|
27808
|
-
$[
|
|
27809
|
-
$[
|
|
27810
|
-
|
|
27811
|
-
|
|
27812
|
-
|
|
27802
|
+
let t14;
|
|
27803
|
+
if ($[16] !== disabled || $[17] !== error || $[18] !== focused || $[19] !== label) {
|
|
27804
|
+
t14 = label && /* @__PURE__ */ jsx(InputLabel, { className: cls("absolute top-1 pointer-events-none", !error ? focused ? "text-primary" : "text-text-secondary dark:text-text-secondary-dark" : "text-red-500 dark:text-red-500", disabled ? "opacity-50" : ""), shrink: true, children: label });
|
|
27805
|
+
$[16] = disabled;
|
|
27806
|
+
$[17] = error;
|
|
27807
|
+
$[18] = focused;
|
|
27808
|
+
$[19] = label;
|
|
27809
|
+
$[20] = t14;
|
|
27810
|
+
} else {
|
|
27811
|
+
t14 = $[20];
|
|
27812
|
+
}
|
|
27813
|
+
const t15 = mode === "date_time" ? "datetime-local" : "date";
|
|
27814
|
+
const t16 = valueAsInputValue(value ?? null, mode);
|
|
27815
|
+
let t17;
|
|
27816
|
+
let t18;
|
|
27817
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
27818
|
+
t17 = () => setFocused(true);
|
|
27819
|
+
t18 = () => setFocused(false);
|
|
27820
|
+
$[21] = t17;
|
|
27821
|
+
$[22] = t18;
|
|
27822
|
+
} else {
|
|
27823
|
+
t17 = $[21];
|
|
27824
|
+
t18 = $[22];
|
|
27825
|
+
}
|
|
27826
|
+
const t19 = clearable ? "pr-14" : "pr-12";
|
|
27827
|
+
const t20 = size === "smallest";
|
|
27828
|
+
const t21 = size === "small";
|
|
27829
|
+
const t22 = size === "medium";
|
|
27830
|
+
const t23 = size === "large";
|
|
27831
|
+
let t24;
|
|
27832
|
+
if ($[23] !== disabled || $[24] !== inputClassName || $[25] !== label || $[26] !== t19 || $[27] !== t20 || $[28] !== t21 || $[29] !== t22 || $[30] !== t23) {
|
|
27833
|
+
t24 = cls("w-full outline-none bg-transparent leading-normal text-base px-3", t19, "rounded-md", {
|
|
27834
|
+
"min-h-[28px]": t20,
|
|
27835
|
+
"min-h-[32px]": t21,
|
|
27836
|
+
"min-h-[42px]": t22,
|
|
27837
|
+
"min-h-[64px]": t23
|
|
27838
|
+
}, label ? "pt-8 pb-2" : "py-2", inputClassName, disabled && "border border-transparent outline-none opacity-50 dark:opacity-50 text-surface-accent-600 dark:text-surface-accent-500");
|
|
27839
|
+
$[23] = disabled;
|
|
27840
|
+
$[24] = inputClassName;
|
|
27841
|
+
$[25] = label;
|
|
27842
|
+
$[26] = t19;
|
|
27843
|
+
$[27] = t20;
|
|
27844
|
+
$[28] = t21;
|
|
27845
|
+
$[29] = t22;
|
|
27846
|
+
$[30] = t23;
|
|
27847
|
+
$[31] = t24;
|
|
27813
27848
|
} else {
|
|
27814
|
-
|
|
27849
|
+
t24 = $[31];
|
|
27815
27850
|
}
|
|
27816
|
-
let
|
|
27817
|
-
if ($[
|
|
27818
|
-
|
|
27819
|
-
$[
|
|
27820
|
-
$[
|
|
27821
|
-
$[
|
|
27822
|
-
$[
|
|
27823
|
-
$[
|
|
27824
|
-
$[
|
|
27851
|
+
let t25;
|
|
27852
|
+
if ($[32] !== disabled || $[33] !== handleInputChange || $[34] !== t15 || $[35] !== t16 || $[36] !== t24) {
|
|
27853
|
+
t25 = /* @__PURE__ */ jsx("input", { ref: inputRef, type: t15, value: t16, onChange: handleInputChange, onFocus: t17, onBlur: t18, disabled, className: t24 });
|
|
27854
|
+
$[32] = disabled;
|
|
27855
|
+
$[33] = handleInputChange;
|
|
27856
|
+
$[34] = t15;
|
|
27857
|
+
$[35] = t16;
|
|
27858
|
+
$[36] = t24;
|
|
27859
|
+
$[37] = t25;
|
|
27825
27860
|
} else {
|
|
27826
|
-
|
|
27861
|
+
t25 = $[37];
|
|
27827
27862
|
}
|
|
27828
|
-
let
|
|
27829
|
-
if ($[
|
|
27830
|
-
|
|
27863
|
+
let t26;
|
|
27864
|
+
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
|
27865
|
+
t26 = (e_2) => {
|
|
27831
27866
|
e_2.stopPropagation();
|
|
27832
27867
|
inputRef.current?.showPicker();
|
|
27833
27868
|
};
|
|
27834
|
-
$[
|
|
27869
|
+
$[38] = t26;
|
|
27835
27870
|
} else {
|
|
27836
|
-
|
|
27871
|
+
t26 = $[38];
|
|
27837
27872
|
}
|
|
27838
|
-
let
|
|
27839
|
-
if ($[
|
|
27840
|
-
|
|
27841
|
-
$[
|
|
27873
|
+
let t27;
|
|
27874
|
+
if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
|
|
27875
|
+
t27 = /* @__PURE__ */ jsx(IconButton, { onClick: t26, className: "absolute right-3 top-1/2 transform -translate-y-1/2 !text-surface-accent-500", children: /* @__PURE__ */ jsx(CalendarMonthIcon, { color: "disabled" }) });
|
|
27876
|
+
$[39] = t27;
|
|
27842
27877
|
} else {
|
|
27843
|
-
|
|
27878
|
+
t27 = $[39];
|
|
27844
27879
|
}
|
|
27845
|
-
let
|
|
27846
|
-
if ($[
|
|
27847
|
-
|
|
27848
|
-
$[
|
|
27849
|
-
$[
|
|
27850
|
-
$[
|
|
27851
|
-
$[
|
|
27880
|
+
let t28;
|
|
27881
|
+
if ($[40] !== clearable || $[41] !== handleClear || $[42] !== value) {
|
|
27882
|
+
t28 = clearable && value && /* @__PURE__ */ jsx(IconButton, { onClick: handleClear, className: "absolute right-14 top-1/2 transform -translate-y-1/2 text-surface-accent-400 ", children: /* @__PURE__ */ jsx(CloseIcon, {}) });
|
|
27883
|
+
$[40] = clearable;
|
|
27884
|
+
$[41] = handleClear;
|
|
27885
|
+
$[42] = value;
|
|
27886
|
+
$[43] = t28;
|
|
27852
27887
|
} else {
|
|
27853
|
-
|
|
27888
|
+
t28 = $[43];
|
|
27854
27889
|
}
|
|
27855
|
-
let
|
|
27856
|
-
if ($[
|
|
27857
|
-
|
|
27858
|
-
|
|
27859
|
-
|
|
27860
|
-
|
|
27861
|
-
|
|
27890
|
+
let t29;
|
|
27891
|
+
if ($[44] !== style || $[45] !== t12 || $[46] !== t13 || $[47] !== t14 || $[48] !== t25 || $[49] !== t28) {
|
|
27892
|
+
t29 = /* @__PURE__ */ jsxs("div", { className: t12, style, onClick: t13, children: [
|
|
27893
|
+
t14,
|
|
27894
|
+
t25,
|
|
27895
|
+
t27,
|
|
27896
|
+
t28
|
|
27862
27897
|
] });
|
|
27863
|
-
$[
|
|
27864
|
-
$[
|
|
27865
|
-
$[
|
|
27866
|
-
$[
|
|
27867
|
-
$[
|
|
27868
|
-
$[
|
|
27869
|
-
$[
|
|
27898
|
+
$[44] = style;
|
|
27899
|
+
$[45] = t12;
|
|
27900
|
+
$[46] = t13;
|
|
27901
|
+
$[47] = t14;
|
|
27902
|
+
$[48] = t25;
|
|
27903
|
+
$[49] = t28;
|
|
27904
|
+
$[50] = t29;
|
|
27870
27905
|
} else {
|
|
27871
|
-
|
|
27906
|
+
t29 = $[50];
|
|
27872
27907
|
}
|
|
27873
|
-
let
|
|
27874
|
-
if ($[
|
|
27875
|
-
|
|
27876
|
-
/* @__PURE__ */ jsx(ErrorIcon, { size: "
|
|
27908
|
+
let t30;
|
|
27909
|
+
if ($[51] !== invalidValue || $[52] !== value) {
|
|
27910
|
+
t30 = invalidValue && /* @__PURE__ */ jsxs("div", { className: "flex items-center m-2", children: [
|
|
27911
|
+
/* @__PURE__ */ jsx(ErrorIcon, { size: "small", color: "error" }),
|
|
27877
27912
|
/* @__PURE__ */ jsxs("div", { className: "pl-2", children: [
|
|
27878
27913
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: "Invalid date value for this field" }),
|
|
27879
27914
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: `The provided value is: ${JSON.stringify(value)}` })
|
|
27880
27915
|
] })
|
|
27881
27916
|
] });
|
|
27882
|
-
$[
|
|
27883
|
-
$[
|
|
27884
|
-
$[
|
|
27917
|
+
$[51] = invalidValue;
|
|
27918
|
+
$[52] = value;
|
|
27919
|
+
$[53] = t30;
|
|
27885
27920
|
} else {
|
|
27886
|
-
|
|
27921
|
+
t30 = $[53];
|
|
27887
27922
|
}
|
|
27888
|
-
let
|
|
27889
|
-
if ($[
|
|
27890
|
-
|
|
27923
|
+
let t31;
|
|
27924
|
+
if ($[54] !== t29 || $[55] !== t30) {
|
|
27925
|
+
t31 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27891
27926
|
t5,
|
|
27892
|
-
|
|
27893
|
-
|
|
27927
|
+
t29,
|
|
27928
|
+
t30
|
|
27894
27929
|
] });
|
|
27895
|
-
$[
|
|
27896
|
-
$[
|
|
27897
|
-
$[
|
|
27930
|
+
$[54] = t29;
|
|
27931
|
+
$[55] = t30;
|
|
27932
|
+
$[56] = t31;
|
|
27898
27933
|
} else {
|
|
27899
|
-
|
|
27934
|
+
t31 = $[56];
|
|
27900
27935
|
}
|
|
27901
|
-
return
|
|
27936
|
+
return t31;
|
|
27902
27937
|
};
|
|
27903
27938
|
const inputStyles = `
|
|
27904
27939
|
/* Hide the default calendar icon in Chrome, Safari, Edge, Opera */
|
|
@@ -27947,12 +27982,13 @@ const widthClasses = {
|
|
|
27947
27982
|
full: "max-w-full min-w-full w-full"
|
|
27948
27983
|
};
|
|
27949
27984
|
const Dialog = (t0) => {
|
|
27950
|
-
const $ = c(
|
|
27985
|
+
const $ = c(39);
|
|
27951
27986
|
const {
|
|
27952
27987
|
open,
|
|
27953
27988
|
onOpenChange,
|
|
27954
27989
|
children,
|
|
27955
27990
|
className,
|
|
27991
|
+
containerClassName,
|
|
27956
27992
|
fullWidth: t1,
|
|
27957
27993
|
fullHeight,
|
|
27958
27994
|
fullScreen,
|
|
@@ -27993,107 +28029,116 @@ const Dialog = (t0) => {
|
|
|
27993
28029
|
}
|
|
27994
28030
|
useEffect(t5, t6);
|
|
27995
28031
|
const t7 = displayed || open;
|
|
27996
|
-
|
|
27997
|
-
|
|
27998
|
-
|
|
27999
|
-
|
|
28000
|
-
$[
|
|
28001
|
-
$[4] = t9;
|
|
28032
|
+
let t8;
|
|
28033
|
+
if ($[3] !== containerClassName) {
|
|
28034
|
+
t8 = cls("fixed inset-0 z-30", containerClassName);
|
|
28035
|
+
$[3] = containerClassName;
|
|
28036
|
+
$[4] = t8;
|
|
28002
28037
|
} else {
|
|
28003
|
-
|
|
28038
|
+
t8 = $[4];
|
|
28004
28039
|
}
|
|
28005
|
-
const
|
|
28006
|
-
let
|
|
28007
|
-
if ($[5] !==
|
|
28008
|
-
|
|
28009
|
-
|
|
28010
|
-
|
|
28011
|
-
$[5] = t10;
|
|
28012
|
-
$[6] = t11;
|
|
28040
|
+
const t9 = displayed && open ? "opacity-100" : "opacity-0";
|
|
28041
|
+
let t10;
|
|
28042
|
+
if ($[5] !== t9) {
|
|
28043
|
+
t10 = cls("fixed inset-0 transition-opacity z-20 ease-in-out duration-200 bg-black bg-opacity-50 dark:bg-opacity-60 backdrop-blur-sm ", t9, "z-20 fixed top-0 left-0 w-full h-full flex justify-center items-center");
|
|
28044
|
+
$[5] = t9;
|
|
28045
|
+
$[6] = t10;
|
|
28013
28046
|
} else {
|
|
28014
|
-
|
|
28047
|
+
t10 = $[6];
|
|
28015
28048
|
}
|
|
28049
|
+
const t11 = displayed ? "auto" : "none";
|
|
28016
28050
|
let t12;
|
|
28017
|
-
if ($[7] !== t11
|
|
28018
|
-
t12 =
|
|
28051
|
+
if ($[7] !== t11) {
|
|
28052
|
+
t12 = {
|
|
28053
|
+
pointerEvents: t11
|
|
28054
|
+
};
|
|
28019
28055
|
$[7] = t11;
|
|
28020
|
-
$[8] =
|
|
28021
|
-
$[9] = t12;
|
|
28056
|
+
$[8] = t12;
|
|
28022
28057
|
} else {
|
|
28023
|
-
t12 = $[
|
|
28058
|
+
t12 = $[8];
|
|
28024
28059
|
}
|
|
28025
28060
|
let t13;
|
|
28026
|
-
if ($[10]
|
|
28027
|
-
t13 =
|
|
28028
|
-
$[
|
|
28029
|
-
|
|
28030
|
-
|
|
28031
|
-
}
|
|
28032
|
-
|
|
28033
|
-
|
|
28034
|
-
|
|
28035
|
-
|
|
28036
|
-
|
|
28037
|
-
const t19 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
|
|
28038
|
-
let t20;
|
|
28039
|
-
if ($[11] !== className || $[12] !== t14 || $[13] !== t15 || $[14] !== t16 || $[15] !== t17 || $[16] !== t18 || $[17] !== t19) {
|
|
28040
|
-
t20 = cls(paperMixin, "z-30", "relative", "outline-none focus:outline-none", t14, t15, "text-surface-accent-900 dark:text-white", "justify-center items-center", t16, "ease-in-out duration-200", t17, t18, t19, className);
|
|
28041
|
-
$[11] = className;
|
|
28061
|
+
if ($[9] !== t10 || $[10] !== t12) {
|
|
28062
|
+
t13 = /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: t10, style: t12 });
|
|
28063
|
+
$[9] = t10;
|
|
28064
|
+
$[10] = t12;
|
|
28065
|
+
$[11] = t13;
|
|
28066
|
+
} else {
|
|
28067
|
+
t13 = $[11];
|
|
28068
|
+
}
|
|
28069
|
+
let t14;
|
|
28070
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28071
|
+
t14 = cls("h-full outline-none flex justify-center items-center z-40 opacity-100 transition-all duration-200 ease-in-out");
|
|
28042
28072
|
$[12] = t14;
|
|
28043
|
-
$[13] = t15;
|
|
28044
|
-
$[14] = t16;
|
|
28045
|
-
$[15] = t17;
|
|
28046
|
-
$[16] = t18;
|
|
28047
|
-
$[17] = t19;
|
|
28048
|
-
$[18] = t20;
|
|
28049
28073
|
} else {
|
|
28050
|
-
|
|
28074
|
+
t14 = $[12];
|
|
28051
28075
|
}
|
|
28076
|
+
const t15 = fullWidth && !fullScreen ? "w-11/12" : void 0;
|
|
28077
|
+
const t16 = fullHeight && !fullScreen ? "h-full" : void 0;
|
|
28078
|
+
const t17 = fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-xl";
|
|
28079
|
+
const t18 = scrollable && "overflow-y-auto";
|
|
28080
|
+
const t19 = displayed && open ? "opacity-100" : "opacity-0";
|
|
28081
|
+
const t20 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
|
|
28052
28082
|
let t21;
|
|
28053
|
-
if ($[
|
|
28054
|
-
t21 =
|
|
28055
|
-
$[
|
|
28056
|
-
$[
|
|
28057
|
-
$[
|
|
28083
|
+
if ($[13] !== className || $[14] !== t15 || $[15] !== t16 || $[16] !== t17 || $[17] !== t18 || $[18] !== t19 || $[19] !== t20) {
|
|
28084
|
+
t21 = cls(paperMixin, "z-30", "relative", "outline-none focus:outline-none", t15, t16, "text-surface-accent-900 dark:text-white", "justify-center items-center", t17, "ease-in-out duration-200", t18, t19, t20, className);
|
|
28085
|
+
$[13] = className;
|
|
28086
|
+
$[14] = t15;
|
|
28087
|
+
$[15] = t16;
|
|
28088
|
+
$[16] = t17;
|
|
28089
|
+
$[17] = t18;
|
|
28090
|
+
$[18] = t19;
|
|
28091
|
+
$[19] = t20;
|
|
28092
|
+
$[20] = t21;
|
|
28058
28093
|
} else {
|
|
28059
|
-
t21 = $[
|
|
28094
|
+
t21 = $[20];
|
|
28060
28095
|
}
|
|
28061
28096
|
let t22;
|
|
28062
|
-
if ($[
|
|
28063
|
-
t22 = /* @__PURE__ */ jsx(
|
|
28064
|
-
$[
|
|
28065
|
-
$[
|
|
28066
|
-
$[
|
|
28067
|
-
$[25] = onPointerDownOutside;
|
|
28068
|
-
$[26] = t21;
|
|
28069
|
-
$[27] = t22;
|
|
28097
|
+
if ($[21] !== children || $[22] !== t21) {
|
|
28098
|
+
t22 = /* @__PURE__ */ jsx("div", { className: t21, children });
|
|
28099
|
+
$[21] = children;
|
|
28100
|
+
$[22] = t21;
|
|
28101
|
+
$[23] = t22;
|
|
28070
28102
|
} else {
|
|
28071
|
-
t22 = $[
|
|
28103
|
+
t22 = $[23];
|
|
28072
28104
|
}
|
|
28073
28105
|
let t23;
|
|
28074
|
-
if ($[
|
|
28075
|
-
t23 = /* @__PURE__ */ jsx(DialogPrimitive.
|
|
28076
|
-
|
|
28077
|
-
|
|
28078
|
-
]
|
|
28079
|
-
$[
|
|
28080
|
-
$[
|
|
28081
|
-
$[
|
|
28106
|
+
if ($[24] !== onEscapeKeyDown || $[25] !== onInteractOutside || $[26] !== onOpenAutoFocus || $[27] !== onPointerDownOutside || $[28] !== t22) {
|
|
28107
|
+
t23 = /* @__PURE__ */ jsx(DialogPrimitive.Content, { onEscapeKeyDown, onOpenAutoFocus, onPointerDownOutside, onInteractOutside, className: t14, children: t22 });
|
|
28108
|
+
$[24] = onEscapeKeyDown;
|
|
28109
|
+
$[25] = onInteractOutside;
|
|
28110
|
+
$[26] = onOpenAutoFocus;
|
|
28111
|
+
$[27] = onPointerDownOutside;
|
|
28112
|
+
$[28] = t22;
|
|
28113
|
+
$[29] = t23;
|
|
28082
28114
|
} else {
|
|
28083
|
-
t23 = $[
|
|
28115
|
+
t23 = $[29];
|
|
28084
28116
|
}
|
|
28085
28117
|
let t24;
|
|
28086
|
-
if ($[
|
|
28087
|
-
t24 = /* @__PURE__ */ jsx(DialogPrimitive.
|
|
28088
|
-
|
|
28089
|
-
|
|
28090
|
-
|
|
28091
|
-
$[
|
|
28092
|
-
$[
|
|
28118
|
+
if ($[30] !== t13 || $[31] !== t23 || $[32] !== t8) {
|
|
28119
|
+
t24 = /* @__PURE__ */ jsx(DialogPrimitive.Portal, { children: /* @__PURE__ */ jsxs("div", { className: t8, children: [
|
|
28120
|
+
t13,
|
|
28121
|
+
t23
|
|
28122
|
+
] }) });
|
|
28123
|
+
$[30] = t13;
|
|
28124
|
+
$[31] = t23;
|
|
28125
|
+
$[32] = t8;
|
|
28126
|
+
$[33] = t24;
|
|
28093
28127
|
} else {
|
|
28094
|
-
t24 = $[
|
|
28128
|
+
t24 = $[33];
|
|
28095
28129
|
}
|
|
28096
|
-
|
|
28130
|
+
let t25;
|
|
28131
|
+
if ($[34] !== modal || $[35] !== onOpenChange || $[36] !== t24 || $[37] !== t7) {
|
|
28132
|
+
t25 = /* @__PURE__ */ jsx(DialogPrimitive.Root, { open: t7, modal, onOpenChange, children: t24 });
|
|
28133
|
+
$[34] = modal;
|
|
28134
|
+
$[35] = onOpenChange;
|
|
28135
|
+
$[36] = t24;
|
|
28136
|
+
$[37] = t7;
|
|
28137
|
+
$[38] = t25;
|
|
28138
|
+
} else {
|
|
28139
|
+
t25 = $[38];
|
|
28140
|
+
}
|
|
28141
|
+
return t25;
|
|
28097
28142
|
};
|
|
28098
28143
|
function _temp$2() {
|
|
28099
28144
|
}
|
|
@@ -28151,7 +28196,7 @@ function DialogContent(t0) {
|
|
|
28151
28196
|
}
|
|
28152
28197
|
let t2;
|
|
28153
28198
|
if ($[2] !== className || $[3] !== includeMargin) {
|
|
28154
|
-
t2 = cls("
|
|
28199
|
+
t2 = cls("flex-grow", {
|
|
28155
28200
|
"my-6 mx-6": includeMargin
|
|
28156
28201
|
}, className);
|
|
28157
28202
|
$[2] = className;
|
|
@@ -28555,7 +28600,7 @@ function FileUpload(t0) {
|
|
|
28555
28600
|
}
|
|
28556
28601
|
let t12;
|
|
28557
28602
|
if ($[23] !== uploadDescription) {
|
|
28558
|
-
t12 = /* @__PURE__ */ jsx("div", { className: "flex-grow h-28 box-border flex flex-col items-center justify-center text-center", children: /* @__PURE__ */ jsx(Typography, { align: "center", variant: "label", children: uploadDescription }) });
|
|
28603
|
+
t12 = /* @__PURE__ */ jsx("div", { className: "flex-grow h-28 box-border flex flex-col items-center justify-center text-center", children: /* @__PURE__ */ jsx(Typography, { align: "center", variant: "label", className: "flex flex-row gap-2 justify-center", children: uploadDescription }) });
|
|
28559
28604
|
$[23] = uploadDescription;
|
|
28560
28605
|
$[24] = t12;
|
|
28561
28606
|
} else {
|
|
@@ -28786,7 +28831,7 @@ const Markdown = React__default.memo(function Markdown2(t0) {
|
|
|
28786
28831
|
return t7;
|
|
28787
28832
|
}, equal);
|
|
28788
28833
|
const Menu = React__default.forwardRef((t0, ref) => {
|
|
28789
|
-
const $ = c(
|
|
28834
|
+
const $ = c(20);
|
|
28790
28835
|
const {
|
|
28791
28836
|
children,
|
|
28792
28837
|
trigger,
|
|
@@ -28795,90 +28840,98 @@ const Menu = React__default.forwardRef((t0, ref) => {
|
|
|
28795
28840
|
side,
|
|
28796
28841
|
align,
|
|
28797
28842
|
onOpenChange,
|
|
28798
|
-
portalContainer
|
|
28843
|
+
portalContainer,
|
|
28844
|
+
sideOffset: t1,
|
|
28845
|
+
className
|
|
28799
28846
|
} = t0;
|
|
28800
|
-
|
|
28847
|
+
const sideOffset = t1 === void 0 ? 4 : t1;
|
|
28848
|
+
let t2;
|
|
28801
28849
|
if ($[0] !== ref || $[1] !== trigger) {
|
|
28802
|
-
|
|
28850
|
+
t2 = /* @__PURE__ */ jsx(DropdownMenu.Trigger, { ref, asChild: true, children: trigger });
|
|
28803
28851
|
$[0] = ref;
|
|
28804
28852
|
$[1] = trigger;
|
|
28805
|
-
$[2] =
|
|
28806
|
-
} else {
|
|
28807
|
-
t1 = $[2];
|
|
28808
|
-
}
|
|
28809
|
-
let t2;
|
|
28810
|
-
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28811
|
-
t2 = cls(paperMixin, focusedDisabled, "shadow py-2 z-30");
|
|
28812
|
-
$[3] = t2;
|
|
28853
|
+
$[2] = t2;
|
|
28813
28854
|
} else {
|
|
28814
|
-
t2 = $[
|
|
28855
|
+
t2 = $[2];
|
|
28815
28856
|
}
|
|
28816
28857
|
let t3;
|
|
28817
|
-
if ($[
|
|
28818
|
-
t3 =
|
|
28819
|
-
$[
|
|
28820
|
-
$[
|
|
28821
|
-
$[6] = side;
|
|
28822
|
-
$[7] = t3;
|
|
28858
|
+
if ($[3] !== className) {
|
|
28859
|
+
t3 = cls(paperMixin, focusedDisabled, "shadow py-2 z-30", className);
|
|
28860
|
+
$[3] = className;
|
|
28861
|
+
$[4] = t3;
|
|
28823
28862
|
} else {
|
|
28824
|
-
t3 = $[
|
|
28863
|
+
t3 = $[4];
|
|
28825
28864
|
}
|
|
28826
28865
|
let t4;
|
|
28827
|
-
if ($[8] !==
|
|
28828
|
-
t4 = /* @__PURE__ */ jsx(DropdownMenu.
|
|
28829
|
-
$[
|
|
28866
|
+
if ($[5] !== align || $[6] !== children || $[7] !== side || $[8] !== sideOffset || $[9] !== t3) {
|
|
28867
|
+
t4 = /* @__PURE__ */ jsx(DropdownMenu.Content, { side, sideOffset, align, className: t3, children });
|
|
28868
|
+
$[5] = align;
|
|
28869
|
+
$[6] = children;
|
|
28870
|
+
$[7] = side;
|
|
28871
|
+
$[8] = sideOffset;
|
|
28830
28872
|
$[9] = t3;
|
|
28831
28873
|
$[10] = t4;
|
|
28832
28874
|
} else {
|
|
28833
28875
|
t4 = $[10];
|
|
28834
28876
|
}
|
|
28835
28877
|
let t5;
|
|
28836
|
-
if ($[11] !==
|
|
28837
|
-
t5 = /* @__PURE__ */
|
|
28838
|
-
|
|
28839
|
-
|
|
28878
|
+
if ($[11] !== portalContainer || $[12] !== t4) {
|
|
28879
|
+
t5 = /* @__PURE__ */ jsx(DropdownMenu.Portal, { container: portalContainer, children: t4 });
|
|
28880
|
+
$[11] = portalContainer;
|
|
28881
|
+
$[12] = t4;
|
|
28882
|
+
$[13] = t5;
|
|
28883
|
+
} else {
|
|
28884
|
+
t5 = $[13];
|
|
28885
|
+
}
|
|
28886
|
+
let t6;
|
|
28887
|
+
if ($[14] !== defaultOpen || $[15] !== onOpenChange || $[16] !== open || $[17] !== t2 || $[18] !== t5) {
|
|
28888
|
+
t6 = /* @__PURE__ */ jsxs(DropdownMenu.Root, { open, defaultOpen, onOpenChange, children: [
|
|
28889
|
+
t2,
|
|
28890
|
+
t5
|
|
28840
28891
|
] });
|
|
28841
|
-
$[
|
|
28842
|
-
$[
|
|
28843
|
-
$[
|
|
28844
|
-
$[
|
|
28845
|
-
$[
|
|
28846
|
-
$[
|
|
28892
|
+
$[14] = defaultOpen;
|
|
28893
|
+
$[15] = onOpenChange;
|
|
28894
|
+
$[16] = open;
|
|
28895
|
+
$[17] = t2;
|
|
28896
|
+
$[18] = t5;
|
|
28897
|
+
$[19] = t6;
|
|
28847
28898
|
} else {
|
|
28848
|
-
|
|
28899
|
+
t6 = $[19];
|
|
28849
28900
|
}
|
|
28850
|
-
return
|
|
28901
|
+
return t6;
|
|
28851
28902
|
});
|
|
28852
28903
|
Menu.displayName = "Menu";
|
|
28853
28904
|
function MenuItem(t0) {
|
|
28854
|
-
const $ = c(
|
|
28905
|
+
const $ = c(8);
|
|
28855
28906
|
const {
|
|
28856
28907
|
children,
|
|
28857
28908
|
dense: t1,
|
|
28858
|
-
onClick
|
|
28909
|
+
onClick,
|
|
28910
|
+
className
|
|
28859
28911
|
} = t0;
|
|
28860
28912
|
const dense = t1 === void 0 ? false : t1;
|
|
28861
28913
|
const t2 = onClick && "cursor-pointer";
|
|
28862
28914
|
const t3 = dense ? "px-3 py-1.5" : "px-4 py-2";
|
|
28863
28915
|
let t4;
|
|
28864
|
-
if ($[0] !==
|
|
28865
|
-
t4 = cls(t2, "rounded-md text-sm font-medium text-surface-accent-700 dark:text-surface-accent-300 hover:bg-surface-accent-100 dark:hover:bg-surface-accent-900 flex items-center gap-4", t3);
|
|
28866
|
-
$[0] =
|
|
28867
|
-
$[1] =
|
|
28868
|
-
$[2] =
|
|
28916
|
+
if ($[0] !== className || $[1] !== t2 || $[2] !== t3) {
|
|
28917
|
+
t4 = cls(t2, "rounded-md text-sm font-medium text-surface-accent-700 dark:text-surface-accent-300 hover:bg-surface-accent-100 dark:hover:bg-surface-accent-900 flex items-center gap-4", t3, className);
|
|
28918
|
+
$[0] = className;
|
|
28919
|
+
$[1] = t2;
|
|
28920
|
+
$[2] = t3;
|
|
28921
|
+
$[3] = t4;
|
|
28869
28922
|
} else {
|
|
28870
|
-
t4 = $[
|
|
28923
|
+
t4 = $[3];
|
|
28871
28924
|
}
|
|
28872
28925
|
const classNames = t4;
|
|
28873
28926
|
let t5;
|
|
28874
|
-
if ($[
|
|
28927
|
+
if ($[4] !== children || $[5] !== classNames || $[6] !== onClick) {
|
|
28875
28928
|
t5 = /* @__PURE__ */ jsx(DropdownMenu.Item, { className: classNames, onClick, children });
|
|
28876
|
-
$[
|
|
28877
|
-
$[
|
|
28878
|
-
$[
|
|
28879
|
-
$[
|
|
28929
|
+
$[4] = children;
|
|
28930
|
+
$[5] = classNames;
|
|
28931
|
+
$[6] = onClick;
|
|
28932
|
+
$[7] = t5;
|
|
28880
28933
|
} else {
|
|
28881
|
-
t5 = $[
|
|
28934
|
+
t5 = $[7];
|
|
28882
28935
|
}
|
|
28883
28936
|
return t5;
|
|
28884
28937
|
}
|
|
@@ -28933,7 +28986,7 @@ function MenubarTrigger(t0) {
|
|
|
28933
28986
|
} = t0;
|
|
28934
28987
|
let t1;
|
|
28935
28988
|
if ($[0] !== className) {
|
|
28936
|
-
t1 = cls("py-2 px-3 outline-none select-none font-medium leading-none rounded text-text-primary dark:text-text-primary-dark text-[13px] flex items-center justify-between gap-[2px] data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-800 data-[state=open]:bg-surface-accent-100 data-[state=open]:dark:bg-surface-800 hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-
|
|
28989
|
+
t1 = cls("py-2 px-3 outline-none select-none font-medium leading-none rounded text-text-primary dark:text-text-primary-dark text-[13px] flex items-center justify-between gap-[2px] data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-800 data-[state=open]:bg-surface-accent-100 data-[state=open]:dark:bg-surface-800 hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800", className);
|
|
28937
28990
|
$[0] = className;
|
|
28938
28991
|
$[1] = t1;
|
|
28939
28992
|
} else {
|
|
@@ -29600,98 +29653,99 @@ function SelectInputLabel(t0) {
|
|
|
29600
29653
|
}
|
|
29601
29654
|
const MultiSelectContext = React.createContext({});
|
|
29602
29655
|
const MultiSelect = React.forwardRef((t0, ref) => {
|
|
29603
|
-
const $ = c(
|
|
29656
|
+
const $ = c(102);
|
|
29604
29657
|
const {
|
|
29605
29658
|
value,
|
|
29606
|
-
size,
|
|
29659
|
+
size: t1,
|
|
29607
29660
|
label,
|
|
29608
29661
|
error,
|
|
29609
29662
|
onValueChange,
|
|
29610
29663
|
invisible,
|
|
29611
29664
|
disabled,
|
|
29612
29665
|
placeholder,
|
|
29613
|
-
modalPopover:
|
|
29614
|
-
includeClear:
|
|
29615
|
-
includeSelectAll:
|
|
29616
|
-
useChips:
|
|
29666
|
+
modalPopover: t2,
|
|
29667
|
+
includeClear: t3,
|
|
29668
|
+
includeSelectAll: t4,
|
|
29669
|
+
useChips: t5,
|
|
29617
29670
|
className,
|
|
29618
29671
|
children,
|
|
29619
29672
|
renderValues,
|
|
29620
29673
|
open,
|
|
29621
29674
|
onOpenChange
|
|
29622
29675
|
} = t0;
|
|
29623
|
-
const
|
|
29624
|
-
const
|
|
29625
|
-
const
|
|
29626
|
-
const
|
|
29676
|
+
const size = t1 === void 0 ? "large" : t1;
|
|
29677
|
+
const modalPopover = t2 === void 0 ? true : t2;
|
|
29678
|
+
const includeClear = t3 === void 0 ? true : t3;
|
|
29679
|
+
const includeSelectAll = t4 === void 0 ? true : t4;
|
|
29680
|
+
const useChips = t5 === void 0 ? true : t5;
|
|
29627
29681
|
const [isPopoverOpen, setIsPopoverOpen] = React.useState(open ?? false);
|
|
29628
|
-
let
|
|
29682
|
+
let t6;
|
|
29629
29683
|
if ($[0] !== value) {
|
|
29630
|
-
|
|
29684
|
+
t6 = value ?? [];
|
|
29631
29685
|
$[0] = value;
|
|
29632
|
-
$[1] =
|
|
29686
|
+
$[1] = t6;
|
|
29633
29687
|
} else {
|
|
29634
|
-
|
|
29688
|
+
t6 = $[1];
|
|
29635
29689
|
}
|
|
29636
|
-
const [selectedValues, setSelectedValues] = React.useState(
|
|
29637
|
-
let
|
|
29690
|
+
const [selectedValues, setSelectedValues] = React.useState(t6);
|
|
29691
|
+
let t7;
|
|
29638
29692
|
if ($[2] !== onOpenChange) {
|
|
29639
|
-
|
|
29693
|
+
t7 = (open_0) => {
|
|
29640
29694
|
setIsPopoverOpen(open_0);
|
|
29641
29695
|
onOpenChange?.(open_0);
|
|
29642
29696
|
};
|
|
29643
29697
|
$[2] = onOpenChange;
|
|
29644
|
-
$[3] =
|
|
29698
|
+
$[3] = t7;
|
|
29645
29699
|
} else {
|
|
29646
|
-
|
|
29700
|
+
t7 = $[3];
|
|
29647
29701
|
}
|
|
29648
|
-
const onPopoverOpenChange =
|
|
29649
|
-
let t7;
|
|
29702
|
+
const onPopoverOpenChange = t7;
|
|
29650
29703
|
let t8;
|
|
29704
|
+
let t9;
|
|
29651
29705
|
if ($[4] !== open) {
|
|
29652
|
-
|
|
29706
|
+
t8 = () => {
|
|
29653
29707
|
setIsPopoverOpen(open ?? false);
|
|
29654
29708
|
};
|
|
29655
|
-
|
|
29709
|
+
t9 = [open];
|
|
29656
29710
|
$[4] = open;
|
|
29657
|
-
$[5] =
|
|
29658
|
-
$[6] =
|
|
29711
|
+
$[5] = t8;
|
|
29712
|
+
$[6] = t9;
|
|
29659
29713
|
} else {
|
|
29660
|
-
|
|
29661
|
-
|
|
29714
|
+
t8 = $[5];
|
|
29715
|
+
t9 = $[6];
|
|
29662
29716
|
}
|
|
29663
|
-
useEffect(
|
|
29664
|
-
let
|
|
29717
|
+
useEffect(t8, t9);
|
|
29718
|
+
let t10;
|
|
29665
29719
|
if ($[7] !== children) {
|
|
29666
|
-
|
|
29720
|
+
t10 = children ? Children.map(children, _temp$1).filter(Boolean) : [];
|
|
29667
29721
|
$[7] = children;
|
|
29668
|
-
$[8] =
|
|
29722
|
+
$[8] = t10;
|
|
29669
29723
|
} else {
|
|
29670
|
-
|
|
29724
|
+
t10 = $[8];
|
|
29671
29725
|
}
|
|
29672
|
-
const allValues =
|
|
29673
|
-
let t10;
|
|
29726
|
+
const allValues = t10;
|
|
29674
29727
|
let t11;
|
|
29728
|
+
let t12;
|
|
29675
29729
|
if ($[9] !== value) {
|
|
29676
|
-
|
|
29730
|
+
t11 = () => {
|
|
29677
29731
|
setSelectedValues(value ?? []);
|
|
29678
29732
|
};
|
|
29679
|
-
|
|
29733
|
+
t12 = [value];
|
|
29680
29734
|
$[9] = value;
|
|
29681
|
-
$[10] =
|
|
29682
|
-
$[11] =
|
|
29735
|
+
$[10] = t11;
|
|
29736
|
+
$[11] = t12;
|
|
29683
29737
|
} else {
|
|
29684
|
-
|
|
29685
|
-
|
|
29738
|
+
t11 = $[10];
|
|
29739
|
+
t12 = $[11];
|
|
29686
29740
|
}
|
|
29687
|
-
React.useEffect(
|
|
29741
|
+
React.useEffect(t11, t12);
|
|
29688
29742
|
let onItemClick;
|
|
29689
29743
|
let updateValues;
|
|
29690
29744
|
if ($[12] !== onValueChange || $[13] !== selectedValues) {
|
|
29691
29745
|
onItemClick = function onItemClick2(newValue) {
|
|
29692
29746
|
let newSelectedValues;
|
|
29693
|
-
if (selectedValues.
|
|
29694
|
-
newSelectedValues = selectedValues.filter((v) => v !== newValue);
|
|
29747
|
+
if (selectedValues.some((v_0) => String(v_0) === String(newValue))) {
|
|
29748
|
+
newSelectedValues = selectedValues.filter((v) => String(v) !== String(newValue));
|
|
29695
29749
|
} else {
|
|
29696
29750
|
newSelectedValues = [...selectedValues, newValue];
|
|
29697
29751
|
}
|
|
@@ -29709,9 +29763,9 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
|
29709
29763
|
onItemClick = $[14];
|
|
29710
29764
|
updateValues = $[15];
|
|
29711
29765
|
}
|
|
29712
|
-
let
|
|
29766
|
+
let t13;
|
|
29713
29767
|
if ($[16] !== onPopoverOpenChange || $[17] !== selectedValues || $[18] !== updateValues) {
|
|
29714
|
-
|
|
29768
|
+
t13 = (event) => {
|
|
29715
29769
|
if (event.key === "Enter") {
|
|
29716
29770
|
onPopoverOpenChange(true);
|
|
29717
29771
|
} else {
|
|
@@ -29725,50 +29779,50 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
|
29725
29779
|
$[16] = onPopoverOpenChange;
|
|
29726
29780
|
$[17] = selectedValues;
|
|
29727
29781
|
$[18] = updateValues;
|
|
29728
|
-
$[19] =
|
|
29782
|
+
$[19] = t13;
|
|
29729
29783
|
} else {
|
|
29730
|
-
|
|
29784
|
+
t13 = $[19];
|
|
29731
29785
|
}
|
|
29732
|
-
const handleInputKeyDown =
|
|
29733
|
-
let
|
|
29786
|
+
const handleInputKeyDown = t13;
|
|
29787
|
+
let t14;
|
|
29734
29788
|
if ($[20] !== selectedValues || $[21] !== updateValues) {
|
|
29735
|
-
|
|
29736
|
-
const newSelectedValues_1 = selectedValues.
|
|
29789
|
+
t14 = (value_0) => {
|
|
29790
|
+
const newSelectedValues_1 = selectedValues.some((v_2) => String(v_2) === String(value_0)) ? selectedValues.filter((v_1) => String(v_1) !== String(value_0)) : [...selectedValues, value_0];
|
|
29737
29791
|
updateValues(newSelectedValues_1);
|
|
29738
29792
|
};
|
|
29739
29793
|
$[20] = selectedValues;
|
|
29740
29794
|
$[21] = updateValues;
|
|
29741
|
-
$[22] =
|
|
29795
|
+
$[22] = t14;
|
|
29742
29796
|
} else {
|
|
29743
|
-
|
|
29797
|
+
t14 = $[22];
|
|
29744
29798
|
}
|
|
29745
|
-
const toggleOption =
|
|
29746
|
-
let
|
|
29799
|
+
const toggleOption = t14;
|
|
29800
|
+
let t15;
|
|
29747
29801
|
if ($[23] !== updateValues) {
|
|
29748
|
-
|
|
29802
|
+
t15 = () => {
|
|
29749
29803
|
updateValues([]);
|
|
29750
29804
|
};
|
|
29751
29805
|
$[23] = updateValues;
|
|
29752
|
-
$[24] =
|
|
29806
|
+
$[24] = t15;
|
|
29753
29807
|
} else {
|
|
29754
|
-
|
|
29808
|
+
t15 = $[24];
|
|
29755
29809
|
}
|
|
29756
|
-
const handleClear =
|
|
29757
|
-
let
|
|
29810
|
+
const handleClear = t15;
|
|
29811
|
+
let t16;
|
|
29758
29812
|
if ($[25] !== isPopoverOpen || $[26] !== onPopoverOpenChange) {
|
|
29759
|
-
|
|
29813
|
+
t16 = () => {
|
|
29760
29814
|
onPopoverOpenChange(!isPopoverOpen);
|
|
29761
29815
|
};
|
|
29762
29816
|
$[25] = isPopoverOpen;
|
|
29763
29817
|
$[26] = onPopoverOpenChange;
|
|
29764
|
-
$[27] =
|
|
29818
|
+
$[27] = t16;
|
|
29765
29819
|
} else {
|
|
29766
|
-
|
|
29820
|
+
t16 = $[27];
|
|
29767
29821
|
}
|
|
29768
|
-
const handleTogglePopover =
|
|
29769
|
-
let
|
|
29822
|
+
const handleTogglePopover = t16;
|
|
29823
|
+
let t17;
|
|
29770
29824
|
if ($[28] !== allValues || $[29] !== handleClear || $[30] !== onPopoverOpenChange || $[31] !== selectedValues.length || $[32] !== updateValues) {
|
|
29771
|
-
|
|
29825
|
+
t17 = () => {
|
|
29772
29826
|
if (selectedValues.length === allValues.length) {
|
|
29773
29827
|
handleClear();
|
|
29774
29828
|
} else {
|
|
@@ -29781,60 +29835,76 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
|
29781
29835
|
$[30] = onPopoverOpenChange;
|
|
29782
29836
|
$[31] = selectedValues.length;
|
|
29783
29837
|
$[32] = updateValues;
|
|
29784
|
-
$[33] =
|
|
29838
|
+
$[33] = t17;
|
|
29785
29839
|
} else {
|
|
29786
|
-
|
|
29840
|
+
t17 = $[33];
|
|
29787
29841
|
}
|
|
29788
|
-
const toggleAll =
|
|
29842
|
+
const toggleAll = t17;
|
|
29789
29843
|
useInjectStyles("MultiSelect", `
|
|
29790
29844
|
[cmdk-group] {
|
|
29791
29845
|
max-height: 45vh;
|
|
29792
29846
|
overflow-y: auto;
|
|
29793
29847
|
// width: 400px;
|
|
29794
29848
|
} `);
|
|
29795
|
-
let
|
|
29849
|
+
let t18;
|
|
29796
29850
|
if ($[34] !== onItemClick || $[35] !== selectedValues) {
|
|
29797
|
-
|
|
29851
|
+
t18 = {
|
|
29798
29852
|
fieldValue: selectedValues,
|
|
29799
29853
|
onItemClick
|
|
29800
29854
|
};
|
|
29801
29855
|
$[34] = onItemClick;
|
|
29802
29856
|
$[35] = selectedValues;
|
|
29803
|
-
$[36] =
|
|
29857
|
+
$[36] = t18;
|
|
29804
29858
|
} else {
|
|
29805
|
-
|
|
29859
|
+
t18 = $[36];
|
|
29806
29860
|
}
|
|
29807
|
-
let
|
|
29861
|
+
let t19;
|
|
29808
29862
|
if ($[37] !== error || $[38] !== label) {
|
|
29809
|
-
|
|
29863
|
+
t19 = typeof label === "string" ? /* @__PURE__ */ jsx(SelectInputLabel, { error, children: label }) : label;
|
|
29810
29864
|
$[37] = error;
|
|
29811
29865
|
$[38] = label;
|
|
29812
|
-
$[39] =
|
|
29866
|
+
$[39] = t19;
|
|
29813
29867
|
} else {
|
|
29814
|
-
|
|
29868
|
+
t19 = $[39];
|
|
29815
29869
|
}
|
|
29816
|
-
const
|
|
29817
|
-
const
|
|
29818
|
-
const
|
|
29819
|
-
|
|
29820
|
-
|
|
29821
|
-
|
|
29870
|
+
const t20 = size === "smallest";
|
|
29871
|
+
const t21 = size === "small";
|
|
29872
|
+
const t22 = size === "medium";
|
|
29873
|
+
const t23 = size === "large";
|
|
29874
|
+
let t24;
|
|
29875
|
+
if ($[40] !== className || $[41] !== disabled || $[42] !== invisible || $[43] !== size || $[44] !== t20 || $[45] !== t21 || $[46] !== t22 || $[47] !== t23) {
|
|
29876
|
+
t24 = cls({
|
|
29877
|
+
"min-h-[28px]": t20,
|
|
29878
|
+
"min-h-[32px]": t21,
|
|
29879
|
+
"min-h-[42px]": t22,
|
|
29880
|
+
"min-h-[64px]": t23
|
|
29881
|
+
}, {
|
|
29882
|
+
"py-1": size === "small" || size === "smallest",
|
|
29883
|
+
"py-2": size === "medium" || size === "large"
|
|
29884
|
+
}, {
|
|
29885
|
+
"px-2": size === "small" || size === "smallest",
|
|
29886
|
+
"px-4": size === "medium" || size === "large"
|
|
29887
|
+
}, "select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className);
|
|
29822
29888
|
$[40] = className;
|
|
29823
|
-
$[41] =
|
|
29824
|
-
$[42] =
|
|
29825
|
-
$[43] =
|
|
29826
|
-
$[44] =
|
|
29889
|
+
$[41] = disabled;
|
|
29890
|
+
$[42] = invisible;
|
|
29891
|
+
$[43] = size;
|
|
29892
|
+
$[44] = t20;
|
|
29893
|
+
$[45] = t21;
|
|
29894
|
+
$[46] = t22;
|
|
29895
|
+
$[47] = t23;
|
|
29896
|
+
$[48] = t24;
|
|
29827
29897
|
} else {
|
|
29828
|
-
|
|
29898
|
+
t24 = $[48];
|
|
29829
29899
|
}
|
|
29830
|
-
let
|
|
29831
|
-
if ($[
|
|
29832
|
-
|
|
29900
|
+
let t25;
|
|
29901
|
+
if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !== toggleOption || $[57] !== useChips) {
|
|
29902
|
+
t25 = selectedValues.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center w-full", children: [
|
|
29833
29903
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-start", children: [
|
|
29834
29904
|
renderValues && renderValues(selectedValues),
|
|
29835
29905
|
!renderValues && selectedValues.map((value_1) => {
|
|
29836
29906
|
const childrenProps = Children.map(children, _temp2).filter(Boolean);
|
|
29837
|
-
const option = childrenProps.find((o) => o.value === value_1);
|
|
29907
|
+
const option = childrenProps.find((o) => String(o.value) === String(value_1));
|
|
29838
29908
|
if (!useChips) {
|
|
29839
29909
|
return option?.children;
|
|
29840
29910
|
}
|
|
@@ -29844,7 +29914,7 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
|
29844
29914
|
event_0.stopPropagation();
|
|
29845
29915
|
toggleOption(value_1);
|
|
29846
29916
|
} })
|
|
29847
|
-
] }, value_1);
|
|
29917
|
+
] }, String(value_1));
|
|
29848
29918
|
})
|
|
29849
29919
|
] }),
|
|
29850
29920
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
@@ -29858,179 +29928,179 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
|
29858
29928
|
/* @__PURE__ */ jsx("span", { className: "text-sm", children: placeholder }),
|
|
29859
29929
|
/* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
|
|
29860
29930
|
] });
|
|
29861
|
-
$[
|
|
29862
|
-
$[
|
|
29863
|
-
$[
|
|
29864
|
-
$[
|
|
29865
|
-
$[
|
|
29866
|
-
$[
|
|
29867
|
-
$[
|
|
29868
|
-
$[
|
|
29869
|
-
$[
|
|
29870
|
-
$[
|
|
29871
|
-
} else {
|
|
29872
|
-
|
|
29873
|
-
}
|
|
29874
|
-
let t24;
|
|
29875
|
-
if ($[55] !== handleTogglePopover || $[56] !== ref || $[57] !== t22 || $[58] !== t23) {
|
|
29876
|
-
t24 = /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { ref, onClick: handleTogglePopover, className: t22, children: t23 }) });
|
|
29877
|
-
$[55] = handleTogglePopover;
|
|
29878
|
-
$[56] = ref;
|
|
29879
|
-
$[57] = t22;
|
|
29880
|
-
$[58] = t23;
|
|
29881
|
-
$[59] = t24;
|
|
29882
|
-
} else {
|
|
29883
|
-
t24 = $[59];
|
|
29884
|
-
}
|
|
29885
|
-
let t25;
|
|
29886
|
-
if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29887
|
-
t25 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
|
|
29888
|
-
$[60] = t25;
|
|
29889
|
-
} else {
|
|
29890
|
-
t25 = $[60];
|
|
29931
|
+
$[49] = children;
|
|
29932
|
+
$[50] = handleClear;
|
|
29933
|
+
$[51] = includeClear;
|
|
29934
|
+
$[52] = isPopoverOpen;
|
|
29935
|
+
$[53] = placeholder;
|
|
29936
|
+
$[54] = renderValues;
|
|
29937
|
+
$[55] = selectedValues;
|
|
29938
|
+
$[56] = toggleOption;
|
|
29939
|
+
$[57] = useChips;
|
|
29940
|
+
$[58] = t25;
|
|
29941
|
+
} else {
|
|
29942
|
+
t25 = $[58];
|
|
29891
29943
|
}
|
|
29892
29944
|
let t26;
|
|
29893
|
-
if ($[61] !==
|
|
29894
|
-
t26 = (
|
|
29895
|
-
$[
|
|
29896
|
-
$[
|
|
29945
|
+
if ($[59] !== handleTogglePopover || $[60] !== ref || $[61] !== t24 || $[62] !== t25) {
|
|
29946
|
+
t26 = /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { ref, onClick: handleTogglePopover, className: t24, children: t25 }) });
|
|
29947
|
+
$[59] = handleTogglePopover;
|
|
29948
|
+
$[60] = ref;
|
|
29949
|
+
$[61] = t24;
|
|
29950
|
+
$[62] = t25;
|
|
29951
|
+
$[63] = t26;
|
|
29897
29952
|
} else {
|
|
29898
|
-
t26 = $[
|
|
29953
|
+
t26 = $[63];
|
|
29899
29954
|
}
|
|
29900
29955
|
let t27;
|
|
29901
|
-
if ($[
|
|
29902
|
-
t27 = cls(
|
|
29903
|
-
$[
|
|
29956
|
+
if ($[64] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29957
|
+
t27 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
|
|
29958
|
+
$[64] = t27;
|
|
29904
29959
|
} else {
|
|
29905
|
-
t27 = $[
|
|
29960
|
+
t27 = $[64];
|
|
29906
29961
|
}
|
|
29907
29962
|
let t28;
|
|
29908
|
-
if ($[
|
|
29909
|
-
t28 =
|
|
29910
|
-
$[
|
|
29911
|
-
$[
|
|
29963
|
+
if ($[65] !== onPopoverOpenChange) {
|
|
29964
|
+
t28 = () => onPopoverOpenChange(false);
|
|
29965
|
+
$[65] = onPopoverOpenChange;
|
|
29966
|
+
$[66] = t28;
|
|
29912
29967
|
} else {
|
|
29913
|
-
t28 = $[
|
|
29968
|
+
t28 = $[66];
|
|
29914
29969
|
}
|
|
29915
29970
|
let t29;
|
|
29916
|
-
if ($[
|
|
29917
|
-
t29 =
|
|
29918
|
-
$[
|
|
29919
|
-
$[67] = selectedValues.length;
|
|
29920
|
-
$[68] = t29;
|
|
29971
|
+
if ($[67] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29972
|
+
t29 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow ");
|
|
29973
|
+
$[67] = t29;
|
|
29921
29974
|
} else {
|
|
29922
|
-
t29 = $[
|
|
29975
|
+
t29 = $[67];
|
|
29923
29976
|
}
|
|
29924
29977
|
let t30;
|
|
29925
|
-
if ($[
|
|
29926
|
-
t30 = /* @__PURE__ */
|
|
29927
|
-
|
|
29928
|
-
|
|
29929
|
-
] });
|
|
29930
|
-
$[69] = t28;
|
|
29931
|
-
$[70] = t29;
|
|
29932
|
-
$[71] = t30;
|
|
29978
|
+
if ($[68] !== handleInputKeyDown) {
|
|
29979
|
+
t30 = /* @__PURE__ */ jsx(Command.Input, { className: t29, placeholder: "Search...", onKeyDown: handleInputKeyDown });
|
|
29980
|
+
$[68] = handleInputKeyDown;
|
|
29981
|
+
$[69] = t30;
|
|
29933
29982
|
} else {
|
|
29934
|
-
t30 = $[
|
|
29983
|
+
t30 = $[69];
|
|
29935
29984
|
}
|
|
29936
29985
|
let t31;
|
|
29937
|
-
if ($[
|
|
29938
|
-
t31 = /* @__PURE__ */ jsx(
|
|
29986
|
+
if ($[70] !== handleClear || $[71] !== selectedValues.length) {
|
|
29987
|
+
t31 = selectedValues.length > 0 && /* @__PURE__ */ jsx("div", { onClick: handleClear, className: "text-sm justify-center cursor-pointer py-3 px-4 text-text-secondary dark:text-text-secondary-dark", children: "Clear" });
|
|
29988
|
+
$[70] = handleClear;
|
|
29989
|
+
$[71] = selectedValues.length;
|
|
29939
29990
|
$[72] = t31;
|
|
29940
29991
|
} else {
|
|
29941
29992
|
t31 = $[72];
|
|
29942
29993
|
}
|
|
29943
29994
|
let t32;
|
|
29944
|
-
if ($[73]
|
|
29945
|
-
t32 = /* @__PURE__ */
|
|
29946
|
-
|
|
29995
|
+
if ($[73] !== t30 || $[74] !== t31) {
|
|
29996
|
+
t32 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center", children: [
|
|
29997
|
+
t30,
|
|
29998
|
+
t31
|
|
29999
|
+
] });
|
|
30000
|
+
$[73] = t30;
|
|
30001
|
+
$[74] = t31;
|
|
30002
|
+
$[75] = t32;
|
|
29947
30003
|
} else {
|
|
29948
|
-
t32 = $[
|
|
30004
|
+
t32 = $[75];
|
|
29949
30005
|
}
|
|
29950
30006
|
let t33;
|
|
29951
|
-
if ($[
|
|
29952
|
-
t33 =
|
|
30007
|
+
if ($[76] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30008
|
+
t33 = /* @__PURE__ */ jsx(Separator, { orientation: "horizontal", className: "my-0" });
|
|
30009
|
+
$[76] = t33;
|
|
30010
|
+
} else {
|
|
30011
|
+
t33 = $[76];
|
|
30012
|
+
}
|
|
30013
|
+
let t34;
|
|
30014
|
+
if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30015
|
+
t34 = /* @__PURE__ */ jsx(Command.Empty, { className: "px-4 py-2", children: "No results found." });
|
|
30016
|
+
$[77] = t34;
|
|
30017
|
+
} else {
|
|
30018
|
+
t34 = $[77];
|
|
30019
|
+
}
|
|
30020
|
+
let t35;
|
|
30021
|
+
if ($[78] !== allValues.length || $[79] !== includeSelectAll || $[80] !== selectedValues.length || $[81] !== toggleAll) {
|
|
30022
|
+
t35 = includeSelectAll && /* @__PURE__ */ jsxs(Command.Item, { onSelect: toggleAll, className: cls("flex flex-row items-center gap-1.5", "cursor-pointer", "m-1", "ring-offset-transparent", "p-1 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-offset-2", "aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900", "cursor-pointer p-2 rounded aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900"), children: [
|
|
29953
30023
|
/* @__PURE__ */ jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
|
|
29954
30024
|
/* @__PURE__ */ jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
|
|
29955
30025
|
] }, "all");
|
|
29956
|
-
$[
|
|
29957
|
-
$[
|
|
29958
|
-
$[
|
|
29959
|
-
$[
|
|
29960
|
-
$[
|
|
30026
|
+
$[78] = allValues.length;
|
|
30027
|
+
$[79] = includeSelectAll;
|
|
30028
|
+
$[80] = selectedValues.length;
|
|
30029
|
+
$[81] = toggleAll;
|
|
30030
|
+
$[82] = t35;
|
|
29961
30031
|
} else {
|
|
29962
|
-
|
|
30032
|
+
t35 = $[82];
|
|
29963
30033
|
}
|
|
29964
|
-
let
|
|
29965
|
-
if ($[
|
|
29966
|
-
|
|
29967
|
-
|
|
30034
|
+
let t36;
|
|
30035
|
+
if ($[83] !== children || $[84] !== t35) {
|
|
30036
|
+
t36 = /* @__PURE__ */ jsxs(Command.List, { children: [
|
|
30037
|
+
t34,
|
|
29968
30038
|
/* @__PURE__ */ jsxs(Command.Group, { children: [
|
|
29969
|
-
|
|
30039
|
+
t35,
|
|
29970
30040
|
children
|
|
29971
30041
|
] })
|
|
29972
30042
|
] });
|
|
29973
|
-
$[
|
|
29974
|
-
$[80] = t33;
|
|
29975
|
-
$[81] = t34;
|
|
29976
|
-
} else {
|
|
29977
|
-
t34 = $[81];
|
|
29978
|
-
}
|
|
29979
|
-
let t35;
|
|
29980
|
-
if ($[82] !== t30 || $[83] !== t34) {
|
|
29981
|
-
t35 = /* @__PURE__ */ jsxs(Command, { children: [
|
|
29982
|
-
t30,
|
|
29983
|
-
t31,
|
|
29984
|
-
t34
|
|
29985
|
-
] });
|
|
29986
|
-
$[82] = t30;
|
|
29987
|
-
$[83] = t34;
|
|
30043
|
+
$[83] = children;
|
|
29988
30044
|
$[84] = t35;
|
|
30045
|
+
$[85] = t36;
|
|
29989
30046
|
} else {
|
|
29990
|
-
|
|
29991
|
-
}
|
|
29992
|
-
let t36;
|
|
29993
|
-
if ($[85] !== t26 || $[86] !== t35) {
|
|
29994
|
-
t36 = /* @__PURE__ */ jsx(PopoverPrimitive.Content, { className: t25, align: "start", sideOffset: 8, onEscapeKeyDown: t26, children: t35 });
|
|
29995
|
-
$[85] = t26;
|
|
29996
|
-
$[86] = t35;
|
|
29997
|
-
$[87] = t36;
|
|
29998
|
-
} else {
|
|
29999
|
-
t36 = $[87];
|
|
30047
|
+
t36 = $[85];
|
|
30000
30048
|
}
|
|
30001
30049
|
let t37;
|
|
30002
|
-
if ($[
|
|
30003
|
-
t37 = /* @__PURE__ */ jsxs(
|
|
30004
|
-
|
|
30050
|
+
if ($[86] !== t32 || $[87] !== t36) {
|
|
30051
|
+
t37 = /* @__PURE__ */ jsxs(Command, { children: [
|
|
30052
|
+
t32,
|
|
30053
|
+
t33,
|
|
30005
30054
|
t36
|
|
30006
30055
|
] });
|
|
30007
|
-
$[
|
|
30008
|
-
$[
|
|
30009
|
-
$[
|
|
30010
|
-
$[91] = t24;
|
|
30011
|
-
$[92] = t36;
|
|
30012
|
-
$[93] = t37;
|
|
30056
|
+
$[86] = t32;
|
|
30057
|
+
$[87] = t36;
|
|
30058
|
+
$[88] = t37;
|
|
30013
30059
|
} else {
|
|
30014
|
-
t37 = $[
|
|
30060
|
+
t37 = $[88];
|
|
30015
30061
|
}
|
|
30016
30062
|
let t38;
|
|
30017
|
-
if ($[
|
|
30018
|
-
t38 = /* @__PURE__ */
|
|
30019
|
-
|
|
30020
|
-
|
|
30063
|
+
if ($[89] !== t28 || $[90] !== t37) {
|
|
30064
|
+
t38 = /* @__PURE__ */ jsx(PopoverPrimitive.Content, { className: t27, align: "start", sideOffset: 8, onEscapeKeyDown: t28, children: t37 });
|
|
30065
|
+
$[89] = t28;
|
|
30066
|
+
$[90] = t37;
|
|
30067
|
+
$[91] = t38;
|
|
30068
|
+
} else {
|
|
30069
|
+
t38 = $[91];
|
|
30070
|
+
}
|
|
30071
|
+
let t39;
|
|
30072
|
+
if ($[92] !== isPopoverOpen || $[93] !== modalPopover || $[94] !== onPopoverOpenChange || $[95] !== t26 || $[96] !== t38) {
|
|
30073
|
+
t39 = /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open: isPopoverOpen, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
|
|
30074
|
+
t26,
|
|
30075
|
+
t38
|
|
30021
30076
|
] });
|
|
30022
|
-
$[
|
|
30023
|
-
$[
|
|
30024
|
-
$[
|
|
30025
|
-
$[
|
|
30077
|
+
$[92] = isPopoverOpen;
|
|
30078
|
+
$[93] = modalPopover;
|
|
30079
|
+
$[94] = onPopoverOpenChange;
|
|
30080
|
+
$[95] = t26;
|
|
30081
|
+
$[96] = t38;
|
|
30082
|
+
$[97] = t39;
|
|
30083
|
+
} else {
|
|
30084
|
+
t39 = $[97];
|
|
30085
|
+
}
|
|
30086
|
+
let t40;
|
|
30087
|
+
if ($[98] !== t18 || $[99] !== t19 || $[100] !== t39) {
|
|
30088
|
+
t40 = /* @__PURE__ */ jsxs(MultiSelectContext.Provider, { value: t18, children: [
|
|
30089
|
+
t19,
|
|
30090
|
+
t39
|
|
30091
|
+
] });
|
|
30092
|
+
$[98] = t18;
|
|
30093
|
+
$[99] = t19;
|
|
30094
|
+
$[100] = t39;
|
|
30095
|
+
$[101] = t40;
|
|
30026
30096
|
} else {
|
|
30027
|
-
|
|
30097
|
+
t40 = $[101];
|
|
30028
30098
|
}
|
|
30029
|
-
return
|
|
30099
|
+
return t40;
|
|
30030
30100
|
});
|
|
30031
30101
|
MultiSelect.displayName = "MultiSelect";
|
|
30032
30102
|
function MultiSelectItem(t0) {
|
|
30033
|
-
const $ = c(
|
|
30103
|
+
const $ = c(20);
|
|
30034
30104
|
const {
|
|
30035
30105
|
children,
|
|
30036
30106
|
value,
|
|
@@ -30054,7 +30124,15 @@ function MultiSelectItem(t0) {
|
|
|
30054
30124
|
}
|
|
30055
30125
|
let t2;
|
|
30056
30126
|
if ($[2] !== t1 || $[3] !== value) {
|
|
30057
|
-
|
|
30127
|
+
let t32;
|
|
30128
|
+
if ($[5] !== value) {
|
|
30129
|
+
t32 = (v) => String(v) === String(value);
|
|
30130
|
+
$[5] = value;
|
|
30131
|
+
$[6] = t32;
|
|
30132
|
+
} else {
|
|
30133
|
+
t32 = $[6];
|
|
30134
|
+
}
|
|
30135
|
+
t2 = t1.some(t32);
|
|
30058
30136
|
$[2] = t1;
|
|
30059
30137
|
$[3] = value;
|
|
30060
30138
|
$[4] = t2;
|
|
@@ -30063,47 +30141,47 @@ function MultiSelectItem(t0) {
|
|
|
30063
30141
|
}
|
|
30064
30142
|
const isSelected = t2;
|
|
30065
30143
|
let t3;
|
|
30066
|
-
if ($[
|
|
30144
|
+
if ($[7] !== onItemClick || $[8] !== value) {
|
|
30067
30145
|
t3 = (_) => {
|
|
30068
30146
|
onItemClick(value);
|
|
30069
30147
|
};
|
|
30070
|
-
$[
|
|
30071
|
-
$[
|
|
30072
|
-
$[
|
|
30148
|
+
$[7] = onItemClick;
|
|
30149
|
+
$[8] = value;
|
|
30150
|
+
$[9] = t3;
|
|
30073
30151
|
} else {
|
|
30074
|
-
t3 = $[
|
|
30152
|
+
t3 = $[9];
|
|
30075
30153
|
}
|
|
30076
30154
|
const t4 = isSelected ? "bg-surface-accent-200 dark:bg-surface-accent-950" : "";
|
|
30077
30155
|
let t5;
|
|
30078
|
-
if ($[
|
|
30156
|
+
if ($[10] !== className || $[11] !== t4) {
|
|
30079
30157
|
t5 = cls("flex flex-row items-center gap-1.5", t4, "cursor-pointer", "m-1", "ring-offset-transparent", "p-1 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-offset-2", "aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900", "cursor-pointer p-2 rounded aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900", className);
|
|
30080
|
-
$[
|
|
30081
|
-
$[
|
|
30082
|
-
$[
|
|
30158
|
+
$[10] = className;
|
|
30159
|
+
$[11] = t4;
|
|
30160
|
+
$[12] = t5;
|
|
30083
30161
|
} else {
|
|
30084
|
-
t5 = $[
|
|
30162
|
+
t5 = $[12];
|
|
30085
30163
|
}
|
|
30086
30164
|
let t6;
|
|
30087
|
-
if ($[
|
|
30165
|
+
if ($[13] !== isSelected) {
|
|
30088
30166
|
t6 = /* @__PURE__ */ jsx(InnerCheckBox, { checked: isSelected });
|
|
30089
|
-
$[
|
|
30090
|
-
$[
|
|
30167
|
+
$[13] = isSelected;
|
|
30168
|
+
$[14] = t6;
|
|
30091
30169
|
} else {
|
|
30092
|
-
t6 = $[
|
|
30170
|
+
t6 = $[14];
|
|
30093
30171
|
}
|
|
30094
30172
|
let t7;
|
|
30095
|
-
if ($[
|
|
30173
|
+
if ($[15] !== children || $[16] !== t3 || $[17] !== t5 || $[18] !== t6) {
|
|
30096
30174
|
t7 = /* @__PURE__ */ jsxs(Command.Item, { onMouseDown: _temp3, onSelect: t3, className: t5, children: [
|
|
30097
30175
|
t6,
|
|
30098
30176
|
children
|
|
30099
30177
|
] });
|
|
30100
|
-
$[
|
|
30101
|
-
$[
|
|
30102
|
-
$[
|
|
30103
|
-
$[
|
|
30104
|
-
$[
|
|
30178
|
+
$[15] = children;
|
|
30179
|
+
$[16] = t3;
|
|
30180
|
+
$[17] = t5;
|
|
30181
|
+
$[18] = t6;
|
|
30182
|
+
$[19] = t7;
|
|
30105
30183
|
} else {
|
|
30106
|
-
t7 = $[
|
|
30184
|
+
t7 = $[19];
|
|
30107
30185
|
}
|
|
30108
30186
|
return t7;
|
|
30109
30187
|
}
|
|
@@ -30349,7 +30427,7 @@ function SearchBar(t0) {
|
|
|
30349
30427
|
}
|
|
30350
30428
|
let t9;
|
|
30351
30429
|
if ($[10] !== loading) {
|
|
30352
|
-
t9 = /* @__PURE__ */ jsx("div", { className: "absolute p-0 px-4 h-full pointer-events-none flex items-center justify-center top-0", children: loading ? /* @__PURE__ */ jsx(CircularProgress, { size: "
|
|
30430
|
+
t9 = /* @__PURE__ */ jsx("div", { className: "absolute p-0 px-4 h-full pointer-events-none flex items-center justify-center top-0", children: loading ? /* @__PURE__ */ jsx(CircularProgress, { size: "smallest" }) : /* @__PURE__ */ jsx(SearchIcon, { className: "text-text-disabled dark:text-text-disabled-dark" }) });
|
|
30353
30431
|
$[10] = loading;
|
|
30354
30432
|
$[11] = t9;
|
|
30355
30433
|
} else {
|
|
@@ -30465,25 +30543,31 @@ const Select = forwardRef(({
|
|
|
30465
30543
|
setOpenInternal(open ?? false);
|
|
30466
30544
|
}, [open]);
|
|
30467
30545
|
const onValueChangeInternal = useCallback((newValue) => {
|
|
30468
|
-
|
|
30546
|
+
let typedValue = newValue;
|
|
30547
|
+
if (newValue === "true") typedValue = true;
|
|
30548
|
+
else if (newValue === "false") typedValue = false;
|
|
30549
|
+
else if (!isNaN(Number(newValue)) && newValue.trim() !== "") typedValue = Number(newValue);
|
|
30550
|
+
onValueChange?.(typedValue);
|
|
30469
30551
|
if (onChange) {
|
|
30470
30552
|
const event = {
|
|
30471
30553
|
target: {
|
|
30472
30554
|
name,
|
|
30473
|
-
value:
|
|
30555
|
+
value: typedValue
|
|
30474
30556
|
}
|
|
30475
30557
|
};
|
|
30476
30558
|
onChange(event);
|
|
30477
30559
|
}
|
|
30478
|
-
}, [onChange,
|
|
30560
|
+
}, [onChange, onValueChange, name]);
|
|
30479
30561
|
const hasValue = Array.isArray(value) ? value.length > 0 : value != null && value !== "" && value !== void 0;
|
|
30480
|
-
|
|
30562
|
+
const stringValue = value !== void 0 ? String(value) : void 0;
|
|
30563
|
+
return /* @__PURE__ */ jsxs(SelectPrimitive.Root, { name, value: stringValue, open: openInternal, disabled, onValueChange: onValueChangeInternal, onOpenChange: (open_0) => {
|
|
30481
30564
|
onOpenChange?.(open_0);
|
|
30482
30565
|
setOpenInternal(open_0);
|
|
30483
30566
|
}, ...props, children: [
|
|
30484
30567
|
typeof label === "string" ? /* @__PURE__ */ jsx(SelectInputLabel, { error, children: label }) : label,
|
|
30485
30568
|
/* @__PURE__ */ jsx("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
|
|
30486
|
-
"min-h-[28px]": size === "
|
|
30569
|
+
"min-h-[28px]": size === "smallest",
|
|
30570
|
+
"min-h-[32px]": size === "small",
|
|
30487
30571
|
"min-h-[42px]": size === "medium",
|
|
30488
30572
|
"min-h-[64px]": size === "large",
|
|
30489
30573
|
"w-fit": !fullWidth,
|
|
@@ -30491,30 +30575,32 @@ const Select = forwardRef(({
|
|
|
30491
30575
|
}), children: /* @__PURE__ */ jsx(SelectPrimitive.Trigger, { ref: inputRef, id, asChild: true, children: /* @__PURE__ */ jsxs("div", { className: cls("h-full", padding ? {
|
|
30492
30576
|
"px-4": size === "large",
|
|
30493
30577
|
"px-3": size === "medium",
|
|
30494
|
-
"px-2": size === "small"
|
|
30578
|
+
"px-2": size === "small" || size === "smallest"
|
|
30495
30579
|
} : "", "outline-none focus:outline-none", "select-none rounded-md text-sm", error ? "text-red-500 dark:text-red-600" : "focus:text-text-primary dark:focus:text-text-primary-dark", error ? "border border-red-500 dark:border-red-600" : "", disabled ? "text-surface-accent-600 dark:text-surface-accent-400" : "text-surface-accent-800 dark:text-white", "relative flex flex-row items-center", {
|
|
30496
|
-
"min-h-[28px]": size === "
|
|
30580
|
+
"min-h-[28px]": size === "smallest",
|
|
30581
|
+
"min-h-[32px]": size === "small",
|
|
30497
30582
|
"min-h-[42px]": size === "medium",
|
|
30498
30583
|
"min-h-[64px]": size === "large",
|
|
30499
30584
|
"w-full": fullWidth,
|
|
30500
30585
|
"w-fit": !fullWidth
|
|
30501
30586
|
}, inputClassName), children: [
|
|
30502
30587
|
/* @__PURE__ */ jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
|
|
30503
|
-
"min-h-[28px]": size === "
|
|
30588
|
+
"min-h-[28px]": size === "smallest",
|
|
30589
|
+
"min-h-[32px]": size === "small",
|
|
30504
30590
|
"min-h-[42px]": size === "medium",
|
|
30505
30591
|
"min-h-[64px]": size === "large"
|
|
30506
30592
|
}), children: /* @__PURE__ */ jsxs(SelectPrimitive.Value, { onClick: (e) => {
|
|
30507
30593
|
e.preventDefault();
|
|
30508
30594
|
e.stopPropagation();
|
|
30509
30595
|
}, placeholder, className: "w-full", children: [
|
|
30510
|
-
hasValue && value && renderValue ? renderValue(value) : placeholder,
|
|
30596
|
+
hasValue && value !== void 0 && renderValue ? renderValue(value) : placeholder,
|
|
30511
30597
|
hasValue && !renderValue && (() => {
|
|
30512
30598
|
const childrenProps = Children.map(children, (child) => {
|
|
30513
30599
|
if (React__default.isValidElement(child)) {
|
|
30514
30600
|
return child.props;
|
|
30515
30601
|
}
|
|
30516
30602
|
}).filter(Boolean);
|
|
30517
|
-
const option = childrenProps.find((o) => o.value === value);
|
|
30603
|
+
const option = childrenProps.find((o) => String(o.value) === String(value));
|
|
30518
30604
|
return option?.children;
|
|
30519
30605
|
})()
|
|
30520
30606
|
] }) }),
|
|
@@ -30541,6 +30627,7 @@ function SelectItem(t0) {
|
|
|
30541
30627
|
disabled,
|
|
30542
30628
|
className
|
|
30543
30629
|
} = t0;
|
|
30630
|
+
const stringValue = String(value);
|
|
30544
30631
|
const t1 = disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer";
|
|
30545
30632
|
let t2;
|
|
30546
30633
|
if ($[0] !== className || $[1] !== t1) {
|
|
@@ -30567,15 +30654,15 @@ function SelectItem(t0) {
|
|
|
30567
30654
|
t4 = $[5];
|
|
30568
30655
|
}
|
|
30569
30656
|
let t5;
|
|
30570
|
-
if ($[6] !== disabled || $[7] !==
|
|
30571
|
-
t5 = /* @__PURE__ */ jsxs(SelectPrimitive.Item, { value, disabled, className: t2, children: [
|
|
30657
|
+
if ($[6] !== disabled || $[7] !== stringValue || $[8] !== t2 || $[9] !== t3) {
|
|
30658
|
+
t5 = /* @__PURE__ */ jsxs(SelectPrimitive.Item, { value: stringValue, disabled, className: t2, children: [
|
|
30572
30659
|
t3,
|
|
30573
30660
|
t4
|
|
30574
|
-
] },
|
|
30661
|
+
] }, stringValue);
|
|
30575
30662
|
$[6] = disabled;
|
|
30576
|
-
$[7] =
|
|
30577
|
-
$[8] =
|
|
30578
|
-
$[9] =
|
|
30663
|
+
$[7] = stringValue;
|
|
30664
|
+
$[8] = t2;
|
|
30665
|
+
$[9] = t3;
|
|
30579
30666
|
$[10] = t5;
|
|
30580
30667
|
} else {
|
|
30581
30668
|
t5 = $[10];
|
|
@@ -30807,13 +30894,15 @@ const Slider = React.forwardRef((t0, ref) => {
|
|
|
30807
30894
|
});
|
|
30808
30895
|
Slider.displayName = "Slider";
|
|
30809
30896
|
const Sheet = (t0) => {
|
|
30810
|
-
const $ = c(
|
|
30897
|
+
const $ = c(66);
|
|
30811
30898
|
let children;
|
|
30812
30899
|
let className;
|
|
30813
30900
|
let onOpenChange;
|
|
30814
30901
|
let open;
|
|
30815
30902
|
let overlayClassName;
|
|
30903
|
+
let overlayStyle;
|
|
30816
30904
|
let props;
|
|
30905
|
+
let style;
|
|
30817
30906
|
let t1;
|
|
30818
30907
|
let t2;
|
|
30819
30908
|
let t3;
|
|
@@ -30830,7 +30919,9 @@ const Sheet = (t0) => {
|
|
|
30830
30919
|
onOpenChange,
|
|
30831
30920
|
transparent,
|
|
30832
30921
|
className,
|
|
30922
|
+
style,
|
|
30833
30923
|
overlayClassName,
|
|
30924
|
+
overlayStyle,
|
|
30834
30925
|
...props
|
|
30835
30926
|
} = t0);
|
|
30836
30927
|
$[0] = t0;
|
|
@@ -30839,24 +30930,28 @@ const Sheet = (t0) => {
|
|
|
30839
30930
|
$[3] = onOpenChange;
|
|
30840
30931
|
$[4] = open;
|
|
30841
30932
|
$[5] = overlayClassName;
|
|
30842
|
-
$[6] =
|
|
30843
|
-
$[7] =
|
|
30844
|
-
$[8] =
|
|
30845
|
-
$[9] =
|
|
30846
|
-
$[10] =
|
|
30847
|
-
$[11] =
|
|
30933
|
+
$[6] = overlayStyle;
|
|
30934
|
+
$[7] = props;
|
|
30935
|
+
$[8] = style;
|
|
30936
|
+
$[9] = t1;
|
|
30937
|
+
$[10] = t2;
|
|
30938
|
+
$[11] = t3;
|
|
30939
|
+
$[12] = title;
|
|
30940
|
+
$[13] = transparent;
|
|
30848
30941
|
} else {
|
|
30849
30942
|
children = $[1];
|
|
30850
30943
|
className = $[2];
|
|
30851
30944
|
onOpenChange = $[3];
|
|
30852
30945
|
open = $[4];
|
|
30853
30946
|
overlayClassName = $[5];
|
|
30854
|
-
|
|
30855
|
-
|
|
30856
|
-
|
|
30857
|
-
|
|
30858
|
-
|
|
30859
|
-
|
|
30947
|
+
overlayStyle = $[6];
|
|
30948
|
+
props = $[7];
|
|
30949
|
+
style = $[8];
|
|
30950
|
+
t1 = $[9];
|
|
30951
|
+
t2 = $[10];
|
|
30952
|
+
t3 = $[11];
|
|
30953
|
+
title = $[12];
|
|
30954
|
+
transparent = $[13];
|
|
30860
30955
|
}
|
|
30861
30956
|
const side = t1 === void 0 ? "right" : t1;
|
|
30862
30957
|
const modal = t2 === void 0 ? true : t2;
|
|
@@ -30864,7 +30959,7 @@ const Sheet = (t0) => {
|
|
|
30864
30959
|
const [displayed, setDisplayed] = useState(false);
|
|
30865
30960
|
let t4;
|
|
30866
30961
|
let t5;
|
|
30867
|
-
if ($[
|
|
30962
|
+
if ($[14] !== open) {
|
|
30868
30963
|
t4 = () => {
|
|
30869
30964
|
const timeout = setTimeout(() => {
|
|
30870
30965
|
setDisplayed(open);
|
|
@@ -30872,12 +30967,12 @@ const Sheet = (t0) => {
|
|
|
30872
30967
|
return () => clearTimeout(timeout);
|
|
30873
30968
|
};
|
|
30874
30969
|
t5 = [open];
|
|
30875
|
-
$[
|
|
30876
|
-
$[
|
|
30877
|
-
$[
|
|
30970
|
+
$[14] = open;
|
|
30971
|
+
$[15] = t4;
|
|
30972
|
+
$[16] = t5;
|
|
30878
30973
|
} else {
|
|
30879
|
-
t4 = $[
|
|
30880
|
-
t5 = $[
|
|
30974
|
+
t4 = $[15];
|
|
30975
|
+
t5 = $[16];
|
|
30881
30976
|
}
|
|
30882
30977
|
useEffect(t4, t5);
|
|
30883
30978
|
let T0;
|
|
@@ -30891,7 +30986,7 @@ const Sheet = (t0) => {
|
|
|
30891
30986
|
let t7;
|
|
30892
30987
|
let t8;
|
|
30893
30988
|
let t9;
|
|
30894
|
-
if ($[
|
|
30989
|
+
if ($[17] !== className || $[18] !== displayed || $[19] !== includeBackgroundOverlay || $[20] !== modal || $[21] !== onOpenChange || $[22] !== open || $[23] !== overlayClassName || $[24] !== overlayStyle || $[25] !== props || $[26] !== side || $[27] !== title || $[28] !== transparent) {
|
|
30895
30990
|
const transformValue = {
|
|
30896
30991
|
top: "-translate-y-full",
|
|
30897
30992
|
bottom: "translate-y-full",
|
|
@@ -30910,102 +31005,106 @@ const Sheet = (t0) => {
|
|
|
30910
31005
|
t13 = onOpenChange;
|
|
30911
31006
|
T1 = DialogPrimitive.Portal;
|
|
30912
31007
|
const t142 = title ?? "Sheet";
|
|
30913
|
-
if ($[
|
|
31008
|
+
if ($[40] !== t142) {
|
|
30914
31009
|
t9 = /* @__PURE__ */ jsx(DialogPrimitive.Title, { autoFocus: true, tabIndex: 0, children: t142 });
|
|
30915
|
-
$[
|
|
30916
|
-
$[
|
|
31010
|
+
$[40] = t142;
|
|
31011
|
+
$[41] = t9;
|
|
30917
31012
|
} else {
|
|
30918
|
-
t9 = $[
|
|
31013
|
+
t9 = $[41];
|
|
30919
31014
|
}
|
|
30920
|
-
if ($[
|
|
30921
|
-
t10 = includeBackgroundOverlay && /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: cls("fixed inset-0 transition-opacity z-20 ease-in-out duration-100 backdrop-blur-sm", "bg-black bg-opacity-50", "dark:bg-surface-900 dark:bg-opacity-60", displayed && open ? "opacity-100" : "opacity-0", overlayClassName), style: {
|
|
30922
|
-
pointerEvents: displayed ? "auto" : "none"
|
|
31015
|
+
if ($[42] !== displayed || $[43] !== includeBackgroundOverlay || $[44] !== open || $[45] !== overlayClassName || $[46] !== overlayStyle) {
|
|
31016
|
+
t10 = includeBackgroundOverlay && /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: cls("outline-none", "fixed inset-0 transition-opacity z-20 ease-in-out duration-100 backdrop-blur-sm", "bg-black bg-opacity-50", "dark:bg-surface-900 dark:bg-opacity-60", displayed && open ? "opacity-100" : "opacity-0", overlayClassName), style: {
|
|
31017
|
+
pointerEvents: displayed ? "auto" : "none",
|
|
31018
|
+
...overlayStyle
|
|
30923
31019
|
} });
|
|
30924
|
-
$[
|
|
30925
|
-
$[
|
|
30926
|
-
$[
|
|
30927
|
-
$[
|
|
30928
|
-
$[
|
|
31020
|
+
$[42] = displayed;
|
|
31021
|
+
$[43] = includeBackgroundOverlay;
|
|
31022
|
+
$[44] = open;
|
|
31023
|
+
$[45] = overlayClassName;
|
|
31024
|
+
$[46] = overlayStyle;
|
|
31025
|
+
$[47] = t10;
|
|
30929
31026
|
} else {
|
|
30930
|
-
t10 = $[
|
|
31027
|
+
t10 = $[47];
|
|
30931
31028
|
}
|
|
30932
31029
|
T0 = DialogPrimitive.Content;
|
|
30933
31030
|
t6 = props;
|
|
30934
31031
|
t7 = _temp;
|
|
30935
|
-
t8 = cls(borderClass[side], defaultBorderMixin, "transform-gpu", "will-change-transform", "text-surface-accent-900 dark:text-white", "fixed transform z-20 transition-all ease-in-out", !displayed ? "duration-150" : "duration-100", "outline-none focus:outline-none", transparent ? "" : "shadow-md bg-white dark:bg-surface-950", side === "top" || side === "bottom" ? "w-full" : "h-full", side === "left" || side === "top" ? "left-0 top-0" : "right-0 bottom-0", displayed && open ? "opacity-100" : "opacity-50", !displayed || !open ? transformValue[side] : "", className);
|
|
30936
|
-
$[
|
|
30937
|
-
$[
|
|
30938
|
-
$[
|
|
30939
|
-
$[
|
|
30940
|
-
$[
|
|
30941
|
-
$[
|
|
30942
|
-
$[
|
|
30943
|
-
$[
|
|
30944
|
-
$[
|
|
30945
|
-
$[
|
|
30946
|
-
$[
|
|
30947
|
-
$[
|
|
30948
|
-
$[
|
|
30949
|
-
$[
|
|
30950
|
-
$[
|
|
30951
|
-
$[
|
|
30952
|
-
$[
|
|
30953
|
-
$[
|
|
30954
|
-
$[
|
|
30955
|
-
$[
|
|
30956
|
-
$[
|
|
30957
|
-
$[
|
|
30958
|
-
|
|
30959
|
-
|
|
30960
|
-
|
|
30961
|
-
|
|
30962
|
-
|
|
30963
|
-
|
|
30964
|
-
|
|
30965
|
-
|
|
30966
|
-
|
|
30967
|
-
|
|
30968
|
-
|
|
30969
|
-
|
|
31032
|
+
t8 = cls("outline-none", borderClass[side], defaultBorderMixin, "transform-gpu", "will-change-transform", "text-surface-accent-900 dark:text-white", "fixed transform z-20 transition-all ease-in-out", !displayed ? "duration-150" : "duration-100", "outline-none focus:outline-none", transparent ? "" : "shadow-md bg-white dark:bg-surface-950", side === "top" || side === "bottom" ? "w-full" : "h-full", side === "left" || side === "top" ? "left-0 top-0" : "right-0 bottom-0", displayed && open ? "opacity-100" : "opacity-50", !displayed || !open ? transformValue[side] : "", className);
|
|
31033
|
+
$[17] = className;
|
|
31034
|
+
$[18] = displayed;
|
|
31035
|
+
$[19] = includeBackgroundOverlay;
|
|
31036
|
+
$[20] = modal;
|
|
31037
|
+
$[21] = onOpenChange;
|
|
31038
|
+
$[22] = open;
|
|
31039
|
+
$[23] = overlayClassName;
|
|
31040
|
+
$[24] = overlayStyle;
|
|
31041
|
+
$[25] = props;
|
|
31042
|
+
$[26] = side;
|
|
31043
|
+
$[27] = title;
|
|
31044
|
+
$[28] = transparent;
|
|
31045
|
+
$[29] = T0;
|
|
31046
|
+
$[30] = T1;
|
|
31047
|
+
$[31] = T2;
|
|
31048
|
+
$[32] = t10;
|
|
31049
|
+
$[33] = t11;
|
|
31050
|
+
$[34] = t12;
|
|
31051
|
+
$[35] = t13;
|
|
31052
|
+
$[36] = t6;
|
|
31053
|
+
$[37] = t7;
|
|
31054
|
+
$[38] = t8;
|
|
31055
|
+
$[39] = t9;
|
|
31056
|
+
} else {
|
|
31057
|
+
T0 = $[29];
|
|
31058
|
+
T1 = $[30];
|
|
31059
|
+
T2 = $[31];
|
|
31060
|
+
t10 = $[32];
|
|
31061
|
+
t11 = $[33];
|
|
31062
|
+
t12 = $[34];
|
|
31063
|
+
t13 = $[35];
|
|
31064
|
+
t6 = $[36];
|
|
31065
|
+
t7 = $[37];
|
|
31066
|
+
t8 = $[38];
|
|
31067
|
+
t9 = $[39];
|
|
30970
31068
|
}
|
|
30971
31069
|
let t14;
|
|
30972
|
-
if ($[
|
|
30973
|
-
t14 = /* @__PURE__ */ jsx(T0, { ...t6, onFocusCapture: t7, className: t8, children });
|
|
30974
|
-
$[
|
|
30975
|
-
$[
|
|
30976
|
-
$[
|
|
30977
|
-
$[
|
|
30978
|
-
$[
|
|
30979
|
-
$[
|
|
30980
|
-
|
|
30981
|
-
|
|
31070
|
+
if ($[48] !== T0 || $[49] !== children || $[50] !== style || $[51] !== t6 || $[52] !== t7 || $[53] !== t8) {
|
|
31071
|
+
t14 = /* @__PURE__ */ jsx(T0, { ...t6, onFocusCapture: t7, className: t8, style, children });
|
|
31072
|
+
$[48] = T0;
|
|
31073
|
+
$[49] = children;
|
|
31074
|
+
$[50] = style;
|
|
31075
|
+
$[51] = t6;
|
|
31076
|
+
$[52] = t7;
|
|
31077
|
+
$[53] = t8;
|
|
31078
|
+
$[54] = t14;
|
|
31079
|
+
} else {
|
|
31080
|
+
t14 = $[54];
|
|
30982
31081
|
}
|
|
30983
31082
|
let t15;
|
|
30984
|
-
if ($[
|
|
31083
|
+
if ($[55] !== T1 || $[56] !== t10 || $[57] !== t14 || $[58] !== t9) {
|
|
30985
31084
|
t15 = /* @__PURE__ */ jsxs(T1, { children: [
|
|
30986
31085
|
t9,
|
|
30987
31086
|
t10,
|
|
30988
31087
|
t14
|
|
30989
31088
|
] });
|
|
30990
|
-
$[
|
|
30991
|
-
$[
|
|
30992
|
-
$[
|
|
30993
|
-
$[
|
|
30994
|
-
$[
|
|
31089
|
+
$[55] = T1;
|
|
31090
|
+
$[56] = t10;
|
|
31091
|
+
$[57] = t14;
|
|
31092
|
+
$[58] = t9;
|
|
31093
|
+
$[59] = t15;
|
|
30995
31094
|
} else {
|
|
30996
|
-
t15 = $[
|
|
31095
|
+
t15 = $[59];
|
|
30997
31096
|
}
|
|
30998
31097
|
let t16;
|
|
30999
|
-
if ($[
|
|
31098
|
+
if ($[60] !== T2 || $[61] !== t11 || $[62] !== t12 || $[63] !== t13 || $[64] !== t15) {
|
|
31000
31099
|
t16 = /* @__PURE__ */ jsx(T2, { open: t11, modal: t12, onOpenChange: t13, children: t15 });
|
|
31001
|
-
$[
|
|
31002
|
-
$[
|
|
31003
|
-
$[
|
|
31004
|
-
$[
|
|
31005
|
-
$[
|
|
31006
|
-
$[
|
|
31100
|
+
$[60] = T2;
|
|
31101
|
+
$[61] = t11;
|
|
31102
|
+
$[62] = t12;
|
|
31103
|
+
$[63] = t13;
|
|
31104
|
+
$[64] = t15;
|
|
31105
|
+
$[65] = t16;
|
|
31007
31106
|
} else {
|
|
31008
|
-
t16 = $[
|
|
31107
|
+
t16 = $[65];
|
|
31009
31108
|
}
|
|
31010
31109
|
return t16;
|
|
31011
31110
|
};
|
|
@@ -31207,9 +31306,9 @@ const TextareaAutosize = React.forwardRef(function TextareaAutosize2(props, ref)
|
|
|
31207
31306
|
}
|
|
31208
31307
|
),
|
|
31209
31308
|
/* @__PURE__ */ jsx("textarea", { "aria-hidden": true, className: cls(props.className, props.shadowClassName), readOnly: true, ref: shadowRef, tabIndex: -1, style: {
|
|
31309
|
+
padding: 0,
|
|
31210
31310
|
...styles$1.shadow,
|
|
31211
|
-
...style
|
|
31212
|
-
padding: 0
|
|
31311
|
+
...style
|
|
31213
31312
|
} })
|
|
31214
31313
|
] });
|
|
31215
31314
|
});
|
|
@@ -31232,14 +31331,15 @@ function setRef(ref, value) {
|
|
|
31232
31331
|
ref.current = value;
|
|
31233
31332
|
}
|
|
31234
31333
|
}
|
|
31235
|
-
|
|
31334
|
+
const TextField = forwardRef(({
|
|
31236
31335
|
value,
|
|
31237
31336
|
onChange,
|
|
31238
31337
|
label,
|
|
31239
31338
|
type = "text",
|
|
31240
31339
|
multiline = false,
|
|
31241
31340
|
invisible,
|
|
31242
|
-
|
|
31341
|
+
maxRows,
|
|
31342
|
+
minRows,
|
|
31243
31343
|
disabled,
|
|
31244
31344
|
error,
|
|
31245
31345
|
endAdornment,
|
|
@@ -31252,7 +31352,7 @@ function TextField({
|
|
|
31252
31352
|
inputStyle,
|
|
31253
31353
|
inputRef: inputRefProp,
|
|
31254
31354
|
...inputProps
|
|
31255
|
-
}) {
|
|
31355
|
+
}, ref) => {
|
|
31256
31356
|
const inputRef = inputRefProp ?? useRef(null);
|
|
31257
31357
|
const [focused, setFocused] = React__default.useState(document.activeElement === inputRef.current);
|
|
31258
31358
|
const hasValue = value !== void 0 && value !== null && value !== "";
|
|
@@ -31262,29 +31362,33 @@ function TextField({
|
|
|
31262
31362
|
if (event.target instanceof HTMLElement) event.target.blur();
|
|
31263
31363
|
};
|
|
31264
31364
|
const element = "current" in inputRef ? inputRef.current : inputRef;
|
|
31265
|
-
element
|
|
31365
|
+
element?.addEventListener("wheel", handleWheel);
|
|
31266
31366
|
return () => {
|
|
31267
|
-
element
|
|
31367
|
+
element?.removeEventListener("wheel", handleWheel);
|
|
31268
31368
|
};
|
|
31269
31369
|
}, [inputRef, type]);
|
|
31270
|
-
const
|
|
31271
|
-
|
|
31272
|
-
|
|
31273
|
-
|
|
31274
|
-
|
|
31275
|
-
|
|
31276
|
-
|
|
31277
|
-
"min-h-[
|
|
31370
|
+
const input = multiline ? /* @__PURE__ */ jsx(TextareaAutosize, { ...inputProps, ref: inputRef, placeholder: focused || hasValue || !label ? placeholder : void 0, autoFocus, minRows, maxRows, value: value ?? "", onChange, style: inputStyle, className: cls(invisible ? focusedInvisibleMixin : "", "rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-8", disabled && "outline-none opacity-50 text-surface-accent-600 dark:text-surface-accent-500", inputClassName) }) : /* @__PURE__ */ jsx("input", { ...inputProps, ref: inputRef, disabled, style: inputStyle, className: cls("w-full outline-none bg-transparent leading-normal px-3", "rounded-md", "focused:text-text-primary focused:dark:text-text-primary-dark", invisible ? focusedInvisibleMixin : "", disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, {
|
|
31371
|
+
"min-h-[28px]": size === "smallest",
|
|
31372
|
+
"min-h-[32px]": size === "small",
|
|
31373
|
+
"min-h-[42px]": size === "medium",
|
|
31374
|
+
"min-h-[64px]": size === "large"
|
|
31375
|
+
}, label ? size === "large" ? "pt-8 pb-2" : "pt-4 pb-2" : "py-2", endAdornment ? "pr-10" : "pr-3", disabled && "outline-none opacity-50 dark:opacity-50 text-surface-accent-800 dark:text-white", inputClassName), placeholder: focused || hasValue || !label ? placeholder : void 0, autoFocus, onFocus: () => setFocused(true), onBlur: () => setFocused(false), type, value: type === "number" && Number.isNaN(value) ? "" : value ?? "", onChange });
|
|
31376
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cls("rounded-md relative max-w-full", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, error ? "border border-red-500 dark:border-red-600" : "", {
|
|
31377
|
+
"min-h-[28px]": size === "smallest",
|
|
31378
|
+
"min-h-[32px]": size === "small",
|
|
31379
|
+
"min-h-[42px]": size === "medium",
|
|
31380
|
+
"min-h-[64px]": size === "large"
|
|
31278
31381
|
}, className), style, children: [
|
|
31279
31382
|
label && /* @__PURE__ */ jsx(InputLabel, { className: cls("pointer-events-none absolute", size === "large" ? "top-1" : "top-[-1px]", !error ? focused ? "text-primary dark:text-primary" : "text-text-secondary dark:text-text-secondary-dark" : "text-red-500 dark:text-red-600", disabled ? "opacity-50" : ""), shrink: hasValue || focused, children: label }),
|
|
31280
31383
|
input,
|
|
31281
31384
|
endAdornment && /* @__PURE__ */ jsx("div", { className: cls("flex flex-row justify-center items-center absolute h-full right-0 top-0", {
|
|
31282
31385
|
"mr-4": size === "large",
|
|
31283
31386
|
"mr-3": size === "medium",
|
|
31284
|
-
"mr-2": size === "small"
|
|
31387
|
+
"mr-2": size === "small" || size === "smallest"
|
|
31285
31388
|
}), children: endAdornment })
|
|
31286
31389
|
] });
|
|
31287
|
-
}
|
|
31390
|
+
});
|
|
31391
|
+
TextField.displayName = "TextField";
|
|
31288
31392
|
const Tooltip = (t0) => {
|
|
31289
31393
|
const $ = c(28);
|
|
31290
31394
|
const {
|
|
@@ -31464,7 +31568,7 @@ function Tabs(t0) {
|
|
|
31464
31568
|
} = t0;
|
|
31465
31569
|
let t1;
|
|
31466
31570
|
if ($[0] !== innerClassName) {
|
|
31467
|
-
t1 = cls("flex text-sm font-medium text-center text-surface-accent-800 dark:text-white max-w-full overflow-auto no-scrollbar items-end", innerClassName);
|
|
31571
|
+
t1 = cls("w-max", "flex text-sm font-medium text-center text-surface-accent-800 dark:text-white max-w-full overflow-auto no-scrollbar items-end", innerClassName);
|
|
31468
31572
|
$[0] = innerClassName;
|
|
31469
31573
|
$[1] = t1;
|
|
31470
31574
|
} else {
|
|
@@ -31512,7 +31616,7 @@ function Tab(t0) {
|
|
|
31512
31616
|
}
|
|
31513
31617
|
let t2;
|
|
31514
31618
|
if ($[3] !== innerClassName) {
|
|
31515
|
-
t2 = cls("uppercase inline-block p-2 px-4
|
|
31619
|
+
t2 = cls("line-clamp-1", "uppercase inline-block p-2 px-4 rounded", "hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800", innerClassName);
|
|
31516
31620
|
$[3] = innerClassName;
|
|
31517
31621
|
$[4] = t2;
|
|
31518
31622
|
} else {
|