@lets-events/react 6.0.0 → 7.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 +12 -0
- package/dist/index.d.mts +2318 -74
- package/dist/index.d.ts +2318 -74
- package/dist/index.js +4974 -608
- package/dist/index.mjs +4934 -574
- package/package.json +3 -2
- package/src/components/Button/index.tsx +13 -0
- package/src/components/Button/styledComponents.ts +250 -0
- package/src/components/ButtonGroup.tsx +2 -2
- package/src/components/Calendar/index.tsx +124 -0
- package/src/components/Calendar/styledComponents.ts +197 -0
- package/src/components/Flex.tsx +1 -0
- package/src/components/TextField.tsx +65 -19
- package/src/components/TimePicker.tsx +191 -0
- package/src/index.tsx +2 -0
- package/src/components/Button.tsx +0 -329
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lets-events/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
|
33
33
|
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
34
34
|
"@radix-ui/themes": "^3.2.1",
|
|
35
|
-
"@stitches/react": "^1.2.8"
|
|
35
|
+
"@stitches/react": "^1.2.8",
|
|
36
|
+
"react-day-picker": "^9.6.7"
|
|
36
37
|
}
|
|
37
38
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentProps } from 'react'
|
|
2
|
+
import { ButtonStyled } from './styledComponents'
|
|
3
|
+
import { Button as ButtonRadix } from '@radix-ui/themes'
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export interface ButtonProps extends ComponentProps<typeof ButtonStyled> {
|
|
7
|
+
asChild?: boolean,
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function Button({ asChild, ...props }: ButtonProps) {
|
|
11
|
+
const Component = asChild ? ButtonRadix : 'button'
|
|
12
|
+
return <ButtonStyled as={Component} {...props} />
|
|
13
|
+
}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { Button as ButtonRadix } from '@radix-ui/themes'
|
|
2
|
+
import { typographyButtonValues } from '../../types/typographyValues'
|
|
3
|
+
|
|
4
|
+
import { styled } from "../../styles"
|
|
5
|
+
|
|
6
|
+
export const ButtonStyled = styled(ButtonRadix, {
|
|
7
|
+
$$buttonColor: 'inherit',
|
|
8
|
+
$$buttonBgColor: '$colors$grey50',
|
|
9
|
+
$$buttonBorderColor: 'inherit',
|
|
10
|
+
$$buttonOutlinedColor: 'inherit',
|
|
11
|
+
|
|
12
|
+
fontFamily: '$default',
|
|
13
|
+
letterSpacing: 0,
|
|
14
|
+
border: 0,
|
|
15
|
+
transition: 'all 300ms ease-out',
|
|
16
|
+
cursor: 'pointer',
|
|
17
|
+
borderRadius: '$xs',
|
|
18
|
+
boxShadow: '0px 4px 4px 0px rgba(35, 53, 67, 0.08), 0px 2px 4px 0px rgba(35, 53, 67, 0.16)',
|
|
19
|
+
display: 'flex',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
gap: '$10',
|
|
23
|
+
padding: '$6 $16',
|
|
24
|
+
'&:disabled': {
|
|
25
|
+
cursor: 'not-allowed',
|
|
26
|
+
transition: 'none',
|
|
27
|
+
},
|
|
28
|
+
variants: {
|
|
29
|
+
color: {
|
|
30
|
+
brand: {
|
|
31
|
+
$$buttonColor: '$colors$brand500',
|
|
32
|
+
$$buttonBorderColor: '$colors$brand600',
|
|
33
|
+
$$buttonOutlinedColor: '$$buttonColor',
|
|
34
|
+
'&:hover': {
|
|
35
|
+
$$buttonColor: '$colors$brand600',
|
|
36
|
+
$$buttonBorderColor: '$colors$brand700',
|
|
37
|
+
},
|
|
38
|
+
'&:focus': {
|
|
39
|
+
$$buttonColor: '$colors$brand400',
|
|
40
|
+
$$buttonBorderColor: '$colors$brand300',
|
|
41
|
+
$$buttonBgColor: '$colors$grey200',
|
|
42
|
+
},
|
|
43
|
+
'&:active': {
|
|
44
|
+
$$buttonColor: '$colors$brand500',
|
|
45
|
+
$$buttonBorderColor: '$colors$brand700',
|
|
46
|
+
$$buttonBgColor: '$colors$grey200',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
purple: {
|
|
50
|
+
$$buttonColor: '$colors$purple500',
|
|
51
|
+
$$buttonBorderColor: '$colors$purple300',
|
|
52
|
+
$$buttonOutlinedColor: '$$buttonColor',
|
|
53
|
+
'&:hover': {
|
|
54
|
+
$$buttonColor: '$colors$purple600',
|
|
55
|
+
$$buttonBorderColor: '$colors$purple700',
|
|
56
|
+
$$buttonOutlinedColor: '$colors$purple500',
|
|
57
|
+
$$buttonBgColor: '$colors$purple50',
|
|
58
|
+
},
|
|
59
|
+
'&:focus': {
|
|
60
|
+
$$buttonColor: '$colors$purple700',
|
|
61
|
+
$$buttonOutlinedColor: '$colors$purple500',
|
|
62
|
+
$$buttonBgColor: '$colors$purple200',
|
|
63
|
+
$$buttonBorderColor: '$colors$purple400',
|
|
64
|
+
},
|
|
65
|
+
'&:active': {
|
|
66
|
+
$$buttonColor: '$colors$purple500',
|
|
67
|
+
$$buttonOutlinedColor: '$colors$purple500',
|
|
68
|
+
$$buttonBgColor: '$colors$purple100',
|
|
69
|
+
$$buttonBorderColor: '$colors$purple300',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
error: {
|
|
73
|
+
$$buttonColor: '$colors$error600',
|
|
74
|
+
$$buttonBorderColor: '$colors$error500',
|
|
75
|
+
$$buttonOutlinedColor: ' $colors$error500',
|
|
76
|
+
'&:hover': {
|
|
77
|
+
$$buttonColor: '$colors$error600',
|
|
78
|
+
$$buttonBorderColor: '$colors$error700',
|
|
79
|
+
$$buttonBgColor: '$colors$error50'
|
|
80
|
+
},
|
|
81
|
+
'&:focus': {
|
|
82
|
+
$$buttonColor: '$colors$error400',
|
|
83
|
+
$$buttonBorderColor: '$colors$error300',
|
|
84
|
+
$$buttonBgColor: '$colors$error200'
|
|
85
|
+
},
|
|
86
|
+
'&:active': {
|
|
87
|
+
$$buttonColor: '$colors$error700',
|
|
88
|
+
$$buttonBorderColor: '$colors$error700',
|
|
89
|
+
$$buttonBgColor: '$colors$re1050'
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
info: {
|
|
93
|
+
$$buttonColor: '$colors$info500',
|
|
94
|
+
$$buttonBorderColor: '$colors$info600',
|
|
95
|
+
$$buttonOutlinedColor: '$$buttonColor',
|
|
96
|
+
'&:hover': {
|
|
97
|
+
$$buttonColor: '$colors$info600',
|
|
98
|
+
$$buttonBorderColor: '$colors$info700',
|
|
99
|
+
$$buttonBgColor: '$colors$info50'
|
|
100
|
+
},
|
|
101
|
+
'&:focus': {
|
|
102
|
+
$$buttonColor: '$colors$info400',
|
|
103
|
+
$$buttonBorderColor: '$colors$info600',
|
|
104
|
+
$$buttonBgColor: '$colors$info200'
|
|
105
|
+
},
|
|
106
|
+
'&:active': {
|
|
107
|
+
$$buttonColor: '$colors$info700',
|
|
108
|
+
$$buttonBorderColor: '$colors$info700',
|
|
109
|
+
$$buttonBgColor: '$colors$info100'
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
success: {
|
|
113
|
+
$$buttonColor: '$colors$success500',
|
|
114
|
+
$$buttonBorderColor: '$colors$success600',
|
|
115
|
+
$$buttonOutlinedColor: '$$buttonColor',
|
|
116
|
+
'&:hover': {
|
|
117
|
+
$$buttonColor: '$colors$success600',
|
|
118
|
+
$$buttonBorderColor: '$colors$success700',
|
|
119
|
+
$$buttonBgColor: '$colors$success50'
|
|
120
|
+
},
|
|
121
|
+
'&:focus': {
|
|
122
|
+
$$buttonColor: '$colors$success400',
|
|
123
|
+
$$buttonBorderColor: '$colors$success600',
|
|
124
|
+
$$buttonBgColor: '$colors$success200'
|
|
125
|
+
},
|
|
126
|
+
'&:active': {
|
|
127
|
+
$$buttonColor: '$colors$success700',
|
|
128
|
+
$$buttonBorderColor: '$colors$success700',
|
|
129
|
+
$$buttonBgColor: '$colors$success100'
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
warning: {
|
|
133
|
+
$$buttonColor: '$colors$warning500',
|
|
134
|
+
$$buttonBorderColor: '$colors$warning600',
|
|
135
|
+
$$buttonOutlinedColor: '$$buttonColor',
|
|
136
|
+
'&:hover': {
|
|
137
|
+
$$buttonColor: '$colors$warning600',
|
|
138
|
+
$$buttonBorderColor: '$colors$warning700',
|
|
139
|
+
$$buttonBgColor: '$colors$warning50'
|
|
140
|
+
},
|
|
141
|
+
'&:focus': {
|
|
142
|
+
$$buttonColor: '$colors$warning400',
|
|
143
|
+
$$buttonBorderColor: '$colors$warning600',
|
|
144
|
+
$$buttonBgColor: '$colors$warning200'
|
|
145
|
+
|
|
146
|
+
},
|
|
147
|
+
'&:active': {
|
|
148
|
+
$$buttonColor: '$colors$warning700',
|
|
149
|
+
$$buttonBorderColor: '$colors$warning700',
|
|
150
|
+
$$buttonBgColor: '$colors$warning100'
|
|
151
|
+
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
neutral: {
|
|
155
|
+
$$buttonColor: '$colors$neutral600',
|
|
156
|
+
$$buttonBorderColor: '$colors$neutral300',
|
|
157
|
+
$$buttonOutlinedColor: '$$buttonColor',
|
|
158
|
+
'&:hover': {
|
|
159
|
+
$$buttonColor: '$colors$neutral700',
|
|
160
|
+
$$buttonBgColor: '$colors$neutral100',
|
|
161
|
+
$$buttonBorderColor: '$colors$neutral300',
|
|
162
|
+
},
|
|
163
|
+
'&:focus': {
|
|
164
|
+
$$buttonColor: '$colors$neutral800',
|
|
165
|
+
$$buttonBgColor: '$colors$neutral300',
|
|
166
|
+
$$buttonBorderColor: '$colors$neutral400',
|
|
167
|
+
},
|
|
168
|
+
'&:active': {
|
|
169
|
+
$$buttonColor: '$colors$neutral500',
|
|
170
|
+
$$buttonBgColor: '$colors$neutral300',
|
|
171
|
+
$$buttonBorderColor: '$colors$neutral400',
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
white: {
|
|
175
|
+
$$buttonColor: '$colors$neutral50',
|
|
176
|
+
$$buttonBorderColor: '$colors$neutral300',
|
|
177
|
+
$$buttonOutlinedColor: '$colors$neutral50',
|
|
178
|
+
'&:hover': {
|
|
179
|
+
$$buttonColor: '$colors$neutral100',
|
|
180
|
+
$$buttonBorderColor: '$colors$neutral300',
|
|
181
|
+
$$buttonBgColor: '$colors$neutral100'
|
|
182
|
+
},
|
|
183
|
+
'&:focus': {
|
|
184
|
+
$$buttonBorderColor: '$colors$neutral400',
|
|
185
|
+
$$buttonColor: '$colors$neutral300',
|
|
186
|
+
$$buttonBgColor: '$colors$neutral200'
|
|
187
|
+
},
|
|
188
|
+
'&:active': {
|
|
189
|
+
$$buttonColor: '$colors$neutral400',
|
|
190
|
+
$$buttonBorderColor: '$colors$neutral500',
|
|
191
|
+
$$buttonBgColor: '$colors$neutral300'
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
variant: {
|
|
196
|
+
text: {
|
|
197
|
+
backgroundColor: 'transparent',
|
|
198
|
+
boxShadow: 'none',
|
|
199
|
+
padding: 0,
|
|
200
|
+
border: 0,
|
|
201
|
+
color: '$$buttonColor',
|
|
202
|
+
},
|
|
203
|
+
contained: {
|
|
204
|
+
color: '$grey50',
|
|
205
|
+
backgroundColor: '$$buttonColor',
|
|
206
|
+
border: '1px solid $$buttonBorderColor',
|
|
207
|
+
'&:disabled': {
|
|
208
|
+
boxShadow: 'none',
|
|
209
|
+
color: '$neutral400',
|
|
210
|
+
backgroundColor: '$neutral200',
|
|
211
|
+
$$buttonBorderColor: '$colors$neutral100'
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
outlined: {
|
|
215
|
+
color: '$$buttonOutlinedColor',
|
|
216
|
+
border: '1px solid $$buttonOutlinedColor',
|
|
217
|
+
backgroundColor: '$$buttonBgColor',
|
|
218
|
+
'&:disabled': {
|
|
219
|
+
boxShadow: 'none',
|
|
220
|
+
borderColor: '$colors$neutral100',
|
|
221
|
+
$$buttonColor: '$colors$neutral300'
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
typography: typographyButtonValues,
|
|
226
|
+
fontWeight: {
|
|
227
|
+
regular: { fontWeight: '$regular' },
|
|
228
|
+
medium: { fontWeight: '$medium' },
|
|
229
|
+
semibold: { fontWeight: '$semibold' },
|
|
230
|
+
bold: { fontWeight: '$bold' },
|
|
231
|
+
},
|
|
232
|
+
outlinedBgColor: {
|
|
233
|
+
neutral: {},
|
|
234
|
+
transparent: {
|
|
235
|
+
backgroundColor: 'transparent',
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
radii: {
|
|
239
|
+
'full': {
|
|
240
|
+
borderRadius: '$full',
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
|
|
245
|
+
defaultVariants: {
|
|
246
|
+
variant: 'contained',
|
|
247
|
+
typography: 'buttonMedium',
|
|
248
|
+
color: 'brand',
|
|
249
|
+
},
|
|
250
|
+
})
|
|
@@ -41,7 +41,7 @@ export const ButtonGroupStyled = styled(Flex, {
|
|
|
41
41
|
},
|
|
42
42
|
contained: {
|
|
43
43
|
[`& ${ButtonItemStyled}`]: {
|
|
44
|
-
borderWidth: '
|
|
44
|
+
borderWidth: '1px',
|
|
45
45
|
borderStyle: 'solid',
|
|
46
46
|
'&:disabled': {
|
|
47
47
|
boxShadow: 'none',
|
|
@@ -50,7 +50,7 @@ export const ButtonGroupStyled = styled(Flex, {
|
|
|
50
50
|
},
|
|
51
51
|
outlined: {
|
|
52
52
|
[`& ${ButtonItemStyled}`]: {
|
|
53
|
-
borderWidth: '
|
|
53
|
+
borderWidth: '1px',
|
|
54
54
|
borderStyle: 'solid',
|
|
55
55
|
'&:disabled': {
|
|
56
56
|
color: '$neutral400',
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import React, { ComponentProps, useEffect, useState } from "react";
|
|
2
|
+
import { DayPicker } from "react-day-picker";
|
|
3
|
+
import { ptBR } from "date-fns/locale";
|
|
4
|
+
import { Dialog as Calendaradix } from "@radix-ui/themes";
|
|
5
|
+
import { parse, isValid, format, addYears } from "date-fns";
|
|
6
|
+
import { Button } from "../Button";
|
|
7
|
+
import { Box } from "../Box";
|
|
8
|
+
import { TextField, TextFieldSlot } from "../TextField";
|
|
9
|
+
import Icon from "../Icon";
|
|
10
|
+
import {
|
|
11
|
+
CalendarContentStyled,
|
|
12
|
+
CalendarFooterStyled,
|
|
13
|
+
CalendarStyled,
|
|
14
|
+
DayPickerWrapperStyled,
|
|
15
|
+
CalendarTitleStyled,
|
|
16
|
+
} from "./styledComponents";
|
|
17
|
+
|
|
18
|
+
export type CalendarProps = ComponentProps<typeof CalendarStyled> & {
|
|
19
|
+
calendarLayout?: "label" | "dropdown" | "dropdown-months" | "dropdown-years";
|
|
20
|
+
selected: Date | undefined;
|
|
21
|
+
setSelected: React.Dispatch<React.SetStateAction<Date | undefined>>;
|
|
22
|
+
action?: boolean;
|
|
23
|
+
actionText?: string;
|
|
24
|
+
onAction?: () => void;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
function formatToDateMask(value: string): string {
|
|
28
|
+
const numeric = value.replace(/\D/g, "").slice(0, 8);
|
|
29
|
+
const parts = numeric.match(/^(\d{0,2})(\d{0,2})(\d{0,4})$/);
|
|
30
|
+
if (!parts) return "";
|
|
31
|
+
const [, day, month, year] = parts;
|
|
32
|
+
return [day, month, year].filter(Boolean).join("/");
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function Calendar({
|
|
36
|
+
action,
|
|
37
|
+
actionText,
|
|
38
|
+
calendarLayout,
|
|
39
|
+
selected,
|
|
40
|
+
setSelected,
|
|
41
|
+
onAction,
|
|
42
|
+
...props
|
|
43
|
+
}: CalendarProps) {
|
|
44
|
+
const [inputValue, setInputValue] = useState("");
|
|
45
|
+
|
|
46
|
+
const today = new Date();
|
|
47
|
+
const maxDate = addYears(today, 20);
|
|
48
|
+
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
console.log("selected", selected);
|
|
51
|
+
if (selected) {
|
|
52
|
+
setInputValue(format(selected, "dd/MM/yyyy"));
|
|
53
|
+
} else {
|
|
54
|
+
setInputValue("");
|
|
55
|
+
}
|
|
56
|
+
}, [selected]);
|
|
57
|
+
|
|
58
|
+
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
59
|
+
const masked = formatToDateMask(e.target.value);
|
|
60
|
+
setInputValue(masked);
|
|
61
|
+
|
|
62
|
+
const parsed = parse(masked, "dd/MM/yyyy", new Date());
|
|
63
|
+
if (isValid(parsed)) {
|
|
64
|
+
setSelected(parsed);
|
|
65
|
+
} else {
|
|
66
|
+
console.warn("Data inválida inserida no input:", masked);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<Calendaradix.Root>
|
|
72
|
+
<CalendarStyled {...props}>
|
|
73
|
+
<Calendaradix.Trigger>
|
|
74
|
+
<TextField
|
|
75
|
+
placeholder="00/00/0000"
|
|
76
|
+
type="text"
|
|
77
|
+
value={inputValue}
|
|
78
|
+
onChange={handleInputChange}
|
|
79
|
+
inputMode="numeric"
|
|
80
|
+
>
|
|
81
|
+
<TextFieldSlot>
|
|
82
|
+
<Icon name="calendar" size={"xl"} />
|
|
83
|
+
</TextFieldSlot>
|
|
84
|
+
</TextField>
|
|
85
|
+
</Calendaradix.Trigger>
|
|
86
|
+
|
|
87
|
+
<CalendarContentStyled>
|
|
88
|
+
<CalendarTitleStyled>Calendário</CalendarTitleStyled>
|
|
89
|
+
<Box>
|
|
90
|
+
<DayPickerWrapperStyled>
|
|
91
|
+
<DayPicker
|
|
92
|
+
mode="single"
|
|
93
|
+
captionLayout={calendarLayout}
|
|
94
|
+
selected={selected}
|
|
95
|
+
onSelect={setSelected}
|
|
96
|
+
required
|
|
97
|
+
locale={ptBR}
|
|
98
|
+
disabled={{ before: today }}
|
|
99
|
+
startMonth={today}
|
|
100
|
+
endMonth={maxDate}
|
|
101
|
+
/>
|
|
102
|
+
</DayPickerWrapperStyled>
|
|
103
|
+
</Box>
|
|
104
|
+
|
|
105
|
+
{action && onAction && (
|
|
106
|
+
<CalendarFooterStyled>
|
|
107
|
+
<Calendaradix.Close>
|
|
108
|
+
<Button
|
|
109
|
+
variant="text"
|
|
110
|
+
color="brand"
|
|
111
|
+
onClick={onAction}
|
|
112
|
+
typography="buttonMedium"
|
|
113
|
+
fontWeight="medium"
|
|
114
|
+
>
|
|
115
|
+
{actionText ?? "Aplicar"}
|
|
116
|
+
</Button>
|
|
117
|
+
</Calendaradix.Close>
|
|
118
|
+
</CalendarFooterStyled>
|
|
119
|
+
)}
|
|
120
|
+
</CalendarContentStyled>
|
|
121
|
+
</CalendarStyled>
|
|
122
|
+
</Calendaradix.Root>
|
|
123
|
+
);
|
|
124
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { Dialog as Calendaradix } from "@radix-ui/themes";
|
|
2
|
+
|
|
3
|
+
import { styled } from "../../styles"
|
|
4
|
+
|
|
5
|
+
export const CalendarStyled = styled('div', {
|
|
6
|
+
fontFamily: '$default',
|
|
7
|
+
lineHeight: '$base',
|
|
8
|
+
fontSize: '$14',
|
|
9
|
+
maxWidth: '200px',
|
|
10
|
+
borderRadius: '$sm',
|
|
11
|
+
})
|
|
12
|
+
export const CalendarTitleStyled = styled(Calendaradix.Title, {
|
|
13
|
+
display: 'none',
|
|
14
|
+
})
|
|
15
|
+
export const CalendarContentStyled = styled(Calendaradix.Content, {
|
|
16
|
+
fontFamily: '$default',
|
|
17
|
+
lineHeight: '$base',
|
|
18
|
+
fontSize: '$14',
|
|
19
|
+
width: '100%',
|
|
20
|
+
maxWidth: 'fit-content',
|
|
21
|
+
border: '1px solid $neutral300',
|
|
22
|
+
borderRadius: '$sm',
|
|
23
|
+
boxShadow: '0px 2px 8px 0px $shadow50',
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
export const CalendarFooterStyled = styled('div', {
|
|
27
|
+
borderTop: '2px solid $neutral100',
|
|
28
|
+
padding: '$4 $16',
|
|
29
|
+
display: 'flex',
|
|
30
|
+
justifyContent: 'center',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
height: '3rem',
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
export const DayPickerWrapperStyled = styled('div', {
|
|
36
|
+
'.rt-TextFieldInput': {
|
|
37
|
+
fontFamily: '$default',
|
|
38
|
+
fontSize: '$14',
|
|
39
|
+
color: '$dark500',
|
|
40
|
+
},
|
|
41
|
+
'.rdp-root': {
|
|
42
|
+
padding: '$16',
|
|
43
|
+
},
|
|
44
|
+
'.rdp-today .rdp-day_button': {
|
|
45
|
+
color: '$brand500',
|
|
46
|
+
textDecoration: 'underline',
|
|
47
|
+
},
|
|
48
|
+
'.rdp-day.rdp-disabled .rdp-day_button': {
|
|
49
|
+
color: '$dark400'
|
|
50
|
+
},
|
|
51
|
+
'.rdp-day_button': {
|
|
52
|
+
height: '32px',
|
|
53
|
+
width: '32px',
|
|
54
|
+
borderRadius: '$sm',
|
|
55
|
+
fontSize: '$14',
|
|
56
|
+
color: '$text',
|
|
57
|
+
backgroundColor: 'transparent',
|
|
58
|
+
border: '1px solid transparent',
|
|
59
|
+
transition: 'all 0.2s ease-in-out',
|
|
60
|
+
cursor: 'pointer',
|
|
61
|
+
},
|
|
62
|
+
'.rdp-day_button:hover': {
|
|
63
|
+
backgroundColor: '$dark100',
|
|
64
|
+
borderColor: '$brand500',
|
|
65
|
+
},
|
|
66
|
+
'.rdp-day.rdp-disabled .rdp-day_button:hover': {
|
|
67
|
+
backgroundColor: 'transparent',
|
|
68
|
+
borderColor: 'transparent',
|
|
69
|
+
},
|
|
70
|
+
'.rdp-nav': {
|
|
71
|
+
display: 'flex',
|
|
72
|
+
justifyContent: 'space-between',
|
|
73
|
+
width: '100%',
|
|
74
|
+
},
|
|
75
|
+
'.rdp-nav .rdp-chevron': {
|
|
76
|
+
display: 'none',
|
|
77
|
+
},
|
|
78
|
+
'.rdp-nav .rdp-button_previous': {
|
|
79
|
+
display: 'block',
|
|
80
|
+
backgroundImage: '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")',
|
|
81
|
+
backgroundRepeat: 'no-repeat',
|
|
82
|
+
backgroundPosition: 'center',
|
|
83
|
+
backgroundSize: 'cover',
|
|
84
|
+
width: '32px',
|
|
85
|
+
height: '32px',
|
|
86
|
+
|
|
87
|
+
},
|
|
88
|
+
'.rdp-nav .rdp-button_next': {
|
|
89
|
+
display: 'block',
|
|
90
|
+
backgroundImage: '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")',
|
|
91
|
+
backgroundRepeat: 'no-repeat',
|
|
92
|
+
backgroundPosition: 'center',
|
|
93
|
+
backgroundSize: 'cover',
|
|
94
|
+
width: '32px',
|
|
95
|
+
height: '32px',
|
|
96
|
+
},
|
|
97
|
+
'.rdp-nav .rdp-button_previous:hover': {
|
|
98
|
+
backgroundImage: '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")',
|
|
99
|
+
transition: 'all 0.2s ease-in-out',
|
|
100
|
+
},
|
|
101
|
+
'.rdp-nav .rdp-button_next:hover': {
|
|
102
|
+
backgroundImage: '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")',
|
|
103
|
+
transition: 'all 0.2s ease-in-out',
|
|
104
|
+
},
|
|
105
|
+
'.rdp-nav button': {
|
|
106
|
+
border: 'none',
|
|
107
|
+
backgroundColor: 'transparent',
|
|
108
|
+
cursor: 'pointer',
|
|
109
|
+
},
|
|
110
|
+
'.rdp-month': {
|
|
111
|
+
marginTop: '-24px',
|
|
112
|
+
},
|
|
113
|
+
'.rdp-month_caption': {
|
|
114
|
+
display: 'flex',
|
|
115
|
+
alignItems: 'center',
|
|
116
|
+
justifyContent: 'center',
|
|
117
|
+
width: 'calc(100% - 64px)',
|
|
118
|
+
margin: '0 auto',
|
|
119
|
+
columnGap: '12px',
|
|
120
|
+
},
|
|
121
|
+
'.rdp-dropdowns span, .rdp-caption_label': {
|
|
122
|
+
fontSize: '$16',
|
|
123
|
+
fontWeight: '$regular',
|
|
124
|
+
lineHeight: '$20',
|
|
125
|
+
textTransform: 'capitalize',
|
|
126
|
+
},
|
|
127
|
+
'.rdp-day.rdp-selected .rdp-day_button': {
|
|
128
|
+
backgroundColor: '$brand500',
|
|
129
|
+
color: '$neutral50',
|
|
130
|
+
borderColor: '$brand500',
|
|
131
|
+
},
|
|
132
|
+
'.rdp-dropdowns': {
|
|
133
|
+
display: 'flex',
|
|
134
|
+
alignItems: 'center',
|
|
135
|
+
justifyContent: 'center',
|
|
136
|
+
width: 'calc(100% - 64px)',
|
|
137
|
+
columnGap: '12px',
|
|
138
|
+
},
|
|
139
|
+
'.rdp-dropdowns .rdp-caption_label': {
|
|
140
|
+
display: 'none',
|
|
141
|
+
},
|
|
142
|
+
'.rdp-dropdown.rdp-months_dropdown, .rdp-dropdown.rdp-years_dropdown': {
|
|
143
|
+
border: 'none',
|
|
144
|
+
backgroundColor: 'transparent',
|
|
145
|
+
textTransform: 'capitalize',
|
|
146
|
+
height: '1.25rem',
|
|
147
|
+
position: 'relative',
|
|
148
|
+
fontFamily: '$default',
|
|
149
|
+
fontSize: '$16',
|
|
150
|
+
lineHeight: '1.25rem',
|
|
151
|
+
appearance: 'none',
|
|
152
|
+
WebkitAppearance: 'none',
|
|
153
|
+
MozAppearance: 'none',
|
|
154
|
+
paddingRight: '1.25rem',
|
|
155
|
+
zIndex: '3',
|
|
156
|
+
},
|
|
157
|
+
'.rdp-dropdown:focus, .rdp-dropdown:focus-visible, .rdp-dropdown:active': {
|
|
158
|
+
border: 'none',
|
|
159
|
+
outline: 'none',
|
|
160
|
+
boxShadow: 'none',
|
|
161
|
+
},
|
|
162
|
+
'.rdp-dropdown.rdp-months_dropdown:focus, .rdp-dropdown.rdp-years_dropdown:focus': {
|
|
163
|
+
border: 'none',
|
|
164
|
+
},
|
|
165
|
+
'.rdp-dropdown_root': {
|
|
166
|
+
position: 'relative'
|
|
167
|
+
},
|
|
168
|
+
'.rdp-dropdown_root::after': {
|
|
169
|
+
content: '',
|
|
170
|
+
height: '1.25rem',
|
|
171
|
+
width: '1.25rem',
|
|
172
|
+
position: 'absolute',
|
|
173
|
+
top: '0',
|
|
174
|
+
right: '0',
|
|
175
|
+
display: 'block',
|
|
176
|
+
backgroundColor: '$neutral50',
|
|
177
|
+
backgroundImage: '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")',
|
|
178
|
+
backgroundRepeat: 'no-repeat',
|
|
179
|
+
backgroundPosition: 'center',
|
|
180
|
+
borderRadius: '0.5rem',
|
|
181
|
+
zIndex: '2',
|
|
182
|
+
},
|
|
183
|
+
'.rdp-weekday': {
|
|
184
|
+
textTransform: 'uppercase',
|
|
185
|
+
fontWeight: '$regular',
|
|
186
|
+
fontSize: '0px',
|
|
187
|
+
|
|
188
|
+
},
|
|
189
|
+
'.rdp-weekday::first-letter': {
|
|
190
|
+
fontSize: '$14',
|
|
191
|
+
},
|
|
192
|
+
'.rdp-month_grid': {
|
|
193
|
+
marginTop: '$16',
|
|
194
|
+
paddingTop: '$16',
|
|
195
|
+
borderTop: '2px solid $neutral100',
|
|
196
|
+
},
|
|
197
|
+
})
|