@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.umd.js
CHANGED
|
@@ -624,7 +624,7 @@
|
|
|
624
624
|
return t7;
|
|
625
625
|
};
|
|
626
626
|
const AvatarInner = (t0, ref) => {
|
|
627
|
-
const $ = reactCompilerRuntime.c(
|
|
627
|
+
const $ = reactCompilerRuntime.c(25);
|
|
628
628
|
let alt;
|
|
629
629
|
let children;
|
|
630
630
|
let className;
|
|
@@ -632,6 +632,7 @@
|
|
|
632
632
|
let props;
|
|
633
633
|
let src;
|
|
634
634
|
let style;
|
|
635
|
+
let t1;
|
|
635
636
|
if ($[0] !== t0) {
|
|
636
637
|
({
|
|
637
638
|
src,
|
|
@@ -640,6 +641,7 @@
|
|
|
640
641
|
className,
|
|
641
642
|
style,
|
|
642
643
|
outerClassName,
|
|
644
|
+
hover: t1,
|
|
643
645
|
...props
|
|
644
646
|
} = t0);
|
|
645
647
|
$[0] = t0;
|
|
@@ -650,6 +652,7 @@
|
|
|
650
652
|
$[5] = props;
|
|
651
653
|
$[6] = src;
|
|
652
654
|
$[7] = style;
|
|
655
|
+
$[8] = t1;
|
|
653
656
|
} else {
|
|
654
657
|
alt = $[1];
|
|
655
658
|
children = $[2];
|
|
@@ -658,51 +661,55 @@
|
|
|
658
661
|
props = $[5];
|
|
659
662
|
src = $[6];
|
|
660
663
|
style = $[7];
|
|
664
|
+
t1 = $[8];
|
|
661
665
|
}
|
|
666
|
+
const hover = t1 === void 0 ? true : t1;
|
|
662
667
|
const [isImageError, setIsImageError] = React.useState(false);
|
|
663
|
-
let
|
|
664
|
-
if ($[
|
|
665
|
-
|
|
668
|
+
let t2;
|
|
669
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
670
|
+
t2 = () => {
|
|
666
671
|
setIsImageError(true);
|
|
667
672
|
};
|
|
668
|
-
$[
|
|
673
|
+
$[9] = t2;
|
|
669
674
|
} else {
|
|
670
|
-
|
|
675
|
+
t2 = $[9];
|
|
671
676
|
}
|
|
672
|
-
const handleImageError =
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
$[10] =
|
|
677
|
+
const handleImageError = t2;
|
|
678
|
+
const t3 = hover && "hover:bg-surface-accent-200 hover:dark:bg-surface-accent-700";
|
|
679
|
+
let t4;
|
|
680
|
+
if ($[10] !== outerClassName || $[11] !== t3) {
|
|
681
|
+
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);
|
|
682
|
+
$[10] = outerClassName;
|
|
683
|
+
$[11] = t3;
|
|
684
|
+
$[12] = t4;
|
|
678
685
|
} else {
|
|
679
|
-
|
|
686
|
+
t4 = $[12];
|
|
680
687
|
}
|
|
681
|
-
let
|
|
682
|
-
if ($[
|
|
683
|
-
|
|
684
|
-
$[
|
|
685
|
-
$[
|
|
686
|
-
$[
|
|
687
|
-
$[
|
|
688
|
-
$[
|
|
689
|
-
$[
|
|
688
|
+
let t5;
|
|
689
|
+
if ($[13] !== alt || $[14] !== children || $[15] !== className || $[16] !== isImageError || $[17] !== src) {
|
|
690
|
+
t5 = src && !isImageError ? /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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 });
|
|
691
|
+
$[13] = alt;
|
|
692
|
+
$[14] = children;
|
|
693
|
+
$[15] = className;
|
|
694
|
+
$[16] = isImageError;
|
|
695
|
+
$[17] = src;
|
|
696
|
+
$[18] = t5;
|
|
690
697
|
} else {
|
|
691
|
-
|
|
698
|
+
t5 = $[18];
|
|
692
699
|
}
|
|
693
|
-
let
|
|
694
|
-
if ($[
|
|
695
|
-
|
|
696
|
-
$[
|
|
697
|
-
$[
|
|
698
|
-
$[
|
|
699
|
-
$[20] = t2;
|
|
700
|
-
$[21] = t3;
|
|
700
|
+
let t6;
|
|
701
|
+
if ($[19] !== props || $[20] !== ref || $[21] !== style || $[22] !== t4 || $[23] !== t5) {
|
|
702
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsx("button", { ref, style, ...props, className: t4, children: t5 });
|
|
703
|
+
$[19] = props;
|
|
704
|
+
$[20] = ref;
|
|
705
|
+
$[21] = style;
|
|
701
706
|
$[22] = t4;
|
|
707
|
+
$[23] = t5;
|
|
708
|
+
$[24] = t6;
|
|
702
709
|
} else {
|
|
703
|
-
|
|
710
|
+
t6 = $[24];
|
|
704
711
|
}
|
|
705
|
-
return
|
|
712
|
+
return t6;
|
|
706
713
|
};
|
|
707
714
|
const Avatar = React.forwardRef(AvatarInner);
|
|
708
715
|
const BooleanSwitch = React.forwardRef(function BooleanSwitch2({
|
|
@@ -741,13 +748,13 @@
|
|
|
741
748
|
const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
|
|
742
749
|
value,
|
|
743
750
|
position = "end",
|
|
751
|
+
size = "medium",
|
|
744
752
|
invisible,
|
|
745
753
|
onValueChange,
|
|
746
754
|
error,
|
|
747
755
|
label,
|
|
748
756
|
autoFocus,
|
|
749
757
|
disabled,
|
|
750
|
-
size,
|
|
751
758
|
className,
|
|
752
759
|
fullWidth = true,
|
|
753
760
|
inputClassName,
|
|
@@ -761,7 +768,12 @@
|
|
|
761
768
|
React.useEffect(() => {
|
|
762
769
|
}, []);
|
|
763
770
|
const focus = document.activeElement === refInput?.current || document.activeElement === ref?.current;
|
|
764
|
-
return /* @__PURE__ */ jsxRuntime.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",
|
|
771
|
+
return /* @__PURE__ */ jsxRuntime.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", {
|
|
772
|
+
"min-h-[28px]": size === "smallest",
|
|
773
|
+
"min-h-[32px]": size === "small",
|
|
774
|
+
"min-h-[42px]": size === "medium",
|
|
775
|
+
"min-h-[64px]": size === "large"
|
|
776
|
+
}, 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) => {
|
|
765
777
|
if (props.allowIndeterminate) {
|
|
766
778
|
if (value === null || value === void 0) onValueChange?.(true);
|
|
767
779
|
else if (value) onValueChange?.(false);
|
|
@@ -833,20 +845,20 @@
|
|
|
833
845
|
const t9 = variant === "filled" && color === "secondary" && !disabled;
|
|
834
846
|
const t10 = variant === "filled" && color === "error" && !disabled;
|
|
835
847
|
const t11 = variant === "filled" && color === "text" && !disabled;
|
|
836
|
-
const t12 = variant === "
|
|
837
|
-
const t13 = variant === "text" && color === "
|
|
838
|
-
const t14 = variant === "text" && color === "
|
|
839
|
-
const t15 = variant === "text" && color === "
|
|
840
|
-
const t16 = variant === "
|
|
841
|
-
const t17 = variant === "
|
|
842
|
-
const t18 = variant === "outlined" && color === "
|
|
843
|
-
const t19 = variant === "outlined" && color === "
|
|
844
|
-
const t20 = variant === "
|
|
845
|
-
const t21 = variant === "
|
|
846
|
-
const t22 = variant === "
|
|
848
|
+
const t12 = variant === "filled" && color === "neutral" && !disabled;
|
|
849
|
+
const t13 = variant === "text" && color === "primary" && !disabled;
|
|
850
|
+
const t14 = variant === "text" && color === "secondary" && !disabled;
|
|
851
|
+
const t15 = variant === "text" && color === "error" && !disabled;
|
|
852
|
+
const t16 = variant === "text" && color === "text" && !disabled;
|
|
853
|
+
const t17 = variant === "text" && color === "neutral" && !disabled;
|
|
854
|
+
const t18 = variant === "outlined" && color === "primary" && !disabled;
|
|
855
|
+
const t19 = variant === "outlined" && color === "secondary" && !disabled;
|
|
856
|
+
const t20 = variant === "outlined" && color === "error" && !disabled;
|
|
857
|
+
const t21 = variant === "outlined" && color === "text" && !disabled;
|
|
858
|
+
const t22 = variant === "outlined" && color === "neutral" && !disabled;
|
|
847
859
|
const t23 = variant === "text" && disabled;
|
|
848
860
|
const t24 = variant === "outlined" && disabled;
|
|
849
|
-
const t25 =
|
|
861
|
+
const t25 = variant === "filled" && disabled;
|
|
850
862
|
let t26;
|
|
851
863
|
let t27;
|
|
852
864
|
let t28;
|
|
@@ -862,21 +874,21 @@
|
|
|
862
874
|
"border border-secondary bg-secondary focus:ring-secondary shadow hover:ring-1 hover:ring-secondary text-white hover:text-white": t9,
|
|
863
875
|
"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,
|
|
864
876
|
"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,
|
|
865
|
-
"border border-transparent
|
|
866
|
-
"border border-transparent text-
|
|
867
|
-
"border border-transparent text-
|
|
868
|
-
"border border-transparent text-
|
|
869
|
-
"border border-primary text-primary hover:text-primary hover:bg-
|
|
870
|
-
"border border-
|
|
871
|
-
"border border-
|
|
872
|
-
"border border-
|
|
873
|
-
"border border-
|
|
874
|
-
"border border-
|
|
875
|
-
"border border-
|
|
877
|
+
"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,
|
|
878
|
+
"border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t13,
|
|
879
|
+
"border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t14,
|
|
880
|
+
"border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": t15,
|
|
881
|
+
"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,
|
|
882
|
+
"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,
|
|
883
|
+
"border border-primary text-primary hover:text-primary hover:bg-primary-bg": t18,
|
|
884
|
+
"border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t19,
|
|
885
|
+
"border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t20,
|
|
886
|
+
"border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:bg-surface-accent-200": t21,
|
|
887
|
+
"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,
|
|
876
888
|
"text-text-disabled dark:text-text-disabled-dark": disabled,
|
|
877
889
|
"border border-transparent opacity-50": t23,
|
|
878
890
|
"border border-surface-500 opacity-50": t24,
|
|
879
|
-
"border border-surface-
|
|
891
|
+
"border border-transparent bg-surface-300 dark:bg-surface-500 opacity-40": t25
|
|
880
892
|
});
|
|
881
893
|
const sizeClasses2 = cls({
|
|
882
894
|
"py-1 px-2": size === "small",
|
|
@@ -1162,23 +1174,31 @@
|
|
|
1162
1174
|
} = t0;
|
|
1163
1175
|
const size = t1 === void 0 ? "medium" : t1;
|
|
1164
1176
|
let sizeClasses2;
|
|
1165
|
-
if (size === "
|
|
1177
|
+
if (size === "smallest") {
|
|
1166
1178
|
sizeClasses2 = "w-4 h-4";
|
|
1167
1179
|
} else {
|
|
1168
|
-
if (size === "
|
|
1169
|
-
sizeClasses2 = "w-
|
|
1180
|
+
if (size === "small") {
|
|
1181
|
+
sizeClasses2 = "w-6 h-6";
|
|
1170
1182
|
} else {
|
|
1171
|
-
|
|
1183
|
+
if (size === "medium") {
|
|
1184
|
+
sizeClasses2 = "w-8 h-8 m-1";
|
|
1185
|
+
} else {
|
|
1186
|
+
sizeClasses2 = "w-10 h-10 m-1";
|
|
1187
|
+
}
|
|
1172
1188
|
}
|
|
1173
1189
|
}
|
|
1174
1190
|
let borderClasses;
|
|
1175
|
-
if (size === "
|
|
1191
|
+
if (size === "smallest") {
|
|
1176
1192
|
borderClasses = "border-[3px]";
|
|
1177
1193
|
} else {
|
|
1178
|
-
if (size === "
|
|
1179
|
-
borderClasses = "border-
|
|
1194
|
+
if (size === "small") {
|
|
1195
|
+
borderClasses = "border-[4px]";
|
|
1180
1196
|
} else {
|
|
1181
|
-
|
|
1197
|
+
if (size === "medium") {
|
|
1198
|
+
borderClasses = "border-4";
|
|
1199
|
+
} else {
|
|
1200
|
+
borderClasses = "border-[6px]";
|
|
1201
|
+
}
|
|
1182
1202
|
}
|
|
1183
1203
|
}
|
|
1184
1204
|
let t2;
|
|
@@ -27328,7 +27348,7 @@
|
|
|
27328
27348
|
const t6 = error ? "text-red-500 dark:text-red-400" : "";
|
|
27329
27349
|
let t7;
|
|
27330
27350
|
if ($[2] !== className || $[3] !== t3 || $[4] !== t4 || $[5] !== t5 || $[6] !== t6) {
|
|
27331
|
-
t7 = cls("rounded-lg max-w-full w-max h-fit font-regular inline-flex gap-1", "text-ellipsis", t3, t4, t5, t6, className);
|
|
27351
|
+
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);
|
|
27332
27352
|
$[2] = className;
|
|
27333
27353
|
$[3] = t3;
|
|
27334
27354
|
$[4] = t4;
|
|
@@ -27680,7 +27700,7 @@
|
|
|
27680
27700
|
return t15;
|
|
27681
27701
|
}
|
|
27682
27702
|
const DateTimeField = (t0) => {
|
|
27683
|
-
const $ = reactCompilerRuntime.c(
|
|
27703
|
+
const $ = reactCompilerRuntime.c(57);
|
|
27684
27704
|
const {
|
|
27685
27705
|
value,
|
|
27686
27706
|
label,
|
|
@@ -27754,161 +27774,176 @@
|
|
|
27754
27774
|
}
|
|
27755
27775
|
const t6 = !invisible && fieldBackgroundMixin;
|
|
27756
27776
|
const t7 = disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin;
|
|
27757
|
-
const t8 = size === "
|
|
27758
|
-
const t9 = size === "
|
|
27759
|
-
|
|
27760
|
-
|
|
27761
|
-
|
|
27762
|
-
|
|
27763
|
-
|
|
27777
|
+
const t8 = size === "smallest";
|
|
27778
|
+
const t9 = size === "small";
|
|
27779
|
+
const t10 = size === "medium";
|
|
27780
|
+
const t11 = size === "large";
|
|
27781
|
+
let t12;
|
|
27782
|
+
if ($[6] !== className || $[7] !== t10 || $[8] !== t11 || $[9] !== t6 || $[10] !== t7 || $[11] !== t8 || $[12] !== t9) {
|
|
27783
|
+
t12 = cls("rounded-md relative max-w-full", t6, t7, {
|
|
27784
|
+
"min-h-[28px]": t8,
|
|
27785
|
+
"min-h-[32px]": t9,
|
|
27786
|
+
"min-h-[42px]": t10,
|
|
27787
|
+
"min-h-[64px]": t11
|
|
27764
27788
|
}, className);
|
|
27765
27789
|
$[6] = className;
|
|
27766
|
-
$[7] =
|
|
27767
|
-
$[8] =
|
|
27768
|
-
$[9] =
|
|
27769
|
-
$[10] =
|
|
27770
|
-
$[11] =
|
|
27790
|
+
$[7] = t10;
|
|
27791
|
+
$[8] = t11;
|
|
27792
|
+
$[9] = t6;
|
|
27793
|
+
$[10] = t7;
|
|
27794
|
+
$[11] = t8;
|
|
27795
|
+
$[12] = t9;
|
|
27796
|
+
$[13] = t12;
|
|
27771
27797
|
} else {
|
|
27772
|
-
|
|
27798
|
+
t12 = $[13];
|
|
27773
27799
|
}
|
|
27774
|
-
let
|
|
27775
|
-
if ($[
|
|
27776
|
-
|
|
27800
|
+
let t13;
|
|
27801
|
+
if ($[14] !== disabled) {
|
|
27802
|
+
t13 = () => {
|
|
27777
27803
|
if (!disabled) {
|
|
27778
27804
|
inputRef.current?.focus();
|
|
27779
27805
|
}
|
|
27780
27806
|
};
|
|
27781
|
-
$[12] = disabled;
|
|
27782
|
-
$[13] = t11;
|
|
27783
|
-
} else {
|
|
27784
|
-
t11 = $[13];
|
|
27785
|
-
}
|
|
27786
|
-
let t12;
|
|
27787
|
-
if ($[14] !== disabled || $[15] !== error || $[16] !== focused || $[17] !== label) {
|
|
27788
|
-
t12 = label && /* @__PURE__ */ jsxRuntime.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 });
|
|
27789
27807
|
$[14] = disabled;
|
|
27790
|
-
$[15] =
|
|
27791
|
-
$[16] = focused;
|
|
27792
|
-
$[17] = label;
|
|
27793
|
-
$[18] = t12;
|
|
27808
|
+
$[15] = t13;
|
|
27794
27809
|
} else {
|
|
27795
|
-
|
|
27810
|
+
t13 = $[15];
|
|
27796
27811
|
}
|
|
27797
|
-
|
|
27798
|
-
|
|
27799
|
-
|
|
27800
|
-
|
|
27801
|
-
|
|
27802
|
-
|
|
27803
|
-
|
|
27804
|
-
$[
|
|
27805
|
-
|
|
27806
|
-
|
|
27807
|
-
|
|
27808
|
-
|
|
27809
|
-
|
|
27810
|
-
|
|
27811
|
-
|
|
27812
|
-
|
|
27813
|
-
|
|
27814
|
-
|
|
27815
|
-
|
|
27816
|
-
|
|
27817
|
-
|
|
27818
|
-
$[
|
|
27819
|
-
$[
|
|
27820
|
-
|
|
27821
|
-
|
|
27822
|
-
|
|
27812
|
+
let t14;
|
|
27813
|
+
if ($[16] !== disabled || $[17] !== error || $[18] !== focused || $[19] !== label) {
|
|
27814
|
+
t14 = label && /* @__PURE__ */ jsxRuntime.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 });
|
|
27815
|
+
$[16] = disabled;
|
|
27816
|
+
$[17] = error;
|
|
27817
|
+
$[18] = focused;
|
|
27818
|
+
$[19] = label;
|
|
27819
|
+
$[20] = t14;
|
|
27820
|
+
} else {
|
|
27821
|
+
t14 = $[20];
|
|
27822
|
+
}
|
|
27823
|
+
const t15 = mode === "date_time" ? "datetime-local" : "date";
|
|
27824
|
+
const t16 = valueAsInputValue(value ?? null, mode);
|
|
27825
|
+
let t17;
|
|
27826
|
+
let t18;
|
|
27827
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
27828
|
+
t17 = () => setFocused(true);
|
|
27829
|
+
t18 = () => setFocused(false);
|
|
27830
|
+
$[21] = t17;
|
|
27831
|
+
$[22] = t18;
|
|
27832
|
+
} else {
|
|
27833
|
+
t17 = $[21];
|
|
27834
|
+
t18 = $[22];
|
|
27835
|
+
}
|
|
27836
|
+
const t19 = clearable ? "pr-14" : "pr-12";
|
|
27837
|
+
const t20 = size === "smallest";
|
|
27838
|
+
const t21 = size === "small";
|
|
27839
|
+
const t22 = size === "medium";
|
|
27840
|
+
const t23 = size === "large";
|
|
27841
|
+
let t24;
|
|
27842
|
+
if ($[23] !== disabled || $[24] !== inputClassName || $[25] !== label || $[26] !== t19 || $[27] !== t20 || $[28] !== t21 || $[29] !== t22 || $[30] !== t23) {
|
|
27843
|
+
t24 = cls("w-full outline-none bg-transparent leading-normal text-base px-3", t19, "rounded-md", {
|
|
27844
|
+
"min-h-[28px]": t20,
|
|
27845
|
+
"min-h-[32px]": t21,
|
|
27846
|
+
"min-h-[42px]": t22,
|
|
27847
|
+
"min-h-[64px]": t23
|
|
27848
|
+
}, 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");
|
|
27849
|
+
$[23] = disabled;
|
|
27850
|
+
$[24] = inputClassName;
|
|
27851
|
+
$[25] = label;
|
|
27852
|
+
$[26] = t19;
|
|
27853
|
+
$[27] = t20;
|
|
27854
|
+
$[28] = t21;
|
|
27855
|
+
$[29] = t22;
|
|
27856
|
+
$[30] = t23;
|
|
27857
|
+
$[31] = t24;
|
|
27823
27858
|
} else {
|
|
27824
|
-
|
|
27859
|
+
t24 = $[31];
|
|
27825
27860
|
}
|
|
27826
|
-
let
|
|
27827
|
-
if ($[
|
|
27828
|
-
|
|
27829
|
-
$[
|
|
27830
|
-
$[
|
|
27831
|
-
$[
|
|
27832
|
-
$[
|
|
27833
|
-
$[
|
|
27834
|
-
$[
|
|
27861
|
+
let t25;
|
|
27862
|
+
if ($[32] !== disabled || $[33] !== handleInputChange || $[34] !== t15 || $[35] !== t16 || $[36] !== t24) {
|
|
27863
|
+
t25 = /* @__PURE__ */ jsxRuntime.jsx("input", { ref: inputRef, type: t15, value: t16, onChange: handleInputChange, onFocus: t17, onBlur: t18, disabled, className: t24 });
|
|
27864
|
+
$[32] = disabled;
|
|
27865
|
+
$[33] = handleInputChange;
|
|
27866
|
+
$[34] = t15;
|
|
27867
|
+
$[35] = t16;
|
|
27868
|
+
$[36] = t24;
|
|
27869
|
+
$[37] = t25;
|
|
27835
27870
|
} else {
|
|
27836
|
-
|
|
27871
|
+
t25 = $[37];
|
|
27837
27872
|
}
|
|
27838
|
-
let
|
|
27839
|
-
if ($[
|
|
27840
|
-
|
|
27873
|
+
let t26;
|
|
27874
|
+
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
|
27875
|
+
t26 = (e_2) => {
|
|
27841
27876
|
e_2.stopPropagation();
|
|
27842
27877
|
inputRef.current?.showPicker();
|
|
27843
27878
|
};
|
|
27844
|
-
$[
|
|
27879
|
+
$[38] = t26;
|
|
27845
27880
|
} else {
|
|
27846
|
-
|
|
27881
|
+
t26 = $[38];
|
|
27847
27882
|
}
|
|
27848
|
-
let
|
|
27849
|
-
if ($[
|
|
27850
|
-
|
|
27851
|
-
$[
|
|
27883
|
+
let t27;
|
|
27884
|
+
if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
|
|
27885
|
+
t27 = /* @__PURE__ */ jsxRuntime.jsx(IconButton, { onClick: t26, className: "absolute right-3 top-1/2 transform -translate-y-1/2 !text-surface-accent-500", children: /* @__PURE__ */ jsxRuntime.jsx(CalendarMonthIcon, { color: "disabled" }) });
|
|
27886
|
+
$[39] = t27;
|
|
27852
27887
|
} else {
|
|
27853
|
-
|
|
27888
|
+
t27 = $[39];
|
|
27854
27889
|
}
|
|
27855
|
-
let
|
|
27856
|
-
if ($[
|
|
27857
|
-
|
|
27858
|
-
$[
|
|
27859
|
-
$[
|
|
27860
|
-
$[
|
|
27861
|
-
$[
|
|
27890
|
+
let t28;
|
|
27891
|
+
if ($[40] !== clearable || $[41] !== handleClear || $[42] !== value) {
|
|
27892
|
+
t28 = clearable && value && /* @__PURE__ */ jsxRuntime.jsx(IconButton, { onClick: handleClear, className: "absolute right-14 top-1/2 transform -translate-y-1/2 text-surface-accent-400 ", children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {}) });
|
|
27893
|
+
$[40] = clearable;
|
|
27894
|
+
$[41] = handleClear;
|
|
27895
|
+
$[42] = value;
|
|
27896
|
+
$[43] = t28;
|
|
27862
27897
|
} else {
|
|
27863
|
-
|
|
27898
|
+
t28 = $[43];
|
|
27864
27899
|
}
|
|
27865
|
-
let
|
|
27866
|
-
if ($[
|
|
27867
|
-
|
|
27868
|
-
|
|
27869
|
-
|
|
27870
|
-
|
|
27871
|
-
|
|
27900
|
+
let t29;
|
|
27901
|
+
if ($[44] !== style || $[45] !== t12 || $[46] !== t13 || $[47] !== t14 || $[48] !== t25 || $[49] !== t28) {
|
|
27902
|
+
t29 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t12, style, onClick: t13, children: [
|
|
27903
|
+
t14,
|
|
27904
|
+
t25,
|
|
27905
|
+
t27,
|
|
27906
|
+
t28
|
|
27872
27907
|
] });
|
|
27873
|
-
$[
|
|
27874
|
-
$[
|
|
27875
|
-
$[
|
|
27876
|
-
$[
|
|
27877
|
-
$[
|
|
27878
|
-
$[
|
|
27879
|
-
$[
|
|
27908
|
+
$[44] = style;
|
|
27909
|
+
$[45] = t12;
|
|
27910
|
+
$[46] = t13;
|
|
27911
|
+
$[47] = t14;
|
|
27912
|
+
$[48] = t25;
|
|
27913
|
+
$[49] = t28;
|
|
27914
|
+
$[50] = t29;
|
|
27880
27915
|
} else {
|
|
27881
|
-
|
|
27916
|
+
t29 = $[50];
|
|
27882
27917
|
}
|
|
27883
|
-
let
|
|
27884
|
-
if ($[
|
|
27885
|
-
|
|
27886
|
-
/* @__PURE__ */ jsxRuntime.jsx(ErrorIcon, { size: "
|
|
27918
|
+
let t30;
|
|
27919
|
+
if ($[51] !== invalidValue || $[52] !== value) {
|
|
27920
|
+
t30 = invalidValue && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center m-2", children: [
|
|
27921
|
+
/* @__PURE__ */ jsxRuntime.jsx(ErrorIcon, { size: "small", color: "error" }),
|
|
27887
27922
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pl-2", children: [
|
|
27888
27923
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", children: "Invalid date value for this field" }),
|
|
27889
27924
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", children: `The provided value is: ${JSON.stringify(value)}` })
|
|
27890
27925
|
] })
|
|
27891
27926
|
] });
|
|
27892
|
-
$[
|
|
27893
|
-
$[
|
|
27894
|
-
$[
|
|
27927
|
+
$[51] = invalidValue;
|
|
27928
|
+
$[52] = value;
|
|
27929
|
+
$[53] = t30;
|
|
27895
27930
|
} else {
|
|
27896
|
-
|
|
27931
|
+
t30 = $[53];
|
|
27897
27932
|
}
|
|
27898
|
-
let
|
|
27899
|
-
if ($[
|
|
27900
|
-
|
|
27933
|
+
let t31;
|
|
27934
|
+
if ($[54] !== t29 || $[55] !== t30) {
|
|
27935
|
+
t31 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
27901
27936
|
t5,
|
|
27902
|
-
|
|
27903
|
-
|
|
27937
|
+
t29,
|
|
27938
|
+
t30
|
|
27904
27939
|
] });
|
|
27905
|
-
$[
|
|
27906
|
-
$[
|
|
27907
|
-
$[
|
|
27940
|
+
$[54] = t29;
|
|
27941
|
+
$[55] = t30;
|
|
27942
|
+
$[56] = t31;
|
|
27908
27943
|
} else {
|
|
27909
|
-
|
|
27944
|
+
t31 = $[56];
|
|
27910
27945
|
}
|
|
27911
|
-
return
|
|
27946
|
+
return t31;
|
|
27912
27947
|
};
|
|
27913
27948
|
const inputStyles = `
|
|
27914
27949
|
/* Hide the default calendar icon in Chrome, Safari, Edge, Opera */
|
|
@@ -27957,12 +27992,13 @@
|
|
|
27957
27992
|
full: "max-w-full min-w-full w-full"
|
|
27958
27993
|
};
|
|
27959
27994
|
const Dialog = (t0) => {
|
|
27960
|
-
const $ = reactCompilerRuntime.c(
|
|
27995
|
+
const $ = reactCompilerRuntime.c(39);
|
|
27961
27996
|
const {
|
|
27962
27997
|
open,
|
|
27963
27998
|
onOpenChange,
|
|
27964
27999
|
children,
|
|
27965
28000
|
className,
|
|
28001
|
+
containerClassName,
|
|
27966
28002
|
fullWidth: t1,
|
|
27967
28003
|
fullHeight,
|
|
27968
28004
|
fullScreen,
|
|
@@ -28003,107 +28039,116 @@
|
|
|
28003
28039
|
}
|
|
28004
28040
|
React.useEffect(t5, t6);
|
|
28005
28041
|
const t7 = displayed || open;
|
|
28006
|
-
|
|
28007
|
-
|
|
28008
|
-
|
|
28009
|
-
|
|
28010
|
-
$[
|
|
28011
|
-
$[4] = t9;
|
|
28042
|
+
let t8;
|
|
28043
|
+
if ($[3] !== containerClassName) {
|
|
28044
|
+
t8 = cls("fixed inset-0 z-30", containerClassName);
|
|
28045
|
+
$[3] = containerClassName;
|
|
28046
|
+
$[4] = t8;
|
|
28012
28047
|
} else {
|
|
28013
|
-
|
|
28048
|
+
t8 = $[4];
|
|
28014
28049
|
}
|
|
28015
|
-
const
|
|
28016
|
-
let
|
|
28017
|
-
if ($[5] !==
|
|
28018
|
-
|
|
28019
|
-
|
|
28020
|
-
|
|
28021
|
-
$[5] = t10;
|
|
28022
|
-
$[6] = t11;
|
|
28050
|
+
const t9 = displayed && open ? "opacity-100" : "opacity-0";
|
|
28051
|
+
let t10;
|
|
28052
|
+
if ($[5] !== t9) {
|
|
28053
|
+
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");
|
|
28054
|
+
$[5] = t9;
|
|
28055
|
+
$[6] = t10;
|
|
28023
28056
|
} else {
|
|
28024
|
-
|
|
28057
|
+
t10 = $[6];
|
|
28025
28058
|
}
|
|
28059
|
+
const t11 = displayed ? "auto" : "none";
|
|
28026
28060
|
let t12;
|
|
28027
|
-
if ($[7] !== t11
|
|
28028
|
-
t12 =
|
|
28061
|
+
if ($[7] !== t11) {
|
|
28062
|
+
t12 = {
|
|
28063
|
+
pointerEvents: t11
|
|
28064
|
+
};
|
|
28029
28065
|
$[7] = t11;
|
|
28030
|
-
$[8] =
|
|
28031
|
-
$[9] = t12;
|
|
28066
|
+
$[8] = t12;
|
|
28032
28067
|
} else {
|
|
28033
|
-
t12 = $[
|
|
28068
|
+
t12 = $[8];
|
|
28034
28069
|
}
|
|
28035
28070
|
let t13;
|
|
28036
|
-
if ($[10]
|
|
28037
|
-
t13 =
|
|
28038
|
-
$[
|
|
28039
|
-
|
|
28040
|
-
|
|
28041
|
-
}
|
|
28042
|
-
|
|
28043
|
-
|
|
28044
|
-
|
|
28045
|
-
|
|
28046
|
-
|
|
28047
|
-
const t19 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
|
|
28048
|
-
let t20;
|
|
28049
|
-
if ($[11] !== className || $[12] !== t14 || $[13] !== t15 || $[14] !== t16 || $[15] !== t17 || $[16] !== t18 || $[17] !== t19) {
|
|
28050
|
-
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);
|
|
28051
|
-
$[11] = className;
|
|
28071
|
+
if ($[9] !== t10 || $[10] !== t12) {
|
|
28072
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Overlay, { className: t10, style: t12 });
|
|
28073
|
+
$[9] = t10;
|
|
28074
|
+
$[10] = t12;
|
|
28075
|
+
$[11] = t13;
|
|
28076
|
+
} else {
|
|
28077
|
+
t13 = $[11];
|
|
28078
|
+
}
|
|
28079
|
+
let t14;
|
|
28080
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28081
|
+
t14 = cls("h-full outline-none flex justify-center items-center z-40 opacity-100 transition-all duration-200 ease-in-out");
|
|
28052
28082
|
$[12] = t14;
|
|
28053
|
-
$[13] = t15;
|
|
28054
|
-
$[14] = t16;
|
|
28055
|
-
$[15] = t17;
|
|
28056
|
-
$[16] = t18;
|
|
28057
|
-
$[17] = t19;
|
|
28058
|
-
$[18] = t20;
|
|
28059
28083
|
} else {
|
|
28060
|
-
|
|
28084
|
+
t14 = $[12];
|
|
28061
28085
|
}
|
|
28086
|
+
const t15 = fullWidth && !fullScreen ? "w-11/12" : void 0;
|
|
28087
|
+
const t16 = fullHeight && !fullScreen ? "h-full" : void 0;
|
|
28088
|
+
const t17 = fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-xl";
|
|
28089
|
+
const t18 = scrollable && "overflow-y-auto";
|
|
28090
|
+
const t19 = displayed && open ? "opacity-100" : "opacity-0";
|
|
28091
|
+
const t20 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
|
|
28062
28092
|
let t21;
|
|
28063
|
-
if ($[
|
|
28064
|
-
t21 =
|
|
28065
|
-
$[
|
|
28066
|
-
$[
|
|
28067
|
-
$[
|
|
28093
|
+
if ($[13] !== className || $[14] !== t15 || $[15] !== t16 || $[16] !== t17 || $[17] !== t18 || $[18] !== t19 || $[19] !== t20) {
|
|
28094
|
+
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);
|
|
28095
|
+
$[13] = className;
|
|
28096
|
+
$[14] = t15;
|
|
28097
|
+
$[15] = t16;
|
|
28098
|
+
$[16] = t17;
|
|
28099
|
+
$[17] = t18;
|
|
28100
|
+
$[18] = t19;
|
|
28101
|
+
$[19] = t20;
|
|
28102
|
+
$[20] = t21;
|
|
28068
28103
|
} else {
|
|
28069
|
-
t21 = $[
|
|
28104
|
+
t21 = $[20];
|
|
28070
28105
|
}
|
|
28071
28106
|
let t22;
|
|
28072
|
-
if ($[
|
|
28073
|
-
t22 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
28074
|
-
$[
|
|
28075
|
-
$[
|
|
28076
|
-
$[
|
|
28077
|
-
$[25] = onPointerDownOutside;
|
|
28078
|
-
$[26] = t21;
|
|
28079
|
-
$[27] = t22;
|
|
28107
|
+
if ($[21] !== children || $[22] !== t21) {
|
|
28108
|
+
t22 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t21, children });
|
|
28109
|
+
$[21] = children;
|
|
28110
|
+
$[22] = t21;
|
|
28111
|
+
$[23] = t22;
|
|
28080
28112
|
} else {
|
|
28081
|
-
t22 = $[
|
|
28113
|
+
t22 = $[23];
|
|
28082
28114
|
}
|
|
28083
28115
|
let t23;
|
|
28084
|
-
if ($[
|
|
28085
|
-
t23 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.
|
|
28086
|
-
|
|
28087
|
-
|
|
28088
|
-
]
|
|
28089
|
-
$[
|
|
28090
|
-
$[
|
|
28091
|
-
$[
|
|
28116
|
+
if ($[24] !== onEscapeKeyDown || $[25] !== onInteractOutside || $[26] !== onOpenAutoFocus || $[27] !== onPointerDownOutside || $[28] !== t22) {
|
|
28117
|
+
t23 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Content, { onEscapeKeyDown, onOpenAutoFocus, onPointerDownOutside, onInteractOutside, className: t14, children: t22 });
|
|
28118
|
+
$[24] = onEscapeKeyDown;
|
|
28119
|
+
$[25] = onInteractOutside;
|
|
28120
|
+
$[26] = onOpenAutoFocus;
|
|
28121
|
+
$[27] = onPointerDownOutside;
|
|
28122
|
+
$[28] = t22;
|
|
28123
|
+
$[29] = t23;
|
|
28092
28124
|
} else {
|
|
28093
|
-
t23 = $[
|
|
28125
|
+
t23 = $[29];
|
|
28094
28126
|
}
|
|
28095
28127
|
let t24;
|
|
28096
|
-
if ($[
|
|
28097
|
-
t24 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.
|
|
28098
|
-
|
|
28099
|
-
|
|
28100
|
-
|
|
28101
|
-
$[
|
|
28102
|
-
$[
|
|
28128
|
+
if ($[30] !== t13 || $[31] !== t23 || $[32] !== t8) {
|
|
28129
|
+
t24 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t8, children: [
|
|
28130
|
+
t13,
|
|
28131
|
+
t23
|
|
28132
|
+
] }) });
|
|
28133
|
+
$[30] = t13;
|
|
28134
|
+
$[31] = t23;
|
|
28135
|
+
$[32] = t8;
|
|
28136
|
+
$[33] = t24;
|
|
28103
28137
|
} else {
|
|
28104
|
-
t24 = $[
|
|
28138
|
+
t24 = $[33];
|
|
28105
28139
|
}
|
|
28106
|
-
|
|
28140
|
+
let t25;
|
|
28141
|
+
if ($[34] !== modal || $[35] !== onOpenChange || $[36] !== t24 || $[37] !== t7) {
|
|
28142
|
+
t25 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { open: t7, modal, onOpenChange, children: t24 });
|
|
28143
|
+
$[34] = modal;
|
|
28144
|
+
$[35] = onOpenChange;
|
|
28145
|
+
$[36] = t24;
|
|
28146
|
+
$[37] = t7;
|
|
28147
|
+
$[38] = t25;
|
|
28148
|
+
} else {
|
|
28149
|
+
t25 = $[38];
|
|
28150
|
+
}
|
|
28151
|
+
return t25;
|
|
28107
28152
|
};
|
|
28108
28153
|
function _temp$2() {
|
|
28109
28154
|
}
|
|
@@ -28161,7 +28206,7 @@
|
|
|
28161
28206
|
}
|
|
28162
28207
|
let t2;
|
|
28163
28208
|
if ($[2] !== className || $[3] !== includeMargin) {
|
|
28164
|
-
t2 = cls("
|
|
28209
|
+
t2 = cls("flex-grow", {
|
|
28165
28210
|
"my-6 mx-6": includeMargin
|
|
28166
28211
|
}, className);
|
|
28167
28212
|
$[2] = className;
|
|
@@ -28565,7 +28610,7 @@
|
|
|
28565
28610
|
}
|
|
28566
28611
|
let t12;
|
|
28567
28612
|
if ($[23] !== uploadDescription) {
|
|
28568
|
-
t12 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow h-28 box-border flex flex-col items-center justify-center text-center", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { align: "center", variant: "label", children: uploadDescription }) });
|
|
28613
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow h-28 box-border flex flex-col items-center justify-center text-center", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { align: "center", variant: "label", className: "flex flex-row gap-2 justify-center", children: uploadDescription }) });
|
|
28569
28614
|
$[23] = uploadDescription;
|
|
28570
28615
|
$[24] = t12;
|
|
28571
28616
|
} else {
|
|
@@ -28796,7 +28841,7 @@
|
|
|
28796
28841
|
return t7;
|
|
28797
28842
|
}, equal);
|
|
28798
28843
|
const Menu = React.forwardRef((t0, ref) => {
|
|
28799
|
-
const $ = reactCompilerRuntime.c(
|
|
28844
|
+
const $ = reactCompilerRuntime.c(20);
|
|
28800
28845
|
const {
|
|
28801
28846
|
children,
|
|
28802
28847
|
trigger,
|
|
@@ -28805,90 +28850,98 @@
|
|
|
28805
28850
|
side,
|
|
28806
28851
|
align,
|
|
28807
28852
|
onOpenChange,
|
|
28808
|
-
portalContainer
|
|
28853
|
+
portalContainer,
|
|
28854
|
+
sideOffset: t1,
|
|
28855
|
+
className
|
|
28809
28856
|
} = t0;
|
|
28810
|
-
|
|
28857
|
+
const sideOffset = t1 === void 0 ? 4 : t1;
|
|
28858
|
+
let t2;
|
|
28811
28859
|
if ($[0] !== ref || $[1] !== trigger) {
|
|
28812
|
-
|
|
28860
|
+
t2 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Trigger, { ref, asChild: true, children: trigger });
|
|
28813
28861
|
$[0] = ref;
|
|
28814
28862
|
$[1] = trigger;
|
|
28815
|
-
$[2] =
|
|
28816
|
-
} else {
|
|
28817
|
-
t1 = $[2];
|
|
28818
|
-
}
|
|
28819
|
-
let t2;
|
|
28820
|
-
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28821
|
-
t2 = cls(paperMixin, focusedDisabled, "shadow py-2 z-30");
|
|
28822
|
-
$[3] = t2;
|
|
28863
|
+
$[2] = t2;
|
|
28823
28864
|
} else {
|
|
28824
|
-
t2 = $[
|
|
28865
|
+
t2 = $[2];
|
|
28825
28866
|
}
|
|
28826
28867
|
let t3;
|
|
28827
|
-
if ($[
|
|
28828
|
-
t3 =
|
|
28829
|
-
$[
|
|
28830
|
-
$[
|
|
28831
|
-
$[6] = side;
|
|
28832
|
-
$[7] = t3;
|
|
28868
|
+
if ($[3] !== className) {
|
|
28869
|
+
t3 = cls(paperMixin, focusedDisabled, "shadow py-2 z-30", className);
|
|
28870
|
+
$[3] = className;
|
|
28871
|
+
$[4] = t3;
|
|
28833
28872
|
} else {
|
|
28834
|
-
t3 = $[
|
|
28873
|
+
t3 = $[4];
|
|
28835
28874
|
}
|
|
28836
28875
|
let t4;
|
|
28837
|
-
if ($[8] !==
|
|
28838
|
-
t4 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.
|
|
28839
|
-
$[
|
|
28876
|
+
if ($[5] !== align || $[6] !== children || $[7] !== side || $[8] !== sideOffset || $[9] !== t3) {
|
|
28877
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Content, { side, sideOffset, align, className: t3, children });
|
|
28878
|
+
$[5] = align;
|
|
28879
|
+
$[6] = children;
|
|
28880
|
+
$[7] = side;
|
|
28881
|
+
$[8] = sideOffset;
|
|
28840
28882
|
$[9] = t3;
|
|
28841
28883
|
$[10] = t4;
|
|
28842
28884
|
} else {
|
|
28843
28885
|
t4 = $[10];
|
|
28844
28886
|
}
|
|
28845
28887
|
let t5;
|
|
28846
|
-
if ($[11] !==
|
|
28847
|
-
t5 = /* @__PURE__ */ jsxRuntime.
|
|
28848
|
-
|
|
28849
|
-
|
|
28888
|
+
if ($[11] !== portalContainer || $[12] !== t4) {
|
|
28889
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Portal, { container: portalContainer, children: t4 });
|
|
28890
|
+
$[11] = portalContainer;
|
|
28891
|
+
$[12] = t4;
|
|
28892
|
+
$[13] = t5;
|
|
28893
|
+
} else {
|
|
28894
|
+
t5 = $[13];
|
|
28895
|
+
}
|
|
28896
|
+
let t6;
|
|
28897
|
+
if ($[14] !== defaultOpen || $[15] !== onOpenChange || $[16] !== open || $[17] !== t2 || $[18] !== t5) {
|
|
28898
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu__namespace.Root, { open, defaultOpen, onOpenChange, children: [
|
|
28899
|
+
t2,
|
|
28900
|
+
t5
|
|
28850
28901
|
] });
|
|
28851
|
-
$[
|
|
28852
|
-
$[
|
|
28853
|
-
$[
|
|
28854
|
-
$[
|
|
28855
|
-
$[
|
|
28856
|
-
$[
|
|
28902
|
+
$[14] = defaultOpen;
|
|
28903
|
+
$[15] = onOpenChange;
|
|
28904
|
+
$[16] = open;
|
|
28905
|
+
$[17] = t2;
|
|
28906
|
+
$[18] = t5;
|
|
28907
|
+
$[19] = t6;
|
|
28857
28908
|
} else {
|
|
28858
|
-
|
|
28909
|
+
t6 = $[19];
|
|
28859
28910
|
}
|
|
28860
|
-
return
|
|
28911
|
+
return t6;
|
|
28861
28912
|
});
|
|
28862
28913
|
Menu.displayName = "Menu";
|
|
28863
28914
|
function MenuItem(t0) {
|
|
28864
|
-
const $ = reactCompilerRuntime.c(
|
|
28915
|
+
const $ = reactCompilerRuntime.c(8);
|
|
28865
28916
|
const {
|
|
28866
28917
|
children,
|
|
28867
28918
|
dense: t1,
|
|
28868
|
-
onClick
|
|
28919
|
+
onClick,
|
|
28920
|
+
className
|
|
28869
28921
|
} = t0;
|
|
28870
28922
|
const dense = t1 === void 0 ? false : t1;
|
|
28871
28923
|
const t2 = onClick && "cursor-pointer";
|
|
28872
28924
|
const t3 = dense ? "px-3 py-1.5" : "px-4 py-2";
|
|
28873
28925
|
let t4;
|
|
28874
|
-
if ($[0] !==
|
|
28875
|
-
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);
|
|
28876
|
-
$[0] =
|
|
28877
|
-
$[1] =
|
|
28878
|
-
$[2] =
|
|
28926
|
+
if ($[0] !== className || $[1] !== t2 || $[2] !== t3) {
|
|
28927
|
+
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);
|
|
28928
|
+
$[0] = className;
|
|
28929
|
+
$[1] = t2;
|
|
28930
|
+
$[2] = t3;
|
|
28931
|
+
$[3] = t4;
|
|
28879
28932
|
} else {
|
|
28880
|
-
t4 = $[
|
|
28933
|
+
t4 = $[3];
|
|
28881
28934
|
}
|
|
28882
28935
|
const classNames = t4;
|
|
28883
28936
|
let t5;
|
|
28884
|
-
if ($[
|
|
28937
|
+
if ($[4] !== children || $[5] !== classNames || $[6] !== onClick) {
|
|
28885
28938
|
t5 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Item, { className: classNames, onClick, children });
|
|
28886
|
-
$[
|
|
28887
|
-
$[
|
|
28888
|
-
$[
|
|
28889
|
-
$[
|
|
28939
|
+
$[4] = children;
|
|
28940
|
+
$[5] = classNames;
|
|
28941
|
+
$[6] = onClick;
|
|
28942
|
+
$[7] = t5;
|
|
28890
28943
|
} else {
|
|
28891
|
-
t5 = $[
|
|
28944
|
+
t5 = $[7];
|
|
28892
28945
|
}
|
|
28893
28946
|
return t5;
|
|
28894
28947
|
}
|
|
@@ -28943,7 +28996,7 @@
|
|
|
28943
28996
|
} = t0;
|
|
28944
28997
|
let t1;
|
|
28945
28998
|
if ($[0] !== className) {
|
|
28946
|
-
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-
|
|
28999
|
+
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);
|
|
28947
29000
|
$[0] = className;
|
|
28948
29001
|
$[1] = t1;
|
|
28949
29002
|
} else {
|
|
@@ -29610,98 +29663,99 @@
|
|
|
29610
29663
|
}
|
|
29611
29664
|
const MultiSelectContext = React__namespace.createContext({});
|
|
29612
29665
|
const MultiSelect = React__namespace.forwardRef((t0, ref) => {
|
|
29613
|
-
const $ = reactCompilerRuntime.c(
|
|
29666
|
+
const $ = reactCompilerRuntime.c(102);
|
|
29614
29667
|
const {
|
|
29615
29668
|
value,
|
|
29616
|
-
size,
|
|
29669
|
+
size: t1,
|
|
29617
29670
|
label,
|
|
29618
29671
|
error,
|
|
29619
29672
|
onValueChange,
|
|
29620
29673
|
invisible,
|
|
29621
29674
|
disabled,
|
|
29622
29675
|
placeholder,
|
|
29623
|
-
modalPopover:
|
|
29624
|
-
includeClear:
|
|
29625
|
-
includeSelectAll:
|
|
29626
|
-
useChips:
|
|
29676
|
+
modalPopover: t2,
|
|
29677
|
+
includeClear: t3,
|
|
29678
|
+
includeSelectAll: t4,
|
|
29679
|
+
useChips: t5,
|
|
29627
29680
|
className,
|
|
29628
29681
|
children,
|
|
29629
29682
|
renderValues,
|
|
29630
29683
|
open,
|
|
29631
29684
|
onOpenChange
|
|
29632
29685
|
} = t0;
|
|
29633
|
-
const
|
|
29634
|
-
const
|
|
29635
|
-
const
|
|
29636
|
-
const
|
|
29686
|
+
const size = t1 === void 0 ? "large" : t1;
|
|
29687
|
+
const modalPopover = t2 === void 0 ? true : t2;
|
|
29688
|
+
const includeClear = t3 === void 0 ? true : t3;
|
|
29689
|
+
const includeSelectAll = t4 === void 0 ? true : t4;
|
|
29690
|
+
const useChips = t5 === void 0 ? true : t5;
|
|
29637
29691
|
const [isPopoverOpen, setIsPopoverOpen] = React__namespace.useState(open ?? false);
|
|
29638
|
-
let
|
|
29692
|
+
let t6;
|
|
29639
29693
|
if ($[0] !== value) {
|
|
29640
|
-
|
|
29694
|
+
t6 = value ?? [];
|
|
29641
29695
|
$[0] = value;
|
|
29642
|
-
$[1] =
|
|
29696
|
+
$[1] = t6;
|
|
29643
29697
|
} else {
|
|
29644
|
-
|
|
29698
|
+
t6 = $[1];
|
|
29645
29699
|
}
|
|
29646
|
-
const [selectedValues, setSelectedValues] = React__namespace.useState(
|
|
29647
|
-
let
|
|
29700
|
+
const [selectedValues, setSelectedValues] = React__namespace.useState(t6);
|
|
29701
|
+
let t7;
|
|
29648
29702
|
if ($[2] !== onOpenChange) {
|
|
29649
|
-
|
|
29703
|
+
t7 = (open_0) => {
|
|
29650
29704
|
setIsPopoverOpen(open_0);
|
|
29651
29705
|
onOpenChange?.(open_0);
|
|
29652
29706
|
};
|
|
29653
29707
|
$[2] = onOpenChange;
|
|
29654
|
-
$[3] =
|
|
29708
|
+
$[3] = t7;
|
|
29655
29709
|
} else {
|
|
29656
|
-
|
|
29710
|
+
t7 = $[3];
|
|
29657
29711
|
}
|
|
29658
|
-
const onPopoverOpenChange =
|
|
29659
|
-
let t7;
|
|
29712
|
+
const onPopoverOpenChange = t7;
|
|
29660
29713
|
let t8;
|
|
29714
|
+
let t9;
|
|
29661
29715
|
if ($[4] !== open) {
|
|
29662
|
-
|
|
29716
|
+
t8 = () => {
|
|
29663
29717
|
setIsPopoverOpen(open ?? false);
|
|
29664
29718
|
};
|
|
29665
|
-
|
|
29719
|
+
t9 = [open];
|
|
29666
29720
|
$[4] = open;
|
|
29667
|
-
$[5] =
|
|
29668
|
-
$[6] =
|
|
29721
|
+
$[5] = t8;
|
|
29722
|
+
$[6] = t9;
|
|
29669
29723
|
} else {
|
|
29670
|
-
|
|
29671
|
-
|
|
29724
|
+
t8 = $[5];
|
|
29725
|
+
t9 = $[6];
|
|
29672
29726
|
}
|
|
29673
|
-
React.useEffect(
|
|
29674
|
-
let
|
|
29727
|
+
React.useEffect(t8, t9);
|
|
29728
|
+
let t10;
|
|
29675
29729
|
if ($[7] !== children) {
|
|
29676
|
-
|
|
29730
|
+
t10 = children ? React.Children.map(children, _temp$1).filter(Boolean) : [];
|
|
29677
29731
|
$[7] = children;
|
|
29678
|
-
$[8] =
|
|
29732
|
+
$[8] = t10;
|
|
29679
29733
|
} else {
|
|
29680
|
-
|
|
29734
|
+
t10 = $[8];
|
|
29681
29735
|
}
|
|
29682
|
-
const allValues =
|
|
29683
|
-
let t10;
|
|
29736
|
+
const allValues = t10;
|
|
29684
29737
|
let t11;
|
|
29738
|
+
let t12;
|
|
29685
29739
|
if ($[9] !== value) {
|
|
29686
|
-
|
|
29740
|
+
t11 = () => {
|
|
29687
29741
|
setSelectedValues(value ?? []);
|
|
29688
29742
|
};
|
|
29689
|
-
|
|
29743
|
+
t12 = [value];
|
|
29690
29744
|
$[9] = value;
|
|
29691
|
-
$[10] =
|
|
29692
|
-
$[11] =
|
|
29745
|
+
$[10] = t11;
|
|
29746
|
+
$[11] = t12;
|
|
29693
29747
|
} else {
|
|
29694
|
-
|
|
29695
|
-
|
|
29748
|
+
t11 = $[10];
|
|
29749
|
+
t12 = $[11];
|
|
29696
29750
|
}
|
|
29697
|
-
React__namespace.useEffect(
|
|
29751
|
+
React__namespace.useEffect(t11, t12);
|
|
29698
29752
|
let onItemClick;
|
|
29699
29753
|
let updateValues;
|
|
29700
29754
|
if ($[12] !== onValueChange || $[13] !== selectedValues) {
|
|
29701
29755
|
onItemClick = function onItemClick2(newValue) {
|
|
29702
29756
|
let newSelectedValues;
|
|
29703
|
-
if (selectedValues.
|
|
29704
|
-
newSelectedValues = selectedValues.filter((v) => v !== newValue);
|
|
29757
|
+
if (selectedValues.some((v_0) => String(v_0) === String(newValue))) {
|
|
29758
|
+
newSelectedValues = selectedValues.filter((v) => String(v) !== String(newValue));
|
|
29705
29759
|
} else {
|
|
29706
29760
|
newSelectedValues = [...selectedValues, newValue];
|
|
29707
29761
|
}
|
|
@@ -29719,9 +29773,9 @@
|
|
|
29719
29773
|
onItemClick = $[14];
|
|
29720
29774
|
updateValues = $[15];
|
|
29721
29775
|
}
|
|
29722
|
-
let
|
|
29776
|
+
let t13;
|
|
29723
29777
|
if ($[16] !== onPopoverOpenChange || $[17] !== selectedValues || $[18] !== updateValues) {
|
|
29724
|
-
|
|
29778
|
+
t13 = (event) => {
|
|
29725
29779
|
if (event.key === "Enter") {
|
|
29726
29780
|
onPopoverOpenChange(true);
|
|
29727
29781
|
} else {
|
|
@@ -29735,50 +29789,50 @@
|
|
|
29735
29789
|
$[16] = onPopoverOpenChange;
|
|
29736
29790
|
$[17] = selectedValues;
|
|
29737
29791
|
$[18] = updateValues;
|
|
29738
|
-
$[19] =
|
|
29792
|
+
$[19] = t13;
|
|
29739
29793
|
} else {
|
|
29740
|
-
|
|
29794
|
+
t13 = $[19];
|
|
29741
29795
|
}
|
|
29742
|
-
const handleInputKeyDown =
|
|
29743
|
-
let
|
|
29796
|
+
const handleInputKeyDown = t13;
|
|
29797
|
+
let t14;
|
|
29744
29798
|
if ($[20] !== selectedValues || $[21] !== updateValues) {
|
|
29745
|
-
|
|
29746
|
-
const newSelectedValues_1 = selectedValues.
|
|
29799
|
+
t14 = (value_0) => {
|
|
29800
|
+
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];
|
|
29747
29801
|
updateValues(newSelectedValues_1);
|
|
29748
29802
|
};
|
|
29749
29803
|
$[20] = selectedValues;
|
|
29750
29804
|
$[21] = updateValues;
|
|
29751
|
-
$[22] =
|
|
29805
|
+
$[22] = t14;
|
|
29752
29806
|
} else {
|
|
29753
|
-
|
|
29807
|
+
t14 = $[22];
|
|
29754
29808
|
}
|
|
29755
|
-
const toggleOption =
|
|
29756
|
-
let
|
|
29809
|
+
const toggleOption = t14;
|
|
29810
|
+
let t15;
|
|
29757
29811
|
if ($[23] !== updateValues) {
|
|
29758
|
-
|
|
29812
|
+
t15 = () => {
|
|
29759
29813
|
updateValues([]);
|
|
29760
29814
|
};
|
|
29761
29815
|
$[23] = updateValues;
|
|
29762
|
-
$[24] =
|
|
29816
|
+
$[24] = t15;
|
|
29763
29817
|
} else {
|
|
29764
|
-
|
|
29818
|
+
t15 = $[24];
|
|
29765
29819
|
}
|
|
29766
|
-
const handleClear =
|
|
29767
|
-
let
|
|
29820
|
+
const handleClear = t15;
|
|
29821
|
+
let t16;
|
|
29768
29822
|
if ($[25] !== isPopoverOpen || $[26] !== onPopoverOpenChange) {
|
|
29769
|
-
|
|
29823
|
+
t16 = () => {
|
|
29770
29824
|
onPopoverOpenChange(!isPopoverOpen);
|
|
29771
29825
|
};
|
|
29772
29826
|
$[25] = isPopoverOpen;
|
|
29773
29827
|
$[26] = onPopoverOpenChange;
|
|
29774
|
-
$[27] =
|
|
29828
|
+
$[27] = t16;
|
|
29775
29829
|
} else {
|
|
29776
|
-
|
|
29830
|
+
t16 = $[27];
|
|
29777
29831
|
}
|
|
29778
|
-
const handleTogglePopover =
|
|
29779
|
-
let
|
|
29832
|
+
const handleTogglePopover = t16;
|
|
29833
|
+
let t17;
|
|
29780
29834
|
if ($[28] !== allValues || $[29] !== handleClear || $[30] !== onPopoverOpenChange || $[31] !== selectedValues.length || $[32] !== updateValues) {
|
|
29781
|
-
|
|
29835
|
+
t17 = () => {
|
|
29782
29836
|
if (selectedValues.length === allValues.length) {
|
|
29783
29837
|
handleClear();
|
|
29784
29838
|
} else {
|
|
@@ -29791,60 +29845,76 @@
|
|
|
29791
29845
|
$[30] = onPopoverOpenChange;
|
|
29792
29846
|
$[31] = selectedValues.length;
|
|
29793
29847
|
$[32] = updateValues;
|
|
29794
|
-
$[33] =
|
|
29848
|
+
$[33] = t17;
|
|
29795
29849
|
} else {
|
|
29796
|
-
|
|
29850
|
+
t17 = $[33];
|
|
29797
29851
|
}
|
|
29798
|
-
const toggleAll =
|
|
29852
|
+
const toggleAll = t17;
|
|
29799
29853
|
useInjectStyles("MultiSelect", `
|
|
29800
29854
|
[cmdk-group] {
|
|
29801
29855
|
max-height: 45vh;
|
|
29802
29856
|
overflow-y: auto;
|
|
29803
29857
|
// width: 400px;
|
|
29804
29858
|
} `);
|
|
29805
|
-
let
|
|
29859
|
+
let t18;
|
|
29806
29860
|
if ($[34] !== onItemClick || $[35] !== selectedValues) {
|
|
29807
|
-
|
|
29861
|
+
t18 = {
|
|
29808
29862
|
fieldValue: selectedValues,
|
|
29809
29863
|
onItemClick
|
|
29810
29864
|
};
|
|
29811
29865
|
$[34] = onItemClick;
|
|
29812
29866
|
$[35] = selectedValues;
|
|
29813
|
-
$[36] =
|
|
29867
|
+
$[36] = t18;
|
|
29814
29868
|
} else {
|
|
29815
|
-
|
|
29869
|
+
t18 = $[36];
|
|
29816
29870
|
}
|
|
29817
|
-
let
|
|
29871
|
+
let t19;
|
|
29818
29872
|
if ($[37] !== error || $[38] !== label) {
|
|
29819
|
-
|
|
29873
|
+
t19 = typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(SelectInputLabel, { error, children: label }) : label;
|
|
29820
29874
|
$[37] = error;
|
|
29821
29875
|
$[38] = label;
|
|
29822
|
-
$[39] =
|
|
29876
|
+
$[39] = t19;
|
|
29823
29877
|
} else {
|
|
29824
|
-
|
|
29878
|
+
t19 = $[39];
|
|
29825
29879
|
}
|
|
29826
|
-
const
|
|
29827
|
-
const
|
|
29828
|
-
const
|
|
29829
|
-
|
|
29830
|
-
|
|
29831
|
-
|
|
29880
|
+
const t20 = size === "smallest";
|
|
29881
|
+
const t21 = size === "small";
|
|
29882
|
+
const t22 = size === "medium";
|
|
29883
|
+
const t23 = size === "large";
|
|
29884
|
+
let t24;
|
|
29885
|
+
if ($[40] !== className || $[41] !== disabled || $[42] !== invisible || $[43] !== size || $[44] !== t20 || $[45] !== t21 || $[46] !== t22 || $[47] !== t23) {
|
|
29886
|
+
t24 = cls({
|
|
29887
|
+
"min-h-[28px]": t20,
|
|
29888
|
+
"min-h-[32px]": t21,
|
|
29889
|
+
"min-h-[42px]": t22,
|
|
29890
|
+
"min-h-[64px]": t23
|
|
29891
|
+
}, {
|
|
29892
|
+
"py-1": size === "small" || size === "smallest",
|
|
29893
|
+
"py-2": size === "medium" || size === "large"
|
|
29894
|
+
}, {
|
|
29895
|
+
"px-2": size === "small" || size === "smallest",
|
|
29896
|
+
"px-4": size === "medium" || size === "large"
|
|
29897
|
+
}, "select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className);
|
|
29832
29898
|
$[40] = className;
|
|
29833
|
-
$[41] =
|
|
29834
|
-
$[42] =
|
|
29835
|
-
$[43] =
|
|
29836
|
-
$[44] =
|
|
29899
|
+
$[41] = disabled;
|
|
29900
|
+
$[42] = invisible;
|
|
29901
|
+
$[43] = size;
|
|
29902
|
+
$[44] = t20;
|
|
29903
|
+
$[45] = t21;
|
|
29904
|
+
$[46] = t22;
|
|
29905
|
+
$[47] = t23;
|
|
29906
|
+
$[48] = t24;
|
|
29837
29907
|
} else {
|
|
29838
|
-
|
|
29908
|
+
t24 = $[48];
|
|
29839
29909
|
}
|
|
29840
|
-
let
|
|
29841
|
-
if ($[
|
|
29842
|
-
|
|
29910
|
+
let t25;
|
|
29911
|
+
if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !== toggleOption || $[57] !== useChips) {
|
|
29912
|
+
t25 = selectedValues.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center w-full", children: [
|
|
29843
29913
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-start", children: [
|
|
29844
29914
|
renderValues && renderValues(selectedValues),
|
|
29845
29915
|
!renderValues && selectedValues.map((value_1) => {
|
|
29846
29916
|
const childrenProps = React.Children.map(children, _temp2).filter(Boolean);
|
|
29847
|
-
const option = childrenProps.find((o) => o.value === value_1);
|
|
29917
|
+
const option = childrenProps.find((o) => String(o.value) === String(value_1));
|
|
29848
29918
|
if (!useChips) {
|
|
29849
29919
|
return option?.children;
|
|
29850
29920
|
}
|
|
@@ -29854,7 +29924,7 @@
|
|
|
29854
29924
|
event_0.stopPropagation();
|
|
29855
29925
|
toggleOption(value_1);
|
|
29856
29926
|
} })
|
|
29857
|
-
] }, value_1);
|
|
29927
|
+
] }, String(value_1));
|
|
29858
29928
|
})
|
|
29859
29929
|
] }),
|
|
29860
29930
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
@@ -29868,179 +29938,179 @@
|
|
|
29868
29938
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: placeholder }),
|
|
29869
29939
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
|
|
29870
29940
|
] });
|
|
29871
|
-
$[
|
|
29872
|
-
$[
|
|
29873
|
-
$[
|
|
29874
|
-
$[
|
|
29875
|
-
$[
|
|
29876
|
-
$[
|
|
29877
|
-
$[
|
|
29878
|
-
$[
|
|
29879
|
-
$[
|
|
29880
|
-
$[
|
|
29881
|
-
} else {
|
|
29882
|
-
|
|
29883
|
-
}
|
|
29884
|
-
let t24;
|
|
29885
|
-
if ($[55] !== handleTogglePopover || $[56] !== ref || $[57] !== t22 || $[58] !== t23) {
|
|
29886
|
-
t24 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { ref, onClick: handleTogglePopover, className: t22, children: t23 }) });
|
|
29887
|
-
$[55] = handleTogglePopover;
|
|
29888
|
-
$[56] = ref;
|
|
29889
|
-
$[57] = t22;
|
|
29890
|
-
$[58] = t23;
|
|
29891
|
-
$[59] = t24;
|
|
29892
|
-
} else {
|
|
29893
|
-
t24 = $[59];
|
|
29894
|
-
}
|
|
29895
|
-
let t25;
|
|
29896
|
-
if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29897
|
-
t25 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
|
|
29898
|
-
$[60] = t25;
|
|
29899
|
-
} else {
|
|
29900
|
-
t25 = $[60];
|
|
29941
|
+
$[49] = children;
|
|
29942
|
+
$[50] = handleClear;
|
|
29943
|
+
$[51] = includeClear;
|
|
29944
|
+
$[52] = isPopoverOpen;
|
|
29945
|
+
$[53] = placeholder;
|
|
29946
|
+
$[54] = renderValues;
|
|
29947
|
+
$[55] = selectedValues;
|
|
29948
|
+
$[56] = toggleOption;
|
|
29949
|
+
$[57] = useChips;
|
|
29950
|
+
$[58] = t25;
|
|
29951
|
+
} else {
|
|
29952
|
+
t25 = $[58];
|
|
29901
29953
|
}
|
|
29902
29954
|
let t26;
|
|
29903
|
-
if ($[61] !==
|
|
29904
|
-
t26 = (
|
|
29905
|
-
$[
|
|
29906
|
-
$[
|
|
29955
|
+
if ($[59] !== handleTogglePopover || $[60] !== ref || $[61] !== t24 || $[62] !== t25) {
|
|
29956
|
+
t26 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { ref, onClick: handleTogglePopover, className: t24, children: t25 }) });
|
|
29957
|
+
$[59] = handleTogglePopover;
|
|
29958
|
+
$[60] = ref;
|
|
29959
|
+
$[61] = t24;
|
|
29960
|
+
$[62] = t25;
|
|
29961
|
+
$[63] = t26;
|
|
29907
29962
|
} else {
|
|
29908
|
-
t26 = $[
|
|
29963
|
+
t26 = $[63];
|
|
29909
29964
|
}
|
|
29910
29965
|
let t27;
|
|
29911
|
-
if ($[
|
|
29912
|
-
t27 = cls(
|
|
29913
|
-
$[
|
|
29966
|
+
if ($[64] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29967
|
+
t27 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
|
|
29968
|
+
$[64] = t27;
|
|
29914
29969
|
} else {
|
|
29915
|
-
t27 = $[
|
|
29970
|
+
t27 = $[64];
|
|
29916
29971
|
}
|
|
29917
29972
|
let t28;
|
|
29918
|
-
if ($[
|
|
29919
|
-
t28 =
|
|
29920
|
-
$[
|
|
29921
|
-
$[
|
|
29973
|
+
if ($[65] !== onPopoverOpenChange) {
|
|
29974
|
+
t28 = () => onPopoverOpenChange(false);
|
|
29975
|
+
$[65] = onPopoverOpenChange;
|
|
29976
|
+
$[66] = t28;
|
|
29922
29977
|
} else {
|
|
29923
|
-
t28 = $[
|
|
29978
|
+
t28 = $[66];
|
|
29924
29979
|
}
|
|
29925
29980
|
let t29;
|
|
29926
|
-
if ($[
|
|
29927
|
-
t29 =
|
|
29928
|
-
$[
|
|
29929
|
-
$[67] = selectedValues.length;
|
|
29930
|
-
$[68] = t29;
|
|
29981
|
+
if ($[67] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29982
|
+
t29 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow ");
|
|
29983
|
+
$[67] = t29;
|
|
29931
29984
|
} else {
|
|
29932
|
-
t29 = $[
|
|
29985
|
+
t29 = $[67];
|
|
29933
29986
|
}
|
|
29934
29987
|
let t30;
|
|
29935
|
-
if ($[
|
|
29936
|
-
t30 = /* @__PURE__ */ jsxRuntime.
|
|
29937
|
-
|
|
29938
|
-
|
|
29939
|
-
] });
|
|
29940
|
-
$[69] = t28;
|
|
29941
|
-
$[70] = t29;
|
|
29942
|
-
$[71] = t30;
|
|
29988
|
+
if ($[68] !== handleInputKeyDown) {
|
|
29989
|
+
t30 = /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Input, { className: t29, placeholder: "Search...", onKeyDown: handleInputKeyDown });
|
|
29990
|
+
$[68] = handleInputKeyDown;
|
|
29991
|
+
$[69] = t30;
|
|
29943
29992
|
} else {
|
|
29944
|
-
t30 = $[
|
|
29993
|
+
t30 = $[69];
|
|
29945
29994
|
}
|
|
29946
29995
|
let t31;
|
|
29947
|
-
if ($[
|
|
29948
|
-
t31 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
29996
|
+
if ($[70] !== handleClear || $[71] !== selectedValues.length) {
|
|
29997
|
+
t31 = selectedValues.length > 0 && /* @__PURE__ */ jsxRuntime.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" });
|
|
29998
|
+
$[70] = handleClear;
|
|
29999
|
+
$[71] = selectedValues.length;
|
|
29949
30000
|
$[72] = t31;
|
|
29950
30001
|
} else {
|
|
29951
30002
|
t31 = $[72];
|
|
29952
30003
|
}
|
|
29953
30004
|
let t32;
|
|
29954
|
-
if ($[73]
|
|
29955
|
-
t32 = /* @__PURE__ */ jsxRuntime.
|
|
29956
|
-
|
|
30005
|
+
if ($[73] !== t30 || $[74] !== t31) {
|
|
30006
|
+
t32 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center", children: [
|
|
30007
|
+
t30,
|
|
30008
|
+
t31
|
|
30009
|
+
] });
|
|
30010
|
+
$[73] = t30;
|
|
30011
|
+
$[74] = t31;
|
|
30012
|
+
$[75] = t32;
|
|
29957
30013
|
} else {
|
|
29958
|
-
t32 = $[
|
|
30014
|
+
t32 = $[75];
|
|
29959
30015
|
}
|
|
29960
30016
|
let t33;
|
|
29961
|
-
if ($[
|
|
29962
|
-
t33 =
|
|
30017
|
+
if ($[76] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30018
|
+
t33 = /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "horizontal", className: "my-0" });
|
|
30019
|
+
$[76] = t33;
|
|
30020
|
+
} else {
|
|
30021
|
+
t33 = $[76];
|
|
30022
|
+
}
|
|
30023
|
+
let t34;
|
|
30024
|
+
if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30025
|
+
t34 = /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Empty, { className: "px-4 py-2", children: "No results found." });
|
|
30026
|
+
$[77] = t34;
|
|
30027
|
+
} else {
|
|
30028
|
+
t34 = $[77];
|
|
30029
|
+
}
|
|
30030
|
+
let t35;
|
|
30031
|
+
if ($[78] !== allValues.length || $[79] !== includeSelectAll || $[80] !== selectedValues.length || $[81] !== toggleAll) {
|
|
30032
|
+
t35 = includeSelectAll && /* @__PURE__ */ jsxRuntime.jsxs(cmdk.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: [
|
|
29963
30033
|
/* @__PURE__ */ jsxRuntime.jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
|
|
29964
30034
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
|
|
29965
30035
|
] }, "all");
|
|
29966
|
-
$[
|
|
29967
|
-
$[
|
|
29968
|
-
$[
|
|
29969
|
-
$[
|
|
29970
|
-
$[
|
|
30036
|
+
$[78] = allValues.length;
|
|
30037
|
+
$[79] = includeSelectAll;
|
|
30038
|
+
$[80] = selectedValues.length;
|
|
30039
|
+
$[81] = toggleAll;
|
|
30040
|
+
$[82] = t35;
|
|
29971
30041
|
} else {
|
|
29972
|
-
|
|
30042
|
+
t35 = $[82];
|
|
29973
30043
|
}
|
|
29974
|
-
let
|
|
29975
|
-
if ($[
|
|
29976
|
-
|
|
29977
|
-
|
|
30044
|
+
let t36;
|
|
30045
|
+
if ($[83] !== children || $[84] !== t35) {
|
|
30046
|
+
t36 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.List, { children: [
|
|
30047
|
+
t34,
|
|
29978
30048
|
/* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Group, { children: [
|
|
29979
|
-
|
|
30049
|
+
t35,
|
|
29980
30050
|
children
|
|
29981
30051
|
] })
|
|
29982
30052
|
] });
|
|
29983
|
-
$[
|
|
29984
|
-
$[80] = t33;
|
|
29985
|
-
$[81] = t34;
|
|
29986
|
-
} else {
|
|
29987
|
-
t34 = $[81];
|
|
29988
|
-
}
|
|
29989
|
-
let t35;
|
|
29990
|
-
if ($[82] !== t30 || $[83] !== t34) {
|
|
29991
|
-
t35 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command, { children: [
|
|
29992
|
-
t30,
|
|
29993
|
-
t31,
|
|
29994
|
-
t34
|
|
29995
|
-
] });
|
|
29996
|
-
$[82] = t30;
|
|
29997
|
-
$[83] = t34;
|
|
30053
|
+
$[83] = children;
|
|
29998
30054
|
$[84] = t35;
|
|
30055
|
+
$[85] = t36;
|
|
29999
30056
|
} else {
|
|
30000
|
-
|
|
30001
|
-
}
|
|
30002
|
-
let t36;
|
|
30003
|
-
if ($[85] !== t26 || $[86] !== t35) {
|
|
30004
|
-
t36 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Content, { className: t25, align: "start", sideOffset: 8, onEscapeKeyDown: t26, children: t35 });
|
|
30005
|
-
$[85] = t26;
|
|
30006
|
-
$[86] = t35;
|
|
30007
|
-
$[87] = t36;
|
|
30008
|
-
} else {
|
|
30009
|
-
t36 = $[87];
|
|
30057
|
+
t36 = $[85];
|
|
30010
30058
|
}
|
|
30011
30059
|
let t37;
|
|
30012
|
-
if ($[
|
|
30013
|
-
t37 = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30014
|
-
|
|
30060
|
+
if ($[86] !== t32 || $[87] !== t36) {
|
|
30061
|
+
t37 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command, { children: [
|
|
30062
|
+
t32,
|
|
30063
|
+
t33,
|
|
30015
30064
|
t36
|
|
30016
30065
|
] });
|
|
30017
|
-
$[
|
|
30018
|
-
$[
|
|
30019
|
-
$[
|
|
30020
|
-
$[91] = t24;
|
|
30021
|
-
$[92] = t36;
|
|
30022
|
-
$[93] = t37;
|
|
30066
|
+
$[86] = t32;
|
|
30067
|
+
$[87] = t36;
|
|
30068
|
+
$[88] = t37;
|
|
30023
30069
|
} else {
|
|
30024
|
-
t37 = $[
|
|
30070
|
+
t37 = $[88];
|
|
30025
30071
|
}
|
|
30026
30072
|
let t38;
|
|
30027
|
-
if ($[
|
|
30028
|
-
t38 = /* @__PURE__ */ jsxRuntime.
|
|
30029
|
-
|
|
30030
|
-
|
|
30073
|
+
if ($[89] !== t28 || $[90] !== t37) {
|
|
30074
|
+
t38 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Content, { className: t27, align: "start", sideOffset: 8, onEscapeKeyDown: t28, children: t37 });
|
|
30075
|
+
$[89] = t28;
|
|
30076
|
+
$[90] = t37;
|
|
30077
|
+
$[91] = t38;
|
|
30078
|
+
} else {
|
|
30079
|
+
t38 = $[91];
|
|
30080
|
+
}
|
|
30081
|
+
let t39;
|
|
30082
|
+
if ($[92] !== isPopoverOpen || $[93] !== modalPopover || $[94] !== onPopoverOpenChange || $[95] !== t26 || $[96] !== t38) {
|
|
30083
|
+
t39 = /* @__PURE__ */ jsxRuntime.jsxs(PopoverPrimitive__namespace.Root, { open: isPopoverOpen, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
|
|
30084
|
+
t26,
|
|
30085
|
+
t38
|
|
30031
30086
|
] });
|
|
30032
|
-
$[
|
|
30033
|
-
$[
|
|
30034
|
-
$[
|
|
30035
|
-
$[
|
|
30087
|
+
$[92] = isPopoverOpen;
|
|
30088
|
+
$[93] = modalPopover;
|
|
30089
|
+
$[94] = onPopoverOpenChange;
|
|
30090
|
+
$[95] = t26;
|
|
30091
|
+
$[96] = t38;
|
|
30092
|
+
$[97] = t39;
|
|
30093
|
+
} else {
|
|
30094
|
+
t39 = $[97];
|
|
30095
|
+
}
|
|
30096
|
+
let t40;
|
|
30097
|
+
if ($[98] !== t18 || $[99] !== t19 || $[100] !== t39) {
|
|
30098
|
+
t40 = /* @__PURE__ */ jsxRuntime.jsxs(MultiSelectContext.Provider, { value: t18, children: [
|
|
30099
|
+
t19,
|
|
30100
|
+
t39
|
|
30101
|
+
] });
|
|
30102
|
+
$[98] = t18;
|
|
30103
|
+
$[99] = t19;
|
|
30104
|
+
$[100] = t39;
|
|
30105
|
+
$[101] = t40;
|
|
30036
30106
|
} else {
|
|
30037
|
-
|
|
30107
|
+
t40 = $[101];
|
|
30038
30108
|
}
|
|
30039
|
-
return
|
|
30109
|
+
return t40;
|
|
30040
30110
|
});
|
|
30041
30111
|
MultiSelect.displayName = "MultiSelect";
|
|
30042
30112
|
function MultiSelectItem(t0) {
|
|
30043
|
-
const $ = reactCompilerRuntime.c(
|
|
30113
|
+
const $ = reactCompilerRuntime.c(20);
|
|
30044
30114
|
const {
|
|
30045
30115
|
children,
|
|
30046
30116
|
value,
|
|
@@ -30064,7 +30134,15 @@
|
|
|
30064
30134
|
}
|
|
30065
30135
|
let t2;
|
|
30066
30136
|
if ($[2] !== t1 || $[3] !== value) {
|
|
30067
|
-
|
|
30137
|
+
let t32;
|
|
30138
|
+
if ($[5] !== value) {
|
|
30139
|
+
t32 = (v) => String(v) === String(value);
|
|
30140
|
+
$[5] = value;
|
|
30141
|
+
$[6] = t32;
|
|
30142
|
+
} else {
|
|
30143
|
+
t32 = $[6];
|
|
30144
|
+
}
|
|
30145
|
+
t2 = t1.some(t32);
|
|
30068
30146
|
$[2] = t1;
|
|
30069
30147
|
$[3] = value;
|
|
30070
30148
|
$[4] = t2;
|
|
@@ -30073,47 +30151,47 @@
|
|
|
30073
30151
|
}
|
|
30074
30152
|
const isSelected = t2;
|
|
30075
30153
|
let t3;
|
|
30076
|
-
if ($[
|
|
30154
|
+
if ($[7] !== onItemClick || $[8] !== value) {
|
|
30077
30155
|
t3 = (_) => {
|
|
30078
30156
|
onItemClick(value);
|
|
30079
30157
|
};
|
|
30080
|
-
$[
|
|
30081
|
-
$[
|
|
30082
|
-
$[
|
|
30158
|
+
$[7] = onItemClick;
|
|
30159
|
+
$[8] = value;
|
|
30160
|
+
$[9] = t3;
|
|
30083
30161
|
} else {
|
|
30084
|
-
t3 = $[
|
|
30162
|
+
t3 = $[9];
|
|
30085
30163
|
}
|
|
30086
30164
|
const t4 = isSelected ? "bg-surface-accent-200 dark:bg-surface-accent-950" : "";
|
|
30087
30165
|
let t5;
|
|
30088
|
-
if ($[
|
|
30166
|
+
if ($[10] !== className || $[11] !== t4) {
|
|
30089
30167
|
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);
|
|
30090
|
-
$[
|
|
30091
|
-
$[
|
|
30092
|
-
$[
|
|
30168
|
+
$[10] = className;
|
|
30169
|
+
$[11] = t4;
|
|
30170
|
+
$[12] = t5;
|
|
30093
30171
|
} else {
|
|
30094
|
-
t5 = $[
|
|
30172
|
+
t5 = $[12];
|
|
30095
30173
|
}
|
|
30096
30174
|
let t6;
|
|
30097
|
-
if ($[
|
|
30175
|
+
if ($[13] !== isSelected) {
|
|
30098
30176
|
t6 = /* @__PURE__ */ jsxRuntime.jsx(InnerCheckBox, { checked: isSelected });
|
|
30099
|
-
$[
|
|
30100
|
-
$[
|
|
30177
|
+
$[13] = isSelected;
|
|
30178
|
+
$[14] = t6;
|
|
30101
30179
|
} else {
|
|
30102
|
-
t6 = $[
|
|
30180
|
+
t6 = $[14];
|
|
30103
30181
|
}
|
|
30104
30182
|
let t7;
|
|
30105
|
-
if ($[
|
|
30183
|
+
if ($[15] !== children || $[16] !== t3 || $[17] !== t5 || $[18] !== t6) {
|
|
30106
30184
|
t7 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Item, { onMouseDown: _temp3, onSelect: t3, className: t5, children: [
|
|
30107
30185
|
t6,
|
|
30108
30186
|
children
|
|
30109
30187
|
] });
|
|
30110
|
-
$[
|
|
30111
|
-
$[
|
|
30112
|
-
$[
|
|
30113
|
-
$[
|
|
30114
|
-
$[
|
|
30188
|
+
$[15] = children;
|
|
30189
|
+
$[16] = t3;
|
|
30190
|
+
$[17] = t5;
|
|
30191
|
+
$[18] = t6;
|
|
30192
|
+
$[19] = t7;
|
|
30115
30193
|
} else {
|
|
30116
|
-
t7 = $[
|
|
30194
|
+
t7 = $[19];
|
|
30117
30195
|
}
|
|
30118
30196
|
return t7;
|
|
30119
30197
|
}
|
|
@@ -30359,7 +30437,7 @@
|
|
|
30359
30437
|
}
|
|
30360
30438
|
let t9;
|
|
30361
30439
|
if ($[10] !== loading) {
|
|
30362
|
-
t9 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute p-0 px-4 h-full pointer-events-none flex items-center justify-center top-0", children: loading ? /* @__PURE__ */ jsxRuntime.jsx(CircularProgress, { size: "
|
|
30440
|
+
t9 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute p-0 px-4 h-full pointer-events-none flex items-center justify-center top-0", children: loading ? /* @__PURE__ */ jsxRuntime.jsx(CircularProgress, { size: "smallest" }) : /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { className: "text-text-disabled dark:text-text-disabled-dark" }) });
|
|
30363
30441
|
$[10] = loading;
|
|
30364
30442
|
$[11] = t9;
|
|
30365
30443
|
} else {
|
|
@@ -30475,25 +30553,31 @@
|
|
|
30475
30553
|
setOpenInternal(open ?? false);
|
|
30476
30554
|
}, [open]);
|
|
30477
30555
|
const onValueChangeInternal = React.useCallback((newValue) => {
|
|
30478
|
-
|
|
30556
|
+
let typedValue = newValue;
|
|
30557
|
+
if (newValue === "true") typedValue = true;
|
|
30558
|
+
else if (newValue === "false") typedValue = false;
|
|
30559
|
+
else if (!isNaN(Number(newValue)) && newValue.trim() !== "") typedValue = Number(newValue);
|
|
30560
|
+
onValueChange?.(typedValue);
|
|
30479
30561
|
if (onChange) {
|
|
30480
30562
|
const event = {
|
|
30481
30563
|
target: {
|
|
30482
30564
|
name,
|
|
30483
|
-
value:
|
|
30565
|
+
value: typedValue
|
|
30484
30566
|
}
|
|
30485
30567
|
};
|
|
30486
30568
|
onChange(event);
|
|
30487
30569
|
}
|
|
30488
|
-
}, [onChange,
|
|
30570
|
+
}, [onChange, onValueChange, name]);
|
|
30489
30571
|
const hasValue = Array.isArray(value) ? value.length > 0 : value != null && value !== "" && value !== void 0;
|
|
30490
|
-
|
|
30572
|
+
const stringValue = value !== void 0 ? String(value) : void 0;
|
|
30573
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Root, { name, value: stringValue, open: openInternal, disabled, onValueChange: onValueChangeInternal, onOpenChange: (open_0) => {
|
|
30491
30574
|
onOpenChange?.(open_0);
|
|
30492
30575
|
setOpenInternal(open_0);
|
|
30493
30576
|
}, ...props, children: [
|
|
30494
30577
|
typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(SelectInputLabel, { error, children: label }) : label,
|
|
30495
30578
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
|
|
30496
|
-
"min-h-[28px]": size === "
|
|
30579
|
+
"min-h-[28px]": size === "smallest",
|
|
30580
|
+
"min-h-[32px]": size === "small",
|
|
30497
30581
|
"min-h-[42px]": size === "medium",
|
|
30498
30582
|
"min-h-[64px]": size === "large",
|
|
30499
30583
|
"w-fit": !fullWidth,
|
|
@@ -30501,30 +30585,32 @@
|
|
|
30501
30585
|
}), children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Trigger, { ref: inputRef, id, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cls("h-full", padding ? {
|
|
30502
30586
|
"px-4": size === "large",
|
|
30503
30587
|
"px-3": size === "medium",
|
|
30504
|
-
"px-2": size === "small"
|
|
30588
|
+
"px-2": size === "small" || size === "smallest"
|
|
30505
30589
|
} : "", "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", {
|
|
30506
|
-
"min-h-[28px]": size === "
|
|
30590
|
+
"min-h-[28px]": size === "smallest",
|
|
30591
|
+
"min-h-[32px]": size === "small",
|
|
30507
30592
|
"min-h-[42px]": size === "medium",
|
|
30508
30593
|
"min-h-[64px]": size === "large",
|
|
30509
30594
|
"w-full": fullWidth,
|
|
30510
30595
|
"w-fit": !fullWidth
|
|
30511
30596
|
}, inputClassName), children: [
|
|
30512
30597
|
/* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
|
|
30513
|
-
"min-h-[28px]": size === "
|
|
30598
|
+
"min-h-[28px]": size === "smallest",
|
|
30599
|
+
"min-h-[32px]": size === "small",
|
|
30514
30600
|
"min-h-[42px]": size === "medium",
|
|
30515
30601
|
"min-h-[64px]": size === "large"
|
|
30516
30602
|
}), children: /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Value, { onClick: (e) => {
|
|
30517
30603
|
e.preventDefault();
|
|
30518
30604
|
e.stopPropagation();
|
|
30519
30605
|
}, placeholder, className: "w-full", children: [
|
|
30520
|
-
hasValue && value && renderValue ? renderValue(value) : placeholder,
|
|
30606
|
+
hasValue && value !== void 0 && renderValue ? renderValue(value) : placeholder,
|
|
30521
30607
|
hasValue && !renderValue && (() => {
|
|
30522
30608
|
const childrenProps = React.Children.map(children, (child) => {
|
|
30523
30609
|
if (React.isValidElement(child)) {
|
|
30524
30610
|
return child.props;
|
|
30525
30611
|
}
|
|
30526
30612
|
}).filter(Boolean);
|
|
30527
|
-
const option = childrenProps.find((o) => o.value === value);
|
|
30613
|
+
const option = childrenProps.find((o) => String(o.value) === String(value));
|
|
30528
30614
|
return option?.children;
|
|
30529
30615
|
})()
|
|
30530
30616
|
] }) }),
|
|
@@ -30551,6 +30637,7 @@
|
|
|
30551
30637
|
disabled,
|
|
30552
30638
|
className
|
|
30553
30639
|
} = t0;
|
|
30640
|
+
const stringValue = String(value);
|
|
30554
30641
|
const t1 = disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer";
|
|
30555
30642
|
let t2;
|
|
30556
30643
|
if ($[0] !== className || $[1] !== t1) {
|
|
@@ -30577,15 +30664,15 @@
|
|
|
30577
30664
|
t4 = $[5];
|
|
30578
30665
|
}
|
|
30579
30666
|
let t5;
|
|
30580
|
-
if ($[6] !== disabled || $[7] !==
|
|
30581
|
-
t5 = /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Item, { value, disabled, className: t2, children: [
|
|
30667
|
+
if ($[6] !== disabled || $[7] !== stringValue || $[8] !== t2 || $[9] !== t3) {
|
|
30668
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Item, { value: stringValue, disabled, className: t2, children: [
|
|
30582
30669
|
t3,
|
|
30583
30670
|
t4
|
|
30584
|
-
] },
|
|
30671
|
+
] }, stringValue);
|
|
30585
30672
|
$[6] = disabled;
|
|
30586
|
-
$[7] =
|
|
30587
|
-
$[8] =
|
|
30588
|
-
$[9] =
|
|
30673
|
+
$[7] = stringValue;
|
|
30674
|
+
$[8] = t2;
|
|
30675
|
+
$[9] = t3;
|
|
30589
30676
|
$[10] = t5;
|
|
30590
30677
|
} else {
|
|
30591
30678
|
t5 = $[10];
|
|
@@ -30817,13 +30904,15 @@
|
|
|
30817
30904
|
});
|
|
30818
30905
|
Slider.displayName = "Slider";
|
|
30819
30906
|
const Sheet = (t0) => {
|
|
30820
|
-
const $ = reactCompilerRuntime.c(
|
|
30907
|
+
const $ = reactCompilerRuntime.c(66);
|
|
30821
30908
|
let children;
|
|
30822
30909
|
let className;
|
|
30823
30910
|
let onOpenChange;
|
|
30824
30911
|
let open;
|
|
30825
30912
|
let overlayClassName;
|
|
30913
|
+
let overlayStyle;
|
|
30826
30914
|
let props;
|
|
30915
|
+
let style;
|
|
30827
30916
|
let t1;
|
|
30828
30917
|
let t2;
|
|
30829
30918
|
let t3;
|
|
@@ -30840,7 +30929,9 @@
|
|
|
30840
30929
|
onOpenChange,
|
|
30841
30930
|
transparent,
|
|
30842
30931
|
className,
|
|
30932
|
+
style,
|
|
30843
30933
|
overlayClassName,
|
|
30934
|
+
overlayStyle,
|
|
30844
30935
|
...props
|
|
30845
30936
|
} = t0);
|
|
30846
30937
|
$[0] = t0;
|
|
@@ -30849,24 +30940,28 @@
|
|
|
30849
30940
|
$[3] = onOpenChange;
|
|
30850
30941
|
$[4] = open;
|
|
30851
30942
|
$[5] = overlayClassName;
|
|
30852
|
-
$[6] =
|
|
30853
|
-
$[7] =
|
|
30854
|
-
$[8] =
|
|
30855
|
-
$[9] =
|
|
30856
|
-
$[10] =
|
|
30857
|
-
$[11] =
|
|
30943
|
+
$[6] = overlayStyle;
|
|
30944
|
+
$[7] = props;
|
|
30945
|
+
$[8] = style;
|
|
30946
|
+
$[9] = t1;
|
|
30947
|
+
$[10] = t2;
|
|
30948
|
+
$[11] = t3;
|
|
30949
|
+
$[12] = title;
|
|
30950
|
+
$[13] = transparent;
|
|
30858
30951
|
} else {
|
|
30859
30952
|
children = $[1];
|
|
30860
30953
|
className = $[2];
|
|
30861
30954
|
onOpenChange = $[3];
|
|
30862
30955
|
open = $[4];
|
|
30863
30956
|
overlayClassName = $[5];
|
|
30864
|
-
|
|
30865
|
-
|
|
30866
|
-
|
|
30867
|
-
|
|
30868
|
-
|
|
30869
|
-
|
|
30957
|
+
overlayStyle = $[6];
|
|
30958
|
+
props = $[7];
|
|
30959
|
+
style = $[8];
|
|
30960
|
+
t1 = $[9];
|
|
30961
|
+
t2 = $[10];
|
|
30962
|
+
t3 = $[11];
|
|
30963
|
+
title = $[12];
|
|
30964
|
+
transparent = $[13];
|
|
30870
30965
|
}
|
|
30871
30966
|
const side = t1 === void 0 ? "right" : t1;
|
|
30872
30967
|
const modal = t2 === void 0 ? true : t2;
|
|
@@ -30874,7 +30969,7 @@
|
|
|
30874
30969
|
const [displayed, setDisplayed] = React.useState(false);
|
|
30875
30970
|
let t4;
|
|
30876
30971
|
let t5;
|
|
30877
|
-
if ($[
|
|
30972
|
+
if ($[14] !== open) {
|
|
30878
30973
|
t4 = () => {
|
|
30879
30974
|
const timeout = setTimeout(() => {
|
|
30880
30975
|
setDisplayed(open);
|
|
@@ -30882,12 +30977,12 @@
|
|
|
30882
30977
|
return () => clearTimeout(timeout);
|
|
30883
30978
|
};
|
|
30884
30979
|
t5 = [open];
|
|
30885
|
-
$[
|
|
30886
|
-
$[
|
|
30887
|
-
$[
|
|
30980
|
+
$[14] = open;
|
|
30981
|
+
$[15] = t4;
|
|
30982
|
+
$[16] = t5;
|
|
30888
30983
|
} else {
|
|
30889
|
-
t4 = $[
|
|
30890
|
-
t5 = $[
|
|
30984
|
+
t4 = $[15];
|
|
30985
|
+
t5 = $[16];
|
|
30891
30986
|
}
|
|
30892
30987
|
React.useEffect(t4, t5);
|
|
30893
30988
|
let T0;
|
|
@@ -30901,7 +30996,7 @@
|
|
|
30901
30996
|
let t7;
|
|
30902
30997
|
let t8;
|
|
30903
30998
|
let t9;
|
|
30904
|
-
if ($[
|
|
30999
|
+
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) {
|
|
30905
31000
|
const transformValue = {
|
|
30906
31001
|
top: "-translate-y-full",
|
|
30907
31002
|
bottom: "translate-y-full",
|
|
@@ -30920,102 +31015,106 @@
|
|
|
30920
31015
|
t13 = onOpenChange;
|
|
30921
31016
|
T1 = DialogPrimitive__namespace.Portal;
|
|
30922
31017
|
const t142 = title ?? "Sheet";
|
|
30923
|
-
if ($[
|
|
31018
|
+
if ($[40] !== t142) {
|
|
30924
31019
|
t9 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { autoFocus: true, tabIndex: 0, children: t142 });
|
|
30925
|
-
$[
|
|
30926
|
-
$[
|
|
31020
|
+
$[40] = t142;
|
|
31021
|
+
$[41] = t9;
|
|
30927
31022
|
} else {
|
|
30928
|
-
t9 = $[
|
|
31023
|
+
t9 = $[41];
|
|
30929
31024
|
}
|
|
30930
|
-
if ($[
|
|
30931
|
-
t10 = includeBackgroundOverlay && /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.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: {
|
|
30932
|
-
pointerEvents: displayed ? "auto" : "none"
|
|
31025
|
+
if ($[42] !== displayed || $[43] !== includeBackgroundOverlay || $[44] !== open || $[45] !== overlayClassName || $[46] !== overlayStyle) {
|
|
31026
|
+
t10 = includeBackgroundOverlay && /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.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: {
|
|
31027
|
+
pointerEvents: displayed ? "auto" : "none",
|
|
31028
|
+
...overlayStyle
|
|
30933
31029
|
} });
|
|
30934
|
-
$[
|
|
30935
|
-
$[
|
|
30936
|
-
$[
|
|
30937
|
-
$[
|
|
30938
|
-
$[
|
|
31030
|
+
$[42] = displayed;
|
|
31031
|
+
$[43] = includeBackgroundOverlay;
|
|
31032
|
+
$[44] = open;
|
|
31033
|
+
$[45] = overlayClassName;
|
|
31034
|
+
$[46] = overlayStyle;
|
|
31035
|
+
$[47] = t10;
|
|
30939
31036
|
} else {
|
|
30940
|
-
t10 = $[
|
|
31037
|
+
t10 = $[47];
|
|
30941
31038
|
}
|
|
30942
31039
|
T0 = DialogPrimitive__namespace.Content;
|
|
30943
31040
|
t6 = props;
|
|
30944
31041
|
t7 = _temp;
|
|
30945
|
-
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);
|
|
30946
|
-
$[
|
|
30947
|
-
$[
|
|
30948
|
-
$[
|
|
30949
|
-
$[
|
|
30950
|
-
$[
|
|
30951
|
-
$[
|
|
30952
|
-
$[
|
|
30953
|
-
$[
|
|
30954
|
-
$[
|
|
30955
|
-
$[
|
|
30956
|
-
$[
|
|
30957
|
-
$[
|
|
30958
|
-
$[
|
|
30959
|
-
$[
|
|
30960
|
-
$[
|
|
30961
|
-
$[
|
|
30962
|
-
$[
|
|
30963
|
-
$[
|
|
30964
|
-
$[
|
|
30965
|
-
$[
|
|
30966
|
-
$[
|
|
30967
|
-
$[
|
|
30968
|
-
|
|
30969
|
-
|
|
30970
|
-
|
|
30971
|
-
|
|
30972
|
-
|
|
30973
|
-
|
|
30974
|
-
|
|
30975
|
-
|
|
30976
|
-
|
|
30977
|
-
|
|
30978
|
-
|
|
30979
|
-
|
|
31042
|
+
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);
|
|
31043
|
+
$[17] = className;
|
|
31044
|
+
$[18] = displayed;
|
|
31045
|
+
$[19] = includeBackgroundOverlay;
|
|
31046
|
+
$[20] = modal;
|
|
31047
|
+
$[21] = onOpenChange;
|
|
31048
|
+
$[22] = open;
|
|
31049
|
+
$[23] = overlayClassName;
|
|
31050
|
+
$[24] = overlayStyle;
|
|
31051
|
+
$[25] = props;
|
|
31052
|
+
$[26] = side;
|
|
31053
|
+
$[27] = title;
|
|
31054
|
+
$[28] = transparent;
|
|
31055
|
+
$[29] = T0;
|
|
31056
|
+
$[30] = T1;
|
|
31057
|
+
$[31] = T2;
|
|
31058
|
+
$[32] = t10;
|
|
31059
|
+
$[33] = t11;
|
|
31060
|
+
$[34] = t12;
|
|
31061
|
+
$[35] = t13;
|
|
31062
|
+
$[36] = t6;
|
|
31063
|
+
$[37] = t7;
|
|
31064
|
+
$[38] = t8;
|
|
31065
|
+
$[39] = t9;
|
|
31066
|
+
} else {
|
|
31067
|
+
T0 = $[29];
|
|
31068
|
+
T1 = $[30];
|
|
31069
|
+
T2 = $[31];
|
|
31070
|
+
t10 = $[32];
|
|
31071
|
+
t11 = $[33];
|
|
31072
|
+
t12 = $[34];
|
|
31073
|
+
t13 = $[35];
|
|
31074
|
+
t6 = $[36];
|
|
31075
|
+
t7 = $[37];
|
|
31076
|
+
t8 = $[38];
|
|
31077
|
+
t9 = $[39];
|
|
30980
31078
|
}
|
|
30981
31079
|
let t14;
|
|
30982
|
-
if ($[
|
|
30983
|
-
t14 = /* @__PURE__ */ jsxRuntime.jsx(T0, { ...t6, onFocusCapture: t7, className: t8, children });
|
|
30984
|
-
$[
|
|
30985
|
-
$[
|
|
30986
|
-
$[
|
|
30987
|
-
$[
|
|
30988
|
-
$[
|
|
30989
|
-
$[
|
|
30990
|
-
|
|
30991
|
-
|
|
31080
|
+
if ($[48] !== T0 || $[49] !== children || $[50] !== style || $[51] !== t6 || $[52] !== t7 || $[53] !== t8) {
|
|
31081
|
+
t14 = /* @__PURE__ */ jsxRuntime.jsx(T0, { ...t6, onFocusCapture: t7, className: t8, style, children });
|
|
31082
|
+
$[48] = T0;
|
|
31083
|
+
$[49] = children;
|
|
31084
|
+
$[50] = style;
|
|
31085
|
+
$[51] = t6;
|
|
31086
|
+
$[52] = t7;
|
|
31087
|
+
$[53] = t8;
|
|
31088
|
+
$[54] = t14;
|
|
31089
|
+
} else {
|
|
31090
|
+
t14 = $[54];
|
|
30992
31091
|
}
|
|
30993
31092
|
let t15;
|
|
30994
|
-
if ($[
|
|
31093
|
+
if ($[55] !== T1 || $[56] !== t10 || $[57] !== t14 || $[58] !== t9) {
|
|
30995
31094
|
t15 = /* @__PURE__ */ jsxRuntime.jsxs(T1, { children: [
|
|
30996
31095
|
t9,
|
|
30997
31096
|
t10,
|
|
30998
31097
|
t14
|
|
30999
31098
|
] });
|
|
31000
|
-
$[
|
|
31001
|
-
$[
|
|
31002
|
-
$[
|
|
31003
|
-
$[
|
|
31004
|
-
$[
|
|
31099
|
+
$[55] = T1;
|
|
31100
|
+
$[56] = t10;
|
|
31101
|
+
$[57] = t14;
|
|
31102
|
+
$[58] = t9;
|
|
31103
|
+
$[59] = t15;
|
|
31005
31104
|
} else {
|
|
31006
|
-
t15 = $[
|
|
31105
|
+
t15 = $[59];
|
|
31007
31106
|
}
|
|
31008
31107
|
let t16;
|
|
31009
|
-
if ($[
|
|
31108
|
+
if ($[60] !== T2 || $[61] !== t11 || $[62] !== t12 || $[63] !== t13 || $[64] !== t15) {
|
|
31010
31109
|
t16 = /* @__PURE__ */ jsxRuntime.jsx(T2, { open: t11, modal: t12, onOpenChange: t13, children: t15 });
|
|
31011
|
-
$[
|
|
31012
|
-
$[
|
|
31013
|
-
$[
|
|
31014
|
-
$[
|
|
31015
|
-
$[
|
|
31016
|
-
$[
|
|
31110
|
+
$[60] = T2;
|
|
31111
|
+
$[61] = t11;
|
|
31112
|
+
$[62] = t12;
|
|
31113
|
+
$[63] = t13;
|
|
31114
|
+
$[64] = t15;
|
|
31115
|
+
$[65] = t16;
|
|
31017
31116
|
} else {
|
|
31018
|
-
t16 = $[
|
|
31117
|
+
t16 = $[65];
|
|
31019
31118
|
}
|
|
31020
31119
|
return t16;
|
|
31021
31120
|
};
|
|
@@ -31217,9 +31316,9 @@
|
|
|
31217
31316
|
}
|
|
31218
31317
|
),
|
|
31219
31318
|
/* @__PURE__ */ jsxRuntime.jsx("textarea", { "aria-hidden": true, className: cls(props.className, props.shadowClassName), readOnly: true, ref: shadowRef, tabIndex: -1, style: {
|
|
31319
|
+
padding: 0,
|
|
31220
31320
|
...styles$1.shadow,
|
|
31221
|
-
...style
|
|
31222
|
-
padding: 0
|
|
31321
|
+
...style
|
|
31223
31322
|
} })
|
|
31224
31323
|
] });
|
|
31225
31324
|
});
|
|
@@ -31242,14 +31341,15 @@
|
|
|
31242
31341
|
ref.current = value;
|
|
31243
31342
|
}
|
|
31244
31343
|
}
|
|
31245
|
-
|
|
31344
|
+
const TextField = React.forwardRef(({
|
|
31246
31345
|
value,
|
|
31247
31346
|
onChange,
|
|
31248
31347
|
label,
|
|
31249
31348
|
type = "text",
|
|
31250
31349
|
multiline = false,
|
|
31251
31350
|
invisible,
|
|
31252
|
-
|
|
31351
|
+
maxRows,
|
|
31352
|
+
minRows,
|
|
31253
31353
|
disabled,
|
|
31254
31354
|
error,
|
|
31255
31355
|
endAdornment,
|
|
@@ -31262,7 +31362,7 @@
|
|
|
31262
31362
|
inputStyle,
|
|
31263
31363
|
inputRef: inputRefProp,
|
|
31264
31364
|
...inputProps
|
|
31265
|
-
}) {
|
|
31365
|
+
}, ref) => {
|
|
31266
31366
|
const inputRef = inputRefProp ?? React.useRef(null);
|
|
31267
31367
|
const [focused, setFocused] = React.useState(document.activeElement === inputRef.current);
|
|
31268
31368
|
const hasValue = value !== void 0 && value !== null && value !== "";
|
|
@@ -31272,29 +31372,33 @@
|
|
|
31272
31372
|
if (event.target instanceof HTMLElement) event.target.blur();
|
|
31273
31373
|
};
|
|
31274
31374
|
const element = "current" in inputRef ? inputRef.current : inputRef;
|
|
31275
|
-
element
|
|
31375
|
+
element?.addEventListener("wheel", handleWheel);
|
|
31276
31376
|
return () => {
|
|
31277
|
-
element
|
|
31377
|
+
element?.removeEventListener("wheel", handleWheel);
|
|
31278
31378
|
};
|
|
31279
31379
|
}, [inputRef, type]);
|
|
31280
|
-
const
|
|
31281
|
-
|
|
31282
|
-
|
|
31283
|
-
|
|
31284
|
-
|
|
31285
|
-
|
|
31286
|
-
|
|
31287
|
-
"min-h-[
|
|
31380
|
+
const input = multiline ? /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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, {
|
|
31381
|
+
"min-h-[28px]": size === "smallest",
|
|
31382
|
+
"min-h-[32px]": size === "small",
|
|
31383
|
+
"min-h-[42px]": size === "medium",
|
|
31384
|
+
"min-h-[64px]": size === "large"
|
|
31385
|
+
}, 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 });
|
|
31386
|
+
return /* @__PURE__ */ jsxRuntime.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" : "", {
|
|
31387
|
+
"min-h-[28px]": size === "smallest",
|
|
31388
|
+
"min-h-[32px]": size === "small",
|
|
31389
|
+
"min-h-[42px]": size === "medium",
|
|
31390
|
+
"min-h-[64px]": size === "large"
|
|
31288
31391
|
}, className), style, children: [
|
|
31289
31392
|
label && /* @__PURE__ */ jsxRuntime.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 }),
|
|
31290
31393
|
input,
|
|
31291
31394
|
endAdornment && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("flex flex-row justify-center items-center absolute h-full right-0 top-0", {
|
|
31292
31395
|
"mr-4": size === "large",
|
|
31293
31396
|
"mr-3": size === "medium",
|
|
31294
|
-
"mr-2": size === "small"
|
|
31397
|
+
"mr-2": size === "small" || size === "smallest"
|
|
31295
31398
|
}), children: endAdornment })
|
|
31296
31399
|
] });
|
|
31297
|
-
}
|
|
31400
|
+
});
|
|
31401
|
+
TextField.displayName = "TextField";
|
|
31298
31402
|
const Tooltip = (t0) => {
|
|
31299
31403
|
const $ = reactCompilerRuntime.c(28);
|
|
31300
31404
|
const {
|
|
@@ -31474,7 +31578,7 @@
|
|
|
31474
31578
|
} = t0;
|
|
31475
31579
|
let t1;
|
|
31476
31580
|
if ($[0] !== innerClassName) {
|
|
31477
|
-
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);
|
|
31581
|
+
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);
|
|
31478
31582
|
$[0] = innerClassName;
|
|
31479
31583
|
$[1] = t1;
|
|
31480
31584
|
} else {
|
|
@@ -31522,7 +31626,7 @@
|
|
|
31522
31626
|
}
|
|
31523
31627
|
let t2;
|
|
31524
31628
|
if ($[3] !== innerClassName) {
|
|
31525
|
-
t2 = cls("uppercase inline-block p-2 px-4
|
|
31629
|
+
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);
|
|
31526
31630
|
$[3] = innerClassName;
|
|
31527
31631
|
$[4] = t2;
|
|
31528
31632
|
} else {
|