@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @lets-events/react@12.2.11 build
2
+ > @lets-events/react@12.2.12 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.26 KB
13
- ESM ⚡️ Build success in 222ms
14
- CJS dist\index.js 394.23 KB
15
- CJS ⚡️ Build success in 223ms
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
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 4608ms
18
- DTS dist\index.d.mts 398.55 KB
19
- DTS dist\index.d.ts 398.55 KB
17
+ DTS ⚡️ Build success in 4601ms
18
+ DTS dist\index.d.mts 398.61 KB
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.12
4
+
5
+ ### Patch Changes
6
+
7
+ - add extra modal props
8
+
3
9
  ## 12.2.11
4
10
 
5
11
  ### Patch Changes
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, { children, title, trigger } = _b, props = __objRest(_b, ["children", "title", "trigger"]);
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)(ModalOverlay, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(ModalContentStyled, { children: [
3739
- title && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(ModalHeaderStyled, { children: [
3740
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ModalTitleStyled, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { typography: "headline6", fontWeight: "medium", children: title }) }),
3741
- /* @__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" }) })
3742
- ] }),
3743
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Box, { children })
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, { children, title, trigger } = _b, props = __objRest(_b, ["children", "title", "trigger"]);
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(ModalOverlay, { children: /* @__PURE__ */ jsxs4(ModalContentStyled, { children: [
3627
- title && /* @__PURE__ */ jsxs4(ModalHeaderStyled, { children: [
3628
- /* @__PURE__ */ jsx13(ModalTitleStyled, { asChild: true, children: /* @__PURE__ */ jsx13(Text, { typography: "headline6", fontWeight: "medium", children: title }) }),
3629
- /* @__PURE__ */ jsx13(ModalRadix.Close, { asChild: true, children: /* @__PURE__ */ jsx13(ModalIconClose, { name: "close", size: "xl" }) })
3630
- ] }),
3631
- /* @__PURE__ */ jsx13(Box, { children })
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "12.2.11",
3
+ "version": "12.2.12",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -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: '10001'
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: '10000'
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({ children, title, trigger, ...props }: ModalProps) {
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
- <ModalContentStyled>
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>