@firecms/ui 3.0.0-rc.4 → 3.0.0-tw4.2

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
@@ -26,17 +26,17 @@ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
26
26
  import * as ReactDOM from "react-dom";
27
27
  import * as TabsPrimitive from "@radix-ui/react-tabs";
28
28
  const focusedDisabled = "focus-visible:ring-0 focus-visible:ring-offset-0";
29
- const focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-surface-accent-100 focus:dark:bg-surface-800 focus:dark:bg-opacity-60";
30
- const focusedClasses = "z-30 outline-none ring-2 ring-primary ring-opacity-75 ring-offset-2 ring-offset-transparent ";
31
- const fieldBackgroundMixin = "bg-opacity-50 bg-surface-accent-200 dark:bg-surface-800 dark:bg-opacity-60";
32
- const fieldBackgroundInvisibleMixin = "bg-opacity-0 bg-surface-accent-100 dark:bg-surface-800 dark:bg-opacity-0";
33
- const fieldBackgroundDisabledMixin = "dark:bg-surface-800 bg-opacity-50 dark:bg-opacity-90";
34
- const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-surface-700 dark:hover:bg-opacity-40";
35
- const defaultBorderMixin = "border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40";
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";
38
- const cardClickableMixin = "hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800 hover:ring-2 hover:ring-primary cursor-pointer";
39
- const cardSelectedMixin = "bg-primary-bg dark:bg-primary-bg bg-opacity-30 dark:bg-opacity-10 ring-1 ring-primary ring-opacity-75";
29
+ const focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-surface-accent-100 focus:dark:bg-surface-800 focus:dark:bg-opacity-60 focus:bg-surface-accent-100/70 dark:focus:bg-surface-800/60";
30
+ const focusedClasses = "z-30 outline-hidden outline-none ring-2 ring-primary ring-opacity-75 ring-primary/75 ring-offset-2 ring-offset-transparent ";
31
+ const fieldBackgroundMixin = "bg-opacity-50 bg-surface-accent-200 bg-surface-accent-200/50 dark:bg-surface-800 dark:bg-opacity-60 dark:bg-surface-800/60";
32
+ const fieldBackgroundInvisibleMixin = "bg-opacity-0 bg-surface-accent-100 dark:bg-surface-800 dark:bg-opacity-0 bg-surface-accent-200/0 dark:bg-surface-800/0";
33
+ const fieldBackgroundDisabledMixin = "dark:bg-surface-800 bg-opacity-50 dark:bg-opacity-90 bg-surface-accent-200/50 dark:bg-surface-800/90";
34
+ const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-surface-700 dark:hover:bg-opacity-40 hover:bg-surface-accent-200/70 hover:dark:bg-surface-700/40";
35
+ const defaultBorderMixin = "border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40 border-surface-200/40 dark:border-surface-700/40 ";
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 border-surface-200/40 dark:border-surface-700/40";
37
+ const cardMixin = "bg-white dark:bg-surface-950 rounded-md border border-surface-200/40 dark:border-surface-700/40 m-1 -p-1";
38
+ const cardClickableMixin = "hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800 hover:ring-2 hover:ring-primary cursor-pointer hover:bg-primary/20 dark:hover:bg-primary/10 ";
39
+ const cardSelectedMixin = "bg-primary-bg dark:bg-primary-bg bg-opacity-30 bg-primary-bg/30 dark:bg-opacity-10 dark:bg-primary-bg/10 ring-1 ring-primary ring-opacity-75 ring-primary/75 bg-primary/10 dark:bg-primary/10 ring-1 ring-primary/75";
40
40
  function cls(...classes) {
41
41
  return twMerge(clsx(classes));
42
42
  }
