@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.
- package/dist/components/Dialog.d.ts +2 -1
- package/dist/index.es.js +88 -78
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +88 -78
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Dialog.tsx +3 -1
@@ -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(
|
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
|
-
|
28025
|
-
|
28026
|
-
|
28027
|
-
|
28028
|
-
$[
|
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
|
-
|
28031
|
+
t8 = $[4];
|
28032
28032
|
}
|
28033
|
-
const
|
28034
|
-
let
|
28035
|
-
if ($[5] !==
|
28036
|
-
|
28037
|
-
|
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
|
-
|
28040
|
+
t10 = $[6];
|
28043
28041
|
}
|
28042
|
+
const t11 = displayed ? "auto" : "none";
|
28044
28043
|
let t12;
|
28045
|
-
if ($[7] !== t11
|
28046
|
-
t12 =
|
28044
|
+
if ($[7] !== t11) {
|
28045
|
+
t12 = {
|
28046
|
+
pointerEvents: t11
|
28047
|
+
};
|
28047
28048
|
$[7] = t11;
|
28048
|
-
$[8] =
|
28049
|
-
$[9] = t12;
|
28049
|
+
$[8] = t12;
|
28050
28050
|
} else {
|
28051
|
-
t12 = $[
|
28051
|
+
t12 = $[8];
|
28052
28052
|
}
|
28053
28053
|
let t13;
|
28054
|
-
if ($[10]
|
28055
|
-
t13 =
|
28056
|
-
$[
|
28057
|
-
|
28058
|
-
|
28059
|
-
}
|
28060
|
-
|
28061
|
-
|
28062
|
-
|
28063
|
-
|
28064
|
-
|
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
|
-
|
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 ($[
|
28082
|
-
t21 =
|
28083
|
-
$[
|
28084
|
-
$[
|
28085
|
-
$[
|
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 = $[
|
28087
|
+
t21 = $[20];
|
28088
28088
|
}
|
28089
28089
|
let t22;
|
28090
|
-
if ($[
|
28091
|
-
t22 = /* @__PURE__ */ jsx(
|
28092
|
-
$[
|
28093
|
-
$[
|
28094
|
-
$[
|
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 = $[
|
28096
|
+
t22 = $[23];
|
28100
28097
|
}
|
28101
28098
|
let t23;
|
28102
|
-
if ($[
|
28103
|
-
t23 = /* @__PURE__ */ jsx(DialogPrimitive.
|
28104
|
-
|
28105
|
-
|
28106
|
-
]
|
28107
|
-
$[
|
28108
|
-
$[
|
28109
|
-
$[
|
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 = $[
|
28108
|
+
t23 = $[29];
|
28112
28109
|
}
|
28113
28110
|
let t24;
|
28114
|
-
if ($[
|
28115
|
-
t24 = /* @__PURE__ */ jsx(DialogPrimitive.
|
28116
|
-
|
28117
|
-
|
28118
|
-
|
28119
|
-
$[
|
28120
|
-
$[
|
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 = $[
|
28121
|
+
t24 = $[33];
|
28123
28122
|
}
|
28124
|
-
|
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
|
}
|