@lets-events/react 9.0.0 → 10.0.0
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 -1118
- package/dist/index.d.ts +3 -1118
- package/dist/index.js +14 -32
- package/dist/index.mjs +14 -29
- package/package.json +1 -1
- package/src/components/Modal.tsx +18 -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,18 @@ 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
|
+
});
|
|
3627
|
+
var ModalOverlay = styled(import_radix_ui.Dialog.Overlay, {
|
|
3628
|
+
position: "fixed",
|
|
3629
|
+
inset: 0,
|
|
3630
|
+
opacity: 1,
|
|
3631
|
+
backgroundColor: "rgba(0, 0, 0, .5)"
|
|
3630
3632
|
});
|
|
3631
3633
|
var ModalHeaderStyled = styled("div", {
|
|
3632
3634
|
borderBottom: "1px solid $neutral300",
|
|
@@ -3642,13 +3644,6 @@ var ModalIconClose = styled(Icon_default, {
|
|
|
3642
3644
|
right: "$24",
|
|
3643
3645
|
cursor: "pointer"
|
|
3644
3646
|
});
|
|
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
3647
|
var ModalTitleStyled = styled(import_radix_ui.Dialog.Title, {
|
|
3653
3648
|
fontFamily: "$default",
|
|
3654
3649
|
lineHeight: "$base",
|
|
@@ -3658,20 +3653,10 @@ var ModalTitleStyled = styled(import_radix_ui.Dialog.Title, {
|
|
|
3658
3653
|
textTransform: "uppercase"
|
|
3659
3654
|
});
|
|
3660
3655
|
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
|
-
]);
|
|
3656
|
+
var _b = _a, { children, title, trigger } = _b, props = __objRest(_b, ["children", "title", "trigger"]);
|
|
3672
3657
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_radix_ui.Dialog.Root, __spreadProps(__spreadValues({}, props), { children: [
|
|
3673
3658
|
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)(
|
|
3659
|
+
/* @__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
3660
|
title && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(ModalHeaderStyled, { children: [
|
|
3676
3661
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ModalTitleStyled, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { typography: "headline6", fontWeight: "medium", children: title }) }),
|
|
3677
3662
|
/* @__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 +8979,6 @@ function Section(_a) {
|
|
|
8994
8979
|
Icon,
|
|
8995
8980
|
InputStyled,
|
|
8996
8981
|
Modal,
|
|
8997
|
-
ModalContentStyled,
|
|
8998
|
-
ModalStyled,
|
|
8999
|
-
ModalTitleStyled,
|
|
9000
8982
|
RadioGroup,
|
|
9001
8983
|
RadioGroupStyled,
|
|
9002
8984
|
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,18 @@ 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
|
+
});
|
|
3549
|
+
var ModalOverlay = styled(ModalRadix.Overlay, {
|
|
3550
|
+
position: "fixed",
|
|
3551
|
+
inset: 0,
|
|
3552
|
+
opacity: 1,
|
|
3553
|
+
backgroundColor: "rgba(0, 0, 0, .5)"
|
|
3549
3554
|
});
|
|
3550
3555
|
var ModalHeaderStyled = styled("div", {
|
|
3551
3556
|
borderBottom: "1px solid $neutral300",
|
|
@@ -3561,13 +3566,6 @@ var ModalIconClose = styled(Icon_default, {
|
|
|
3561
3566
|
right: "$24",
|
|
3562
3567
|
cursor: "pointer"
|
|
3563
3568
|
});
|
|
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
3569
|
var ModalTitleStyled = styled(ModalRadix.Title, {
|
|
3572
3570
|
fontFamily: "$default",
|
|
3573
3571
|
lineHeight: "$base",
|
|
@@ -3577,20 +3575,10 @@ var ModalTitleStyled = styled(ModalRadix.Title, {
|
|
|
3577
3575
|
textTransform: "uppercase"
|
|
3578
3576
|
});
|
|
3579
3577
|
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
|
-
]);
|
|
3578
|
+
var _b = _a, { children, title, trigger } = _b, props = __objRest(_b, ["children", "title", "trigger"]);
|
|
3591
3579
|
return /* @__PURE__ */ jsxs4(ModalRadix.Root, __spreadProps(__spreadValues({}, props), { children: [
|
|
3592
3580
|
trigger && /* @__PURE__ */ jsx13(ModalRadix.Trigger, { asChild: true, children: trigger }),
|
|
3593
|
-
/* @__PURE__ */ jsx13(ModalRadix.Portal, { children: /* @__PURE__ */ jsx13(
|
|
3581
|
+
/* @__PURE__ */ jsx13(ModalRadix.Portal, { children: /* @__PURE__ */ jsx13(ModalOverlay, { children: /* @__PURE__ */ jsxs4(ModalContentStyled, { children: [
|
|
3594
3582
|
title && /* @__PURE__ */ jsxs4(ModalHeaderStyled, { children: [
|
|
3595
3583
|
/* @__PURE__ */ jsx13(ModalTitleStyled, { asChild: true, children: /* @__PURE__ */ jsx13(Text, { typography: "headline6", fontWeight: "medium", children: title }) }),
|
|
3596
3584
|
/* @__PURE__ */ jsx13(ModalRadix.Close, { asChild: true, children: /* @__PURE__ */ jsx13(ModalIconClose, { name: "close", size: "xl" }) })
|
|
@@ -8912,9 +8900,6 @@ export {
|
|
|
8912
8900
|
Icon,
|
|
8913
8901
|
InputStyled,
|
|
8914
8902
|
Modal,
|
|
8915
|
-
ModalContentStyled,
|
|
8916
|
-
ModalStyled,
|
|
8917
|
-
ModalTitleStyled,
|
|
8918
8903
|
RadioGroup,
|
|
8919
8904
|
RadioGroupStyled,
|
|
8920
8905
|
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,18 @@ 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
|
+
});
|
|
24
|
+
|
|
25
|
+
const ModalOverlay = styled(ModalRadix.Overlay, {
|
|
26
|
+
position: "fixed",
|
|
27
|
+
inset: 0,
|
|
28
|
+
opacity: 1,
|
|
29
|
+
backgroundColor: "rgba(0, 0, 0, .5)",
|
|
25
30
|
});
|
|
26
31
|
|
|
27
32
|
const ModalHeaderStyled = styled("div", {
|
|
@@ -40,16 +45,7 @@ const ModalIconClose = styled(Icon, {
|
|
|
40
45
|
cursor: "pointer",
|
|
41
46
|
});
|
|
42
47
|
|
|
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, {
|
|
48
|
+
const ModalTitleStyled = styled(ModalRadix.Title, {
|
|
53
49
|
fontFamily: "$default",
|
|
54
50
|
lineHeight: "$base",
|
|
55
51
|
fontSize: "$18",
|
|
@@ -59,28 +55,17 @@ export const ModalTitleStyled = styled(ModalRadix.Title, {
|
|
|
59
55
|
});
|
|
60
56
|
|
|
61
57
|
export type ModalProps = ComponentProps<typeof ModalRadix.Root> & {
|
|
62
|
-
trigger
|
|
58
|
+
trigger?: React.ReactNode;
|
|
63
59
|
title?: string;
|
|
64
60
|
children: React.ReactNode;
|
|
65
|
-
cancel?: boolean;
|
|
66
|
-
cancelText?: string;
|
|
67
|
-
action?: boolean;
|
|
68
|
-
actionText?: string;
|
|
69
|
-
onAction?: () => void;
|
|
70
61
|
};
|
|
71
62
|
|
|
72
|
-
export function Modal({
|
|
73
|
-
children,
|
|
74
|
-
title,
|
|
75
|
-
trigger,
|
|
76
|
-
onAction,
|
|
77
|
-
...props
|
|
78
|
-
}: ModalProps) {
|
|
63
|
+
export function Modal({ children, title, trigger, ...props }: ModalProps) {
|
|
79
64
|
return (
|
|
80
65
|
<ModalRadix.Root {...props}>
|
|
81
66
|
{trigger && <ModalRadix.Trigger asChild>{trigger}</ModalRadix.Trigger>}
|
|
82
67
|
<ModalRadix.Portal>
|
|
83
|
-
<
|
|
68
|
+
<ModalOverlay>
|
|
84
69
|
<ModalContentStyled>
|
|
85
70
|
{title && (
|
|
86
71
|
<ModalHeaderStyled>
|
|
@@ -96,7 +81,7 @@ export function Modal({
|
|
|
96
81
|
)}
|
|
97
82
|
<Box>{children}</Box>
|
|
98
83
|
</ModalContentStyled>
|
|
99
|
-
</
|
|
84
|
+
</ModalOverlay>
|
|
100
85
|
</ModalRadix.Portal>
|
|
101
86
|
</ModalRadix.Root>
|
|
102
87
|
);
|