@firecms/ui 3.0.0-canary.102 → 3.0.0-canary.103

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.
@@ -17,5 +17,6 @@ export interface PopoverProps {
17
17
  enabled?: boolean;
18
18
  modal?: boolean;
19
19
  className?: string;
20
+ portalContainer?: HTMLElement | null;
20
21
  }
21
- export declare function Popover({ trigger, children, open, onOpenChange, side, sideOffset, align, alignOffset, arrowPadding, sticky, hideWhenDetached, avoidCollisions, enabled, modal, className }: PopoverProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function Popover({ trigger, children, open, onOpenChange, side, sideOffset, align, alignOffset, arrowPadding, sticky, hideWhenDetached, avoidCollisions, enabled, modal, portalContainer, className }: PopoverProps): import("react/jsx-runtime").JSX.Element;
package/dist/index.es.js CHANGED
@@ -28,7 +28,7 @@ const focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-slate-100 focus:dark
28
28
  const focusedClasses = "z-30 outline-none ring-2 ring-primary ring-opacity-75 ring-offset-2 ring-offset-transparent ";
29
29
  const fieldBackgroundMixin = "bg-opacity-50 bg-slate-200 dark:bg-gray-800 dark:bg-opacity-60";
30
30
  const fieldBackgroundInvisibleMixin = "bg-opacity-0 bg-slate-100 dark:bg-gray-800 dark:bg-opacity-0";
31
- const fieldBackgroundDisabledMixin = "dark:bg-gray-800 bg-opacity-80 dark:bg-opacity-90";
31
+ const fieldBackgroundDisabledMixin = "dark:bg-gray-800 bg-opacity-50 dark:bg-opacity-90";
32
32
  const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-gray-700 dark:hover:bg-opacity-60";
33
33
  const defaultBorderMixin = "border-gray-100 dark:border-gray-800 dark:border-opacity-80";
34
34
  const paperMixin = "bg-white rounded-md dark:bg-gray-950 border dark:border-gray-800 dark:border-opacity-80 border-gray-100";
@@ -574,10 +574,10 @@ const ButtonInner = React__default.forwardRef(({
574
574
  "w-full": fullWidth,
575
575
  "w-fit": !fullWidth,
576
576
  // Filled Variants
577
- "border border-transparent bg-primary hover:bg-primary-dark focus:ring-primary shadow hover:ring-1 hover:ring-primary text-white": variant === "filled" && color === "primary" && !disabled,
578
- "border border-transparent bg-secondary hover:bg-secondary-dark focus:ring-secondary shadow hover:ring-1 hover:ring-secondary text-white": variant === "filled" && color === "secondary" && !disabled,
579
- "border border-transparent bg-red-500 hover:bg-red-500 focus:ring-red-500 shadow hover:ring-1 hover:ring-red-600 text-white": variant === "filled" && color === "error" && !disabled,
580
- "border border-transparent bg-slate-200 hover:bg-slate-300 focus:ring-slate-400 shadow hover:ring-1 hover:ring-slate-400 text-text-primary dark:text-text-primary-dark": variant === "filled" && color === "text" && !disabled,
577
+ "border border-transparent bg-primary hover:bg-primary-dark focus:ring-primary shadow hover:ring-1 hover:ring-primary text-white hover:text-white": variant === "filled" && color === "primary" && !disabled,
578
+ "border border-transparent bg-secondary hover:bg-secondary-dark focus:ring-secondary shadow hover:ring-1 hover:ring-secondary text-white hover:text-white": variant === "filled" && color === "secondary" && !disabled,
579
+ "border border-transparent bg-red-500 hover:bg-red-500 focus:ring-red-500 shadow hover:ring-1 hover:ring-red-600 text-white hover:text-white": variant === "filled" && color === "error" && !disabled,
580
+ "border border-transparent bg-slate-200 hover:bg-slate-300 focus:ring-slate-400 shadow hover:ring-1 hover:ring-slate-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": variant === "filled" && color === "text" && !disabled,
581
581
  // Text Variants
582
582
  "border border-transparent text-primary hover:bg-slate-200 dark:hover:bg-gray-900": variant === "text" && color === "primary" && !disabled,
583
583
  "border border-transparent text-secondary hover:bg-secondary-bg": variant === "text" && color === "secondary" && !disabled,
@@ -13666,7 +13666,7 @@ function Chip({
13666
13666
  }
13667
13667
  );
13668
13668
  }
13669
- const buttonClasses = "hover:bg-slate-200 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-50";
13669
+ const buttonClasses = "hover:bg-slate-200 hover:bg-opacity-75 dark:hover:bg-slate-800";
13670
13670
  const baseClasses = "inline-flex items-center justify-center p-2 text-sm font-medium focus:outline-none transition-colors ease-in-out duration-150";
13671
13671
  const colorClasses$1 = "text-slate-600 visited:text-slate-600 dark:text-slate-300 dark:visited:text-gray-300";
13672
13672
  const sizeClasses = {
@@ -16043,7 +16043,7 @@ const Sheet = ({
16043
16043
  overlayClassName,
16044
16044
  ...props
16045
16045
  }) => {
16046
- const [displayed, setDisplayed] = React__default.useState(false);
16046
+ const [displayed, setDisplayed] = useState(false);
16047
16047
  useEffect(() => {
16048
16048
  const timeout = setTimeout(() => {
16049
16049
  setDisplayed(open);
@@ -16073,7 +16073,7 @@ const Sheet = ({
16073
16073
  DialogPrimitive.Overlay,
16074
16074
  {
16075
16075
  className: cls(
16076
- "fixed inset-0 transition-opacity z-20 ease-in-out duration-100 backdrop-blur-sm",
16076
+ "fixed inset-0 transition-opacity z-20 ease-in-out duration-100 backdrop-blur-sm",
16077
16077
  "bg-black bg-opacity-50",
16078
16078
  "dark:bg-gray-900 dark:bg-opacity-60",
16079
16079
  displayed && open ? "opacity-100" : "opacity-0",
@@ -16081,13 +16081,15 @@ const Sheet = ({
16081
16081
  ),
16082
16082
  style: {
16083
16083
  pointerEvents: displayed ? "auto" : "none"
16084
- }
16084
+ },
16085
+ onClick: () => onOpenChange && onOpenChange(false)
16085
16086
  }
16086
16087
  ),
16087
16088
  /* @__PURE__ */ jsx(
16088
16089
  DialogPrimitive.Content,
16089
16090
  {
16090
16091
  ...props,
16092
+ onFocusCapture: (event) => event.preventDefault(),
16091
16093
  className: cls(
16092
16094
  borderClass[side],
16093
16095
  defaultBorderMixin,
@@ -16610,7 +16612,7 @@ function Tab({
16610
16612
  ),
16611
16613
  children: /* @__PURE__ */ jsx("div", { className: cls(
16612
16614
  "uppercase inline-block p-2 px-4 m-2 rounded",
16613
- "hover:bg-slate-100 dark:hover:bg-slate-800"
16615
+ "hover:bg-slate-200 hover:bg-opacity-75 dark:hover:bg-slate-800"
16614
16616
  ), children })
16615
16617
  }
16616
16618
  );
@@ -16729,6 +16731,7 @@ function Popover({
16729
16731
  avoidCollisions,
16730
16732
  enabled = true,
16731
16733
  modal = false,
16734
+ portalContainer,
16732
16735
  className
16733
16736
  }) {
16734
16737
  useInjectStyles("Popover", popoverStyles);
@@ -16742,7 +16745,7 @@ function Popover({
16742
16745
  modal,
16743
16746
  children: [
16744
16747
  /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: trigger }),
16745
- /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
16748
+ /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxs(
16746
16749
  PopoverPrimitive.Content,
16747
16750
  {
16748
16751
  className: cls(