@lets-events/react 12.4.1 → 12.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/CHANGELOG.md +6 -0
- 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 +45 -45
- package/src/components/Button/styledComponents.ts +313 -313
- package/src/components/ButtonGroup.tsx +484 -484
- package/src/components/Calendar/index.tsx +148 -148
- package/src/components/Calendar/styledComponents.ts +259 -259
- package/src/components/Card.tsx +67 -67
- package/src/components/CheckboxGroup.tsx +176 -176
- package/src/components/Container.tsx +39 -39
- package/src/components/Divider.tsx +7 -7
- package/src/components/DoubleCalendar/index.tsx +170 -166
- package/src/components/Drawer/index.tsx +100 -98
- package/src/components/Drawer/styledComponents.ts +103 -103
- 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 +95 -95
- package/src/components/FormFields/CheckboxGroupFormField.tsx +91 -91
- package/src/components/FormFields/DoubleCalendarFormField.tsx +93 -90
- 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 +103 -103
- package/src/components/FormFields/SelectFormField.tsx +93 -93
- package/src/components/FormFields/SwitchFormField.tsx +46 -46
- package/src/components/FormFields/TextAreaFormField.tsx +59 -59
- 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 +110 -110
- 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 +457 -457
- package/src/components/RichEditor/RichEditor.tsx +49 -49
- 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 +138 -138
- 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 +71 -71
- package/src/styles/index.ts +41 -41
- 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/.turbo/turbo-build.log +0 -19
- package/dist/index.d.mts +0 -15398
- package/dist/index.d.ts +0 -15398
- package/dist/index.js +0 -13390
- package/dist/index.mjs +0 -13284
|
@@ -1,259 +1,259 @@
|
|
|
1
|
-
import { styled } from "../../styles";
|
|
2
|
-
|
|
3
|
-
export const CalendarStyled = styled("div", {
|
|
4
|
-
fontFamily: "$default",
|
|
5
|
-
lineHeight: "$base",
|
|
6
|
-
fontSize: "$14",
|
|
7
|
-
borderRadius: "$sm",
|
|
8
|
-
position: "relative",
|
|
9
|
-
width: "fit-content",
|
|
10
|
-
variants: {
|
|
11
|
-
expand: {
|
|
12
|
-
true: {
|
|
13
|
-
width: "100%",
|
|
14
|
-
flex: "1",
|
|
15
|
-
display: "flex",
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
export const CalendarButtonStyled = styled("button", {
|
|
21
|
-
backgroundColor: "transparent",
|
|
22
|
-
border: "none",
|
|
23
|
-
maxWidth: "200px",
|
|
24
|
-
padding: "0",
|
|
25
|
-
cursor: "pointer",
|
|
26
|
-
"> div > div": {
|
|
27
|
-
paddingLeft: "0",
|
|
28
|
-
input: {
|
|
29
|
-
textAlign: "right",
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
variants: {
|
|
33
|
-
expand: {
|
|
34
|
-
true: {
|
|
35
|
-
flex: "1",
|
|
36
|
-
display: "flex",
|
|
37
|
-
maxWidth: "100%",
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
export const CalendarContentStyled = styled("div", {
|
|
43
|
-
fontFamily: "$default",
|
|
44
|
-
lineHeight: "$base",
|
|
45
|
-
fontSize: "$14",
|
|
46
|
-
maxWidth: "fit-content",
|
|
47
|
-
border: "1px solid $neutral300",
|
|
48
|
-
borderRadius: "$sm",
|
|
49
|
-
boxShadow: "0px 2px 8px 0px $shadow50",
|
|
50
|
-
position: "absolute",
|
|
51
|
-
backgroundColor: "$neutral50",
|
|
52
|
-
zIndex: "999999",
|
|
53
|
-
variants: {
|
|
54
|
-
position: {
|
|
55
|
-
top: {
|
|
56
|
-
bottom: "110%",
|
|
57
|
-
left: "0",
|
|
58
|
-
},
|
|
59
|
-
bottom: {
|
|
60
|
-
top: "110%",
|
|
61
|
-
left: "0",
|
|
62
|
-
},
|
|
63
|
-
"top-right": {
|
|
64
|
-
bottom: "110%",
|
|
65
|
-
right: "0",
|
|
66
|
-
},
|
|
67
|
-
"bottom-right": {
|
|
68
|
-
top: "110%",
|
|
69
|
-
right: "0",
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
export const CalendarFooterStyled = styled("div", {
|
|
76
|
-
borderTop: "2px solid $neutral100",
|
|
77
|
-
padding: "$4 $16",
|
|
78
|
-
display: "flex",
|
|
79
|
-
gap: '1rem',
|
|
80
|
-
justifyContent: "flex-end",
|
|
81
|
-
alignItems: "center",
|
|
82
|
-
height: "3rem",
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
export const DayPickerWrapperStyled = styled("div", {
|
|
86
|
-
".rt-TextFieldInput": {
|
|
87
|
-
fontFamily: "$default",
|
|
88
|
-
fontSize: "$14",
|
|
89
|
-
color: "$dark500",
|
|
90
|
-
},
|
|
91
|
-
".rdp-root": {
|
|
92
|
-
padding: "0 $8",
|
|
93
|
-
},
|
|
94
|
-
".rdp-today .rdp-day_button": {
|
|
95
|
-
color: "$brand500",
|
|
96
|
-
textDecoration: "underline",
|
|
97
|
-
},
|
|
98
|
-
".rdp-day.rdp-disabled .rdp-day_button": {
|
|
99
|
-
color: "$dark400",
|
|
100
|
-
},
|
|
101
|
-
".rdp-day_button": {
|
|
102
|
-
height: "28px",
|
|
103
|
-
width: "28px",
|
|
104
|
-
borderRadius: "$sm",
|
|
105
|
-
fontSize: "$14",
|
|
106
|
-
color: "$text",
|
|
107
|
-
backgroundColor: "transparent",
|
|
108
|
-
border: "1px solid transparent",
|
|
109
|
-
transition: "all 0.2s ease-in-out",
|
|
110
|
-
cursor: "pointer",
|
|
111
|
-
},
|
|
112
|
-
".rdp-day_button:hover": {
|
|
113
|
-
backgroundColor: "$dark100",
|
|
114
|
-
borderColor: "$brand500",
|
|
115
|
-
},
|
|
116
|
-
".rdp-day.rdp-disabled .rdp-day_button:hover": {
|
|
117
|
-
backgroundColor: "transparent",
|
|
118
|
-
borderColor: "transparent",
|
|
119
|
-
},
|
|
120
|
-
".rdp-nav": {
|
|
121
|
-
position: "absolute",
|
|
122
|
-
width: "98%",
|
|
123
|
-
display: "flex",
|
|
124
|
-
justifyContent: "space-between",
|
|
125
|
-
},
|
|
126
|
-
".rdp-nav .rdp-chevron": {
|
|
127
|
-
display: "none",
|
|
128
|
-
},
|
|
129
|
-
".rdp-nav .rdp-button_previous": {
|
|
130
|
-
display: "block",
|
|
131
|
-
backgroundImage:
|
|
132
|
-
"url(\"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%3E%3Cg%20transform='scale(-1,1)%20translate(-32,0)'%3E%3Cpath%20d='M0%208C0%203.58172%203.58172%200%208%200H24C28.4183%200%2032%203.58172%2032%208V24C32%2028.4183%2028.4183%2032%2024%2032H8C3.58172%2032%200%2028.4183%200%2024V8Z'%20fill='white'/%3E%3Cpath%20d='M19.7062%2015.2938C20.0969%2015.6844%2020.0969%2016.3188%2019.7062%2016.7094L14.7062%2021.7094C14.3156%2022.1%2013.6812%2022.1%2013.2906%2021.7094C12.9%2021.3188%2012.9%2020.6844%2013.2906%2020.2938L17.5844%2016L13.2937%2011.7063C12.9031%2011.3156%2012.9031%2010.6813%2013.2937%2010.2906C13.6844%209.90002%2014.3187%209.90002%2014.7094%2010.2906L19.7094%2015.2906L19.7062%2015.2938Z'%20fill='%23808289'/%3E%3C/g%3E%3C/svg%3E\")",
|
|
133
|
-
backgroundRepeat: "no-repeat",
|
|
134
|
-
backgroundPosition: "center",
|
|
135
|
-
backgroundSize: "cover",
|
|
136
|
-
width: "32px",
|
|
137
|
-
height: "32px",
|
|
138
|
-
},
|
|
139
|
-
".rdp-nav .rdp-button_next": {
|
|
140
|
-
display: "block",
|
|
141
|
-
backgroundImage:
|
|
142
|
-
"url(\"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%3E%3Cpath%20d='M0%208C0%203.58172%203.58172%200%208%200H24C28.4183%200%2032%203.58172%2032%208V24C32%2028.4183%2028.4183%2032%2024%2032H8C3.58172%2032%200%2028.4183%200%2024V8Z'%20fill='white'/%3E%3Cpath%20d='M19.7062%2015.2938C20.0969%2015.6844%2020.0969%2016.3188%2019.7062%2016.7094L14.7062%2021.7094C14.3156%2022.1%2013.6812%2022.1%2013.2906%2021.7094C12.9%2021.3188%2012.9%2020.6844%2013.2906%2020.2938L17.5844%2016L13.2937%2011.7063C12.9031%2011.3156%2012.9031%2010.6813%2013.2937%2010.2906C13.6844%209.90002%2014.3187%209.90002%2014.7094%2010.2906L19.7094%2015.2906L19.7062%2015.2938Z'%20fill='%23808289'/%3E%3C/svg%3E\")",
|
|
143
|
-
backgroundRepeat: "no-repeat",
|
|
144
|
-
backgroundPosition: "center",
|
|
145
|
-
backgroundSize: "cover",
|
|
146
|
-
width: "32px",
|
|
147
|
-
height: "32px",
|
|
148
|
-
},
|
|
149
|
-
".rdp-nav .rdp-button_previous:hover": {
|
|
150
|
-
backgroundImage:
|
|
151
|
-
"url(\"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%3E%3Cpath%20d='M0%208C0%203.58172%203.58172%200%208%200H24C28.4183%200%2032%203.58172%2032%208V24C32%2028.4183%2028.4183%2032%2024%2032H8C3.58172%2032%200%2028.4183%200%2024V8Z'%20fill='%23F4F4F4'/%3E%3Cpath%20d='M12.2937%2015.2938C11.9031%2015.6844%2011.9031%2016.3188%2012.2937%2016.7094L17.2937%2021.7094C17.6844%2022.1%2018.3187%2022.1%2018.7094%2021.7094C19.1%2021.3188%2019.1%2020.6844%2018.7094%2020.2938L14.4156%2016L18.7062%2011.7063C19.0969%2011.3156%2019.0969%2010.6813%2018.7062%2010.2906C18.3156%209.90002%2017.6812%209.90002%2017.2906%2010.2906L12.2906%2015.2906L12.2937%2015.2938Z'%20fill='%23808289'/%3E%3C/svg%3E\")",
|
|
152
|
-
transition: "all 0.2s ease-in-out",
|
|
153
|
-
},
|
|
154
|
-
".rdp-nav .rdp-button_next:hover": {
|
|
155
|
-
backgroundImage:
|
|
156
|
-
"url(\"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%3E%3Cpath%20d='M0%208C0%203.58172%203.58172%200%208%200H24C28.4183%200%2032%203.58172%2032%208V24C32%2028.4183%2028.4183%2032%2024%2032H8C3.58172%2032%200%2028.4183%200%2024V8Z'%20fill='%23F4F4F4'/%3E%3Cpath%20d='M19.7062%2015.2938C20.0969%2015.6844%2020.0969%2016.3188%2019.7062%2016.7094L14.7062%2021.7094C14.3156%2022.1%2013.6812%2022.1%2013.2906%2021.7094C12.9%2021.3188%2012.9%2020.6844%2013.2906%2020.2938L17.5844%2016L13.2937%2011.7063C12.9031%2011.3156%2012.9031%2010.6813%2013.2937%2010.2906C13.6844%209.90002%2014.3187%209.90002%2014.7094%2010.2906L19.7094%2015.2906L19.7062%2015.2938Z'%20fill='%23808289'/%3E%3C/svg%3E\")",
|
|
157
|
-
transition: "all 0.2s ease-in-out",
|
|
158
|
-
},
|
|
159
|
-
".rdp-nav button": {
|
|
160
|
-
border: "none",
|
|
161
|
-
backgroundColor: "transparent",
|
|
162
|
-
cursor: "pointer",
|
|
163
|
-
},
|
|
164
|
-
".rdp-months": {
|
|
165
|
-
display: "flex",
|
|
166
|
-
columnGap: "$16",
|
|
167
|
-
alignItems: "flex-start",
|
|
168
|
-
paddingTop: "$12",
|
|
169
|
-
},
|
|
170
|
-
".rdp-month": {
|
|
171
|
-
marginTop: "0",
|
|
172
|
-
paddingTop: "$6",
|
|
173
|
-
},
|
|
174
|
-
".rdp-month_caption": {
|
|
175
|
-
display: "flex",
|
|
176
|
-
alignItems: "center",
|
|
177
|
-
justifyContent: "center",
|
|
178
|
-
width: "calc(100% - 64px)",
|
|
179
|
-
margin: "0 auto",
|
|
180
|
-
columnGap: "12px",
|
|
181
|
-
},
|
|
182
|
-
".rdp-dropdowns span, .rdp-caption_label": {
|
|
183
|
-
fontSize: "$16",
|
|
184
|
-
fontWeight: "$regular",
|
|
185
|
-
lineHeight: "$20",
|
|
186
|
-
textTransform: "capitalize",
|
|
187
|
-
},
|
|
188
|
-
".rdp-day.rdp-selected .rdp-day_button": {
|
|
189
|
-
backgroundColor: "$brand500",
|
|
190
|
-
color: "$neutral50",
|
|
191
|
-
borderColor: "$brand500",
|
|
192
|
-
},
|
|
193
|
-
".rdp-dropdowns": {
|
|
194
|
-
display: "flex",
|
|
195
|
-
alignItems: "center",
|
|
196
|
-
justifyContent: "center",
|
|
197
|
-
width: "calc(100% - 64px)",
|
|
198
|
-
columnGap: "12px",
|
|
199
|
-
},
|
|
200
|
-
".rdp-dropdowns .rdp-caption_label": {
|
|
201
|
-
display: "none",
|
|
202
|
-
},
|
|
203
|
-
".rdp-dropdown.rdp-months_dropdown, .rdp-dropdown.rdp-years_dropdown": {
|
|
204
|
-
border: "none",
|
|
205
|
-
backgroundColor: "transparent",
|
|
206
|
-
textTransform: "capitalize",
|
|
207
|
-
height: "1.25rem",
|
|
208
|
-
position: "relative",
|
|
209
|
-
fontFamily: "$default",
|
|
210
|
-
fontSize: "$16",
|
|
211
|
-
lineHeight: "1.25rem",
|
|
212
|
-
appearance: "none",
|
|
213
|
-
WebkitAppearance: "none",
|
|
214
|
-
MozAppearance: "none",
|
|
215
|
-
paddingRight: "1.25rem",
|
|
216
|
-
zIndex: "3",
|
|
217
|
-
},
|
|
218
|
-
".rdp-dropdown:focus, .rdp-dropdown:focus-visible, .rdp-dropdown:active": {
|
|
219
|
-
border: "none",
|
|
220
|
-
outline: "none",
|
|
221
|
-
boxShadow: "none",
|
|
222
|
-
},
|
|
223
|
-
".rdp-dropdown.rdp-months_dropdown:focus, .rdp-dropdown.rdp-years_dropdown:focus":
|
|
224
|
-
{
|
|
225
|
-
border: "none",
|
|
226
|
-
},
|
|
227
|
-
".rdp-dropdown_root": {
|
|
228
|
-
position: "relative",
|
|
229
|
-
},
|
|
230
|
-
".rdp-dropdown_root::after": {
|
|
231
|
-
content: "",
|
|
232
|
-
height: "1.25rem",
|
|
233
|
-
width: "1.25rem",
|
|
234
|
-
position: "absolute",
|
|
235
|
-
top: "0",
|
|
236
|
-
right: "0",
|
|
237
|
-
display: "block",
|
|
238
|
-
backgroundColor: "$neutral50",
|
|
239
|
-
backgroundImage:
|
|
240
|
-
"url(\"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='11'%20height='20'%20viewBox='0%200%2011%2020'%20fill='none'%3E%3Crect%20width='11'%20height='20'%20fill='white'/%3E%3Cpath%20d='M5.9414%202.68359C5.69726%202.43945%205.30077%202.43945%205.05663%202.68359L2.55663%205.18359C2.37695%205.36328%202.32421%205.63086%202.42187%205.86523C2.51952%206.09961%202.74609%206.25195%202.99999%206.25195H7.99999C8.25195%206.25195%208.48046%206.09961%208.57812%205.86523C8.67578%205.63086%208.62109%205.36328%208.44335%205.18359L5.94335%202.68359H5.9414Z'%20fill='%23808289'/%3E%3Cpath%20d='M5.05858%2017.3164C5.30272%2017.5605%205.69921%2017.5605%205.94335%2017.3164L8.44335%2014.8164C8.62304%2014.6367%208.67577%2014.3691%208.57811%2014.1348C8.48046%2013.9004%208.25389%2013.748%207.99999%2013.748L2.99999%2013.75C2.74804%2013.75%202.51952%2013.9023%202.42186%2014.1367C2.32421%2014.3711%202.37889%2014.6387%202.55663%2014.8184L5.05663%2017.3184L5.05858%2017.3164Z'%20fill='%23808289'/%3E%3C/svg%3E\")",
|
|
241
|
-
backgroundRepeat: "no-repeat",
|
|
242
|
-
backgroundPosition: "center",
|
|
243
|
-
borderRadius: "0.5rem",
|
|
244
|
-
zIndex: "2",
|
|
245
|
-
},
|
|
246
|
-
".rdp-weekday": {
|
|
247
|
-
textTransform: "uppercase",
|
|
248
|
-
fontWeight: "$regular",
|
|
249
|
-
fontSize: "0px",
|
|
250
|
-
},
|
|
251
|
-
".rdp-weekday::first-letter": {
|
|
252
|
-
fontSize: "$14",
|
|
253
|
-
},
|
|
254
|
-
".rdp-month_grid": {
|
|
255
|
-
marginTop: "$16",
|
|
256
|
-
paddingTop: "$16",
|
|
257
|
-
borderTop: "2px solid $neutral100",
|
|
258
|
-
},
|
|
259
|
-
});
|
|
1
|
+
import { styled } from "../../styles";
|
|
2
|
+
|
|
3
|
+
export const CalendarStyled = styled("div", {
|
|
4
|
+
fontFamily: "$default",
|
|
5
|
+
lineHeight: "$base",
|
|
6
|
+
fontSize: "$14",
|
|
7
|
+
borderRadius: "$sm",
|
|
8
|
+
position: "relative",
|
|
9
|
+
width: "fit-content",
|
|
10
|
+
variants: {
|
|
11
|
+
expand: {
|
|
12
|
+
true: {
|
|
13
|
+
width: "100%",
|
|
14
|
+
flex: "1",
|
|
15
|
+
display: "flex",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
export const CalendarButtonStyled = styled("button", {
|
|
21
|
+
backgroundColor: "transparent",
|
|
22
|
+
border: "none",
|
|
23
|
+
maxWidth: "200px",
|
|
24
|
+
padding: "0",
|
|
25
|
+
cursor: "pointer",
|
|
26
|
+
"> div > div": {
|
|
27
|
+
paddingLeft: "0",
|
|
28
|
+
input: {
|
|
29
|
+
textAlign: "right",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
variants: {
|
|
33
|
+
expand: {
|
|
34
|
+
true: {
|
|
35
|
+
flex: "1",
|
|
36
|
+
display: "flex",
|
|
37
|
+
maxWidth: "100%",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
export const CalendarContentStyled = styled("div", {
|
|
43
|
+
fontFamily: "$default",
|
|
44
|
+
lineHeight: "$base",
|
|
45
|
+
fontSize: "$14",
|
|
46
|
+
maxWidth: "fit-content",
|
|
47
|
+
border: "1px solid $neutral300",
|
|
48
|
+
borderRadius: "$sm",
|
|
49
|
+
boxShadow: "0px 2px 8px 0px $shadow50",
|
|
50
|
+
position: "absolute",
|
|
51
|
+
backgroundColor: "$neutral50",
|
|
52
|
+
zIndex: "999999",
|
|
53
|
+
variants: {
|
|
54
|
+
position: {
|
|
55
|
+
top: {
|
|
56
|
+
bottom: "110%",
|
|
57
|
+
left: "0",
|
|
58
|
+
},
|
|
59
|
+
bottom: {
|
|
60
|
+
top: "110%",
|
|
61
|
+
left: "0",
|
|
62
|
+
},
|
|
63
|
+
"top-right": {
|
|
64
|
+
bottom: "110%",
|
|
65
|
+
right: "0",
|
|
66
|
+
},
|
|
67
|
+
"bottom-right": {
|
|
68
|
+
top: "110%",
|
|
69
|
+
right: "0",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export const CalendarFooterStyled = styled("div", {
|
|
76
|
+
borderTop: "2px solid $neutral100",
|
|
77
|
+
padding: "$4 $16",
|
|
78
|
+
display: "flex",
|
|
79
|
+
gap: '1rem',
|
|
80
|
+
justifyContent: "flex-end",
|
|
81
|
+
alignItems: "center",
|
|
82
|
+
height: "3rem",
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
export const DayPickerWrapperStyled = styled("div", {
|
|
86
|
+
".rt-TextFieldInput": {
|
|
87
|
+
fontFamily: "$default",
|
|
88
|
+
fontSize: "$14",
|
|
89
|
+
color: "$dark500",
|
|
90
|
+
},
|
|
91
|
+
".rdp-root": {
|
|
92
|
+
padding: "0 $8",
|
|
93
|
+
},
|
|
94
|
+
".rdp-today .rdp-day_button": {
|
|
95
|
+
color: "$brand500",
|
|
96
|
+
textDecoration: "underline",
|
|
97
|
+
},
|
|
98
|
+
".rdp-day.rdp-disabled .rdp-day_button": {
|
|
99
|
+
color: "$dark400",
|
|
100
|
+
},
|
|
101
|
+
".rdp-day_button": {
|
|
102
|
+
height: "28px",
|
|
103
|
+
width: "28px",
|
|
104
|
+
borderRadius: "$sm",
|
|
105
|
+
fontSize: "$14",
|
|
106
|
+
color: "$text",
|
|
107
|
+
backgroundColor: "transparent",
|
|
108
|
+
border: "1px solid transparent",
|
|
109
|
+
transition: "all 0.2s ease-in-out",
|
|
110
|
+
cursor: "pointer",
|
|
111
|
+
},
|
|
112
|
+
".rdp-day_button:hover": {
|
|
113
|
+
backgroundColor: "$dark100",
|
|
114
|
+
borderColor: "$brand500",
|
|
115
|
+
},
|
|
116
|
+
".rdp-day.rdp-disabled .rdp-day_button:hover": {
|
|
117
|
+
backgroundColor: "transparent",
|
|
118
|
+
borderColor: "transparent",
|
|
119
|
+
},
|
|
120
|
+
".rdp-nav": {
|
|
121
|
+
position: "absolute",
|
|
122
|
+
width: "98%",
|
|
123
|
+
display: "flex",
|
|
124
|
+
justifyContent: "space-between",
|
|
125
|
+
},
|
|
126
|
+
".rdp-nav .rdp-chevron": {
|
|
127
|
+
display: "none",
|
|
128
|
+
},
|
|
129
|
+
".rdp-nav .rdp-button_previous": {
|
|
130
|
+
display: "block",
|
|
131
|
+
backgroundImage:
|
|
132
|
+
"url(\"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%3E%3Cg%20transform='scale(-1,1)%20translate(-32,0)'%3E%3Cpath%20d='M0%208C0%203.58172%203.58172%200%208%200H24C28.4183%200%2032%203.58172%2032%208V24C32%2028.4183%2028.4183%2032%2024%2032H8C3.58172%2032%200%2028.4183%200%2024V8Z'%20fill='white'/%3E%3Cpath%20d='M19.7062%2015.2938C20.0969%2015.6844%2020.0969%2016.3188%2019.7062%2016.7094L14.7062%2021.7094C14.3156%2022.1%2013.6812%2022.1%2013.2906%2021.7094C12.9%2021.3188%2012.9%2020.6844%2013.2906%2020.2938L17.5844%2016L13.2937%2011.7063C12.9031%2011.3156%2012.9031%2010.6813%2013.2937%2010.2906C13.6844%209.90002%2014.3187%209.90002%2014.7094%2010.2906L19.7094%2015.2906L19.7062%2015.2938Z'%20fill='%23808289'/%3E%3C/g%3E%3C/svg%3E\")",
|
|
133
|
+
backgroundRepeat: "no-repeat",
|
|
134
|
+
backgroundPosition: "center",
|
|
135
|
+
backgroundSize: "cover",
|
|
136
|
+
width: "32px",
|
|
137
|
+
height: "32px",
|
|
138
|
+
},
|
|
139
|
+
".rdp-nav .rdp-button_next": {
|
|
140
|
+
display: "block",
|
|
141
|
+
backgroundImage:
|
|
142
|
+
"url(\"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%3E%3Cpath%20d='M0%208C0%203.58172%203.58172%200%208%200H24C28.4183%200%2032%203.58172%2032%208V24C32%2028.4183%2028.4183%2032%2024%2032H8C3.58172%2032%200%2028.4183%200%2024V8Z'%20fill='white'/%3E%3Cpath%20d='M19.7062%2015.2938C20.0969%2015.6844%2020.0969%2016.3188%2019.7062%2016.7094L14.7062%2021.7094C14.3156%2022.1%2013.6812%2022.1%2013.2906%2021.7094C12.9%2021.3188%2012.9%2020.6844%2013.2906%2020.2938L17.5844%2016L13.2937%2011.7063C12.9031%2011.3156%2012.9031%2010.6813%2013.2937%2010.2906C13.6844%209.90002%2014.3187%209.90002%2014.7094%2010.2906L19.7094%2015.2906L19.7062%2015.2938Z'%20fill='%23808289'/%3E%3C/svg%3E\")",
|
|
143
|
+
backgroundRepeat: "no-repeat",
|
|
144
|
+
backgroundPosition: "center",
|
|
145
|
+
backgroundSize: "cover",
|
|
146
|
+
width: "32px",
|
|
147
|
+
height: "32px",
|
|
148
|
+
},
|
|
149
|
+
".rdp-nav .rdp-button_previous:hover": {
|
|
150
|
+
backgroundImage:
|
|
151
|
+
"url(\"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%3E%3Cpath%20d='M0%208C0%203.58172%203.58172%200%208%200H24C28.4183%200%2032%203.58172%2032%208V24C32%2028.4183%2028.4183%2032%2024%2032H8C3.58172%2032%200%2028.4183%200%2024V8Z'%20fill='%23F4F4F4'/%3E%3Cpath%20d='M12.2937%2015.2938C11.9031%2015.6844%2011.9031%2016.3188%2012.2937%2016.7094L17.2937%2021.7094C17.6844%2022.1%2018.3187%2022.1%2018.7094%2021.7094C19.1%2021.3188%2019.1%2020.6844%2018.7094%2020.2938L14.4156%2016L18.7062%2011.7063C19.0969%2011.3156%2019.0969%2010.6813%2018.7062%2010.2906C18.3156%209.90002%2017.6812%209.90002%2017.2906%2010.2906L12.2906%2015.2906L12.2937%2015.2938Z'%20fill='%23808289'/%3E%3C/svg%3E\")",
|
|
152
|
+
transition: "all 0.2s ease-in-out",
|
|
153
|
+
},
|
|
154
|
+
".rdp-nav .rdp-button_next:hover": {
|
|
155
|
+
backgroundImage:
|
|
156
|
+
"url(\"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%3E%3Cpath%20d='M0%208C0%203.58172%203.58172%200%208%200H24C28.4183%200%2032%203.58172%2032%208V24C32%2028.4183%2028.4183%2032%2024%2032H8C3.58172%2032%200%2028.4183%200%2024V8Z'%20fill='%23F4F4F4'/%3E%3Cpath%20d='M19.7062%2015.2938C20.0969%2015.6844%2020.0969%2016.3188%2019.7062%2016.7094L14.7062%2021.7094C14.3156%2022.1%2013.6812%2022.1%2013.2906%2021.7094C12.9%2021.3188%2012.9%2020.6844%2013.2906%2020.2938L17.5844%2016L13.2937%2011.7063C12.9031%2011.3156%2012.9031%2010.6813%2013.2937%2010.2906C13.6844%209.90002%2014.3187%209.90002%2014.7094%2010.2906L19.7094%2015.2906L19.7062%2015.2938Z'%20fill='%23808289'/%3E%3C/svg%3E\")",
|
|
157
|
+
transition: "all 0.2s ease-in-out",
|
|
158
|
+
},
|
|
159
|
+
".rdp-nav button": {
|
|
160
|
+
border: "none",
|
|
161
|
+
backgroundColor: "transparent",
|
|
162
|
+
cursor: "pointer",
|
|
163
|
+
},
|
|
164
|
+
".rdp-months": {
|
|
165
|
+
display: "flex",
|
|
166
|
+
columnGap: "$16",
|
|
167
|
+
alignItems: "flex-start",
|
|
168
|
+
paddingTop: "$12",
|
|
169
|
+
},
|
|
170
|
+
".rdp-month": {
|
|
171
|
+
marginTop: "0",
|
|
172
|
+
paddingTop: "$6",
|
|
173
|
+
},
|
|
174
|
+
".rdp-month_caption": {
|
|
175
|
+
display: "flex",
|
|
176
|
+
alignItems: "center",
|
|
177
|
+
justifyContent: "center",
|
|
178
|
+
width: "calc(100% - 64px)",
|
|
179
|
+
margin: "0 auto",
|
|
180
|
+
columnGap: "12px",
|
|
181
|
+
},
|
|
182
|
+
".rdp-dropdowns span, .rdp-caption_label": {
|
|
183
|
+
fontSize: "$16",
|
|
184
|
+
fontWeight: "$regular",
|
|
185
|
+
lineHeight: "$20",
|
|
186
|
+
textTransform: "capitalize",
|
|
187
|
+
},
|
|
188
|
+
".rdp-day.rdp-selected .rdp-day_button": {
|
|
189
|
+
backgroundColor: "$brand500",
|
|
190
|
+
color: "$neutral50",
|
|
191
|
+
borderColor: "$brand500",
|
|
192
|
+
},
|
|
193
|
+
".rdp-dropdowns": {
|
|
194
|
+
display: "flex",
|
|
195
|
+
alignItems: "center",
|
|
196
|
+
justifyContent: "center",
|
|
197
|
+
width: "calc(100% - 64px)",
|
|
198
|
+
columnGap: "12px",
|
|
199
|
+
},
|
|
200
|
+
".rdp-dropdowns .rdp-caption_label": {
|
|
201
|
+
display: "none",
|
|
202
|
+
},
|
|
203
|
+
".rdp-dropdown.rdp-months_dropdown, .rdp-dropdown.rdp-years_dropdown": {
|
|
204
|
+
border: "none",
|
|
205
|
+
backgroundColor: "transparent",
|
|
206
|
+
textTransform: "capitalize",
|
|
207
|
+
height: "1.25rem",
|
|
208
|
+
position: "relative",
|
|
209
|
+
fontFamily: "$default",
|
|
210
|
+
fontSize: "$16",
|
|
211
|
+
lineHeight: "1.25rem",
|
|
212
|
+
appearance: "none",
|
|
213
|
+
WebkitAppearance: "none",
|
|
214
|
+
MozAppearance: "none",
|
|
215
|
+
paddingRight: "1.25rem",
|
|
216
|
+
zIndex: "3",
|
|
217
|
+
},
|
|
218
|
+
".rdp-dropdown:focus, .rdp-dropdown:focus-visible, .rdp-dropdown:active": {
|
|
219
|
+
border: "none",
|
|
220
|
+
outline: "none",
|
|
221
|
+
boxShadow: "none",
|
|
222
|
+
},
|
|
223
|
+
".rdp-dropdown.rdp-months_dropdown:focus, .rdp-dropdown.rdp-years_dropdown:focus":
|
|
224
|
+
{
|
|
225
|
+
border: "none",
|
|
226
|
+
},
|
|
227
|
+
".rdp-dropdown_root": {
|
|
228
|
+
position: "relative",
|
|
229
|
+
},
|
|
230
|
+
".rdp-dropdown_root::after": {
|
|
231
|
+
content: "",
|
|
232
|
+
height: "1.25rem",
|
|
233
|
+
width: "1.25rem",
|
|
234
|
+
position: "absolute",
|
|
235
|
+
top: "0",
|
|
236
|
+
right: "0",
|
|
237
|
+
display: "block",
|
|
238
|
+
backgroundColor: "$neutral50",
|
|
239
|
+
backgroundImage:
|
|
240
|
+
"url(\"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='11'%20height='20'%20viewBox='0%200%2011%2020'%20fill='none'%3E%3Crect%20width='11'%20height='20'%20fill='white'/%3E%3Cpath%20d='M5.9414%202.68359C5.69726%202.43945%205.30077%202.43945%205.05663%202.68359L2.55663%205.18359C2.37695%205.36328%202.32421%205.63086%202.42187%205.86523C2.51952%206.09961%202.74609%206.25195%202.99999%206.25195H7.99999C8.25195%206.25195%208.48046%206.09961%208.57812%205.86523C8.67578%205.63086%208.62109%205.36328%208.44335%205.18359L5.94335%202.68359H5.9414Z'%20fill='%23808289'/%3E%3Cpath%20d='M5.05858%2017.3164C5.30272%2017.5605%205.69921%2017.5605%205.94335%2017.3164L8.44335%2014.8164C8.62304%2014.6367%208.67577%2014.3691%208.57811%2014.1348C8.48046%2013.9004%208.25389%2013.748%207.99999%2013.748L2.99999%2013.75C2.74804%2013.75%202.51952%2013.9023%202.42186%2014.1367C2.32421%2014.3711%202.37889%2014.6387%202.55663%2014.8184L5.05663%2017.3184L5.05858%2017.3164Z'%20fill='%23808289'/%3E%3C/svg%3E\")",
|
|
241
|
+
backgroundRepeat: "no-repeat",
|
|
242
|
+
backgroundPosition: "center",
|
|
243
|
+
borderRadius: "0.5rem",
|
|
244
|
+
zIndex: "2",
|
|
245
|
+
},
|
|
246
|
+
".rdp-weekday": {
|
|
247
|
+
textTransform: "uppercase",
|
|
248
|
+
fontWeight: "$regular",
|
|
249
|
+
fontSize: "0px",
|
|
250
|
+
},
|
|
251
|
+
".rdp-weekday::first-letter": {
|
|
252
|
+
fontSize: "$14",
|
|
253
|
+
},
|
|
254
|
+
".rdp-month_grid": {
|
|
255
|
+
marginTop: "$16",
|
|
256
|
+
paddingTop: "$16",
|
|
257
|
+
borderTop: "2px solid $neutral100",
|
|
258
|
+
},
|
|
259
|
+
});
|
package/src/components/Card.tsx
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ComponentProps, ElementType } from "react";
|
|
3
|
-
import { styled } from "../styles";
|
|
4
|
-
import { Box, Card as CardRadix } from "@radix-ui/themes";
|
|
5
|
-
|
|
6
|
-
export const CardStyled = styled(CardRadix, {
|
|
7
|
-
borderRadius: "$2xl",
|
|
8
|
-
border: "1px solid $dark100",
|
|
9
|
-
padding: "16px",
|
|
10
|
-
defaultVariants: {
|
|
11
|
-
color: "primary",
|
|
12
|
-
boxShadow: false,
|
|
13
|
-
},
|
|
14
|
-
variants: {
|
|
15
|
-
color: {
|
|
16
|
-
primary: {
|
|
17
|
-
backgroundColor: "$dark50",
|
|
18
|
-
border: "1px solid $dark200",
|
|
19
|
-
},
|
|
20
|
-
disable: {
|
|
21
|
-
backgroundColor: "$grey50",
|
|
22
|
-
border: "1px solid $dark200",
|
|
23
|
-
},
|
|
24
|
-
error: {
|
|
25
|
-
backgroundColor: "$error50",
|
|
26
|
-
border: "1px solid $error600",
|
|
27
|
-
},
|
|
28
|
-
warning: {
|
|
29
|
-
backgroundColor: "$yellow50",
|
|
30
|
-
border: "1px solid $yellow600",
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
boxShadow: {
|
|
34
|
-
true: {
|
|
35
|
-
boxShadow:
|
|
36
|
-
"0 2px 4px rgba(35, 53, 67, 0.16), 0 4px 4px rgba(35, 53, 67, 0.08)",
|
|
37
|
-
},
|
|
38
|
-
false: {
|
|
39
|
-
boxShadow: "none",
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
export type CardProps = ComponentProps<typeof CardStyled> & {
|
|
46
|
-
children: React.ReactNode;
|
|
47
|
-
as?: ElementType;
|
|
48
|
-
padding?: string;
|
|
49
|
-
radius?: string;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export function Card({
|
|
53
|
-
asChild,
|
|
54
|
-
children,
|
|
55
|
-
padding,
|
|
56
|
-
radius,
|
|
57
|
-
...props
|
|
58
|
-
}: CardProps) {
|
|
59
|
-
return (
|
|
60
|
-
<CardStyled
|
|
61
|
-
{...props}
|
|
62
|
-
css={{ padding, borderRadius: radius, ...props.css }}
|
|
63
|
-
>
|
|
64
|
-
{children}
|
|
65
|
-
</CardStyled>
|
|
66
|
-
);
|
|
67
|
-
}
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentProps, ElementType } from "react";
|
|
3
|
+
import { styled } from "../styles";
|
|
4
|
+
import { Box, Card as CardRadix } from "@radix-ui/themes";
|
|
5
|
+
|
|
6
|
+
export const CardStyled = styled(CardRadix, {
|
|
7
|
+
borderRadius: "$2xl",
|
|
8
|
+
border: "1px solid $dark100",
|
|
9
|
+
padding: "16px",
|
|
10
|
+
defaultVariants: {
|
|
11
|
+
color: "primary",
|
|
12
|
+
boxShadow: false,
|
|
13
|
+
},
|
|
14
|
+
variants: {
|
|
15
|
+
color: {
|
|
16
|
+
primary: {
|
|
17
|
+
backgroundColor: "$dark50",
|
|
18
|
+
border: "1px solid $dark200",
|
|
19
|
+
},
|
|
20
|
+
disable: {
|
|
21
|
+
backgroundColor: "$grey50",
|
|
22
|
+
border: "1px solid $dark200",
|
|
23
|
+
},
|
|
24
|
+
error: {
|
|
25
|
+
backgroundColor: "$error50",
|
|
26
|
+
border: "1px solid $error600",
|
|
27
|
+
},
|
|
28
|
+
warning: {
|
|
29
|
+
backgroundColor: "$yellow50",
|
|
30
|
+
border: "1px solid $yellow600",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
boxShadow: {
|
|
34
|
+
true: {
|
|
35
|
+
boxShadow:
|
|
36
|
+
"0 2px 4px rgba(35, 53, 67, 0.16), 0 4px 4px rgba(35, 53, 67, 0.08)",
|
|
37
|
+
},
|
|
38
|
+
false: {
|
|
39
|
+
boxShadow: "none",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export type CardProps = ComponentProps<typeof CardStyled> & {
|
|
46
|
+
children: React.ReactNode;
|
|
47
|
+
as?: ElementType;
|
|
48
|
+
padding?: string;
|
|
49
|
+
radius?: string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export function Card({
|
|
53
|
+
asChild,
|
|
54
|
+
children,
|
|
55
|
+
padding,
|
|
56
|
+
radius,
|
|
57
|
+
...props
|
|
58
|
+
}: CardProps) {
|
|
59
|
+
return (
|
|
60
|
+
<CardStyled
|
|
61
|
+
{...props}
|
|
62
|
+
css={{ padding, borderRadius: radius, ...props.css }}
|
|
63
|
+
>
|
|
64
|
+
{children}
|
|
65
|
+
</CardStyled>
|
|
66
|
+
);
|
|
67
|
+
}
|