@firecms/ui 3.0.0-canary.220 → 3.0.0-canary.221

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.
@@ -4,6 +4,7 @@ export type DialogProps = {
4
4
  onOpenChange?: (open: boolean) => void;
5
5
  children: React.ReactNode;
6
6
  className?: string;
7
+ containerClassName?: string;
7
8
  fullWidth?: boolean;
8
9
  fullHeight?: boolean;
9
10
  fullScreen?: boolean;
@@ -29,5 +30,5 @@ declare const widthClasses: {
29
30
  "7xl": string;
30
31
  full: string;
31
32
  };
32
- export declare const Dialog: ({ open, onOpenChange, children, className, fullWidth, fullHeight, fullScreen, scrollable, maxWidth, modal, onOpenAutoFocus, onEscapeKeyDown, onPointerDownOutside, onInteractOutside }: DialogProps) => import("react/jsx-runtime").JSX.Element;
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;
33
34
  export {};
package/dist/index.es.js CHANGED
@@ -27975,12 +27975,13 @@ const widthClasses = {
27975
27975
  full: "max-w-full min-w-full w-full"
27976
27976
  };
27977
27977
  const Dialog = (t0) => {
27978
- const $ = c(36);
27978
+ const $ = c(39);
27979
27979
  const {
27980
27980
  open,
27981
27981
  onOpenChange,
27982
27982
  children,
27983
27983
  className,
27984
+ containerClassName,
27984
27985
  fullWidth: t1,
27985
27986
  fullHeight,
27986
27987
  fullScreen,
@@ -28021,107 +28022,116 @@ const Dialog = (t0) => {
28021
28022
  }
28022
28023
  useEffect(t5, t6);
28023
28024
  const t7 = displayed || open;
28024
- const t8 = displayed && open ? "opacity-100" : "opacity-0";
28025
- let t9;
28026
- if ($[3] !== t8) {
28027
- t9 = cls("fixed inset-0 transition-opacity z-20 ease-in-out duration-200 bg-black bg-opacity-50 dark:bg-opacity-60 backdrop-blur-sm ", t8, "z-20 fixed top-0 left-0 w-full h-full flex justify-center items-center");
28028
- $[3] = t8;
28029
- $[4] = t9;
28025
+ let t8;
28026
+ if ($[3] !== containerClassName) {
28027
+ t8 = cls("fixed inset-0 z-30", containerClassName);
28028
+ $[3] = containerClassName;
28029
+ $[4] = t8;
28030
28030
  } else {
28031
- t9 = $[4];
28031
+ t8 = $[4];
28032
28032
  }
28033
- const t10 = displayed ? "auto" : "none";
28034
- let t11;
28035
- if ($[5] !== t10) {
28036
- t11 = {
28037
- pointerEvents: t10
28038
- };
28039
- $[5] = t10;
28040
- $[6] = t11;
28033
+ const t9 = displayed && open ? "opacity-100" : "opacity-0";
28034
+ let t10;
28035
+ if ($[5] !== t9) {
28036
+ 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");
28037
+ $[5] = t9;
28038
+ $[6] = t10;
28041
28039
  } else {
28042
- t11 = $[6];
28040
+ t10 = $[6];
28043
28041
  }
28042
+ const t11 = displayed ? "auto" : "none";
28044
28043
  let t12;
28045
- if ($[7] !== t11 || $[8] !== t9) {
28046
- t12 = /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: t9, style: t11 });
28044
+ if ($[7] !== t11) {
28045
+ t12 = {
28046
+ pointerEvents: t11
28047
+ };
28047
28048
  $[7] = t11;
28048
- $[8] = t9;
28049
- $[9] = t12;
28049
+ $[8] = t12;
28050
28050
  } else {
28051
- t12 = $[9];
28051
+ t12 = $[8];
28052
28052
  }
28053
28053
  let t13;
28054
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
28055
- t13 = cls("h-full outline-none flex justify-center items-center z-40 opacity-100 transition-all duration-200 ease-in-out");
28056
- $[10] = t13;
28057
- } else {
28058
- t13 = $[10];
28059
- }
28060
- const t14 = fullWidth && !fullScreen ? "w-11/12" : void 0;
28061
- const t15 = fullHeight && !fullScreen ? "h-full" : void 0;
28062
- const t16 = fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-xl";
28063
- const t17 = scrollable && "overflow-y-auto";
28064
- const t18 = displayed && open ? "opacity-100" : "opacity-0";
28065
- const t19 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
28066
- let t20;
28067
- if ($[11] !== className || $[12] !== t14 || $[13] !== t15 || $[14] !== t16 || $[15] !== t17 || $[16] !== t18 || $[17] !== t19) {
28068
- t20 = cls(paperMixin, "z-30", "relative", "outline-none focus:outline-none", t14, t15, "text-surface-accent-900 dark:text-white", "justify-center items-center", t16, "ease-in-out duration-200", t17, t18, t19, className);
28069
- $[11] = className;
28054
+ if ($[9] !== t10 || $[10] !== t12) {
28055
+ t13 = /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: t10, style: t12 });
28056
+ $[9] = t10;
28057
+ $[10] = t12;
28058
+ $[11] = t13;
28059
+ } else {
28060
+ t13 = $[11];
28061
+ }
28062
+ let t14;
28063
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
28064
+ t14 = cls("h-full outline-none flex justify-center items-center z-40 opacity-100 transition-all duration-200 ease-in-out");
28070
28065
  $[12] = t14;
28071
- $[13] = t15;
28072
- $[14] = t16;
28073
- $[15] = t17;
28074
- $[16] = t18;
28075
- $[17] = t19;
28076
- $[18] = t20;
28077
28066
  } else {
28078
- t20 = $[18];
28067
+ t14 = $[12];
28079
28068
  }
28069
+ const t15 = fullWidth && !fullScreen ? "w-11/12" : void 0;
28070
+ const t16 = fullHeight && !fullScreen ? "h-full" : void 0;
28071
+ const t17 = fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-xl";
28072
+ const t18 = scrollable && "overflow-y-auto";
28073
+ const t19 = displayed && open ? "opacity-100" : "opacity-0";
28074
+ const t20 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
28080
28075
  let t21;
28081
- if ($[19] !== children || $[20] !== t20) {
28082
- t21 = /* @__PURE__ */ jsx("div", { className: t20, children });
28083
- $[19] = children;
28084
- $[20] = t20;
28085
- $[21] = t21;
28076
+ if ($[13] !== className || $[14] !== t15 || $[15] !== t16 || $[16] !== t17 || $[17] !== t18 || $[18] !== t19 || $[19] !== t20) {
28077
+ 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);
28078
+ $[13] = className;
28079
+ $[14] = t15;
28080
+ $[15] = t16;
28081
+ $[16] = t17;
28082
+ $[17] = t18;
28083
+ $[18] = t19;
28084
+ $[19] = t20;
28085
+ $[20] = t21;
28086
28086
  } else {
28087
- t21 = $[21];
28087
+ t21 = $[20];
28088
28088
  }
28089
28089
  let t22;
28090
- if ($[22] !== onEscapeKeyDown || $[23] !== onInteractOutside || $[24] !== onOpenAutoFocus || $[25] !== onPointerDownOutside || $[26] !== t21) {
28091
- t22 = /* @__PURE__ */ jsx(DialogPrimitive.Content, { onEscapeKeyDown, onOpenAutoFocus, onPointerDownOutside, onInteractOutside, className: t13, children: t21 });
28092
- $[22] = onEscapeKeyDown;
28093
- $[23] = onInteractOutside;
28094
- $[24] = onOpenAutoFocus;
28095
- $[25] = onPointerDownOutside;
28096
- $[26] = t21;
28097
- $[27] = t22;
28090
+ if ($[21] !== children || $[22] !== t21) {
28091
+ t22 = /* @__PURE__ */ jsx("div", { className: t21, children });
28092
+ $[21] = children;
28093
+ $[22] = t21;
28094
+ $[23] = t22;
28098
28095
  } else {
28099
- t22 = $[27];
28096
+ t22 = $[23];
28100
28097
  }
28101
28098
  let t23;
28102
- if ($[28] !== t12 || $[29] !== t22) {
28103
- t23 = /* @__PURE__ */ jsx(DialogPrimitive.Portal, { children: /* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-30", children: [
28104
- t12,
28105
- t22
28106
- ] }) });
28107
- $[28] = t12;
28108
- $[29] = t22;
28109
- $[30] = t23;
28099
+ if ($[24] !== onEscapeKeyDown || $[25] !== onInteractOutside || $[26] !== onOpenAutoFocus || $[27] !== onPointerDownOutside || $[28] !== t22) {
28100
+ t23 = /* @__PURE__ */ jsx(DialogPrimitive.Content, { onEscapeKeyDown, onOpenAutoFocus, onPointerDownOutside, onInteractOutside, className: t14, children: t22 });
28101
+ $[24] = onEscapeKeyDown;
28102
+ $[25] = onInteractOutside;
28103
+ $[26] = onOpenAutoFocus;
28104
+ $[27] = onPointerDownOutside;
28105
+ $[28] = t22;
28106
+ $[29] = t23;
28110
28107
  } else {
28111
- t23 = $[30];
28108
+ t23 = $[29];
28112
28109
  }
28113
28110
  let t24;
28114
- if ($[31] !== modal || $[32] !== onOpenChange || $[33] !== t23 || $[34] !== t7) {
28115
- t24 = /* @__PURE__ */ jsx(DialogPrimitive.Root, { open: t7, modal, onOpenChange, children: t23 });
28116
- $[31] = modal;
28117
- $[32] = onOpenChange;
28118
- $[33] = t23;
28119
- $[34] = t7;
28120
- $[35] = t24;
28111
+ if ($[30] !== t13 || $[31] !== t23 || $[32] !== t8) {
28112
+ t24 = /* @__PURE__ */ jsx(DialogPrimitive.Portal, { children: /* @__PURE__ */ jsxs("div", { className: t8, children: [
28113
+ t13,
28114
+ t23
28115
+ ] }) });
28116
+ $[30] = t13;
28117
+ $[31] = t23;
28118
+ $[32] = t8;
28119
+ $[33] = t24;
28121
28120
  } else {
28122
- t24 = $[35];
28121
+ t24 = $[33];
28123
28122
  }
28124
- return t24;
28123
+ let t25;
28124
+ if ($[34] !== modal || $[35] !== onOpenChange || $[36] !== t24 || $[37] !== t7) {
28125
+ t25 = /* @__PURE__ */ jsx(DialogPrimitive.Root, { open: t7, modal, onOpenChange, children: t24 });
28126
+ $[34] = modal;
28127
+ $[35] = onOpenChange;
28128
+ $[36] = t24;
28129
+ $[37] = t7;
28130
+ $[38] = t25;
28131
+ } else {
28132
+ t25 = $[38];
28133
+ }
28134
+ return t25;
28125
28135
  };
28126
28136
  function _temp$2() {
28127
28137
  }