@lets-events/react 12.2.11 → 12.2.12
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +36 -8
- package/dist/index.mjs +36 -8
- package/package.json +1 -1
- package/src/components/Modal.tsx +22 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @lets-events/react@12.2.
|
|
2
|
+
> @lets-events/react@12.2.12 build
|
|
3
3
|
> tsup src/index.tsx --format esm,cjs --dts --external react
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
[34mCLI[39m Target: es6
|
|
10
10
|
[34mESM[39m Build start
|
|
11
11
|
[34mCJS[39m Build start
|
|
12
|
-
[32mESM[39m [1mdist\index.mjs [22m[32m380.
|
|
13
|
-
[32mESM[39m ⚡️ Build success in
|
|
14
|
-
[32mCJS[39m [1mdist\index.js [22m[32m394.
|
|
15
|
-
[32mCJS[39m ⚡️ Build success in
|
|
12
|
+
[32mESM[39m [1mdist\index.mjs [22m[32m380.57 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 234ms
|
|
14
|
+
[32mCJS[39m [1mdist\index.js [22m[32m394.54 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 235ms
|
|
16
16
|
[34mDTS[39m Build start
|
|
17
|
-
[32mDTS[39m ⚡️ Build success in
|
|
18
|
-
[32mDTS[39m [1mdist\index.d.mts [22m[32m398.
|
|
19
|
-
[32mDTS[39m [1mdist\index.d.ts [22m[32m398.
|
|
17
|
+
[32mDTS[39m ⚡️ Build success in 4601ms
|
|
18
|
+
[32mDTS[39m [1mdist\index.d.mts [22m[32m398.61 KB[39m
|
|
19
|
+
[32mDTS[39m [1mdist\index.d.ts [22m[32m398.61 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -4280,8 +4280,10 @@ type ModalProps = ComponentProps<typeof Dialog.Root> & {
|
|
|
4280
4280
|
trigger?: React.ReactNode;
|
|
4281
4281
|
title?: string;
|
|
4282
4282
|
children: React.ReactNode;
|
|
4283
|
+
zIndex?: number;
|
|
4284
|
+
maxWidth?: number;
|
|
4283
4285
|
};
|
|
4284
|
-
declare function Modal({ children, title, trigger, ...props }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
4286
|
+
declare function Modal({ children, title, trigger, zIndex, maxWidth, ...props }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
4285
4287
|
|
|
4286
4288
|
type MenuDropdownProps = HTMLAttributes<HTMLDivElement> & {
|
|
4287
4289
|
children: ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -4280,8 +4280,10 @@ type ModalProps = ComponentProps<typeof Dialog.Root> & {
|
|
|
4280
4280
|
trigger?: React.ReactNode;
|
|
4281
4281
|
title?: string;
|
|
4282
4282
|
children: React.ReactNode;
|
|
4283
|
+
zIndex?: number;
|
|
4284
|
+
maxWidth?: number;
|
|
4283
4285
|
};
|
|
4284
|
-
declare function Modal({ children, title, trigger, ...props }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
4286
|
+
declare function Modal({ children, title, trigger, zIndex, maxWidth, ...props }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
4285
4287
|
|
|
4286
4288
|
type MenuDropdownProps = HTMLAttributes<HTMLDivElement> & {
|
|
4287
4289
|
children: ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -3732,16 +3732,44 @@ var ModalTitleStyled = styled(import_radix_ui.Dialog.Title, {
|
|
|
3732
3732
|
textTransform: "uppercase"
|
|
3733
3733
|
});
|
|
3734
3734
|
function Modal(_a) {
|
|
3735
|
-
var _b = _a, {
|
|
3735
|
+
var _b = _a, {
|
|
3736
|
+
children,
|
|
3737
|
+
title,
|
|
3738
|
+
trigger,
|
|
3739
|
+
zIndex,
|
|
3740
|
+
maxWidth
|
|
3741
|
+
} = _b, props = __objRest(_b, [
|
|
3742
|
+
"children",
|
|
3743
|
+
"title",
|
|
3744
|
+
"trigger",
|
|
3745
|
+
"zIndex",
|
|
3746
|
+
"maxWidth"
|
|
3747
|
+
]);
|
|
3736
3748
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_radix_ui.Dialog.Root, __spreadProps(__spreadValues({}, props), { children: [
|
|
3737
3749
|
trigger && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui.Dialog.Trigger, { asChild: true, children: trigger }),
|
|
3738
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui.Dialog.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3750
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui.Dialog.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3751
|
+
ModalOverlay,
|
|
3752
|
+
{
|
|
3753
|
+
css: {
|
|
3754
|
+
zIndex
|
|
3755
|
+
},
|
|
3756
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3757
|
+
ModalContentStyled,
|
|
3758
|
+
{
|
|
3759
|
+
css: {
|
|
3760
|
+
maxWidth
|
|
3761
|
+
},
|
|
3762
|
+
children: [
|
|
3763
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(ModalHeaderStyled, { children: [
|
|
3764
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ModalTitleStyled, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { typography: "headline6", fontWeight: "medium", children: title }) }),
|
|
3765
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui.Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ModalIconClose, { name: "close", size: "xl" }) })
|
|
3766
|
+
] }),
|
|
3767
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Box, { children })
|
|
3768
|
+
]
|
|
3769
|
+
}
|
|
3770
|
+
)
|
|
3771
|
+
}
|
|
3772
|
+
) })
|
|
3745
3773
|
] }));
|
|
3746
3774
|
}
|
|
3747
3775
|
|
package/dist/index.mjs
CHANGED
|
@@ -3620,16 +3620,44 @@ var ModalTitleStyled = styled(ModalRadix.Title, {
|
|
|
3620
3620
|
textTransform: "uppercase"
|
|
3621
3621
|
});
|
|
3622
3622
|
function Modal(_a) {
|
|
3623
|
-
var _b = _a, {
|
|
3623
|
+
var _b = _a, {
|
|
3624
|
+
children,
|
|
3625
|
+
title,
|
|
3626
|
+
trigger,
|
|
3627
|
+
zIndex,
|
|
3628
|
+
maxWidth
|
|
3629
|
+
} = _b, props = __objRest(_b, [
|
|
3630
|
+
"children",
|
|
3631
|
+
"title",
|
|
3632
|
+
"trigger",
|
|
3633
|
+
"zIndex",
|
|
3634
|
+
"maxWidth"
|
|
3635
|
+
]);
|
|
3624
3636
|
return /* @__PURE__ */ jsxs4(ModalRadix.Root, __spreadProps(__spreadValues({}, props), { children: [
|
|
3625
3637
|
trigger && /* @__PURE__ */ jsx13(ModalRadix.Trigger, { asChild: true, children: trigger }),
|
|
3626
|
-
/* @__PURE__ */ jsx13(ModalRadix.Portal, { children: /* @__PURE__ */ jsx13(
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3638
|
+
/* @__PURE__ */ jsx13(ModalRadix.Portal, { children: /* @__PURE__ */ jsx13(
|
|
3639
|
+
ModalOverlay,
|
|
3640
|
+
{
|
|
3641
|
+
css: {
|
|
3642
|
+
zIndex
|
|
3643
|
+
},
|
|
3644
|
+
children: /* @__PURE__ */ jsxs4(
|
|
3645
|
+
ModalContentStyled,
|
|
3646
|
+
{
|
|
3647
|
+
css: {
|
|
3648
|
+
maxWidth
|
|
3649
|
+
},
|
|
3650
|
+
children: [
|
|
3651
|
+
title && /* @__PURE__ */ jsxs4(ModalHeaderStyled, { children: [
|
|
3652
|
+
/* @__PURE__ */ jsx13(ModalTitleStyled, { asChild: true, children: /* @__PURE__ */ jsx13(Text, { typography: "headline6", fontWeight: "medium", children: title }) }),
|
|
3653
|
+
/* @__PURE__ */ jsx13(ModalRadix.Close, { asChild: true, children: /* @__PURE__ */ jsx13(ModalIconClose, { name: "close", size: "xl" }) })
|
|
3654
|
+
] }),
|
|
3655
|
+
/* @__PURE__ */ jsx13(Box, { children })
|
|
3656
|
+
]
|
|
3657
|
+
}
|
|
3658
|
+
)
|
|
3659
|
+
}
|
|
3660
|
+
) })
|
|
3633
3661
|
] }));
|
|
3634
3662
|
}
|
|
3635
3663
|
|
package/package.json
CHANGED
package/src/components/Modal.tsx
CHANGED
|
@@ -20,7 +20,7 @@ const ModalContentStyled = styled(ModalRadix.Content, {
|
|
|
20
20
|
left: "50%",
|
|
21
21
|
transform: "translate(-50%, -50%)",
|
|
22
22
|
backgroundColor: "$dark50",
|
|
23
|
-
zIndex:
|
|
23
|
+
zIndex: "10001",
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
const ModalOverlay = styled(ModalRadix.Overlay, {
|
|
@@ -28,7 +28,7 @@ const ModalOverlay = styled(ModalRadix.Overlay, {
|
|
|
28
28
|
inset: 0,
|
|
29
29
|
opacity: 1,
|
|
30
30
|
backgroundColor: "rgba(0, 0, 0, .5)",
|
|
31
|
-
zIndex:
|
|
31
|
+
zIndex: "10000",
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
const ModalHeaderStyled = styled("div", {
|
|
@@ -60,15 +60,32 @@ export type ModalProps = ComponentProps<typeof ModalRadix.Root> & {
|
|
|
60
60
|
trigger?: React.ReactNode;
|
|
61
61
|
title?: string;
|
|
62
62
|
children: React.ReactNode;
|
|
63
|
+
zIndex?: number;
|
|
64
|
+
maxWidth?: number;
|
|
63
65
|
};
|
|
64
66
|
|
|
65
|
-
export function Modal({
|
|
67
|
+
export function Modal({
|
|
68
|
+
children,
|
|
69
|
+
title,
|
|
70
|
+
trigger,
|
|
71
|
+
zIndex,
|
|
72
|
+
maxWidth,
|
|
73
|
+
...props
|
|
74
|
+
}: ModalProps) {
|
|
66
75
|
return (
|
|
67
76
|
<ModalRadix.Root {...props}>
|
|
68
77
|
{trigger && <ModalRadix.Trigger asChild>{trigger}</ModalRadix.Trigger>}
|
|
69
78
|
<ModalRadix.Portal>
|
|
70
|
-
<ModalOverlay
|
|
71
|
-
|
|
79
|
+
<ModalOverlay
|
|
80
|
+
css={{
|
|
81
|
+
zIndex,
|
|
82
|
+
}}
|
|
83
|
+
>
|
|
84
|
+
<ModalContentStyled
|
|
85
|
+
css={{
|
|
86
|
+
maxWidth,
|
|
87
|
+
}}
|
|
88
|
+
>
|
|
72
89
|
{title && (
|
|
73
90
|
<ModalHeaderStyled>
|
|
74
91
|
<ModalTitleStyled asChild>
|