@lets-events/react 9.0.0 → 10.0.1
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 +12 -0
- package/dist/index.d.mts +3 -1118
- package/dist/index.d.ts +3 -1118
- package/dist/index.js +16 -32
- package/dist/index.mjs +16 -29
- package/package.json +1 -1
- package/src/components/Modal.tsx +20 -33
package/dist/index.js
CHANGED
|
@@ -1049,9 +1049,6 @@ __export(index_exports, {
|
|
|
1049
1049
|
Icon: () => Icon,
|
|
1050
1050
|
InputStyled: () => InputStyled,
|
|
1051
1051
|
Modal: () => Modal,
|
|
1052
|
-
ModalContentStyled: () => ModalContentStyled,
|
|
1053
|
-
ModalStyled: () => ModalStyled,
|
|
1054
|
-
ModalTitleStyled: () => ModalTitleStyled,
|
|
1055
1052
|
RadioGroup: () => RadioGroup,
|
|
1056
1053
|
RadioGroupStyled: () => RadioGroupStyled,
|
|
1057
1054
|
RadioItem: () => RadioItem,
|
|
@@ -3612,12 +3609,6 @@ var Box = import_themes13.Box;
|
|
|
3612
3609
|
|
|
3613
3610
|
// src/components/Modal.tsx
|
|
3614
3611
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
3615
|
-
var ModalStyled = styled("div", {
|
|
3616
|
-
fontFamily: "$default",
|
|
3617
|
-
lineHeight: "$base",
|
|
3618
|
-
fontSize: "$13",
|
|
3619
|
-
borderRadius: "$sm"
|
|
3620
|
-
});
|
|
3621
3612
|
var ModalContentStyled = styled(import_radix_ui.Dialog.Content, {
|
|
3622
3613
|
fontFamily: "$default",
|
|
3623
3614
|
lineHeight: "$base",
|
|
@@ -3626,7 +3617,20 @@ var ModalContentStyled = styled(import_radix_ui.Dialog.Content, {
|
|
|
3626
3617
|
width: "100%",
|
|
3627
3618
|
border: "1px solid $neutral",
|
|
3628
3619
|
borderRadius: "$2xl",
|
|
3629
|
-
boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.08), 0px 2px 4px 0px rgba(35, 53, 67, 0.16)"
|
|
3620
|
+
boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.08), 0px 2px 4px 0px rgba(35, 53, 67, 0.16)",
|
|
3621
|
+
position: "fixed",
|
|
3622
|
+
top: "50%",
|
|
3623
|
+
left: "50%",
|
|
3624
|
+
transform: "translate(-50%, -50%)",
|
|
3625
|
+
backgroundColor: "$dark50",
|
|
3626
|
+
zIndex: "10001"
|
|
3627
|
+
});
|
|
3628
|
+
var ModalOverlay = styled(import_radix_ui.Dialog.Overlay, {
|
|
3629
|
+
position: "fixed",
|
|
3630
|
+
inset: 0,
|
|
3631
|
+
opacity: 1,
|
|
3632
|
+
backgroundColor: "rgba(0, 0, 0, .5)",
|
|
3633
|
+
zIndex: "10000"
|
|
3630
3634
|
});
|
|
3631
3635
|
var ModalHeaderStyled = styled("div", {
|
|
3632
3636
|
borderBottom: "1px solid $neutral300",
|
|
@@ -3642,13 +3646,6 @@ var ModalIconClose = styled(Icon_default, {
|
|
|
3642
3646
|
right: "$24",
|
|
3643
3647
|
cursor: "pointer"
|
|
3644
3648
|
});
|
|
3645
|
-
var ModalFooterStyled = styled("div", {
|
|
3646
|
-
borderTop: "1px solid $neutral300",
|
|
3647
|
-
padding: "$16 $24",
|
|
3648
|
-
".modal-footer-flex": {
|
|
3649
|
-
justifyContent: "flex-end"
|
|
3650
|
-
}
|
|
3651
|
-
});
|
|
3652
3649
|
var ModalTitleStyled = styled(import_radix_ui.Dialog.Title, {
|
|
3653
3650
|
fontFamily: "$default",
|
|
3654
3651
|
lineHeight: "$base",
|
|
@@ -3658,20 +3655,10 @@ var ModalTitleStyled = styled(import_radix_ui.Dialog.Title, {
|
|
|
3658
3655
|
textTransform: "uppercase"
|
|
3659
3656
|
});
|
|
3660
3657
|
function Modal(_a) {
|
|
3661
|
-
var _b = _a, {
|
|
3662
|
-
children,
|
|
3663
|
-
title,
|
|
3664
|
-
trigger,
|
|
3665
|
-
onAction
|
|
3666
|
-
} = _b, props = __objRest(_b, [
|
|
3667
|
-
"children",
|
|
3668
|
-
"title",
|
|
3669
|
-
"trigger",
|
|
3670
|
-
"onAction"
|
|
3671
|
-
]);
|
|
3658
|
+
var _b = _a, { children, title, trigger } = _b, props = __objRest(_b, ["children", "title", "trigger"]);
|
|
3672
3659
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_radix_ui.Dialog.Root, __spreadProps(__spreadValues({}, props), { children: [
|
|
3673
3660
|
trigger && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui.Dialog.Trigger, { asChild: true, children: trigger }),
|
|
3674
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui.Dialog.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3661
|
+
/* @__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: [
|
|
3675
3662
|
title && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(ModalHeaderStyled, { children: [
|
|
3676
3663
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ModalTitleStyled, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { typography: "headline6", fontWeight: "medium", children: title }) }),
|
|
3677
3664
|
/* @__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" }) })
|
|
@@ -8994,9 +8981,6 @@ function Section(_a) {
|
|
|
8994
8981
|
Icon,
|
|
8995
8982
|
InputStyled,
|
|
8996
8983
|
Modal,
|
|
8997
|
-
ModalContentStyled,
|
|
8998
|
-
ModalStyled,
|
|
8999
|
-
ModalTitleStyled,
|
|
9000
8984
|
RadioGroup,
|
|
9001
8985
|
RadioGroupStyled,
|
|
9002
8986
|
RadioItem,
|
package/dist/index.mjs
CHANGED
|
@@ -3531,12 +3531,6 @@ var Box = BoxRadix;
|
|
|
3531
3531
|
|
|
3532
3532
|
// src/components/Modal.tsx
|
|
3533
3533
|
import { jsx as jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
3534
|
-
var ModalStyled = styled("div", {
|
|
3535
|
-
fontFamily: "$default",
|
|
3536
|
-
lineHeight: "$base",
|
|
3537
|
-
fontSize: "$13",
|
|
3538
|
-
borderRadius: "$sm"
|
|
3539
|
-
});
|
|
3540
3534
|
var ModalContentStyled = styled(ModalRadix.Content, {
|
|
3541
3535
|
fontFamily: "$default",
|
|
3542
3536
|
lineHeight: "$base",
|
|
@@ -3545,7 +3539,20 @@ var ModalContentStyled = styled(ModalRadix.Content, {
|
|
|
3545
3539
|
width: "100%",
|
|
3546
3540
|
border: "1px solid $neutral",
|
|
3547
3541
|
borderRadius: "$2xl",
|
|
3548
|
-
boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.08), 0px 2px 4px 0px rgba(35, 53, 67, 0.16)"
|
|
3542
|
+
boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.08), 0px 2px 4px 0px rgba(35, 53, 67, 0.16)",
|
|
3543
|
+
position: "fixed",
|
|
3544
|
+
top: "50%",
|
|
3545
|
+
left: "50%",
|
|
3546
|
+
transform: "translate(-50%, -50%)",
|
|
3547
|
+
backgroundColor: "$dark50",
|
|
3548
|
+
zIndex: "10001"
|
|
3549
|
+
});
|
|
3550
|
+
var ModalOverlay = styled(ModalRadix.Overlay, {
|
|
3551
|
+
position: "fixed",
|
|
3552
|
+
inset: 0,
|
|
3553
|
+
opacity: 1,
|
|
3554
|
+
backgroundColor: "rgba(0, 0, 0, .5)",
|
|
3555
|
+
zIndex: "10000"
|
|
3549
3556
|
});
|
|
3550
3557
|
var ModalHeaderStyled = styled("div", {
|
|
3551
3558
|
borderBottom: "1px solid $neutral300",
|
|
@@ -3561,13 +3568,6 @@ var ModalIconClose = styled(Icon_default, {
|
|
|
3561
3568
|
right: "$24",
|
|
3562
3569
|
cursor: "pointer"
|
|
3563
3570
|
});
|
|
3564
|
-
var ModalFooterStyled = styled("div", {
|
|
3565
|
-
borderTop: "1px solid $neutral300",
|
|
3566
|
-
padding: "$16 $24",
|
|
3567
|
-
".modal-footer-flex": {
|
|
3568
|
-
justifyContent: "flex-end"
|
|
3569
|
-
}
|
|
3570
|
-
});
|
|
3571
3571
|
var ModalTitleStyled = styled(ModalRadix.Title, {
|
|
3572
3572
|
fontFamily: "$default",
|
|
3573
3573
|
lineHeight: "$base",
|
|
@@ -3577,20 +3577,10 @@ var ModalTitleStyled = styled(ModalRadix.Title, {
|
|
|
3577
3577
|
textTransform: "uppercase"
|
|
3578
3578
|
});
|
|
3579
3579
|
function Modal(_a) {
|
|
3580
|
-
var _b = _a, {
|
|
3581
|
-
children,
|
|
3582
|
-
title,
|
|
3583
|
-
trigger,
|
|
3584
|
-
onAction
|
|
3585
|
-
} = _b, props = __objRest(_b, [
|
|
3586
|
-
"children",
|
|
3587
|
-
"title",
|
|
3588
|
-
"trigger",
|
|
3589
|
-
"onAction"
|
|
3590
|
-
]);
|
|
3580
|
+
var _b = _a, { children, title, trigger } = _b, props = __objRest(_b, ["children", "title", "trigger"]);
|
|
3591
3581
|
return /* @__PURE__ */ jsxs4(ModalRadix.Root, __spreadProps(__spreadValues({}, props), { children: [
|
|
3592
3582
|
trigger && /* @__PURE__ */ jsx13(ModalRadix.Trigger, { asChild: true, children: trigger }),
|
|
3593
|
-
/* @__PURE__ */ jsx13(ModalRadix.Portal, { children: /* @__PURE__ */ jsx13(
|
|
3583
|
+
/* @__PURE__ */ jsx13(ModalRadix.Portal, { children: /* @__PURE__ */ jsx13(ModalOverlay, { children: /* @__PURE__ */ jsxs4(ModalContentStyled, { children: [
|
|
3594
3584
|
title && /* @__PURE__ */ jsxs4(ModalHeaderStyled, { children: [
|
|
3595
3585
|
/* @__PURE__ */ jsx13(ModalTitleStyled, { asChild: true, children: /* @__PURE__ */ jsx13(Text, { typography: "headline6", fontWeight: "medium", children: title }) }),
|
|
3596
3586
|
/* @__PURE__ */ jsx13(ModalRadix.Close, { asChild: true, children: /* @__PURE__ */ jsx13(ModalIconClose, { name: "close", size: "xl" }) })
|
|
@@ -8912,9 +8902,6 @@ export {
|
|
|
8912
8902
|
Icon,
|
|
8913
8903
|
InputStyled,
|
|
8914
8904
|
Modal,
|
|
8915
|
-
ModalContentStyled,
|
|
8916
|
-
ModalStyled,
|
|
8917
|
-
ModalTitleStyled,
|
|
8918
8905
|
RadioGroup,
|
|
8919
8906
|
RadioGroupStyled,
|
|
8920
8907
|
RadioItem,
|
package/package.json
CHANGED
package/src/components/Modal.tsx
CHANGED
|
@@ -5,14 +5,7 @@ import Icon from "./Icon";
|
|
|
5
5
|
import { Box } from "./Box";
|
|
6
6
|
import { Text } from "./Text";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
fontFamily: "$default",
|
|
10
|
-
lineHeight: "$base",
|
|
11
|
-
fontSize: "$13",
|
|
12
|
-
borderRadius: "$sm",
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export const ModalContentStyled = styled(ModalRadix.Content, {
|
|
8
|
+
const ModalContentStyled = styled(ModalRadix.Content, {
|
|
16
9
|
fontFamily: "$default",
|
|
17
10
|
lineHeight: "$base",
|
|
18
11
|
fontSize: "$13",
|
|
@@ -22,6 +15,20 @@ export const ModalContentStyled = styled(ModalRadix.Content, {
|
|
|
22
15
|
borderRadius: "$2xl",
|
|
23
16
|
boxShadow:
|
|
24
17
|
"0px 4px 4px 0px rgba(35, 53, 67, 0.08), 0px 2px 4px 0px rgba(35, 53, 67, 0.16)",
|
|
18
|
+
position: "fixed",
|
|
19
|
+
top: "50%",
|
|
20
|
+
left: "50%",
|
|
21
|
+
transform: "translate(-50%, -50%)",
|
|
22
|
+
backgroundColor: "$dark50",
|
|
23
|
+
zIndex: '10001'
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const ModalOverlay = styled(ModalRadix.Overlay, {
|
|
27
|
+
position: "fixed",
|
|
28
|
+
inset: 0,
|
|
29
|
+
opacity: 1,
|
|
30
|
+
backgroundColor: "rgba(0, 0, 0, .5)",
|
|
31
|
+
zIndex: '10000'
|
|
25
32
|
});
|
|
26
33
|
|
|
27
34
|
const ModalHeaderStyled = styled("div", {
|
|
@@ -40,16 +47,7 @@ const ModalIconClose = styled(Icon, {
|
|
|
40
47
|
cursor: "pointer",
|
|
41
48
|
});
|
|
42
49
|
|
|
43
|
-
const
|
|
44
|
-
borderTop: "1px solid $neutral300",
|
|
45
|
-
padding: "$16 $24",
|
|
46
|
-
|
|
47
|
-
".modal-footer-flex": {
|
|
48
|
-
justifyContent: "flex-end",
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
export const ModalTitleStyled = styled(ModalRadix.Title, {
|
|
50
|
+
const ModalTitleStyled = styled(ModalRadix.Title, {
|
|
53
51
|
fontFamily: "$default",
|
|
54
52
|
lineHeight: "$base",
|
|
55
53
|
fontSize: "$18",
|
|
@@ -59,28 +57,17 @@ export const ModalTitleStyled = styled(ModalRadix.Title, {
|
|
|
59
57
|
});
|
|
60
58
|
|
|
61
59
|
export type ModalProps = ComponentProps<typeof ModalRadix.Root> & {
|
|
62
|
-
trigger
|
|
60
|
+
trigger?: React.ReactNode;
|
|
63
61
|
title?: string;
|
|
64
62
|
children: React.ReactNode;
|
|
65
|
-
cancel?: boolean;
|
|
66
|
-
cancelText?: string;
|
|
67
|
-
action?: boolean;
|
|
68
|
-
actionText?: string;
|
|
69
|
-
onAction?: () => void;
|
|
70
63
|
};
|
|
71
64
|
|
|
72
|
-
export function Modal({
|
|
73
|
-
children,
|
|
74
|
-
title,
|
|
75
|
-
trigger,
|
|
76
|
-
onAction,
|
|
77
|
-
...props
|
|
78
|
-
}: ModalProps) {
|
|
65
|
+
export function Modal({ children, title, trigger, ...props }: ModalProps) {
|
|
79
66
|
return (
|
|
80
67
|
<ModalRadix.Root {...props}>
|
|
81
68
|
{trigger && <ModalRadix.Trigger asChild>{trigger}</ModalRadix.Trigger>}
|
|
82
69
|
<ModalRadix.Portal>
|
|
83
|
-
<
|
|
70
|
+
<ModalOverlay>
|
|
84
71
|
<ModalContentStyled>
|
|
85
72
|
{title && (
|
|
86
73
|
<ModalHeaderStyled>
|
|
@@ -96,7 +83,7 @@ export function Modal({
|
|
|
96
83
|
)}
|
|
97
84
|
<Box>{children}</Box>
|
|
98
85
|
</ModalContentStyled>
|
|
99
|
-
</
|
|
86
|
+
</ModalOverlay>
|
|
100
87
|
</ModalRadix.Portal>
|
|
101
88
|
</ModalRadix.Root>
|
|
102
89
|
);
|