@lets-events/react 11.4.0 → 11.5.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/.eslintrc.json +2 -2
- package/.turbo/turbo-build.log +20 -18
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +130 -3
- package/dist/index.mjs +129 -3
- package/package.json +3 -2
- package/src/components/Alert.tsx +303 -303
- package/src/components/Avatar.tsx +55 -55
- package/src/components/Badge.tsx +125 -125
- package/src/components/Box.tsx +3 -3
- package/src/components/Button/index.tsx +16 -16
- package/src/components/Button/styledComponents.ts +287 -287
- package/src/components/ButtonGroup.tsx +484 -484
- package/src/components/Calendar/index.tsx +136 -136
- package/src/components/Calendar/styledComponents.ts +209 -209
- package/src/components/Card.tsx +48 -48
- package/src/components/CheckboxGroup.tsx +196 -196
- package/src/components/Container.tsx +39 -39
- package/src/components/Drawer/index.tsx +48 -48
- package/src/components/Drawer/styledComponents.ts +46 -46
- package/src/components/Dropdown.tsx +167 -167
- package/src/components/Filter.tsx +164 -164
- package/src/components/Flex.tsx +118 -118
- package/src/components/FormFields/ErrorFormMessage.tsx +36 -36
- package/src/components/FormFields/Form.tsx +25 -25
- package/src/components/FormFields/FormLabel.tsx +29 -29
- package/src/components/FormFields/MultiSelectFormField.tsx +59 -65
- package/src/components/FormFields/PhoneFormField.tsx +130 -0
- package/src/components/FormFields/TextAreaFormField.tsx +46 -46
- package/src/components/FormFields/TextFormField.tsx +46 -46
- package/src/components/Grid.tsx +137 -137
- package/src/components/Icon.tsx +47 -47
- package/src/components/MenuDropdown/index.tsx +30 -30
- package/src/components/MenuDropdown/styledComponents.ts +31 -31
- package/src/components/Modal.tsx +90 -90
- package/src/components/MultiSelect.tsx +218 -216
- package/src/components/RadioGroup.tsx +210 -210
- package/src/components/Section.tsx +33 -33
- package/src/components/Step.tsx +164 -164
- package/src/components/Switch.tsx +108 -108
- package/src/components/Text.tsx +38 -38
- package/src/components/TextField.tsx +315 -315
- package/src/components/TextareaField.tsx +128 -128
- package/src/components/TimePicker.tsx +298 -298
- package/src/components/Toast/components/ToastItem.tsx +41 -41
- package/src/components/Toast/components/ToastProvider.tsx +63 -63
- package/src/components/Toast/hooks/useToast.ts +12 -12
- package/src/components/Toast/index.tsx +5 -5
- package/src/components/Toast/styles/index.ts +135 -135
- package/src/components/Toast/types/index.ts +46 -46
- package/src/components/Tooltip/index.tsx +66 -66
- package/src/components/Tooltip/styles.ts +77 -77
- package/src/hooks/useOnClickOutside.tsx +20 -20
- package/src/index.tsx +45 -44
- package/src/styles/index.ts +38 -38
- package/src/types/typographyValues.ts +178 -178
- package/tsconfig.json +3 -3
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { styled } from "../../styles";
|
|
2
|
-
|
|
3
|
-
export const MenuDropdownContainerStyled = styled("div", {
|
|
4
|
-
position: "relative",
|
|
5
|
-
width: "fit-content",
|
|
6
|
-
});
|
|
7
|
-
export const TriggerButtonStyled = styled("button", {
|
|
8
|
-
backgroundColor: "$brand500",
|
|
9
|
-
boxShadow: "0px 4px 4px 0px #23354314",
|
|
10
|
-
borderRadius: "$full",
|
|
11
|
-
border: "none",
|
|
12
|
-
height: "1.875rem",
|
|
13
|
-
width: "1.875rem",
|
|
14
|
-
cursor: "pointer",
|
|
15
|
-
});
|
|
16
|
-
export const MenuItemsContainerStyled = styled("div", {
|
|
17
|
-
position: "absolute",
|
|
18
|
-
right: 0,
|
|
19
|
-
top: "2.125rem",
|
|
20
|
-
zIndex: "999",
|
|
21
|
-
width: "fit-content",
|
|
22
|
-
minWidth: "5rem",
|
|
23
|
-
background: "#fff",
|
|
24
|
-
maxWidth: "18.75rem",
|
|
25
|
-
margin: "auto",
|
|
26
|
-
boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.0784313725)",
|
|
27
|
-
border: "1px solid $dark300",
|
|
28
|
-
borderRadius: "0.5rem",
|
|
29
|
-
padding: "0.5rem 0",
|
|
30
|
-
height: "fit-content",
|
|
31
|
-
});
|
|
1
|
+
import { styled } from "../../styles";
|
|
2
|
+
|
|
3
|
+
export const MenuDropdownContainerStyled = styled("div", {
|
|
4
|
+
position: "relative",
|
|
5
|
+
width: "fit-content",
|
|
6
|
+
});
|
|
7
|
+
export const TriggerButtonStyled = styled("button", {
|
|
8
|
+
backgroundColor: "$brand500",
|
|
9
|
+
boxShadow: "0px 4px 4px 0px #23354314",
|
|
10
|
+
borderRadius: "$full",
|
|
11
|
+
border: "none",
|
|
12
|
+
height: "1.875rem",
|
|
13
|
+
width: "1.875rem",
|
|
14
|
+
cursor: "pointer",
|
|
15
|
+
});
|
|
16
|
+
export const MenuItemsContainerStyled = styled("div", {
|
|
17
|
+
position: "absolute",
|
|
18
|
+
right: 0,
|
|
19
|
+
top: "2.125rem",
|
|
20
|
+
zIndex: "999",
|
|
21
|
+
width: "fit-content",
|
|
22
|
+
minWidth: "5rem",
|
|
23
|
+
background: "#fff",
|
|
24
|
+
maxWidth: "18.75rem",
|
|
25
|
+
margin: "auto",
|
|
26
|
+
boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.0784313725)",
|
|
27
|
+
border: "1px solid $dark300",
|
|
28
|
+
borderRadius: "0.5rem",
|
|
29
|
+
padding: "0.5rem 0",
|
|
30
|
+
height: "fit-content",
|
|
31
|
+
});
|
package/src/components/Modal.tsx
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import { ComponentProps } from "react";
|
|
2
|
-
import { styled } from "../styles";
|
|
3
|
-
import { Dialog as ModalRadix } from "radix-ui";
|
|
4
|
-
import Icon from "./Icon";
|
|
5
|
-
import { Box } from "./Box";
|
|
6
|
-
import { Text } from "./Text";
|
|
7
|
-
|
|
8
|
-
const ModalContentStyled = styled(ModalRadix.Content, {
|
|
9
|
-
fontFamily: "$default",
|
|
10
|
-
lineHeight: "$base",
|
|
11
|
-
fontSize: "$13",
|
|
12
|
-
maxWidth: "502px",
|
|
13
|
-
width: "100%",
|
|
14
|
-
border: "1px solid $neutral",
|
|
15
|
-
borderRadius: "$2xl",
|
|
16
|
-
boxShadow:
|
|
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'
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
const ModalHeaderStyled = styled("div", {
|
|
35
|
-
borderBottom: "1px solid $neutral300",
|
|
36
|
-
padding: "$18 $24",
|
|
37
|
-
textAlign: "center",
|
|
38
|
-
position: "relative",
|
|
39
|
-
display: "flex",
|
|
40
|
-
alignItems: "center",
|
|
41
|
-
justifyContent: "center",
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
const ModalIconClose = styled(Icon, {
|
|
45
|
-
position: "absolute",
|
|
46
|
-
right: "$24",
|
|
47
|
-
cursor: "pointer",
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
const ModalTitleStyled = styled(ModalRadix.Title, {
|
|
51
|
-
fontFamily: "$default",
|
|
52
|
-
lineHeight: "$base",
|
|
53
|
-
fontSize: "$18",
|
|
54
|
-
fontWeight: "medium",
|
|
55
|
-
fontStyle: "normal",
|
|
56
|
-
textTransform: "uppercase",
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
export type ModalProps = ComponentProps<typeof ModalRadix.Root> & {
|
|
60
|
-
trigger?: React.ReactNode;
|
|
61
|
-
title?: string;
|
|
62
|
-
children: React.ReactNode;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export function Modal({ children, title, trigger, ...props }: ModalProps) {
|
|
66
|
-
return (
|
|
67
|
-
<ModalRadix.Root {...props}>
|
|
68
|
-
{trigger && <ModalRadix.Trigger asChild>{trigger}</ModalRadix.Trigger>}
|
|
69
|
-
<ModalRadix.Portal>
|
|
70
|
-
<ModalOverlay>
|
|
71
|
-
<ModalContentStyled>
|
|
72
|
-
{title && (
|
|
73
|
-
<ModalHeaderStyled>
|
|
74
|
-
<ModalTitleStyled asChild>
|
|
75
|
-
<Text typography={"headline6"} fontWeight={"medium"}>
|
|
76
|
-
{title}
|
|
77
|
-
</Text>
|
|
78
|
-
</ModalTitleStyled>
|
|
79
|
-
<ModalRadix.Close asChild>
|
|
80
|
-
<ModalIconClose name="close" size="xl" />
|
|
81
|
-
</ModalRadix.Close>
|
|
82
|
-
</ModalHeaderStyled>
|
|
83
|
-
)}
|
|
84
|
-
<Box>{children}</Box>
|
|
85
|
-
</ModalContentStyled>
|
|
86
|
-
</ModalOverlay>
|
|
87
|
-
</ModalRadix.Portal>
|
|
88
|
-
</ModalRadix.Root>
|
|
89
|
-
);
|
|
90
|
-
}
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { styled } from "../styles";
|
|
3
|
+
import { Dialog as ModalRadix } from "radix-ui";
|
|
4
|
+
import Icon from "./Icon";
|
|
5
|
+
import { Box } from "./Box";
|
|
6
|
+
import { Text } from "./Text";
|
|
7
|
+
|
|
8
|
+
const ModalContentStyled = styled(ModalRadix.Content, {
|
|
9
|
+
fontFamily: "$default",
|
|
10
|
+
lineHeight: "$base",
|
|
11
|
+
fontSize: "$13",
|
|
12
|
+
maxWidth: "502px",
|
|
13
|
+
width: "100%",
|
|
14
|
+
border: "1px solid $neutral",
|
|
15
|
+
borderRadius: "$2xl",
|
|
16
|
+
boxShadow:
|
|
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'
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const ModalHeaderStyled = styled("div", {
|
|
35
|
+
borderBottom: "1px solid $neutral300",
|
|
36
|
+
padding: "$18 $24",
|
|
37
|
+
textAlign: "center",
|
|
38
|
+
position: "relative",
|
|
39
|
+
display: "flex",
|
|
40
|
+
alignItems: "center",
|
|
41
|
+
justifyContent: "center",
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const ModalIconClose = styled(Icon, {
|
|
45
|
+
position: "absolute",
|
|
46
|
+
right: "$24",
|
|
47
|
+
cursor: "pointer",
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const ModalTitleStyled = styled(ModalRadix.Title, {
|
|
51
|
+
fontFamily: "$default",
|
|
52
|
+
lineHeight: "$base",
|
|
53
|
+
fontSize: "$18",
|
|
54
|
+
fontWeight: "medium",
|
|
55
|
+
fontStyle: "normal",
|
|
56
|
+
textTransform: "uppercase",
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export type ModalProps = ComponentProps<typeof ModalRadix.Root> & {
|
|
60
|
+
trigger?: React.ReactNode;
|
|
61
|
+
title?: string;
|
|
62
|
+
children: React.ReactNode;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export function Modal({ children, title, trigger, ...props }: ModalProps) {
|
|
66
|
+
return (
|
|
67
|
+
<ModalRadix.Root {...props}>
|
|
68
|
+
{trigger && <ModalRadix.Trigger asChild>{trigger}</ModalRadix.Trigger>}
|
|
69
|
+
<ModalRadix.Portal>
|
|
70
|
+
<ModalOverlay>
|
|
71
|
+
<ModalContentStyled>
|
|
72
|
+
{title && (
|
|
73
|
+
<ModalHeaderStyled>
|
|
74
|
+
<ModalTitleStyled asChild>
|
|
75
|
+
<Text typography={"headline6"} fontWeight={"medium"}>
|
|
76
|
+
{title}
|
|
77
|
+
</Text>
|
|
78
|
+
</ModalTitleStyled>
|
|
79
|
+
<ModalRadix.Close asChild>
|
|
80
|
+
<ModalIconClose name="close" size="xl" />
|
|
81
|
+
</ModalRadix.Close>
|
|
82
|
+
</ModalHeaderStyled>
|
|
83
|
+
)}
|
|
84
|
+
<Box>{children}</Box>
|
|
85
|
+
</ModalContentStyled>
|
|
86
|
+
</ModalOverlay>
|
|
87
|
+
</ModalRadix.Portal>
|
|
88
|
+
</ModalRadix.Root>
|
|
89
|
+
);
|
|
90
|
+
}
|