@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @lets-events/react@12.2.12 build
2
+ > @lets-events/react@12.2.13 build
3
3
  > tsup src/index.tsx --format esm,cjs --dts --external react
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -9,11 +9,11 @@
9
9
  CLI Target: es6
10
10
  ESM Build start
11
11
  CJS Build start
12
- ESM dist\index.mjs 380.57 KB
13
- ESM ⚡️ Build success in 234ms
14
- CJS dist\index.js 394.54 KB
15
- CJS ⚡️ Build success in 235ms
12
+ ESM dist\index.mjs 380.64 KB
13
+ ESM ⚡️ Build success in 231ms
14
+ CJS dist\index.js 394.61 KB
15
+ CJS ⚡️ Build success in 232ms
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 4601ms
17
+ DTS ⚡️ Build success in 4562ms
18
18
  DTS dist\index.d.mts 398.61 KB
19
19
  DTS dist\index.d.ts 398.61 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.2.13
4
+
5
+ ### Patch Changes
6
+
7
+ - new modal props
8
+
3
9
  ## 12.2.12
4
10
 
5
11
  ### Patch Changes
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "12.2.12",
3
+ "version": "12.2.13",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -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
- <ModalRadix.Close asChild>
97
- <ModalIconClose name="close" size="xl" />
98
- </ModalRadix.Close>
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>