@clickpalm/react 1.3.13 → 1.3.15
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/package.json +61 -61
- package/dist/index.d.ts +0 -4149
- package/dist/index.js +0 -4445
- package/dist/index.mjs +0 -4378
package/dist/index.mjs
DELETED
|
@@ -1,4378 +0,0 @@
|
|
|
1
|
-
// ../tokens/dist/index.mjs
|
|
2
|
-
var colors = {
|
|
3
|
-
white: "#FFF",
|
|
4
|
-
black: "#000",
|
|
5
|
-
gray_background: "#EFEFEF",
|
|
6
|
-
gray_light: "#D9D9D9",
|
|
7
|
-
gray_mid: "#C2C2C2",
|
|
8
|
-
gray_dark: "#979797",
|
|
9
|
-
clickpalm_light: "#8987E6",
|
|
10
|
-
clickpalm_mid: "#8556E5",
|
|
11
|
-
clickpalm_dark: "#854FE8",
|
|
12
|
-
clickpalm_superDark: "#4A307F",
|
|
13
|
-
ignite_light: "#78CB63",
|
|
14
|
-
ignite_dark: "#518D42",
|
|
15
|
-
success: "#84FF8A",
|
|
16
|
-
success_dark: "#3EBF4A",
|
|
17
|
-
warning: "#FCD842",
|
|
18
|
-
warning_dark: "#C9A600",
|
|
19
|
-
danger: "#FF8173",
|
|
20
|
-
danger_dark: "#C94A3F"
|
|
21
|
-
};
|
|
22
|
-
var space = {
|
|
23
|
-
1: "0.25rem",
|
|
24
|
-
2: "0.5rem",
|
|
25
|
-
3: "0.75rem",
|
|
26
|
-
4: "1rem",
|
|
27
|
-
5: "1.25rem",
|
|
28
|
-
6: "1.5rem",
|
|
29
|
-
7: "1.75rem",
|
|
30
|
-
8: "2rem",
|
|
31
|
-
10: "2.5rem",
|
|
32
|
-
11: "2.75rem",
|
|
33
|
-
12: "3rem",
|
|
34
|
-
14: "3.5rem",
|
|
35
|
-
16: "4rem",
|
|
36
|
-
19: "4.75rem",
|
|
37
|
-
20: "5rem",
|
|
38
|
-
22: "6rem",
|
|
39
|
-
40: "10rem",
|
|
40
|
-
64: "16rem",
|
|
41
|
-
80: "20rem"
|
|
42
|
-
};
|
|
43
|
-
var radii = {
|
|
44
|
-
px: "1px",
|
|
45
|
-
xs: "4px",
|
|
46
|
-
sm: "6px",
|
|
47
|
-
md: "8px",
|
|
48
|
-
lg: "16px",
|
|
49
|
-
full: "99999px"
|
|
50
|
-
};
|
|
51
|
-
var fonts = {
|
|
52
|
-
default: "Nunito",
|
|
53
|
-
code: "monospace"
|
|
54
|
-
};
|
|
55
|
-
var fontSizes = {
|
|
56
|
-
xxs: "0.625rem",
|
|
57
|
-
xs: "0.75rem",
|
|
58
|
-
sm: "0.875rem",
|
|
59
|
-
md: "1rem",
|
|
60
|
-
lg: "1.125rem",
|
|
61
|
-
xl: "1.25rem",
|
|
62
|
-
"2xl": "1.5rem",
|
|
63
|
-
"4xl": "2rem",
|
|
64
|
-
"5xl": "2.25rem",
|
|
65
|
-
"6xl": "3rem",
|
|
66
|
-
"7xl": "4rem",
|
|
67
|
-
"8xl": "4.5rem",
|
|
68
|
-
"9xl": "6rem"
|
|
69
|
-
};
|
|
70
|
-
var fontWeights = {
|
|
71
|
-
regular: "400",
|
|
72
|
-
medium: "500",
|
|
73
|
-
bold: "700"
|
|
74
|
-
};
|
|
75
|
-
var lineHeights = {
|
|
76
|
-
regular: "100%",
|
|
77
|
-
shorter: "125%",
|
|
78
|
-
short: "140%",
|
|
79
|
-
base: "160%",
|
|
80
|
-
tall: "180%"
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
// src/styles/stitches.config.ts
|
|
84
|
-
import { createStitches, defaultThemeMap } from "@stitches/react";
|
|
85
|
-
var {
|
|
86
|
-
styled,
|
|
87
|
-
css,
|
|
88
|
-
globalCss,
|
|
89
|
-
keyframes,
|
|
90
|
-
getCssText,
|
|
91
|
-
theme,
|
|
92
|
-
createTheme,
|
|
93
|
-
config
|
|
94
|
-
} = createStitches({
|
|
95
|
-
themeMap: {
|
|
96
|
-
...defaultThemeMap,
|
|
97
|
-
height: "space",
|
|
98
|
-
width: "space"
|
|
99
|
-
},
|
|
100
|
-
theme: {
|
|
101
|
-
colors,
|
|
102
|
-
fontSizes,
|
|
103
|
-
fontWeights,
|
|
104
|
-
fonts,
|
|
105
|
-
lineHeights,
|
|
106
|
-
radii,
|
|
107
|
-
space
|
|
108
|
-
},
|
|
109
|
-
media: {
|
|
110
|
-
sm: "(min-width: 375px)",
|
|
111
|
-
md: "(min-width: 768px)",
|
|
112
|
-
lg: "(min-width: 1024px)"
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
// src/components/Avatar/styles.ts
|
|
117
|
-
import * as Avatar from "@radix-ui/react-avatar";
|
|
118
|
-
var AvatarContainer = styled(Avatar.Root, {
|
|
119
|
-
borderRadius: "$full",
|
|
120
|
-
display: "inline-block",
|
|
121
|
-
overflow: "hidden",
|
|
122
|
-
borderWidth: "3px",
|
|
123
|
-
borderStyle: "solid",
|
|
124
|
-
boxSizing: "border-box",
|
|
125
|
-
variants: {
|
|
126
|
-
size: {
|
|
127
|
-
sm: { width: "$11", height: "$11" },
|
|
128
|
-
md: { width: "$14", height: "$14" },
|
|
129
|
-
lg: { width: "$19", height: "$19" },
|
|
130
|
-
xlg: { width: "$22", height: "$22" }
|
|
131
|
-
},
|
|
132
|
-
status: {
|
|
133
|
-
default: { borderColor: "$white" },
|
|
134
|
-
warning: { borderColor: "$warning" },
|
|
135
|
-
error: { borderColor: "$danger" },
|
|
136
|
-
success: { borderColor: "$success" },
|
|
137
|
-
completed: { borderColor: "$clickpalm_dark" }
|
|
138
|
-
},
|
|
139
|
-
shadow: {
|
|
140
|
-
true: { boxShadow: "0 2px 4px $colors$gray_dark" }
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
defaultVariants: {
|
|
144
|
-
size: "md",
|
|
145
|
-
status: "default"
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
var AvatarImage = styled(Avatar.Image, {
|
|
149
|
-
width: "100%",
|
|
150
|
-
height: "100%",
|
|
151
|
-
objectFit: "cover",
|
|
152
|
-
borderRadius: "inherit"
|
|
153
|
-
});
|
|
154
|
-
var AvatarFallback = styled(Avatar.Fallback, {
|
|
155
|
-
width: "100%",
|
|
156
|
-
height: "100%",
|
|
157
|
-
display: "flex",
|
|
158
|
-
alignItems: "center",
|
|
159
|
-
justifyContent: "center",
|
|
160
|
-
backgroundColor: "$gray_background",
|
|
161
|
-
color: "$black",
|
|
162
|
-
fontWeight: "$bold",
|
|
163
|
-
fontSize: "$sm"
|
|
164
|
-
});
|
|
165
|
-
var NotificationBadge = styled("div", {
|
|
166
|
-
position: "absolute",
|
|
167
|
-
transform: "translate(50%, 50%)",
|
|
168
|
-
backgroundColor: "$ignite_light",
|
|
169
|
-
color: "$black",
|
|
170
|
-
fontWeight: "$bold",
|
|
171
|
-
display: "flex",
|
|
172
|
-
alignItems: "center",
|
|
173
|
-
justifyContent: "center",
|
|
174
|
-
borderRadius: "$full",
|
|
175
|
-
border: "1px solid $white",
|
|
176
|
-
boxSizing: "border-box",
|
|
177
|
-
zIndex: 1,
|
|
178
|
-
variants: {
|
|
179
|
-
size: {
|
|
180
|
-
sm: {
|
|
181
|
-
width: "20px",
|
|
182
|
-
height: "20px",
|
|
183
|
-
fontSize: "8px",
|
|
184
|
-
bottom: 18,
|
|
185
|
-
right: 4
|
|
186
|
-
},
|
|
187
|
-
md: {
|
|
188
|
-
width: "20px",
|
|
189
|
-
height: "20px",
|
|
190
|
-
fontSize: "10px",
|
|
191
|
-
bottom: 20,
|
|
192
|
-
right: 5
|
|
193
|
-
},
|
|
194
|
-
lg: {
|
|
195
|
-
width: "30px",
|
|
196
|
-
height: "30px",
|
|
197
|
-
fontSize: "11px",
|
|
198
|
-
bottom: 25,
|
|
199
|
-
right: 8
|
|
200
|
-
},
|
|
201
|
-
xlg: {
|
|
202
|
-
width: "30px",
|
|
203
|
-
height: "30px",
|
|
204
|
-
fontSize: "12px",
|
|
205
|
-
bottom: 25,
|
|
206
|
-
right: 8
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
defaultVariants: {
|
|
211
|
-
size: "md"
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
// src/components/Avatar/index.tsx
|
|
216
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
217
|
-
function Avatar2({
|
|
218
|
-
fallback,
|
|
219
|
-
className,
|
|
220
|
-
style,
|
|
221
|
-
size = "md",
|
|
222
|
-
status = "default",
|
|
223
|
-
notifications = 0,
|
|
224
|
-
shadow = false,
|
|
225
|
-
...props
|
|
226
|
-
}) {
|
|
227
|
-
return /* @__PURE__ */ jsxs("div", { style: { position: "relative", display: "inline-block" }, children: [
|
|
228
|
-
/* @__PURE__ */ jsxs(AvatarContainer, { className, style, size, status, shadow, children: [
|
|
229
|
-
/* @__PURE__ */ jsx(AvatarImage, { ...props }),
|
|
230
|
-
/* @__PURE__ */ jsx(AvatarFallback, { children: fallback })
|
|
231
|
-
] }),
|
|
232
|
-
notifications > 0 && /* @__PURE__ */ jsx(NotificationBadge, { size, children: notifications > 99 ? "99+" : notifications })
|
|
233
|
-
] });
|
|
234
|
-
}
|
|
235
|
-
Avatar2.displayName = "Avatar";
|
|
236
|
-
|
|
237
|
-
// src/components/Calendar/index.tsx
|
|
238
|
-
import { format } from "date-fns";
|
|
239
|
-
import { ptBR } from "date-fns/locale";
|
|
240
|
-
import { useEffect, useState } from "react";
|
|
241
|
-
import { DayPicker } from "react-day-picker";
|
|
242
|
-
import "react-day-picker/dist/style.css";
|
|
243
|
-
|
|
244
|
-
// src/components/Button.tsx
|
|
245
|
-
import { forwardRef } from "react";
|
|
246
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
247
|
-
var StyledButton = styled("button", {
|
|
248
|
-
all: "unset",
|
|
249
|
-
borderRadius: "$md",
|
|
250
|
-
fontWeight: "$bold",
|
|
251
|
-
fontFamily: "$default",
|
|
252
|
-
textAlign: "center",
|
|
253
|
-
boxSizing: "border-box",
|
|
254
|
-
display: "flex",
|
|
255
|
-
alignItems: "center",
|
|
256
|
-
justifyContent: "center",
|
|
257
|
-
gap: "$2",
|
|
258
|
-
cursor: "pointer",
|
|
259
|
-
svg: {
|
|
260
|
-
width: "$4",
|
|
261
|
-
height: "$4"
|
|
262
|
-
},
|
|
263
|
-
"&:disabled": {
|
|
264
|
-
cursor: "not-allowed"
|
|
265
|
-
},
|
|
266
|
-
"&:focus": {
|
|
267
|
-
outline: "none"
|
|
268
|
-
},
|
|
269
|
-
variants: {
|
|
270
|
-
variant: {
|
|
271
|
-
primary: {
|
|
272
|
-
color: "$white",
|
|
273
|
-
backgroundImage: "linear-gradient(to bottom, $ignite_light, $ignite_dark)",
|
|
274
|
-
"&:not(:disabled):is(:hover, :focus)": {
|
|
275
|
-
background: "$ignite_dark"
|
|
276
|
-
},
|
|
277
|
-
"&:disabled": {
|
|
278
|
-
opacity: "0.6"
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
secondary: {
|
|
282
|
-
color: "$clickpalm_mid",
|
|
283
|
-
border: "2px solid $ignite_light",
|
|
284
|
-
"&:not(:disabled):is(:hover, :focus)": {
|
|
285
|
-
border: "2px solid $ignite_dark"
|
|
286
|
-
},
|
|
287
|
-
"&:disabled": {
|
|
288
|
-
opacity: "0.6"
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
tertiary: {
|
|
292
|
-
color: "$ignite_light",
|
|
293
|
-
border: "3px solid $clickpalm_mid",
|
|
294
|
-
"&:not(:disabled):is(:hover, :focus)": {
|
|
295
|
-
color: "$ignite_dark"
|
|
296
|
-
},
|
|
297
|
-
"&:disabled": {
|
|
298
|
-
opacity: "0.6"
|
|
299
|
-
},
|
|
300
|
-
svg: {
|
|
301
|
-
fill: "$ignite_light"
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
size: {
|
|
306
|
-
xs: {},
|
|
307
|
-
sm: {
|
|
308
|
-
height: 33,
|
|
309
|
-
padding: "0 $2",
|
|
310
|
-
fontSize: "$md"
|
|
311
|
-
},
|
|
312
|
-
md: {
|
|
313
|
-
height: 53,
|
|
314
|
-
padding: "0 $4",
|
|
315
|
-
fontSize: "$md"
|
|
316
|
-
},
|
|
317
|
-
lg: {
|
|
318
|
-
height: 70,
|
|
319
|
-
padding: "0 $6",
|
|
320
|
-
fontSize: "$2xl"
|
|
321
|
-
}
|
|
322
|
-
},
|
|
323
|
-
full: {
|
|
324
|
-
true: {
|
|
325
|
-
width: "100%"
|
|
326
|
-
}
|
|
327
|
-
},
|
|
328
|
-
round: {
|
|
329
|
-
md: {
|
|
330
|
-
height: 53,
|
|
331
|
-
width: 53,
|
|
332
|
-
padding: "0 $4",
|
|
333
|
-
borderRadius: "50%"
|
|
334
|
-
},
|
|
335
|
-
lg: {
|
|
336
|
-
height: 70,
|
|
337
|
-
width: 70,
|
|
338
|
-
padding: "0 $6",
|
|
339
|
-
borderRadius: "50%"
|
|
340
|
-
},
|
|
341
|
-
xlg: {
|
|
342
|
-
height: 160,
|
|
343
|
-
width: 160,
|
|
344
|
-
padding: "0 $8",
|
|
345
|
-
borderRadius: "50%"
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
},
|
|
349
|
-
defaultVariants: {
|
|
350
|
-
variant: "primary",
|
|
351
|
-
size: "md"
|
|
352
|
-
}
|
|
353
|
-
});
|
|
354
|
-
var Button = forwardRef(function Button2({ children, ...props }, ref) {
|
|
355
|
-
return /* @__PURE__ */ jsx2(StyledButton, { ref, ...props, children });
|
|
356
|
-
});
|
|
357
|
-
Button.displayName = "Button";
|
|
358
|
-
|
|
359
|
-
// src/components/Icon/index.tsx
|
|
360
|
-
import { forwardRef as forwardRef2 } from "react";
|
|
361
|
-
|
|
362
|
-
// src/components/Icon/icons.ts
|
|
363
|
-
import {
|
|
364
|
-
TriangleDownIcon as TriangleDown,
|
|
365
|
-
TriangleUpIcon as TriangleUp,
|
|
366
|
-
TriangleLeftIcon as TriangleLeft,
|
|
367
|
-
TriangleRightIcon as TriangleRight,
|
|
368
|
-
EyeClosedIcon as EyeClosed,
|
|
369
|
-
EyeOpenIcon as EyeOpen,
|
|
370
|
-
QuestionMarkIcon as QuestionMark,
|
|
371
|
-
ReloadIcon as Reload
|
|
372
|
-
} from "@radix-ui/react-icons";
|
|
373
|
-
|
|
374
|
-
// src/components/Icon/Svgs/Calendar.tsx
|
|
375
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
376
|
-
var Calendar = (props) => /* @__PURE__ */ jsx3(
|
|
377
|
-
"svg",
|
|
378
|
-
{
|
|
379
|
-
width: "18",
|
|
380
|
-
height: "21",
|
|
381
|
-
viewBox: "0 0 18 21",
|
|
382
|
-
fill: "none",
|
|
383
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
384
|
-
...props,
|
|
385
|
-
children: /* @__PURE__ */ jsx3(
|
|
386
|
-
"path",
|
|
387
|
-
{
|
|
388
|
-
d: "M6 14.6113C5.3 14.6113 4.70833 14.3697 4.225 13.8863C3.74167 13.403 3.5 12.8113 3.5 12.1113C3.5 11.4113 3.74167 10.8197 4.225 10.3363C4.70833 9.85299 5.3 9.61133 6 9.61133C6.7 9.61133 7.29167 9.85299 7.775 10.3363C8.25833 10.8197 8.5 11.4113 8.5 12.1113C8.5 12.8113 8.25833 13.403 7.775 13.8863C7.29167 14.3697 6.7 14.6113 6 14.6113ZM2 20.1113C1.45 20.1113 0.979167 19.9155 0.5875 19.5238C0.195833 19.1322 0 18.6613 0 18.1113V4.11133C0 3.56133 0.195833 3.09049 0.5875 2.69883C0.979167 2.30716 1.45 2.11133 2 2.11133H3V0.111328H5V2.11133H13V0.111328H15V2.11133H16C16.55 2.11133 17.0208 2.30716 17.4125 2.69883C17.8042 3.09049 18 3.56133 18 4.11133V18.1113C18 18.6613 17.8042 19.1322 17.4125 19.5238C17.0208 19.9155 16.55 20.1113 16 20.1113H2ZM2 18.1113H16V8.11133H2V18.1113Z",
|
|
389
|
-
fill: "currentColor"
|
|
390
|
-
}
|
|
391
|
-
)
|
|
392
|
-
}
|
|
393
|
-
);
|
|
394
|
-
|
|
395
|
-
// src/components/Icon/Svgs/Closed.tsx
|
|
396
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
397
|
-
var Closed = (props) => {
|
|
398
|
-
return /* @__PURE__ */ jsx4(
|
|
399
|
-
"svg",
|
|
400
|
-
{
|
|
401
|
-
width: "14",
|
|
402
|
-
height: "15",
|
|
403
|
-
viewBox: "0 0 14 15",
|
|
404
|
-
fill: "none",
|
|
405
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
406
|
-
...props,
|
|
407
|
-
children: /* @__PURE__ */ jsx4(
|
|
408
|
-
"path",
|
|
409
|
-
{
|
|
410
|
-
d: "M1.4 14.5L0 13.1L5.6 7.5L0 1.9L1.4 0.5L7 6.1L12.6 0.5L14 1.9L8.4 7.5L14 13.1L12.6 14.5L7 8.9L1.4 14.5Z",
|
|
411
|
-
fill: "currentColor"
|
|
412
|
-
}
|
|
413
|
-
)
|
|
414
|
-
}
|
|
415
|
-
);
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
// src/components/Icon/Svgs/Dots.tsx
|
|
419
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
420
|
-
var Dots = (props) => {
|
|
421
|
-
return /* @__PURE__ */ jsx5(
|
|
422
|
-
"svg",
|
|
423
|
-
{
|
|
424
|
-
width: "16",
|
|
425
|
-
height: "5",
|
|
426
|
-
viewBox: "0 0 16 5",
|
|
427
|
-
fill: "none",
|
|
428
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
429
|
-
...props,
|
|
430
|
-
children: /* @__PURE__ */ jsx5(
|
|
431
|
-
"path",
|
|
432
|
-
{
|
|
433
|
-
d: "M2 4.36865C1.45 4.36865 0.979167 4.17282 0.5875 3.78115C0.195833 3.38949 0 2.91865 0 2.36865C0 1.81865 0.195833 1.34782 0.5875 0.956152C0.979167 0.564486 1.45 0.368652 2 0.368652C2.55 0.368652 3.02083 0.564486 3.4125 0.956152C3.80417 1.34782 4 1.81865 4 2.36865C4 2.91865 3.80417 3.38949 3.4125 3.78115C3.02083 4.17282 2.55 4.36865 2 4.36865ZM8 4.36865C7.45 4.36865 6.97917 4.17282 6.5875 3.78115C6.19583 3.38949 6 2.91865 6 2.36865C6 1.81865 6.19583 1.34782 6.5875 0.956152C6.97917 0.564486 7.45 0.368652 8 0.368652C8.55 0.368652 9.02083 0.564486 9.4125 0.956152C9.80417 1.34782 10 1.81865 10 2.36865C10 2.91865 9.80417 3.38949 9.4125 3.78115C9.02083 4.17282 8.55 4.36865 8 4.36865ZM14 4.36865C13.45 4.36865 12.9792 4.17282 12.5875 3.78115C12.1958 3.38949 12 2.91865 12 2.36865C12 1.81865 12.1958 1.34782 12.5875 0.956152C12.9792 0.564486 13.45 0.368652 14 0.368652C14.55 0.368652 15.0208 0.564486 15.4125 0.956152C15.8042 1.34782 16 1.81865 16 2.36865C16 2.91865 15.8042 3.38949 15.4125 3.78115C15.0208 4.17282 14.55 4.36865 14 4.36865Z",
|
|
434
|
-
fill: "currentColor"
|
|
435
|
-
}
|
|
436
|
-
)
|
|
437
|
-
}
|
|
438
|
-
);
|
|
439
|
-
};
|
|
440
|
-
|
|
441
|
-
// src/components/Icon/Svgs/Filter.tsx
|
|
442
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
443
|
-
var Filter = (props) => {
|
|
444
|
-
return /* @__PURE__ */ jsx6(
|
|
445
|
-
"svg",
|
|
446
|
-
{
|
|
447
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
448
|
-
width: "32",
|
|
449
|
-
height: "32",
|
|
450
|
-
fill: "currentColor",
|
|
451
|
-
viewBox: "0 0 256 256",
|
|
452
|
-
...props,
|
|
453
|
-
children: /* @__PURE__ */ jsx6("path", { d: "M234.29,47.91A20,20,0,0,0,216,36H40A20,20,0,0,0,25.2,69.45l.12.14L92,140.75V216a20,20,0,0,0,31.1,16.64l32-21.33A20,20,0,0,0,164,194.66V140.75l66.67-71.16.12-.14A20,20,0,0,0,234.29,47.91Zm-91,79.89A12,12,0,0,0,140,136v56.52l-24,16V136a12,12,0,0,0-3.25-8.2L49.23,60H206.77Z" })
|
|
454
|
-
}
|
|
455
|
-
);
|
|
456
|
-
};
|
|
457
|
-
|
|
458
|
-
// src/components/Icon/Svgs/Hamburger.tsx
|
|
459
|
-
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
460
|
-
var Hamburger = (props) => {
|
|
461
|
-
return /* @__PURE__ */ jsx7(
|
|
462
|
-
"svg",
|
|
463
|
-
{
|
|
464
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
465
|
-
width: "32",
|
|
466
|
-
height: "32",
|
|
467
|
-
fill: "currentColor",
|
|
468
|
-
viewBox: "0 0 256 256",
|
|
469
|
-
...props,
|
|
470
|
-
children: /* @__PURE__ */ jsx7("path", { d: "M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM40,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24ZM216,180H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z" })
|
|
471
|
-
}
|
|
472
|
-
);
|
|
473
|
-
};
|
|
474
|
-
|
|
475
|
-
// src/components/Icon/Svgs/Pencil.tsx
|
|
476
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
477
|
-
var Pencil = (props) => {
|
|
478
|
-
return /* @__PURE__ */ jsx8(
|
|
479
|
-
"svg",
|
|
480
|
-
{
|
|
481
|
-
width: "18",
|
|
482
|
-
height: "19",
|
|
483
|
-
viewBox: "0 0 18 19",
|
|
484
|
-
fill: "none",
|
|
485
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
486
|
-
...props,
|
|
487
|
-
children: /* @__PURE__ */ jsx8(
|
|
488
|
-
"path",
|
|
489
|
-
{
|
|
490
|
-
d: "M2 16.9287H3.425L13.2 7.15371L11.775 5.72871L2 15.5037V16.9287ZM0 18.9287V14.6787L13.2 1.50371C13.4 1.32038 13.6208 1.17871 13.8625 1.07871C14.1042 0.978711 14.3583 0.928711 14.625 0.928711C14.8917 0.928711 15.15 0.978711 15.4 1.07871C15.65 1.17871 15.8667 1.32871 16.05 1.52871L17.425 2.92871C17.625 3.11204 17.7708 3.32871 17.8625 3.57871C17.9542 3.82871 18 4.07871 18 4.32871C18 4.59538 17.9542 4.84954 17.8625 5.09121C17.7708 5.33288 17.625 5.55371 17.425 5.75371L4.25 18.9287H0ZM12.475 6.45371L11.775 5.72871L13.2 7.15371L12.475 6.45371Z",
|
|
491
|
-
fill: "currentColor"
|
|
492
|
-
}
|
|
493
|
-
)
|
|
494
|
-
}
|
|
495
|
-
);
|
|
496
|
-
};
|
|
497
|
-
|
|
498
|
-
// src/components/Icon/Svgs/Photo.tsx
|
|
499
|
-
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
500
|
-
var Photo = (props) => {
|
|
501
|
-
return /* @__PURE__ */ jsx9(
|
|
502
|
-
"svg",
|
|
503
|
-
{
|
|
504
|
-
width: "18",
|
|
505
|
-
height: "18",
|
|
506
|
-
viewBox: "0 0 18 18",
|
|
507
|
-
fill: "none",
|
|
508
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
509
|
-
...props,
|
|
510
|
-
children: /* @__PURE__ */ jsx9(
|
|
511
|
-
"path",
|
|
512
|
-
{
|
|
513
|
-
d: "M2 18C1.45 18 0.975 17.8083 0.575 17.425C0.191667 17.025 0 16.55 0 16V2C0 1.45 0.191667 0.983334 0.575 0.600001C0.975 0.2 1.45 0 2 0H16C16.55 0 17.0167 0.2 17.4 0.600001C17.8 0.983334 18 1.45 18 2V16C18 16.55 17.8 17.025 17.4 17.425C17.0167 17.8083 16.55 18 16 18H2ZM2 16H16V2H2V16ZM3 14H15L11.25 9L8.25 13L6 10L3 14ZM2 16V2V16Z",
|
|
514
|
-
fill: "currentColor"
|
|
515
|
-
}
|
|
516
|
-
)
|
|
517
|
-
}
|
|
518
|
-
);
|
|
519
|
-
};
|
|
520
|
-
|
|
521
|
-
// src/components/Icon/Svgs/Plus.tsx
|
|
522
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
523
|
-
var Plus = (props) => {
|
|
524
|
-
return /* @__PURE__ */ jsx10(
|
|
525
|
-
"svg",
|
|
526
|
-
{
|
|
527
|
-
width: "20",
|
|
528
|
-
height: "20",
|
|
529
|
-
viewBox: "0 0 20 20",
|
|
530
|
-
fill: "none",
|
|
531
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
532
|
-
...props,
|
|
533
|
-
children: /* @__PURE__ */ jsx10(
|
|
534
|
-
"path",
|
|
535
|
-
{
|
|
536
|
-
d: "M8.58301 11.4167H0.0830078V8.58334H8.58301V0.0833435H11.4163V8.58334H19.9163V11.4167H11.4163V19.9167H8.58301V11.4167Z",
|
|
537
|
-
fill: "currentColor"
|
|
538
|
-
}
|
|
539
|
-
)
|
|
540
|
-
}
|
|
541
|
-
);
|
|
542
|
-
};
|
|
543
|
-
|
|
544
|
-
// src/components/Icon/Svgs/Search.tsx
|
|
545
|
-
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
546
|
-
var Search = (props) => {
|
|
547
|
-
return /* @__PURE__ */ jsx11(
|
|
548
|
-
"svg",
|
|
549
|
-
{
|
|
550
|
-
width: "18",
|
|
551
|
-
height: "18",
|
|
552
|
-
viewBox: "0 0 18 18",
|
|
553
|
-
fill: "none",
|
|
554
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
555
|
-
...props,
|
|
556
|
-
children: /* @__PURE__ */ jsx11(
|
|
557
|
-
"path",
|
|
558
|
-
{
|
|
559
|
-
d: "M16.6 18L10.3 11.7C9.8 12.1 9.225 12.4167 8.575 12.65C7.925 12.8833 7.23333 13 6.5 13C4.68333 13 3.14583 12.3708 1.8875 11.1125C0.629167 9.85417 0 8.31667 0 6.5C0 4.68333 0.629167 3.14583 1.8875 1.8875C3.14583 0.629167 4.68333 0 6.5 0C8.31667 0 9.85417 0.629167 11.1125 1.8875C12.3708 3.14583 13 4.68333 13 6.5C13 7.23333 12.8833 7.925 12.65 8.575C12.4167 9.225 12.1 9.8 11.7 10.3L18 16.6L16.6 18ZM6.5 11C7.75 11 8.8125 10.5625 9.6875 9.6875C10.5625 8.8125 11 7.75 11 6.5C11 5.25 10.5625 4.1875 9.6875 3.3125C8.8125 2.4375 7.75 2 6.5 2C5.25 2 4.1875 2.4375 3.3125 3.3125C2.4375 4.1875 2 5.25 2 6.5C2 7.75 2.4375 8.8125 3.3125 9.6875C4.1875 10.5625 5.25 11 6.5 11Z",
|
|
560
|
-
fill: "currentColor"
|
|
561
|
-
}
|
|
562
|
-
)
|
|
563
|
-
}
|
|
564
|
-
);
|
|
565
|
-
};
|
|
566
|
-
|
|
567
|
-
// src/components/Icon/Svgs/ChevronLeft.tsx
|
|
568
|
-
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
569
|
-
var ChevronLeft = (props) => {
|
|
570
|
-
return /* @__PURE__ */ jsx12(
|
|
571
|
-
"svg",
|
|
572
|
-
{
|
|
573
|
-
width: "8",
|
|
574
|
-
height: "12",
|
|
575
|
-
viewBox: "0 0 8 12",
|
|
576
|
-
fill: "none",
|
|
577
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
578
|
-
...props,
|
|
579
|
-
children: /* @__PURE__ */ jsx12(
|
|
580
|
-
"path",
|
|
581
|
-
{
|
|
582
|
-
d: "M6 12L0 6L6 0L7.4 1.4L2.8 6L7.4 10.6L6 12Z",
|
|
583
|
-
fill: "currentColor"
|
|
584
|
-
}
|
|
585
|
-
)
|
|
586
|
-
}
|
|
587
|
-
);
|
|
588
|
-
};
|
|
589
|
-
|
|
590
|
-
// src/components/Icon/Svgs/ChevronRight.tsx
|
|
591
|
-
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
592
|
-
var ChevronRight = (props) => {
|
|
593
|
-
return /* @__PURE__ */ jsx13(
|
|
594
|
-
"svg",
|
|
595
|
-
{
|
|
596
|
-
width: "8",
|
|
597
|
-
height: "12",
|
|
598
|
-
viewBox: "0 0 8 12",
|
|
599
|
-
fill: "none",
|
|
600
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
601
|
-
...props,
|
|
602
|
-
children: /* @__PURE__ */ jsx13(
|
|
603
|
-
"path",
|
|
604
|
-
{
|
|
605
|
-
d: "M4.6 6L0 1.4L1.4 0L7.4 6L1.4 12L0 10.6L4.6 6Z",
|
|
606
|
-
fill: "currentColor"
|
|
607
|
-
}
|
|
608
|
-
)
|
|
609
|
-
}
|
|
610
|
-
);
|
|
611
|
-
};
|
|
612
|
-
|
|
613
|
-
// src/components/Icon/Svgs/Check.tsx
|
|
614
|
-
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
615
|
-
var Check = (props) => {
|
|
616
|
-
return /* @__PURE__ */ jsx14(
|
|
617
|
-
"svg",
|
|
618
|
-
{
|
|
619
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
620
|
-
width: "18",
|
|
621
|
-
height: "13",
|
|
622
|
-
viewBox: "0 0 18 13",
|
|
623
|
-
fill: "none",
|
|
624
|
-
...props,
|
|
625
|
-
children: /* @__PURE__ */ jsx14(
|
|
626
|
-
"path",
|
|
627
|
-
{
|
|
628
|
-
d: "M6.55001 13L0.850006 7.3L2.27501 5.875L6.55001 10.15L15.725 0.975L17.15 2.4L6.55001 13Z",
|
|
629
|
-
fill: "currentColor"
|
|
630
|
-
}
|
|
631
|
-
)
|
|
632
|
-
}
|
|
633
|
-
);
|
|
634
|
-
};
|
|
635
|
-
|
|
636
|
-
// src/components/Icon/Svgs/Copy.tsx
|
|
637
|
-
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
638
|
-
var Copy = (props) => {
|
|
639
|
-
return /* @__PURE__ */ jsx15(
|
|
640
|
-
"svg",
|
|
641
|
-
{
|
|
642
|
-
width: "18",
|
|
643
|
-
height: "19",
|
|
644
|
-
viewBox: "0 0 18 19",
|
|
645
|
-
fill: "none",
|
|
646
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
647
|
-
...props,
|
|
648
|
-
children: /* @__PURE__ */ jsx15(
|
|
649
|
-
"path",
|
|
650
|
-
{
|
|
651
|
-
d: "M3.4 11.9547H2.6C2.17565 11.9547 1.76869 11.7861 1.46863 11.4861C1.16857 11.186 1 10.779 1 10.3547V3.15469C1 2.73034 1.16857 2.32337 1.46863 2.02332C1.76869 1.72326 2.17565 1.55469 2.6 1.55469H9.8C10.2243 1.55469 10.6313 1.72326 10.9314 2.02332C11.2314 2.32337 11.4 2.73034 11.4 3.15469V3.95469M8.2 7.15469H15.4C16.2837 7.15469 17 7.87103 17 8.75469V15.9547C17 16.8383 16.2837 17.5547 15.4 17.5547H8.2C7.31634 17.5547 6.6 16.8383 6.6 15.9547V8.75469C6.6 7.87103 7.31634 7.15469 8.2 7.15469Z",
|
|
652
|
-
stroke: "currentColor",
|
|
653
|
-
"stroke-width": "2",
|
|
654
|
-
"stroke-linecap": "round",
|
|
655
|
-
"stroke-linejoin": "round"
|
|
656
|
-
}
|
|
657
|
-
)
|
|
658
|
-
}
|
|
659
|
-
);
|
|
660
|
-
};
|
|
661
|
-
|
|
662
|
-
// src/components/Icon/Svgs/Download.tsx
|
|
663
|
-
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
664
|
-
var Download = (props) => /* @__PURE__ */ jsx16(
|
|
665
|
-
"svg",
|
|
666
|
-
{
|
|
667
|
-
width: "15",
|
|
668
|
-
height: "15",
|
|
669
|
-
viewBox: "0 0 15 15",
|
|
670
|
-
fill: "none",
|
|
671
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
672
|
-
...props,
|
|
673
|
-
children: /* @__PURE__ */ jsx16(
|
|
674
|
-
"path",
|
|
675
|
-
{
|
|
676
|
-
d: "M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z",
|
|
677
|
-
fill: "currentColor",
|
|
678
|
-
fillRule: "evenodd",
|
|
679
|
-
clipRule: "evenodd"
|
|
680
|
-
}
|
|
681
|
-
)
|
|
682
|
-
}
|
|
683
|
-
);
|
|
684
|
-
|
|
685
|
-
// src/components/Icon/icons.ts
|
|
686
|
-
var iconMap = {
|
|
687
|
-
TriangleDown,
|
|
688
|
-
TriangleUp,
|
|
689
|
-
TriangleLeft,
|
|
690
|
-
TriangleRight,
|
|
691
|
-
EyeClosed,
|
|
692
|
-
EyeOpen,
|
|
693
|
-
QuestionMark,
|
|
694
|
-
Reload,
|
|
695
|
-
Calendar,
|
|
696
|
-
Closed,
|
|
697
|
-
Dots,
|
|
698
|
-
Download,
|
|
699
|
-
Filter,
|
|
700
|
-
Hamburger,
|
|
701
|
-
Pencil,
|
|
702
|
-
Photo,
|
|
703
|
-
Plus,
|
|
704
|
-
Search,
|
|
705
|
-
ChevronLeft,
|
|
706
|
-
ChevronRight,
|
|
707
|
-
Check,
|
|
708
|
-
Copy
|
|
709
|
-
};
|
|
710
|
-
|
|
711
|
-
// src/components/Icon/index.tsx
|
|
712
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
713
|
-
var colorMap = {
|
|
714
|
-
black: "#000000",
|
|
715
|
-
green: "#78CB63",
|
|
716
|
-
white: "#ffffff"
|
|
717
|
-
};
|
|
718
|
-
var Icon = forwardRef2(
|
|
719
|
-
({ name, size = 24, color = "black", ...rest }, ref) => {
|
|
720
|
-
const IconComponent = iconMap[name];
|
|
721
|
-
if (!IconComponent) {
|
|
722
|
-
console.warn(`Icon "${name}" not found in iconMap`);
|
|
723
|
-
return null;
|
|
724
|
-
}
|
|
725
|
-
const fillColor = colorMap[color];
|
|
726
|
-
return /* @__PURE__ */ jsx17(
|
|
727
|
-
IconComponent,
|
|
728
|
-
{
|
|
729
|
-
ref,
|
|
730
|
-
width: size,
|
|
731
|
-
height: size,
|
|
732
|
-
style: { color: fillColor },
|
|
733
|
-
"aria-hidden": true,
|
|
734
|
-
...rest
|
|
735
|
-
}
|
|
736
|
-
);
|
|
737
|
-
}
|
|
738
|
-
);
|
|
739
|
-
Icon.displayName = "Icon";
|
|
740
|
-
|
|
741
|
-
// src/components/Calendar/styles.ts
|
|
742
|
-
var calendarStyles = globalCss({
|
|
743
|
-
".calendar-root": {
|
|
744
|
-
"--rdp-accent-color": theme.colors.clickpalm_light,
|
|
745
|
-
"--rdp-accent-background-color": theme.colors.clickpalm_light,
|
|
746
|
-
"--rdp-day-height": "45px",
|
|
747
|
-
"--rdp-day-width": "45px",
|
|
748
|
-
"--rdp-day_button-border-radius": theme.radii.md.value,
|
|
749
|
-
"--rdp-day_button-border": "2px solid transparent",
|
|
750
|
-
"--rdp-day_button-height": "40px",
|
|
751
|
-
"--rdp-day_button-width": "40px",
|
|
752
|
-
"--rdp-selected-border": "2px solid var(--rdp-accent-color)",
|
|
753
|
-
"--rdp-disabled-opacity": "0.5",
|
|
754
|
-
"--rdp-outside-opacity": "1",
|
|
755
|
-
"--rdp-today-color": theme.colors.clickpalm_light,
|
|
756
|
-
"--rdp-dropdown-gap": "0.5rem",
|
|
757
|
-
"--rdp-months-gap": "2rem",
|
|
758
|
-
"--rdp-nav_button-disabled-opacity": "0.5",
|
|
759
|
-
"--rdp-nav_button-height": "36px",
|
|
760
|
-
"--rdp-nav_button-width": "36px",
|
|
761
|
-
"--rdp-nav-height": "44px",
|
|
762
|
-
"--rdp-range_middle-background-color": "var(--rdp-accent-background-color)",
|
|
763
|
-
"--rdp-range_middle-color": "inherit",
|
|
764
|
-
"--rdp-range_start-color": "white",
|
|
765
|
-
"--rdp-range_start-background": "linear-gradient(var(--rdp-gradient-direction), transparent 50%, var(--rdp-range_middle-background-color) 50%)",
|
|
766
|
-
"--rdp-range_start-date-background-color": "var(--rdp-accent-color)",
|
|
767
|
-
"--rdp-range_end-background": "linear-gradient(var(--rdp-gradient-direction), var(--rdp-range_middle-background-color) 50%, transparent 50%)",
|
|
768
|
-
"--rdp-range_end-color": "white",
|
|
769
|
-
"--rdp-range_end-date-background-color": "var(--rdp-accent-color)",
|
|
770
|
-
"--rdp-weekday-opacity": "1",
|
|
771
|
-
"--rdp-weekday-padding": "0.5rem 0",
|
|
772
|
-
"--rdp-weekday-text-align": "center",
|
|
773
|
-
"--rdp-gradient-direction": "90deg",
|
|
774
|
-
"--rdp-animation_duration": "0.3s",
|
|
775
|
-
"--rdp-animation_timing": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
776
|
-
padding: theme.space[3],
|
|
777
|
-
border: `1px solid ${theme.colors.gray_light}`,
|
|
778
|
-
borderRadius: theme.radii.md.value,
|
|
779
|
-
maxWidth: "329px",
|
|
780
|
-
paddingLeft: "15px"
|
|
781
|
-
},
|
|
782
|
-
'.calendar-root[dir="rtl"]': {
|
|
783
|
-
"--rdp-gradient-direction": "-90deg"
|
|
784
|
-
},
|
|
785
|
-
'.calendar-root[data-broadcast-calendar="true"]': {
|
|
786
|
-
"--rdp-outside-opacity": "unset"
|
|
787
|
-
},
|
|
788
|
-
'.calendar-root[dir="rtl"] .rdp-nav .rdp-chevron': {
|
|
789
|
-
transform: "rotate(180deg)",
|
|
790
|
-
transformOrigin: "50%"
|
|
791
|
-
},
|
|
792
|
-
'.calendar-root[data-nav-layout="around"] .rdp-month': {
|
|
793
|
-
position: "relative"
|
|
794
|
-
},
|
|
795
|
-
'.calendar-root[data-nav-layout="after"] .rdp-month': {
|
|
796
|
-
position: "relative"
|
|
797
|
-
},
|
|
798
|
-
'.calendar-root[data-nav-layout="around"] .calendar-month_caption': {
|
|
799
|
-
justifyContent: "center",
|
|
800
|
-
marginInlineStart: "var(--rdp-nav_button-width)",
|
|
801
|
-
marginInlineEnd: "var(--rdp-nav_button-width)",
|
|
802
|
-
position: "relative"
|
|
803
|
-
},
|
|
804
|
-
'.calendar-root[data-nav-layout="around"] .rdp-button_previous': {
|
|
805
|
-
position: "absolute",
|
|
806
|
-
insetInlineStart: 0,
|
|
807
|
-
top: 0,
|
|
808
|
-
height: "var(--rdp-nav-height)",
|
|
809
|
-
display: "inline-flex"
|
|
810
|
-
},
|
|
811
|
-
'.calendar-root[data-nav-layout="around"] .rdp-button_next': {
|
|
812
|
-
position: "absolute",
|
|
813
|
-
insetInlineEnd: 0,
|
|
814
|
-
top: 0,
|
|
815
|
-
height: "var(--rdp-nav-height)",
|
|
816
|
-
display: "inline-flex",
|
|
817
|
-
justifyContent: "center"
|
|
818
|
-
},
|
|
819
|
-
'.calendar-root[dir="rtl"] .rdp-weeks_after_enter': {
|
|
820
|
-
animation: "rdp-slide_in_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards"
|
|
821
|
-
},
|
|
822
|
-
'.calendar-root[dir="rtl"] .rdp-weeks_before_exit': {
|
|
823
|
-
animation: "rdp-slide_out_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards"
|
|
824
|
-
},
|
|
825
|
-
'.calendar-root[dir="rtl"] .rdp-weeks_before_enter': {
|
|
826
|
-
animation: "rdp-slide_in_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards"
|
|
827
|
-
},
|
|
828
|
-
'.calendar-root[dir="rtl"] .rdp-weeks_after_exit': {
|
|
829
|
-
animation: "rdp-slide_out_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards"
|
|
830
|
-
},
|
|
831
|
-
".calendar-month_caption": {
|
|
832
|
-
paddingLeft: "2px",
|
|
833
|
-
display: "flex",
|
|
834
|
-
alignItems: "center",
|
|
835
|
-
height: "var(--rdp-nav-height)",
|
|
836
|
-
fontWeight: "$bold",
|
|
837
|
-
fontSize: "$lg"
|
|
838
|
-
},
|
|
839
|
-
".calendar-caption_label": {
|
|
840
|
-
paddingLeft: "$3",
|
|
841
|
-
zIndex: 1,
|
|
842
|
-
position: "relative",
|
|
843
|
-
display: "flex",
|
|
844
|
-
alignItems: "center",
|
|
845
|
-
whiteSpace: "nowrap"
|
|
846
|
-
},
|
|
847
|
-
".calendar-root-collapsed": {
|
|
848
|
-
minWidth: "329px",
|
|
849
|
-
position: "relative"
|
|
850
|
-
},
|
|
851
|
-
".calendar-root-collapsed .rdp-weekdays": {
|
|
852
|
-
display: "none"
|
|
853
|
-
},
|
|
854
|
-
".calendar-root-collapsed .rdp-day": {
|
|
855
|
-
display: "none"
|
|
856
|
-
},
|
|
857
|
-
".calendar-root-collapsed .rdp-months": {
|
|
858
|
-
minHeight: "var(--rdp-nav-height)",
|
|
859
|
-
position: "relative",
|
|
860
|
-
display: "flex",
|
|
861
|
-
flexWrap: "wrap",
|
|
862
|
-
gap: "var(--rdp-months-gap)",
|
|
863
|
-
maxWidth: "100%"
|
|
864
|
-
},
|
|
865
|
-
".calendar-root-collapsed .rdp-nav": {
|
|
866
|
-
position: "absolute",
|
|
867
|
-
top: 0,
|
|
868
|
-
right: 0,
|
|
869
|
-
display: "flex",
|
|
870
|
-
alignItems: "center",
|
|
871
|
-
height: "var(--rdp-nav-height)"
|
|
872
|
-
},
|
|
873
|
-
".rdp-dropdown:focus-visible ~ .calendar-caption_label": {
|
|
874
|
-
outline: "5px auto Highlight",
|
|
875
|
-
WebkitOutline: "5px auto -webkit-focus-ring-color"
|
|
876
|
-
},
|
|
877
|
-
".rdp-nav": {
|
|
878
|
-
gap: "$1",
|
|
879
|
-
paddingRight: "6px"
|
|
880
|
-
},
|
|
881
|
-
".rdp-weekday": {
|
|
882
|
-
fontFamily: theme.fonts.default,
|
|
883
|
-
fontWeight: theme.fontWeights.bold,
|
|
884
|
-
paddingRight: "6px"
|
|
885
|
-
},
|
|
886
|
-
".rdp-day_button": {
|
|
887
|
-
background: theme.colors.gray_background,
|
|
888
|
-
color: theme.colors.black,
|
|
889
|
-
fontFamily: theme.fonts.default,
|
|
890
|
-
fontWeight: theme.fontWeights.bold,
|
|
891
|
-
fontSize: theme.fontSizes.md,
|
|
892
|
-
"&:hover": {
|
|
893
|
-
border: `2px solid ${theme.colors.clickpalm_light}`
|
|
894
|
-
},
|
|
895
|
-
"&:focus": {
|
|
896
|
-
border: `2px solid ${theme.colors.clickpalm_light}`,
|
|
897
|
-
outline: "none"
|
|
898
|
-
}
|
|
899
|
-
},
|
|
900
|
-
".rdp-outside .rdp-day_button": {
|
|
901
|
-
fontFamily: theme.fonts.default,
|
|
902
|
-
background: theme.colors.gray_mid,
|
|
903
|
-
color: theme.colors.black
|
|
904
|
-
},
|
|
905
|
-
".rdp-selected .rdp-day_button": {
|
|
906
|
-
background: theme.colors.clickpalm_light,
|
|
907
|
-
color: theme.colors.white
|
|
908
|
-
}
|
|
909
|
-
});
|
|
910
|
-
var StyledButton2 = styled("div", {
|
|
911
|
-
display: "flex",
|
|
912
|
-
alignItems: "center",
|
|
913
|
-
transition: "transform 0.4s ease",
|
|
914
|
-
variants: {
|
|
915
|
-
isOpen: {
|
|
916
|
-
true: {
|
|
917
|
-
transform: "rotate(180deg)"
|
|
918
|
-
},
|
|
919
|
-
false: {
|
|
920
|
-
transform: "rotate(0deg)"
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
});
|
|
925
|
-
var StyledLabel = styled("label", {
|
|
926
|
-
color: "$black",
|
|
927
|
-
fontFamily: "$default",
|
|
928
|
-
fontSize: "$md",
|
|
929
|
-
fontWeight: "$bold",
|
|
930
|
-
display: "flex",
|
|
931
|
-
marginBottom: "$6"
|
|
932
|
-
});
|
|
933
|
-
|
|
934
|
-
// src/components/Calendar/index.tsx
|
|
935
|
-
import { jsx as jsx18, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
936
|
-
calendarStyles();
|
|
937
|
-
var Calendar2 = ({ label, onChange }) => {
|
|
938
|
-
const [selected, setSelected] = useState(void 0);
|
|
939
|
-
const [month, setMonth] = useState(/* @__PURE__ */ new Date());
|
|
940
|
-
const [open, setOpen] = useState(true);
|
|
941
|
-
const handleDaySelect = (date) => {
|
|
942
|
-
setSelected(date);
|
|
943
|
-
if (date) {
|
|
944
|
-
const formatted = format(date, "dd/MM/yyyy");
|
|
945
|
-
onChange(formatted);
|
|
946
|
-
}
|
|
947
|
-
};
|
|
948
|
-
useEffect(() => {
|
|
949
|
-
if (selected) {
|
|
950
|
-
setMonth(selected);
|
|
951
|
-
}
|
|
952
|
-
}, [selected]);
|
|
953
|
-
return /* @__PURE__ */ jsxs2("div", { children: [
|
|
954
|
-
/* @__PURE__ */ jsx18(StyledLabel, { children: label }),
|
|
955
|
-
/* @__PURE__ */ jsx18(
|
|
956
|
-
DayPicker,
|
|
957
|
-
{
|
|
958
|
-
className: !open ? "calendar-root-collapsed" : "",
|
|
959
|
-
mode: "single",
|
|
960
|
-
selected,
|
|
961
|
-
onSelect: handleDaySelect,
|
|
962
|
-
month,
|
|
963
|
-
onMonthChange: setMonth,
|
|
964
|
-
locale: ptBR,
|
|
965
|
-
showOutsideDays: true,
|
|
966
|
-
classNames: {
|
|
967
|
-
root: "calendar-root",
|
|
968
|
-
month_caption: "calendar-month_caption",
|
|
969
|
-
caption_label: "calendar-caption_label"
|
|
970
|
-
},
|
|
971
|
-
formatters: {
|
|
972
|
-
formatCaption: (month2, options) => {
|
|
973
|
-
const mes = format(month2, "MMMM", options).replace(/^./, (c) => c.toUpperCase());
|
|
974
|
-
const ano = format(month2, "yyyy", options);
|
|
975
|
-
return `${mes} de ${ano}`;
|
|
976
|
-
},
|
|
977
|
-
formatWeekdayName: (date, options) => {
|
|
978
|
-
const dia = format(date, "EEEEEE", options);
|
|
979
|
-
return dia.charAt(0).toUpperCase() + dia.slice(1);
|
|
980
|
-
}
|
|
981
|
-
},
|
|
982
|
-
components: {
|
|
983
|
-
MonthCaption: ({ calendarMonth, displayIndex, ...safeprops }) => {
|
|
984
|
-
const displayMonth = calendarMonth.date;
|
|
985
|
-
return /* @__PURE__ */ jsxs2("div", { ...safeprops, children: [
|
|
986
|
-
/* @__PURE__ */ jsx18("div", { children: /* @__PURE__ */ jsx18(
|
|
987
|
-
Button,
|
|
988
|
-
{
|
|
989
|
-
variant: "secondary",
|
|
990
|
-
size: "sm",
|
|
991
|
-
onClick: () => setOpen(!open),
|
|
992
|
-
children: /* @__PURE__ */ jsx18(StyledButton2, { isOpen: open, children: /* @__PURE__ */ jsx18(Icon, { name: "TriangleUp", size: 16 }) })
|
|
993
|
-
}
|
|
994
|
-
) }),
|
|
995
|
-
/* @__PURE__ */ jsx18("div", { className: "calendar-month_caption", children: /* @__PURE__ */ jsx18("div", { className: "calendar-caption_label", role: "heading", "aria-level": 2, children: format(displayMonth, "MMMM 'de' yyyy", { locale: ptBR }).replace(/^./, (c) => c.toUpperCase()) }) })
|
|
996
|
-
] });
|
|
997
|
-
},
|
|
998
|
-
PreviousMonthButton: (props) => /* @__PURE__ */ jsx18(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ jsx18(Icon, { name: "TriangleLeft", size: 16 }) }),
|
|
999
|
-
NextMonthButton: (props) => /* @__PURE__ */ jsx18(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ jsx18(Icon, { name: "TriangleRight", size: 16 }) })
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
)
|
|
1003
|
-
] });
|
|
1004
|
-
};
|
|
1005
|
-
|
|
1006
|
-
// src/components/Checkbox/index.tsx
|
|
1007
|
-
import { forwardRef as forwardRef3 } from "react";
|
|
1008
|
-
|
|
1009
|
-
// src/components/Checkbox/styles.ts
|
|
1010
|
-
import * as Checkbox from "@radix-ui/react-checkbox";
|
|
1011
|
-
var StyledWrapper = styled("div", {
|
|
1012
|
-
display: "flex",
|
|
1013
|
-
alignSelf: "flex-start",
|
|
1014
|
-
alignItems: "center",
|
|
1015
|
-
lineHeight: "150%",
|
|
1016
|
-
variants: {
|
|
1017
|
-
hasError: {
|
|
1018
|
-
true: {
|
|
1019
|
-
marginBottom: "0px",
|
|
1020
|
-
"&:focus": {
|
|
1021
|
-
border: "2px solid $danger_dark"
|
|
1022
|
-
}
|
|
1023
|
-
},
|
|
1024
|
-
false: {
|
|
1025
|
-
marginBottom: "$6"
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
});
|
|
1030
|
-
var CheckboxContainer = styled(Checkbox.Root, {
|
|
1031
|
-
all: "unset",
|
|
1032
|
-
width: "$6",
|
|
1033
|
-
height: "$6",
|
|
1034
|
-
backgroundColor: "$white",
|
|
1035
|
-
borderRadius: "$md",
|
|
1036
|
-
lineHeight: 0,
|
|
1037
|
-
cursor: "pointer",
|
|
1038
|
-
overflow: "hidden",
|
|
1039
|
-
boxSizing: "border-box",
|
|
1040
|
-
display: "flex",
|
|
1041
|
-
justifyContent: "center",
|
|
1042
|
-
alignItems: "center",
|
|
1043
|
-
borderWidth: "3px",
|
|
1044
|
-
borderStyle: "solid",
|
|
1045
|
-
borderColor: "$gray_mid",
|
|
1046
|
-
'&[data-state="checked"]': {
|
|
1047
|
-
outline: "none",
|
|
1048
|
-
backgroundColor: "$clickpalm_dark",
|
|
1049
|
-
borderColor: "$clickpalm_dark"
|
|
1050
|
-
},
|
|
1051
|
-
"&:focus": {
|
|
1052
|
-
outline: "none",
|
|
1053
|
-
border: "2px solid $clickpalm_light"
|
|
1054
|
-
},
|
|
1055
|
-
"&:disabled": {
|
|
1056
|
-
opacity: 0.5,
|
|
1057
|
-
cursor: "not-allowed"
|
|
1058
|
-
},
|
|
1059
|
-
variants: {
|
|
1060
|
-
hasError: {
|
|
1061
|
-
true: {
|
|
1062
|
-
borderColor: "$danger_dark",
|
|
1063
|
-
marginBottom: "0px",
|
|
1064
|
-
"&:focus, &:hover": {
|
|
1065
|
-
outline: "none",
|
|
1066
|
-
border: "4px solid $danger_dark"
|
|
1067
|
-
},
|
|
1068
|
-
'&[data-state="checked"]': {
|
|
1069
|
-
outline: "none",
|
|
1070
|
-
backgroundColor: "$danger_dark",
|
|
1071
|
-
borderColor: "$danger_dark"
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
});
|
|
1077
|
-
var slideIn = keyframes({
|
|
1078
|
-
from: {
|
|
1079
|
-
transform: "translateY(-100%)"
|
|
1080
|
-
},
|
|
1081
|
-
to: {
|
|
1082
|
-
transform: "translateY(0)"
|
|
1083
|
-
}
|
|
1084
|
-
});
|
|
1085
|
-
var slideOut = keyframes({
|
|
1086
|
-
from: {
|
|
1087
|
-
transform: "translateY(0)"
|
|
1088
|
-
},
|
|
1089
|
-
to: {
|
|
1090
|
-
transform: "translateY(-100%)"
|
|
1091
|
-
}
|
|
1092
|
-
});
|
|
1093
|
-
var CheckboxIndicator = styled(Checkbox.Indicator, {
|
|
1094
|
-
color: "$white",
|
|
1095
|
-
width: "$4",
|
|
1096
|
-
height: "$4",
|
|
1097
|
-
'&[data-state="checked"]': {
|
|
1098
|
-
animation: `${slideIn} 200ms ease-out`
|
|
1099
|
-
},
|
|
1100
|
-
'&[data-state="unchecked"]': {
|
|
1101
|
-
animation: `${slideOut} 200ms ease-out`
|
|
1102
|
-
}
|
|
1103
|
-
});
|
|
1104
|
-
var CheckboxLabel = styled("label", {
|
|
1105
|
-
display: "flex",
|
|
1106
|
-
paddingLeft: "$3",
|
|
1107
|
-
fontSize: "$md",
|
|
1108
|
-
lineHeight: "$base",
|
|
1109
|
-
color: "$black"
|
|
1110
|
-
});
|
|
1111
|
-
var Span = styled("span", {
|
|
1112
|
-
fontFamily: "$default",
|
|
1113
|
-
fontWeight: "$regular",
|
|
1114
|
-
fontSize: "$sm",
|
|
1115
|
-
color: "$danger_dark",
|
|
1116
|
-
alignSelf: "flex-start",
|
|
1117
|
-
paddingLeft: "1px",
|
|
1118
|
-
marginTop: "2px",
|
|
1119
|
-
marginBottom: "$6"
|
|
1120
|
-
});
|
|
1121
|
-
|
|
1122
|
-
// src/components/Checkbox/index.tsx
|
|
1123
|
-
import { jsx as jsx19, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1124
|
-
var Checkbox2 = forwardRef3(
|
|
1125
|
-
({ label, checked, onCheckedChange, errorMessage, ...rest }, ref) => {
|
|
1126
|
-
return /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
1127
|
-
/* @__PURE__ */ jsxs3(StyledWrapper, { hasError: !!errorMessage, children: [
|
|
1128
|
-
/* @__PURE__ */ jsx19(
|
|
1129
|
-
CheckboxContainer,
|
|
1130
|
-
{
|
|
1131
|
-
ref,
|
|
1132
|
-
checked: !!checked,
|
|
1133
|
-
onCheckedChange,
|
|
1134
|
-
hasError: !!errorMessage,
|
|
1135
|
-
...rest,
|
|
1136
|
-
children: /* @__PURE__ */ jsx19(CheckboxIndicator, { children: /* @__PURE__ */ jsx19(Icon, { name: "Check", size: 16, color: "white" }) })
|
|
1137
|
-
}
|
|
1138
|
-
),
|
|
1139
|
-
/* @__PURE__ */ jsx19(CheckboxLabel, { children: label })
|
|
1140
|
-
] }),
|
|
1141
|
-
errorMessage && /* @__PURE__ */ jsx19(Span, { children: errorMessage })
|
|
1142
|
-
] });
|
|
1143
|
-
}
|
|
1144
|
-
);
|
|
1145
|
-
Checkbox2.displayName = "Checkbox";
|
|
1146
|
-
|
|
1147
|
-
// src/components/Datepicker/index.tsx
|
|
1148
|
-
import { format as format2 } from "date-fns";
|
|
1149
|
-
import { ptBR as ptBR2 } from "date-fns/locale";
|
|
1150
|
-
import { forwardRef as forwardRef5, useEffect as useEffect4, useImperativeHandle, useRef as useRef4, useState as useState4 } from "react";
|
|
1151
|
-
import { DayPicker as DayPicker2 } from "react-day-picker";
|
|
1152
|
-
import "react-day-picker/dist/style.css";
|
|
1153
|
-
|
|
1154
|
-
// src/components/Input/index.tsx
|
|
1155
|
-
import React, { forwardRef as forwardRef4, useRef as useRef2 } from "react";
|
|
1156
|
-
|
|
1157
|
-
// src/components/Input/styles.ts
|
|
1158
|
-
var StyledWrapper2 = styled("div", {
|
|
1159
|
-
display: "flex",
|
|
1160
|
-
flexDirection: "column"
|
|
1161
|
-
});
|
|
1162
|
-
var Label = styled("label", {
|
|
1163
|
-
fontSize: "$md",
|
|
1164
|
-
fontWeight: "$regular",
|
|
1165
|
-
alignSelf: "flex-start",
|
|
1166
|
-
marginBottom: "$2",
|
|
1167
|
-
paddingLeft: "1px",
|
|
1168
|
-
color: "$black"
|
|
1169
|
-
});
|
|
1170
|
-
var TextInputContainer = styled("div", {
|
|
1171
|
-
backgroundColor: "$white",
|
|
1172
|
-
borderRadius: "$md",
|
|
1173
|
-
boxSizing: "border-box",
|
|
1174
|
-
border: "1px solid $gray_mid",
|
|
1175
|
-
display: "flex",
|
|
1176
|
-
alignItems: "center",
|
|
1177
|
-
padding: "$4 $4",
|
|
1178
|
-
marginBottom: "$6",
|
|
1179
|
-
FontSize: "$md",
|
|
1180
|
-
"&:has(input:focus), &:hover": {
|
|
1181
|
-
border: "1px solid $clickpalm_light"
|
|
1182
|
-
},
|
|
1183
|
-
"&:has(input:disabled)": {
|
|
1184
|
-
opacity: 0.5,
|
|
1185
|
-
cursor: "not-allowed"
|
|
1186
|
-
},
|
|
1187
|
-
variants: {
|
|
1188
|
-
hasButtonSuffix: {
|
|
1189
|
-
true: {
|
|
1190
|
-
paddingTop: "10px",
|
|
1191
|
-
paddingBottom: "10px"
|
|
1192
|
-
}
|
|
1193
|
-
},
|
|
1194
|
-
noMargin: {
|
|
1195
|
-
true: { marginBottom: "0px" }
|
|
1196
|
-
},
|
|
1197
|
-
hasError: {
|
|
1198
|
-
true: {
|
|
1199
|
-
border: "1px solid $danger_dark",
|
|
1200
|
-
marginBottom: "0px",
|
|
1201
|
-
"&:has(input:focus), &:hover": {
|
|
1202
|
-
border: "1px solid $danger_dark"
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
},
|
|
1206
|
-
hasCounter: {
|
|
1207
|
-
true: {
|
|
1208
|
-
marginBottom: "0px"
|
|
1209
|
-
}
|
|
1210
|
-
},
|
|
1211
|
-
redBorder: {
|
|
1212
|
-
true: {
|
|
1213
|
-
border: "1px solid $danger_dark",
|
|
1214
|
-
marginBottom: "0px",
|
|
1215
|
-
"&:has(input:focus), &:hover": {
|
|
1216
|
-
border: "1px solid $danger_dark"
|
|
1217
|
-
}
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
}
|
|
1221
|
-
});
|
|
1222
|
-
var Prefix = styled("span", {
|
|
1223
|
-
fontFamily: "$default",
|
|
1224
|
-
fontSize: "$sm",
|
|
1225
|
-
color: "$gray_light",
|
|
1226
|
-
fontWeight: "regular"
|
|
1227
|
-
});
|
|
1228
|
-
var Input = styled("input", {
|
|
1229
|
-
fontFamily: "$default",
|
|
1230
|
-
fontSize: "$md",
|
|
1231
|
-
color: "$black",
|
|
1232
|
-
fontWeight: "regular",
|
|
1233
|
-
background: "transparent",
|
|
1234
|
-
border: 0,
|
|
1235
|
-
width: "100%",
|
|
1236
|
-
"&:focus": {
|
|
1237
|
-
outline: 0
|
|
1238
|
-
},
|
|
1239
|
-
"&:disabled": {
|
|
1240
|
-
cursor: "not-allowed",
|
|
1241
|
-
opacity: 0.5
|
|
1242
|
-
},
|
|
1243
|
-
"&::placeholder": {
|
|
1244
|
-
color: "$gray_mid"
|
|
1245
|
-
}
|
|
1246
|
-
});
|
|
1247
|
-
var Suffix = styled("div", {
|
|
1248
|
-
display: "flex",
|
|
1249
|
-
alignItems: "center",
|
|
1250
|
-
justifyContent: "center",
|
|
1251
|
-
marginLeft: "$2",
|
|
1252
|
-
color: "$gray_light"
|
|
1253
|
-
});
|
|
1254
|
-
var Span2 = styled("span", {
|
|
1255
|
-
fontFamily: "$default",
|
|
1256
|
-
fontWeight: "$regular",
|
|
1257
|
-
fontSize: "$sm",
|
|
1258
|
-
textAlign: "left",
|
|
1259
|
-
color: "$danger_dark",
|
|
1260
|
-
alignSelf: "flex-start",
|
|
1261
|
-
paddingLeft: "1px",
|
|
1262
|
-
marginTop: "2px",
|
|
1263
|
-
marginBottom: "$6",
|
|
1264
|
-
flexShrink: 1,
|
|
1265
|
-
wordBreak: "break-word"
|
|
1266
|
-
});
|
|
1267
|
-
var Footer = styled("div", {
|
|
1268
|
-
display: "flex",
|
|
1269
|
-
justifyContent: "space-between",
|
|
1270
|
-
width: "100%",
|
|
1271
|
-
gap: "$2"
|
|
1272
|
-
});
|
|
1273
|
-
var CharCounter = styled(Span2, {
|
|
1274
|
-
fontFamily: "$default",
|
|
1275
|
-
fontWeight: "$regular",
|
|
1276
|
-
fontSize: "$sm",
|
|
1277
|
-
color: "$gray_mid",
|
|
1278
|
-
marginLeft: "auto",
|
|
1279
|
-
whiteSpace: "nowrap",
|
|
1280
|
-
paddingRight: "1px",
|
|
1281
|
-
marginTop: "2px",
|
|
1282
|
-
marginBottom: "0px",
|
|
1283
|
-
variants: {
|
|
1284
|
-
hasReachedMax: {
|
|
1285
|
-
true: {
|
|
1286
|
-
color: "$danger_dark"
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
});
|
|
1291
|
-
|
|
1292
|
-
// src/components/Input/index.tsx
|
|
1293
|
-
import { jsx as jsx20, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1294
|
-
var Input2 = forwardRef4(
|
|
1295
|
-
({ prefix, suffix, label, maxLength, showCounter = false, errorMessage, noMargin = false, redBorder, ...props }, forwardedRef) => {
|
|
1296
|
-
const getDisplayValue = (value) => {
|
|
1297
|
-
const stringValue = String(value || "");
|
|
1298
|
-
if (prefix && stringValue.startsWith(prefix)) {
|
|
1299
|
-
return stringValue.substring(prefix.length);
|
|
1300
|
-
}
|
|
1301
|
-
return stringValue;
|
|
1302
|
-
};
|
|
1303
|
-
const localInputRef = useRef2(null);
|
|
1304
|
-
const inputRef = forwardedRef || localInputRef;
|
|
1305
|
-
const displayValue = getDisplayValue(props.value);
|
|
1306
|
-
const charCount = displayValue.length;
|
|
1307
|
-
const handleChange = (e) => {
|
|
1308
|
-
let currentDisplayValue = e.target.value;
|
|
1309
|
-
if (prefix && currentDisplayValue.startsWith(prefix)) {
|
|
1310
|
-
currentDisplayValue = currentDisplayValue.substring(prefix.length);
|
|
1311
|
-
}
|
|
1312
|
-
if (props.type === "number") {
|
|
1313
|
-
currentDisplayValue = currentDisplayValue.replace(/[^0-9]/g, "");
|
|
1314
|
-
}
|
|
1315
|
-
if (props.onChange) {
|
|
1316
|
-
const newEvent = {
|
|
1317
|
-
...e,
|
|
1318
|
-
target: {
|
|
1319
|
-
...e.target,
|
|
1320
|
-
value: currentDisplayValue
|
|
1321
|
-
}
|
|
1322
|
-
};
|
|
1323
|
-
props.onChange(newEvent);
|
|
1324
|
-
}
|
|
1325
|
-
};
|
|
1326
|
-
const handleContainerClick = () => {
|
|
1327
|
-
inputRef?.current?.focus();
|
|
1328
|
-
};
|
|
1329
|
-
const isButtonElement = (node) => {
|
|
1330
|
-
if (!React.isValidElement(node))
|
|
1331
|
-
return false;
|
|
1332
|
-
const type = node.type;
|
|
1333
|
-
return type?.displayName === "Button";
|
|
1334
|
-
};
|
|
1335
|
-
return /* @__PURE__ */ jsxs4(StyledWrapper2, { children: [
|
|
1336
|
-
label && /* @__PURE__ */ jsx20(Label, { children: label }),
|
|
1337
|
-
/* @__PURE__ */ jsxs4(
|
|
1338
|
-
TextInputContainer,
|
|
1339
|
-
{
|
|
1340
|
-
hasButtonSuffix: isButtonElement(suffix),
|
|
1341
|
-
noMargin,
|
|
1342
|
-
hasError: !!errorMessage,
|
|
1343
|
-
hasCounter: showCounter,
|
|
1344
|
-
onClick: handleContainerClick,
|
|
1345
|
-
redBorder,
|
|
1346
|
-
children: [
|
|
1347
|
-
!!prefix && /* @__PURE__ */ jsx20(Prefix, { children: prefix }),
|
|
1348
|
-
/* @__PURE__ */ jsx20(
|
|
1349
|
-
Input,
|
|
1350
|
-
{
|
|
1351
|
-
ref: inputRef,
|
|
1352
|
-
...props,
|
|
1353
|
-
type: props.type === "number" ? "text" : props.type,
|
|
1354
|
-
inputMode: props.type === "number" ? "numeric" : props.inputMode,
|
|
1355
|
-
value: displayValue,
|
|
1356
|
-
maxLength,
|
|
1357
|
-
onChange: handleChange
|
|
1358
|
-
}
|
|
1359
|
-
),
|
|
1360
|
-
!!suffix && /* @__PURE__ */ jsx20(Suffix, { children: suffix })
|
|
1361
|
-
]
|
|
1362
|
-
}
|
|
1363
|
-
),
|
|
1364
|
-
/* @__PURE__ */ jsxs4(Footer, { children: [
|
|
1365
|
-
errorMessage && /* @__PURE__ */ jsx20(Span2, { children: errorMessage }),
|
|
1366
|
-
showCounter && maxLength && /* @__PURE__ */ jsxs4(CharCounter, { hasReachedMax: maxLength ? charCount >= maxLength : false, children: [
|
|
1367
|
-
charCount,
|
|
1368
|
-
"/",
|
|
1369
|
-
maxLength
|
|
1370
|
-
] })
|
|
1371
|
-
] })
|
|
1372
|
-
] });
|
|
1373
|
-
}
|
|
1374
|
-
);
|
|
1375
|
-
Input2.displayName = "Input";
|
|
1376
|
-
|
|
1377
|
-
// src/components/Datepicker/CustomSelect/index.tsx
|
|
1378
|
-
import { useEffect as useEffect3, useRef as useRef3, useState as useState3 } from "react";
|
|
1379
|
-
|
|
1380
|
-
// src/components/Datepicker/CustomSelect/styles.ts
|
|
1381
|
-
var IconWrapper = styled("span", {
|
|
1382
|
-
display: "flex",
|
|
1383
|
-
alignItems: "center",
|
|
1384
|
-
justifyContent: "center",
|
|
1385
|
-
transition: "transform 0.3s ease"
|
|
1386
|
-
});
|
|
1387
|
-
var SelectValueButton = styled("button", {
|
|
1388
|
-
position: "relative",
|
|
1389
|
-
display: "flex",
|
|
1390
|
-
alignItems: "center",
|
|
1391
|
-
width: "100%",
|
|
1392
|
-
backgroundColor: "transparent",
|
|
1393
|
-
borderRadius: "8px",
|
|
1394
|
-
padding: "8px",
|
|
1395
|
-
fontSize: "16px",
|
|
1396
|
-
fontWeight: theme.fontWeights.bold,
|
|
1397
|
-
fontFamily: theme.fonts.default,
|
|
1398
|
-
textAlign: "left",
|
|
1399
|
-
cursor: "pointer",
|
|
1400
|
-
gap: theme.space[2],
|
|
1401
|
-
"&:hover, &:focus": {
|
|
1402
|
-
backgroundColor: "transparent",
|
|
1403
|
-
outline: "none",
|
|
1404
|
-
boxShadow: "none",
|
|
1405
|
-
border: `2px solid ${theme.colors.gray_mid}`
|
|
1406
|
-
}
|
|
1407
|
-
});
|
|
1408
|
-
var SelectOptionsList = styled("ul", {
|
|
1409
|
-
position: "absolute",
|
|
1410
|
-
top: "100%",
|
|
1411
|
-
left: 0,
|
|
1412
|
-
right: 0,
|
|
1413
|
-
backgroundColor: theme.colors.gray_background,
|
|
1414
|
-
border: `2px solid ${theme.colors.white}`,
|
|
1415
|
-
borderRadius: "8px",
|
|
1416
|
-
boxShadow: "0 2px 8px rgba(0,0,0,0.15)",
|
|
1417
|
-
listStyle: "none",
|
|
1418
|
-
margin: "4px 0 0",
|
|
1419
|
-
padding: "0 12px",
|
|
1420
|
-
zIndex: 10,
|
|
1421
|
-
maxHeight: "200px",
|
|
1422
|
-
overflowY: "auto",
|
|
1423
|
-
fontFamily: theme.fonts.default,
|
|
1424
|
-
fontWeight: theme.fontWeights.regular,
|
|
1425
|
-
textAlign: "left",
|
|
1426
|
-
width: "120px",
|
|
1427
|
-
overflowX: "hidden",
|
|
1428
|
-
"&::-webkit-scrollbar": {
|
|
1429
|
-
width: "8px"
|
|
1430
|
-
},
|
|
1431
|
-
"&::-webkit-scrollbar-track": {
|
|
1432
|
-
background: theme.colors.gray_light,
|
|
1433
|
-
borderRadius: "8px"
|
|
1434
|
-
},
|
|
1435
|
-
"&::-webkit-scrollbar-thumb": {
|
|
1436
|
-
backgroundColor: theme.colors.clickpalm_light,
|
|
1437
|
-
borderRadius: "8px"
|
|
1438
|
-
}
|
|
1439
|
-
});
|
|
1440
|
-
var SelectOptionItem = styled("li", {
|
|
1441
|
-
padding: "12px 0",
|
|
1442
|
-
color: theme.colors.black,
|
|
1443
|
-
cursor: "pointer",
|
|
1444
|
-
borderBottom: `1px solid ${theme.colors.gray_mid}`,
|
|
1445
|
-
"&:last-child": {
|
|
1446
|
-
borderBottom: "none"
|
|
1447
|
-
},
|
|
1448
|
-
"&:hover": {
|
|
1449
|
-
backgroundColor: theme.colors.gray_background,
|
|
1450
|
-
color: theme.colors.clickpalm_mid
|
|
1451
|
-
},
|
|
1452
|
-
'&[aria-disabled="true"]': {
|
|
1453
|
-
color: theme.colors.gray_mid,
|
|
1454
|
-
cursor: "not-allowed",
|
|
1455
|
-
"&:hover": {
|
|
1456
|
-
backgroundColor: "transparent",
|
|
1457
|
-
color: theme.colors.gray_mid
|
|
1458
|
-
}
|
|
1459
|
-
},
|
|
1460
|
-
variants: {
|
|
1461
|
-
selected: {
|
|
1462
|
-
true: {
|
|
1463
|
-
backgroundColor: theme.colors.gray_background,
|
|
1464
|
-
color: theme.colors.clickpalm_mid
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1467
|
-
}
|
|
1468
|
-
});
|
|
1469
|
-
var SelectContainer = styled("div", {
|
|
1470
|
-
position: "relative",
|
|
1471
|
-
width: "100%",
|
|
1472
|
-
maxWidth: "130px",
|
|
1473
|
-
variants: {
|
|
1474
|
-
isOpen: {
|
|
1475
|
-
true: {
|
|
1476
|
-
[`& ${IconWrapper}`]: {
|
|
1477
|
-
transform: "rotate(180deg)"
|
|
1478
|
-
}
|
|
1479
|
-
}
|
|
1480
|
-
},
|
|
1481
|
-
color: {
|
|
1482
|
-
white: {
|
|
1483
|
-
[`& ${SelectValueButton}`]: {
|
|
1484
|
-
color: theme.colors.white,
|
|
1485
|
-
border: `2px solid ${theme.colors.white}`
|
|
1486
|
-
},
|
|
1487
|
-
[`& ${IconWrapper}`]: {
|
|
1488
|
-
color: theme.colors.white
|
|
1489
|
-
}
|
|
1490
|
-
},
|
|
1491
|
-
black: {
|
|
1492
|
-
marginBottom: 0,
|
|
1493
|
-
[`& ${SelectValueButton}`]: {
|
|
1494
|
-
color: theme.colors.black,
|
|
1495
|
-
border: "1px solid transparent"
|
|
1496
|
-
},
|
|
1497
|
-
[`& ${IconWrapper}`]: {
|
|
1498
|
-
color: theme.colors.black
|
|
1499
|
-
}
|
|
1500
|
-
}
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
});
|
|
1504
|
-
|
|
1505
|
-
// src/components/Datepicker/CustomSelect/index.tsx
|
|
1506
|
-
import { jsx as jsx21, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1507
|
-
var CustomSelect = ({
|
|
1508
|
-
options = [],
|
|
1509
|
-
value,
|
|
1510
|
-
onChange,
|
|
1511
|
-
color = "white"
|
|
1512
|
-
}) => {
|
|
1513
|
-
const [isOpen, setIsOpen] = useState3(false);
|
|
1514
|
-
const selectRef = useRef3(null);
|
|
1515
|
-
const handleToggle = () => setIsOpen(!isOpen);
|
|
1516
|
-
const handleOptionClick = (optionValue) => {
|
|
1517
|
-
if (onChange) {
|
|
1518
|
-
onChange(optionValue);
|
|
1519
|
-
}
|
|
1520
|
-
setIsOpen(false);
|
|
1521
|
-
};
|
|
1522
|
-
useEffect3(() => {
|
|
1523
|
-
const handleClickOutside = (event) => {
|
|
1524
|
-
if (selectRef.current && !selectRef.current.contains(event.target)) {
|
|
1525
|
-
setIsOpen(false);
|
|
1526
|
-
}
|
|
1527
|
-
};
|
|
1528
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
1529
|
-
return () => {
|
|
1530
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
1531
|
-
};
|
|
1532
|
-
}, []);
|
|
1533
|
-
const safeValue = value ?? "";
|
|
1534
|
-
const selectedLabel = options.find((opt) => opt.value === safeValue)?.label || safeValue;
|
|
1535
|
-
return /* @__PURE__ */ jsxs5(SelectContainer, { color, isOpen, ref: selectRef, children: [
|
|
1536
|
-
/* @__PURE__ */ jsxs5(SelectValueButton, { onClick: handleToggle, children: [
|
|
1537
|
-
selectedLabel,
|
|
1538
|
-
/* @__PURE__ */ jsx21(IconWrapper, { children: /* @__PURE__ */ jsx21(Icon, { name: "TriangleDown", size: 16 }) })
|
|
1539
|
-
] }),
|
|
1540
|
-
isOpen && /* @__PURE__ */ jsx21(SelectOptionsList, { onMouseDown: (e) => e.preventDefault(), children: options.map((option) => /* @__PURE__ */ jsx21(
|
|
1541
|
-
SelectOptionItem,
|
|
1542
|
-
{
|
|
1543
|
-
selected: option.value === value,
|
|
1544
|
-
onClick: () => !option.disabled && handleOptionClick(option.value),
|
|
1545
|
-
"aria-disabled": option.disabled,
|
|
1546
|
-
children: option.label
|
|
1547
|
-
},
|
|
1548
|
-
option.value
|
|
1549
|
-
)) })
|
|
1550
|
-
] });
|
|
1551
|
-
};
|
|
1552
|
-
|
|
1553
|
-
// src/components/Datepicker/DatePickerSelectAdapter.tsx
|
|
1554
|
-
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1555
|
-
function DatePickerSelectAdapter(props) {
|
|
1556
|
-
const { options, value, onChange } = props;
|
|
1557
|
-
const handleValueChange = (newValue) => {
|
|
1558
|
-
if (onChange) {
|
|
1559
|
-
const syntheticEvent = {
|
|
1560
|
-
target: { value: newValue }
|
|
1561
|
-
};
|
|
1562
|
-
onChange(syntheticEvent);
|
|
1563
|
-
}
|
|
1564
|
-
};
|
|
1565
|
-
const selectOptions = options?.map((option) => {
|
|
1566
|
-
const label = typeof option.label === "string" ? option.label.charAt(0).toUpperCase() + option.label.slice(1) : option.label;
|
|
1567
|
-
return {
|
|
1568
|
-
label,
|
|
1569
|
-
value: option.value?.toString() ?? "",
|
|
1570
|
-
disabled: option.disabled
|
|
1571
|
-
};
|
|
1572
|
-
}) || [];
|
|
1573
|
-
const isYearDropdown = options && options.length > 0 && typeof options[0].value === "number" && options[0].value > 31;
|
|
1574
|
-
if (isYearDropdown) {
|
|
1575
|
-
selectOptions.reverse();
|
|
1576
|
-
}
|
|
1577
|
-
return /* @__PURE__ */ jsx22(
|
|
1578
|
-
CustomSelect,
|
|
1579
|
-
{
|
|
1580
|
-
color: "black",
|
|
1581
|
-
options: selectOptions,
|
|
1582
|
-
value: value?.toString() || "",
|
|
1583
|
-
onChange: handleValueChange
|
|
1584
|
-
}
|
|
1585
|
-
);
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
// src/components/Datepicker/styles.ts
|
|
1589
|
-
var datePickerStyles = globalCss({
|
|
1590
|
-
".rdp-root": {
|
|
1591
|
-
"--rdp-accent-color": theme.colors.clickpalm_light,
|
|
1592
|
-
"--rdp-accent-background-color": theme.colors.clickpalm_light,
|
|
1593
|
-
"--rdp-day-height": "45px",
|
|
1594
|
-
"--rdp-day-width": "45px",
|
|
1595
|
-
"--rdp-day_button-border-radius": theme.radii.md.value,
|
|
1596
|
-
"--rdp-day_button-height": "40px",
|
|
1597
|
-
"--rdp-day_button-width": "40px",
|
|
1598
|
-
"--rdp-selected-border": "2px solid var(--rdp-accent-color)",
|
|
1599
|
-
"--rdp-disabled-opacity": "0.5",
|
|
1600
|
-
"--rdp-outside-opacity": "1",
|
|
1601
|
-
"--rdp-today-color": theme.colors.clickpalm_light,
|
|
1602
|
-
"--rdp-nav_button-disabled-opacity": "0.5",
|
|
1603
|
-
"--rdp-nav_button-height": "36px",
|
|
1604
|
-
"--rdp-nav_button-width": "36px",
|
|
1605
|
-
"--rdp-nav-height": "44px",
|
|
1606
|
-
"--rdp-weekday-opacity": "1",
|
|
1607
|
-
"--rdp-weekday-padding": "0.5rem 0",
|
|
1608
|
-
"--rdp-weekday-text-align": "center",
|
|
1609
|
-
"--rdp-animation_duration": "0.3s",
|
|
1610
|
-
"--rdp-animation_timing": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
1611
|
-
padding: theme.space[3],
|
|
1612
|
-
paddingLeft: "15px"
|
|
1613
|
-
},
|
|
1614
|
-
".rdp-caption_label": {
|
|
1615
|
-
paddingLeft: theme.space[1],
|
|
1616
|
-
textTransform: "capitalize"
|
|
1617
|
-
},
|
|
1618
|
-
".rdp-nav": {
|
|
1619
|
-
gap: theme.space[1]
|
|
1620
|
-
},
|
|
1621
|
-
".rdp-weekday": {
|
|
1622
|
-
fontFamily: theme.fonts.default,
|
|
1623
|
-
fontWeight: theme.fontWeights.bold
|
|
1624
|
-
},
|
|
1625
|
-
".rdp-day_button": {
|
|
1626
|
-
background: theme.colors.gray_background,
|
|
1627
|
-
color: theme.colors.black,
|
|
1628
|
-
fontFamily: theme.fonts.default,
|
|
1629
|
-
fontWeight: theme.fontWeights.bold,
|
|
1630
|
-
fontSize: theme.fontSizes.md,
|
|
1631
|
-
"&:hover": {
|
|
1632
|
-
border: `2px solid ${theme.colors.clickpalm_light}`
|
|
1633
|
-
},
|
|
1634
|
-
"&:focus": {
|
|
1635
|
-
border: `2px solid ${theme.colors.clickpalm_light}`,
|
|
1636
|
-
outline: "none"
|
|
1637
|
-
}
|
|
1638
|
-
},
|
|
1639
|
-
".rdp-outside .rdp-day_button": {
|
|
1640
|
-
fontFamily: theme.fonts.default,
|
|
1641
|
-
background: theme.colors.gray_mid,
|
|
1642
|
-
color: theme.colors.black
|
|
1643
|
-
},
|
|
1644
|
-
".rdp-selected .rdp-day_button": {
|
|
1645
|
-
background: theme.colors.clickpalm_light,
|
|
1646
|
-
color: theme.colors.white
|
|
1647
|
-
}
|
|
1648
|
-
// '.rdp-caption_dropdowns': {
|
|
1649
|
-
// display: 'flex',
|
|
1650
|
-
// gap: theme.space[2],
|
|
1651
|
-
// },
|
|
1652
|
-
// '.rdp-dropdown': {
|
|
1653
|
-
// padding: '6px 8px',
|
|
1654
|
-
// fontFamily: theme.fonts.default,
|
|
1655
|
-
// fontSize: theme.fontSizes.sm,
|
|
1656
|
-
// color: theme.colors.black,
|
|
1657
|
-
// border: `1px solid ${theme.colors.gray_light}`,
|
|
1658
|
-
// borderRadius: theme.radii.md,
|
|
1659
|
-
// backgroundColor: theme.colors.white,
|
|
1660
|
-
// appearance: 'none',
|
|
1661
|
-
// backgroundRepeat: 'no-repeat',
|
|
1662
|
-
// backgroundPosition: `right ${theme.space[2]} center`,
|
|
1663
|
-
// backgroundSize: '1em',
|
|
1664
|
-
// '&:focus, &:hover': {
|
|
1665
|
-
// outline: 'none',
|
|
1666
|
-
// borderColor: theme.colors.clickpalm_light,
|
|
1667
|
-
// },
|
|
1668
|
-
// '& option:checked': {
|
|
1669
|
-
// backgroundColor: theme.colors.clickpalm_light,
|
|
1670
|
-
// color: theme.colors.white,
|
|
1671
|
-
// },
|
|
1672
|
-
// '& option:hover': {
|
|
1673
|
-
// backgroundColor: theme.colors.gray_background,
|
|
1674
|
-
// color: theme.colors.black,
|
|
1675
|
-
// },
|
|
1676
|
-
// },
|
|
1677
|
-
});
|
|
1678
|
-
|
|
1679
|
-
// src/components/Datepicker/index.tsx
|
|
1680
|
-
import { jsx as jsx23, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1681
|
-
datePickerStyles();
|
|
1682
|
-
var oneYearMore = new Date((/* @__PURE__ */ new Date()).getFullYear() + 1, 11);
|
|
1683
|
-
var Datepicker = forwardRef5(({ label, placeholder, value, onChange, errorMessage, endDate = oneYearMore }, ref) => {
|
|
1684
|
-
const [selected, setSelected] = useState4(void 0);
|
|
1685
|
-
const [month, setMonth] = useState4(/* @__PURE__ */ new Date());
|
|
1686
|
-
const [open, setOpen] = useState4(false);
|
|
1687
|
-
const inputRef = useRef4(null);
|
|
1688
|
-
const calendarRef = useRef4(null);
|
|
1689
|
-
useImperativeHandle(ref, () => inputRef.current);
|
|
1690
|
-
const handleDaySelect = (date) => {
|
|
1691
|
-
setSelected(date);
|
|
1692
|
-
if (date) {
|
|
1693
|
-
const formatted = format2(date, "dd/MM/yyyy");
|
|
1694
|
-
onChange(formatted);
|
|
1695
|
-
}
|
|
1696
|
-
setOpen(false);
|
|
1697
|
-
};
|
|
1698
|
-
useEffect4(() => {
|
|
1699
|
-
const handleClickOutside = (event) => {
|
|
1700
|
-
if (calendarRef.current && !calendarRef.current.contains(event.target) && inputRef.current && !inputRef.current.contains(event.target)) {
|
|
1701
|
-
setOpen(false);
|
|
1702
|
-
}
|
|
1703
|
-
};
|
|
1704
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
1705
|
-
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1706
|
-
}, []);
|
|
1707
|
-
useEffect4(() => {
|
|
1708
|
-
if (!open && selected) {
|
|
1709
|
-
setMonth(selected);
|
|
1710
|
-
}
|
|
1711
|
-
}, [open, selected]);
|
|
1712
|
-
const isOpenWithError = open && errorMessage ? true : false;
|
|
1713
|
-
return /* @__PURE__ */ jsxs6("div", { children: [
|
|
1714
|
-
/* @__PURE__ */ jsx23(
|
|
1715
|
-
Input2,
|
|
1716
|
-
{
|
|
1717
|
-
ref: inputRef,
|
|
1718
|
-
label,
|
|
1719
|
-
placeholder,
|
|
1720
|
-
onFocus: () => setOpen(true),
|
|
1721
|
-
value: value || "",
|
|
1722
|
-
readOnly: true,
|
|
1723
|
-
suffix: /* @__PURE__ */ jsx23(Icon, { name: "Calendar", size: 16 }),
|
|
1724
|
-
noMargin: true,
|
|
1725
|
-
errorMessage: open ? "" : errorMessage,
|
|
1726
|
-
redBorder: isOpenWithError
|
|
1727
|
-
}
|
|
1728
|
-
),
|
|
1729
|
-
open && /* @__PURE__ */ jsx23(
|
|
1730
|
-
"div",
|
|
1731
|
-
{
|
|
1732
|
-
ref: calendarRef,
|
|
1733
|
-
style: {
|
|
1734
|
-
position: "absolute",
|
|
1735
|
-
marginTop: "4px",
|
|
1736
|
-
zIndex: 100,
|
|
1737
|
-
backgroundColor: "#fff",
|
|
1738
|
-
boxShadow: "0 2px 8px rgba(0,0,0,0.15)",
|
|
1739
|
-
borderRadius: "8px"
|
|
1740
|
-
},
|
|
1741
|
-
children: /* @__PURE__ */ jsx23(
|
|
1742
|
-
DayPicker2,
|
|
1743
|
-
{
|
|
1744
|
-
mode: "single",
|
|
1745
|
-
selected,
|
|
1746
|
-
onSelect: handleDaySelect,
|
|
1747
|
-
month,
|
|
1748
|
-
onMonthChange: setMonth,
|
|
1749
|
-
locale: ptBR2,
|
|
1750
|
-
showOutsideDays: true,
|
|
1751
|
-
captionLayout: "dropdown",
|
|
1752
|
-
startMonth: new Date(1915, 0),
|
|
1753
|
-
endMonth: endDate,
|
|
1754
|
-
components: {
|
|
1755
|
-
PreviousMonthButton: (props) => /* @__PURE__ */ jsx23(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ jsx23(Icon, { name: "TriangleLeft", size: 16 }) }),
|
|
1756
|
-
NextMonthButton: (props) => /* @__PURE__ */ jsx23(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ jsx23(Icon, { name: "TriangleRight", size: 16 }) }),
|
|
1757
|
-
Dropdown: DatePickerSelectAdapter
|
|
1758
|
-
}
|
|
1759
|
-
}
|
|
1760
|
-
)
|
|
1761
|
-
}
|
|
1762
|
-
)
|
|
1763
|
-
] });
|
|
1764
|
-
});
|
|
1765
|
-
Datepicker.displayName = "Datepicker";
|
|
1766
|
-
|
|
1767
|
-
// src/components/Hr.tsx
|
|
1768
|
-
import { forwardRef as forwardRef6 } from "react";
|
|
1769
|
-
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1770
|
-
var StyledHr = styled("hr", {
|
|
1771
|
-
border: "none",
|
|
1772
|
-
height: "1px",
|
|
1773
|
-
width: "100%",
|
|
1774
|
-
variants: {
|
|
1775
|
-
variant: {
|
|
1776
|
-
gray: {
|
|
1777
|
-
backgroundColor: "$gray_mid"
|
|
1778
|
-
},
|
|
1779
|
-
purple: {
|
|
1780
|
-
backgroundColor: "$clickpalm_light"
|
|
1781
|
-
}
|
|
1782
|
-
}
|
|
1783
|
-
}
|
|
1784
|
-
});
|
|
1785
|
-
var Hr = forwardRef6(function Hr2({ children, ...props }, ref) {
|
|
1786
|
-
return /* @__PURE__ */ jsx24(StyledHr, { ref, ...props, children });
|
|
1787
|
-
});
|
|
1788
|
-
Hr.displayName = "Hr";
|
|
1789
|
-
|
|
1790
|
-
// src/components/Modal/index.tsx
|
|
1791
|
-
import * as Dialog2 from "@radix-ui/react-dialog";
|
|
1792
|
-
|
|
1793
|
-
// src/components/Modal/styles.ts
|
|
1794
|
-
import * as Dialog from "@radix-ui/react-dialog";
|
|
1795
|
-
var StyledOverlay = styled(Dialog.Overlay, {
|
|
1796
|
-
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
1797
|
-
position: "fixed",
|
|
1798
|
-
inset: 0,
|
|
1799
|
-
zIndex: 101
|
|
1800
|
-
});
|
|
1801
|
-
var StyledContent = styled(Dialog.Content, {
|
|
1802
|
-
position: "fixed",
|
|
1803
|
-
top: "50%",
|
|
1804
|
-
left: "50%",
|
|
1805
|
-
display: "flex",
|
|
1806
|
-
flexDirection: "column",
|
|
1807
|
-
padding: "0 $4",
|
|
1808
|
-
width: "90%",
|
|
1809
|
-
maxWidth: "600px",
|
|
1810
|
-
backgroundColor: "$white",
|
|
1811
|
-
borderRadius: "$md",
|
|
1812
|
-
boxShadow: "0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)",
|
|
1813
|
-
transform: "translate(-50%, -50%)",
|
|
1814
|
-
zIndex: 102,
|
|
1815
|
-
fontFamily: "$default",
|
|
1816
|
-
fontWeight: "$regular"
|
|
1817
|
-
});
|
|
1818
|
-
var Wrapper = styled("div", {
|
|
1819
|
-
display: "flex",
|
|
1820
|
-
justifyContent: "space-between",
|
|
1821
|
-
alignItems: "center"
|
|
1822
|
-
});
|
|
1823
|
-
var StyledTitle = styled(Dialog.Title, {
|
|
1824
|
-
fontSize: "$lg",
|
|
1825
|
-
fontWeight: "bold",
|
|
1826
|
-
color: "$black"
|
|
1827
|
-
});
|
|
1828
|
-
var StyledClose = styled(Dialog.Close, {
|
|
1829
|
-
// position: 'absolute',
|
|
1830
|
-
// top: '24px',
|
|
1831
|
-
// right: '16px',
|
|
1832
|
-
cursor: "pointer",
|
|
1833
|
-
fontSize: "18px",
|
|
1834
|
-
color: "#999",
|
|
1835
|
-
"&:hover": {
|
|
1836
|
-
color: "#333"
|
|
1837
|
-
}
|
|
1838
|
-
});
|
|
1839
|
-
var StyledDivider = styled("hr", {
|
|
1840
|
-
width: "100%",
|
|
1841
|
-
border: "none",
|
|
1842
|
-
borderTop: "1px solid $gray_mid",
|
|
1843
|
-
margin: "0px"
|
|
1844
|
-
});
|
|
1845
|
-
var StyledDescription = styled(Dialog.Description, {
|
|
1846
|
-
display: "flex",
|
|
1847
|
-
fontFamily: "$default",
|
|
1848
|
-
fontWeight: "$regular",
|
|
1849
|
-
fontSize: "$md",
|
|
1850
|
-
color: "$black",
|
|
1851
|
-
marginTop: "$4",
|
|
1852
|
-
marginBottom: 0
|
|
1853
|
-
});
|
|
1854
|
-
var StyledChildren = styled("div", {
|
|
1855
|
-
fontFamily: "$default",
|
|
1856
|
-
fontWeight: "$regular",
|
|
1857
|
-
fontSize: "$md",
|
|
1858
|
-
color: "$black",
|
|
1859
|
-
margin: "$4 0"
|
|
1860
|
-
});
|
|
1861
|
-
|
|
1862
|
-
// src/components/Modal/index.tsx
|
|
1863
|
-
import { jsx as jsx25, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1864
|
-
var Modal = ({ open, onOpenChange, title, description, children }) => {
|
|
1865
|
-
return /* @__PURE__ */ jsx25(Dialog2.Root, { open, onOpenChange, modal: true, children: /* @__PURE__ */ jsxs7(Dialog2.Portal, { children: [
|
|
1866
|
-
/* @__PURE__ */ jsx25(StyledOverlay, {}),
|
|
1867
|
-
/* @__PURE__ */ jsxs7(StyledContent, { children: [
|
|
1868
|
-
/* @__PURE__ */ jsxs7(Wrapper, { children: [
|
|
1869
|
-
/* @__PURE__ */ jsx25(StyledTitle, { children: title }),
|
|
1870
|
-
/* @__PURE__ */ jsx25(StyledClose, { asChild: true, "aria-label": "Close", children: /* @__PURE__ */ jsx25(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ jsx25(Icon, { name: "Closed", size: 8 }) }) })
|
|
1871
|
-
] }),
|
|
1872
|
-
/* @__PURE__ */ jsx25(StyledDivider, {}),
|
|
1873
|
-
/* @__PURE__ */ jsxs7("div", { children: [
|
|
1874
|
-
description && /* @__PURE__ */ jsx25(StyledDescription, { children: description }),
|
|
1875
|
-
/* @__PURE__ */ jsx25(StyledChildren, { children })
|
|
1876
|
-
] })
|
|
1877
|
-
] })
|
|
1878
|
-
] }) });
|
|
1879
|
-
};
|
|
1880
|
-
|
|
1881
|
-
// src/components/ProgressBar/index.tsx
|
|
1882
|
-
import { useEffect as useEffect5, useState as useState5 } from "react";
|
|
1883
|
-
|
|
1884
|
-
// src/components/ProgressBar/styles.ts
|
|
1885
|
-
import * as Progress from "@radix-ui/react-progress";
|
|
1886
|
-
var StyledWrapper3 = styled("div", {
|
|
1887
|
-
display: "flex",
|
|
1888
|
-
flexDirection: "column",
|
|
1889
|
-
gap: "$2",
|
|
1890
|
-
marginBottom: "$6"
|
|
1891
|
-
});
|
|
1892
|
-
var StyledRoot = styled(Progress.Root, {
|
|
1893
|
-
position: "relative",
|
|
1894
|
-
overflow: "hidden",
|
|
1895
|
-
background: "$gray_background",
|
|
1896
|
-
borderRadius: "$md",
|
|
1897
|
-
border: "1px solid $gray_dark",
|
|
1898
|
-
boxSizing: "border-box",
|
|
1899
|
-
transform: "translateZ(0)",
|
|
1900
|
-
width: "100%",
|
|
1901
|
-
height: "10px"
|
|
1902
|
-
});
|
|
1903
|
-
var StyledIndicator = styled(Progress.Indicator, {
|
|
1904
|
-
backgroundColor: "$ignite_light",
|
|
1905
|
-
borderRadius: "$md",
|
|
1906
|
-
height: "100%",
|
|
1907
|
-
transition: "transform 660ms cubic-bezier(0.65, 0, 0.35, 1)",
|
|
1908
|
-
transformOrigin: "left"
|
|
1909
|
-
});
|
|
1910
|
-
|
|
1911
|
-
// src/components/ProgressBar/index.tsx
|
|
1912
|
-
import { jsx as jsx26, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1913
|
-
var ProgressBar = ({ label, value = 0, max = 100, ...rest }) => {
|
|
1914
|
-
const [progress2, setProgress] = useState5(0);
|
|
1915
|
-
useEffect5(() => {
|
|
1916
|
-
const timer = setTimeout(() => setProgress(value), 500);
|
|
1917
|
-
return () => clearTimeout(timer);
|
|
1918
|
-
}, [value]);
|
|
1919
|
-
const valueLabel = `${Math.round(progress2 / max * 100)}%`;
|
|
1920
|
-
return /* @__PURE__ */ jsxs8(StyledWrapper3, { children: [
|
|
1921
|
-
/* @__PURE__ */ jsx26("label", { style: { fontSize: 16, alignSelf: "flex-start", color: "black" }, children: label }),
|
|
1922
|
-
/* @__PURE__ */ jsx26(
|
|
1923
|
-
StyledRoot,
|
|
1924
|
-
{
|
|
1925
|
-
value: progress2,
|
|
1926
|
-
"aria-valuetext": valueLabel,
|
|
1927
|
-
...rest,
|
|
1928
|
-
children: /* @__PURE__ */ jsx26(
|
|
1929
|
-
StyledIndicator,
|
|
1930
|
-
{
|
|
1931
|
-
style: { transform: `translateX(-${100 - progress2}%)` }
|
|
1932
|
-
}
|
|
1933
|
-
)
|
|
1934
|
-
}
|
|
1935
|
-
)
|
|
1936
|
-
] });
|
|
1937
|
-
};
|
|
1938
|
-
ProgressBar.displayName = "ProgressBar";
|
|
1939
|
-
|
|
1940
|
-
// src/components/Radio/index.tsx
|
|
1941
|
-
import { forwardRef as forwardRef7 } from "react";
|
|
1942
|
-
|
|
1943
|
-
// src/components/Radio/styles.ts
|
|
1944
|
-
import * as RadioGroup from "@radix-ui/react-radio-group";
|
|
1945
|
-
var StyledRoot2 = styled(RadioGroup.Root, {
|
|
1946
|
-
display: "flex",
|
|
1947
|
-
flexDirection: "column",
|
|
1948
|
-
gap: "$2",
|
|
1949
|
-
cursor: "pointer",
|
|
1950
|
-
variants: {
|
|
1951
|
-
hasError: {
|
|
1952
|
-
true: {
|
|
1953
|
-
marginBottom: "0px",
|
|
1954
|
-
"&:focus": {
|
|
1955
|
-
border: "2px solid $danger_dark"
|
|
1956
|
-
}
|
|
1957
|
-
},
|
|
1958
|
-
false: {
|
|
1959
|
-
marginBottom: "$6"
|
|
1960
|
-
}
|
|
1961
|
-
}
|
|
1962
|
-
}
|
|
1963
|
-
});
|
|
1964
|
-
var Wrapper2 = styled("div", {
|
|
1965
|
-
display: "flex",
|
|
1966
|
-
alignItems: "center"
|
|
1967
|
-
});
|
|
1968
|
-
var StyledItem = styled(RadioGroup.Item, {
|
|
1969
|
-
all: "unset",
|
|
1970
|
-
display: "flex",
|
|
1971
|
-
justifyContent: "center",
|
|
1972
|
-
alignItems: "center",
|
|
1973
|
-
width: "$5",
|
|
1974
|
-
height: "$5",
|
|
1975
|
-
borderRadius: "50%",
|
|
1976
|
-
boxSizing: "border-box",
|
|
1977
|
-
backgroundColor: "$clickpalm_dark",
|
|
1978
|
-
'&[data-state="checked"]': {
|
|
1979
|
-
backgroundColor: "$clickpalm_dark"
|
|
1980
|
-
},
|
|
1981
|
-
'&[data-state="unchecked"]': {
|
|
1982
|
-
backgroundColor: "$white",
|
|
1983
|
-
border: "2px solid $gray_dark"
|
|
1984
|
-
},
|
|
1985
|
-
"&:disabled": {
|
|
1986
|
-
opacity: 0.5,
|
|
1987
|
-
cursor: "not-allowed"
|
|
1988
|
-
},
|
|
1989
|
-
"&:focus": {
|
|
1990
|
-
outline: "1px solid $clickpalm_light"
|
|
1991
|
-
},
|
|
1992
|
-
variants: {
|
|
1993
|
-
hasError: {
|
|
1994
|
-
true: {
|
|
1995
|
-
borderColor: "$danger_dark",
|
|
1996
|
-
marginBottom: "0px",
|
|
1997
|
-
"&:focus": {
|
|
1998
|
-
outline: "none",
|
|
1999
|
-
border: "4px solid $danger_dark"
|
|
2000
|
-
},
|
|
2001
|
-
'&[data-state="unchecked"]': {
|
|
2002
|
-
outline: "none",
|
|
2003
|
-
border: "2px solid $danger_dark"
|
|
2004
|
-
},
|
|
2005
|
-
'&[data-state="checked"]': {
|
|
2006
|
-
backgroundColor: "$danger_dark"
|
|
2007
|
-
}
|
|
2008
|
-
}
|
|
2009
|
-
}
|
|
2010
|
-
}
|
|
2011
|
-
});
|
|
2012
|
-
var StyledIndicator2 = styled(RadioGroup.Indicator, {
|
|
2013
|
-
width: "$3",
|
|
2014
|
-
height: "$3",
|
|
2015
|
-
borderRadius: "50%",
|
|
2016
|
-
backgroundColor: "$white"
|
|
2017
|
-
});
|
|
2018
|
-
var ItemLabel = styled("label", {
|
|
2019
|
-
paddingLeft: "$3",
|
|
2020
|
-
color: "$black",
|
|
2021
|
-
cursor: "pointer"
|
|
2022
|
-
});
|
|
2023
|
-
var Span3 = styled("span", {
|
|
2024
|
-
fontFamily: "$default",
|
|
2025
|
-
fontWeight: "$regular",
|
|
2026
|
-
fontSize: "$sm",
|
|
2027
|
-
color: "$danger_dark",
|
|
2028
|
-
alignSelf: "flex-start",
|
|
2029
|
-
paddingLeft: "1px",
|
|
2030
|
-
marginTop: "2px",
|
|
2031
|
-
marginBottom: "$6"
|
|
2032
|
-
});
|
|
2033
|
-
|
|
2034
|
-
// src/components/Radio/index.tsx
|
|
2035
|
-
import { jsx as jsx27, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2036
|
-
var Radio = forwardRef7(({
|
|
2037
|
-
labels,
|
|
2038
|
-
value,
|
|
2039
|
-
onChange,
|
|
2040
|
-
disabled = false,
|
|
2041
|
-
required = false,
|
|
2042
|
-
errorMessage
|
|
2043
|
-
}, ref) => {
|
|
2044
|
-
return /* @__PURE__ */ jsxs9("form", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
2045
|
-
/* @__PURE__ */ jsx27(
|
|
2046
|
-
StyledRoot2,
|
|
2047
|
-
{
|
|
2048
|
-
ref,
|
|
2049
|
-
value,
|
|
2050
|
-
onValueChange: onChange,
|
|
2051
|
-
hasError: !!errorMessage,
|
|
2052
|
-
disabled,
|
|
2053
|
-
required,
|
|
2054
|
-
loop: true,
|
|
2055
|
-
children: labels.map((label, index) => /* @__PURE__ */ jsxs9(Wrapper2, { children: [
|
|
2056
|
-
/* @__PURE__ */ jsx27(
|
|
2057
|
-
StyledItem,
|
|
2058
|
-
{
|
|
2059
|
-
value: label,
|
|
2060
|
-
id: `radio-${index}`,
|
|
2061
|
-
"aria-label": label,
|
|
2062
|
-
hasError: !!errorMessage,
|
|
2063
|
-
children: /* @__PURE__ */ jsx27(StyledIndicator2, {})
|
|
2064
|
-
}
|
|
2065
|
-
),
|
|
2066
|
-
/* @__PURE__ */ jsx27(ItemLabel, { htmlFor: `radio-${index}`, children: label })
|
|
2067
|
-
] }, label))
|
|
2068
|
-
}
|
|
2069
|
-
),
|
|
2070
|
-
errorMessage && /* @__PURE__ */ jsx27(Span3, { children: errorMessage })
|
|
2071
|
-
] });
|
|
2072
|
-
});
|
|
2073
|
-
Radio.displayName = "Radio";
|
|
2074
|
-
|
|
2075
|
-
// src/components/Spacing.tsx
|
|
2076
|
-
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2077
|
-
var spacingMap = {
|
|
2078
|
-
xs: 8,
|
|
2079
|
-
sm: 12,
|
|
2080
|
-
md: 16,
|
|
2081
|
-
lg: 24,
|
|
2082
|
-
xlg: 32,
|
|
2083
|
-
xxlg: 40,
|
|
2084
|
-
xxxlg: 64
|
|
2085
|
-
};
|
|
2086
|
-
var Spacing = ({ size, axis = "vertical" }) => {
|
|
2087
|
-
const style = axis === "vertical" ? { height: spacingMap[size], width: "100%" } : { width: spacingMap[size], height: "100%" };
|
|
2088
|
-
return /* @__PURE__ */ jsx28("div", { style, "data-testid": `spacing-${size}-${axis}` });
|
|
2089
|
-
};
|
|
2090
|
-
|
|
2091
|
-
// src/components/Switch/index.tsx
|
|
2092
|
-
import { forwardRef as forwardRef8 } from "react";
|
|
2093
|
-
|
|
2094
|
-
// src/components/Switch/styles.ts
|
|
2095
|
-
import * as Switch from "@radix-ui/react-switch";
|
|
2096
|
-
var Wrapper3 = styled("div", {
|
|
2097
|
-
all: "unset",
|
|
2098
|
-
display: "flex",
|
|
2099
|
-
alignItems: "center",
|
|
2100
|
-
variants: {
|
|
2101
|
-
hasError: {
|
|
2102
|
-
true: {
|
|
2103
|
-
marginBottom: "0px"
|
|
2104
|
-
},
|
|
2105
|
-
false: {
|
|
2106
|
-
marginBottom: "$6"
|
|
2107
|
-
}
|
|
2108
|
-
}
|
|
2109
|
-
}
|
|
2110
|
-
});
|
|
2111
|
-
var Label2 = styled("label", {
|
|
2112
|
-
paddingLeft: "$3",
|
|
2113
|
-
color: "$black",
|
|
2114
|
-
cursor: "pointer"
|
|
2115
|
-
});
|
|
2116
|
-
var StyledRoot3 = styled(Switch.Root, {
|
|
2117
|
-
border: "none",
|
|
2118
|
-
outline: "none",
|
|
2119
|
-
boxShadow: "none",
|
|
2120
|
-
position: "relative",
|
|
2121
|
-
width: "$10",
|
|
2122
|
-
height: "$5",
|
|
2123
|
-
padding: "0 2px",
|
|
2124
|
-
borderRadius: "30px",
|
|
2125
|
-
boxSizing: "border-box",
|
|
2126
|
-
WebkitTapHighlightColor: "rgba(0, 0, 0, 0)",
|
|
2127
|
-
cursor: "pointer",
|
|
2128
|
-
'&[data-state="checked"]': {
|
|
2129
|
-
backgroundColor: "$clickpalm_dark"
|
|
2130
|
-
},
|
|
2131
|
-
'&[data-state="unchecked"]': {
|
|
2132
|
-
backgroundColor: "$white",
|
|
2133
|
-
border: "1px solid $gray_dark"
|
|
2134
|
-
},
|
|
2135
|
-
"&:disabled": {
|
|
2136
|
-
opacity: 0.5,
|
|
2137
|
-
cursor: "not-allowed"
|
|
2138
|
-
},
|
|
2139
|
-
"&:focus": {
|
|
2140
|
-
outline: "1px solid $clickpalm_light"
|
|
2141
|
-
},
|
|
2142
|
-
variants: {
|
|
2143
|
-
hasError: {
|
|
2144
|
-
true: {
|
|
2145
|
-
border: "1px solid $danger_dark",
|
|
2146
|
-
marginBottom: "0px",
|
|
2147
|
-
"&:focus": {
|
|
2148
|
-
outline: "1px solid $danger_dark"
|
|
2149
|
-
},
|
|
2150
|
-
'&[data-state="unchecked"]': {
|
|
2151
|
-
border: "1px solid $danger_dark"
|
|
2152
|
-
}
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
|
-
}
|
|
2156
|
-
});
|
|
2157
|
-
var StyledThumb = styled(Switch.Thumb, {
|
|
2158
|
-
position: "absolute",
|
|
2159
|
-
top: "50%",
|
|
2160
|
-
left: "2px",
|
|
2161
|
-
borderRadius: "$full",
|
|
2162
|
-
transition: "transform 100ms",
|
|
2163
|
-
transform: "translateY(-50%)",
|
|
2164
|
-
willChange: "transform",
|
|
2165
|
-
'[data-state="checked"] &': {
|
|
2166
|
-
width: "14px",
|
|
2167
|
-
height: "14px",
|
|
2168
|
-
backgroundColor: "$white",
|
|
2169
|
-
transform: "translate(20px, -50%)"
|
|
2170
|
-
},
|
|
2171
|
-
'&[data-state="unchecked"]': {
|
|
2172
|
-
width: "12px",
|
|
2173
|
-
height: "12px",
|
|
2174
|
-
backgroundColor: "$gray_light"
|
|
2175
|
-
}
|
|
2176
|
-
});
|
|
2177
|
-
var Span4 = styled("span", {
|
|
2178
|
-
fontFamily: "$default",
|
|
2179
|
-
fontWeight: "$regular",
|
|
2180
|
-
fontSize: "$sm",
|
|
2181
|
-
color: "$danger_dark",
|
|
2182
|
-
alignSelf: "flex-start",
|
|
2183
|
-
paddingLeft: "1px",
|
|
2184
|
-
marginTop: "2px",
|
|
2185
|
-
marginBottom: "$6"
|
|
2186
|
-
});
|
|
2187
|
-
|
|
2188
|
-
// src/components/Switch/index.tsx
|
|
2189
|
-
import { jsx as jsx29, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2190
|
-
var Switch2 = forwardRef8(({
|
|
2191
|
-
label,
|
|
2192
|
-
checked,
|
|
2193
|
-
defaultChecked,
|
|
2194
|
-
onCheckedChange,
|
|
2195
|
-
disabled = false,
|
|
2196
|
-
required = false,
|
|
2197
|
-
id,
|
|
2198
|
-
errorMessage
|
|
2199
|
-
}, ref) => {
|
|
2200
|
-
return /* @__PURE__ */ jsxs10("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
2201
|
-
/* @__PURE__ */ jsxs10(Wrapper3, { hasError: !!errorMessage, children: [
|
|
2202
|
-
/* @__PURE__ */ jsx29(
|
|
2203
|
-
StyledRoot3,
|
|
2204
|
-
{
|
|
2205
|
-
ref,
|
|
2206
|
-
id,
|
|
2207
|
-
checked,
|
|
2208
|
-
defaultChecked,
|
|
2209
|
-
onCheckedChange,
|
|
2210
|
-
hasError: !!errorMessage,
|
|
2211
|
-
disabled,
|
|
2212
|
-
required,
|
|
2213
|
-
children: /* @__PURE__ */ jsx29(StyledThumb, {})
|
|
2214
|
-
}
|
|
2215
|
-
),
|
|
2216
|
-
label && /* @__PURE__ */ jsx29(Label2, { htmlFor: id, children: label })
|
|
2217
|
-
] }),
|
|
2218
|
-
errorMessage && /* @__PURE__ */ jsx29(Span4, { children: errorMessage })
|
|
2219
|
-
] });
|
|
2220
|
-
});
|
|
2221
|
-
Switch2.displayName = "Switch";
|
|
2222
|
-
|
|
2223
|
-
// src/components/Tabs/index.tsx
|
|
2224
|
-
import { Children, isValidElement, useLayoutEffect, useRef as useRef5, useState as useState6 } from "react";
|
|
2225
|
-
|
|
2226
|
-
// src/components/Tabs/styles.ts
|
|
2227
|
-
import * as Tabs from "@radix-ui/react-tabs";
|
|
2228
|
-
var TabsRoot = styled(Tabs.Root, {
|
|
2229
|
-
all: "unset",
|
|
2230
|
-
display: "flex",
|
|
2231
|
-
flexDirection: "column",
|
|
2232
|
-
width: "100%",
|
|
2233
|
-
backgroundColor: "$white"
|
|
2234
|
-
});
|
|
2235
|
-
var TabsList = styled(Tabs.List, {
|
|
2236
|
-
all: "unset",
|
|
2237
|
-
border: "none",
|
|
2238
|
-
outline: "none",
|
|
2239
|
-
boxShadow: "none",
|
|
2240
|
-
display: "flex",
|
|
2241
|
-
gap: "$2",
|
|
2242
|
-
overflowX: "auto",
|
|
2243
|
-
overflowY: "hidden",
|
|
2244
|
-
whiteSpace: "nowrap",
|
|
2245
|
-
"::-webkit-scrollbar": { display: "none" },
|
|
2246
|
-
"-ms-overflow-style": "none",
|
|
2247
|
-
"scrollbar-width": "none",
|
|
2248
|
-
variants: {
|
|
2249
|
-
scrollable: {
|
|
2250
|
-
true: {
|
|
2251
|
-
flex: 1
|
|
2252
|
-
},
|
|
2253
|
-
false: {
|
|
2254
|
-
width: "100%",
|
|
2255
|
-
flexShrink: 0,
|
|
2256
|
-
flex: "0 0 auto",
|
|
2257
|
-
justifyContent: "space-around"
|
|
2258
|
-
}
|
|
2259
|
-
}
|
|
2260
|
-
}
|
|
2261
|
-
});
|
|
2262
|
-
var TabsTrigger = styled(Tabs.Trigger, {
|
|
2263
|
-
all: "unset",
|
|
2264
|
-
border: "none",
|
|
2265
|
-
outline: "none",
|
|
2266
|
-
boxShadow: "none",
|
|
2267
|
-
display: "flex",
|
|
2268
|
-
flex: "0 0 auto",
|
|
2269
|
-
alignItems: "center",
|
|
2270
|
-
justifyContent: "center",
|
|
2271
|
-
padding: "0 $2",
|
|
2272
|
-
height: "$11",
|
|
2273
|
-
fontSize: "$md",
|
|
2274
|
-
lineHeight: "$base",
|
|
2275
|
-
whiteSpace: "nowrap",
|
|
2276
|
-
textOverflow: "ellipsis",
|
|
2277
|
-
overflow: "hidden",
|
|
2278
|
-
background: "$gray100",
|
|
2279
|
-
backgroundImage: "linear-gradient(to bottom, $clickpalm_mid, $clickpalm_superDark)",
|
|
2280
|
-
WebkitBackgroundClip: "text",
|
|
2281
|
-
WebkitTextFillColor: "transparent",
|
|
2282
|
-
'&[data-state="active"]': {
|
|
2283
|
-
color: "$ignite_light",
|
|
2284
|
-
borderBottom: "3px solid $ignite_light",
|
|
2285
|
-
outline: "none"
|
|
2286
|
-
}
|
|
2287
|
-
});
|
|
2288
|
-
var TabsContent = styled(Tabs.Content, {
|
|
2289
|
-
padding: "$3",
|
|
2290
|
-
backgroundColor: "$white",
|
|
2291
|
-
outline: "none",
|
|
2292
|
-
variants: {
|
|
2293
|
-
colorContent: {
|
|
2294
|
-
gray: { backgroundColor: "$gray_background" },
|
|
2295
|
-
white: { backgroundColor: "$white" }
|
|
2296
|
-
}
|
|
2297
|
-
},
|
|
2298
|
-
defaultVariants: {
|
|
2299
|
-
colorContent: "white"
|
|
2300
|
-
}
|
|
2301
|
-
});
|
|
2302
|
-
|
|
2303
|
-
// src/components/Tabs/index.tsx
|
|
2304
|
-
import { Fragment, jsx as jsx30, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2305
|
-
var TabsItem = ({ children }) => {
|
|
2306
|
-
return /* @__PURE__ */ jsx30(Fragment, { children });
|
|
2307
|
-
};
|
|
2308
|
-
var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) => {
|
|
2309
|
-
const items = [];
|
|
2310
|
-
const childrenArray = Children.toArray(children);
|
|
2311
|
-
childrenArray.forEach((child) => {
|
|
2312
|
-
if (isValidElement(child) && child.type === TabsItem) {
|
|
2313
|
-
const { value: value2, label, forceMount, children: content } = child.props;
|
|
2314
|
-
items.push({ value: value2, label, forceMount, children: content });
|
|
2315
|
-
}
|
|
2316
|
-
});
|
|
2317
|
-
const listRef = useRef5(null);
|
|
2318
|
-
const rootRef = useRef5(null);
|
|
2319
|
-
const hasOverflowRef = useRef5(false);
|
|
2320
|
-
const [hasOverflow, setHasOverflow] = useState6(false);
|
|
2321
|
-
const checkOverflow = () => {
|
|
2322
|
-
const listEl = listRef.current;
|
|
2323
|
-
const rootEl = rootRef.current;
|
|
2324
|
-
if (listEl && rootEl) {
|
|
2325
|
-
const availableWidth = rootEl.clientWidth;
|
|
2326
|
-
const contentWidth = listEl.scrollWidth;
|
|
2327
|
-
const overflow = contentWidth > availableWidth;
|
|
2328
|
-
if (overflow !== hasOverflow) {
|
|
2329
|
-
hasOverflowRef.current = overflow;
|
|
2330
|
-
setHasOverflow(overflow);
|
|
2331
|
-
}
|
|
2332
|
-
setHasOverflow(overflow);
|
|
2333
|
-
}
|
|
2334
|
-
};
|
|
2335
|
-
useLayoutEffect(() => {
|
|
2336
|
-
checkOverflow();
|
|
2337
|
-
const resizeObserver = new ResizeObserver(checkOverflow);
|
|
2338
|
-
if (listRef.current) {
|
|
2339
|
-
resizeObserver.observe(listRef.current);
|
|
2340
|
-
}
|
|
2341
|
-
return () => {
|
|
2342
|
-
if (listRef.current) {
|
|
2343
|
-
resizeObserver.unobserve(listRef.current);
|
|
2344
|
-
}
|
|
2345
|
-
};
|
|
2346
|
-
}, []);
|
|
2347
|
-
const scroll = (direction) => {
|
|
2348
|
-
if (listRef.current) {
|
|
2349
|
-
const scrollAmount = 120;
|
|
2350
|
-
listRef.current.scrollBy({
|
|
2351
|
-
left: direction === "left" ? -scrollAmount : scrollAmount,
|
|
2352
|
-
behavior: "smooth"
|
|
2353
|
-
});
|
|
2354
|
-
}
|
|
2355
|
-
};
|
|
2356
|
-
return /* @__PURE__ */ jsxs11(
|
|
2357
|
-
TabsRoot,
|
|
2358
|
-
{
|
|
2359
|
-
defaultValue: defaultValue || items[0]?.value,
|
|
2360
|
-
ref: rootRef,
|
|
2361
|
-
value,
|
|
2362
|
-
onValueChange,
|
|
2363
|
-
children: [
|
|
2364
|
-
/* @__PURE__ */ jsxs11("div", { style: { display: "flex", alignItems: "center", gap: "8px", padding: `${hasOverflow ? "0 1rem" : ""}` }, children: [
|
|
2365
|
-
hasOverflow && /* @__PURE__ */ jsx30(
|
|
2366
|
-
Button,
|
|
2367
|
-
{
|
|
2368
|
-
variant: "secondary",
|
|
2369
|
-
size: "sm",
|
|
2370
|
-
onClick: () => scroll("left"),
|
|
2371
|
-
children: /* @__PURE__ */ jsx30(Icon, { name: "TriangleLeft", size: 64 })
|
|
2372
|
-
}
|
|
2373
|
-
),
|
|
2374
|
-
/* @__PURE__ */ jsx30(
|
|
2375
|
-
TabsList,
|
|
2376
|
-
{
|
|
2377
|
-
ref: listRef,
|
|
2378
|
-
scrollable: hasOverflow,
|
|
2379
|
-
children: items.map((item) => /* @__PURE__ */ jsx30(
|
|
2380
|
-
TabsTrigger,
|
|
2381
|
-
{
|
|
2382
|
-
value: item.value,
|
|
2383
|
-
style: !hasOverflow ? { flexGrow: 1 } : { flexGrow: "0 0 auto" },
|
|
2384
|
-
children: item.label
|
|
2385
|
-
},
|
|
2386
|
-
`trigger-${item.value}`
|
|
2387
|
-
))
|
|
2388
|
-
}
|
|
2389
|
-
),
|
|
2390
|
-
hasOverflow && /* @__PURE__ */ jsx30(
|
|
2391
|
-
Button,
|
|
2392
|
-
{
|
|
2393
|
-
variant: "secondary",
|
|
2394
|
-
size: "sm",
|
|
2395
|
-
onClick: () => scroll("right"),
|
|
2396
|
-
children: /* @__PURE__ */ jsx30(Icon, { name: "TriangleRight", size: 64 })
|
|
2397
|
-
}
|
|
2398
|
-
)
|
|
2399
|
-
] }),
|
|
2400
|
-
items.map((item) => /* @__PURE__ */ jsx30(
|
|
2401
|
-
TabsContent,
|
|
2402
|
-
{
|
|
2403
|
-
colorContent,
|
|
2404
|
-
value: item.value,
|
|
2405
|
-
forceMount: item.forceMount || void 0,
|
|
2406
|
-
children: item.children
|
|
2407
|
-
},
|
|
2408
|
-
`content-${item.value}`
|
|
2409
|
-
))
|
|
2410
|
-
]
|
|
2411
|
-
}
|
|
2412
|
-
);
|
|
2413
|
-
};
|
|
2414
|
-
Tabs2.Item = TabsItem;
|
|
2415
|
-
|
|
2416
|
-
// src/components/TextArea.tsx
|
|
2417
|
-
import { forwardRef as forwardRef9, useEffect as useEffect6, useState as useState7 } from "react";
|
|
2418
|
-
import { jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2419
|
-
var Wrapper4 = styled("div", {
|
|
2420
|
-
display: "flex",
|
|
2421
|
-
flexDirection: "column"
|
|
2422
|
-
});
|
|
2423
|
-
var StyledLabel2 = styled("label", {
|
|
2424
|
-
fontSize: "$md",
|
|
2425
|
-
fontWeight: "$regular",
|
|
2426
|
-
color: "$black",
|
|
2427
|
-
marginBottom: "$2",
|
|
2428
|
-
paddingLeft: "1px",
|
|
2429
|
-
alignSelf: "flex-start"
|
|
2430
|
-
});
|
|
2431
|
-
var TextAreaElement = styled("textarea", {
|
|
2432
|
-
backgroundColor: "$white",
|
|
2433
|
-
padding: "$3 $4",
|
|
2434
|
-
marginBottom: "$6",
|
|
2435
|
-
borderRadius: "$md",
|
|
2436
|
-
boxSizing: "border-box",
|
|
2437
|
-
border: "1px solid $gray_mid",
|
|
2438
|
-
fontFamily: "$default",
|
|
2439
|
-
fontSize: "$sm",
|
|
2440
|
-
color: "$black",
|
|
2441
|
-
fontWeight: "$regular",
|
|
2442
|
-
resize: "vertical",
|
|
2443
|
-
minHeight: "100px",
|
|
2444
|
-
overflowY: "auto",
|
|
2445
|
-
width: "100%",
|
|
2446
|
-
"&:focus": {
|
|
2447
|
-
outline: 0,
|
|
2448
|
-
border: "1px solid $clickpalm_light"
|
|
2449
|
-
},
|
|
2450
|
-
"&:disabled": {
|
|
2451
|
-
opacity: 0.5,
|
|
2452
|
-
cursor: "not-allowed"
|
|
2453
|
-
},
|
|
2454
|
-
"&::placeholder": {
|
|
2455
|
-
color: "$gray_mid"
|
|
2456
|
-
},
|
|
2457
|
-
"&::-webkit-scrollbar": {
|
|
2458
|
-
width: "6px"
|
|
2459
|
-
},
|
|
2460
|
-
"&::-webkit-scrollbar-track": {
|
|
2461
|
-
background: "transparent",
|
|
2462
|
-
borderRadius: "$md",
|
|
2463
|
-
margin: "$2"
|
|
2464
|
-
},
|
|
2465
|
-
"&::-webkit-scrollbar-thumb": {
|
|
2466
|
-
backgroundColor: "$gray_mid",
|
|
2467
|
-
borderRadius: "$md",
|
|
2468
|
-
border: "2px solid $white"
|
|
2469
|
-
},
|
|
2470
|
-
variants: {
|
|
2471
|
-
hasError: {
|
|
2472
|
-
true: {
|
|
2473
|
-
border: "1px solid $danger",
|
|
2474
|
-
marginBottom: "0px",
|
|
2475
|
-
"&:focus": {
|
|
2476
|
-
border: "1px solid $danger_dark"
|
|
2477
|
-
}
|
|
2478
|
-
}
|
|
2479
|
-
},
|
|
2480
|
-
hasCounter: {
|
|
2481
|
-
true: {
|
|
2482
|
-
marginBottom: "0px"
|
|
2483
|
-
}
|
|
2484
|
-
}
|
|
2485
|
-
}
|
|
2486
|
-
});
|
|
2487
|
-
var Span5 = styled("span", {
|
|
2488
|
-
fontFamily: "$default",
|
|
2489
|
-
fontWeight: "$regular",
|
|
2490
|
-
fontSize: "$sm",
|
|
2491
|
-
textAlign: "left",
|
|
2492
|
-
color: "$danger_dark",
|
|
2493
|
-
alignSelf: "flex-start",
|
|
2494
|
-
paddingLeft: "1px",
|
|
2495
|
-
marginTop: "2px",
|
|
2496
|
-
marginBottom: "$6",
|
|
2497
|
-
flexShrink: 1,
|
|
2498
|
-
wordBreak: "break-word"
|
|
2499
|
-
});
|
|
2500
|
-
var Footer2 = styled("div", {
|
|
2501
|
-
display: "flex",
|
|
2502
|
-
justifyContent: "space-between",
|
|
2503
|
-
width: "100%",
|
|
2504
|
-
gap: "$2"
|
|
2505
|
-
});
|
|
2506
|
-
var CharCounter2 = styled(Span5, {
|
|
2507
|
-
fontFamily: "$default",
|
|
2508
|
-
fontWeight: "$regular",
|
|
2509
|
-
fontSize: "$sm",
|
|
2510
|
-
color: "$gray_mid",
|
|
2511
|
-
marginLeft: "auto",
|
|
2512
|
-
whiteSpace: "nowrap",
|
|
2513
|
-
paddingRight: "1px",
|
|
2514
|
-
marginTop: "2px",
|
|
2515
|
-
marginBottom: "0px",
|
|
2516
|
-
variants: {
|
|
2517
|
-
hasReachedMax: {
|
|
2518
|
-
true: {
|
|
2519
|
-
color: "$danger_dark"
|
|
2520
|
-
}
|
|
2521
|
-
}
|
|
2522
|
-
}
|
|
2523
|
-
});
|
|
2524
|
-
var TextArea = forwardRef9(
|
|
2525
|
-
({ label, id, htmlFor, errorMessage, maxLength, showCounter = false, ...props }, ref) => {
|
|
2526
|
-
const textAreaId = id || htmlFor || `textarea-${crypto.randomUUID()}`;
|
|
2527
|
-
const [charCount, setCharCount] = useState7(props.value?.toString().length || 0);
|
|
2528
|
-
useEffect6(() => {
|
|
2529
|
-
setCharCount(props.value?.toString().length || 0);
|
|
2530
|
-
}, [props.value]);
|
|
2531
|
-
return /* @__PURE__ */ jsxs12(Wrapper4, { children: [
|
|
2532
|
-
label && /* @__PURE__ */ jsx31(StyledLabel2, { htmlFor: textAreaId, children: label }),
|
|
2533
|
-
/* @__PURE__ */ jsx31(
|
|
2534
|
-
TextAreaElement,
|
|
2535
|
-
{
|
|
2536
|
-
id: textAreaId,
|
|
2537
|
-
...props,
|
|
2538
|
-
hasError: !!errorMessage,
|
|
2539
|
-
hasCounter: showCounter,
|
|
2540
|
-
ref,
|
|
2541
|
-
maxLength,
|
|
2542
|
-
onChange: (e) => {
|
|
2543
|
-
if (props.onChange) {
|
|
2544
|
-
props.onChange(e);
|
|
2545
|
-
}
|
|
2546
|
-
setCharCount(e.target.value.length);
|
|
2547
|
-
}
|
|
2548
|
-
}
|
|
2549
|
-
),
|
|
2550
|
-
/* @__PURE__ */ jsxs12(Footer2, { children: [
|
|
2551
|
-
errorMessage && /* @__PURE__ */ jsx31(Span5, { children: errorMessage }),
|
|
2552
|
-
showCounter && maxLength && /* @__PURE__ */ jsxs12(CharCounter2, { hasReachedMax: maxLength ? charCount >= maxLength : false, children: [
|
|
2553
|
-
charCount,
|
|
2554
|
-
"/",
|
|
2555
|
-
maxLength
|
|
2556
|
-
] })
|
|
2557
|
-
] })
|
|
2558
|
-
] });
|
|
2559
|
-
}
|
|
2560
|
-
);
|
|
2561
|
-
TextArea.displayName = "TextArea";
|
|
2562
|
-
|
|
2563
|
-
// src/components/Tooltip/index.tsx
|
|
2564
|
-
import * as RadixTooltip2 from "@radix-ui/react-tooltip";
|
|
2565
|
-
|
|
2566
|
-
// src/components/Tooltip/styles.ts
|
|
2567
|
-
import * as RadixTooltip from "@radix-ui/react-tooltip";
|
|
2568
|
-
var slideUpAndFade = keyframes({
|
|
2569
|
-
"0%": { opacity: 0, transform: "translateY(2px)" },
|
|
2570
|
-
"100%": { opacity: 1, transform: "translateY(0)" }
|
|
2571
|
-
});
|
|
2572
|
-
var slideDownAndFade = keyframes({
|
|
2573
|
-
"0%": { opacity: 0, transform: "translateY(-2px)" },
|
|
2574
|
-
"100%": { opacity: 1, transform: "translateY(0)" }
|
|
2575
|
-
});
|
|
2576
|
-
var slideLeftAndFade = keyframes({
|
|
2577
|
-
"0%": { opacity: 0, transform: "translateX(2px)" },
|
|
2578
|
-
"100%": { opacity: 1, transform: "translateX(0)" }
|
|
2579
|
-
});
|
|
2580
|
-
var slideRightAndFade = keyframes({
|
|
2581
|
-
"0%": { opacity: 0, transform: "translateX(-2px)" },
|
|
2582
|
-
"100%": { opacity: 1, transform: "translateX(0)" }
|
|
2583
|
-
});
|
|
2584
|
-
var TooltipTrigger = RadixTooltip.Trigger;
|
|
2585
|
-
var TooltipContent = styled(RadixTooltip.Content, {
|
|
2586
|
-
borderRadius: "$sm",
|
|
2587
|
-
border: "2px solid $gray_background",
|
|
2588
|
-
padding: "$2 $4",
|
|
2589
|
-
fontSize: "$sm",
|
|
2590
|
-
lineHeight: "1",
|
|
2591
|
-
color: "$black",
|
|
2592
|
-
backgroundColor: "$white",
|
|
2593
|
-
boxShadow: "0px 4px 10px rgba(0, 0, 0, 0.2)",
|
|
2594
|
-
zIndex: 50,
|
|
2595
|
-
maxWidth: "200px",
|
|
2596
|
-
whiteSpace: "normal",
|
|
2597
|
-
wordBreak: "break-word",
|
|
2598
|
-
textAlign: "left",
|
|
2599
|
-
"@media (prefers-reduced-motion: no-preference)": {
|
|
2600
|
-
animationDuration: "200ms",
|
|
2601
|
-
animationTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
2602
|
-
willChange: "transform, opacity",
|
|
2603
|
-
'&[data-state="delayed-open"][data-side="top"]': { animationName: slideDownAndFade },
|
|
2604
|
-
'&[data-state="delayed-open"][data-side="right"]': { animationName: slideLeftAndFade },
|
|
2605
|
-
'&[data-state="delayed-open"][data-side="bottom"]': { animationName: slideUpAndFade },
|
|
2606
|
-
'&[data-state="delayed-open"][data-side="left"]': { animationName: slideRightAndFade }
|
|
2607
|
-
}
|
|
2608
|
-
});
|
|
2609
|
-
var TooltipArrow = styled(RadixTooltip.Arrow, {
|
|
2610
|
-
fill: "$gray_background"
|
|
2611
|
-
});
|
|
2612
|
-
|
|
2613
|
-
// src/components/Tooltip/index.tsx
|
|
2614
|
-
import { useState as useState8, useEffect as useEffect7 } from "react";
|
|
2615
|
-
import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2616
|
-
var Tooltip = ({
|
|
2617
|
-
content,
|
|
2618
|
-
children,
|
|
2619
|
-
side = "top",
|
|
2620
|
-
sideOffset = 5,
|
|
2621
|
-
open: controlledOpen,
|
|
2622
|
-
onOpenChange,
|
|
2623
|
-
delayDuration = 100
|
|
2624
|
-
}) => {
|
|
2625
|
-
const [uncontrolledOpen, setUncontrolledOpen] = useState8(false);
|
|
2626
|
-
const [isTouchDevice, setIsTouchDevice] = useState8(false);
|
|
2627
|
-
useEffect7(() => {
|
|
2628
|
-
setIsTouchDevice("ontouchstart" in window || navigator.maxTouchPoints > 0);
|
|
2629
|
-
}, []);
|
|
2630
|
-
const open = controlledOpen ?? uncontrolledOpen;
|
|
2631
|
-
const setOpen = onOpenChange ?? setUncontrolledOpen;
|
|
2632
|
-
const handleClick = (event) => {
|
|
2633
|
-
if (isTouchDevice) {
|
|
2634
|
-
event.preventDefault();
|
|
2635
|
-
setOpen(!open);
|
|
2636
|
-
}
|
|
2637
|
-
};
|
|
2638
|
-
return /* @__PURE__ */ jsx32(RadixTooltip2.Provider, { children: /* @__PURE__ */ jsxs13(RadixTooltip2.Root, { open, onOpenChange: setOpen, delayDuration, children: [
|
|
2639
|
-
/* @__PURE__ */ jsx32(TooltipTrigger, { asChild: true, onClick: handleClick, children }),
|
|
2640
|
-
/* @__PURE__ */ jsxs13(TooltipContent, { side, sideOffset, children: [
|
|
2641
|
-
content,
|
|
2642
|
-
/* @__PURE__ */ jsx32(TooltipArrow, {})
|
|
2643
|
-
] })
|
|
2644
|
-
] }) });
|
|
2645
|
-
};
|
|
2646
|
-
Tooltip.displayName = "Tooltip";
|
|
2647
|
-
|
|
2648
|
-
// src/components/Loader/style.ts
|
|
2649
|
-
var Content4 = styled("div", {
|
|
2650
|
-
position: "relative",
|
|
2651
|
-
height: "100%",
|
|
2652
|
-
width: "100%",
|
|
2653
|
-
minHeight: "inherit",
|
|
2654
|
-
top: 0,
|
|
2655
|
-
left: 0,
|
|
2656
|
-
backgroundColor: "YellowGreen"
|
|
2657
|
-
});
|
|
2658
|
-
var Overlay2 = styled("div", {
|
|
2659
|
-
display: "flex",
|
|
2660
|
-
justifyContent: "center",
|
|
2661
|
-
alignItems: "center",
|
|
2662
|
-
backgroundColor: "rgba(255, 255, 255, 0.6)",
|
|
2663
|
-
zIndex: 999,
|
|
2664
|
-
transition: "opacity 0.3s ease-in-out",
|
|
2665
|
-
variants: {
|
|
2666
|
-
show: {
|
|
2667
|
-
true: {
|
|
2668
|
-
opacity: 1,
|
|
2669
|
-
pointerEvents: "auto"
|
|
2670
|
-
},
|
|
2671
|
-
false: {
|
|
2672
|
-
opacity: 0,
|
|
2673
|
-
pointerEvents: "none"
|
|
2674
|
-
}
|
|
2675
|
-
},
|
|
2676
|
-
fullscreen: {
|
|
2677
|
-
true: {
|
|
2678
|
-
position: "fixed",
|
|
2679
|
-
top: 0,
|
|
2680
|
-
left: 0,
|
|
2681
|
-
right: 0,
|
|
2682
|
-
bottom: 0
|
|
2683
|
-
},
|
|
2684
|
-
false: {
|
|
2685
|
-
position: "absolute",
|
|
2686
|
-
top: 0,
|
|
2687
|
-
left: 0,
|
|
2688
|
-
width: "100%",
|
|
2689
|
-
height: "100%"
|
|
2690
|
-
}
|
|
2691
|
-
}
|
|
2692
|
-
}
|
|
2693
|
-
});
|
|
2694
|
-
var SpinnerContainer = styled("div", {
|
|
2695
|
-
position: "relative"
|
|
2696
|
-
});
|
|
2697
|
-
var rotation = keyframes({
|
|
2698
|
-
"0%": { transform: "rotate(0deg)" },
|
|
2699
|
-
"100%": { transform: "rotate(360deg)" }
|
|
2700
|
-
});
|
|
2701
|
-
var Spinner = styled("span", {
|
|
2702
|
-
width: "$19",
|
|
2703
|
-
height: "$19",
|
|
2704
|
-
borderRadius: "50%",
|
|
2705
|
-
display: "inline-block",
|
|
2706
|
-
borderTop: "6px solid $ignite_light",
|
|
2707
|
-
borderRight: "6px solid transparent",
|
|
2708
|
-
boxSizing: "border-box",
|
|
2709
|
-
animation: `${rotation} 1s linear infinite`,
|
|
2710
|
-
"&::after": {
|
|
2711
|
-
content: '""',
|
|
2712
|
-
boxSizing: "border-box",
|
|
2713
|
-
position: "absolute",
|
|
2714
|
-
left: 0,
|
|
2715
|
-
top: 0,
|
|
2716
|
-
width: "$19",
|
|
2717
|
-
height: "$19",
|
|
2718
|
-
borderRadius: "50%",
|
|
2719
|
-
borderLeft: "6px solid $clickpalm_light",
|
|
2720
|
-
borderBottom: "6px solid transparent",
|
|
2721
|
-
animation: `${rotation} 0.5s linear infinite reverse`
|
|
2722
|
-
}
|
|
2723
|
-
});
|
|
2724
|
-
|
|
2725
|
-
// src/components/Loader/index.tsx
|
|
2726
|
-
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2727
|
-
var Loader = ({ show, fullscreen = false }) => {
|
|
2728
|
-
return /* @__PURE__ */ jsx33(Overlay2, { show, fullscreen, children: /* @__PURE__ */ jsx33(SpinnerContainer, { children: /* @__PURE__ */ jsx33(Spinner, {}) }) });
|
|
2729
|
-
};
|
|
2730
|
-
Loader.displayName = "Loader";
|
|
2731
|
-
|
|
2732
|
-
// src/components/MaskedInput/index.tsx
|
|
2733
|
-
import { forwardRef as forwardRef10, useState as useState9, useRef as useRef6 } from "react";
|
|
2734
|
-
|
|
2735
|
-
// src/components/MaskedInput/utils.ts
|
|
2736
|
-
var MAX_LENGTHS = {
|
|
2737
|
-
cellPhone: 15,
|
|
2738
|
-
homePhone: 14,
|
|
2739
|
-
cep: 9,
|
|
2740
|
-
cpf: 14,
|
|
2741
|
-
cnpj: 18,
|
|
2742
|
-
date: 10
|
|
2743
|
-
};
|
|
2744
|
-
var applyMask = (value, maskType) => {
|
|
2745
|
-
const digits = value.replace(/\D/g, "");
|
|
2746
|
-
const maxLength = MAX_LENGTHS[maskType];
|
|
2747
|
-
if (digits.length > maxLength) {
|
|
2748
|
-
return value.slice(0, -1);
|
|
2749
|
-
}
|
|
2750
|
-
switch (maskType) {
|
|
2751
|
-
case "cellPhone":
|
|
2752
|
-
if (digits.length <= 2)
|
|
2753
|
-
return digits;
|
|
2754
|
-
if (digits.length <= 7)
|
|
2755
|
-
return `(${digits.slice(0, 2)}) ${digits.slice(2)}`;
|
|
2756
|
-
return `(${digits.slice(0, 2)}) ${digits.slice(2, 7)}-${digits.slice(7, 11)}`;
|
|
2757
|
-
case "homePhone":
|
|
2758
|
-
if (digits.length <= 2)
|
|
2759
|
-
return digits;
|
|
2760
|
-
if (digits.length <= 6)
|
|
2761
|
-
return `(${digits.slice(0, 2)}) ${digits.slice(2)}`;
|
|
2762
|
-
return `(${digits.slice(0, 2)}) ${digits.slice(2, 6)}-${digits.slice(6, 10)}`;
|
|
2763
|
-
case "cep":
|
|
2764
|
-
if (digits.length <= 5)
|
|
2765
|
-
return digits;
|
|
2766
|
-
return `${digits.slice(0, 5)}-${digits.slice(5, 8)}`;
|
|
2767
|
-
case "cpf":
|
|
2768
|
-
if (digits.length <= 3)
|
|
2769
|
-
return digits;
|
|
2770
|
-
if (digits.length <= 6)
|
|
2771
|
-
return `${digits.slice(0, 3)}.${digits.slice(3)}`;
|
|
2772
|
-
if (digits.length <= 9)
|
|
2773
|
-
return `${digits.slice(0, 3)}.${digits.slice(3, 6)}.${digits.slice(6)}`;
|
|
2774
|
-
return `${digits.slice(0, 3)}.${digits.slice(3, 6)}.${digits.slice(6, 9)}-${digits.slice(9, 11)}`;
|
|
2775
|
-
case "cnpj":
|
|
2776
|
-
if (digits.length <= 2)
|
|
2777
|
-
return digits;
|
|
2778
|
-
if (digits.length <= 5)
|
|
2779
|
-
return `${digits.slice(0, 2)}.${digits.slice(2)}`;
|
|
2780
|
-
if (digits.length <= 8)
|
|
2781
|
-
return `${digits.slice(0, 2)}.${digits.slice(2, 5)}.${digits.slice(5)}`;
|
|
2782
|
-
if (digits.length <= 12)
|
|
2783
|
-
return `${digits.slice(0, 2)}.${digits.slice(2, 5)}.${digits.slice(5, 8)}/${digits.slice(8)}`;
|
|
2784
|
-
return `${digits.slice(0, 2)}.${digits.slice(2, 5)}.${digits.slice(5, 8)}/${digits.slice(8, 12)}-${digits.slice(12, 14)}`;
|
|
2785
|
-
case "date":
|
|
2786
|
-
if (digits.length <= 2)
|
|
2787
|
-
return digits;
|
|
2788
|
-
if (digits.length <= 4)
|
|
2789
|
-
return `${digits.slice(0, 2)}/${digits.slice(2)}`;
|
|
2790
|
-
return `${digits.slice(0, 2)}/${digits.slice(2, 4)}/${digits.slice(4, 8)}`;
|
|
2791
|
-
default:
|
|
2792
|
-
return value;
|
|
2793
|
-
}
|
|
2794
|
-
};
|
|
2795
|
-
|
|
2796
|
-
// src/components/MaskedInput/index.tsx
|
|
2797
|
-
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2798
|
-
var MaskedInput = forwardRef10(
|
|
2799
|
-
({ maskType, onChange, ...props }, ref) => {
|
|
2800
|
-
const [value, setValue] = useState9("");
|
|
2801
|
-
const inputRef = useRef6(null);
|
|
2802
|
-
const handleChange = (e) => {
|
|
2803
|
-
const { value: inputValue, selectionStart } = e.target;
|
|
2804
|
-
const isBackspace = value.length > inputValue.length;
|
|
2805
|
-
const rawValue = inputValue.replace(/\D/g, "");
|
|
2806
|
-
const maskedValue = applyMask(rawValue, maskType);
|
|
2807
|
-
setValue(maskedValue);
|
|
2808
|
-
if (inputRef.current && selectionStart !== null) {
|
|
2809
|
-
let newCursorPos = selectionStart;
|
|
2810
|
-
if (isBackspace && value.length > 0) {
|
|
2811
|
-
const prevChar = value[selectionStart || 0];
|
|
2812
|
-
if (prevChar && !/\d/.test(prevChar)) {
|
|
2813
|
-
newCursorPos = Math.max(0, (selectionStart || 0) - 1);
|
|
2814
|
-
}
|
|
2815
|
-
}
|
|
2816
|
-
setTimeout(() => {
|
|
2817
|
-
if (inputRef.current) {
|
|
2818
|
-
inputRef.current.setSelectionRange(newCursorPos, newCursorPos);
|
|
2819
|
-
}
|
|
2820
|
-
}, 0);
|
|
2821
|
-
}
|
|
2822
|
-
if (onChange) {
|
|
2823
|
-
const syntheticEvent = {
|
|
2824
|
-
...e,
|
|
2825
|
-
target: {
|
|
2826
|
-
...e.target,
|
|
2827
|
-
value: maskedValue,
|
|
2828
|
-
rawValue
|
|
2829
|
-
}
|
|
2830
|
-
};
|
|
2831
|
-
onChange(syntheticEvent);
|
|
2832
|
-
}
|
|
2833
|
-
};
|
|
2834
|
-
return /* @__PURE__ */ jsx34(
|
|
2835
|
-
Input2,
|
|
2836
|
-
{
|
|
2837
|
-
...props,
|
|
2838
|
-
ref,
|
|
2839
|
-
value,
|
|
2840
|
-
onChange: handleChange,
|
|
2841
|
-
maxLength: MAX_LENGTHS[maskType]
|
|
2842
|
-
}
|
|
2843
|
-
);
|
|
2844
|
-
}
|
|
2845
|
-
);
|
|
2846
|
-
MaskedInput.displayName = "MaskedInput";
|
|
2847
|
-
|
|
2848
|
-
// src/components/Dropdown/index.tsx
|
|
2849
|
-
import React3, { Children as Children2, Fragment as Fragment2 } from "react";
|
|
2850
|
-
import * as DropdownMenu2 from "@radix-ui/react-dropdown-menu";
|
|
2851
|
-
|
|
2852
|
-
// src/components/Dropdown/styles.ts
|
|
2853
|
-
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
|
|
2854
|
-
var slideUpAndFade2 = keyframes({
|
|
2855
|
-
"0%": { opacity: 0, transform: "translateY(2px)" },
|
|
2856
|
-
"100%": { opacity: 1, transform: "translateY(0)" }
|
|
2857
|
-
});
|
|
2858
|
-
var slideRightAndFade2 = keyframes({
|
|
2859
|
-
"0%": { opacity: 0, transform: "translateX(-2px)" },
|
|
2860
|
-
"100%": { opacity: 1, transform: "translateX(0)" }
|
|
2861
|
-
});
|
|
2862
|
-
var slideDownAndFade2 = keyframes({
|
|
2863
|
-
"0%": { opacity: 0, transform: "translateY(-2px)" },
|
|
2864
|
-
"100%": { opacity: 1, transform: "translateY(0)" }
|
|
2865
|
-
});
|
|
2866
|
-
var slideLeftAndFade2 = keyframes({
|
|
2867
|
-
"0%": { opacity: 0, transform: "translateX(2px)" },
|
|
2868
|
-
"100%": { opacity: 1, transform: "translateX(0)" }
|
|
2869
|
-
});
|
|
2870
|
-
var StyledContent2 = styled(DropdownMenu.Content, {
|
|
2871
|
-
minWidth: 100,
|
|
2872
|
-
backgroundColor: "$white",
|
|
2873
|
-
borderRadius: "$md",
|
|
2874
|
-
padding: "$2",
|
|
2875
|
-
boxShadow: "0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)",
|
|
2876
|
-
animationDuration: "400ms",
|
|
2877
|
-
animationTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
2878
|
-
willChange: "transform, opacity",
|
|
2879
|
-
'&[data-state="open"]': {
|
|
2880
|
-
'&[data-side="top"]': { animationName: slideDownAndFade2 },
|
|
2881
|
-
'&[data-side="right"]': { animationName: slideLeftAndFade2 },
|
|
2882
|
-
'&[data-side="bottom"]': { animationName: slideUpAndFade2 },
|
|
2883
|
-
'&[data-side="left"]': { animationName: slideRightAndFade2 }
|
|
2884
|
-
}
|
|
2885
|
-
});
|
|
2886
|
-
var itemStyles = {
|
|
2887
|
-
all: "unset",
|
|
2888
|
-
fontFamily: "$default",
|
|
2889
|
-
fontSize: "$sm",
|
|
2890
|
-
fontWeights: "$regular",
|
|
2891
|
-
lineHeight: 1,
|
|
2892
|
-
color: "$black",
|
|
2893
|
-
borderRadius: "$sm",
|
|
2894
|
-
display: "flex",
|
|
2895
|
-
alignItems: "center",
|
|
2896
|
-
height: 25,
|
|
2897
|
-
padding: "0 $2",
|
|
2898
|
-
position: "relative",
|
|
2899
|
-
paddingLeft: "$5",
|
|
2900
|
-
userSelect: "none",
|
|
2901
|
-
"&[data-disabled]": {
|
|
2902
|
-
color: "$gray_mid",
|
|
2903
|
-
pointerEvents: "none"
|
|
2904
|
-
},
|
|
2905
|
-
"&[data-highlighted]": {
|
|
2906
|
-
color: "$clickpalm_light",
|
|
2907
|
-
cursor: "pointer"
|
|
2908
|
-
},
|
|
2909
|
-
button: {
|
|
2910
|
-
all: "unset",
|
|
2911
|
-
width: "100%",
|
|
2912
|
-
textAlign: "left"
|
|
2913
|
-
}
|
|
2914
|
-
};
|
|
2915
|
-
var StyledItem2 = styled(DropdownMenu.Item, { ...itemStyles });
|
|
2916
|
-
var StyledSeparator = styled(DropdownMenu.Separator, {
|
|
2917
|
-
height: "1px",
|
|
2918
|
-
backgroundColor: "$gray_light",
|
|
2919
|
-
margin: "$2"
|
|
2920
|
-
});
|
|
2921
|
-
var IconButton = styled("button", {
|
|
2922
|
-
all: "unset",
|
|
2923
|
-
fontFamily: "inherit",
|
|
2924
|
-
borderRadius: "100%",
|
|
2925
|
-
height: 35,
|
|
2926
|
-
width: 35,
|
|
2927
|
-
display: "inline-flex",
|
|
2928
|
-
alignItems: "center",
|
|
2929
|
-
justifyContent: "center",
|
|
2930
|
-
color: "$clickpalm_light",
|
|
2931
|
-
backgroundColor: "transparent"
|
|
2932
|
-
});
|
|
2933
|
-
|
|
2934
|
-
// src/components/Dropdown/index.tsx
|
|
2935
|
-
import { jsx as jsx35, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2936
|
-
var Dropdown = ({ children }) => {
|
|
2937
|
-
const childrenArray = Children2.toArray(children);
|
|
2938
|
-
return /* @__PURE__ */ jsxs14(DropdownMenu2.Root, { modal: false, children: [
|
|
2939
|
-
/* @__PURE__ */ jsx35(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx35(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ jsx35(Icon, { name: "Dots", size: 16 }) }) }),
|
|
2940
|
-
/* @__PURE__ */ jsx35(DropdownMenu2.Portal, { children: /* @__PURE__ */ jsx35(StyledContent2, { sideOffset: 5, align: "end", children: childrenArray.map((child, index) => /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
2941
|
-
child,
|
|
2942
|
-
index < childrenArray.length - 1 && /* @__PURE__ */ jsx35(DropdownSeparator, {})
|
|
2943
|
-
] }, index)) }) })
|
|
2944
|
-
] });
|
|
2945
|
-
};
|
|
2946
|
-
var DropdownSeparator = StyledSeparator;
|
|
2947
|
-
var DropdownItem = React3.forwardRef(({ children, ...props }, forwardedRef) => {
|
|
2948
|
-
return /* @__PURE__ */ jsx35(StyledItem2, { ...props, ref: forwardedRef, children });
|
|
2949
|
-
});
|
|
2950
|
-
Dropdown.displayName = "Dropdown";
|
|
2951
|
-
DropdownItem.displayName = "DropdownItem";
|
|
2952
|
-
DropdownSeparator.displayName = "DropdownSeparator";
|
|
2953
|
-
|
|
2954
|
-
// src/components/Box.tsx
|
|
2955
|
-
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2956
|
-
var StyledBox = styled("div", {
|
|
2957
|
-
padding: "$5",
|
|
2958
|
-
borderRadius: "$md",
|
|
2959
|
-
textAlign: "center",
|
|
2960
|
-
marginBottom: "$6",
|
|
2961
|
-
variants: {
|
|
2962
|
-
variant: {
|
|
2963
|
-
gray: {
|
|
2964
|
-
backgroundColor: "$gray_background",
|
|
2965
|
-
boxShadow: "0 1px 2px $colors$gray_dark"
|
|
2966
|
-
},
|
|
2967
|
-
white: {
|
|
2968
|
-
backgroundColor: "$white"
|
|
2969
|
-
}
|
|
2970
|
-
}
|
|
2971
|
-
},
|
|
2972
|
-
defaultVariants: {
|
|
2973
|
-
variant: "gray"
|
|
2974
|
-
}
|
|
2975
|
-
});
|
|
2976
|
-
var Box = (props) => {
|
|
2977
|
-
return /* @__PURE__ */ jsx36(StyledBox, { ...props });
|
|
2978
|
-
};
|
|
2979
|
-
Box.displayName = "Box";
|
|
2980
|
-
|
|
2981
|
-
// src/components/Paragraph.tsx
|
|
2982
|
-
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2983
|
-
var StyledParagraph = styled("p", {
|
|
2984
|
-
fontFamily: "$default",
|
|
2985
|
-
lineHeight: "$short",
|
|
2986
|
-
color: "$black",
|
|
2987
|
-
margin: 0,
|
|
2988
|
-
variants: {
|
|
2989
|
-
size: {
|
|
2990
|
-
xxs: { fontSize: "$xxs" },
|
|
2991
|
-
xs: { fontSize: "$xs" },
|
|
2992
|
-
sm: { fontSize: "$sm" },
|
|
2993
|
-
md: { fontSize: "$md" },
|
|
2994
|
-
lg: { fontSize: "$lg" },
|
|
2995
|
-
xl: { fontSize: "$xl" },
|
|
2996
|
-
"2xl": { fontSize: "$2xl" },
|
|
2997
|
-
"4xl": { fontSize: "$4xl" },
|
|
2998
|
-
"5xl": { fontSize: "$5xl" },
|
|
2999
|
-
"6xl": { fontSize: "$6xl" },
|
|
3000
|
-
"7xl": { fontSize: "$7xl" },
|
|
3001
|
-
"8xl": { fontSize: "$8xl" },
|
|
3002
|
-
"9xl": { fontSize: "$9xl" }
|
|
3003
|
-
},
|
|
3004
|
-
weight: {
|
|
3005
|
-
regular: { fontWeight: "$regular" },
|
|
3006
|
-
medium: { fontWeight: "$medium" },
|
|
3007
|
-
bold: { fontWeight: "$bold" }
|
|
3008
|
-
},
|
|
3009
|
-
lineHeight: {
|
|
3010
|
-
regular: { lineHeight: "$regular" },
|
|
3011
|
-
shorter: { lineHeight: "$shorter" },
|
|
3012
|
-
short: { lineHeight: "$short" },
|
|
3013
|
-
base: { lineHeight: "$base" },
|
|
3014
|
-
tall: { lineHeight: "$tall" }
|
|
3015
|
-
}
|
|
3016
|
-
},
|
|
3017
|
-
defaultVariants: {
|
|
3018
|
-
size: "md",
|
|
3019
|
-
weight: "regular",
|
|
3020
|
-
lineHeight: "short"
|
|
3021
|
-
}
|
|
3022
|
-
});
|
|
3023
|
-
var Paragraph = (props) => {
|
|
3024
|
-
return /* @__PURE__ */ jsx37(StyledParagraph, { ...props });
|
|
3025
|
-
};
|
|
3026
|
-
Paragraph.displayName = "Paragraph";
|
|
3027
|
-
|
|
3028
|
-
// src/components/Heading.tsx
|
|
3029
|
-
import { forwardRef as forwardRef11 } from "react";
|
|
3030
|
-
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3031
|
-
var StyledHeading = styled("h2", {
|
|
3032
|
-
fontFamily: "$default",
|
|
3033
|
-
lineHeight: "$shorter",
|
|
3034
|
-
margin: "1px",
|
|
3035
|
-
color: "$black",
|
|
3036
|
-
fontWeight: "$regular",
|
|
3037
|
-
variants: {
|
|
3038
|
-
size: {
|
|
3039
|
-
sm: { fontSize: "$xl" },
|
|
3040
|
-
md: { fontSize: "$2xl" },
|
|
3041
|
-
lg: { fontSize: "$4xl" },
|
|
3042
|
-
"2xl": { fontSize: "$5xl" },
|
|
3043
|
-
"3xl": { fontSize: "$6xl" },
|
|
3044
|
-
"4xl": { fontSize: "$7xl" },
|
|
3045
|
-
"5xl": { fontSize: "$8xl" },
|
|
3046
|
-
"6xl": { fontSize: "$9xl" }
|
|
3047
|
-
},
|
|
3048
|
-
bold: {
|
|
3049
|
-
true: {
|
|
3050
|
-
fontWeight: "$bold"
|
|
3051
|
-
},
|
|
3052
|
-
false: {
|
|
3053
|
-
fontWeight: "$regular"
|
|
3054
|
-
}
|
|
3055
|
-
}
|
|
3056
|
-
},
|
|
3057
|
-
defaultVariants: {
|
|
3058
|
-
size: "md"
|
|
3059
|
-
}
|
|
3060
|
-
});
|
|
3061
|
-
var Heading = forwardRef11(
|
|
3062
|
-
function Heading2({ children, bold = false, ...props }, ref) {
|
|
3063
|
-
return /* @__PURE__ */ jsx38(StyledHeading, { ref, bold, ...props, children });
|
|
3064
|
-
}
|
|
3065
|
-
);
|
|
3066
|
-
Heading.displayName = "Heading";
|
|
3067
|
-
|
|
3068
|
-
// src/components/Select/index.tsx
|
|
3069
|
-
import { TriangleDownIcon, TriangleUpIcon } from "@radix-ui/react-icons";
|
|
3070
|
-
import * as CustomSelect2 from "@radix-ui/react-select";
|
|
3071
|
-
import { forwardRef as forwardRef12, useState as useState10 } from "react";
|
|
3072
|
-
|
|
3073
|
-
// src/components/Select/styles.ts
|
|
3074
|
-
import * as Select from "@radix-ui/react-select";
|
|
3075
|
-
var StyledWrapper4 = styled("div", {
|
|
3076
|
-
display: "flex",
|
|
3077
|
-
flexDirection: "column",
|
|
3078
|
-
fontFamily: "$default"
|
|
3079
|
-
});
|
|
3080
|
-
var Label3 = styled("label", {
|
|
3081
|
-
fontSize: "$md",
|
|
3082
|
-
fontWeight: "$regular",
|
|
3083
|
-
alignSelf: "flex-start",
|
|
3084
|
-
marginBottom: "$2",
|
|
3085
|
-
paddingLeft: "1px",
|
|
3086
|
-
color: "$black"
|
|
3087
|
-
});
|
|
3088
|
-
var StyledTrigger = styled(Select.Trigger, {
|
|
3089
|
-
all: "unset",
|
|
3090
|
-
display: "flex",
|
|
3091
|
-
alignItems: "center",
|
|
3092
|
-
justifyContent: "space-between",
|
|
3093
|
-
marginBottom: "$6",
|
|
3094
|
-
padding: "0.92rem $4",
|
|
3095
|
-
boxSizing: "border-box",
|
|
3096
|
-
borderRadius: "$md",
|
|
3097
|
-
border: "1px solid $gray_mid",
|
|
3098
|
-
fontSize: "$md",
|
|
3099
|
-
backgroundColor: "white",
|
|
3100
|
-
cursor: "pointer",
|
|
3101
|
-
color: "$black",
|
|
3102
|
-
"&[data-placeholder]": {
|
|
3103
|
-
color: "$gray_mid"
|
|
3104
|
-
},
|
|
3105
|
-
"&[data-highlighted], &:focus, &:hover": {
|
|
3106
|
-
outline: "none",
|
|
3107
|
-
border: "1px solid $clickpalm_light"
|
|
3108
|
-
},
|
|
3109
|
-
"&:disabled": {
|
|
3110
|
-
opacity: 0.5,
|
|
3111
|
-
cursor: "not-allowed"
|
|
3112
|
-
},
|
|
3113
|
-
variants: {
|
|
3114
|
-
hasError: {
|
|
3115
|
-
true: {
|
|
3116
|
-
border: "1px solid $danger_dark",
|
|
3117
|
-
marginBottom: "0px",
|
|
3118
|
-
"&[data-highlighted], &:focus, &:hover": {
|
|
3119
|
-
outline: "none",
|
|
3120
|
-
border: "1px solid $danger_dark"
|
|
3121
|
-
}
|
|
3122
|
-
}
|
|
3123
|
-
}
|
|
3124
|
-
}
|
|
3125
|
-
});
|
|
3126
|
-
var StyledContent3 = styled(Select.Content, {
|
|
3127
|
-
overflow: "hidden",
|
|
3128
|
-
backgroundColor: "$gray_background",
|
|
3129
|
-
borderRadius: "$md",
|
|
3130
|
-
boxShadow: "0px 4px 6px rgba(0, 0, 0, 0.1)",
|
|
3131
|
-
zIndex: 103,
|
|
3132
|
-
width: "var(--radix-select-trigger-width)",
|
|
3133
|
-
maxHeight: "var(--radix-select-content-available-height)",
|
|
3134
|
-
fontFamily: "$default",
|
|
3135
|
-
fontSize: "$md",
|
|
3136
|
-
fontWeight: "$regular"
|
|
3137
|
-
});
|
|
3138
|
-
var StyledViewport = styled(Select.Viewport, {
|
|
3139
|
-
padding: "4px",
|
|
3140
|
-
fontFamily: "$default",
|
|
3141
|
-
fontSize: "$md",
|
|
3142
|
-
fontWeight: "$regular"
|
|
3143
|
-
});
|
|
3144
|
-
var StyledItem3 = styled(Select.Item, {
|
|
3145
|
-
position: "relative",
|
|
3146
|
-
fontFamily: "$default",
|
|
3147
|
-
fontSize: "$md",
|
|
3148
|
-
fontWeight: "$regular",
|
|
3149
|
-
padding: "14px 12px",
|
|
3150
|
-
color: "$black",
|
|
3151
|
-
cursor: "pointer",
|
|
3152
|
-
"&[data-highlighted], &:focus, &:hover": {
|
|
3153
|
-
outline: "none",
|
|
3154
|
-
color: "$clickpalm_light"
|
|
3155
|
-
},
|
|
3156
|
-
"&:not(:last-child)::after": {
|
|
3157
|
-
content: '""',
|
|
3158
|
-
position: "absolute",
|
|
3159
|
-
bottom: 0,
|
|
3160
|
-
left: "$3",
|
|
3161
|
-
right: "$3",
|
|
3162
|
-
height: "1px",
|
|
3163
|
-
backgroundColor: "$gray_light"
|
|
3164
|
-
}
|
|
3165
|
-
});
|
|
3166
|
-
var StyledItemText = styled(Select.ItemText, {
|
|
3167
|
-
fontFamily: "$default",
|
|
3168
|
-
fontSize: "$md",
|
|
3169
|
-
fontWeight: "$regular"
|
|
3170
|
-
});
|
|
3171
|
-
var StyledIcon = styled(Select.Icon, {
|
|
3172
|
-
display: "flex",
|
|
3173
|
-
alignItems: "center",
|
|
3174
|
-
color: "$black",
|
|
3175
|
-
transition: "transform 0.4s ease",
|
|
3176
|
-
variants: {
|
|
3177
|
-
open: {
|
|
3178
|
-
true: {
|
|
3179
|
-
transform: "rotate(180deg)"
|
|
3180
|
-
},
|
|
3181
|
-
false: {
|
|
3182
|
-
transform: "rotate(0deg)"
|
|
3183
|
-
}
|
|
3184
|
-
}
|
|
3185
|
-
},
|
|
3186
|
-
svg: {
|
|
3187
|
-
width: 26,
|
|
3188
|
-
height: 26
|
|
3189
|
-
}
|
|
3190
|
-
});
|
|
3191
|
-
var Span6 = styled("span", {
|
|
3192
|
-
fontFamily: "$default",
|
|
3193
|
-
fontWeight: "$regular",
|
|
3194
|
-
fontSize: "$sm",
|
|
3195
|
-
color: "$danger_dark",
|
|
3196
|
-
alignSelf: "flex-start",
|
|
3197
|
-
paddingLeft: "1px",
|
|
3198
|
-
marginTop: "2px",
|
|
3199
|
-
marginBottom: "$6"
|
|
3200
|
-
});
|
|
3201
|
-
|
|
3202
|
-
// src/components/Select/index.tsx
|
|
3203
|
-
import { jsx as jsx39, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3204
|
-
var Select2 = forwardRef12(
|
|
3205
|
-
({
|
|
3206
|
-
value,
|
|
3207
|
-
onValueChange,
|
|
3208
|
-
items,
|
|
3209
|
-
placeholder = "Selecione",
|
|
3210
|
-
label,
|
|
3211
|
-
errorMessage,
|
|
3212
|
-
css: css2,
|
|
3213
|
-
className,
|
|
3214
|
-
style,
|
|
3215
|
-
...rest
|
|
3216
|
-
}, ref) => {
|
|
3217
|
-
const [open, setOpen] = useState10(false);
|
|
3218
|
-
return /* @__PURE__ */ jsxs15(StyledWrapper4, { css: css2, className, style, children: [
|
|
3219
|
-
label && /* @__PURE__ */ jsx39(Label3, { children: label }),
|
|
3220
|
-
/* @__PURE__ */ jsxs15(
|
|
3221
|
-
CustomSelect2.Root,
|
|
3222
|
-
{
|
|
3223
|
-
value,
|
|
3224
|
-
onValueChange,
|
|
3225
|
-
onOpenChange: setOpen,
|
|
3226
|
-
...rest,
|
|
3227
|
-
children: [
|
|
3228
|
-
/* @__PURE__ */ jsxs15(StyledTrigger, { "aria-label": label, hasError: !!errorMessage, ref, children: [
|
|
3229
|
-
/* @__PURE__ */ jsx39(CustomSelect2.Value, { placeholder }),
|
|
3230
|
-
/* @__PURE__ */ jsx39(StyledIcon, { open, children: /* @__PURE__ */ jsx39(TriangleDownIcon, {}) })
|
|
3231
|
-
] }),
|
|
3232
|
-
errorMessage && /* @__PURE__ */ jsx39(Span6, { children: errorMessage }),
|
|
3233
|
-
/* @__PURE__ */ jsx39(CustomSelect2.Portal, { children: /* @__PURE__ */ jsxs15(StyledContent3, { side: "bottom", align: "start", position: "popper", children: [
|
|
3234
|
-
/* @__PURE__ */ jsx39(CustomSelect2.ScrollUpButton, { children: /* @__PURE__ */ jsx39(TriangleUpIcon, {}) }),
|
|
3235
|
-
/* @__PURE__ */ jsx39(StyledViewport, { children: items.map((item) => /* @__PURE__ */ jsx39(StyledItem3, { value: item.value, children: /* @__PURE__ */ jsx39(StyledItemText, { children: item.label }) }, item.value)) }),
|
|
3236
|
-
/* @__PURE__ */ jsx39(CustomSelect2.ScrollDownButton, { children: /* @__PURE__ */ jsx39(TriangleDownIcon, {}) })
|
|
3237
|
-
] }) })
|
|
3238
|
-
]
|
|
3239
|
-
}
|
|
3240
|
-
)
|
|
3241
|
-
] });
|
|
3242
|
-
}
|
|
3243
|
-
);
|
|
3244
|
-
Select2.displayName = "Select";
|
|
3245
|
-
|
|
3246
|
-
// src/components/LabelledValue/index.tsx
|
|
3247
|
-
import {
|
|
3248
|
-
Children as Children3,
|
|
3249
|
-
cloneElement,
|
|
3250
|
-
isValidElement as isValidElement2
|
|
3251
|
-
} from "react";
|
|
3252
|
-
|
|
3253
|
-
// src/components/LabelledValue/styles.ts
|
|
3254
|
-
var Container = styled("div", {
|
|
3255
|
-
display: "flex",
|
|
3256
|
-
fontWeight: "$regular",
|
|
3257
|
-
fontSize: "$md",
|
|
3258
|
-
fontFamily: "$default",
|
|
3259
|
-
variants: {
|
|
3260
|
-
position: {
|
|
3261
|
-
vertical: {
|
|
3262
|
-
flexDirection: "column",
|
|
3263
|
-
gap: "$5"
|
|
3264
|
-
},
|
|
3265
|
-
horizontal: {
|
|
3266
|
-
flexDirection: "column",
|
|
3267
|
-
flexWrap: "wrap",
|
|
3268
|
-
gap: "$3"
|
|
3269
|
-
}
|
|
3270
|
-
}
|
|
3271
|
-
}
|
|
3272
|
-
});
|
|
3273
|
-
var ItemWrapper = styled("div", {
|
|
3274
|
-
display: "flex",
|
|
3275
|
-
alignItems: "center",
|
|
3276
|
-
fontWeight: "$regular",
|
|
3277
|
-
fontSize: "$md",
|
|
3278
|
-
fontFamily: "$default",
|
|
3279
|
-
variants: {
|
|
3280
|
-
position: {
|
|
3281
|
-
vertical: {
|
|
3282
|
-
flexDirection: "column",
|
|
3283
|
-
alignItems: "flex-start"
|
|
3284
|
-
},
|
|
3285
|
-
horizontal: {
|
|
3286
|
-
paddingBottom: "$2",
|
|
3287
|
-
flexDirection: "row",
|
|
3288
|
-
alignItems: "center",
|
|
3289
|
-
justifyContent: "space-between",
|
|
3290
|
-
borderBottom: "1px solid $gray_mid"
|
|
3291
|
-
}
|
|
3292
|
-
},
|
|
3293
|
-
withRow: {
|
|
3294
|
-
true: {
|
|
3295
|
-
paddingBottom: "$2",
|
|
3296
|
-
borderBottom: "1px solid $gray_mid"
|
|
3297
|
-
}
|
|
3298
|
-
}
|
|
3299
|
-
}
|
|
3300
|
-
});
|
|
3301
|
-
var Label4 = styled("div", {
|
|
3302
|
-
fontWeight: "$regular",
|
|
3303
|
-
fontSize: "$md",
|
|
3304
|
-
fontFamily: "$default",
|
|
3305
|
-
color: "$black",
|
|
3306
|
-
whiteSpace: "nowrap"
|
|
3307
|
-
});
|
|
3308
|
-
var Value2 = styled("div", {
|
|
3309
|
-
fontWeight: "$bold",
|
|
3310
|
-
fontSize: "$md",
|
|
3311
|
-
fontFamily: "$default",
|
|
3312
|
-
color: "$black",
|
|
3313
|
-
textAlign: "right",
|
|
3314
|
-
wordBreak: "break-word",
|
|
3315
|
-
maxWidth: "100%",
|
|
3316
|
-
flex: 1
|
|
3317
|
-
});
|
|
3318
|
-
|
|
3319
|
-
// src/components/LabelledValue/index.tsx
|
|
3320
|
-
import { jsx as jsx40, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3321
|
-
function LabelledValue({ position = "vertical", withRow = false, children }) {
|
|
3322
|
-
return /* @__PURE__ */ jsx40(Container, { position, children: Children3.map(children, (child) => {
|
|
3323
|
-
if (isValidElement2(child)) {
|
|
3324
|
-
return cloneElement(child, { position, withRow });
|
|
3325
|
-
}
|
|
3326
|
-
return child;
|
|
3327
|
-
}) });
|
|
3328
|
-
}
|
|
3329
|
-
function Item4({ label, value, position = "vertical", withRow = false }) {
|
|
3330
|
-
return /* @__PURE__ */ jsxs16(ItemWrapper, { position, withRow, children: [
|
|
3331
|
-
/* @__PURE__ */ jsx40(Label4, { children: label }),
|
|
3332
|
-
/* @__PURE__ */ jsx40(Value2, { children: value })
|
|
3333
|
-
] });
|
|
3334
|
-
}
|
|
3335
|
-
LabelledValue.Item = Item4;
|
|
3336
|
-
|
|
3337
|
-
// src/components/OneTimePassword/index.tsx
|
|
3338
|
-
import * as OneTimePasswordField2 from "@radix-ui/react-one-time-password-field";
|
|
3339
|
-
|
|
3340
|
-
// src/components/OneTimePassword/styles.ts
|
|
3341
|
-
import * as OneTimePasswordField from "@radix-ui/react-one-time-password-field";
|
|
3342
|
-
var Container2 = styled("div", {
|
|
3343
|
-
display: "flex",
|
|
3344
|
-
flexDirection: "column",
|
|
3345
|
-
justifyContent: "center",
|
|
3346
|
-
alignItems: "center",
|
|
3347
|
-
marginBottom: "$6",
|
|
3348
|
-
width: "100%"
|
|
3349
|
-
});
|
|
3350
|
-
var StyledWrapper5 = styled("div", {
|
|
3351
|
-
display: "flex",
|
|
3352
|
-
flexDirection: "column"
|
|
3353
|
-
});
|
|
3354
|
-
var StyledRoot4 = styled(OneTimePasswordField.Root, {
|
|
3355
|
-
display: "grid",
|
|
3356
|
-
gap: "$2",
|
|
3357
|
-
gridTemplateColumns: "repeat(var(--otp-length), 1fr)",
|
|
3358
|
-
width: "100%"
|
|
3359
|
-
});
|
|
3360
|
-
var StyledLabel3 = styled(OneTimePasswordField.Root, {
|
|
3361
|
-
display: "flex",
|
|
3362
|
-
justifyContent: "center",
|
|
3363
|
-
alignItems: "center",
|
|
3364
|
-
marginBottom: "$5",
|
|
3365
|
-
color: "$black"
|
|
3366
|
-
});
|
|
3367
|
-
var StyledInput = styled(OneTimePasswordField.Input, {
|
|
3368
|
-
all: "unset",
|
|
3369
|
-
gap: "1rem",
|
|
3370
|
-
display: "inline-flex",
|
|
3371
|
-
alignItems: "center",
|
|
3372
|
-
justifyContent: "center",
|
|
3373
|
-
textAlign: "center",
|
|
3374
|
-
boxSizing: "border-box",
|
|
3375
|
-
borderRadius: "$md",
|
|
3376
|
-
borderStyle: "solid",
|
|
3377
|
-
borderColor: "$gray_mid",
|
|
3378
|
-
borderWidth: "3px",
|
|
3379
|
-
fontSize: "$md",
|
|
3380
|
-
color: "$black",
|
|
3381
|
-
padding: "0",
|
|
3382
|
-
width: "100%",
|
|
3383
|
-
aspectRatio: "1 / 1",
|
|
3384
|
-
maxWidth: "53px",
|
|
3385
|
-
"&:hover": {
|
|
3386
|
-
borderColor: "$gray_dark"
|
|
3387
|
-
},
|
|
3388
|
-
"&:focus": {
|
|
3389
|
-
borderColor: "$clickpalm_mid"
|
|
3390
|
-
}
|
|
3391
|
-
});
|
|
3392
|
-
var Span7 = styled("span", {
|
|
3393
|
-
fontFamily: "$default",
|
|
3394
|
-
fontWeight: "$regular",
|
|
3395
|
-
fontSize: "$sm",
|
|
3396
|
-
color: "$danger_dark",
|
|
3397
|
-
alignSelf: "flex-start",
|
|
3398
|
-
paddingLeft: "1px",
|
|
3399
|
-
marginTop: "2px",
|
|
3400
|
-
marginBottom: "$6"
|
|
3401
|
-
});
|
|
3402
|
-
|
|
3403
|
-
// src/components/OneTimePassword/index.tsx
|
|
3404
|
-
import { jsx as jsx41, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3405
|
-
var OneTimePassword = ({ label, length, value, errorMessage, onValueChange, ...rootProps }) => {
|
|
3406
|
-
return /* @__PURE__ */ jsx41(Container2, { children: /* @__PURE__ */ jsxs17(StyledWrapper5, { children: [
|
|
3407
|
-
/* @__PURE__ */ jsx41(StyledLabel3, { children: label }),
|
|
3408
|
-
/* @__PURE__ */ jsxs17(
|
|
3409
|
-
StyledRoot4,
|
|
3410
|
-
{
|
|
3411
|
-
value,
|
|
3412
|
-
onValueChange,
|
|
3413
|
-
...rootProps,
|
|
3414
|
-
style: { "--otp-length": length },
|
|
3415
|
-
children: [
|
|
3416
|
-
Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx41(StyledInput, {}, index)),
|
|
3417
|
-
/* @__PURE__ */ jsx41(OneTimePasswordField2.HiddenInput, {})
|
|
3418
|
-
]
|
|
3419
|
-
}
|
|
3420
|
-
),
|
|
3421
|
-
errorMessage && /* @__PURE__ */ jsx41(Span7, { children: errorMessage })
|
|
3422
|
-
] }) });
|
|
3423
|
-
};
|
|
3424
|
-
OneTimePassword.displayName = "OneTimePasswordInput";
|
|
3425
|
-
|
|
3426
|
-
// src/components/Toast/index.tsx
|
|
3427
|
-
import * as ToastPrimitive2 from "@radix-ui/react-toast";
|
|
3428
|
-
import * as React4 from "react";
|
|
3429
|
-
|
|
3430
|
-
// src/components/Toast/styles.ts
|
|
3431
|
-
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
3432
|
-
var hide = keyframes({
|
|
3433
|
-
from: { opacity: 1 },
|
|
3434
|
-
to: { opacity: 0 }
|
|
3435
|
-
});
|
|
3436
|
-
var slideIn2 = keyframes({
|
|
3437
|
-
from: { transform: "translateX(calc(100% + 25px))" },
|
|
3438
|
-
to: { transform: "translateX(0)" }
|
|
3439
|
-
});
|
|
3440
|
-
var swipeOut = keyframes({
|
|
3441
|
-
from: { transform: "translateX(var(--radix-toast-swipe-end-x))" },
|
|
3442
|
-
to: { transform: "translateX(calc(100% + 25px))" }
|
|
3443
|
-
});
|
|
3444
|
-
var ToastRoot = styled(ToastPrimitive.Root, {
|
|
3445
|
-
position: "relative",
|
|
3446
|
-
display: "flex",
|
|
3447
|
-
justifyContent: "space-between",
|
|
3448
|
-
alignItems: "center",
|
|
3449
|
-
flexWrap: "nowrap",
|
|
3450
|
-
gap: "$2",
|
|
3451
|
-
width: "100%",
|
|
3452
|
-
boxSizing: "border-box",
|
|
3453
|
-
borderRadius: "$md",
|
|
3454
|
-
padding: "$4 $6",
|
|
3455
|
-
color: "$black",
|
|
3456
|
-
fontSize: "$md",
|
|
3457
|
-
boxShadow: "0 2px 10px rgba(0,0,0,0.1)",
|
|
3458
|
-
'&[data-state="open"]': {
|
|
3459
|
-
animation: `${slideIn2} 150ms cubic-bezier(0.16, 1, 0.3, 1)`
|
|
3460
|
-
},
|
|
3461
|
-
'&[data-state="closed"]': {
|
|
3462
|
-
animation: `${hide} 100ms ease-in`
|
|
3463
|
-
},
|
|
3464
|
-
'&[data-swipe="move"]': {
|
|
3465
|
-
transform: "translateX(var(--radix-toast-swipe-move-x))"
|
|
3466
|
-
},
|
|
3467
|
-
'&[data-swipe="cancel"]': {
|
|
3468
|
-
transform: "translateX(0)",
|
|
3469
|
-
transition: "transform 200ms ease-out"
|
|
3470
|
-
},
|
|
3471
|
-
'&[data-swipe="end"]': {
|
|
3472
|
-
animation: `${swipeOut} 100ms ease-out`
|
|
3473
|
-
},
|
|
3474
|
-
variants: {
|
|
3475
|
-
variant: {
|
|
3476
|
-
success: { backgroundColor: "$success" },
|
|
3477
|
-
warning: { backgroundColor: "$warning" },
|
|
3478
|
-
error: { backgroundColor: "$danger" }
|
|
3479
|
-
}
|
|
3480
|
-
}
|
|
3481
|
-
});
|
|
3482
|
-
var ToastAction = styled(ToastPrimitive.Action, {
|
|
3483
|
-
marginLeft: "auto",
|
|
3484
|
-
background: "transparent",
|
|
3485
|
-
border: "none",
|
|
3486
|
-
cursor: "pointer"
|
|
3487
|
-
});
|
|
3488
|
-
var ToastContent = styled("div", {
|
|
3489
|
-
display: "flex",
|
|
3490
|
-
flexDirection: "column",
|
|
3491
|
-
gap: "$1",
|
|
3492
|
-
width: "100%",
|
|
3493
|
-
alignItems: "flex-start",
|
|
3494
|
-
"@lg": {
|
|
3495
|
-
justifyContent: "space-between",
|
|
3496
|
-
alignItems: "center",
|
|
3497
|
-
flexDirection: "row"
|
|
3498
|
-
}
|
|
3499
|
-
});
|
|
3500
|
-
var ToastTitle = styled("strong", {
|
|
3501
|
-
fontWeight: "$bold",
|
|
3502
|
-
display: "block"
|
|
3503
|
-
});
|
|
3504
|
-
var ToastDescription = styled("span", {
|
|
3505
|
-
marginRight: "$6",
|
|
3506
|
-
display: "block"
|
|
3507
|
-
});
|
|
3508
|
-
var ToastViewport = styled(ToastPrimitive.Viewport, {
|
|
3509
|
-
position: "fixed",
|
|
3510
|
-
top: "110px",
|
|
3511
|
-
left: "50%",
|
|
3512
|
-
transform: "translateX(-50%)",
|
|
3513
|
-
display: "flex",
|
|
3514
|
-
flexDirection: "column",
|
|
3515
|
-
justifyContent: "flex-start",
|
|
3516
|
-
alignItems: "center",
|
|
3517
|
-
padding: 0,
|
|
3518
|
-
margin: "0 auto",
|
|
3519
|
-
gap: "$2",
|
|
3520
|
-
width: "79%",
|
|
3521
|
-
listStyle: "none",
|
|
3522
|
-
outline: "none",
|
|
3523
|
-
zIndex: 9999,
|
|
3524
|
-
"@lg": {
|
|
3525
|
-
maxWidth: "700px"
|
|
3526
|
-
}
|
|
3527
|
-
});
|
|
3528
|
-
var progress = keyframes({
|
|
3529
|
-
from: { width: "100%" },
|
|
3530
|
-
to: { width: "0%" }
|
|
3531
|
-
});
|
|
3532
|
-
var ToastProgress = styled("div", {
|
|
3533
|
-
position: "absolute",
|
|
3534
|
-
bottom: 0,
|
|
3535
|
-
left: 0,
|
|
3536
|
-
height: "6px",
|
|
3537
|
-
width: "90%",
|
|
3538
|
-
justifyContent: "center",
|
|
3539
|
-
borderBottomLeftRadius: "$full",
|
|
3540
|
-
borderBottomRightRadius: "$full",
|
|
3541
|
-
backgroundColor: "$clickpalm_light",
|
|
3542
|
-
animationTimingFunction: "linear",
|
|
3543
|
-
animation: `${progress} 6s linear`,
|
|
3544
|
-
animationFillMode: "forwards",
|
|
3545
|
-
variants: {
|
|
3546
|
-
paused: {
|
|
3547
|
-
true: {
|
|
3548
|
-
animationPlayState: "paused"
|
|
3549
|
-
},
|
|
3550
|
-
false: {
|
|
3551
|
-
animationPlayState: "running"
|
|
3552
|
-
}
|
|
3553
|
-
},
|
|
3554
|
-
variant: {
|
|
3555
|
-
success: { backgroundColor: "$success_dark" },
|
|
3556
|
-
warning: { backgroundColor: "$warning_dark" },
|
|
3557
|
-
error: { backgroundColor: "$danger_dark" }
|
|
3558
|
-
}
|
|
3559
|
-
}
|
|
3560
|
-
});
|
|
3561
|
-
|
|
3562
|
-
// src/components/Toast/toast.ts
|
|
3563
|
-
var subscribers = [];
|
|
3564
|
-
var toastImpl = {
|
|
3565
|
-
success(title, description) {
|
|
3566
|
-
publish({ id: crypto.randomUUID(), variant: "success", title, description });
|
|
3567
|
-
},
|
|
3568
|
-
warning(title, description) {
|
|
3569
|
-
publish({ id: crypto.randomUUID(), variant: "warning", title, description });
|
|
3570
|
-
},
|
|
3571
|
-
error(title, description) {
|
|
3572
|
-
publish({ id: crypto.randomUUID(), variant: "error", title, description });
|
|
3573
|
-
},
|
|
3574
|
-
_subscribe(fn) {
|
|
3575
|
-
subscribers.push(fn);
|
|
3576
|
-
},
|
|
3577
|
-
_unsubscribe(fn) {
|
|
3578
|
-
subscribers = subscribers.filter((sub) => sub !== fn);
|
|
3579
|
-
}
|
|
3580
|
-
};
|
|
3581
|
-
function publish(msg) {
|
|
3582
|
-
subscribers.forEach((fn) => fn(msg));
|
|
3583
|
-
}
|
|
3584
|
-
var toast = {
|
|
3585
|
-
success: toastImpl.success,
|
|
3586
|
-
warning: toastImpl.warning,
|
|
3587
|
-
error: toastImpl.error
|
|
3588
|
-
};
|
|
3589
|
-
|
|
3590
|
-
// src/components/Toast/index.tsx
|
|
3591
|
-
import { jsx as jsx42, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3592
|
-
var Toast = () => {
|
|
3593
|
-
const [messages, setMessages] = React4.useState([]);
|
|
3594
|
-
const [paused, setPaused] = React4.useState(false);
|
|
3595
|
-
React4.useEffect(() => {
|
|
3596
|
-
const handleNewToast = (msg) => {
|
|
3597
|
-
setMessages((prev) => [...prev, msg]);
|
|
3598
|
-
};
|
|
3599
|
-
toastImpl._subscribe(handleNewToast);
|
|
3600
|
-
return () => {
|
|
3601
|
-
toastImpl._unsubscribe(handleNewToast);
|
|
3602
|
-
};
|
|
3603
|
-
}, []);
|
|
3604
|
-
const removeToast = (id) => {
|
|
3605
|
-
setMessages((prev) => prev.filter((msg) => msg.id !== id));
|
|
3606
|
-
};
|
|
3607
|
-
return /* @__PURE__ */ jsxs18(ToastPrimitive2.Provider, { swipeDirection: "right", children: [
|
|
3608
|
-
messages.map((message) => /* @__PURE__ */ jsxs18(
|
|
3609
|
-
ToastRoot,
|
|
3610
|
-
{
|
|
3611
|
-
open: true,
|
|
3612
|
-
onOpenChange: (open) => {
|
|
3613
|
-
if (!open)
|
|
3614
|
-
removeToast(message.id);
|
|
3615
|
-
},
|
|
3616
|
-
variant: message.variant,
|
|
3617
|
-
duration: 6e3,
|
|
3618
|
-
onPause: () => setPaused(true),
|
|
3619
|
-
onResume: () => setPaused(false),
|
|
3620
|
-
children: [
|
|
3621
|
-
/* @__PURE__ */ jsxs18(ToastContent, { children: [
|
|
3622
|
-
/* @__PURE__ */ jsx42(ToastTitle, { children: message.title }),
|
|
3623
|
-
message.description && /* @__PURE__ */ jsx42(ToastDescription, { children: message.description })
|
|
3624
|
-
] }),
|
|
3625
|
-
/* @__PURE__ */ jsx42(ToastAction, { altText: "Fechar", asChild: true, children: /* @__PURE__ */ jsx42(
|
|
3626
|
-
"button",
|
|
3627
|
-
{
|
|
3628
|
-
style: {
|
|
3629
|
-
all: "unset",
|
|
3630
|
-
display: "flex",
|
|
3631
|
-
justifyContent: "space-between",
|
|
3632
|
-
alignItems: "center"
|
|
3633
|
-
},
|
|
3634
|
-
onClick: () => removeToast(message.id),
|
|
3635
|
-
children: /* @__PURE__ */ jsx42(Icon, { name: "Closed", size: 16, height: 14, width: 14 })
|
|
3636
|
-
}
|
|
3637
|
-
) }),
|
|
3638
|
-
/* @__PURE__ */ jsx42(ToastProgress, { paused, variant: message.variant })
|
|
3639
|
-
]
|
|
3640
|
-
},
|
|
3641
|
-
message.id
|
|
3642
|
-
)),
|
|
3643
|
-
/* @__PURE__ */ jsx42(ToastViewport, {})
|
|
3644
|
-
] });
|
|
3645
|
-
};
|
|
3646
|
-
|
|
3647
|
-
// src/components/MultiStep/styles.ts
|
|
3648
|
-
var Wrapper5 = styled("div", {
|
|
3649
|
-
display: "flex",
|
|
3650
|
-
"--circle-size": "48px",
|
|
3651
|
-
"--gap": "16px",
|
|
3652
|
-
variants: {
|
|
3653
|
-
orientation: {
|
|
3654
|
-
horizontal: {
|
|
3655
|
-
display: "grid",
|
|
3656
|
-
gridTemplateColumns: "repeat(auto-fit, minmax(100px, 1fr))",
|
|
3657
|
-
alignItems: "center",
|
|
3658
|
-
gap: "var(--gap)"
|
|
3659
|
-
},
|
|
3660
|
-
vertical: {
|
|
3661
|
-
flexDirection: "column",
|
|
3662
|
-
alignItems: "flex-start"
|
|
3663
|
-
}
|
|
3664
|
-
}
|
|
3665
|
-
}
|
|
3666
|
-
});
|
|
3667
|
-
var StepItem = styled("div", {
|
|
3668
|
-
display: "flex",
|
|
3669
|
-
alignItems: "center",
|
|
3670
|
-
position: "relative",
|
|
3671
|
-
variants: {
|
|
3672
|
-
orientation: {
|
|
3673
|
-
horizontal: {
|
|
3674
|
-
flexDirection: "column",
|
|
3675
|
-
textAlign: "center"
|
|
3676
|
-
},
|
|
3677
|
-
vertical: {
|
|
3678
|
-
margin: "$2 0",
|
|
3679
|
-
flexDirection: "row"
|
|
3680
|
-
}
|
|
3681
|
-
}
|
|
3682
|
-
}
|
|
3683
|
-
});
|
|
3684
|
-
var StepCircle = styled("div", {
|
|
3685
|
-
position: "relative",
|
|
3686
|
-
width: "var(--circle-size)",
|
|
3687
|
-
height: "var(--circle-size)",
|
|
3688
|
-
borderRadius: "50%",
|
|
3689
|
-
border: "2px solid",
|
|
3690
|
-
display: "flex",
|
|
3691
|
-
alignItems: "center",
|
|
3692
|
-
justifyContent: "center",
|
|
3693
|
-
fontWeight: "$regular",
|
|
3694
|
-
color: "$black",
|
|
3695
|
-
variants: {
|
|
3696
|
-
isActive: {
|
|
3697
|
-
true: {},
|
|
3698
|
-
false: {}
|
|
3699
|
-
},
|
|
3700
|
-
hasLeftLine: {
|
|
3701
|
-
true: {}
|
|
3702
|
-
},
|
|
3703
|
-
hasRightLine: {
|
|
3704
|
-
true: {}
|
|
3705
|
-
},
|
|
3706
|
-
orientation: {
|
|
3707
|
-
horizontal: {},
|
|
3708
|
-
vertical: {
|
|
3709
|
-
"&::before": {
|
|
3710
|
-
content: "",
|
|
3711
|
-
position: "absolute",
|
|
3712
|
-
top: 0,
|
|
3713
|
-
left: "50%",
|
|
3714
|
-
transform: "translate(-50%, -100%)",
|
|
3715
|
-
width: "3px",
|
|
3716
|
-
height: "$4",
|
|
3717
|
-
backgroundColor: "$clickpalm_dark"
|
|
3718
|
-
},
|
|
3719
|
-
"&::after": {
|
|
3720
|
-
content: "",
|
|
3721
|
-
position: "absolute",
|
|
3722
|
-
bottom: 0,
|
|
3723
|
-
left: "50%",
|
|
3724
|
-
transform: "translate(-50%, 100%)",
|
|
3725
|
-
width: "3px",
|
|
3726
|
-
height: "$4",
|
|
3727
|
-
backgroundColor: "$clickpalm_dark"
|
|
3728
|
-
}
|
|
3729
|
-
}
|
|
3730
|
-
},
|
|
3731
|
-
variant: {
|
|
3732
|
-
primary: {
|
|
3733
|
-
borderColor: "$clickpalm_dark"
|
|
3734
|
-
},
|
|
3735
|
-
secondary: {}
|
|
3736
|
-
}
|
|
3737
|
-
},
|
|
3738
|
-
compoundVariants: [
|
|
3739
|
-
{
|
|
3740
|
-
hasLeftLine: false,
|
|
3741
|
-
orientation: "horizontal",
|
|
3742
|
-
css: {
|
|
3743
|
-
"&::before": { display: "none" }
|
|
3744
|
-
}
|
|
3745
|
-
},
|
|
3746
|
-
{
|
|
3747
|
-
hasRightLine: false,
|
|
3748
|
-
orientation: "horizontal",
|
|
3749
|
-
css: {
|
|
3750
|
-
"&::after": { display: "none" }
|
|
3751
|
-
}
|
|
3752
|
-
},
|
|
3753
|
-
{
|
|
3754
|
-
hasLeftLine: false,
|
|
3755
|
-
orientation: "vertical",
|
|
3756
|
-
css: {
|
|
3757
|
-
"&::before": { display: "none" }
|
|
3758
|
-
}
|
|
3759
|
-
},
|
|
3760
|
-
{
|
|
3761
|
-
hasRightLine: false,
|
|
3762
|
-
orientation: "vertical",
|
|
3763
|
-
css: {
|
|
3764
|
-
"&::after": { display: "none" }
|
|
3765
|
-
}
|
|
3766
|
-
},
|
|
3767
|
-
{
|
|
3768
|
-
isActive: true,
|
|
3769
|
-
variant: "primary",
|
|
3770
|
-
css: {
|
|
3771
|
-
backgroundColor: "$clickpalm_dark",
|
|
3772
|
-
color: "$white"
|
|
3773
|
-
}
|
|
3774
|
-
},
|
|
3775
|
-
{
|
|
3776
|
-
isActive: false,
|
|
3777
|
-
variant: "primary",
|
|
3778
|
-
css: {
|
|
3779
|
-
borderColor: "$clickpalm_dark"
|
|
3780
|
-
}
|
|
3781
|
-
},
|
|
3782
|
-
{
|
|
3783
|
-
isActive: true,
|
|
3784
|
-
variant: "secondary",
|
|
3785
|
-
css: {
|
|
3786
|
-
borderColor: "$ignite_light",
|
|
3787
|
-
backgroundColor: "$ignite_light"
|
|
3788
|
-
}
|
|
3789
|
-
},
|
|
3790
|
-
{
|
|
3791
|
-
isActive: false,
|
|
3792
|
-
variant: "secondary",
|
|
3793
|
-
css: {
|
|
3794
|
-
borderColor: "$white",
|
|
3795
|
-
color: "$white"
|
|
3796
|
-
}
|
|
3797
|
-
},
|
|
3798
|
-
{
|
|
3799
|
-
isActive: true,
|
|
3800
|
-
variant: "primary",
|
|
3801
|
-
orientation: "vertical",
|
|
3802
|
-
css: {
|
|
3803
|
-
"&::before": {
|
|
3804
|
-
backgroundColor: "$clickpalm_dark"
|
|
3805
|
-
},
|
|
3806
|
-
"&::after": {
|
|
3807
|
-
backgroundColor: "$clickpalm_dark"
|
|
3808
|
-
}
|
|
3809
|
-
}
|
|
3810
|
-
},
|
|
3811
|
-
{
|
|
3812
|
-
isActive: false,
|
|
3813
|
-
variant: "primary",
|
|
3814
|
-
orientation: "vertical",
|
|
3815
|
-
css: {
|
|
3816
|
-
"&::before": {
|
|
3817
|
-
backgroundColor: "$clickpalm_dark"
|
|
3818
|
-
},
|
|
3819
|
-
"&::after": {
|
|
3820
|
-
backgroundColor: "$clickpalm_dark"
|
|
3821
|
-
}
|
|
3822
|
-
}
|
|
3823
|
-
},
|
|
3824
|
-
{
|
|
3825
|
-
isActive: true,
|
|
3826
|
-
variant: "secondary",
|
|
3827
|
-
orientation: "vertical",
|
|
3828
|
-
css: {
|
|
3829
|
-
"&::before": {
|
|
3830
|
-
backgroundColor: "$ignite_light"
|
|
3831
|
-
},
|
|
3832
|
-
"&::after": {
|
|
3833
|
-
backgroundColor: "$ignite_light"
|
|
3834
|
-
}
|
|
3835
|
-
}
|
|
3836
|
-
},
|
|
3837
|
-
{
|
|
3838
|
-
isActive: false,
|
|
3839
|
-
variant: "secondary",
|
|
3840
|
-
orientation: "vertical",
|
|
3841
|
-
css: {
|
|
3842
|
-
"&::before": {
|
|
3843
|
-
backgroundColor: "$white"
|
|
3844
|
-
},
|
|
3845
|
-
"&::after": {
|
|
3846
|
-
backgroundColor: "$white"
|
|
3847
|
-
}
|
|
3848
|
-
}
|
|
3849
|
-
}
|
|
3850
|
-
]
|
|
3851
|
-
});
|
|
3852
|
-
var StepLabel = styled("span", {
|
|
3853
|
-
fontSize: "$md",
|
|
3854
|
-
whiteSpace: "nowrap",
|
|
3855
|
-
overflow: "hidden",
|
|
3856
|
-
textOverflow: "ellipsis",
|
|
3857
|
-
variants: {
|
|
3858
|
-
orientation: {
|
|
3859
|
-
horizontal: {
|
|
3860
|
-
marginTop: "$2"
|
|
3861
|
-
},
|
|
3862
|
-
vertical: {
|
|
3863
|
-
marginLeft: "$3"
|
|
3864
|
-
}
|
|
3865
|
-
},
|
|
3866
|
-
variant: {
|
|
3867
|
-
primary: {
|
|
3868
|
-
color: "$black"
|
|
3869
|
-
},
|
|
3870
|
-
secondary: {
|
|
3871
|
-
color: "$white"
|
|
3872
|
-
}
|
|
3873
|
-
}
|
|
3874
|
-
}
|
|
3875
|
-
});
|
|
3876
|
-
|
|
3877
|
-
// src/components/MultiStep/index.tsx
|
|
3878
|
-
import { jsx as jsx43, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3879
|
-
var MultiStep = ({
|
|
3880
|
-
steps,
|
|
3881
|
-
currentStep,
|
|
3882
|
-
orientation = "horizontal",
|
|
3883
|
-
variant
|
|
3884
|
-
}) => {
|
|
3885
|
-
return /* @__PURE__ */ jsx43(
|
|
3886
|
-
Wrapper5,
|
|
3887
|
-
{
|
|
3888
|
-
orientation,
|
|
3889
|
-
children: steps.map((step, index) => {
|
|
3890
|
-
const isFirst = index === 0;
|
|
3891
|
-
const isLast = index === steps.length - 1;
|
|
3892
|
-
return /* @__PURE__ */ jsxs19(StepItem, { orientation, children: [
|
|
3893
|
-
/* @__PURE__ */ jsx43(
|
|
3894
|
-
StepCircle,
|
|
3895
|
-
{
|
|
3896
|
-
orientation,
|
|
3897
|
-
variant,
|
|
3898
|
-
isActive: currentStep >= index,
|
|
3899
|
-
hasLeftLine: !isFirst,
|
|
3900
|
-
hasRightLine: !isLast,
|
|
3901
|
-
children: index + 1
|
|
3902
|
-
}
|
|
3903
|
-
),
|
|
3904
|
-
/* @__PURE__ */ jsx43(
|
|
3905
|
-
StepLabel,
|
|
3906
|
-
{
|
|
3907
|
-
orientation,
|
|
3908
|
-
variant,
|
|
3909
|
-
children: step.label
|
|
3910
|
-
}
|
|
3911
|
-
)
|
|
3912
|
-
] }, index);
|
|
3913
|
-
})
|
|
3914
|
-
}
|
|
3915
|
-
);
|
|
3916
|
-
};
|
|
3917
|
-
MultiStep.displayName = "MultiStep";
|
|
3918
|
-
|
|
3919
|
-
// src/components/Carousel/index.tsx
|
|
3920
|
-
import { useState as useState12, Children as Children4, cloneElement as cloneElement2 } from "react";
|
|
3921
|
-
|
|
3922
|
-
// src/components/Carousel/styles.ts
|
|
3923
|
-
var CarouselContainer = styled("div", {
|
|
3924
|
-
display: "flex",
|
|
3925
|
-
flexDirection: "column",
|
|
3926
|
-
alignItems: "center",
|
|
3927
|
-
width: "100%",
|
|
3928
|
-
maxWidth: "720px"
|
|
3929
|
-
});
|
|
3930
|
-
var Wrapper6 = styled("div", {
|
|
3931
|
-
display: "flex",
|
|
3932
|
-
flexDirection: "column",
|
|
3933
|
-
alignItems: "center",
|
|
3934
|
-
borderRadius: "$md",
|
|
3935
|
-
width: "stretch",
|
|
3936
|
-
padding: "$4",
|
|
3937
|
-
variants: {
|
|
3938
|
-
variant: {
|
|
3939
|
-
gray: {
|
|
3940
|
-
backgroundColor: "$gray_background",
|
|
3941
|
-
boxShadow: "0 1px 2px $colors$gray_dark"
|
|
3942
|
-
},
|
|
3943
|
-
purple: {
|
|
3944
|
-
backgroundColor: "$clickpalm_mid",
|
|
3945
|
-
color: "$white"
|
|
3946
|
-
}
|
|
3947
|
-
}
|
|
3948
|
-
}
|
|
3949
|
-
});
|
|
3950
|
-
var CarouselHeader = styled("div", {
|
|
3951
|
-
display: "flex",
|
|
3952
|
-
justifyContent: "space-between",
|
|
3953
|
-
alignItems: "center",
|
|
3954
|
-
width: "100%",
|
|
3955
|
-
color: "$black"
|
|
3956
|
-
});
|
|
3957
|
-
var Title2 = styled("h3", {
|
|
3958
|
-
fontFamily: "$default",
|
|
3959
|
-
fontWeight: "$bold",
|
|
3960
|
-
fontSize: "$md",
|
|
3961
|
-
color: "$black",
|
|
3962
|
-
margin: "0px",
|
|
3963
|
-
variants: {
|
|
3964
|
-
variant: {
|
|
3965
|
-
gray: {
|
|
3966
|
-
color: "$black"
|
|
3967
|
-
},
|
|
3968
|
-
purple: {
|
|
3969
|
-
color: "$white"
|
|
3970
|
-
}
|
|
3971
|
-
}
|
|
3972
|
-
}
|
|
3973
|
-
});
|
|
3974
|
-
var Navigation = styled("h3", {
|
|
3975
|
-
display: "flex",
|
|
3976
|
-
justifyContent: "center",
|
|
3977
|
-
alignItems: "center",
|
|
3978
|
-
gap: "$1",
|
|
3979
|
-
margin: "0px"
|
|
3980
|
-
});
|
|
3981
|
-
var CarouselContent = styled("div", {
|
|
3982
|
-
width: "100%",
|
|
3983
|
-
overflow: "hidden",
|
|
3984
|
-
position: "relative",
|
|
3985
|
-
variants: {
|
|
3986
|
-
variant: {
|
|
3987
|
-
gray: {
|
|
3988
|
-
color: "$black"
|
|
3989
|
-
},
|
|
3990
|
-
purple: {
|
|
3991
|
-
color: "$white",
|
|
3992
|
-
"& *": {
|
|
3993
|
-
color: "$white"
|
|
3994
|
-
}
|
|
3995
|
-
}
|
|
3996
|
-
}
|
|
3997
|
-
}
|
|
3998
|
-
});
|
|
3999
|
-
var DotsContainer = styled("div", {
|
|
4000
|
-
display: "flex",
|
|
4001
|
-
alignItems: "center",
|
|
4002
|
-
justifyContent: "center",
|
|
4003
|
-
width: "100%"
|
|
4004
|
-
});
|
|
4005
|
-
var Dots2 = styled("div", {
|
|
4006
|
-
display: "flex",
|
|
4007
|
-
gap: "$2",
|
|
4008
|
-
justifyContent: "center",
|
|
4009
|
-
flexWrap: "nowrap"
|
|
4010
|
-
});
|
|
4011
|
-
var DotButton = styled("button", {
|
|
4012
|
-
border: "2px solid $ignite_light",
|
|
4013
|
-
background: "transparent",
|
|
4014
|
-
height: "9px",
|
|
4015
|
-
width: "9px",
|
|
4016
|
-
borderRadius: "$full",
|
|
4017
|
-
padding: 0,
|
|
4018
|
-
cursor: "pointer",
|
|
4019
|
-
transition: "background-color 0.3s ease, border-color 0.3s ease",
|
|
4020
|
-
flexShrink: 0,
|
|
4021
|
-
variants: {
|
|
4022
|
-
active: {
|
|
4023
|
-
true: {
|
|
4024
|
-
backgroundColor: "$ignite_light",
|
|
4025
|
-
borderColor: "$ignite_light"
|
|
4026
|
-
},
|
|
4027
|
-
false: {}
|
|
4028
|
-
}
|
|
4029
|
-
},
|
|
4030
|
-
"&:focus": {
|
|
4031
|
-
outline: "none",
|
|
4032
|
-
borderColor: "$ignite_dark"
|
|
4033
|
-
}
|
|
4034
|
-
});
|
|
4035
|
-
var Ellipsis = styled("span", {
|
|
4036
|
-
color: "$ignite_light",
|
|
4037
|
-
textDecoration: "none",
|
|
4038
|
-
height: "9px",
|
|
4039
|
-
display: "flex",
|
|
4040
|
-
alignItems: "center"
|
|
4041
|
-
});
|
|
4042
|
-
var CarouselItemContainer = styled("div", {
|
|
4043
|
-
width: "100%",
|
|
4044
|
-
color: "inherit"
|
|
4045
|
-
});
|
|
4046
|
-
|
|
4047
|
-
// src/components/Carousel/index.tsx
|
|
4048
|
-
import { jsx as jsx44, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4049
|
-
var SWIPE_THRESHOLD = 50;
|
|
4050
|
-
var Carousel = ({ title, variant, children }) => {
|
|
4051
|
-
const items = Children4.toArray(children);
|
|
4052
|
-
const [activeIndex, setActiveIndex] = useState12(0);
|
|
4053
|
-
const [touchStartX, setTouchStartX] = useState12(null);
|
|
4054
|
-
const [touchEndX, setTouchEndX] = useState12(null);
|
|
4055
|
-
const prev = () => {
|
|
4056
|
-
setActiveIndex((prevIndex) => prevIndex === 0 ? items.length - 1 : prevIndex - 1);
|
|
4057
|
-
};
|
|
4058
|
-
const next = () => {
|
|
4059
|
-
setActiveIndex((prevIndex) => prevIndex === items.length - 1 ? 0 : prevIndex + 1);
|
|
4060
|
-
};
|
|
4061
|
-
const onTouchStart = (e) => {
|
|
4062
|
-
setTouchEndX(null);
|
|
4063
|
-
setTouchStartX(e.targetTouches[0].clientX);
|
|
4064
|
-
};
|
|
4065
|
-
const onTouchMove = (e) => {
|
|
4066
|
-
setTouchEndX(e.targetTouches[0].clientX);
|
|
4067
|
-
};
|
|
4068
|
-
const onTouchEnd = () => {
|
|
4069
|
-
if (touchStartX !== null && touchEndX !== null) {
|
|
4070
|
-
const distance = touchStartX - touchEndX;
|
|
4071
|
-
if (Math.abs(distance) > SWIPE_THRESHOLD) {
|
|
4072
|
-
if (distance > 0) {
|
|
4073
|
-
next();
|
|
4074
|
-
} else {
|
|
4075
|
-
prev();
|
|
4076
|
-
}
|
|
4077
|
-
}
|
|
4078
|
-
}
|
|
4079
|
-
setTouchStartX(null);
|
|
4080
|
-
setTouchEndX(null);
|
|
4081
|
-
};
|
|
4082
|
-
const activeItem = items[activeIndex];
|
|
4083
|
-
const itemTitle = activeItem?.props?.title;
|
|
4084
|
-
return /* @__PURE__ */ jsxs20(
|
|
4085
|
-
CarouselContainer,
|
|
4086
|
-
{
|
|
4087
|
-
role: "region",
|
|
4088
|
-
"aria-roledescription": "carousel",
|
|
4089
|
-
"aria-label": "Carousel Component",
|
|
4090
|
-
children: [
|
|
4091
|
-
/* @__PURE__ */ jsxs20(Wrapper6, { variant, children: [
|
|
4092
|
-
/* @__PURE__ */ jsxs20(CarouselHeader, { children: [
|
|
4093
|
-
/* @__PURE__ */ jsx44(Title2, { variant, children: itemTitle ?? title }),
|
|
4094
|
-
items.length > 0 && /* @__PURE__ */ jsxs20(Navigation, { children: [
|
|
4095
|
-
/* @__PURE__ */ jsx44(
|
|
4096
|
-
Button,
|
|
4097
|
-
{
|
|
4098
|
-
size: "sm",
|
|
4099
|
-
variant: "secondary",
|
|
4100
|
-
"aria-label": "Previous Slide",
|
|
4101
|
-
onClick: prev,
|
|
4102
|
-
tabIndex: 0,
|
|
4103
|
-
children: /* @__PURE__ */ jsx44(Icon, { name: "TriangleLeft", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
4104
|
-
}
|
|
4105
|
-
),
|
|
4106
|
-
/* @__PURE__ */ jsx44(
|
|
4107
|
-
Button,
|
|
4108
|
-
{
|
|
4109
|
-
size: "sm",
|
|
4110
|
-
variant: "secondary",
|
|
4111
|
-
"aria-label": "Next Slide",
|
|
4112
|
-
onClick: next,
|
|
4113
|
-
tabIndex: 0,
|
|
4114
|
-
children: /* @__PURE__ */ jsx44(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
4115
|
-
}
|
|
4116
|
-
)
|
|
4117
|
-
] })
|
|
4118
|
-
] }),
|
|
4119
|
-
/* @__PURE__ */ jsx44(Spacing, { size: "xs" }),
|
|
4120
|
-
/* @__PURE__ */ jsx44(Hr, { variant }),
|
|
4121
|
-
/* @__PURE__ */ jsx44(Spacing, { size: "xs" }),
|
|
4122
|
-
/* @__PURE__ */ jsx44(
|
|
4123
|
-
CarouselContent,
|
|
4124
|
-
{
|
|
4125
|
-
onTouchStart,
|
|
4126
|
-
onTouchMove,
|
|
4127
|
-
onTouchEnd,
|
|
4128
|
-
variant,
|
|
4129
|
-
children: items.map(
|
|
4130
|
-
(child, index) => cloneElement2(child, {
|
|
4131
|
-
"aria-hidden": index !== activeIndex,
|
|
4132
|
-
style: {
|
|
4133
|
-
display: index === activeIndex ? "block" : "none"
|
|
4134
|
-
}
|
|
4135
|
-
})
|
|
4136
|
-
)
|
|
4137
|
-
}
|
|
4138
|
-
)
|
|
4139
|
-
] }),
|
|
4140
|
-
/* @__PURE__ */ jsx44(Spacing, { size: "md" }),
|
|
4141
|
-
items.length > 0 && /* @__PURE__ */ jsx44(DotsContainer, { children: /* @__PURE__ */ jsx44(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: getPaginationItems(items.length, activeIndex).map(
|
|
4142
|
-
(page, index) => typeof page === "number" ? /* @__PURE__ */ jsx44(
|
|
4143
|
-
DotButton,
|
|
4144
|
-
{
|
|
4145
|
-
active: page === activeIndex,
|
|
4146
|
-
"aria-label": `Go to slide ${page + 1}`,
|
|
4147
|
-
"aria-selected": page === activeIndex,
|
|
4148
|
-
role: "tab",
|
|
4149
|
-
onClick: () => setActiveIndex(page),
|
|
4150
|
-
type: "button"
|
|
4151
|
-
},
|
|
4152
|
-
page
|
|
4153
|
-
) : /* @__PURE__ */ jsx44(Ellipsis, { children: "..." }, `ellipsis-${index}`)
|
|
4154
|
-
) }) })
|
|
4155
|
-
]
|
|
4156
|
-
}
|
|
4157
|
-
);
|
|
4158
|
-
};
|
|
4159
|
-
var getPaginationItems = (totalItems, activeIndex) => {
|
|
4160
|
-
if (totalItems <= 10) {
|
|
4161
|
-
return Array.from({ length: totalItems }, (_, i) => i);
|
|
4162
|
-
}
|
|
4163
|
-
if (activeIndex < 7) {
|
|
4164
|
-
return [0, 1, 2, 3, 4, 5, 6, "...", totalItems - 1];
|
|
4165
|
-
}
|
|
4166
|
-
if (activeIndex >= totalItems - 5) {
|
|
4167
|
-
return [0, "...", totalItems - 5, totalItems - 4, totalItems - 3, totalItems - 2, totalItems - 1];
|
|
4168
|
-
}
|
|
4169
|
-
return [0, "...", activeIndex - 2, activeIndex - 1, activeIndex, activeIndex + 1, activeIndex + 2, "...", totalItems - 1];
|
|
4170
|
-
};
|
|
4171
|
-
var CarouselItem = ({ children, style, title, ...props }) => /* @__PURE__ */ jsx44(CarouselItemContainer, { ...props, style: { ...style }, children });
|
|
4172
|
-
Carousel.Item = CarouselItem;
|
|
4173
|
-
|
|
4174
|
-
// src/components/PasswordInput.tsx
|
|
4175
|
-
import { forwardRef as forwardRef13, useImperativeHandle as useImperativeHandle2, useRef as useRef7, useState as useState13 } from "react";
|
|
4176
|
-
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
4177
|
-
var ToggleButton = styled("button", {
|
|
4178
|
-
all: "unset",
|
|
4179
|
-
cursor: "pointer",
|
|
4180
|
-
display: "flex",
|
|
4181
|
-
alignItems: "center",
|
|
4182
|
-
justifyContent: "center",
|
|
4183
|
-
borderRadius: "$sm",
|
|
4184
|
-
padding: "2px",
|
|
4185
|
-
"&:focus-visible": {
|
|
4186
|
-
outline: "none",
|
|
4187
|
-
boxShadow: "0 0 0 2px $colors$ignite_light",
|
|
4188
|
-
borderRadius: "$sm"
|
|
4189
|
-
}
|
|
4190
|
-
});
|
|
4191
|
-
var PasswordInput = forwardRef13(
|
|
4192
|
-
({ value, onChange, ...props }, ref) => {
|
|
4193
|
-
const [visible, setVisible] = useState13(false);
|
|
4194
|
-
const innerRef = useRef7(null);
|
|
4195
|
-
useImperativeHandle2(ref, () => innerRef.current);
|
|
4196
|
-
const handleToggleVisibility = () => {
|
|
4197
|
-
setVisible((v) => !v);
|
|
4198
|
-
setTimeout(() => {
|
|
4199
|
-
if (innerRef.current) {
|
|
4200
|
-
const length = innerRef.current.value.length;
|
|
4201
|
-
innerRef.current.setSelectionRange(length, length);
|
|
4202
|
-
}
|
|
4203
|
-
}, 0);
|
|
4204
|
-
};
|
|
4205
|
-
return /* @__PURE__ */ jsx45(
|
|
4206
|
-
Input2,
|
|
4207
|
-
{
|
|
4208
|
-
...props,
|
|
4209
|
-
ref: innerRef,
|
|
4210
|
-
type: visible ? "text" : "password",
|
|
4211
|
-
value,
|
|
4212
|
-
onChange,
|
|
4213
|
-
suffix: /* @__PURE__ */ jsx45(
|
|
4214
|
-
ToggleButton,
|
|
4215
|
-
{
|
|
4216
|
-
type: "button",
|
|
4217
|
-
onClick: handleToggleVisibility,
|
|
4218
|
-
onMouseDown: (e) => e.preventDefault(),
|
|
4219
|
-
"aria-label": visible ? "Ocultar senha" : "Mostrar senha",
|
|
4220
|
-
children: visible ? /* @__PURE__ */ jsx45(Icon, { name: "EyeClosed", size: 16, color: "black" }) : /* @__PURE__ */ jsx45(Icon, { name: "EyeOpen", size: 16, color: "black" })
|
|
4221
|
-
}
|
|
4222
|
-
)
|
|
4223
|
-
}
|
|
4224
|
-
);
|
|
4225
|
-
}
|
|
4226
|
-
);
|
|
4227
|
-
PasswordInput.displayName = "PasswordInput";
|
|
4228
|
-
|
|
4229
|
-
// src/components/Accordion/index.tsx
|
|
4230
|
-
import * as RadixAccordion from "@radix-ui/react-accordion";
|
|
4231
|
-
import React6 from "react";
|
|
4232
|
-
|
|
4233
|
-
// src/components/Accordion/styles.ts
|
|
4234
|
-
import * as Accordion from "@radix-ui/react-accordion";
|
|
4235
|
-
var AccordionContainer = styled(Accordion.Root, {
|
|
4236
|
-
borderRadius: "$md",
|
|
4237
|
-
width: "100%",
|
|
4238
|
-
backgroundColor: "$white",
|
|
4239
|
-
boxShadow: "0 1px 2px $colors$gray_mid",
|
|
4240
|
-
border: "2px solid $colors$gray_mid"
|
|
4241
|
-
});
|
|
4242
|
-
var AccordionItem = styled(Accordion.Item, {
|
|
4243
|
-
overflow: "hidden",
|
|
4244
|
-
marginTop: "1px",
|
|
4245
|
-
"&:first-child": {
|
|
4246
|
-
marginTop: 0,
|
|
4247
|
-
borderTopLeftRadius: "$md",
|
|
4248
|
-
borderTopRightRadius: "$md"
|
|
4249
|
-
},
|
|
4250
|
-
"&:last-child": {
|
|
4251
|
-
borderBottomLeftRadius: "$md",
|
|
4252
|
-
borderBottomRightRadius: "$md"
|
|
4253
|
-
}
|
|
4254
|
-
});
|
|
4255
|
-
var AccordionHeader = styled(Accordion.Header, {
|
|
4256
|
-
display: "flex",
|
|
4257
|
-
alignItems: "center",
|
|
4258
|
-
justifyContent: "space-between",
|
|
4259
|
-
padding: "0 $5",
|
|
4260
|
-
gap: "$2"
|
|
4261
|
-
});
|
|
4262
|
-
var AccordionTrigger = styled(Accordion.Trigger, {
|
|
4263
|
-
all: "unset",
|
|
4264
|
-
backgroundColor: "transparent",
|
|
4265
|
-
display: "flex",
|
|
4266
|
-
alignItems: "center",
|
|
4267
|
-
fontFamily: "$default",
|
|
4268
|
-
fontWeight: "$bold",
|
|
4269
|
-
fontSize: "$md",
|
|
4270
|
-
lineHeight: "$regular",
|
|
4271
|
-
textAlign: "left",
|
|
4272
|
-
color: "$black",
|
|
4273
|
-
width: "100%",
|
|
4274
|
-
flexWrap: "wrap",
|
|
4275
|
-
wordBreak: "break-word",
|
|
4276
|
-
whiteSpace: "normal",
|
|
4277
|
-
"&:hover": {
|
|
4278
|
-
cursor: "pointer"
|
|
4279
|
-
},
|
|
4280
|
-
"&:focus": {
|
|
4281
|
-
cursor: "pointer",
|
|
4282
|
-
outline: "none"
|
|
4283
|
-
}
|
|
4284
|
-
});
|
|
4285
|
-
var AccordionChevron = styled(Icon, {
|
|
4286
|
-
color: "$ignite_light",
|
|
4287
|
-
transition: "transform 300ms cubic-bezier(0.87, 0, 0.13, 1)",
|
|
4288
|
-
"[data-state=open] &": {
|
|
4289
|
-
transform: "rotate(180deg)"
|
|
4290
|
-
}
|
|
4291
|
-
});
|
|
4292
|
-
var AccordionContent = styled(Accordion.Content, {
|
|
4293
|
-
overflow: "hidden",
|
|
4294
|
-
fontSize: "$md",
|
|
4295
|
-
color: "$black",
|
|
4296
|
-
borderTop: "1px solid $colors$gray_mid",
|
|
4297
|
-
'&[data-state="open"]': {
|
|
4298
|
-
animation: "slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1)"
|
|
4299
|
-
},
|
|
4300
|
-
'&[data-state="closed"]': {
|
|
4301
|
-
animation: "slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1)"
|
|
4302
|
-
},
|
|
4303
|
-
"> div": {
|
|
4304
|
-
padding: "$5"
|
|
4305
|
-
}
|
|
4306
|
-
});
|
|
4307
|
-
var TriggerContent = styled("div", {
|
|
4308
|
-
display: "flex",
|
|
4309
|
-
alignItems: "center",
|
|
4310
|
-
gap: "$2"
|
|
4311
|
-
});
|
|
4312
|
-
var OptionsButton = styled(Button, {
|
|
4313
|
-
marginRight: "$1"
|
|
4314
|
-
});
|
|
4315
|
-
|
|
4316
|
-
// src/components/Accordion/index.tsx
|
|
4317
|
-
import { jsx as jsx46, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4318
|
-
var Accordion2 = React6.forwardRef(
|
|
4319
|
-
({ title, children, dropdownItems }, ref) => {
|
|
4320
|
-
return /* @__PURE__ */ jsx46(AccordionContainer, { type: "single", collapsible: true, ref, children: /* @__PURE__ */ jsxs21(AccordionItem, { value: "item-1", children: [
|
|
4321
|
-
/* @__PURE__ */ jsxs21(AccordionHeader, { children: [
|
|
4322
|
-
/* @__PURE__ */ jsx46(AccordionTrigger, { children: /* @__PURE__ */ jsx46("span", { children: title }) }),
|
|
4323
|
-
/* @__PURE__ */ jsxs21(TriggerContent, { children: [
|
|
4324
|
-
dropdownItems && dropdownItems,
|
|
4325
|
-
/* @__PURE__ */ jsx46(RadixAccordion.Trigger, { asChild: true, children: /* @__PURE__ */ jsx46(StyledButton, { as: "div", variant: "secondary", size: "sm", children: /* @__PURE__ */ jsx46(AccordionChevron, { name: "TriangleDown", size: 16, "aria-hidden": true }) }) })
|
|
4326
|
-
] })
|
|
4327
|
-
] }),
|
|
4328
|
-
/* @__PURE__ */ jsx46(RadixAccordion.Content, { asChild: true, children: /* @__PURE__ */ jsx46(AccordionContent, { children }) })
|
|
4329
|
-
] }) });
|
|
4330
|
-
}
|
|
4331
|
-
);
|
|
4332
|
-
Accordion2.displayName = "Accordion";
|
|
4333
|
-
export {
|
|
4334
|
-
Accordion2 as Accordion,
|
|
4335
|
-
Avatar2 as Avatar,
|
|
4336
|
-
Box,
|
|
4337
|
-
Button,
|
|
4338
|
-
Calendar2 as Calendar,
|
|
4339
|
-
Carousel,
|
|
4340
|
-
Checkbox2 as Checkbox,
|
|
4341
|
-
Datepicker,
|
|
4342
|
-
Dropdown,
|
|
4343
|
-
DropdownItem,
|
|
4344
|
-
DropdownSeparator,
|
|
4345
|
-
Heading,
|
|
4346
|
-
Hr,
|
|
4347
|
-
Icon,
|
|
4348
|
-
Input2 as Input,
|
|
4349
|
-
LabelledValue,
|
|
4350
|
-
Loader,
|
|
4351
|
-
MaskedInput,
|
|
4352
|
-
Modal,
|
|
4353
|
-
MultiStep,
|
|
4354
|
-
OneTimePassword,
|
|
4355
|
-
Paragraph,
|
|
4356
|
-
PasswordInput,
|
|
4357
|
-
ProgressBar,
|
|
4358
|
-
Radio,
|
|
4359
|
-
Select2 as Select,
|
|
4360
|
-
Spacing,
|
|
4361
|
-
Span5 as Span,
|
|
4362
|
-
StyledHr,
|
|
4363
|
-
Switch2 as Switch,
|
|
4364
|
-
Tabs2 as Tabs,
|
|
4365
|
-
TextArea,
|
|
4366
|
-
TextAreaElement,
|
|
4367
|
-
Toast,
|
|
4368
|
-
Tooltip,
|
|
4369
|
-
config,
|
|
4370
|
-
createTheme,
|
|
4371
|
-
css,
|
|
4372
|
-
getCssText,
|
|
4373
|
-
globalCss,
|
|
4374
|
-
keyframes,
|
|
4375
|
-
styled,
|
|
4376
|
-
theme,
|
|
4377
|
-
toast
|
|
4378
|
-
};
|