@firecms/ui 3.0.0-canary.253 → 3.0.0-canary.255

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.umd.js CHANGED
@@ -742,18 +742,22 @@
742
742
  } else {
743
743
  onValueChange?.(!value);
744
744
  }
745
- }, 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: [
746
746
  allowIndeterminate && (value === null || value === void 0) && /* @__PURE__ */ jsxRuntime.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",
749
+ "w-[16px] h-[6px]": size === "smallest",
749
750
  "translate-x-[10px]": size === "medium" || size === "large",
750
- "translate-x-[9px]": size === "small"
751
+ "translate-x-[9px]": size === "small",
752
+ "translate-x-[8px]": size === "smallest"
751
753
  }) }, "knob"),
752
754
  !(allowIndeterminate && (value === null || value === void 0)) && /* @__PURE__ */ jsxRuntime.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", {
753
755
  "w-[21px] h-[21px]": size === "medium" || size === "large",
754
756
  "w-[19px] h-[19px]": size === "small",
757
+ "w-[16px] h-[16px]": size === "smallest",
755
758
  [value ? "translate-x-[19px]" : "translate-x-[3px]"]: size === "medium" || size === "large",
756
- [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"
757
761
  }) }, "knob")
758
762
  ] });
759
763
  });
@@ -785,7 +789,7 @@
785
789
  "min-h-[32px]": size === "small",
786
790
  "min-h-[42px]": size === "medium",
787
791
  "min-h-[64px]": size === "large"
788
- }, 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) => {
789
793
  if (props.allowIndeterminate) {
790
794
  if (value === null || value === void 0) onValueChange?.(true);
791
795
  else if (value) onValueChange?.(false);
@@ -795,7 +799,7 @@
795
799
  }
796
800
  }, children: [
797
801
  /* @__PURE__ */ jsxRuntime.jsx(BooleanSwitch, { value, ref: refInput, size, className: cls(invisible && focus ? focusedClasses : "", inputClassName), disabled, ...props }),
798
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("flex-grow", position === "end" ? "mr-4" : "ml-4", size === "small" ? "text-sm" : "text-base"), children: label })
802
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("flex-grow", position === "end" ? "mr-4" : "ml-4", size === "small" || size === "smallest" ? "text-sm" : "text-base"), children: label })
799
803
  ] });
800
804
  };
801
805
  const ButtonInner = React.forwardRef((t0, ref) => {
@@ -30552,6 +30556,7 @@
30552
30556
  onValueChange,
30553
30557
  className,
30554
30558
  inputClassName,
30559
+ viewportClassName,
30555
30560
  placeholder,
30556
30561
  renderValue,
30557
30562
  label,
@@ -30646,7 +30651,7 @@
30646
30651
  e_0.stopPropagation();
30647
30652
  }, children: endAdornment })
30648
30653
  ] }),
30649
- /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Content, { position, className: cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-surface-900 p-2 rounded-lg", defaultBorderMixin), children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Viewport, { className: "p-1", style: {
30654
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Content, { position, className: cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-surface-900 p-2 rounded-lg", defaultBorderMixin), children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Viewport, { className: cls("p-1", viewportClassName), style: {
30650
30655
  maxHeight: "var(--radix-select-content-available-height)"
30651
30656
  }, children }) }) })
30652
30657
  ] });