@lets-events/react 12.2.5 → 12.2.6
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 +21 -19
- package/CHANGELOG.md +7 -1
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +24 -4
- package/dist/index.mjs +24 -4
- package/package.json +1 -1
- 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 +300 -300
- package/src/components/ButtonGroup.tsx +484 -484
- package/src/components/Calendar/index.tsx +146 -146
- package/src/components/Calendar/styledComponents.ts +250 -250
- package/src/components/Card.tsx +48 -48
- package/src/components/CheckboxGroup.tsx +176 -176
- package/src/components/Container.tsx +39 -39
- package/src/components/Drawer/index.tsx +138 -138
- package/src/components/Drawer/styledComponents.ts +52 -52
- package/src/components/Dropdown.tsx +302 -302
- package/src/components/Filter.tsx +164 -164
- package/src/components/Flex.tsx +118 -118
- package/src/components/FormFields/AddressFormFields/CityFormField.tsx +111 -111
- package/src/components/FormFields/AddressFormFields/CountryFormField.tsx +33 -33
- package/src/components/FormFields/AddressFormFields/PostalCodeFormField.tsx +39 -39
- package/src/components/FormFields/AddressFormFields/StateFormField.tsx +32 -32
- package/src/components/FormFields/AddressFormFields/index.tsx +141 -141
- package/src/components/FormFields/BirthDateFormField.tsx +84 -84
- package/src/components/FormFields/CNPJFormField.tsx +87 -87
- package/src/components/FormFields/CPFFormField.tsx +78 -78
- package/src/components/FormFields/CalendarFormField.tsx +92 -92
- package/src/components/FormFields/CheckboxGroupFormField.tsx +91 -91
- package/src/components/FormFields/EmailFormField.tsx +27 -27
- package/src/components/FormFields/Form.tsx +39 -39
- package/src/components/FormFields/IdentityDocumentNumberFormField.tsx +32 -32
- package/src/components/FormFields/MultiSelectFormField.tsx +64 -64
- package/src/components/FormFields/PhoneFormField.tsx +40 -40
- package/src/components/FormFields/RadioGroupFormField.tsx +84 -84
- package/src/components/FormFields/RichEditorFormField.tsx +102 -98
- package/src/components/FormFields/SelectFormField.tsx +93 -93
- package/src/components/FormFields/SwitchFormField.tsx +46 -46
- package/src/components/FormFields/TextAreaFormField.tsx +57 -57
- package/src/components/FormFields/TextFormField.tsx +112 -112
- package/src/components/FormFields/TimePickerFormField.tsx +88 -88
- package/src/components/FormFields/subComponents/ErrorFormMessage.tsx +36 -36
- package/src/components/FormFields/subComponents/FormLabel.tsx +29 -29
- package/src/components/FormFields/utils/validation.ts +23 -23
- package/src/components/Grid.tsx +137 -137
- package/src/components/Icon.tsx +47 -47
- package/src/components/MenuDropdown/index.tsx +38 -38
- package/src/components/MenuDropdown/styledComponents.ts +31 -31
- package/src/components/Modal.tsx +90 -90
- package/src/components/MultiSelect/index.tsx +243 -243
- package/src/components/MultiSelect/styledComponents.ts +160 -160
- package/src/components/RadioGroup.tsx +210 -210
- package/src/components/RichEditor/QuillComponent.tsx +458 -444
- package/src/components/RichEditor/RichEditor.tsx +49 -48
- package/src/components/RichEditor/index.ts +2 -2
- package/src/components/RichEditor/styledComponents.ts +1151 -1151
- 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 +372 -372
- package/src/components/TextareaField.tsx +127 -127
- package/src/components/TimePicker.tsx +328 -328
- 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/useCountries.ts +41 -41
- package/src/hooks/useImageUpload.ts +139 -139
- package/src/hooks/useOnClickOutside.tsx +42 -42
- package/src/index.tsx +68 -68
- package/src/styles/index.ts +38 -38
- package/src/types/typographyValues.ts +178 -178
- package/src/utils/getNestedValue.ts +3 -3
- package/src/utils/states.ts +29 -29
- package/src/utils/uploadService.ts +180 -180
- package/tsconfig.json +3 -3
- package/tsup.config.ts +38 -38
- package/dist/index.css +0 -171
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode, useRef } from "react";
|
|
2
|
-
import { colors, Colors } from "@lets-events/tokens";
|
|
3
|
-
import Icon from "../Icon";
|
|
4
|
-
import {
|
|
5
|
-
DrawerOverlayStyled,
|
|
6
|
-
DrawerContainerStyled,
|
|
7
|
-
DrawerHeaderDiv,
|
|
8
|
-
DrawerHeaderTitle,
|
|
9
|
-
DrawerHeaderCloseButton,
|
|
10
|
-
GoBackButtonStyled,
|
|
11
|
-
} from "./styledComponents";
|
|
12
|
-
import { useOnClickOutside } from "../../hooks/useOnClickOutside";
|
|
13
|
-
import { Flex } from "../Flex";
|
|
14
|
-
|
|
15
|
-
export type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
|
|
16
|
-
isOpen: boolean;
|
|
17
|
-
onClose: () => void;
|
|
18
|
-
width?: string;
|
|
19
|
-
backgroundColor?: keyof Colors;
|
|
20
|
-
title: string;
|
|
21
|
-
children?: ReactNode;
|
|
22
|
-
goBackIcon?: ReactNode;
|
|
23
|
-
goBackAction
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export function Drawer({
|
|
27
|
-
isOpen,
|
|
28
|
-
onClose,
|
|
29
|
-
width,
|
|
30
|
-
backgroundColor,
|
|
31
|
-
title,
|
|
32
|
-
children,
|
|
33
|
-
goBackIcon,
|
|
34
|
-
goBackAction
|
|
35
|
-
}: DrawerProps) {
|
|
36
|
-
if (!isOpen) return null;
|
|
37
|
-
const drawerContainerRef = useRef<HTMLDivElement>(null);
|
|
38
|
-
|
|
39
|
-
useOnClickOutside(drawerContainerRef, (event?: MouseEvent | TouchEvent) => {
|
|
40
|
-
if (!event || !drawerContainerRef.current) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
let target = event.target as Element;
|
|
45
|
-
|
|
46
|
-
if (target.tagName === "HTML" || target.tagName === "BODY") {
|
|
47
|
-
if (event instanceof MouseEvent) {
|
|
48
|
-
const actualElement = document.elementFromPoint(
|
|
49
|
-
event.clientX,
|
|
50
|
-
event.clientY
|
|
51
|
-
);
|
|
52
|
-
if (actualElement) {
|
|
53
|
-
target = actualElement;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
let currentElement: Element | null = target;
|
|
59
|
-
let hierarchy = [];
|
|
60
|
-
while (currentElement && currentElement !== document.body) {
|
|
61
|
-
hierarchy.push({
|
|
62
|
-
tagName: currentElement.tagName,
|
|
63
|
-
className: currentElement.className,
|
|
64
|
-
id: currentElement.id,
|
|
65
|
-
attributes: Array.from(currentElement.attributes || []).map((attr) => ({
|
|
66
|
-
name: attr.name,
|
|
67
|
-
value: attr.value,
|
|
68
|
-
})),
|
|
69
|
-
});
|
|
70
|
-
currentElement = currentElement.parentElement;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (drawerContainerRef.current?.contains(target)) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
const isDropdownOpen =
|
|
77
|
-
target.closest("[data-radix-popper-content-wrapper]") ||
|
|
78
|
-
target.closest('[role="dialog"]') ||
|
|
79
|
-
target.closest('[data-state="open"]') ||
|
|
80
|
-
target.closest("[data-radix-dropdown-menu-content]") ||
|
|
81
|
-
target.closest("[data-radix-dropdown-menu-root]") ||
|
|
82
|
-
target.closest("[data-radix-dropdown-menu-trigger]") ||
|
|
83
|
-
target.closest("[data-radix-dropdown-menu-portal]") ||
|
|
84
|
-
target.closest("[data-radix-dropdown-menu-item]") ||
|
|
85
|
-
target.closest("[data-radix-dropdown-menu-checkbox-item]") ||
|
|
86
|
-
target.closest("[data-radix-dropdown-menu-radio-item]") ||
|
|
87
|
-
target.closest("[data-radix-dropdown-menu-separator]") ||
|
|
88
|
-
target.closest("[data-radix-dropdown-menu-label]") ||
|
|
89
|
-
target.closest("[data-radix-dropdown-menu-group]") ||
|
|
90
|
-
target.closest("[data-radix-dropdown-menu-sub]") ||
|
|
91
|
-
target.closest("[data-radix-dropdown-menu-sub-trigger]") ||
|
|
92
|
-
target.closest("[data-radix-dropdown-menu-sub-content]") ||
|
|
93
|
-
target.closest("[data-radix-dropdown-menu-radio-group]");
|
|
94
|
-
|
|
95
|
-
const shouldPreventClose =
|
|
96
|
-
isDropdownOpen ||
|
|
97
|
-
target.closest("[data-radix-dropdown-menu-root]") ||
|
|
98
|
-
target.closest("[data-radix-dropdown-menu-trigger]") ||
|
|
99
|
-
target.closest("[data-radix-dropdown-menu-content]") ||
|
|
100
|
-
target.closest("[data-radix-dropdown-menu-portal]") ||
|
|
101
|
-
target.closest("[data-radix-dropdown-menu-item]") ||
|
|
102
|
-
target.closest("[data-radix-dropdown-menu-checkbox-item]") ||
|
|
103
|
-
target.closest("[data-radix-dropdown-menu-radio-item]") ||
|
|
104
|
-
target.closest("[data-radix-dropdown-menu-separator]") ||
|
|
105
|
-
target.closest("[data-radix-dropdown-menu-label]") ||
|
|
106
|
-
target.closest("[data-radix-dropdown-menu-group]") ||
|
|
107
|
-
target.closest("[data-radix-dropdown-menu-sub]") ||
|
|
108
|
-
target.closest("[data-radix-dropdown-menu-sub-trigger]") ||
|
|
109
|
-
target.closest("[data-radix-dropdown-menu-sub-content]") ||
|
|
110
|
-
target.closest("[data-radix-dropdown-menu-radio-group]");
|
|
111
|
-
|
|
112
|
-
if (!shouldPreventClose) {
|
|
113
|
-
onClose();
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
return (
|
|
117
|
-
<DrawerOverlayStyled>
|
|
118
|
-
<DrawerContainerStyled
|
|
119
|
-
ref={drawerContainerRef}
|
|
120
|
-
style={{
|
|
121
|
-
width: width ?? "34.25rem",
|
|
122
|
-
backgroundColor: colors[backgroundColor ?? "neutral50"],
|
|
123
|
-
}}
|
|
124
|
-
>
|
|
125
|
-
<DrawerHeaderDiv>
|
|
126
|
-
<Flex gap={8} align="center">
|
|
127
|
-
{(goBackIcon && goBackIcon) && <GoBackButtonStyled type="button" onClick={goBackAction}>{goBackIcon}</GoBackButtonStyled>}
|
|
128
|
-
<DrawerHeaderTitle>{title}</DrawerHeaderTitle>
|
|
129
|
-
</Flex>
|
|
130
|
-
<DrawerHeaderCloseButton onClick={onClose}>
|
|
131
|
-
<Icon size={"xl"} color="$dark600" name="xmark" />
|
|
132
|
-
</DrawerHeaderCloseButton>
|
|
133
|
-
</DrawerHeaderDiv>
|
|
134
|
-
{children}
|
|
135
|
-
</DrawerContainerStyled>
|
|
136
|
-
</DrawerOverlayStyled>
|
|
137
|
-
);
|
|
138
|
-
}
|
|
1
|
+
import { ComponentProps, ReactNode, useRef } from "react";
|
|
2
|
+
import { colors, Colors } from "@lets-events/tokens";
|
|
3
|
+
import Icon from "../Icon";
|
|
4
|
+
import {
|
|
5
|
+
DrawerOverlayStyled,
|
|
6
|
+
DrawerContainerStyled,
|
|
7
|
+
DrawerHeaderDiv,
|
|
8
|
+
DrawerHeaderTitle,
|
|
9
|
+
DrawerHeaderCloseButton,
|
|
10
|
+
GoBackButtonStyled,
|
|
11
|
+
} from "./styledComponents";
|
|
12
|
+
import { useOnClickOutside } from "../../hooks/useOnClickOutside";
|
|
13
|
+
import { Flex } from "../Flex";
|
|
14
|
+
|
|
15
|
+
export type DrawerProps = ComponentProps<typeof DrawerOverlayStyled> & {
|
|
16
|
+
isOpen: boolean;
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
width?: string;
|
|
19
|
+
backgroundColor?: keyof Colors;
|
|
20
|
+
title: string;
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
goBackIcon?: ReactNode;
|
|
23
|
+
goBackAction?: () => void;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export function Drawer({
|
|
27
|
+
isOpen,
|
|
28
|
+
onClose,
|
|
29
|
+
width,
|
|
30
|
+
backgroundColor,
|
|
31
|
+
title,
|
|
32
|
+
children,
|
|
33
|
+
goBackIcon,
|
|
34
|
+
goBackAction
|
|
35
|
+
}: DrawerProps) {
|
|
36
|
+
if (!isOpen) return null;
|
|
37
|
+
const drawerContainerRef = useRef<HTMLDivElement>(null);
|
|
38
|
+
|
|
39
|
+
useOnClickOutside(drawerContainerRef, (event?: MouseEvent | TouchEvent) => {
|
|
40
|
+
if (!event || !drawerContainerRef.current) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
let target = event.target as Element;
|
|
45
|
+
|
|
46
|
+
if (target.tagName === "HTML" || target.tagName === "BODY") {
|
|
47
|
+
if (event instanceof MouseEvent) {
|
|
48
|
+
const actualElement = document.elementFromPoint(
|
|
49
|
+
event.clientX,
|
|
50
|
+
event.clientY
|
|
51
|
+
);
|
|
52
|
+
if (actualElement) {
|
|
53
|
+
target = actualElement;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
let currentElement: Element | null = target;
|
|
59
|
+
let hierarchy = [];
|
|
60
|
+
while (currentElement && currentElement !== document.body) {
|
|
61
|
+
hierarchy.push({
|
|
62
|
+
tagName: currentElement.tagName,
|
|
63
|
+
className: currentElement.className,
|
|
64
|
+
id: currentElement.id,
|
|
65
|
+
attributes: Array.from(currentElement.attributes || []).map((attr) => ({
|
|
66
|
+
name: attr.name,
|
|
67
|
+
value: attr.value,
|
|
68
|
+
})),
|
|
69
|
+
});
|
|
70
|
+
currentElement = currentElement.parentElement;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (drawerContainerRef.current?.contains(target)) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const isDropdownOpen =
|
|
77
|
+
target.closest("[data-radix-popper-content-wrapper]") ||
|
|
78
|
+
target.closest('[role="dialog"]') ||
|
|
79
|
+
target.closest('[data-state="open"]') ||
|
|
80
|
+
target.closest("[data-radix-dropdown-menu-content]") ||
|
|
81
|
+
target.closest("[data-radix-dropdown-menu-root]") ||
|
|
82
|
+
target.closest("[data-radix-dropdown-menu-trigger]") ||
|
|
83
|
+
target.closest("[data-radix-dropdown-menu-portal]") ||
|
|
84
|
+
target.closest("[data-radix-dropdown-menu-item]") ||
|
|
85
|
+
target.closest("[data-radix-dropdown-menu-checkbox-item]") ||
|
|
86
|
+
target.closest("[data-radix-dropdown-menu-radio-item]") ||
|
|
87
|
+
target.closest("[data-radix-dropdown-menu-separator]") ||
|
|
88
|
+
target.closest("[data-radix-dropdown-menu-label]") ||
|
|
89
|
+
target.closest("[data-radix-dropdown-menu-group]") ||
|
|
90
|
+
target.closest("[data-radix-dropdown-menu-sub]") ||
|
|
91
|
+
target.closest("[data-radix-dropdown-menu-sub-trigger]") ||
|
|
92
|
+
target.closest("[data-radix-dropdown-menu-sub-content]") ||
|
|
93
|
+
target.closest("[data-radix-dropdown-menu-radio-group]");
|
|
94
|
+
|
|
95
|
+
const shouldPreventClose =
|
|
96
|
+
isDropdownOpen ||
|
|
97
|
+
target.closest("[data-radix-dropdown-menu-root]") ||
|
|
98
|
+
target.closest("[data-radix-dropdown-menu-trigger]") ||
|
|
99
|
+
target.closest("[data-radix-dropdown-menu-content]") ||
|
|
100
|
+
target.closest("[data-radix-dropdown-menu-portal]") ||
|
|
101
|
+
target.closest("[data-radix-dropdown-menu-item]") ||
|
|
102
|
+
target.closest("[data-radix-dropdown-menu-checkbox-item]") ||
|
|
103
|
+
target.closest("[data-radix-dropdown-menu-radio-item]") ||
|
|
104
|
+
target.closest("[data-radix-dropdown-menu-separator]") ||
|
|
105
|
+
target.closest("[data-radix-dropdown-menu-label]") ||
|
|
106
|
+
target.closest("[data-radix-dropdown-menu-group]") ||
|
|
107
|
+
target.closest("[data-radix-dropdown-menu-sub]") ||
|
|
108
|
+
target.closest("[data-radix-dropdown-menu-sub-trigger]") ||
|
|
109
|
+
target.closest("[data-radix-dropdown-menu-sub-content]") ||
|
|
110
|
+
target.closest("[data-radix-dropdown-menu-radio-group]");
|
|
111
|
+
|
|
112
|
+
if (!shouldPreventClose) {
|
|
113
|
+
onClose();
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
return (
|
|
117
|
+
<DrawerOverlayStyled>
|
|
118
|
+
<DrawerContainerStyled
|
|
119
|
+
ref={drawerContainerRef}
|
|
120
|
+
style={{
|
|
121
|
+
width: width ?? "34.25rem",
|
|
122
|
+
backgroundColor: colors[backgroundColor ?? "neutral50"],
|
|
123
|
+
}}
|
|
124
|
+
>
|
|
125
|
+
<DrawerHeaderDiv>
|
|
126
|
+
<Flex gap={8} align="center">
|
|
127
|
+
{(goBackIcon && goBackIcon) && <GoBackButtonStyled type="button" onClick={goBackAction}>{goBackIcon}</GoBackButtonStyled>}
|
|
128
|
+
<DrawerHeaderTitle>{title}</DrawerHeaderTitle>
|
|
129
|
+
</Flex>
|
|
130
|
+
<DrawerHeaderCloseButton onClick={onClose}>
|
|
131
|
+
<Icon size={"xl"} color="$dark600" name="xmark" />
|
|
132
|
+
</DrawerHeaderCloseButton>
|
|
133
|
+
</DrawerHeaderDiv>
|
|
134
|
+
{children}
|
|
135
|
+
</DrawerContainerStyled>
|
|
136
|
+
</DrawerOverlayStyled>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { styled } from "../../styles";
|
|
2
|
-
|
|
3
|
-
export const DrawerOverlayStyled = styled("div", {
|
|
4
|
-
position: "fixed",
|
|
5
|
-
top: 0,
|
|
6
|
-
right: 0,
|
|
7
|
-
width: "100vw",
|
|
8
|
-
height: "100vh",
|
|
9
|
-
background: "rgba(0, 0, 0, 0.4)",
|
|
10
|
-
zIndex: 1000,
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export const DrawerContainerStyled = styled("div", {
|
|
14
|
-
position: "absolute",
|
|
15
|
-
top: 0,
|
|
16
|
-
right: 0,
|
|
17
|
-
maxWidth: "calc(100% - 2rem)",
|
|
18
|
-
height: "100%",
|
|
19
|
-
background: "$neutral50",
|
|
20
|
-
display: "flex",
|
|
21
|
-
flexDirection: "column",
|
|
22
|
-
boxShadow: "-4px 0 12px rgba(0, 0, 0, 0.2)",
|
|
23
|
-
padding: "1.5rem 0",
|
|
24
|
-
overflowY: "auto",
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
export const DrawerHeaderDiv = styled("div", {
|
|
28
|
-
display: "flex",
|
|
29
|
-
justifyContent: "space-between",
|
|
30
|
-
alignItems: "center",
|
|
31
|
-
borderBottom: "1px solid $neutral300",
|
|
32
|
-
padding: "0 1.5rem 1rem",
|
|
33
|
-
position: "relative",
|
|
34
|
-
});
|
|
35
|
-
export const DrawerHeaderTitle = styled("h2", {
|
|
36
|
-
fontSize: "1.125rem",
|
|
37
|
-
fontWeight: "400",
|
|
38
|
-
fontFamily: "Work Sans",
|
|
39
|
-
color: "$dark800",
|
|
40
|
-
margin: "0",
|
|
41
|
-
});
|
|
42
|
-
export const DrawerHeaderCloseButton = styled("button", {
|
|
43
|
-
background: "none",
|
|
44
|
-
border: "none",
|
|
45
|
-
cursor: "pointer",
|
|
46
|
-
});
|
|
47
|
-
export const GoBackButtonStyled = styled("button", {
|
|
48
|
-
background: "none",
|
|
49
|
-
padding: "0",
|
|
50
|
-
border: "none",
|
|
51
|
-
cursor: "pointer",
|
|
52
|
-
});
|
|
1
|
+
import { styled } from "../../styles";
|
|
2
|
+
|
|
3
|
+
export const DrawerOverlayStyled = styled("div", {
|
|
4
|
+
position: "fixed",
|
|
5
|
+
top: 0,
|
|
6
|
+
right: 0,
|
|
7
|
+
width: "100vw",
|
|
8
|
+
height: "100vh",
|
|
9
|
+
background: "rgba(0, 0, 0, 0.4)",
|
|
10
|
+
zIndex: 1000,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export const DrawerContainerStyled = styled("div", {
|
|
14
|
+
position: "absolute",
|
|
15
|
+
top: 0,
|
|
16
|
+
right: 0,
|
|
17
|
+
maxWidth: "calc(100% - 2rem)",
|
|
18
|
+
height: "100%",
|
|
19
|
+
background: "$neutral50",
|
|
20
|
+
display: "flex",
|
|
21
|
+
flexDirection: "column",
|
|
22
|
+
boxShadow: "-4px 0 12px rgba(0, 0, 0, 0.2)",
|
|
23
|
+
padding: "1.5rem 0",
|
|
24
|
+
overflowY: "auto",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const DrawerHeaderDiv = styled("div", {
|
|
28
|
+
display: "flex",
|
|
29
|
+
justifyContent: "space-between",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
borderBottom: "1px solid $neutral300",
|
|
32
|
+
padding: "0 1.5rem 1rem",
|
|
33
|
+
position: "relative",
|
|
34
|
+
});
|
|
35
|
+
export const DrawerHeaderTitle = styled("h2", {
|
|
36
|
+
fontSize: "1.125rem",
|
|
37
|
+
fontWeight: "400",
|
|
38
|
+
fontFamily: "Work Sans",
|
|
39
|
+
color: "$dark800",
|
|
40
|
+
margin: "0",
|
|
41
|
+
});
|
|
42
|
+
export const DrawerHeaderCloseButton = styled("button", {
|
|
43
|
+
background: "none",
|
|
44
|
+
border: "none",
|
|
45
|
+
cursor: "pointer",
|
|
46
|
+
});
|
|
47
|
+
export const GoBackButtonStyled = styled("button", {
|
|
48
|
+
background: "none",
|
|
49
|
+
padding: "0",
|
|
50
|
+
border: "none",
|
|
51
|
+
cursor: "pointer",
|
|
52
|
+
});
|