@lets-events/react 12.2.12 → 12.2.13
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 +6 -6
- package/CHANGELOG.md +6 -0
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
- package/src/components/Modal.tsx +7 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @lets-events/react@12.2.
|
|
2
|
+
> @lets-events/react@12.2.13 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.64 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 231ms
|
|
14
|
+
[32mCJS[39m [1mdist\index.js [22m[32m394.61 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 232ms
|
|
16
16
|
[34mDTS[39m Build start
|
|
17
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
+
[32mDTS[39m ⚡️ Build success in 4562ms
|
|
18
18
|
[32mDTS[39m [1mdist\index.d.mts [22m[32m398.61 KB[39m
|
|
19
19
|
[32mDTS[39m [1mdist\index.d.ts [22m[32m398.61 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -3691,7 +3691,7 @@ var ModalContentStyled = styled(import_radix_ui.Dialog.Content, {
|
|
|
3691
3691
|
lineHeight: "$base",
|
|
3692
3692
|
fontSize: "$13",
|
|
3693
3693
|
maxWidth: "502px",
|
|
3694
|
-
width: "100%",
|
|
3694
|
+
width: "calc(100% - 2rem)",
|
|
3695
3695
|
border: "1px solid $neutral",
|
|
3696
3696
|
borderRadius: "$2xl",
|
|
3697
3697
|
boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.08), 0px 2px 4px 0px rgba(35, 53, 67, 0.16)",
|
|
@@ -3745,6 +3745,7 @@ function Modal(_a) {
|
|
|
3745
3745
|
"zIndex",
|
|
3746
3746
|
"maxWidth"
|
|
3747
3747
|
]);
|
|
3748
|
+
const { onOpenChange } = props;
|
|
3748
3749
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_radix_ui.Dialog.Root, __spreadProps(__spreadValues({}, props), { children: [
|
|
3749
3750
|
trigger && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui.Dialog.Trigger, { asChild: true, children: trigger }),
|
|
3750
3751
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui.Dialog.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
@@ -3762,7 +3763,7 @@ function Modal(_a) {
|
|
|
3762
3763
|
children: [
|
|
3763
3764
|
title && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(ModalHeaderStyled, { children: [
|
|
3764
3765
|
/* @__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
|
+
(onOpenChange || trigger) && /* @__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
|
] }),
|
|
3767
3768
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Box, { children })
|
|
3768
3769
|
]
|
package/dist/index.mjs
CHANGED
|
@@ -3579,7 +3579,7 @@ var ModalContentStyled = styled(ModalRadix.Content, {
|
|
|
3579
3579
|
lineHeight: "$base",
|
|
3580
3580
|
fontSize: "$13",
|
|
3581
3581
|
maxWidth: "502px",
|
|
3582
|
-
width: "100%",
|
|
3582
|
+
width: "calc(100% - 2rem)",
|
|
3583
3583
|
border: "1px solid $neutral",
|
|
3584
3584
|
borderRadius: "$2xl",
|
|
3585
3585
|
boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.08), 0px 2px 4px 0px rgba(35, 53, 67, 0.16)",
|
|
@@ -3633,6 +3633,7 @@ function Modal(_a) {
|
|
|
3633
3633
|
"zIndex",
|
|
3634
3634
|
"maxWidth"
|
|
3635
3635
|
]);
|
|
3636
|
+
const { onOpenChange } = props;
|
|
3636
3637
|
return /* @__PURE__ */ jsxs4(ModalRadix.Root, __spreadProps(__spreadValues({}, props), { children: [
|
|
3637
3638
|
trigger && /* @__PURE__ */ jsx13(ModalRadix.Trigger, { asChild: true, children: trigger }),
|
|
3638
3639
|
/* @__PURE__ */ jsx13(ModalRadix.Portal, { children: /* @__PURE__ */ jsx13(
|
|
@@ -3650,7 +3651,7 @@ function Modal(_a) {
|
|
|
3650
3651
|
children: [
|
|
3651
3652
|
title && /* @__PURE__ */ jsxs4(ModalHeaderStyled, { children: [
|
|
3652
3653
|
/* @__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
|
+
(onOpenChange || trigger) && /* @__PURE__ */ jsx13(ModalRadix.Close, { asChild: true, children: /* @__PURE__ */ jsx13(ModalIconClose, { name: "close", size: "xl" }) })
|
|
3654
3655
|
] }),
|
|
3655
3656
|
/* @__PURE__ */ jsx13(Box, { children })
|
|
3656
3657
|
]
|
package/package.json
CHANGED
package/src/components/Modal.tsx
CHANGED
|
@@ -10,7 +10,7 @@ const ModalContentStyled = styled(ModalRadix.Content, {
|
|
|
10
10
|
lineHeight: "$base",
|
|
11
11
|
fontSize: "$13",
|
|
12
12
|
maxWidth: "502px",
|
|
13
|
-
width: "100%",
|
|
13
|
+
width: "calc(100% - 2rem)",
|
|
14
14
|
border: "1px solid $neutral",
|
|
15
15
|
borderRadius: "$2xl",
|
|
16
16
|
boxShadow:
|
|
@@ -72,6 +72,7 @@ export function Modal({
|
|
|
72
72
|
maxWidth,
|
|
73
73
|
...props
|
|
74
74
|
}: ModalProps) {
|
|
75
|
+
const { onOpenChange } = props;
|
|
75
76
|
return (
|
|
76
77
|
<ModalRadix.Root {...props}>
|
|
77
78
|
{trigger && <ModalRadix.Trigger asChild>{trigger}</ModalRadix.Trigger>}
|
|
@@ -93,9 +94,11 @@ export function Modal({
|
|
|
93
94
|
{title}
|
|
94
95
|
</Text>
|
|
95
96
|
</ModalTitleStyled>
|
|
96
|
-
|
|
97
|
-
<
|
|
98
|
-
|
|
97
|
+
{(onOpenChange || trigger) && (
|
|
98
|
+
<ModalRadix.Close asChild>
|
|
99
|
+
<ModalIconClose name="close" size="xl" />
|
|
100
|
+
</ModalRadix.Close>
|
|
101
|
+
)}
|
|
99
102
|
</ModalHeaderStyled>
|
|
100
103
|
)}
|
|
101
104
|
<Box>{children}</Box>
|