@@ -742,7 +742,7 @@ const BooleanSwitch = React__default.forwardRef(function BooleanSwitch2({
742
742
  } else {
743
743
  onValueChange?.(!value);
744
744
  }
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: [
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 outline-hidden rounded-full relative shadow-sm", value ? disabled ? "bg-white bg-opacity-54 bg-white/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 bg-white/54 dark:bg-surface-accent-900 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700", className), ...props, children: [
746
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", {
747
747
  "w-[21px] h-[10px]": size === "medium" || size === "large",
748
748
  "w-[19px] h-[8px]": size === "small",
@@ -891,12 +891,12 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
891
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,
892
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,
893
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,
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,
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,
896
- "border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": t15,
894
+ "border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800": t13,
895
+ "border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800": t14,
896
+ "border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10 hover:bg-red-500/10": t15,
897
897
  "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,
898
898
  "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,
899
- "border border-primary text-primary hover:text-primary hover:bg-primary-bg": t18,
899
+ "border border-primary text-primary hover:text-primary hover:bg-primary-bg hover:bg-primary/10": t18,
900
900
  "border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t19,
901
901
  "border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t20,
902
902
  "border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:bg-surface-accent-200": t21,
@@ -904,7 +904,7 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
904
904
  "text-text-disabled dark:text-text-disabled-dark": disabled,
905
905
  "border border-transparent opacity-50": t23,
906
906
  "border border-surface-500 opacity-50": t24,
907
- "border border-transparent bg-surface-300 dark:bg-surface-500 opacity-40": t25
907
+ "border border-transparent bg-surface-300 dark:bg-surface-500 opacity-40 bg-surface-300/40 dark:bg-surface-500/40": t25
908
908
  });
909
909
  const sizeClasses2 = cls({
910
910
  "py-1 px-2": size === "small",
@@ -27265,7 +27265,7 @@ const Checkbox = (t0) => {
27265
27265
  const t6 = disabled ? void 0 : onCheckedChange;
27266
27266
  const t7 = padding ? paddingClasses[size] : "";
27267
27267
  const t8 = outerSizeClasses[size];
27268
- const t9 = onCheckedChange ? "rounded-full hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-700 dark:hover:bg-opacity-75" : "";
27268
+ const t9 = onCheckedChange ? "rounded-full hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-700 dark:hover:bg-opacity-75 dark:hover:bg-surface-accent-700/75" : "";
27269
27269
  const t10 = onCheckedChange ? "cursor-pointer" : "cursor-default";
27270
27270
  let t11;
27271
27271
  if ($[0] !== t10 || $[1] !== t7 || $[2] !== t8 || $[3] !== t9) {
@@ -27411,7 +27411,7 @@ function Chip(t0) {
27411
27411
  }
27412
27412
  return t11;
27413
27413
  }
27414
- const buttonClasses = "hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800 hover:scale-105 transition-transform";
27414
+ const buttonClasses = "hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800 hover:scale-105 transition-transform";
27415
27415
  const baseClasses = "inline-flex items-center justify-center p-2 text-sm font-medium focus:outline-none transition-colors ease-in-out duration-150";
27416
27416
  const colorClasses$1 = "text-surface-accent-600 visited:text-surface-accent-600 dark:text-surface-accent-300 dark:visited:text-surface-300";
27417
27417
  const sizeClasses = {
@@ -27471,7 +27471,7 @@ const IconButtonInner = (t0, ref) => {
27471
27471
  const size = t1 === void 0 ? "medium" : t1;
27472
27472
  const variant = t2 === void 0 ? "ghost" : t2;
27473
27473
  const shape = t3 === void 0 ? "circular" : t3;
27474
- const bgClasses = variant === "ghost" ? "bg-transparent" : "bg-surface-accent-200 bg-opacity-50 dark:bg-surface-950 dark:bg-opacity-50";
27474
+ const bgClasses = variant === "ghost" ? "bg-transparent" : "bg-surface-accent-200 bg-opacity-50 bg-surface-accent-200/50 dark:bg-surface-950 dark:bg-opacity-50 dark:bg-surface-950/50";
27475
27475
  const Component = component || "button";
27476
27476
  const t4 = disabled ? "opacity-50 pointer-events-none" : "cursor-pointer";
27477
27477
  const t5 = toggled ? "outline outline-2 outline-primary" : "";
@@ -27479,7 +27479,7 @@ const IconButtonInner = (t0, ref) => {
27479
27479
  const t7 = sizeClasses[size];
27480
27480
  let t8;
27481
27481
  if ($[10] !== bgClasses || $[11] !== className || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== t7) {
27482
- t8 = cls(t4, t5, colorClasses$1, bgClasses, baseClasses, buttonClasses, t6, t7, className);
27482
+ t8 = cls(t4, t5, "text-inherit dark:text-inherit", colorClasses$1, bgClasses, baseClasses, buttonClasses, t6, t7, className);
27483
27483
  $[10] = bgClasses;
27484
27484
  $[11] = className;
27485
27485
  $[12] = t4;
@@ -27849,18 +27849,18 @@ const inputStyles = `
27849
27849
  }
27850
27850
  `;
27851
27851
  const widthClasses = {
27852
- xs: "max-w-xs min-w-xs w-xs",
27853
- sm: "max-w-sm min-w-sm w-sm",
27854
- md: "max-w-md min-w-md w-md",
27855
- lg: "max-w-lg min-w-lg w-lg",
27856
- xl: "max-w-xl min-w-xl w-xl",
27857
- "2xl": "max-w-2xl min-w-2xl w-2xl",
27858
- "3xl": "max-w-3xl min-w-3xl w-3xl",
27859
- "4xl": "max-w-4xl min-w-4xl w-4xl",
27860
- "5xl": "max-w-5xl min-w-5xl w-5xl",
27861
- "6xl": "max-w-6xl min-w-6xl w-6xl",
27862
- "7xl": "max-w-7xl min-w-7xl w-7xl",
27863
- full: "max-w-full min-w-full w-full"
27852
+ xs: "max-w-xs w-xs",
27853
+ sm: "max-w-sm w-sm",
27854
+ md: "max-w-md w-md",
27855
+ lg: "max-w-lg w-lg",
27856
+ xl: "max-w-xl w-xl",
27857
+ "2xl": "max-w-2xl w-2xl",
27858
+ "3xl": "max-w-3xl w-3xl",
27859
+ "4xl": "max-w-4xl w-4xl",
27860
+ "5xl": "max-w-5xl w-5xl",
27861
+ "6xl": "max-w-6xl w-6xl",
27862
+ "7xl": "max-w-7xl w-7xl",
27863
+ full: "max-w-full w-full"
27864
27864
  };
27865
27865
  const Dialog = (t0) => {
27866
27866
  const $ = c(42);
@@ -27923,7 +27923,7 @@ const Dialog = (t0) => {
27923
27923
  const t10 = displayed && open ? "opacity-100" : "opacity-0";
27924
27924
  let t11;
27925
27925
  if ($[5] !== t10) {
27926
- 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");
27926
+ t11 = cls("fixed inset-0 transition-opacity z-20 ease-in-out duration-200 bg-black dark:bg-opacity-60 dark:bg-black/60 bg-opacity-50 bg-black/50 dark: bg-black/60 backdrop-blur-sm ", t10, "z-20 fixed top-0 left-0 w-full h-full flex justify-center items-center");
27927
27927
  $[5] = t10;
27928
27928
  $[6] = t11;
27929
27929
  } else {
@@ -28052,7 +28052,7 @@ function DialogActions(t0) {
28052
28052
  const t3 = translucent ? "backdrop-blur-sm" : "";
28053
28053
  let t4;
28054
28054
  if ($[0] !== className || $[1] !== position || $[2] !== t3) {
28055
- t4 = cls(defaultBorderMixin, "pt-2 pb-4 px-4 border-t flex flex-row items-center justify-end bottom-0 right-0 left-0 text-right z-2 gap-2", position, "bg-white bg-opacity-60 dark:bg-surface-900 dark:bg-opacity-60", t3, className);
28055
+ t4 = cls(defaultBorderMixin, "pt-2 pb-4 px-4 border-t flex flex-row items-center justify-end bottom-0 right-0 left-0 text-right z-2 gap-2", position, "bg-white bg-opacity-60 bg-white/60 dark:bg-surface-900 dark:bg-opacity-60 dark:bg-surface-900/60", t3, className);
28056
28056
  $[0] = className;
28057
28057
  $[1] = position;
28058
28058
  $[2] = t3;
@@ -28300,7 +28300,7 @@ function ExpandablePanel(t0) {
28300
28300
  const t13 = asField && fieldBackgroundMixin;
28301
28301
  let t14;
28302
28302
  if ($[11] !== t10 || $[12] !== t11 || $[13] !== t12 || $[14] !== t13 || $[15] !== titleClassName) {
28303
- t14 = cls("rounded-t flex items-center justify-between w-full min-h-[52px]", "hover:bg-surface-accent-200 hover:bg-opacity-40 dark:hover:bg-surface-800 dark:hover:bg-opacity-40", t10, t11, "transition-all duration-200", t12, t13, titleClassName);
28303
+ t14 = cls("rounded-t flex items-center justify-between w-full min-h-[52px]", "hover:bg-surface-accent-200 hover:bg-opacity-40 hover:bg-surface-accent-200/40 dark:hover:bg-surface-800 dark:hover:bg-opacity-40 dark:hover:bg-surface-800/40", t10, t11, "transition-all duration-200", t12, t13, titleClassName);
28304
28304
  $[11] = t10;
28305
28305
  $[12] = t11;
28306
28306
  $[13] = t12;
@@ -28883,7 +28883,7 @@ function MenubarTrigger(t0) {
28883
28883
  } = t0;
28884
28884
  let t1;
28885
28885
  if ($[0] !== className) {
28886
- 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);
28886
+ 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 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800", className);
28887
28887
  $[0] = className;
28888
28888
  $[1] = t1;
28889
28889
  } else {
@@ -29485,7 +29485,7 @@ function Separator(t0) {
29485
29485
  if (orientation === "horizontal") {
29486
29486
  let t1;
29487
29487
  if ($[0] !== className) {
29488
- t1 = cls("dark:bg-opacity-80 dark:bg-surface-800 bg-surface-100 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px my-4", className);
29488
+ t1 = cls("dark:bg-opacity-80 dark:bg-surface-800 dark:bg-surface-800/80 bg-surface-100 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px my-4", className);
29489
29489
  $[0] = className;
29490
29490
  $[1] = t1;
29491
29491
  } else {
@@ -29504,7 +29504,7 @@ function Separator(t0) {
29504
29504
  } else {
29505
29505
  let t1;
29506
29506
  if ($[5] !== className) {
29507
- t1 = cls("dark:bg-opacity-80 dark:bg-surface-800 bg-surface-100 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px mx-4", className);
29507
+ t1 = cls("dark:bg-opacity-80 dark:bg-surface-800 dark:bg-surface-800/80 bg-surface-100 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px mx-4", className);
29508
29508
  $[5] = className;
29509
29509
  $[6] = t1;
29510
29510
  } else {
@@ -29550,7 +29550,7 @@ function SelectInputLabel(t0) {
29550
29550
  }
29551
29551
  const MultiSelectContext = React.createContext({});
29552
29552
  const MultiSelect = React.forwardRef((t0, ref) => {
29553
- const $ = c(103);
29553
+ const $ = c(105);
29554
29554
  const {
29555
29555
  value,
29556
29556
  size: t1,
@@ -29575,7 +29575,8 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29575
29575
  const includeClear = t3 === void 0 ? true : t3;
29576
29576
  const includeSelectAll = t4 === void 0 ? true : t4;
29577
29577
  const useChips = t5 === void 0 ? true : t5;
29578
- const [isPopoverOpen, setIsPopoverOpen] = React.useState(open ?? false);
29578
+ const [isMounted, setIsMounted] = useState(false);
29579
+ const [isPopoverOpen, setIsPopoverOpen] = useState(open ?? false);
29579
29580
  let t6;
29580
29581
  if ($[0] !== value) {
29581
29582
  t6 = value ?? [];
@@ -29584,61 +29585,75 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29584
29585
  } else {
29585
29586
  t6 = $[1];
29586
29587
  }
29587
- const [selectedValues, setSelectedValues] = React.useState(t6);
29588
+ const [selectedValues, setSelectedValues] = useState(t6);
29588
29589
  let t7;
29589
- if ($[2] !== onOpenChange) {
29590
- t7 = (open_0) => {
29591
- setIsPopoverOpen(open_0);
29592
- onOpenChange?.(open_0);
29590
+ let t8;
29591
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
29592
+ t7 = () => {
29593
+ setIsMounted(true);
29593
29594
  };
29594
- $[2] = onOpenChange;
29595
- $[3] = t7;
29595
+ t8 = [];
29596
+ $[2] = t7;
29597
+ $[3] = t8;
29596
29598
  } else {
29597
- t7 = $[3];
29599
+ t7 = $[2];
29600
+ t8 = $[3];
29598
29601
  }
29599
- const onPopoverOpenChange = t7;
29600
- let t8;
29602
+ useEffect(t7, t8);
29601
29603
  let t9;
29602
- if ($[4] !== open) {
29603
- t8 = () => {
29604
- setIsPopoverOpen(open ?? false);
29604
+ if ($[4] !== onOpenChange) {
29605
+ t9 = (open_0) => {
29606
+ setIsPopoverOpen(open_0);
29607
+ onOpenChange?.(open_0);
29605
29608
  };
29606
- t9 = [open];
29607
- $[4] = open;
29608
- $[5] = t8;
29609
- $[6] = t9;
29609
+ $[4] = onOpenChange;
29610
+ $[5] = t9;
29610
29611
  } else {
29611
- t8 = $[5];
29612
- t9 = $[6];
29612
+ t9 = $[5];
29613
29613
  }
29614
- useEffect(t8, t9);
29614
+ const onPopoverOpenChange = t9;
29615
29615
  let t10;
29616
- if ($[7] !== children) {
29617
- t10 = children ? Children.map(children, _temp$1).filter(Boolean) : [];
29618
- $[7] = children;
29619
- $[8] = t10;
29616
+ let t11;
29617
+ if ($[6] !== open) {
29618
+ t10 = () => {
29619
+ setIsPopoverOpen(open ?? false);
29620
+ };
29621
+ t11 = [open];
29622
+ $[6] = open;
29623
+ $[7] = t10;
29624
+ $[8] = t11;
29620
29625
  } else {
29621
- t10 = $[8];
29626
+ t10 = $[7];
29627
+ t11 = $[8];
29622
29628
  }
29623
- const allValues = t10;
29624
- let t11;
29629
+ useEffect(t10, t11);
29625
29630
  let t12;
29626
- if ($[9] !== value) {
29627
- t11 = () => {
29631
+ if ($[9] !== children) {
29632
+ t12 = children ? Children.map(children, _temp$1).filter(Boolean) : [];
29633
+ $[9] = children;
29634
+ $[10] = t12;
29635
+ } else {
29636
+ t12 = $[10];
29637
+ }
29638
+ const allValues = t12;
29639
+ let t13;
29640
+ let t14;
29641
+ if ($[11] !== value) {
29642
+ t13 = () => {
29628
29643
  setSelectedValues(value ?? []);
29629
29644
  };
29630
- t12 = [value];
29631
- $[9] = value;
29632
- $[10] = t11;
29633
- $[11] = t12;
29645
+ t14 = [value];
29646
+ $[11] = value;
29647
+ $[12] = t13;
29648
+ $[13] = t14;
29634
29649
  } else {
29635
- t11 = $[10];
29636
- t12 = $[11];
29650
+ t13 = $[12];
29651
+ t14 = $[13];
29637
29652
  }
29638
- React.useEffect(t11, t12);
29653
+ React.useEffect(t13, t14);
29639
29654
  let onItemClick;
29640
29655
  let updateValues;
29641
- if ($[12] !== onValueChange || $[13] !== selectedValues) {
29656
+ if ($[14] !== onValueChange || $[15] !== selectedValues) {
29642
29657
  onItemClick = function onItemClick2(newValue) {
29643
29658
  let newSelectedValues;
29644
29659
  if (selectedValues.some((v_0) => String(v_0) === String(newValue))) {
@@ -29652,17 +29667,17 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29652
29667
  setSelectedValues(values);
29653
29668
  onValueChange?.(values);
29654
29669
  };
29655
- $[12] = onValueChange;
29656
- $[13] = selectedValues;
29657
- $[14] = onItemClick;
29658
- $[15] = updateValues;
29670
+ $[14] = onValueChange;
29671
+ $[15] = selectedValues;
29672
+ $[16] = onItemClick;
29673
+ $[17] = updateValues;
29659
29674
  } else {
29660
- onItemClick = $[14];
29661
- updateValues = $[15];
29675
+ onItemClick = $[16];
29676
+ updateValues = $[17];
29662
29677
  }
29663
- let t13;
29664
- if ($[16] !== onPopoverOpenChange || $[17] !== selectedValues || $[18] !== updateValues) {
29665
- t13 = (event) => {
29678
+ let t15;
29679
+ if ($[18] !== onPopoverOpenChange || $[19] !== selectedValues || $[20] !== updateValues) {
29680
+ t15 = (event) => {
29666
29681
  if (event.key === "Enter") {
29667
29682
  onPopoverOpenChange(true);
29668
29683
  } else {
@@ -29673,53 +29688,53 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29673
29688
  }
29674
29689
  }
29675
29690
  };
29676
- $[16] = onPopoverOpenChange;
29677
- $[17] = selectedValues;
29678
- $[18] = updateValues;
29679
- $[19] = t13;
29691
+ $[18] = onPopoverOpenChange;
29692
+ $[19] = selectedValues;
29693
+ $[20] = updateValues;
29694
+ $[21] = t15;
29680
29695
  } else {
29681
- t13 = $[19];
29696
+ t15 = $[21];
29682
29697
  }
29683
- const handleInputKeyDown = t13;
29684
- let t14;
29685
- if ($[20] !== selectedValues || $[21] !== updateValues) {
29686
- t14 = (value_0) => {
29698
+ const handleInputKeyDown = t15;
29699
+ let t16;
29700
+ if ($[22] !== selectedValues || $[23] !== updateValues) {
29701
+ t16 = (value_0) => {
29687
29702
  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];
29688
29703
  updateValues(newSelectedValues_1);
29689
29704
  };
29690
- $[20] = selectedValues;
29691
- $[21] = updateValues;
29692
- $[22] = t14;
29705
+ $[22] = selectedValues;
29706
+ $[23] = updateValues;
29707
+ $[24] = t16;
29693
29708
  } else {
29694
- t14 = $[22];
29709
+ t16 = $[24];
29695
29710
  }
29696
- const toggleOption = t14;
29697
- let t15;
29698
- if ($[23] !== updateValues) {
29699
- t15 = () => {
29711
+ const toggleOption = t16;
29712
+ let t17;
29713
+ if ($[25] !== updateValues) {
29714
+ t17 = () => {
29700
29715
  updateValues([]);
29701
29716
  };
29702
- $[23] = updateValues;
29703
- $[24] = t15;
29717
+ $[25] = updateValues;
29718
+ $[26] = t17;
29704
29719
  } else {
29705
- t15 = $[24];
29720
+ t17 = $[26];
29706
29721
  }
29707
- const handleClear = t15;
29708
- let t16;
29709
- if ($[25] !== isPopoverOpen || $[26] !== onPopoverOpenChange) {
29710
- t16 = () => {
29722
+ const handleClear = t17;
29723
+ let t18;
29724
+ if ($[27] !== isPopoverOpen || $[28] !== onPopoverOpenChange) {
29725
+ t18 = () => {
29711
29726
  onPopoverOpenChange(!isPopoverOpen);
29712
29727
  };
29713
- $[25] = isPopoverOpen;
29714
- $[26] = onPopoverOpenChange;
29715
- $[27] = t16;
29728
+ $[27] = isPopoverOpen;
29729
+ $[28] = onPopoverOpenChange;
29730
+ $[29] = t18;
29716
29731
  } else {
29717
- t16 = $[27];
29732
+ t18 = $[29];
29718
29733
  }
29719
- const handleTogglePopover = t16;
29720
- let t17;
29721
- if ($[28] !== allValues || $[29] !== handleClear || $[30] !== onPopoverOpenChange || $[31] !== selectedValues.length || $[32] !== updateValues) {
29722
- t17 = () => {
29734
+ const handleTogglePopover = t18;
29735
+ let t19;
29736
+ if ($[30] !== allValues || $[31] !== handleClear || $[32] !== onPopoverOpenChange || $[33] !== selectedValues.length || $[34] !== updateValues) {
29737
+ t19 = () => {
29723
29738
  if (selectedValues.length === allValues.length) {
29724
29739
  handleClear();
29725
29740
  } else {
@@ -29727,54 +29742,55 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29727
29742
  }
29728
29743
  onPopoverOpenChange(false);
29729
29744
  };
29730
- $[28] = allValues;
29731
- $[29] = handleClear;
29732
- $[30] = onPopoverOpenChange;
29733
- $[31] = selectedValues.length;
29734
- $[32] = updateValues;
29735
- $[33] = t17;
29745
+ $[30] = allValues;
29746
+ $[31] = handleClear;
29747
+ $[32] = onPopoverOpenChange;
29748
+ $[33] = selectedValues.length;
29749
+ $[34] = updateValues;
29750
+ $[35] = t19;
29736
29751
  } else {
29737
- t17 = $[33];
29752
+ t19 = $[35];
29738
29753
  }
29739
- const toggleAll = t17;
29754
+ const toggleAll = t19;
29740
29755
  useInjectStyles("MultiSelect", `
29741
29756
  [cmdk-group] {
29742
29757
  max-height: 45vh;
29743
29758
  overflow-y: auto;
29744
29759
  // width: 400px;
29745
29760
  } `);
29746
- let t18;
29747
- if ($[34] !== onItemClick || $[35] !== selectedValues) {
29748
- t18 = {
29761
+ let t20;
29762
+ if ($[36] !== onItemClick || $[37] !== selectedValues) {
29763
+ t20 = {
29749
29764
  fieldValue: selectedValues,
29750
29765
  onItemClick
29751
29766
  };
29752
- $[34] = onItemClick;
29753
- $[35] = selectedValues;
29754
- $[36] = t18;
29767
+ $[36] = onItemClick;
29768
+ $[37] = selectedValues;
29769
+ $[38] = t20;
29755
29770
  } else {
29756
- t18 = $[36];
29771
+ t20 = $[38];
29757
29772
  }
29758
- let t19;
29759
- if ($[37] !== error || $[38] !== label) {
29760
- t19 = typeof label === "string" ? /* @__PURE__ */ jsx(SelectInputLabel, { error, children: label }) : label;
29761
- $[37] = error;
29762
- $[38] = label;
29763
- $[39] = t19;
29764
- } else {
29765
- t19 = $[39];
29766
- }
29767
- const t20 = size === "smallest";
29768
- const t21 = size === "small";
29769
- const t22 = size === "medium";
29770
- const t23 = size === "large";
29771
- let t24;
29772
- if ($[40] !== className || $[41] !== disabled || $[42] !== invisible || $[43] !== size || $[44] !== t20 || $[45] !== t21 || $[46] !== t22 || $[47] !== t23) {
29773
- t24 = cls({
29774
- "min-h-[28px]": t20,
29775
- "min-h-[32px]": t21,
29776
- "min-h-[42px]": t22,
29777
- "min-h-[64px]": t23
29773
+ let t21;
29774
+ if ($[39] !== error || $[40] !== label) {
29775
+ t21 = typeof label === "string" ? /* @__PURE__ */ jsx(SelectInputLabel, { error, children: label }) : label;
29776
+ $[39] = error;
29777
+ $[40] = label;
29778
+ $[41] = t21;
29779
+ } else {
29780
+ t21 = $[41];
29781
+ }
29782
+ const t22 = isMounted && isPopoverOpen;
29783
+ const t23 = size === "smallest";
29784
+ const t24 = size === "small";
29785
+ const t25 = size === "medium";
29786
+ const t26 = size === "large";
29787
+ let t27;
29788
+ if ($[42] !== className || $[43] !== disabled || $[44] !== invisible || $[45] !== size || $[46] !== t23 || $[47] !== t24 || $[48] !== t25 || $[49] !== t26) {
29789
+ t27 = cls({
29790
+ "min-h-[28px]": t23,
29791
+ "min-h-[32px]": t24,
29792
+ "min-h-[42px]": t25,
29793
+ "min-h-[64px]": t26
29778
29794
  }, {
29779
29795
  "py-1": size === "small" || size === "smallest",
29780
29796
  "py-2": size === "medium" || size === "large"
@@ -29782,21 +29798,21 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29782
29798
  "px-2": size === "small" || size === "smallest",
29783
29799
  "px-4": size === "medium" || size === "large"
29784
29800
  }, "select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className);
29785
- $[40] = className;
29786
- $[41] = disabled;
29787
- $[42] = invisible;
29788
- $[43] = size;
29789
- $[44] = t20;
29790
- $[45] = t21;
29791
- $[46] = t22;
29792
- $[47] = t23;
29793
- $[48] = t24;
29794
- } else {
29795
- t24 = $[48];
29801
+ $[42] = className;
29802
+ $[43] = disabled;
29803
+ $[44] = invisible;
29804
+ $[45] = size;
29805
+ $[46] = t23;
29806
+ $[47] = t24;
29807
+ $[48] = t25;
29808
+ $[49] = t26;
29809
+ $[50] = t27;
29810
+ } else {
29811
+ t27 = $[50];
29796
29812
  }
29797
- let t25;
29798
- if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !== size || $[57] !== toggleOption || $[58] !== useChips) {
29799
- t25 = selectedValues.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center w-full", children: [
29813
+ let t28;
29814
+ if ($[51] !== children || $[52] !== handleClear || $[53] !== includeClear || $[54] !== isPopoverOpen || $[55] !== placeholder || $[56] !== renderValues || $[57] !== selectedValues || $[58] !== size || $[59] !== toggleOption || $[60] !== useChips) {
29815
+ t28 = selectedValues.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center w-full", children: [
29800
29816
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-start", children: [
29801
29817
  renderValues && renderValues(selectedValues),
29802
29818
  !renderValues && selectedValues.map((value_1) => {
@@ -29825,176 +29841,176 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29825
29841
  /* @__PURE__ */ jsx("span", { className: "text-sm", children: placeholder }),
29826
29842
  /* @__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" : "") }) })
29827
29843
  ] });
29828
- $[49] = children;
29829
- $[50] = handleClear;
29830
- $[51] = includeClear;
29831
- $[52] = isPopoverOpen;
29832
- $[53] = placeholder;
29833
- $[54] = renderValues;
29834
- $[55] = selectedValues;
29835
- $[56] = size;
29836
- $[57] = toggleOption;
29837
- $[58] = useChips;
29838
- $[59] = t25;
29839
- } else {
29840
- t25 = $[59];
29841
- }
29842
- let t26;
29843
- if ($[60] !== handleTogglePopover || $[61] !== ref || $[62] !== t24 || $[63] !== t25) {
29844
- t26 = /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { ref, onClick: handleTogglePopover, className: t24, children: t25 }) });
29845
- $[60] = handleTogglePopover;
29846
- $[61] = ref;
29847
- $[62] = t24;
29848
- $[63] = t25;
29849
- $[64] = t26;
29850
- } else {
29851
- t26 = $[64];
29852
- }
29853
- let t27;
29854
- if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
29855
- t27 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
29856
- $[65] = t27;
29857
- } else {
29858
- t27 = $[65];
29859
- }
29860
- let t28;
29861
- if ($[66] !== onPopoverOpenChange) {
29862
- t28 = () => onPopoverOpenChange(false);
29863
- $[66] = onPopoverOpenChange;
29864
- $[67] = t28;
29865
- } else {
29866
- t28 = $[67];
29844
+ $[51] = children;
29845
+ $[52] = handleClear;
29846
+ $[53] = includeClear;
29847
+ $[54] = isPopoverOpen;
29848
+ $[55] = placeholder;
29849
+ $[56] = renderValues;
29850
+ $[57] = selectedValues;
29851
+ $[58] = size;
29852
+ $[59] = toggleOption;
29853
+ $[60] = useChips;
29854
+ $[61] = t28;
29855
+ } else {
29856
+ t28 = $[61];
29867
29857
  }
29868
29858
  let t29;
29869
- if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
29870
- t29 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow ");
29871
- $[68] = t29;
29859
+ if ($[62] !== handleTogglePopover || $[63] !== ref || $[64] !== t27 || $[65] !== t28) {
29860
+ t29 = /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { ref, onClick: handleTogglePopover, className: t27, children: t28 }) });
29861
+ $[62] = handleTogglePopover;
29862
+ $[63] = ref;
29863
+ $[64] = t27;
29864
+ $[65] = t28;
29865
+ $[66] = t29;
29872
29866
  } else {
29873
- t29 = $[68];
29867
+ t29 = $[66];
29874
29868
  }
29875
29869
  let t30;
29876
- if ($[69] !== handleInputKeyDown) {
29877
- t30 = /* @__PURE__ */ jsx(Command.Input, { className: t29, placeholder: "Search...", onKeyDown: handleInputKeyDown });
29878
- $[69] = handleInputKeyDown;
29879
- $[70] = t30;
29870
+ if ($[67] === Symbol.for("react.memo_cache_sentinel")) {
29871
+ t30 = cls("z-50 overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
29872
+ $[67] = t30;
29880
29873
  } else {
29881
- t30 = $[70];
29874
+ t30 = $[67];
29882
29875
  }
29883
29876
  let t31;
29884
- if ($[71] !== handleClear || $[72] !== selectedValues.length) {
29885
- 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" });
29886
- $[71] = handleClear;
29887
- $[72] = selectedValues.length;
29888
- $[73] = t31;
29877
+ if ($[68] !== onPopoverOpenChange) {
29878
+ t31 = () => onPopoverOpenChange(false);
29879
+ $[68] = onPopoverOpenChange;
29880
+ $[69] = t31;
29889
29881
  } else {
29890
- t31 = $[73];
29882
+ t31 = $[69];
29891
29883
  }
29892
29884
  let t32;
29893
- if ($[74] !== t30 || $[75] !== t31) {
29894
- t32 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center", children: [
29895
- t30,
29896
- t31
29897
- ] });
29898
- $[74] = t30;
29899
- $[75] = t31;
29900
- $[76] = t32;
29885
+ if ($[70] === Symbol.for("react.memo_cache_sentinel")) {
29886
+ t32 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow ");
29887
+ $[70] = t32;
29901
29888
  } else {
29902
- t32 = $[76];
29889
+ t32 = $[70];
29903
29890
  }
29904
29891
  let t33;
29905
- if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
29906
- t33 = /* @__PURE__ */ jsx(Separator, { orientation: "horizontal", className: "my-0" });
29907
- $[77] = t33;
29892
+ if ($[71] !== handleInputKeyDown) {
29893
+ t33 = /* @__PURE__ */ jsx(Command.Input, { className: t32, placeholder: "Search...", onKeyDown: handleInputKeyDown });
29894
+ $[71] = handleInputKeyDown;
29895
+ $[72] = t33;
29908
29896
  } else {
29909
- t33 = $[77];
29897
+ t33 = $[72];
29910
29898
  }
29911
29899
  let t34;
29912
- if ($[78] === Symbol.for("react.memo_cache_sentinel")) {
29913
- t34 = /* @__PURE__ */ jsx(Command.Empty, { className: "px-4 py-2", children: "No results found." });
29914
- $[78] = t34;
29900
+ if ($[73] !== handleClear || $[74] !== selectedValues.length) {
29901
+ t34 = 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" });
29902
+ $[73] = handleClear;
29903
+ $[74] = selectedValues.length;
29904
+ $[75] = t34;
29915
29905
  } else {
29916
- t34 = $[78];
29906
+ t34 = $[75];
29917
29907
  }
29918
29908
  let t35;
29919
- if ($[79] !== allValues.length || $[80] !== includeSelectAll || $[81] !== selectedValues.length || $[82] !== toggleAll) {
29920
- 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: [
29921
- /* @__PURE__ */ jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
29922
- /* @__PURE__ */ jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
29923
- ] }, "all");
29924
- $[79] = allValues.length;
29925
- $[80] = includeSelectAll;
29926
- $[81] = selectedValues.length;
29927
- $[82] = toggleAll;
29928
- $[83] = t35;
29909
+ if ($[76] !== t33 || $[77] !== t34) {
29910
+ t35 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center", children: [
29911
+ t33,
29912
+ t34
29913
+ ] });
29914
+ $[76] = t33;
29915
+ $[77] = t34;
29916
+ $[78] = t35;
29929
29917
  } else {
29930
- t35 = $[83];
29918
+ t35 = $[78];
29931
29919
  }
29932
29920
  let t36;
29933
- if ($[84] !== children || $[85] !== t35) {
29934
- t36 = /* @__PURE__ */ jsxs(Command.List, { children: [
29935
- t34,
29936
- /* @__PURE__ */ jsxs(Command.Group, { children: [
29937
- t35,
29938
- children
29939
- ] })
29940
- ] });
29941
- $[84] = children;
29942
- $[85] = t35;
29943
- $[86] = t36;
29921
+ if ($[79] === Symbol.for("react.memo_cache_sentinel")) {
29922
+ t36 = /* @__PURE__ */ jsx(Separator, { orientation: "horizontal", className: "my-0" });
29923
+ $[79] = t36;
29944
29924
  } else {
29945
- t36 = $[86];
29925
+ t36 = $[79];
29946
29926
  }
29947
29927
  let t37;
29948
- if ($[87] !== t32 || $[88] !== t36) {
29949
- t37 = /* @__PURE__ */ jsxs(Command, { children: [
29950
- t32,
29951
- t33,
29952
- t36
29953
- ] });
29954
- $[87] = t32;
29955
- $[88] = t36;
29956
- $[89] = t37;
29928
+ if ($[80] === Symbol.for("react.memo_cache_sentinel")) {
29929
+ t37 = /* @__PURE__ */ jsx(Command.Empty, { className: "px-4 py-2", children: "No results found." });
29930
+ $[80] = t37;
29957
29931
  } else {
29958
- t37 = $[89];
29932
+ t37 = $[80];
29959
29933
  }
29960
29934
  let t38;
29961
- if ($[90] !== t28 || $[91] !== t37) {
29962
- t38 = /* @__PURE__ */ jsx(PopoverPrimitive.Content, { className: t27, align: "start", sideOffset: 8, onEscapeKeyDown: t28, children: t37 });
29963
- $[90] = t28;
29964
- $[91] = t37;
29965
- $[92] = t38;
29935
+ if ($[81] !== allValues.length || $[82] !== includeSelectAll || $[83] !== selectedValues.length || $[84] !== toggleAll) {
29936
+ t38 = 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-primary/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: [
29937
+ /* @__PURE__ */ jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
29938
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
29939
+ ] }, "all");
29940
+ $[81] = allValues.length;
29941
+ $[82] = includeSelectAll;
29942
+ $[83] = selectedValues.length;
29943
+ $[84] = toggleAll;
29944
+ $[85] = t38;
29966
29945
  } else {
29967
- t38 = $[92];
29946
+ t38 = $[85];
29968
29947
  }
29969
29948
  let t39;
29970
- if ($[93] !== isPopoverOpen || $[94] !== modalPopover || $[95] !== onPopoverOpenChange || $[96] !== t26 || $[97] !== t38) {
29971
- t39 = /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open: isPopoverOpen, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
29972
- t26,
29973
- t38
29949
+ if ($[86] !== children || $[87] !== t38) {
29950
+ t39 = /* @__PURE__ */ jsxs(Command.List, { children: [
29951
+ t37,
29952
+ /* @__PURE__ */ jsxs(Command.Group, { children: [
29953
+ t38,
29954
+ children
29955
+ ] })
29974
29956
  ] });
29975
- $[93] = isPopoverOpen;
29976
- $[94] = modalPopover;
29977
- $[95] = onPopoverOpenChange;
29978
- $[96] = t26;
29979
- $[97] = t38;
29980
- $[98] = t39;
29957
+ $[86] = children;
29958
+ $[87] = t38;
29959
+ $[88] = t39;
29981
29960
  } else {
29982
- t39 = $[98];
29961
+ t39 = $[88];
29983
29962
  }
29984
29963
  let t40;
29985
- if ($[99] !== t18 || $[100] !== t19 || $[101] !== t39) {
29986
- t40 = /* @__PURE__ */ jsxs(MultiSelectContext.Provider, { value: t18, children: [
29987
- t19,
29964
+ if ($[89] !== t35 || $[90] !== t39) {
29965
+ t40 = /* @__PURE__ */ jsxs(Command, { children: [
29966
+ t35,
29967
+ t36,
29988
29968
  t39
29989
29969
  ] });
29990
- $[99] = t18;
29991
- $[100] = t19;
29992
- $[101] = t39;
29993
- $[102] = t40;
29970
+ $[89] = t35;
29971
+ $[90] = t39;
29972
+ $[91] = t40;
29973
+ } else {
29974
+ t40 = $[91];
29975
+ }
29976
+ let t41;
29977
+ if ($[92] !== t31 || $[93] !== t40) {
29978
+ t41 = /* @__PURE__ */ jsx(PopoverPrimitive.Content, { className: t30, align: "start", sideOffset: 8, onEscapeKeyDown: t31, children: t40 });
29979
+ $[92] = t31;
29980
+ $[93] = t40;
29981
+ $[94] = t41;
29982
+ } else {
29983
+ t41 = $[94];
29984
+ }
29985
+ let t42;
29986
+ if ($[95] !== modalPopover || $[96] !== onPopoverOpenChange || $[97] !== t22 || $[98] !== t29 || $[99] !== t41) {
29987
+ t42 = /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open: t22, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
29988
+ t29,
29989
+ t41
29990
+ ] });
29991
+ $[95] = modalPopover;
29992
+ $[96] = onPopoverOpenChange;
29993
+ $[97] = t22;
29994
+ $[98] = t29;
29995
+ $[99] = t41;
29996
+ $[100] = t42;
29997
+ } else {
29998
+ t42 = $[100];
29999
+ }
30000
+ let t43;
30001
+ if ($[101] !== t20 || $[102] !== t21 || $[103] !== t42) {
30002
+ t43 = /* @__PURE__ */ jsxs(MultiSelectContext.Provider, { value: t20, children: [
30003
+ t21,
30004
+ t42
30005
+ ] });
30006
+ $[101] = t20;
30007
+ $[102] = t21;
30008
+ $[103] = t42;
30009
+ $[104] = t43;
29994
30010
  } else {
29995
- t40 = $[102];
30011
+ t43 = $[104];
29996
30012
  }
29997
- return t40;
30013
+ return t43;
29998
30014
  });
29999
30015
  MultiSelect.displayName = "MultiSelect";
30000
30016
  function MultiSelectItem(t0) {
@@ -30052,7 +30068,7 @@ function MultiSelectItem(t0) {
30052
30068
  const t4 = isSelected ? "bg-surface-accent-200 dark:bg-surface-accent-950" : "";
30053
30069
  let t5;
30054
30070
  if ($[10] !== className || $[11] !== t4) {
30055
- 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);
30071
+ 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-primary/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);
30056
30072
  $[10] = className;
30057
30073
  $[11] = t4;
30058
30074
  $[12] = t5;
@@ -30480,7 +30496,7 @@ const Select = forwardRef(({
30480
30496
  "px-4": size === "large",
30481
30497
  "px-3": size === "medium",
30482
30498
  "px-2": size === "small" || size === "smallest"
30483
- } : "", "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", {
30499
+ } : "", "outline-hidden focus:outline-hidden", "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", {
30484
30500
  "min-h-[28px]": size === "smallest",
30485
30501
  "min-h-[32px]": size === "small",
30486
30502
  "min-h-[42px]": size === "medium",
@@ -30621,7 +30637,7 @@ function SliderThumb(props) {
30621
30637
  t2 = cls({
30622
30638
  "border-primary bg-primary outline-none": t1,
30623
30639
  "border-surface-accent-300 bg-surface-accent-300 dark:border-surface-700 dark:bg-surface-700": props.props.disabled
30624
- }, props.classes, "focus-visible:ring-4 focus-visible:ring-primary focus-visible:ring-opacity-50", "hover:ring-4 hover:ring-primary hover:ring-opacity-25", "block rounded-full transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50");
30640
+ }, props.classes, "focus-visible:ring-4 focus-visible:ring-primary focus-visible:ring-opacity-50 focus-visible:ring-primary/50", "hover:ring-4 hover:ring-primary hover:ring-opacity-25 hover:ring-primary/25", "block rounded-full transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50");
30625
30641
  $[0] = props.classes;
30626
30642
  $[1] = props.props.disabled;
30627
30643
  $[2] = t1;
@@ -30639,7 +30655,7 @@ function SliderThumb(props) {
30639
30655
  }
30640
30656
  let t4;
30641
30657
  if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
30642
- t4 = cls("TooltipContent", "max-w-lg leading-relaxed", "z-50 rounded px-3 py-2 text-xs leading-none bg-surface-accent-700 dark:bg-surface-accent-800 bg-opacity-90 font-medium text-surface-accent-50 shadow-2xl select-none duration-400 ease-in transform opacity-100");
30658
+ t4 = cls("TooltipContent", "max-w-lg leading-relaxed", "z-50 rounded px-3 py-2 text-xs leading-none bg-surface-accent-700 dark:bg-surface-accent-800 bg-opacity-90 bg-surface-accent-700/90 dark:bg-surface-accent-800/90 font-medium text-surface-accent-50 shadow-2xl select-none duration-400 ease-in transform opacity-100");
30643
30659
  $[6] = t4;
30644
30660
  } else {
30645
30661
  t4 = $[6];
@@ -30744,7 +30760,7 @@ const Slider = React.forwardRef((t0, ref) => {
30744
30760
  }
30745
30761
  let t10;
30746
30762
  if ($[15] !== t6 || $[16] !== t9) {
30747
- t10 = /* @__PURE__ */ jsx(SliderPrimitive.Track, { style: t6, className: "relative w-full grow overflow-hidden rounded-full bg-surface-accent-300 bg-opacity-40 dark:bg-surface-700 dark:bg-opacity-40", children: t9 });
30763
+ t10 = /* @__PURE__ */ jsx(SliderPrimitive.Track, { style: t6, className: "relative w-full grow overflow-hidden rounded-full bg-surface-accent-300 bg-opacity-40 bg-surface-accent-300/40 dark:bg-surface-700 dark:bg-opacity-40 dark:bg-surface-700/40", children: t9 });
30748
30764
  $[15] = t6;
30749
30765
  $[16] = t9;
30750
30766
  $[17] = t10;
@@ -30918,7 +30934,7 @@ const Sheet = (t0) => {
30918
30934
  t9 = $[41];
30919
30935
  }
30920
30936
  if ($[42] !== displayed || $[43] !== includeBackgroundOverlay || $[44] !== open || $[45] !== overlayClassName || $[46] !== overlayStyle) {
30921
- t10 = includeBackgroundOverlay && /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: cls("outline-none", "fixed inset-0 transition-opacity z-20 ease-in-out duration-100 backdrop-blur-sm", "bg-black bg-opacity-50", "dark:bg-surface-900 dark:bg-opacity-60", displayed && open ? "opacity-100" : "opacity-0", overlayClassName), style: {
30937
+ t10 = includeBackgroundOverlay && /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: cls("outline-none", "fixed inset-0 transition-opacity z-20 ease-in-out duration-100 backdrop-blur-sm", "bg-black bg-opacity-50 bg-black/50", "dark:bg-surface-900 dark:bg-opacity-60 dark:bg-surface-900/60", displayed && open ? "opacity-100" : "opacity-0", overlayClassName), style: {
30922
30938
  pointerEvents: displayed ? "auto" : "none",
30923
30939
  ...overlayStyle
30924
30940
  } });
@@ -31259,8 +31275,13 @@ const TextField = forwardRef(({
31259
31275
  ...inputProps
31260
31276
  }, ref) => {
31261
31277
  const inputRef = inputRefProp ?? useRef(null);
31262
- const [focused, setFocused] = React__default.useState(document.activeElement === inputRef.current);
31278
+ const [focused, setFocused] = React__default.useState(false);
31263
31279
  const hasValue = value !== void 0 && value !== null && value !== "";
31280
+ useEffect(() => {
31281
+ if (inputRef.current && document.activeElement === inputRef.current) {
31282
+ setFocused(true);
31283
+ }
31284
+ }, []);
31264
31285
  useEffect(() => {
31265
31286
  if (type !== "number") return;
31266
31287
  const handleWheel = (event) => {
@@ -31272,7 +31293,7 @@ const TextField = forwardRef(({
31272
31293
  element?.removeEventListener("wheel", handleWheel);
31273
31294
  };
31274
31295
  }, [inputRef, type]);
31275
- 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, {
31296
+ const input = multiline ? /* @__PURE__ */ jsx(TextareaAutosize, { ...inputProps, ref: inputRef, placeholder: focused || hasValue || !label ? placeholder : void 0, autoFocus, minRows, maxRows, value: value ?? "", onChange, onFocus: () => setFocused(true), onBlur: () => setFocused(false), 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, {
31276
31297
  "min-h-[28px]": size === "smallest",
31277
31298
  "min-h-[32px]": size === "small",
31278
31299
  "min-h-[42px]": size === "medium",
@@ -31342,7 +31363,7 @@ const Tooltip = (t0) => {
31342
31363
  const trigger = t4;
31343
31364
  let t5;
31344
31365
  if ($[7] !== tooltipClassName) {
31345
- t5 = cls("TooltipContent", "max-w-lg leading-relaxed", "z-50 rounded px-3 py-2 text-xs leading-none bg-surface-accent-700 dark:bg-surface-accent-800 bg-opacity-90 font-medium text-surface-accent-50 shadow-2xl select-none duration-400 ease-in transform opacity-100", tooltipClassName);
31366
+ t5 = cls("TooltipContent", "max-w-lg leading-relaxed", "z-50 rounded px-3 py-2 text-xs leading-none bg-surface-accent-700 dark:bg-surface-accent-800 bg-opacity-90 bg-surface-accent-700/90 dark:bg-surface-accent-800/90 font-medium text-surface-accent-50 shadow-2xl select-none duration-400 ease-in transform opacity-100", tooltipClassName);
31346
31367
  $[7] = tooltipClassName;
31347
31368
  $[8] = t5;
31348
31369
  } else {
@@ -31521,7 +31542,7 @@ function Tab(t0) {
31521
31542
  }
31522
31543
  let t2;
31523
31544
  if ($[3] !== innerClassName) {
31524
- t2 = cls("line-clamp-1", "uppercase inline-block p-2 px-4 rounded", "hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800", innerClassName);
31545
+ t2 = cls("line-clamp-1", "uppercase inline-block p-2 px-4 rounded", "hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800", innerClassName);
31525
31546
  $[3] = innerClassName;
31526
31547
  $[4] = t2;
31527
31548
  } else {