@firecms/ui 3.0.0-beta.12 → 3.0.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -452,11 +452,12 @@ const useAutoComplete = ({
452
452
  };
453
453
  };
454
454
  function Autocomplete(t0) {
455
- const $ = c(13);
455
+ const $ = c(14);
456
456
  const {
457
457
  children,
458
458
  open,
459
- setOpen
459
+ setOpen,
460
+ className
460
461
  } = t0;
461
462
  const autocompleteRef = React__default.useRef(null);
462
463
  let t1;
@@ -479,50 +480,61 @@ function Autocomplete(t0) {
479
480
  }
480
481
  const t4 = open ? paperMixin : "";
481
482
  let t5;
482
- if ($[4] !== t4) {
483
- t5 = cls(t4, "bg-surface-50 dark:bg-surface-900 py-2");
484
- $[4] = t4;
485
- $[5] = t5;
483
+ if ($[4] !== className || $[5] !== t4) {
484
+ t5 = cls(t4, "bg-surface-50 dark:bg-surface-900", className);
485
+ $[4] = className;
486
+ $[5] = t4;
487
+ $[6] = t5;
486
488
  } else {
487
- t5 = $[5];
489
+ t5 = $[6];
488
490
  }
489
491
  let t6;
490
- if ($[6] !== children || $[7] !== t5) {
492
+ if ($[7] !== children || $[8] !== t5) {
491
493
  t6 = /* @__PURE__ */ jsx("div", { ref: autocompleteRef, className: t5, children });
492
- $[6] = children;
493
- $[7] = t5;
494
- $[8] = t6;
494
+ $[7] = children;
495
+ $[8] = t5;
496
+ $[9] = t6;
495
497
  } else {
496
- t6 = $[8];
498
+ t6 = $[9];
497
499
  }
498
500
  let t7;
499
- if ($[9] !== open || $[10] !== t3 || $[11] !== t6) {
500
- t7 = /* @__PURE__ */ jsx(Collapse, { in: open, duration: 50, className: t3, children: t6 });
501
- $[9] = open;
502
- $[10] = t3;
503
- $[11] = t6;
504
- $[12] = t7;
501
+ if ($[10] !== open || $[11] !== t3 || $[12] !== t6) {
502
+ t7 = /* @__PURE__ */ jsx(Collapse, { in: open, duration: 30, className: t3, children: t6 });
503
+ $[10] = open;
504
+ $[11] = t3;
505
+ $[12] = t6;
506
+ $[13] = t7;
505
507
  } else {
506
- t7 = $[12];
508
+ t7 = $[13];
507
509
  }
508
510
  return t7;
509
511
  }
510
512
  function AutocompleteItem(t0) {
511
- const $ = c(3);
513
+ const $ = c(6);
512
514
  const {
513
515
  children,
514
- onClick
516
+ onClick,
517
+ className
515
518
  } = t0;
516
519
  let t1;
517
- if ($[0] !== children || $[1] !== onClick) {
518
- t1 = /* @__PURE__ */ jsx("div", { className: "flex w-full items-center pr-6 pl-14 h-[48px] cursor-pointer hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800", onClick, children });
519
- $[0] = children;
520
- $[1] = onClick;
521
- $[2] = t1;
520
+ if ($[0] !== className) {
521
+ t1 = cls("flex w-full items-center h-[48px] cursor-pointer hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800", className);
522
+ $[0] = className;
523
+ $[1] = t1;
522
524
  } else {
523
- t1 = $[2];
525
+ t1 = $[1];
524
526
  }
525
- return t1;
527
+ let t2;
528
+ if ($[2] !== children || $[3] !== onClick || $[4] !== t1) {
529
+ t2 = /* @__PURE__ */ jsx("div", { className: t1, onClick, children });
530
+ $[2] = children;
531
+ $[3] = onClick;
532
+ $[4] = t1;
533
+ $[5] = t2;
534
+ } else {
535
+ t2 = $[5];
536
+ }
537
+ return t2;
526
538
  }
527
539
  const getSizeClasses = (size) => {
528
540
  switch (size) {
@@ -738,13 +750,13 @@ const BooleanSwitch = React__default.forwardRef(function BooleanSwitch2({
738
750
  const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
739
751
  value,
740
752
  position = "end",
753
+ size = "medium",
741
754
  invisible,
742
755
  onValueChange,
743
756
  error,
744
757
  label,
745
758
  autoFocus,
746
759
  disabled,
747
- size,
748
760
  className,
749
761
  fullWidth = true,
750
762
  inputClassName,
@@ -758,7 +770,12 @@ const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
758
770
  React__default.useEffect(() => {
759
771
  }, []);
760
772
  const focus = document.activeElement === refInput?.current || document.activeElement === ref?.current;
761
- return /* @__PURE__ */ jsxs("div", { ref, onFocus, onBlur, tabIndex: -1, className: cls(!invisible && fieldBackgroundMixin, !invisible && (disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin), disabled ? "cursor-default" : "cursor-pointer", "rounded-md max-w-full justify-between box-border relative inline-flex items-center", !invisible && focus && !disabled ? focusedClasses : "", error ? "text-red-500 dark:text-red-600" : focus && !disabled ? "text-primary" : !disabled ? "text-text-primary dark:text-text-primary-dark" : "text-text-secondary dark:text-text-secondary-dark", size === "small" ? "min-h-[40px]" : size === "medium" ? "min-h-[48px]" : "min-h-[64px]", 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) => {
773
+ return /* @__PURE__ */ jsxs("div", { ref, onFocus, onBlur, tabIndex: -1, className: cls(!invisible && fieldBackgroundMixin, !invisible && (disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin), disabled ? "cursor-default" : "cursor-pointer", "rounded-md max-w-full justify-between box-border relative inline-flex items-center", !invisible && focus && !disabled ? focusedClasses : "", error ? "text-red-500 dark:text-red-600" : focus && !disabled ? "text-primary" : !disabled ? "text-text-primary dark:text-text-primary-dark" : "text-text-secondary dark:text-text-secondary-dark", {
774
+ "min-h-[28px]": size === "smallest",
775
+ "min-h-[32px]": size === "small",
776
+ "min-h-[42px]": size === "medium",
777
+ "min-h-[64px]": size === "large"
778
+ }, 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) => {
762
779
  if (props.allowIndeterminate) {
763
780
  if (value === null || value === void 0) onValueChange?.(true);
764
781
  else if (value) onValueChange?.(false);
@@ -830,20 +847,20 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
830
847
  const t9 = variant === "filled" && color === "secondary" && !disabled;
831
848
  const t10 = variant === "filled" && color === "error" && !disabled;
832
849
  const t11 = variant === "filled" && color === "text" && !disabled;
833
- const t12 = variant === "text" && color === "primary" && !disabled;
834
- const t13 = variant === "text" && color === "secondary" && !disabled;
835
- const t14 = variant === "text" && color === "error" && !disabled;
836
- const t15 = variant === "text" && color === "text" && !disabled;
837
- const t16 = variant === "outlined" && color === "primary" && !disabled;
838
- const t17 = variant === "outlined" && color === "secondary" && !disabled;
839
- const t18 = variant === "outlined" && color === "error" && !disabled;
840
- const t19 = variant === "outlined" && color === "text" && !disabled;
841
- const t20 = variant === "neutral" && (color === "primary" || color === "text") && !disabled;
842
- const t21 = variant === "neutral" && color === "secondary" && !disabled;
843
- const t22 = variant === "neutral" && color === "error" && !disabled;
850
+ const t12 = variant === "filled" && color === "neutral" && !disabled;
851
+ const t13 = variant === "text" && color === "primary" && !disabled;
852
+ const t14 = variant === "text" && color === "secondary" && !disabled;
853
+ const t15 = variant === "text" && color === "error" && !disabled;
854
+ const t16 = variant === "text" && color === "text" && !disabled;
855
+ const t17 = variant === "text" && color === "neutral" && !disabled;
856
+ const t18 = variant === "outlined" && color === "primary" && !disabled;
857
+ const t19 = variant === "outlined" && color === "secondary" && !disabled;
858
+ const t20 = variant === "outlined" && color === "error" && !disabled;
859
+ const t21 = variant === "outlined" && color === "text" && !disabled;
860
+ const t22 = variant === "outlined" && color === "neutral" && !disabled;
844
861
  const t23 = variant === "text" && disabled;
845
862
  const t24 = variant === "outlined" && disabled;
846
- const t25 = (variant === "filled" || variant === "neutral") && disabled;
863
+ const t25 = variant === "filled" && disabled;
847
864
  let t26;
848
865
  let t27;
849
866
  let t28;
@@ -859,17 +876,17 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
859
876
  "border border-secondary bg-secondary focus:ring-secondary shadow hover:ring-1 hover:ring-secondary text-white hover:text-white": t9,
860
877
  "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,
861
878
  "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,
862
- "border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 dark:hover:bg-surface-900": t12,
863
- "border border-transparent text-secondary hover:text-secondary hover:bg-secondary-bg": t13,
864
- "border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": t14,
865
- "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": t15,
866
- "border border-primary text-primary hover:text-primary hover:bg-primary-bg": t16,
867
- "border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t17,
868
- "border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t18,
869
- "border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:bg-surface-accent-200": t19,
870
- "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-white": t20,
871
- "border border-transparent bg-surface-100 hover:bg-surface-accent-200 text-text-secondary dark:bg-surface-800 dark:hover:bg-surface-accent-700 dark:text-white": t21,
872
- "border border-transparent bg-surface-100 hover:bg-surface-accent-200 text-error dark:bg-surface-800 dark:hover:bg-surface-accent-700 dark:text-error": t22,
879
+ "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,
880
+ "border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t13,
881
+ "border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t14,
882
+ "border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": t15,
883
+ "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,
884
+ "border border-transparent text-text-primary hover:text-text-primary hover:bg-surface-accent-200 dark:text-text-primary-dark dark:hover:text-text-primary-dark dark:hover:bg-surface-accent-700": t17,
885
+ "border border-primary text-primary hover:text-primary hover:bg-primary-bg": t18,
886
+ "border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t19,
887
+ "border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t20,
888
+ "border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:bg-surface-accent-200": t21,
889
+ "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,
873
890
  "text-text-disabled dark:text-text-disabled-dark": disabled,
874
891
  "border border-transparent opacity-50": t23,
875
892
  "border border-surface-500 opacity-50": t24,
@@ -1262,6 +1279,7 @@ const Icon = React.forwardRef((t0, ref) => {
1262
1279
  if ($[0] !== style || $[1] !== t2) {
1263
1280
  t3 = {
1264
1281
  fontSize: t2,
1282
+ verticalAlign: "middle",
1265
1283
  ...style
1266
1284
  };
1267
1285
  $[0] = style;
@@ -1273,7 +1291,7 @@ const Icon = React.forwardRef((t0, ref) => {
1273
1291
  const t4 = color ? colorClassesMapping[color] : "";
1274
1292
  let t5;
1275
1293
  if ($[3] !== className || $[4] !== t4) {
1276
- t5 = cls("material-icons", "block", t4, "select-none", className);
1294
+ t5 = cls("material-icons", t4, "select-none", className);
1277
1295
  $[3] = className;
1278
1296
  $[4] = t4;
1279
1297
  $[5] = t5;
@@ -27685,7 +27703,7 @@ function Typography(t0) {
27685
27703
  return t15;
27686
27704
  }
27687
27705
  const DateTimeField = (t0) => {
27688
- const $ = c(52);
27706
+ const $ = c(57);
27689
27707
  const {
27690
27708
  value,
27691
27709
  label,
@@ -27759,161 +27777,176 @@ const DateTimeField = (t0) => {
27759
27777
  }
27760
27778
  const t6 = !invisible && fieldBackgroundMixin;
27761
27779
  const t7 = disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin;
27762
- const t8 = size === "medium";
27763
- const t9 = size === "large";
27764
- let t10;
27765
- if ($[6] !== className || $[7] !== t6 || $[8] !== t7 || $[9] !== t8 || $[10] !== t9) {
27766
- t10 = cls("rounded-md relative max-w-full", t6, t7, {
27767
- "min-h-[48px]": t8,
27768
- "min-h-[64px]": t9
27780
+ const t8 = size === "smallest";
27781
+ const t9 = size === "small";
27782
+ const t10 = size === "medium";
27783
+ const t11 = size === "large";
27784
+ let t12;
27785
+ if ($[6] !== className || $[7] !== t10 || $[8] !== t11 || $[9] !== t6 || $[10] !== t7 || $[11] !== t8 || $[12] !== t9) {
27786
+ t12 = cls("rounded-md relative max-w-full", t6, t7, {
27787
+ "min-h-[28px]": t8,
27788
+ "min-h-[32px]": t9,
27789
+ "min-h-[42px]": t10,
27790
+ "min-h-[64px]": t11
27769
27791
  }, className);
27770
27792
  $[6] = className;
27771
- $[7] = t6;
27772
- $[8] = t7;
27773
- $[9] = t8;
27774
- $[10] = t9;
27775
- $[11] = t10;
27793
+ $[7] = t10;
27794
+ $[8] = t11;
27795
+ $[9] = t6;
27796
+ $[10] = t7;
27797
+ $[11] = t8;
27798
+ $[12] = t9;
27799
+ $[13] = t12;
27776
27800
  } else {
27777
- t10 = $[11];
27801
+ t12 = $[13];
27778
27802
  }
27779
- let t11;
27780
- if ($[12] !== disabled) {
27781
- t11 = () => {
27803
+ let t13;
27804
+ if ($[14] !== disabled) {
27805
+ t13 = () => {
27782
27806
  if (!disabled) {
27783
27807
  inputRef.current?.focus();
27784
27808
  }
27785
27809
  };
27786
- $[12] = disabled;
27787
- $[13] = t11;
27788
- } else {
27789
- t11 = $[13];
27790
- }
27791
- let t12;
27792
- if ($[14] !== disabled || $[15] !== error || $[16] !== focused || $[17] !== label) {
27793
- t12 = label && /* @__PURE__ */ jsx(InputLabel, { className: cls("absolute top-1 pointer-events-none", !error ? focused ? "text-primary" : "text-text-secondary dark:text-text-secondary-dark" : "text-red-500 dark:text-red-500", disabled ? "opacity-50" : ""), shrink: true, children: label });
27794
27810
  $[14] = disabled;
27795
- $[15] = error;
27796
- $[16] = focused;
27797
- $[17] = label;
27798
- $[18] = t12;
27811
+ $[15] = t13;
27799
27812
  } else {
27800
- t12 = $[18];
27813
+ t13 = $[15];
27801
27814
  }
27802
- const t13 = mode === "date_time" ? "datetime-local" : "date";
27803
- const t14 = valueAsInputValue(value ?? null, mode);
27804
- let t15;
27805
- let t16;
27806
- if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
27807
- t15 = () => setFocused(true);
27808
- t16 = () => setFocused(false);
27809
- $[19] = t15;
27810
- $[20] = t16;
27811
- } else {
27812
- t15 = $[19];
27813
- t16 = $[20];
27814
- }
27815
- const t17 = clearable ? "pr-14" : "pr-12";
27816
- const t18 = size === "medium" ? "min-h-[48px]" : "min-h-[64px]";
27817
- const t19 = label ? "pt-8 pb-2" : "py-2";
27818
- const t20 = disabled && "border border-transparent outline-none opacity-50 dark:opacity-50 text-surface-accent-600 dark:text-surface-accent-500";
27819
- let t21;
27820
- if ($[21] !== inputClassName || $[22] !== t17 || $[23] !== t18 || $[24] !== t19 || $[25] !== t20) {
27821
- t21 = cls("w-full outline-none bg-transparent leading-normal text-base px-3", t17, "rounded-md", t18, t19, inputClassName, t20);
27822
- $[21] = inputClassName;
27823
- $[22] = t17;
27824
- $[23] = t18;
27825
- $[24] = t19;
27826
- $[25] = t20;
27827
- $[26] = t21;
27815
+ let t14;
27816
+ if ($[16] !== disabled || $[17] !== error || $[18] !== focused || $[19] !== label) {
27817
+ t14 = label && /* @__PURE__ */ jsx(InputLabel, { className: cls("absolute top-1 pointer-events-none", !error ? focused ? "text-primary" : "text-text-secondary dark:text-text-secondary-dark" : "text-red-500 dark:text-red-500", disabled ? "opacity-50" : ""), shrink: true, children: label });
27818
+ $[16] = disabled;
27819
+ $[17] = error;
27820
+ $[18] = focused;
27821
+ $[19] = label;
27822
+ $[20] = t14;
27823
+ } else {
27824
+ t14 = $[20];
27825
+ }
27826
+ const t15 = mode === "date_time" ? "datetime-local" : "date";
27827
+ const t16 = valueAsInputValue(value ?? null, mode);
27828
+ let t17;
27829
+ let t18;
27830
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
27831
+ t17 = () => setFocused(true);
27832
+ t18 = () => setFocused(false);
27833
+ $[21] = t17;
27834
+ $[22] = t18;
27835
+ } else {
27836
+ t17 = $[21];
27837
+ t18 = $[22];
27838
+ }
27839
+ const t19 = clearable ? "pr-14" : "pr-12";
27840
+ const t20 = size === "smallest";
27841
+ const t21 = size === "small";
27842
+ const t22 = size === "medium";
27843
+ const t23 = size === "large";
27844
+ let t24;
27845
+ if ($[23] !== disabled || $[24] !== inputClassName || $[25] !== label || $[26] !== t19 || $[27] !== t20 || $[28] !== t21 || $[29] !== t22 || $[30] !== t23) {
27846
+ t24 = cls("w-full outline-none bg-transparent leading-normal text-base px-3", t19, "rounded-md", {
27847
+ "min-h-[28px]": t20,
27848
+ "min-h-[32px]": t21,
27849
+ "min-h-[42px]": t22,
27850
+ "min-h-[64px]": t23
27851
+ }, 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");
27852
+ $[23] = disabled;
27853
+ $[24] = inputClassName;
27854
+ $[25] = label;
27855
+ $[26] = t19;
27856
+ $[27] = t20;
27857
+ $[28] = t21;
27858
+ $[29] = t22;
27859
+ $[30] = t23;
27860
+ $[31] = t24;
27828
27861
  } else {
27829
- t21 = $[26];
27862
+ t24 = $[31];
27830
27863
  }
27831
- let t22;
27832
- if ($[27] !== disabled || $[28] !== handleInputChange || $[29] !== t13 || $[30] !== t14 || $[31] !== t21) {
27833
- t22 = /* @__PURE__ */ jsx("input", { ref: inputRef, type: t13, value: t14, onChange: handleInputChange, onFocus: t15, onBlur: t16, disabled, className: t21 });
27834
- $[27] = disabled;
27835
- $[28] = handleInputChange;
27836
- $[29] = t13;
27837
- $[30] = t14;
27838
- $[31] = t21;
27839
- $[32] = t22;
27864
+ let t25;
27865
+ if ($[32] !== disabled || $[33] !== handleInputChange || $[34] !== t15 || $[35] !== t16 || $[36] !== t24) {
27866
+ t25 = /* @__PURE__ */ jsx("input", { ref: inputRef, type: t15, value: t16, onChange: handleInputChange, onFocus: t17, onBlur: t18, disabled, className: t24 });
27867
+ $[32] = disabled;
27868
+ $[33] = handleInputChange;
27869
+ $[34] = t15;
27870
+ $[35] = t16;
27871
+ $[36] = t24;
27872
+ $[37] = t25;
27840
27873
  } else {
27841
- t22 = $[32];
27874
+ t25 = $[37];
27842
27875
  }
27843
- let t23;
27844
- if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
27845
- t23 = (e_2) => {
27876
+ let t26;
27877
+ if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
27878
+ t26 = (e_2) => {
27846
27879
  e_2.stopPropagation();
27847
27880
  inputRef.current?.showPicker();
27848
27881
  };
27849
- $[33] = t23;
27882
+ $[38] = t26;
27850
27883
  } else {
27851
- t23 = $[33];
27884
+ t26 = $[38];
27852
27885
  }
27853
- let t24;
27854
- if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
27855
- t24 = /* @__PURE__ */ jsx(IconButton, { onClick: t23, className: "absolute right-3 top-1/2 transform -translate-y-1/2 !text-surface-accent-500", children: /* @__PURE__ */ jsx(CalendarMonthIcon, { color: "disabled" }) });
27856
- $[34] = t24;
27886
+ let t27;
27887
+ if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
27888
+ t27 = /* @__PURE__ */ jsx(IconButton, { onClick: t26, className: "absolute right-3 top-1/2 transform -translate-y-1/2 !text-surface-accent-500", children: /* @__PURE__ */ jsx(CalendarMonthIcon, { color: "disabled" }) });
27889
+ $[39] = t27;
27857
27890
  } else {
27858
- t24 = $[34];
27891
+ t27 = $[39];
27859
27892
  }
27860
- let t25;
27861
- if ($[35] !== clearable || $[36] !== handleClear || $[37] !== value) {
27862
- t25 = clearable && value && /* @__PURE__ */ jsx(IconButton, { onClick: handleClear, className: "absolute right-14 top-1/2 transform -translate-y-1/2 text-surface-accent-400 ", children: /* @__PURE__ */ jsx(CloseIcon, {}) });
27863
- $[35] = clearable;
27864
- $[36] = handleClear;
27865
- $[37] = value;
27866
- $[38] = t25;
27893
+ let t28;
27894
+ if ($[40] !== clearable || $[41] !== handleClear || $[42] !== value) {
27895
+ t28 = clearable && value && /* @__PURE__ */ jsx(IconButton, { onClick: handleClear, className: "absolute right-14 top-1/2 transform -translate-y-1/2 text-surface-accent-400 ", children: /* @__PURE__ */ jsx(CloseIcon, {}) });
27896
+ $[40] = clearable;
27897
+ $[41] = handleClear;
27898
+ $[42] = value;
27899
+ $[43] = t28;
27867
27900
  } else {
27868
- t25 = $[38];
27901
+ t28 = $[43];
27869
27902
  }
27870
- let t26;
27871
- if ($[39] !== style || $[40] !== t10 || $[41] !== t11 || $[42] !== t12 || $[43] !== t22 || $[44] !== t25) {
27872
- t26 = /* @__PURE__ */ jsxs("div", { className: t10, style, onClick: t11, children: [
27873
- t12,
27874
- t22,
27875
- t24,
27876
- t25
27903
+ let t29;
27904
+ if ($[44] !== style || $[45] !== t12 || $[46] !== t13 || $[47] !== t14 || $[48] !== t25 || $[49] !== t28) {
27905
+ t29 = /* @__PURE__ */ jsxs("div", { className: t12, style, onClick: t13, children: [
27906
+ t14,
27907
+ t25,
27908
+ t27,
27909
+ t28
27877
27910
  ] });
27878
- $[39] = style;
27879
- $[40] = t10;
27880
- $[41] = t11;
27881
- $[42] = t12;
27882
- $[43] = t22;
27883
- $[44] = t25;
27884
- $[45] = t26;
27911
+ $[44] = style;
27912
+ $[45] = t12;
27913
+ $[46] = t13;
27914
+ $[47] = t14;
27915
+ $[48] = t25;
27916
+ $[49] = t28;
27917
+ $[50] = t29;
27885
27918
  } else {
27886
- t26 = $[45];
27919
+ t29 = $[50];
27887
27920
  }
27888
- let t27;
27889
- if ($[46] !== invalidValue || $[47] !== value) {
27890
- t27 = invalidValue && /* @__PURE__ */ jsxs("div", { className: "flex items-center m-2", children: [
27891
- /* @__PURE__ */ jsx(ErrorIcon, { size: "medium", color: "error" }),
27921
+ let t30;
27922
+ if ($[51] !== invalidValue || $[52] !== value) {
27923
+ t30 = invalidValue && /* @__PURE__ */ jsxs("div", { className: "flex items-center m-2", children: [
27924
+ /* @__PURE__ */ jsx(ErrorIcon, { size: "small", color: "error" }),
27892
27925
  /* @__PURE__ */ jsxs("div", { className: "pl-2", children: [
27893
27926
  /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "Invalid date value for this field" }),
27894
27927
  /* @__PURE__ */ jsx(Typography, { variant: "body2", children: `The provided value is: ${JSON.stringify(value)}` })
27895
27928
  ] })
27896
27929
  ] });
27897
- $[46] = invalidValue;
27898
- $[47] = value;
27899
- $[48] = t27;
27930
+ $[51] = invalidValue;
27931
+ $[52] = value;
27932
+ $[53] = t30;
27900
27933
  } else {
27901
- t27 = $[48];
27934
+ t30 = $[53];
27902
27935
  }
27903
- let t28;
27904
- if ($[49] !== t26 || $[50] !== t27) {
27905
- t28 = /* @__PURE__ */ jsxs(Fragment, { children: [
27936
+ let t31;
27937
+ if ($[54] !== t29 || $[55] !== t30) {
27938
+ t31 = /* @__PURE__ */ jsxs(Fragment, { children: [
27906
27939
  t5,
27907
- t26,
27908
- t27
27940
+ t29,
27941
+ t30
27909
27942
  ] });
27910
- $[49] = t26;
27911
- $[50] = t27;
27912
- $[51] = t28;
27943
+ $[54] = t29;
27944
+ $[55] = t30;
27945
+ $[56] = t31;
27913
27946
  } else {
27914
- t28 = $[51];
27947
+ t31 = $[56];
27915
27948
  }
27916
- return t28;
27949
+ return t31;
27917
27950
  };
27918
27951
  const inputStyles = `
27919
27952
  /* Hide the default calendar icon in Chrome, Safari, Edge, Opera */
@@ -27962,12 +27995,13 @@ const widthClasses = {
27962
27995
  full: "max-w-full min-w-full w-full"
27963
27996
  };
27964
27997
  const Dialog = (t0) => {
27965
- const $ = c(36);
27998
+ const $ = c(39);
27966
27999
  const {
27967
28000
  open,
27968
28001
  onOpenChange,
27969
28002
  children,
27970
28003
  className,
28004
+ containerClassName,
27971
28005
  fullWidth: t1,
27972
28006
  fullHeight,
27973
28007
  fullScreen,
@@ -28008,107 +28042,116 @@ const Dialog = (t0) => {
28008
28042
  }
28009
28043
  useEffect(t5, t6);
28010
28044
  const t7 = displayed || open;
28011
- const t8 = displayed && open ? "opacity-100" : "opacity-0";
28012
- let t9;
28013
- if ($[3] !== t8) {
28014
- t9 = 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 ", t8, "z-20 fixed top-0 left-0 w-full h-full flex justify-center items-center");
28015
- $[3] = t8;
28016
- $[4] = t9;
28045
+ let t8;
28046
+ if ($[3] !== containerClassName) {
28047
+ t8 = cls("fixed inset-0 z-30", containerClassName);
28048
+ $[3] = containerClassName;
28049
+ $[4] = t8;
28017
28050
  } else {
28018
- t9 = $[4];
28051
+ t8 = $[4];
28019
28052
  }
28020
- const t10 = displayed ? "auto" : "none";
28021
- let t11;
28022
- if ($[5] !== t10) {
28023
- t11 = {
28024
- pointerEvents: t10
28025
- };
28026
- $[5] = t10;
28027
- $[6] = t11;
28053
+ const t9 = displayed && open ? "opacity-100" : "opacity-0";
28054
+ let t10;
28055
+ if ($[5] !== t9) {
28056
+ 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");
28057
+ $[5] = t9;
28058
+ $[6] = t10;
28028
28059
  } else {
28029
- t11 = $[6];
28060
+ t10 = $[6];
28030
28061
  }
28062
+ const t11 = displayed ? "auto" : "none";
28031
28063
  let t12;
28032
- if ($[7] !== t11 || $[8] !== t9) {
28033
- t12 = /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: t9, style: t11 });
28064
+ if ($[7] !== t11) {
28065
+ t12 = {
28066
+ pointerEvents: t11
28067
+ };
28034
28068
  $[7] = t11;
28035
- $[8] = t9;
28036
- $[9] = t12;
28069
+ $[8] = t12;
28037
28070
  } else {
28038
- t12 = $[9];
28071
+ t12 = $[8];
28039
28072
  }
28040
28073
  let t13;
28041
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
28042
- t13 = cls("h-full outline-none flex justify-center items-center z-40 opacity-100 transition-all duration-200 ease-in-out");
28043
- $[10] = t13;
28044
- } else {
28045
- t13 = $[10];
28046
- }
28047
- const t14 = fullWidth && !fullScreen ? "w-11/12" : void 0;
28048
- const t15 = fullHeight && !fullScreen ? "h-full" : void 0;
28049
- const t16 = fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-xl";
28050
- const t17 = scrollable && "overflow-y-auto";
28051
- const t18 = displayed && open ? "opacity-100" : "opacity-0";
28052
- const t19 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
28053
- let t20;
28054
- if ($[11] !== className || $[12] !== t14 || $[13] !== t15 || $[14] !== t16 || $[15] !== t17 || $[16] !== t18 || $[17] !== t19) {
28055
- 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);
28056
- $[11] = className;
28074
+ if ($[9] !== t10 || $[10] !== t12) {
28075
+ t13 = /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: t10, style: t12 });
28076
+ $[9] = t10;
28077
+ $[10] = t12;
28078
+ $[11] = t13;
28079
+ } else {
28080
+ t13 = $[11];
28081
+ }
28082
+ let t14;
28083
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
28084
+ t14 = cls("h-full outline-none flex justify-center items-center z-40 opacity-100 transition-all duration-200 ease-in-out");
28057
28085
  $[12] = t14;
28058
- $[13] = t15;
28059
- $[14] = t16;
28060
- $[15] = t17;
28061
- $[16] = t18;
28062
- $[17] = t19;
28063
- $[18] = t20;
28064
28086
  } else {
28065
- t20 = $[18];
28087
+ t14 = $[12];
28066
28088
  }
28089
+ const t15 = fullWidth && !fullScreen ? "w-11/12" : void 0;
28090
+ const t16 = fullHeight && !fullScreen ? "h-full" : void 0;
28091
+ const t17 = fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-xl";
28092
+ const t18 = scrollable && "overflow-y-auto";
28093
+ const t19 = displayed && open ? "opacity-100" : "opacity-0";
28094
+ const t20 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
28067
28095
  let t21;
28068
- if ($[19] !== children || $[20] !== t20) {
28069
- t21 = /* @__PURE__ */ jsx("div", { className: t20, children });
28070
- $[19] = children;
28071
- $[20] = t20;
28072
- $[21] = t21;
28096
+ if ($[13] !== className || $[14] !== t15 || $[15] !== t16 || $[16] !== t17 || $[17] !== t18 || $[18] !== t19 || $[19] !== t20) {
28097
+ 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);
28098
+ $[13] = className;
28099
+ $[14] = t15;
28100
+ $[15] = t16;
28101
+ $[16] = t17;
28102
+ $[17] = t18;
28103
+ $[18] = t19;
28104
+ $[19] = t20;
28105
+ $[20] = t21;
28073
28106
  } else {
28074
- t21 = $[21];
28107
+ t21 = $[20];
28075
28108
  }
28076
28109
  let t22;
28077
- if ($[22] !== onEscapeKeyDown || $[23] !== onInteractOutside || $[24] !== onOpenAutoFocus || $[25] !== onPointerDownOutside || $[26] !== t21) {
28078
- t22 = /* @__PURE__ */ jsx(DialogPrimitive.Content, { onEscapeKeyDown, onOpenAutoFocus, onPointerDownOutside, onInteractOutside, className: t13, children: t21 });
28079
- $[22] = onEscapeKeyDown;
28080
- $[23] = onInteractOutside;
28081
- $[24] = onOpenAutoFocus;
28082
- $[25] = onPointerDownOutside;
28083
- $[26] = t21;
28084
- $[27] = t22;
28110
+ if ($[21] !== children || $[22] !== t21) {
28111
+ t22 = /* @__PURE__ */ jsx("div", { className: t21, children });
28112
+ $[21] = children;
28113
+ $[22] = t21;
28114
+ $[23] = t22;
28085
28115
  } else {
28086
- t22 = $[27];
28116
+ t22 = $[23];
28087
28117
  }
28088
28118
  let t23;
28089
- if ($[28] !== t12 || $[29] !== t22) {
28090
- t23 = /* @__PURE__ */ jsx(DialogPrimitive.Portal, { children: /* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-30", children: [
28091
- t12,
28092
- t22
28093
- ] }) });
28094
- $[28] = t12;
28095
- $[29] = t22;
28096
- $[30] = t23;
28119
+ if ($[24] !== onEscapeKeyDown || $[25] !== onInteractOutside || $[26] !== onOpenAutoFocus || $[27] !== onPointerDownOutside || $[28] !== t22) {
28120
+ t23 = /* @__PURE__ */ jsx(DialogPrimitive.Content, { onEscapeKeyDown, onOpenAutoFocus, onPointerDownOutside, onInteractOutside, className: t14, children: t22 });
28121
+ $[24] = onEscapeKeyDown;
28122
+ $[25] = onInteractOutside;
28123
+ $[26] = onOpenAutoFocus;
28124
+ $[27] = onPointerDownOutside;
28125
+ $[28] = t22;
28126
+ $[29] = t23;
28097
28127
  } else {
28098
- t23 = $[30];
28128
+ t23 = $[29];
28099
28129
  }
28100
28130
  let t24;
28101
- if ($[31] !== modal || $[32] !== onOpenChange || $[33] !== t23 || $[34] !== t7) {
28102
- t24 = /* @__PURE__ */ jsx(DialogPrimitive.Root, { open: t7, modal, onOpenChange, children: t23 });
28103
- $[31] = modal;
28104
- $[32] = onOpenChange;
28105
- $[33] = t23;
28106
- $[34] = t7;
28107
- $[35] = t24;
28131
+ if ($[30] !== t13 || $[31] !== t23 || $[32] !== t8) {
28132
+ t24 = /* @__PURE__ */ jsx(DialogPrimitive.Portal, { children: /* @__PURE__ */ jsxs("div", { className: t8, children: [
28133
+ t13,
28134
+ t23
28135
+ ] }) });
28136
+ $[30] = t13;
28137
+ $[31] = t23;
28138
+ $[32] = t8;
28139
+ $[33] = t24;
28108
28140
  } else {
28109
- t24 = $[35];
28141
+ t24 = $[33];
28110
28142
  }
28111
- return t24;
28143
+ let t25;
28144
+ if ($[34] !== modal || $[35] !== onOpenChange || $[36] !== t24 || $[37] !== t7) {
28145
+ t25 = /* @__PURE__ */ jsx(DialogPrimitive.Root, { open: t7, modal, onOpenChange, children: t24 });
28146
+ $[34] = modal;
28147
+ $[35] = onOpenChange;
28148
+ $[36] = t24;
28149
+ $[37] = t7;
28150
+ $[38] = t25;
28151
+ } else {
28152
+ t25 = $[38];
28153
+ }
28154
+ return t25;
28112
28155
  };
28113
28156
  function _temp$2() {
28114
28157
  }
@@ -28678,7 +28721,7 @@ const Label = React.forwardRef((t0, ref) => {
28678
28721
  });
28679
28722
  Label.displayName = LabelPrimitive.Root.displayName;
28680
28723
  function LoadingButton(t0) {
28681
- const $ = c(17);
28724
+ const $ = c(18);
28682
28725
  let children;
28683
28726
  let disabled;
28684
28727
  let loading;
@@ -28712,31 +28755,32 @@ function LoadingButton(t0) {
28712
28755
  const t1 = loading || disabled;
28713
28756
  const t2 = props.component;
28714
28757
  let t3;
28715
- if ($[7] !== loading) {
28716
- t3 = loading && /* @__PURE__ */ jsx(CircularProgress, { size: "small" });
28758
+ if ($[7] !== loading || $[8] !== props.size) {
28759
+ t3 = loading && /* @__PURE__ */ jsx(CircularProgress, { size: props.size === "small" ? "smallest" : "small" });
28717
28760
  $[7] = loading;
28718
- $[8] = t3;
28761
+ $[8] = props.size;
28762
+ $[9] = t3;
28719
28763
  } else {
28720
- t3 = $[8];
28764
+ t3 = $[9];
28721
28765
  }
28722
28766
  const t4 = !loading && startIcon;
28723
28767
  let t5;
28724
- if ($[9] !== children || $[10] !== onClick || $[11] !== props || $[12] !== t1 || $[13] !== t2 || $[14] !== t3 || $[15] !== t4) {
28768
+ if ($[10] !== children || $[11] !== onClick || $[12] !== props || $[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4) {
28725
28769
  t5 = /* @__PURE__ */ jsxs(Button, { disabled: t1, onClick, component: t2, ...props, children: [
28726
28770
  t3,
28727
28771
  t4,
28728
28772
  children
28729
28773
  ] });
28730
- $[9] = children;
28731
- $[10] = onClick;
28732
- $[11] = props;
28733
- $[12] = t1;
28734
- $[13] = t2;
28735
- $[14] = t3;
28736
- $[15] = t4;
28737
- $[16] = t5;
28774
+ $[10] = children;
28775
+ $[11] = onClick;
28776
+ $[12] = props;
28777
+ $[13] = t1;
28778
+ $[14] = t2;
28779
+ $[15] = t3;
28780
+ $[16] = t4;
28781
+ $[17] = t5;
28738
28782
  } else {
28739
- t5 = $[16];
28783
+ t5 = $[17];
28740
28784
  }
28741
28785
  return t5;
28742
28786
  }
@@ -28956,7 +29000,7 @@ function MenubarTrigger(t0) {
28956
29000
  } = t0;
28957
29001
  let t1;
28958
29002
  if ($[0] !== className) {
28959
- 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-700 dark:hover:bg-opacity-50", className);
29003
+ 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);
28960
29004
  $[0] = className;
28961
29005
  $[1] = t1;
28962
29006
  } else {
@@ -29623,98 +29667,99 @@ function SelectInputLabel(t0) {
29623
29667
  }
29624
29668
  const MultiSelectContext = React.createContext({});
29625
29669
  const MultiSelect = React.forwardRef((t0, ref) => {
29626
- const $ = c(98);
29670
+ const $ = c(103);
29627
29671
  const {
29628
29672
  value,
29629
- size,
29673
+ size: t1,
29630
29674
  label,
29631
29675
  error,
29632
29676
  onValueChange,
29633
29677
  invisible,
29634
29678
  disabled,
29635
29679
  placeholder,
29636
- modalPopover: t1,
29637
- includeClear: t2,
29638
- includeSelectAll: t3,
29639
- useChips: t4,
29680
+ modalPopover: t2,
29681
+ includeClear: t3,
29682
+ includeSelectAll: t4,
29683
+ useChips: t5,
29640
29684
  className,
29641
29685
  children,
29642
29686
  renderValues,
29643
29687
  open,
29644
29688
  onOpenChange
29645
29689
  } = t0;
29646
- const modalPopover = t1 === void 0 ? true : t1;
29647
- const includeClear = t2 === void 0 ? true : t2;
29648
- const includeSelectAll = t3 === void 0 ? true : t3;
29649
- const useChips = t4 === void 0 ? true : t4;
29690
+ const size = t1 === void 0 ? "large" : t1;
29691
+ const modalPopover = t2 === void 0 ? true : t2;
29692
+ const includeClear = t3 === void 0 ? true : t3;
29693
+ const includeSelectAll = t4 === void 0 ? true : t4;
29694
+ const useChips = t5 === void 0 ? true : t5;
29650
29695
  const [isPopoverOpen, setIsPopoverOpen] = React.useState(open ?? false);
29651
- let t5;
29696
+ let t6;
29652
29697
  if ($[0] !== value) {
29653
- t5 = value ?? [];
29698
+ t6 = value ?? [];
29654
29699
  $[0] = value;
29655
- $[1] = t5;
29700
+ $[1] = t6;
29656
29701
  } else {
29657
- t5 = $[1];
29702
+ t6 = $[1];
29658
29703
  }
29659
- const [selectedValues, setSelectedValues] = React.useState(t5);
29660
- let t6;
29704
+ const [selectedValues, setSelectedValues] = React.useState(t6);
29705
+ let t7;
29661
29706
  if ($[2] !== onOpenChange) {
29662
- t6 = (open_0) => {
29707
+ t7 = (open_0) => {
29663
29708
  setIsPopoverOpen(open_0);
29664
29709
  onOpenChange?.(open_0);
29665
29710
  };
29666
29711
  $[2] = onOpenChange;
29667
- $[3] = t6;
29712
+ $[3] = t7;
29668
29713
  } else {
29669
- t6 = $[3];
29714
+ t7 = $[3];
29670
29715
  }
29671
- const onPopoverOpenChange = t6;
29672
- let t7;
29716
+ const onPopoverOpenChange = t7;
29673
29717
  let t8;
29718
+ let t9;
29674
29719
  if ($[4] !== open) {
29675
- t7 = () => {
29720
+ t8 = () => {
29676
29721
  setIsPopoverOpen(open ?? false);
29677
29722
  };
29678
- t8 = [open];
29723
+ t9 = [open];
29679
29724
  $[4] = open;
29680
- $[5] = t7;
29681
- $[6] = t8;
29725
+ $[5] = t8;
29726
+ $[6] = t9;
29682
29727
  } else {
29683
- t7 = $[5];
29684
- t8 = $[6];
29728
+ t8 = $[5];
29729
+ t9 = $[6];
29685
29730
  }
29686
- useEffect(t7, t8);
29687
- let t9;
29731
+ useEffect(t8, t9);
29732
+ let t10;
29688
29733
  if ($[7] !== children) {
29689
- t9 = children ? Children.map(children, _temp$1).filter(Boolean) : [];
29734
+ t10 = children ? Children.map(children, _temp$1).filter(Boolean) : [];
29690
29735
  $[7] = children;
29691
- $[8] = t9;
29736
+ $[8] = t10;
29692
29737
  } else {
29693
- t9 = $[8];
29738
+ t10 = $[8];
29694
29739
  }
29695
- const allValues = t9;
29696
- let t10;
29740
+ const allValues = t10;
29697
29741
  let t11;
29742
+ let t12;
29698
29743
  if ($[9] !== value) {
29699
- t10 = () => {
29744
+ t11 = () => {
29700
29745
  setSelectedValues(value ?? []);
29701
29746
  };
29702
- t11 = [value];
29747
+ t12 = [value];
29703
29748
  $[9] = value;
29704
- $[10] = t10;
29705
- $[11] = t11;
29749
+ $[10] = t11;
29750
+ $[11] = t12;
29706
29751
  } else {
29707
- t10 = $[10];
29708
- t11 = $[11];
29752
+ t11 = $[10];
29753
+ t12 = $[11];
29709
29754
  }
29710
- React.useEffect(t10, t11);
29755
+ React.useEffect(t11, t12);
29711
29756
  let onItemClick;
29712
29757
  let updateValues;
29713
29758
  if ($[12] !== onValueChange || $[13] !== selectedValues) {
29714
29759
  onItemClick = function onItemClick2(newValue) {
29715
29760
  let newSelectedValues;
29716
- if (selectedValues.includes(newValue)) {
29717
- newSelectedValues = selectedValues.filter((v) => v !== newValue);
29761
+ if (selectedValues.some((v_0) => String(v_0) === String(newValue))) {
29762
+ newSelectedValues = selectedValues.filter((v) => String(v) !== String(newValue));
29718
29763
  } else {
29719
29764
  newSelectedValues = [...selectedValues, newValue];
29720
29765
  }
@@ -29732,9 +29777,9 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29732
29777
  onItemClick = $[14];
29733
29778
  updateValues = $[15];
29734
29779
  }
29735
- let t12;
29780
+ let t13;
29736
29781
  if ($[16] !== onPopoverOpenChange || $[17] !== selectedValues || $[18] !== updateValues) {
29737
- t12 = (event) => {
29782
+ t13 = (event) => {
29738
29783
  if (event.key === "Enter") {
29739
29784
  onPopoverOpenChange(true);
29740
29785
  } else {
@@ -29748,50 +29793,50 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29748
29793
  $[16] = onPopoverOpenChange;
29749
29794
  $[17] = selectedValues;
29750
29795
  $[18] = updateValues;
29751
- $[19] = t12;
29796
+ $[19] = t13;
29752
29797
  } else {
29753
- t12 = $[19];
29798
+ t13 = $[19];
29754
29799
  }
29755
- const handleInputKeyDown = t12;
29756
- let t13;
29800
+ const handleInputKeyDown = t13;
29801
+ let t14;
29757
29802
  if ($[20] !== selectedValues || $[21] !== updateValues) {
29758
- t13 = (value_0) => {
29759
- const newSelectedValues_1 = selectedValues.includes(value_0) ? selectedValues.filter((v_0) => v_0 !== value_0) : [...selectedValues, value_0];
29803
+ t14 = (value_0) => {
29804
+ 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];
29760
29805
  updateValues(newSelectedValues_1);
29761
29806
  };
29762
29807
  $[20] = selectedValues;
29763
29808
  $[21] = updateValues;
29764
- $[22] = t13;
29809
+ $[22] = t14;
29765
29810
  } else {
29766
- t13 = $[22];
29811
+ t14 = $[22];
29767
29812
  }
29768
- const toggleOption = t13;
29769
- let t14;
29813
+ const toggleOption = t14;
29814
+ let t15;
29770
29815
  if ($[23] !== updateValues) {
29771
- t14 = () => {
29816
+ t15 = () => {
29772
29817
  updateValues([]);
29773
29818
  };
29774
29819
  $[23] = updateValues;
29775
- $[24] = t14;
29820
+ $[24] = t15;
29776
29821
  } else {
29777
- t14 = $[24];
29822
+ t15 = $[24];
29778
29823
  }
29779
- const handleClear = t14;
29780
- let t15;
29824
+ const handleClear = t15;
29825
+ let t16;
29781
29826
  if ($[25] !== isPopoverOpen || $[26] !== onPopoverOpenChange) {
29782
- t15 = () => {
29827
+ t16 = () => {
29783
29828
  onPopoverOpenChange(!isPopoverOpen);
29784
29829
  };
29785
29830
  $[25] = isPopoverOpen;
29786
29831
  $[26] = onPopoverOpenChange;
29787
- $[27] = t15;
29832
+ $[27] = t16;
29788
29833
  } else {
29789
- t15 = $[27];
29834
+ t16 = $[27];
29790
29835
  }
29791
- const handleTogglePopover = t15;
29792
- let t16;
29836
+ const handleTogglePopover = t16;
29837
+ let t17;
29793
29838
  if ($[28] !== allValues || $[29] !== handleClear || $[30] !== onPopoverOpenChange || $[31] !== selectedValues.length || $[32] !== updateValues) {
29794
- t16 = () => {
29839
+ t17 = () => {
29795
29840
  if (selectedValues.length === allValues.length) {
29796
29841
  handleClear();
29797
29842
  } else {
@@ -29804,60 +29849,76 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29804
29849
  $[30] = onPopoverOpenChange;
29805
29850
  $[31] = selectedValues.length;
29806
29851
  $[32] = updateValues;
29807
- $[33] = t16;
29852
+ $[33] = t17;
29808
29853
  } else {
29809
- t16 = $[33];
29854
+ t17 = $[33];
29810
29855
  }
29811
- const toggleAll = t16;
29856
+ const toggleAll = t17;
29812
29857
  useInjectStyles("MultiSelect", `
29813
29858
  [cmdk-group] {
29814
29859
  max-height: 45vh;
29815
29860
  overflow-y: auto;
29816
29861
  // width: 400px;
29817
29862
  } `);
29818
- let t17;
29863
+ let t18;
29819
29864
  if ($[34] !== onItemClick || $[35] !== selectedValues) {
29820
- t17 = {
29865
+ t18 = {
29821
29866
  fieldValue: selectedValues,
29822
29867
  onItemClick
29823
29868
  };
29824
29869
  $[34] = onItemClick;
29825
29870
  $[35] = selectedValues;
29826
- $[36] = t17;
29871
+ $[36] = t18;
29827
29872
  } else {
29828
- t17 = $[36];
29873
+ t18 = $[36];
29829
29874
  }
29830
- let t18;
29875
+ let t19;
29831
29876
  if ($[37] !== error || $[38] !== label) {
29832
- t18 = typeof label === "string" ? /* @__PURE__ */ jsx(SelectInputLabel, { error, children: label }) : label;
29877
+ t19 = typeof label === "string" ? /* @__PURE__ */ jsx(SelectInputLabel, { error, children: label }) : label;
29833
29878
  $[37] = error;
29834
29879
  $[38] = label;
29835
- $[39] = t18;
29880
+ $[39] = t19;
29836
29881
  } else {
29837
- t18 = $[39];
29882
+ t19 = $[39];
29838
29883
  }
29839
- const t19 = size === "small" ? "min-h-[42px]" : "min-h-[64px]";
29840
- const t20 = invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin;
29841
- const t21 = disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin;
29842
- let t22;
29843
- if ($[40] !== className || $[41] !== t19 || $[42] !== t20 || $[43] !== t21) {
29844
- t22 = cls(t19, "py-2", "px-4", "select-none rounded-md text-sm", t20, t21, "relative flex items-center", className);
29884
+ const t20 = size === "smallest";
29885
+ const t21 = size === "small";
29886
+ const t22 = size === "medium";
29887
+ const t23 = size === "large";
29888
+ let t24;
29889
+ if ($[40] !== className || $[41] !== disabled || $[42] !== invisible || $[43] !== size || $[44] !== t20 || $[45] !== t21 || $[46] !== t22 || $[47] !== t23) {
29890
+ t24 = cls({
29891
+ "min-h-[28px]": t20,
29892
+ "min-h-[32px]": t21,
29893
+ "min-h-[42px]": t22,
29894
+ "min-h-[64px]": t23
29895
+ }, {
29896
+ "py-1": size === "small" || size === "smallest",
29897
+ "py-2": size === "medium" || size === "large"
29898
+ }, {
29899
+ "px-2": size === "small" || size === "smallest",
29900
+ "px-4": size === "medium" || size === "large"
29901
+ }, "select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className);
29845
29902
  $[40] = className;
29846
- $[41] = t19;
29847
- $[42] = t20;
29848
- $[43] = t21;
29849
- $[44] = t22;
29903
+ $[41] = disabled;
29904
+ $[42] = invisible;
29905
+ $[43] = size;
29906
+ $[44] = t20;
29907
+ $[45] = t21;
29908
+ $[46] = t22;
29909
+ $[47] = t23;
29910
+ $[48] = t24;
29850
29911
  } else {
29851
- t22 = $[44];
29912
+ t24 = $[48];
29852
29913
  }
29853
- let t23;
29854
- if ($[45] !== children || $[46] !== handleClear || $[47] !== includeClear || $[48] !== isPopoverOpen || $[49] !== placeholder || $[50] !== renderValues || $[51] !== selectedValues || $[52] !== toggleOption || $[53] !== useChips) {
29855
- t23 = selectedValues.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center w-full", children: [
29914
+ let t25;
29915
+ if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !== size || $[57] !== toggleOption || $[58] !== useChips) {
29916
+ t25 = selectedValues.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center w-full", children: [
29856
29917
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-start", children: [
29857
29918
  renderValues && renderValues(selectedValues),
29858
29919
  !renderValues && selectedValues.map((value_1) => {
29859
29920
  const childrenProps = Children.map(children, _temp2).filter(Boolean);
29860
- const option = childrenProps.find((o) => o.value === value_1);
29921
+ const option = childrenProps.find((o) => String(o.value) === String(value_1));
29861
29922
  if (!useChips) {
29862
29923
  return option?.children;
29863
29924
  }
@@ -29867,7 +29928,7 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29867
29928
  event_0.stopPropagation();
29868
29929
  toggleOption(value_1);
29869
29930
  } })
29870
- ] }, value_1);
29931
+ ] }, String(value_1));
29871
29932
  })
29872
29933
  ] }),
29873
29934
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
@@ -29875,185 +29936,186 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29875
29936
  event_1.stopPropagation();
29876
29937
  handleClear();
29877
29938
  } }),
29878
- /* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
29939
+ /* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
29879
29940
  ] })
29880
29941
  ] }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full mx-auto", children: [
29881
29942
  /* @__PURE__ */ jsx("span", { className: "text-sm", children: placeholder }),
29882
- /* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
29943
+ /* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
29883
29944
  ] });
29884
- $[45] = children;
29885
- $[46] = handleClear;
29886
- $[47] = includeClear;
29887
- $[48] = isPopoverOpen;
29888
- $[49] = placeholder;
29889
- $[50] = renderValues;
29890
- $[51] = selectedValues;
29891
- $[52] = toggleOption;
29892
- $[53] = useChips;
29893
- $[54] = t23;
29894
- } else {
29895
- t23 = $[54];
29896
- }
29897
- let t24;
29898
- if ($[55] !== handleTogglePopover || $[56] !== ref || $[57] !== t22 || $[58] !== t23) {
29899
- t24 = /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { ref, onClick: handleTogglePopover, className: t22, children: t23 }) });
29900
- $[55] = handleTogglePopover;
29901
- $[56] = ref;
29902
- $[57] = t22;
29903
- $[58] = t23;
29904
- $[59] = t24;
29905
- } else {
29906
- t24 = $[59];
29907
- }
29908
- let t25;
29909
- if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
29910
- t25 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
29911
- $[60] = t25;
29912
- } else {
29913
- t25 = $[60];
29945
+ $[49] = children;
29946
+ $[50] = handleClear;
29947
+ $[51] = includeClear;
29948
+ $[52] = isPopoverOpen;
29949
+ $[53] = placeholder;
29950
+ $[54] = renderValues;
29951
+ $[55] = selectedValues;
29952
+ $[56] = size;
29953
+ $[57] = toggleOption;
29954
+ $[58] = useChips;
29955
+ $[59] = t25;
29956
+ } else {
29957
+ t25 = $[59];
29914
29958
  }
29915
29959
  let t26;
29916
- if ($[61] !== onPopoverOpenChange) {
29917
- t26 = () => onPopoverOpenChange(false);
29918
- $[61] = onPopoverOpenChange;
29919
- $[62] = t26;
29960
+ if ($[60] !== handleTogglePopover || $[61] !== ref || $[62] !== t24 || $[63] !== t25) {
29961
+ t26 = /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { ref, onClick: handleTogglePopover, className: t24, children: t25 }) });
29962
+ $[60] = handleTogglePopover;
29963
+ $[61] = ref;
29964
+ $[62] = t24;
29965
+ $[63] = t25;
29966
+ $[64] = t26;
29920
29967
  } else {
29921
- t26 = $[62];
29968
+ t26 = $[64];
29922
29969
  }
29923
29970
  let t27;
29924
- if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
29925
- t27 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow ");
29926
- $[63] = t27;
29971
+ if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
29972
+ t27 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
29973
+ $[65] = t27;
29927
29974
  } else {
29928
- t27 = $[63];
29975
+ t27 = $[65];
29929
29976
  }
29930
29977
  let t28;
29931
- if ($[64] !== handleInputKeyDown) {
29932
- t28 = /* @__PURE__ */ jsx(Command.Input, { className: t27, placeholder: "Search...", onKeyDown: handleInputKeyDown });
29933
- $[64] = handleInputKeyDown;
29934
- $[65] = t28;
29978
+ if ($[66] !== onPopoverOpenChange) {
29979
+ t28 = () => onPopoverOpenChange(false);
29980
+ $[66] = onPopoverOpenChange;
29981
+ $[67] = t28;
29935
29982
  } else {
29936
- t28 = $[65];
29983
+ t28 = $[67];
29937
29984
  }
29938
29985
  let t29;
29939
- if ($[66] !== handleClear || $[67] !== selectedValues.length) {
29940
- t29 = selectedValues.length > 0 && /* @__PURE__ */ jsx("div", { onClick: handleClear, className: "text-sm justify-center cursor-pointer py-3 px-4 text-text-secondary dark:text-text-secondary-dark", children: "Clear" });
29941
- $[66] = handleClear;
29942
- $[67] = selectedValues.length;
29986
+ if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
29987
+ t29 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow ");
29943
29988
  $[68] = t29;
29944
29989
  } else {
29945
29990
  t29 = $[68];
29946
29991
  }
29947
29992
  let t30;
29948
- if ($[69] !== t28 || $[70] !== t29) {
29949
- t30 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center", children: [
29950
- t28,
29951
- t29
29952
- ] });
29953
- $[69] = t28;
29954
- $[70] = t29;
29955
- $[71] = t30;
29993
+ if ($[69] !== handleInputKeyDown) {
29994
+ t30 = /* @__PURE__ */ jsx(Command.Input, { className: t29, placeholder: "Search...", onKeyDown: handleInputKeyDown });
29995
+ $[69] = handleInputKeyDown;
29996
+ $[70] = t30;
29956
29997
  } else {
29957
- t30 = $[71];
29998
+ t30 = $[70];
29958
29999
  }
29959
30000
  let t31;
29960
- if ($[72] === Symbol.for("react.memo_cache_sentinel")) {
29961
- t31 = /* @__PURE__ */ jsx(Separator, { orientation: "horizontal", className: "my-0" });
29962
- $[72] = t31;
30001
+ if ($[71] !== handleClear || $[72] !== selectedValues.length) {
30002
+ t31 = selectedValues.length > 0 && /* @__PURE__ */ jsx("div", { onClick: handleClear, className: "text-sm justify-center cursor-pointer py-3 px-4 text-text-secondary dark:text-text-secondary-dark", children: "Clear" });
30003
+ $[71] = handleClear;
30004
+ $[72] = selectedValues.length;
30005
+ $[73] = t31;
29963
30006
  } else {
29964
- t31 = $[72];
30007
+ t31 = $[73];
29965
30008
  }
29966
30009
  let t32;
29967
- if ($[73] === Symbol.for("react.memo_cache_sentinel")) {
29968
- t32 = /* @__PURE__ */ jsx(Command.Empty, { className: "px-4 py-2", children: "No results found." });
29969
- $[73] = t32;
30010
+ if ($[74] !== t30 || $[75] !== t31) {
30011
+ t32 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center", children: [
30012
+ t30,
30013
+ t31
30014
+ ] });
30015
+ $[74] = t30;
30016
+ $[75] = t31;
30017
+ $[76] = t32;
29970
30018
  } else {
29971
- t32 = $[73];
30019
+ t32 = $[76];
29972
30020
  }
29973
30021
  let t33;
29974
- if ($[74] !== allValues.length || $[75] !== includeSelectAll || $[76] !== selectedValues.length || $[77] !== toggleAll) {
29975
- t33 = includeSelectAll && /* @__PURE__ */ jsxs(Command.Item, { onSelect: toggleAll, className: cls("flex flex-row items-center gap-1.5", "cursor-pointer", "m-1", "ring-offset-transparent", "p-1 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-offset-2", "aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900", "cursor-pointer p-2 rounded aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900"), children: [
30022
+ if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
30023
+ t33 = /* @__PURE__ */ jsx(Separator, { orientation: "horizontal", className: "my-0" });
30024
+ $[77] = t33;
30025
+ } else {
30026
+ t33 = $[77];
30027
+ }
30028
+ let t34;
30029
+ if ($[78] === Symbol.for("react.memo_cache_sentinel")) {
30030
+ t34 = /* @__PURE__ */ jsx(Command.Empty, { className: "px-4 py-2", children: "No results found." });
30031
+ $[78] = t34;
30032
+ } else {
30033
+ t34 = $[78];
30034
+ }
30035
+ let t35;
30036
+ if ($[79] !== allValues.length || $[80] !== includeSelectAll || $[81] !== selectedValues.length || $[82] !== toggleAll) {
30037
+ t35 = includeSelectAll && /* @__PURE__ */ jsxs(Command.Item, { onSelect: toggleAll, className: cls("flex flex-row items-center gap-1.5", "cursor-pointer", "m-1", "ring-offset-transparent", "p-1 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-offset-2", "aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900", "cursor-pointer p-2 rounded aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900"), children: [
29976
30038
  /* @__PURE__ */ jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
29977
30039
  /* @__PURE__ */ jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
29978
30040
  ] }, "all");
29979
- $[74] = allValues.length;
29980
- $[75] = includeSelectAll;
29981
- $[76] = selectedValues.length;
29982
- $[77] = toggleAll;
29983
- $[78] = t33;
30041
+ $[79] = allValues.length;
30042
+ $[80] = includeSelectAll;
30043
+ $[81] = selectedValues.length;
30044
+ $[82] = toggleAll;
30045
+ $[83] = t35;
29984
30046
  } else {
29985
- t33 = $[78];
30047
+ t35 = $[83];
29986
30048
  }
29987
- let t34;
29988
- if ($[79] !== children || $[80] !== t33) {
29989
- t34 = /* @__PURE__ */ jsxs(Command.List, { children: [
29990
- t32,
30049
+ let t36;
30050
+ if ($[84] !== children || $[85] !== t35) {
30051
+ t36 = /* @__PURE__ */ jsxs(Command.List, { children: [
30052
+ t34,
29991
30053
  /* @__PURE__ */ jsxs(Command.Group, { children: [
29992
- t33,
30054
+ t35,
29993
30055
  children
29994
30056
  ] })
29995
30057
  ] });
29996
- $[79] = children;
29997
- $[80] = t33;
29998
- $[81] = t34;
30058
+ $[84] = children;
30059
+ $[85] = t35;
30060
+ $[86] = t36;
29999
30061
  } else {
30000
- t34 = $[81];
30062
+ t36 = $[86];
30001
30063
  }
30002
- let t35;
30003
- if ($[82] !== t30 || $[83] !== t34) {
30004
- t35 = /* @__PURE__ */ jsxs(Command, { children: [
30005
- t30,
30006
- t31,
30007
- t34
30064
+ let t37;
30065
+ if ($[87] !== t32 || $[88] !== t36) {
30066
+ t37 = /* @__PURE__ */ jsxs(Command, { children: [
30067
+ t32,
30068
+ t33,
30069
+ t36
30008
30070
  ] });
30009
- $[82] = t30;
30010
- $[83] = t34;
30011
- $[84] = t35;
30071
+ $[87] = t32;
30072
+ $[88] = t36;
30073
+ $[89] = t37;
30012
30074
  } else {
30013
- t35 = $[84];
30075
+ t37 = $[89];
30014
30076
  }
30015
- let t36;
30016
- if ($[85] !== t26 || $[86] !== t35) {
30017
- t36 = /* @__PURE__ */ jsx(PopoverPrimitive.Content, { className: t25, align: "start", sideOffset: 8, onEscapeKeyDown: t26, children: t35 });
30018
- $[85] = t26;
30019
- $[86] = t35;
30020
- $[87] = t36;
30077
+ let t38;
30078
+ if ($[90] !== t28 || $[91] !== t37) {
30079
+ t38 = /* @__PURE__ */ jsx(PopoverPrimitive.Content, { className: t27, align: "start", sideOffset: 8, onEscapeKeyDown: t28, children: t37 });
30080
+ $[90] = t28;
30081
+ $[91] = t37;
30082
+ $[92] = t38;
30021
30083
  } else {
30022
- t36 = $[87];
30084
+ t38 = $[92];
30023
30085
  }
30024
- let t37;
30025
- if ($[88] !== isPopoverOpen || $[89] !== modalPopover || $[90] !== onPopoverOpenChange || $[91] !== t24 || $[92] !== t36) {
30026
- t37 = /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open: isPopoverOpen, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
30027
- t24,
30028
- t36
30086
+ let t39;
30087
+ if ($[93] !== isPopoverOpen || $[94] !== modalPopover || $[95] !== onPopoverOpenChange || $[96] !== t26 || $[97] !== t38) {
30088
+ t39 = /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open: isPopoverOpen, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
30089
+ t26,
30090
+ t38
30029
30091
  ] });
30030
- $[88] = isPopoverOpen;
30031
- $[89] = modalPopover;
30032
- $[90] = onPopoverOpenChange;
30033
- $[91] = t24;
30034
- $[92] = t36;
30035
- $[93] = t37;
30092
+ $[93] = isPopoverOpen;
30093
+ $[94] = modalPopover;
30094
+ $[95] = onPopoverOpenChange;
30095
+ $[96] = t26;
30096
+ $[97] = t38;
30097
+ $[98] = t39;
30036
30098
  } else {
30037
- t37 = $[93];
30099
+ t39 = $[98];
30038
30100
  }
30039
- let t38;
30040
- if ($[94] !== t17 || $[95] !== t18 || $[96] !== t37) {
30041
- t38 = /* @__PURE__ */ jsxs(MultiSelectContext.Provider, { value: t17, children: [
30042
- t18,
30043
- t37
30101
+ let t40;
30102
+ if ($[99] !== t18 || $[100] !== t19 || $[101] !== t39) {
30103
+ t40 = /* @__PURE__ */ jsxs(MultiSelectContext.Provider, { value: t18, children: [
30104
+ t19,
30105
+ t39
30044
30106
  ] });
30045
- $[94] = t17;
30046
- $[95] = t18;
30047
- $[96] = t37;
30048
- $[97] = t38;
30107
+ $[99] = t18;
30108
+ $[100] = t19;
30109
+ $[101] = t39;
30110
+ $[102] = t40;
30049
30111
  } else {
30050
- t38 = $[97];
30112
+ t40 = $[102];
30051
30113
  }
30052
- return t38;
30114
+ return t40;
30053
30115
  });
30054
30116
  MultiSelect.displayName = "MultiSelect";
30055
30117
  function MultiSelectItem(t0) {
30056
- const $ = c(18);
30118
+ const $ = c(20);
30057
30119
  const {
30058
30120
  children,
30059
30121
  value,
@@ -30077,7 +30139,15 @@ function MultiSelectItem(t0) {
30077
30139
  }
30078
30140
  let t2;
30079
30141
  if ($[2] !== t1 || $[3] !== value) {
30080
- t2 = t1.includes(value);
30142
+ let t32;
30143
+ if ($[5] !== value) {
30144
+ t32 = (v) => String(v) === String(value);
30145
+ $[5] = value;
30146
+ $[6] = t32;
30147
+ } else {
30148
+ t32 = $[6];
30149
+ }
30150
+ t2 = t1.some(t32);
30081
30151
  $[2] = t1;
30082
30152
  $[3] = value;
30083
30153
  $[4] = t2;
@@ -30086,47 +30156,47 @@ function MultiSelectItem(t0) {
30086
30156
  }
30087
30157
  const isSelected = t2;
30088
30158
  let t3;
30089
- if ($[5] !== onItemClick || $[6] !== value) {
30159
+ if ($[7] !== onItemClick || $[8] !== value) {
30090
30160
  t3 = (_) => {
30091
30161
  onItemClick(value);
30092
30162
  };
30093
- $[5] = onItemClick;
30094
- $[6] = value;
30095
- $[7] = t3;
30163
+ $[7] = onItemClick;
30164
+ $[8] = value;
30165
+ $[9] = t3;
30096
30166
  } else {
30097
- t3 = $[7];
30167
+ t3 = $[9];
30098
30168
  }
30099
30169
  const t4 = isSelected ? "bg-surface-accent-200 dark:bg-surface-accent-950" : "";
30100
30170
  let t5;
30101
- if ($[8] !== className || $[9] !== t4) {
30171
+ if ($[10] !== className || $[11] !== t4) {
30102
30172
  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);
30103
- $[8] = className;
30104
- $[9] = t4;
30105
- $[10] = t5;
30173
+ $[10] = className;
30174
+ $[11] = t4;
30175
+ $[12] = t5;
30106
30176
  } else {
30107
- t5 = $[10];
30177
+ t5 = $[12];
30108
30178
  }
30109
30179
  let t6;
30110
- if ($[11] !== isSelected) {
30180
+ if ($[13] !== isSelected) {
30111
30181
  t6 = /* @__PURE__ */ jsx(InnerCheckBox, { checked: isSelected });
30112
- $[11] = isSelected;
30113
- $[12] = t6;
30182
+ $[13] = isSelected;
30183
+ $[14] = t6;
30114
30184
  } else {
30115
- t6 = $[12];
30185
+ t6 = $[14];
30116
30186
  }
30117
30187
  let t7;
30118
- if ($[13] !== children || $[14] !== t3 || $[15] !== t5 || $[16] !== t6) {
30188
+ if ($[15] !== children || $[16] !== t3 || $[17] !== t5 || $[18] !== t6) {
30119
30189
  t7 = /* @__PURE__ */ jsxs(Command.Item, { onMouseDown: _temp3, onSelect: t3, className: t5, children: [
30120
30190
  t6,
30121
30191
  children
30122
30192
  ] });
30123
- $[13] = children;
30124
- $[14] = t3;
30125
- $[15] = t5;
30126
- $[16] = t6;
30127
- $[17] = t7;
30193
+ $[15] = children;
30194
+ $[16] = t3;
30195
+ $[17] = t5;
30196
+ $[18] = t6;
30197
+ $[19] = t7;
30128
30198
  } else {
30129
- t7 = $[17];
30199
+ t7 = $[19];
30130
30200
  }
30131
30201
  return t7;
30132
30202
  }
@@ -30481,6 +30551,7 @@ const Select = forwardRef(({
30481
30551
  endAdornment,
30482
30552
  invisible,
30483
30553
  children,
30554
+ dataType = "string",
30484
30555
  ...props
30485
30556
  }, ref) => {
30486
30557
  const [openInternal, setOpenInternal] = useState(open ?? false);
@@ -30488,68 +30559,81 @@ const Select = forwardRef(({
30488
30559
  setOpenInternal(open ?? false);
30489
30560
  }, [open]);
30490
30561
  const onValueChangeInternal = useCallback((newValue) => {
30491
- onValueChange?.(newValue);
30562
+ let typedValue = newValue;
30563
+ if (dataType === "boolean") {
30564
+ if (newValue === "true") typedValue = true;
30565
+ else if (newValue === "false") typedValue = false;
30566
+ } else if (dataType === "number") {
30567
+ if (!isNaN(Number(newValue)) && newValue.trim() !== "") typedValue = Number(newValue);
30568
+ }
30569
+ onValueChange?.(typedValue);
30492
30570
  if (onChange) {
30493
30571
  const event = {
30494
30572
  target: {
30495
30573
  name,
30496
- value: newValue
30574
+ value: typedValue
30497
30575
  }
30498
30576
  };
30499
30577
  onChange(event);
30500
30578
  }
30501
- }, [onChange, value, onValueChange]);
30579
+ }, [onChange, onValueChange, name]);
30502
30580
  const hasValue = Array.isArray(value) ? value.length > 0 : value != null && value !== "" && value !== void 0;
30503
- return /* @__PURE__ */ jsxs(SelectPrimitive.Root, { name, value, open: openInternal, disabled, onValueChange: onValueChangeInternal, onOpenChange: (open_0) => {
30581
+ const stringValue = value !== void 0 ? String(value) : void 0;
30582
+ return /* @__PURE__ */ jsxs(SelectPrimitive.Root, { name, value: stringValue, open: openInternal, disabled, onValueChange: onValueChangeInternal, onOpenChange: (open_0) => {
30504
30583
  onOpenChange?.(open_0);
30505
30584
  setOpenInternal(open_0);
30506
30585
  }, ...props, children: [
30507
30586
  typeof label === "string" ? /* @__PURE__ */ jsx(SelectInputLabel, { error, children: label }) : label,
30508
- /* @__PURE__ */ jsx("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
30509
- "min-h-[28px]": size === "small",
30587
+ /* @__PURE__ */ jsxs("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
30588
+ "min-h-[28px]": size === "smallest",
30589
+ "min-h-[32px]": size === "small",
30510
30590
  "min-h-[42px]": size === "medium",
30511
30591
  "min-h-[64px]": size === "large",
30512
30592
  "w-fit": !fullWidth,
30513
30593
  "w-full": fullWidth
30514
- }), children: /* @__PURE__ */ jsx(SelectPrimitive.Trigger, { ref: inputRef, id, asChild: true, children: /* @__PURE__ */ jsxs("div", { className: cls("h-full", padding ? {
30515
- "px-4": size === "large",
30516
- "px-3": size === "medium",
30517
- "px-2": size === "small"
30518
- } : "", "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", {
30519
- "min-h-[28px]": size === "small",
30520
- "min-h-[42px]": size === "medium",
30521
- "min-h-[64px]": size === "large",
30522
- "w-full": fullWidth,
30523
- "w-fit": !fullWidth
30524
- }, inputClassName), children: [
30525
- /* @__PURE__ */ jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
30526
- "min-h-[28px]": size === "small",
30594
+ }), children: [
30595
+ /* @__PURE__ */ jsx(SelectPrimitive.Trigger, { ref: inputRef, id, asChild: true, children: /* @__PURE__ */ jsxs("div", { className: cls("h-full", padding ? {
30596
+ "px-4": size === "large",
30597
+ "px-3": size === "medium",
30598
+ "px-2": size === "small" || size === "smallest"
30599
+ } : "", "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", {
30600
+ "min-h-[28px]": size === "smallest",
30601
+ "min-h-[32px]": size === "small",
30527
30602
  "min-h-[42px]": size === "medium",
30528
- "min-h-[64px]": size === "large"
30529
- }), children: /* @__PURE__ */ jsxs(SelectPrimitive.Value, { onClick: (e) => {
30530
- e.preventDefault();
30531
- e.stopPropagation();
30532
- }, placeholder, className: "w-full", children: [
30533
- hasValue && value && renderValue ? renderValue(value) : placeholder,
30534
- hasValue && !renderValue && (() => {
30535
- const childrenProps = Children.map(children, (child) => {
30536
- if (React__default.isValidElement(child)) {
30537
- return child.props;
30538
- }
30539
- }).filter(Boolean);
30540
- const option = childrenProps.find((o) => o.value === value);
30541
- return option?.children;
30542
- })()
30603
+ "min-h-[64px]": size === "large",
30604
+ "w-full": fullWidth,
30605
+ "w-fit": !fullWidth
30606
+ }, inputClassName), children: [
30607
+ /* @__PURE__ */ jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
30608
+ "min-h-[28px]": size === "smallest",
30609
+ "min-h-[32px]": size === "small",
30610
+ "min-h-[42px]": size === "medium",
30611
+ "min-h-[64px]": size === "large"
30612
+ }), children: /* @__PURE__ */ jsxs(SelectPrimitive.Value, { onClick: (e) => {
30613
+ e.preventDefault();
30614
+ e.stopPropagation();
30615
+ }, placeholder, className: "w-full", children: [
30616
+ hasValue && value !== void 0 && renderValue ? renderValue(value) : placeholder,
30617
+ hasValue && !renderValue && (() => {
30618
+ const childrenProps = Children.map(children, (child) => {
30619
+ if (React__default.isValidElement(child)) {
30620
+ return child.props;
30621
+ }
30622
+ }).filter(Boolean);
30623
+ const option = childrenProps.find((o) => String(o.value) === String(value));
30624
+ return option?.children;
30625
+ })()
30626
+ ] }) }),
30627
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", open ? "rotate-180" : "", {
30628
+ "px-2": size === "large",
30629
+ "px-1": size === "medium" || size === "small"
30630
+ }) }) })
30543
30631
  ] }) }),
30544
- endAdornment && /* @__PURE__ */ jsx("div", { className: cls("h-full flex items-center"), onClick: (e_0) => {
30632
+ endAdornment && /* @__PURE__ */ jsx("div", { className: cls("h-full flex items-center absolute right-0 pr-12"), onClick: (e_0) => {
30545
30633
  e_0.preventDefault();
30546
30634
  e_0.stopPropagation();
30547
- }, children: endAdornment }),
30548
- /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: "medium", className: cls("transition", open ? "rotate-180" : "", {
30549
- "px-2": size === "large",
30550
- "px-1": size === "medium" || size === "small"
30551
- }) }) })
30552
- ] }) }) }),
30635
+ }, children: endAdornment })
30636
+ ] }),
30553
30637
  /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(SelectPrimitive.Content, { position, className: cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-surface-900 p-2 rounded-lg", defaultBorderMixin), children: /* @__PURE__ */ jsx(SelectPrimitive.Viewport, { className: "p-1", style: {
30554
30638
  maxHeight: "var(--radix-select-content-available-height)"
30555
30639
  }, children }) }) })
@@ -30564,6 +30648,7 @@ function SelectItem(t0) {
30564
30648
  disabled,
30565
30649
  className
30566
30650
  } = t0;
30651
+ const stringValue = String(value);
30567
30652
  const t1 = disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer";
30568
30653
  let t2;
30569
30654
  if ($[0] !== className || $[1] !== t1) {
@@ -30590,15 +30675,15 @@ function SelectItem(t0) {
30590
30675
  t4 = $[5];
30591
30676
  }
30592
30677
  let t5;
30593
- if ($[6] !== disabled || $[7] !== t2 || $[8] !== t3 || $[9] !== value) {
30594
- t5 = /* @__PURE__ */ jsxs(SelectPrimitive.Item, { value, disabled, className: t2, children: [
30678
+ if ($[6] !== disabled || $[7] !== stringValue || $[8] !== t2 || $[9] !== t3) {
30679
+ t5 = /* @__PURE__ */ jsxs(SelectPrimitive.Item, { value: stringValue, disabled, className: t2, children: [
30595
30680
  t3,
30596
30681
  t4
30597
- ] }, value);
30682
+ ] }, stringValue);
30598
30683
  $[6] = disabled;
30599
- $[7] = t2;
30600
- $[8] = t3;
30601
- $[9] = value;
30684
+ $[7] = stringValue;
30685
+ $[8] = t2;
30686
+ $[9] = t3;
30602
30687
  $[10] = t5;
30603
30688
  } else {
30604
30689
  t5 = $[10];
@@ -31274,7 +31359,8 @@ const TextField = forwardRef(({
31274
31359
  type = "text",
31275
31360
  multiline = false,
31276
31361
  invisible,
31277
- rows,
31362
+ maxRows,
31363
+ minRows,
31278
31364
  disabled,
31279
31365
  error,
31280
31366
  endAdornment,
@@ -31302,18 +31388,24 @@ const TextField = forwardRef(({
31302
31388
  element?.removeEventListener("wheel", handleWheel);
31303
31389
  };
31304
31390
  }, [inputRef, type]);
31305
- const input = multiline ? /* @__PURE__ */ jsx(TextareaAutosize, { ...inputProps, ref: inputRef, placeholder: focused || hasValue || !label ? placeholder : void 0, autoFocus, rows, value: value ?? "", onChange, style: inputStyle, className: cls(invisible ? focusedInvisibleMixin : "", "rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-8", disabled && "outline-none opacity-50 text-surface-accent-600 dark:text-surface-accent-500", inputClassName) }) : /* @__PURE__ */ jsx("input", { ...inputProps, ref: inputRef, disabled, style: inputStyle, className: cls("w-full outline-none bg-transparent leading-normal px-3", "rounded-md", "focused:text-text-primary focused:dark:text-text-primary-dark", invisible ? focusedInvisibleMixin : "", disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, size === "small" ? "min-h-[32px]" : size === "medium" ? "min-h-[48px]" : "min-h-[64px]", 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 });
31391
+ const input = multiline ? /* @__PURE__ */ jsx(TextareaAutosize, { ...inputProps, ref: inputRef, placeholder: focused || hasValue || !label ? placeholder : void 0, autoFocus, minRows, maxRows, value: value ?? "", onChange, style: inputStyle, className: cls(invisible ? focusedInvisibleMixin : "", "rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-8", disabled && "outline-none opacity-50 text-surface-accent-600 dark:text-surface-accent-500", inputClassName) }) : /* @__PURE__ */ jsx("input", { ...inputProps, ref: inputRef, disabled, style: inputStyle, className: cls("w-full outline-none bg-transparent leading-normal px-3", "rounded-md", "focused:text-text-primary focused:dark:text-text-primary-dark", invisible ? focusedInvisibleMixin : "", disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, {
31392
+ "min-h-[28px]": size === "smallest",
31393
+ "min-h-[32px]": size === "small",
31394
+ "min-h-[42px]": size === "medium",
31395
+ "min-h-[64px]": size === "large"
31396
+ }, 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 });
31306
31397
  return /* @__PURE__ */ jsxs("div", { ref, className: cls("rounded-md relative max-w-full", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, error ? "border border-red-500 dark:border-red-600" : "", {
31307
- "min-h-[32px]": !invisible && size === "small",
31308
- "min-h-[48px]": !invisible && size === "medium",
31309
- "min-h-[64px]": !invisible && size === "large"
31398
+ "min-h-[28px]": size === "smallest",
31399
+ "min-h-[32px]": size === "small",
31400
+ "min-h-[42px]": size === "medium",
31401
+ "min-h-[64px]": size === "large"
31310
31402
  }, className), style, children: [
31311
31403
  label && /* @__PURE__ */ jsx(InputLabel, { className: cls("pointer-events-none absolute", size === "large" ? "top-1" : "top-[-1px]", !error ? focused ? "text-primary dark:text-primary" : "text-text-secondary dark:text-text-secondary-dark" : "text-red-500 dark:text-red-600", disabled ? "opacity-50" : ""), shrink: hasValue || focused, children: label }),
31312
31404
  input,
31313
31405
  endAdornment && /* @__PURE__ */ jsx("div", { className: cls("flex flex-row justify-center items-center absolute h-full right-0 top-0", {
31314
31406
  "mr-4": size === "large",
31315
31407
  "mr-3": size === "medium",
31316
- "mr-2": size === "small"
31408
+ "mr-2": size === "small" || size === "smallest"
31317
31409
  }), children: endAdornment })
31318
31410
  ] });
31319
31411
  });