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

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.
@@ -6,6 +6,7 @@ export interface AlertProps {
6
6
  size?: "small" | "medium" | "large";
7
7
  action?: React.ReactNode;
8
8
  className?: string;
9
+ outerClassName?: string;
9
10
  style?: React.CSSProperties;
10
11
  }
11
12
  export declare const Alert: React.FC<AlertProps>;
@@ -15,6 +15,10 @@ export type DialogProps = {
15
15
  onEscapeKeyDown?: (e: KeyboardEvent) => void;
16
16
  onPointerDownOutside?: (e: Event) => void;
17
17
  onInteractOutside?: (e: Event) => void;
18
+ /**
19
+ * If `true`, the dialog will not focus the first focusable element when opened.
20
+ */
21
+ disableInitialFocus?: boolean;
18
22
  };
19
23
  declare const widthClasses: {
20
24
  xs: string;
@@ -30,5 +34,5 @@ declare const widthClasses: {
30
34
  "7xl": string;
31
35
  full: string;
32
36
  };
33
- export declare const Dialog: ({ open, onOpenChange, children, className, containerClassName, fullWidth, fullHeight, fullScreen, scrollable, maxWidth, modal, onOpenAutoFocus, onEscapeKeyDown, onPointerDownOutside, onInteractOutside }: DialogProps) => import("react/jsx-runtime").JSX.Element;
37
+ export declare const Dialog: ({ open, onOpenChange, children, className, containerClassName, fullWidth, fullHeight, fullScreen, scrollable, maxWidth, modal, onOpenAutoFocus, onEscapeKeyDown, onPointerDownOutside, onInteractOutside, disableInitialFocus }: DialogProps) => import("react/jsx-runtime").JSX.Element;
34
38
  export {};
@@ -9,6 +9,7 @@ export type SelectProps<T extends SelectValue = string> = {
9
9
  value?: T;
10
10
  className?: string;
11
11
  inputClassName?: string;
12
+ viewportClassName?: string;
12
13
  onChange?: React.EventHandler<ChangeEvent<HTMLSelectElement>>;
13
14
  onValueChange?: (updatedValue: T) => void;
14
15
  placeholder?: React.ReactNode;
package/dist/index.es.js CHANGED
@@ -34,8 +34,8 @@ const fieldBackgroundDisabledMixin = "dark:bg-surface-800 bg-opacity-50 dark:bg-
34
34
  const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-surface-700 dark:hover:bg-opacity-40";
35
35
  const defaultBorderMixin = "border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40";
36
36
  const paperMixin = "bg-white rounded-md dark:bg-surface-950 border border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40";
37
- const cardMixin = "bg-white border border-surface-200 border-opacity-40 dark:border-transparent rounded-md dark:bg-surface-950 dark:border-surface-700 dark:border-opacity-40 m-1 -p-1";
38
- const cardClickableMixin = "hover:bg-primary-bg dark:hover:bg-primary-bg hover:bg-opacity-20 dark:hover:bg-opacity-20 hover:ring-2 hover:ring-primary cursor-pointer";
37
+ const cardMixin = "bg-white border border-surface-200 border-opacity-40 dark:border-transparent rounded-md dark:bg-surface-950 dark:border-surface-700 dark:border-opacity-40";
38
+ const cardClickableMixin = "hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800 hover:ring-2 hover:ring-primary cursor-pointer";
39
39
  const cardSelectedMixin = "bg-primary-bg dark:bg-primary-bg bg-opacity-30 dark:bg-opacity-10 ring-1 ring-primary ring-opacity-75";
40
40
  function cls(...classes) {
41
41
  return twMerge(clsx(classes));
@@ -563,13 +563,14 @@ const getColorClasses = (severity) => {
563
563
  }
564
564
  };
565
565
  const Alert = (t0) => {
566
- const $ = c(16);
566
+ const $ = c(19);
567
567
  const {
568
568
  children,
569
569
  onDismiss,
570
570
  color: t1,
571
571
  size: t2,
572
572
  action,
573
+ outerClassName,
573
574
  className,
574
575
  style
575
576
  } = t0;
@@ -577,12 +578,12 @@ const Alert = (t0) => {
577
578
  const size = t2 === void 0 ? "medium" : t2;
578
579
  let t3;
579
580
  let t4;
580
- if ($[0] !== className || $[1] !== color || $[2] !== size || $[3] !== style) {
581
+ if ($[0] !== color || $[1] !== outerClassName || $[2] !== size || $[3] !== style) {
581
582
  const classes = getColorClasses(color);
582
583
  t3 = style;
583
- t4 = cls(getSizeClasses(size), "w-full", "font-medium", "rounded-md flex items-center gap-2", classes, className);
584
- $[0] = className;
585
- $[1] = color;
584
+ t4 = cls(getSizeClasses(size), "w-full", "font-medium", "rounded-md flex items-center gap-2", classes, outerClassName);
585
+ $[0] = color;
586
+ $[1] = outerClassName;
586
587
  $[2] = size;
587
588
  $[3] = style;
588
589
  $[4] = t3;
@@ -592,38 +593,47 @@ const Alert = (t0) => {
592
593
  t4 = $[5];
593
594
  }
594
595
  let t5;
595
- if ($[6] !== children) {
596
- t5 = /* @__PURE__ */ jsx("div", { className: "flex-grow", children });
597
- $[6] = children;
596
+ if ($[6] !== className) {
597
+ t5 = cls("flex-grow", className);
598
+ $[6] = className;
598
599
  $[7] = t5;
599
600
  } else {
600
601
  t5 = $[7];
601
602
  }
602
603
  let t6;
603
- if ($[8] !== onDismiss) {
604
- t6 = onDismiss && /* @__PURE__ */ jsx("button", { className: "text-surface-accent-400 hover:text-surface-accent-600 dark:text-surface-accent-500 dark:hover:text-surface-accent-400", onClick: onDismiss, children: "×" });
605
- $[8] = onDismiss;
606
- $[9] = t6;
604
+ if ($[8] !== children || $[9] !== t5) {
605
+ t6 = /* @__PURE__ */ jsx("div", { className: t5, children });
606
+ $[8] = children;
607
+ $[9] = t5;
608
+ $[10] = t6;
607
609
  } else {
608
- t6 = $[9];
610
+ t6 = $[10];
609
611
  }
610
612
  let t7;
611
- if ($[10] !== action || $[11] !== t3 || $[12] !== t4 || $[13] !== t5 || $[14] !== t6) {
612
- t7 = /* @__PURE__ */ jsxs("div", { style: t3, className: t4, children: [
613
- t5,
613
+ if ($[11] !== onDismiss) {
614
+ t7 = onDismiss && /* @__PURE__ */ jsx("button", { className: "text-surface-accent-400 hover:text-surface-accent-600 dark:text-surface-accent-500 dark:hover:text-surface-accent-400", onClick: onDismiss, children: "×" });
615
+ $[11] = onDismiss;
616
+ $[12] = t7;
617
+ } else {
618
+ t7 = $[12];
619
+ }
620
+ let t8;
621
+ if ($[13] !== action || $[14] !== t3 || $[15] !== t4 || $[16] !== t6 || $[17] !== t7) {
622
+ t8 = /* @__PURE__ */ jsxs("div", { style: t3, className: t4, children: [
614
623
  t6,
624
+ t7,
615
625
  action
616
626
  ] });
617
- $[10] = action;
618
- $[11] = t3;
619
- $[12] = t4;
620
- $[13] = t5;
621
- $[14] = t6;
622
- $[15] = t7;
627
+ $[13] = action;
628
+ $[14] = t3;
629
+ $[15] = t4;
630
+ $[16] = t6;
631
+ $[17] = t7;
632
+ $[18] = t8;
623
633
  } else {
624
- t7 = $[15];
634
+ t8 = $[18];
625
635
  }
626
- return t7;
636
+ return t8;
627
637
  };
628
638
  const AvatarInner = (t0, ref) => {
629
639
  const $ = c(25);
@@ -732,18 +742,22 @@ const BooleanSwitch = React__default.forwardRef(function BooleanSwitch2({
732
742
  } else {
733
743
  onValueChange?.(!value);
734
744
  }
735
- }, className: cls(size === "small" ? "w-[38px] h-[22px] min-w-[38px] min-h-[22px]" : "w-[42px] h-[26px] min-w-[42px] min-h-[26px]", "outline-none rounded-full relative shadow-sm", value ? disabled ? "bg-white bg-opacity-54 dark:bg-surface-accent-950 border-surface-accent-100 dark:border-surface-accent-700 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700" : "ring-secondary ring-1 bg-secondary dark:bg-secondary" : "bg-white bg-opacity-54 dark:bg-surface-accent-900 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700", className), ...props, children: [
745
+ }, className: cls(size === "smallest" ? "w-[34px] h-[18px] min-w-[34px] min-h-[18px]" : size === "small" ? "w-[38px] h-[22px] min-w-[38px] min-h-[22px]" : "w-[42px] h-[26px] min-w-[42px] min-h-[26px]", "outline-none rounded-full relative shadow-sm", value ? disabled ? "bg-white bg-opacity-54 dark:bg-surface-accent-950 border-surface-accent-100 dark:border-surface-accent-700 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700" : "ring-secondary ring-1 bg-secondary dark:bg-secondary" : "bg-white bg-opacity-54 dark:bg-surface-accent-900 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700", className), ...props, children: [
736
746
  allowIndeterminate && (value === null || value === void 0) && /* @__PURE__ */ jsx("div", { className: cls("block rounded-full transition-transform duration-100 transform will-change-auto", disabled ? "bg-surface-accent-400 dark:bg-surface-accent-600" : "bg-surface-accent-400 dark:bg-surface-accent-600", {
737
747
  "w-[21px] h-[10px]": size === "medium" || size === "large",
738
748
  "w-[19px] h-[8px]": size === "small",
749
+ "w-[16px] h-[6px]": size === "smallest",
739
750
  "translate-x-[10px]": size === "medium" || size === "large",
740
- "translate-x-[9px]": size === "small"
751
+ "translate-x-[9px]": size === "small",
752
+ "translate-x-[8px]": size === "smallest"
741
753
  }) }, "knob"),
742
754
  !(allowIndeterminate && (value === null || value === void 0)) && /* @__PURE__ */ jsx("div", { className: cls("block rounded-full transition-transform duration-100 transform will-change-auto", disabled ? "bg-surface-accent-300 dark:bg-surface-accent-700" : value ? "bg-white" : "bg-surface-accent-600 dark:bg-surface-accent-400", {
743
755
  "w-[21px] h-[21px]": size === "medium" || size === "large",
744
756
  "w-[19px] h-[19px]": size === "small",
757
+ "w-[16px] h-[16px]": size === "smallest",
745
758
  [value ? "translate-x-[19px]" : "translate-x-[3px]"]: size === "medium" || size === "large",
746
- [value ? "translate-x-[17px]" : "translate-x-[2px]"]: size === "small"
759
+ [value ? "translate-x-[17px]" : "translate-x-[2px]"]: size === "small",
760
+ [value ? "translate-x-[16px]" : "translate-x-[1px]"]: size === "smallest"
747
761
  }) }, "knob")
748
762
  ] });
749
763
  });
@@ -775,7 +789,7 @@ const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
775
789
  "min-h-[32px]": size === "small",
776
790
  "min-h-[42px]": size === "medium",
777
791
  "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) => {
792
+ }, size === "small" || size === "smallest" ? "pl-2" : "pl-4", size === "small" || size === "smallest" ? "pr-4" : "pr-6", position === "end" ? "flex-row-reverse" : "flex-row", fullWidth ? "w-full" : "", className), onClick: disabled ? void 0 : (e) => {
779
793
  if (props.allowIndeterminate) {
780
794
  if (value === null || value === void 0) onValueChange?.(true);
781
795
  else if (value) onValueChange?.(false);
@@ -785,11 +799,11 @@ const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
785
799
  }
786
800
  }, children: [
787
801
  /* @__PURE__ */ jsx(BooleanSwitch, { value, ref: refInput, size, className: cls(invisible && focus ? focusedClasses : "", inputClassName), disabled, ...props }),
788
- /* @__PURE__ */ jsx("div", { className: cls("flex-grow", position === "end" ? "mr-4" : "ml-4", size === "small" ? "text-sm" : "text-base"), children: label })
802
+ /* @__PURE__ */ jsx("div", { className: cls("flex-grow", position === "end" ? "mr-4" : "ml-4", size === "small" || size === "smallest" ? "text-sm" : "text-base"), children: label })
789
803
  ] });
790
804
  };
791
805
  const ButtonInner = React__default.forwardRef((t0, ref) => {
792
- const $ = c(53);
806
+ const $ = c(55);
793
807
  let Component;
794
808
  let children;
795
809
  let className;
@@ -841,7 +855,7 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
841
855
  const size = t3 === void 0 ? "medium" : t3;
842
856
  const startIcon = t4 === void 0 ? null : t4;
843
857
  const fullWidth = t5 === void 0 ? false : t5;
844
- const color = t6 === void 0 ? "primary" : t6;
858
+ const color = t6 === void 0 ? "neutral" : t6;
845
859
  const t7 = !fullWidth;
846
860
  const t8 = variant === "filled" && color === "primary" && !disabled;
847
861
  const t9 = variant === "filled" && color === "secondary" && !disabled;
@@ -876,7 +890,7 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
876
890
  "border border-secondary bg-secondary focus:ring-secondary shadow hover:ring-1 hover:ring-secondary text-white hover:text-white": t9,
877
891
  "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,
878
892
  "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,
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,
893
+ "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 hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": t12,
880
894
  "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
895
  "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
896
  "border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": t15,
@@ -886,7 +900,7 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
886
900
  "border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t19,
887
901
  "border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t20,
888
902
  "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,
903
+ "border border-surface-300 text-text-primary hover:bg-surface-accent-200 dark:border-surface-600 dark:text-text-primary-dark dark:hover:bg-surface-accent-700": t22,
890
904
  "text-text-disabled dark:text-text-disabled-dark": disabled,
891
905
  "border border-transparent opacity-50": t23,
892
906
  "border border-surface-500 opacity-50": t24,
@@ -956,22 +970,24 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
956
970
  }
957
971
  const t31 = props;
958
972
  let t32;
959
- if ($[44] !== children || $[45] !== disabled || $[46] !== startIcon || $[47] !== t26 || $[48] !== t27 || $[49] !== t28 || $[50] !== t29 || $[51] !== t31) {
960
- t32 = /* @__PURE__ */ jsxs("button", { ref: t26, type: t27, onClick: t28, className: t29, disabled, ...t31, children: [
973
+ if ($[44] !== children || $[45] !== disabled || $[46] !== size || $[47] !== startIcon || $[48] !== t26 || $[49] !== t27 || $[50] !== t28 || $[51] !== t29 || $[52] !== t31 || $[53] !== variant) {
974
+ t32 = /* @__PURE__ */ jsxs("button", { ref: t26, type: t27, onClick: t28, className: t29, disabled, "data-variant": variant, "data-size": size, ...t31, children: [
961
975
  startIcon,
962
976
  children
963
977
  ] });
964
978
  $[44] = children;
965
979
  $[45] = disabled;
966
- $[46] = startIcon;
967
- $[47] = t26;
968
- $[48] = t27;
969
- $[49] = t28;
970
- $[50] = t29;
971
- $[51] = t31;
972
- $[52] = t32;
973
- } else {
974
- t32 = $[52];
980
+ $[46] = size;
981
+ $[47] = startIcon;
982
+ $[48] = t26;
983
+ $[49] = t27;
984
+ $[50] = t28;
985
+ $[51] = t29;
986
+ $[52] = t31;
987
+ $[53] = variant;
988
+ $[54] = t32;
989
+ } else {
990
+ t32 = $[54];
975
991
  }
976
992
  return t32;
977
993
  });
@@ -27995,7 +28011,7 @@ const widthClasses = {
27995
28011
  full: "max-w-full min-w-full w-full"
27996
28012
  };
27997
28013
  const Dialog = (t0) => {
27998
- const $ = c(39);
28014
+ const $ = c(42);
27999
28015
  const {
28000
28016
  open,
28001
28017
  onOpenChange,
@@ -28011,17 +28027,19 @@ const Dialog = (t0) => {
28011
28027
  onOpenAutoFocus,
28012
28028
  onEscapeKeyDown,
28013
28029
  onPointerDownOutside,
28014
- onInteractOutside
28030
+ onInteractOutside,
28031
+ disableInitialFocus: t5
28015
28032
  } = t0;
28016
28033
  const fullWidth = t1 === void 0 ? true : t1;
28017
28034
  const scrollable = t2 === void 0 ? true : t2;
28018
28035
  const maxWidth = t3 === void 0 ? "lg" : t3;
28019
28036
  const modal = t4 === void 0 ? true : t4;
28037
+ const disableInitialFocus = t5 === void 0 ? true : t5;
28020
28038
  const [displayed, setDisplayed] = useState(false);
28021
- let t5;
28022
28039
  let t6;
28040
+ let t7;
28023
28041
  if ($[0] !== open) {
28024
- t5 = () => {
28042
+ t6 = () => {
28025
28043
  if (!open) {
28026
28044
  const timeout = setTimeout(() => {
28027
28045
  setDisplayed(false);
@@ -28032,126 +28050,140 @@ const Dialog = (t0) => {
28032
28050
  return _temp$2;
28033
28051
  }
28034
28052
  };
28035
- t6 = [open];
28053
+ t7 = [open];
28036
28054
  $[0] = open;
28037
- $[1] = t5;
28038
- $[2] = t6;
28055
+ $[1] = t6;
28056
+ $[2] = t7;
28039
28057
  } else {
28040
- t5 = $[1];
28041
- t6 = $[2];
28058
+ t6 = $[1];
28059
+ t7 = $[2];
28042
28060
  }
28043
- useEffect(t5, t6);
28044
- const t7 = displayed || open;
28045
- let t8;
28061
+ useEffect(t6, t7);
28062
+ const t8 = displayed || open;
28063
+ let t9;
28046
28064
  if ($[3] !== containerClassName) {
28047
- t8 = cls("fixed inset-0 z-30", containerClassName);
28065
+ t9 = cls("fixed inset-0 z-30", containerClassName);
28048
28066
  $[3] = containerClassName;
28049
- $[4] = t8;
28067
+ $[4] = t9;
28050
28068
  } else {
28051
- t8 = $[4];
28069
+ t9 = $[4];
28052
28070
  }
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;
28071
+ const t10 = displayed && open ? "opacity-100" : "opacity-0";
28072
+ let t11;
28073
+ if ($[5] !== t10) {
28074
+ t11 = 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 ", t10, "z-20 fixed top-0 left-0 w-full h-full flex justify-center items-center");
28075
+ $[5] = t10;
28076
+ $[6] = t11;
28059
28077
  } else {
28060
- t10 = $[6];
28078
+ t11 = $[6];
28061
28079
  }
28062
- const t11 = displayed ? "auto" : "none";
28063
- let t12;
28064
- if ($[7] !== t11) {
28065
- t12 = {
28066
- pointerEvents: t11
28080
+ const t12 = displayed ? "auto" : "none";
28081
+ let t13;
28082
+ if ($[7] !== t12) {
28083
+ t13 = {
28084
+ pointerEvents: t12
28067
28085
  };
28068
- $[7] = t11;
28069
- $[8] = t12;
28086
+ $[7] = t12;
28087
+ $[8] = t13;
28070
28088
  } else {
28071
- t12 = $[8];
28089
+ t13 = $[8];
28072
28090
  }
28073
- let t13;
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;
28091
+ let t14;
28092
+ if ($[9] !== t11 || $[10] !== t13) {
28093
+ t14 = /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: t11, style: t13 });
28094
+ $[9] = t11;
28095
+ $[10] = t13;
28096
+ $[11] = t14;
28079
28097
  } else {
28080
- t13 = $[11];
28098
+ t14 = $[11];
28081
28099
  }
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");
28085
- $[12] = t14;
28086
- } else {
28087
- t14 = $[12];
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;
28095
- let 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;
28100
+ let t15;
28101
+ if ($[12] !== disableInitialFocus || $[13] !== onOpenAutoFocus) {
28102
+ t15 = (e) => {
28103
+ if (disableInitialFocus) {
28104
+ e.preventDefault();
28105
+ }
28106
+ onOpenAutoFocus?.(e);
28107
+ };
28108
+ $[12] = disableInitialFocus;
28109
+ $[13] = onOpenAutoFocus;
28099
28110
  $[14] = t15;
28100
- $[15] = t16;
28101
- $[16] = t17;
28102
- $[17] = t18;
28103
- $[18] = t19;
28104
- $[19] = t20;
28105
- $[20] = t21;
28106
28111
  } else {
28107
- t21 = $[20];
28112
+ t15 = $[14];
28108
28113
  }
28109
- let t22;
28110
- if ($[21] !== children || $[22] !== t21) {
28111
- t22 = /* @__PURE__ */ jsx("div", { className: t21, children });
28112
- $[21] = children;
28113
- $[22] = t21;
28114
- $[23] = t22;
28114
+ let t16;
28115
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
28116
+ t16 = cls("h-full outline-none flex justify-center items-center z-40 opacity-100 transition-all duration-200 ease-in-out");
28117
+ $[15] = t16;
28115
28118
  } else {
28116
- t22 = $[23];
28119
+ t16 = $[15];
28117
28120
  }
28121
+ const t17 = fullWidth && !fullScreen ? "w-11/12" : void 0;
28122
+ const t18 = fullHeight && !fullScreen ? "h-full" : void 0;
28123
+ const t19 = fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-xl";
28124
+ const t20 = scrollable && "overflow-y-auto";
28125
+ const t21 = displayed && open ? "opacity-100" : "opacity-0";
28126
+ const t22 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
28118
28127
  let 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;
28127
- } else {
28128
- t23 = $[29];
28128
+ if ($[16] !== className || $[17] !== t17 || $[18] !== t18 || $[19] !== t19 || $[20] !== t20 || $[21] !== t21 || $[22] !== t22) {
28129
+ t23 = cls(paperMixin, "z-30", "relative", "outline-none focus:outline-none", t17, t18, "text-surface-accent-900 dark:text-white", "justify-center items-center", t19, "ease-in-out duration-200", t20, t21, t22, className);
28130
+ $[16] = className;
28131
+ $[17] = t17;
28132
+ $[18] = t18;
28133
+ $[19] = t19;
28134
+ $[20] = t20;
28135
+ $[21] = t21;
28136
+ $[22] = t22;
28137
+ $[23] = t23;
28138
+ } else {
28139
+ t23 = $[23];
28129
28140
  }
28130
28141
  let 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;
28142
+ if ($[24] !== children || $[25] !== t23) {
28143
+ t24 = /* @__PURE__ */ jsx("div", { className: t23, children });
28144
+ $[24] = children;
28145
+ $[25] = t23;
28146
+ $[26] = t24;
28140
28147
  } else {
28141
- t24 = $[33];
28148
+ t24 = $[26];
28142
28149
  }
28143
28150
  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
+ if ($[27] !== onEscapeKeyDown || $[28] !== onInteractOutside || $[29] !== onPointerDownOutside || $[30] !== t15 || $[31] !== t24) {
28152
+ t25 = /* @__PURE__ */ jsx(DialogPrimitive.Content, { onEscapeKeyDown, onOpenAutoFocus: t15, onPointerDownOutside, onInteractOutside, className: t16, children: t24 });
28153
+ $[27] = onEscapeKeyDown;
28154
+ $[28] = onInteractOutside;
28155
+ $[29] = onPointerDownOutside;
28156
+ $[30] = t15;
28157
+ $[31] = t24;
28158
+ $[32] = t25;
28151
28159
  } else {
28152
- t25 = $[38];
28160
+ t25 = $[32];
28153
28161
  }
28154
- return t25;
28162
+ let t26;
28163
+ if ($[33] !== t14 || $[34] !== t25 || $[35] !== t9) {
28164
+ t26 = /* @__PURE__ */ jsx(DialogPrimitive.Portal, { children: /* @__PURE__ */ jsxs("div", { className: t9, children: [
28165
+ t14,
28166
+ t25
28167
+ ] }) });
28168
+ $[33] = t14;
28169
+ $[34] = t25;
28170
+ $[35] = t9;
28171
+ $[36] = t26;
28172
+ } else {
28173
+ t26 = $[36];
28174
+ }
28175
+ let t27;
28176
+ if ($[37] !== modal || $[38] !== onOpenChange || $[39] !== t26 || $[40] !== t8) {
28177
+ t27 = /* @__PURE__ */ jsx(DialogPrimitive.Root, { open: t8, modal, onOpenChange, children: t26 });
28178
+ $[37] = modal;
28179
+ $[38] = onOpenChange;
28180
+ $[39] = t26;
28181
+ $[40] = t8;
28182
+ $[41] = t27;
28183
+ } else {
28184
+ t27 = $[41];
28185
+ }
28186
+ return t27;
28155
28187
  };
28156
28188
  function _temp$2() {
28157
28189
  }
@@ -28721,7 +28753,7 @@ const Label = React.forwardRef((t0, ref) => {
28721
28753
  });
28722
28754
  Label.displayName = LabelPrimitive.Root.displayName;
28723
28755
  function LoadingButton(t0) {
28724
- const $ = c(18);
28756
+ const $ = c(17);
28725
28757
  let children;
28726
28758
  let disabled;
28727
28759
  let loading;
@@ -28755,32 +28787,31 @@ function LoadingButton(t0) {
28755
28787
  const t1 = loading || disabled;
28756
28788
  const t2 = props.component;
28757
28789
  let t3;
28758
- if ($[7] !== loading || $[8] !== props.size) {
28759
- t3 = loading && /* @__PURE__ */ jsx(CircularProgress, { size: props.size === "small" ? "smallest" : "small" });
28790
+ if ($[7] !== loading) {
28791
+ t3 = loading && /* @__PURE__ */ jsx(CircularProgress, { size: "smallest" });
28760
28792
  $[7] = loading;
28761
- $[8] = props.size;
28762
- $[9] = t3;
28793
+ $[8] = t3;
28763
28794
  } else {
28764
- t3 = $[9];
28795
+ t3 = $[8];
28765
28796
  }
28766
28797
  const t4 = !loading && startIcon;
28767
28798
  let t5;
28768
- if ($[10] !== children || $[11] !== onClick || $[12] !== props || $[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4) {
28799
+ if ($[9] !== children || $[10] !== onClick || $[11] !== props || $[12] !== t1 || $[13] !== t2 || $[14] !== t3 || $[15] !== t4) {
28769
28800
  t5 = /* @__PURE__ */ jsxs(Button, { disabled: t1, onClick, component: t2, ...props, children: [
28770
28801
  t3,
28771
28802
  t4,
28772
28803
  children
28773
28804
  ] });
28774
- $[10] = children;
28775
- $[11] = onClick;
28776
- $[12] = props;
28777
- $[13] = t1;
28778
- $[14] = t2;
28779
- $[15] = t3;
28780
- $[16] = t4;
28781
- $[17] = t5;
28805
+ $[9] = children;
28806
+ $[10] = onClick;
28807
+ $[11] = props;
28808
+ $[12] = t1;
28809
+ $[13] = t2;
28810
+ $[14] = t3;
28811
+ $[15] = t4;
28812
+ $[16] = t5;
28782
28813
  } else {
28783
- t5 = $[17];
28814
+ t5 = $[16];
28784
28815
  }
28785
28816
  return t5;
28786
28817
  }
@@ -30540,6 +30571,7 @@ const Select = forwardRef(({
30540
30571
  onValueChange,
30541
30572
  className,
30542
30573
  inputClassName,
30574
+ viewportClassName,
30543
30575
  placeholder,
30544
30576
  renderValue,
30545
30577
  label,
@@ -30634,7 +30666,7 @@ const Select = forwardRef(({
30634
30666
  e_0.stopPropagation();
30635
30667
  }, children: endAdornment })
30636
30668
  ] }),
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: {
30669
+ /* @__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: cls("p-1", viewportClassName), style: {
30638
30670
  maxHeight: "var(--radix-select-content-available-height)"
30639
30671
  }, children }) }) })
30640
30672
  ] });