@clickpalm/react 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs ADDED
@@ -0,0 +1,3342 @@
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, sans-serif",
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):hover": {
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):hover": {
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):hover": {
295
+ color: "$ignite_dark"
296
+ },
297
+ "&:disabled": {
298
+ opacity: "0.6"
299
+ }
300
+ }
301
+ },
302
+ size: {
303
+ xs: {},
304
+ sm: {
305
+ height: 33,
306
+ padding: "0 $2",
307
+ fontSize: "$md"
308
+ },
309
+ md: {
310
+ height: 53,
311
+ padding: "0 $4",
312
+ fontSize: "$md"
313
+ },
314
+ lg: {
315
+ height: 70,
316
+ padding: "0 $6",
317
+ fontSize: "$2xl"
318
+ }
319
+ },
320
+ full: {
321
+ true: {
322
+ width: "100%"
323
+ }
324
+ },
325
+ round: {
326
+ md: {
327
+ height: 53,
328
+ width: 53,
329
+ padding: "0 $4",
330
+ borderRadius: "50%"
331
+ },
332
+ lg: {
333
+ height: 70,
334
+ width: 70,
335
+ padding: "0 $6",
336
+ borderRadius: "50%"
337
+ },
338
+ xlg: {
339
+ height: 160,
340
+ width: 160,
341
+ padding: "0 $8",
342
+ borderRadius: "50%"
343
+ }
344
+ }
345
+ },
346
+ defaultVariants: {
347
+ variant: "primary",
348
+ size: "md"
349
+ }
350
+ });
351
+ var Button = forwardRef(function Button2({ children, ...props }, ref) {
352
+ return /* @__PURE__ */ jsx2(StyledButton, { ref, ...props, children });
353
+ });
354
+ Button.displayName = "Button";
355
+
356
+ // src/components/Icon/icons.ts
357
+ import {
358
+ TriangleDownIcon as TriangleDown,
359
+ TriangleUpIcon as TriangleUp,
360
+ TriangleLeftIcon as TriangleLeft,
361
+ TriangleRightIcon as TriangleRight,
362
+ EyeClosedIcon as EyeClosed,
363
+ EyeOpenIcon as EyeOpen
364
+ } from "@radix-ui/react-icons";
365
+
366
+ // src/components/Icon/Svgs/Calendar.tsx
367
+ import { jsx as jsx3 } from "react/jsx-runtime";
368
+ var Calendar = (props) => /* @__PURE__ */ jsx3(
369
+ "svg",
370
+ {
371
+ width: "18",
372
+ height: "21",
373
+ viewBox: "0 0 18 21",
374
+ fill: "none",
375
+ xmlns: "http://www.w3.org/2000/svg",
376
+ ...props,
377
+ children: /* @__PURE__ */ jsx3(
378
+ "path",
379
+ {
380
+ 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",
381
+ fill: "currentColor"
382
+ }
383
+ )
384
+ }
385
+ );
386
+
387
+ // src/components/Icon/Svgs/Closed.tsx
388
+ import { jsx as jsx4 } from "react/jsx-runtime";
389
+ var Closed = (props) => {
390
+ return /* @__PURE__ */ jsx4(
391
+ "svg",
392
+ {
393
+ width: "14",
394
+ height: "15",
395
+ viewBox: "0 0 14 15",
396
+ fill: "none",
397
+ xmlns: "http://www.w3.org/2000/svg",
398
+ ...props,
399
+ children: /* @__PURE__ */ jsx4(
400
+ "path",
401
+ {
402
+ 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",
403
+ fill: "currentColor"
404
+ }
405
+ )
406
+ }
407
+ );
408
+ };
409
+
410
+ // src/components/Icon/Svgs/Dots.tsx
411
+ import { jsx as jsx5 } from "react/jsx-runtime";
412
+ var Dots = (props) => {
413
+ return /* @__PURE__ */ jsx5(
414
+ "svg",
415
+ {
416
+ width: "16",
417
+ height: "5",
418
+ viewBox: "0 0 16 5",
419
+ fill: "none",
420
+ xmlns: "http://www.w3.org/2000/svg",
421
+ ...props,
422
+ children: /* @__PURE__ */ jsx5(
423
+ "path",
424
+ {
425
+ 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",
426
+ fill: "currentColor"
427
+ }
428
+ )
429
+ }
430
+ );
431
+ };
432
+
433
+ // src/components/Icon/Svgs/Filter.tsx
434
+ import { jsx as jsx6 } from "react/jsx-runtime";
435
+ var Filter = (props) => {
436
+ return /* @__PURE__ */ jsx6(
437
+ "svg",
438
+ {
439
+ xmlns: "http://www.w3.org/2000/svg",
440
+ width: "32",
441
+ height: "32",
442
+ fill: "currentColor",
443
+ viewBox: "0 0 256 256",
444
+ ...props,
445
+ 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" })
446
+ }
447
+ );
448
+ };
449
+
450
+ // src/components/Icon/Svgs/Hamburger.tsx
451
+ import { jsx as jsx7 } from "react/jsx-runtime";
452
+ var Hamburger = (props) => {
453
+ return /* @__PURE__ */ jsx7(
454
+ "svg",
455
+ {
456
+ xmlns: "http://www.w3.org/2000/svg",
457
+ width: "32",
458
+ height: "32",
459
+ fill: "currentColor",
460
+ viewBox: "0 0 256 256",
461
+ ...props,
462
+ 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" })
463
+ }
464
+ );
465
+ };
466
+
467
+ // src/components/Icon/Svgs/Pencil.tsx
468
+ import { jsx as jsx8 } from "react/jsx-runtime";
469
+ var Pencil = (props) => {
470
+ return /* @__PURE__ */ jsx8(
471
+ "svg",
472
+ {
473
+ width: "18",
474
+ height: "19",
475
+ viewBox: "0 0 18 19",
476
+ fill: "none",
477
+ xmlns: "http://www.w3.org/2000/svg",
478
+ ...props,
479
+ children: /* @__PURE__ */ jsx8(
480
+ "path",
481
+ {
482
+ 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",
483
+ fill: "currentColor"
484
+ }
485
+ )
486
+ }
487
+ );
488
+ };
489
+
490
+ // src/components/Icon/Svgs/Photo.tsx
491
+ import { jsx as jsx9 } from "react/jsx-runtime";
492
+ var Photo = (props) => {
493
+ return /* @__PURE__ */ jsx9(
494
+ "svg",
495
+ {
496
+ width: "18",
497
+ height: "18",
498
+ viewBox: "0 0 18 18",
499
+ fill: "none",
500
+ xmlns: "http://www.w3.org/2000/svg",
501
+ ...props,
502
+ children: /* @__PURE__ */ jsx9(
503
+ "path",
504
+ {
505
+ 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",
506
+ fill: "currentColor"
507
+ }
508
+ )
509
+ }
510
+ );
511
+ };
512
+
513
+ // src/components/Icon/Svgs/Plus.tsx
514
+ import { jsx as jsx10 } from "react/jsx-runtime";
515
+ var Plus = (props) => {
516
+ return /* @__PURE__ */ jsx10(
517
+ "svg",
518
+ {
519
+ width: "20",
520
+ height: "20",
521
+ viewBox: "0 0 20 20",
522
+ fill: "none",
523
+ xmlns: "http://www.w3.org/2000/svg",
524
+ ...props,
525
+ children: /* @__PURE__ */ jsx10(
526
+ "path",
527
+ {
528
+ d: "M8.58301 11.4167H0.0830078V8.58334H8.58301V0.0833435H11.4163V8.58334H19.9163V11.4167H11.4163V19.9167H8.58301V11.4167Z",
529
+ fill: "currentColor"
530
+ }
531
+ )
532
+ }
533
+ );
534
+ };
535
+
536
+ // src/components/Icon/Svgs/Search.tsx
537
+ import { jsx as jsx11 } from "react/jsx-runtime";
538
+ var Search = (props) => {
539
+ return /* @__PURE__ */ jsx11(
540
+ "svg",
541
+ {
542
+ width: "18",
543
+ height: "18",
544
+ viewBox: "0 0 18 18",
545
+ fill: "none",
546
+ xmlns: "http://www.w3.org/2000/svg",
547
+ ...props,
548
+ children: /* @__PURE__ */ jsx11(
549
+ "path",
550
+ {
551
+ 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",
552
+ fill: "currentColor"
553
+ }
554
+ )
555
+ }
556
+ );
557
+ };
558
+
559
+ // src/components/Icon/Svgs/ChevronLeft.tsx
560
+ import { jsx as jsx12 } from "react/jsx-runtime";
561
+ var ChevronLeft = (props) => {
562
+ return /* @__PURE__ */ jsx12(
563
+ "svg",
564
+ {
565
+ width: "8",
566
+ height: "12",
567
+ viewBox: "0 0 8 12",
568
+ fill: "none",
569
+ xmlns: "http://www.w3.org/2000/svg",
570
+ ...props,
571
+ children: /* @__PURE__ */ jsx12(
572
+ "path",
573
+ {
574
+ d: "M6 12L0 6L6 0L7.4 1.4L2.8 6L7.4 10.6L6 12Z",
575
+ fill: "currentColor"
576
+ }
577
+ )
578
+ }
579
+ );
580
+ };
581
+
582
+ // src/components/Icon/Svgs/ChevronRight.tsx
583
+ import { jsx as jsx13 } from "react/jsx-runtime";
584
+ var ChevronRight = (props) => {
585
+ return /* @__PURE__ */ jsx13(
586
+ "svg",
587
+ {
588
+ width: "8",
589
+ height: "12",
590
+ viewBox: "0 0 8 12",
591
+ fill: "none",
592
+ xmlns: "http://www.w3.org/2000/svg",
593
+ ...props,
594
+ children: /* @__PURE__ */ jsx13(
595
+ "path",
596
+ {
597
+ d: "M4.6 6L0 1.4L1.4 0L7.4 6L1.4 12L0 10.6L4.6 6Z",
598
+ fill: "currentColor"
599
+ }
600
+ )
601
+ }
602
+ );
603
+ };
604
+
605
+ // src/components/Icon/Svgs/Check.tsx
606
+ import { jsx as jsx14 } from "react/jsx-runtime";
607
+ var Check = (props) => {
608
+ return /* @__PURE__ */ jsx14(
609
+ "svg",
610
+ {
611
+ xmlns: "http://www.w3.org/2000/svg",
612
+ width: "18",
613
+ height: "13",
614
+ viewBox: "0 0 18 13",
615
+ fill: "none",
616
+ ...props,
617
+ children: /* @__PURE__ */ jsx14(
618
+ "path",
619
+ {
620
+ d: "M6.55001 13L0.850006 7.3L2.27501 5.875L6.55001 10.15L15.725 0.975L17.15 2.4L6.55001 13Z",
621
+ fill: "currentColor"
622
+ }
623
+ )
624
+ }
625
+ );
626
+ };
627
+
628
+ // src/components/Icon/icons.ts
629
+ var iconMap = {
630
+ TriangleDown,
631
+ TriangleUp,
632
+ TriangleLeft,
633
+ TriangleRight,
634
+ EyeClosed,
635
+ EyeOpen,
636
+ Calendar,
637
+ Closed,
638
+ Dots,
639
+ Filter,
640
+ Hamburger,
641
+ Pencil,
642
+ Photo,
643
+ Plus,
644
+ Search,
645
+ ChevronLeft,
646
+ ChevronRight,
647
+ Check
648
+ };
649
+
650
+ // src/components/Icon/index.tsx
651
+ import { useMemo } from "react";
652
+ import { jsx as jsx15 } from "react/jsx-runtime";
653
+ var colorMap = {
654
+ black: "#000000",
655
+ green: "#78CB63",
656
+ white: "#ffffff"
657
+ };
658
+ function Icon({ name, size = 24, color = "black", ...rest }) {
659
+ const IconComponent = iconMap[name];
660
+ if (!IconComponent) {
661
+ console.warn(`Icon "${name}" not found in iconMap`);
662
+ return null;
663
+ }
664
+ const fillColor = useMemo(() => colorMap[color], [color]);
665
+ return /* @__PURE__ */ jsx15(
666
+ IconComponent,
667
+ {
668
+ width: size,
669
+ height: size,
670
+ color: fillColor,
671
+ "aria-hidden": true,
672
+ ...rest
673
+ }
674
+ );
675
+ }
676
+ Icon.displayName = "Icon";
677
+
678
+ // src/components/Calendar/styles.ts
679
+ var calendarStyles = globalCss({
680
+ ".calendar-root": {
681
+ "--rdp-accent-color": theme.colors.clickpalm_light,
682
+ "--rdp-accent-background-color": theme.colors.clickpalm_light,
683
+ "--rdp-day-height": "45px",
684
+ "--rdp-day-width": "45px",
685
+ "--rdp-day_button-border-radius": theme.radii.md.value,
686
+ "--rdp-day_button-border": "2px solid transparent",
687
+ "--rdp-day_button-height": "40px",
688
+ "--rdp-day_button-width": "40px",
689
+ "--rdp-selected-border": "2px solid var(--rdp-accent-color)",
690
+ "--rdp-disabled-opacity": "0.5",
691
+ "--rdp-outside-opacity": "1",
692
+ "--rdp-today-color": theme.colors.clickpalm_light,
693
+ "--rdp-dropdown-gap": "0.5rem",
694
+ "--rdp-months-gap": "2rem",
695
+ "--rdp-nav_button-disabled-opacity": "0.5",
696
+ "--rdp-nav_button-height": "36px",
697
+ "--rdp-nav_button-width": "36px",
698
+ "--rdp-nav-height": "44px",
699
+ "--rdp-range_middle-background-color": "var(--rdp-accent-background-color)",
700
+ "--rdp-range_middle-color": "inherit",
701
+ "--rdp-range_start-color": "white",
702
+ "--rdp-range_start-background": "linear-gradient(var(--rdp-gradient-direction), transparent 50%, var(--rdp-range_middle-background-color) 50%)",
703
+ "--rdp-range_start-date-background-color": "var(--rdp-accent-color)",
704
+ "--rdp-range_end-background": "linear-gradient(var(--rdp-gradient-direction), var(--rdp-range_middle-background-color) 50%, transparent 50%)",
705
+ "--rdp-range_end-color": "white",
706
+ "--rdp-range_end-date-background-color": "var(--rdp-accent-color)",
707
+ "--rdp-weekday-opacity": "1",
708
+ "--rdp-weekday-padding": "0.5rem 0",
709
+ "--rdp-weekday-text-align": "center",
710
+ "--rdp-gradient-direction": "90deg",
711
+ "--rdp-animation_duration": "0.3s",
712
+ "--rdp-animation_timing": "cubic-bezier(0.4, 0, 0.2, 1)",
713
+ padding: theme.space[3],
714
+ border: `1px solid ${theme.colors.gray_light}`,
715
+ borderRadius: theme.radii.md.value,
716
+ maxWidth: "329px",
717
+ paddingLeft: "15px"
718
+ },
719
+ '.calendar-root[dir="rtl"]': {
720
+ "--rdp-gradient-direction": "-90deg"
721
+ },
722
+ '.calendar-root[data-broadcast-calendar="true"]': {
723
+ "--rdp-outside-opacity": "unset"
724
+ },
725
+ '.calendar-root[dir="rtl"] .rdp-nav .rdp-chevron': {
726
+ transform: "rotate(180deg)",
727
+ transformOrigin: "50%"
728
+ },
729
+ '.calendar-root[data-nav-layout="around"] .rdp-month': {
730
+ position: "relative"
731
+ },
732
+ '.calendar-root[data-nav-layout="after"] .rdp-month': {
733
+ position: "relative"
734
+ },
735
+ '.calendar-root[data-nav-layout="around"] .calendar-month_caption': {
736
+ justifyContent: "center",
737
+ marginInlineStart: "var(--rdp-nav_button-width)",
738
+ marginInlineEnd: "var(--rdp-nav_button-width)",
739
+ position: "relative"
740
+ },
741
+ '.calendar-root[data-nav-layout="around"] .rdp-button_previous': {
742
+ position: "absolute",
743
+ insetInlineStart: 0,
744
+ top: 0,
745
+ height: "var(--rdp-nav-height)",
746
+ display: "inline-flex"
747
+ },
748
+ '.calendar-root[data-nav-layout="around"] .rdp-button_next': {
749
+ position: "absolute",
750
+ insetInlineEnd: 0,
751
+ top: 0,
752
+ height: "var(--rdp-nav-height)",
753
+ display: "inline-flex",
754
+ justifyContent: "center"
755
+ },
756
+ '.calendar-root[dir="rtl"] .rdp-weeks_after_enter': {
757
+ animation: "rdp-slide_in_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards"
758
+ },
759
+ '.calendar-root[dir="rtl"] .rdp-weeks_before_exit': {
760
+ animation: "rdp-slide_out_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards"
761
+ },
762
+ '.calendar-root[dir="rtl"] .rdp-weeks_before_enter': {
763
+ animation: "rdp-slide_in_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards"
764
+ },
765
+ '.calendar-root[dir="rtl"] .rdp-weeks_after_exit': {
766
+ animation: "rdp-slide_out_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards"
767
+ },
768
+ ".calendar-month_caption": {
769
+ paddingLeft: "2px",
770
+ display: "flex",
771
+ alignItems: "center",
772
+ height: "var(--rdp-nav-height)",
773
+ fontWeight: "$bold",
774
+ fontSize: "$lg"
775
+ },
776
+ ".calendar-caption_label": {
777
+ paddingLeft: "$3",
778
+ zIndex: 1,
779
+ position: "relative",
780
+ display: "flex",
781
+ alignItems: "center",
782
+ whiteSpace: "nowrap"
783
+ },
784
+ ".calendar-root-collapsed": {
785
+ minWidth: "329px",
786
+ position: "relative"
787
+ },
788
+ ".calendar-root-collapsed .rdp-weekdays": {
789
+ display: "none"
790
+ },
791
+ ".calendar-root-collapsed .rdp-day": {
792
+ display: "none"
793
+ },
794
+ ".calendar-root-collapsed .rdp-months": {
795
+ minHeight: "var(--rdp-nav-height)",
796
+ position: "relative",
797
+ display: "flex",
798
+ flexWrap: "wrap",
799
+ gap: "var(--rdp-months-gap)",
800
+ maxWidth: "100%"
801
+ },
802
+ ".calendar-root-collapsed .rdp-nav": {
803
+ position: "absolute",
804
+ top: 0,
805
+ right: 0,
806
+ display: "flex",
807
+ alignItems: "center",
808
+ height: "var(--rdp-nav-height)"
809
+ },
810
+ ".rdp-dropdown:focus-visible ~ .calendar-caption_label": {
811
+ outline: "5px auto Highlight",
812
+ WebkitOutline: "5px auto -webkit-focus-ring-color"
813
+ },
814
+ ".rdp-nav": {
815
+ gap: "$1",
816
+ paddingRight: "6px"
817
+ },
818
+ ".rdp-weekday": {
819
+ fontFamily: theme.fonts.default,
820
+ fontWeight: theme.fontWeights.bold,
821
+ paddingRight: "6px"
822
+ },
823
+ ".rdp-day_button": {
824
+ background: theme.colors.gray_background,
825
+ color: theme.colors.black,
826
+ fontFamily: theme.fonts.default,
827
+ fontWeight: theme.fontWeights.bold,
828
+ fontSize: theme.fontSizes.md,
829
+ "&:hover": {
830
+ border: `2px solid ${theme.colors.clickpalm_light}`
831
+ },
832
+ "&:focus": {
833
+ border: `2px solid ${theme.colors.clickpalm_light}`,
834
+ outline: "none"
835
+ }
836
+ },
837
+ ".rdp-outside .rdp-day_button": {
838
+ fontFamily: theme.fonts.default,
839
+ background: theme.colors.gray_mid,
840
+ color: theme.colors.black
841
+ },
842
+ ".rdp-selected .rdp-day_button": {
843
+ background: theme.colors.clickpalm_light,
844
+ color: theme.colors.white
845
+ }
846
+ });
847
+ var StyledButton2 = styled("div", {
848
+ display: "flex",
849
+ alignItems: "center",
850
+ transition: "transform 0.4s ease",
851
+ variants: {
852
+ isOpen: {
853
+ true: {
854
+ transform: "rotate(180deg)"
855
+ },
856
+ false: {
857
+ transform: "rotate(0deg)"
858
+ }
859
+ }
860
+ }
861
+ });
862
+ var StyledLabel = styled("label", {
863
+ color: "$black",
864
+ fontFamily: "$default",
865
+ fontSize: "$md",
866
+ fontWeight: "$bold",
867
+ display: "flex",
868
+ marginBottom: "$6"
869
+ });
870
+
871
+ // src/components/Calendar/index.tsx
872
+ import { jsx as jsx16, jsxs as jsxs2 } from "react/jsx-runtime";
873
+ calendarStyles();
874
+ var Calendar2 = ({ label, onChange }) => {
875
+ const [selected, setSelected] = useState(void 0);
876
+ const [month, setMonth] = useState(/* @__PURE__ */ new Date());
877
+ const [open, setOpen] = useState(true);
878
+ const handleDaySelect = (date) => {
879
+ setSelected(date);
880
+ if (date) {
881
+ const formatted = format(date, "dd/MM/yyyy");
882
+ onChange(formatted);
883
+ }
884
+ };
885
+ useEffect(() => {
886
+ if (selected) {
887
+ setMonth(selected);
888
+ }
889
+ }, [selected]);
890
+ return /* @__PURE__ */ jsxs2("div", { children: [
891
+ /* @__PURE__ */ jsx16(StyledLabel, { children: label }),
892
+ /* @__PURE__ */ jsx16(
893
+ DayPicker,
894
+ {
895
+ className: !open ? "calendar-root-collapsed" : "",
896
+ mode: "single",
897
+ selected,
898
+ onSelect: handleDaySelect,
899
+ month,
900
+ onMonthChange: setMonth,
901
+ locale: ptBR,
902
+ showOutsideDays: true,
903
+ classNames: {
904
+ root: "calendar-root",
905
+ month_caption: "calendar-month_caption",
906
+ caption_label: "calendar-caption_label"
907
+ },
908
+ formatters: {
909
+ formatCaption: (month2, options) => {
910
+ const mes = format(month2, "MMMM", options).replace(/^./, (c) => c.toUpperCase());
911
+ const ano = format(month2, "yyyy", options);
912
+ return `${mes} de ${ano}`;
913
+ },
914
+ formatWeekdayName: (date, options) => {
915
+ const dia = format(date, "EEEEEE", options);
916
+ return dia.charAt(0).toUpperCase() + dia.slice(1);
917
+ }
918
+ },
919
+ components: {
920
+ MonthCaption: ({ calendarMonth, displayIndex, ...safeprops }) => {
921
+ const displayMonth = calendarMonth.date;
922
+ return /* @__PURE__ */ jsxs2("div", { ...safeprops, children: [
923
+ /* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsx16(
924
+ Button,
925
+ {
926
+ variant: "secondary",
927
+ size: "sm",
928
+ onClick: () => setOpen(!open),
929
+ children: /* @__PURE__ */ jsx16(StyledButton2, { isOpen: open, children: /* @__PURE__ */ jsx16(Icon, { name: "TriangleUp", size: 16 }) })
930
+ }
931
+ ) }),
932
+ /* @__PURE__ */ jsx16("div", { className: "calendar-month_caption", children: /* @__PURE__ */ jsx16("div", { className: "calendar-caption_label", role: "heading", "aria-level": 2, children: format(displayMonth, "MMMM 'de' yyyy", { locale: ptBR }).replace(/^./, (c) => c.toUpperCase()) }) })
933
+ ] });
934
+ },
935
+ PreviousMonthButton: (props) => /* @__PURE__ */ jsx16(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ jsx16(Icon, { name: "TriangleLeft", size: 16 }) }),
936
+ NextMonthButton: (props) => /* @__PURE__ */ jsx16(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ jsx16(Icon, { name: "TriangleRight", size: 16 }) })
937
+ }
938
+ }
939
+ )
940
+ ] });
941
+ };
942
+
943
+ // src/components/Checkbox/styles.ts
944
+ import * as Checkbox from "@radix-ui/react-checkbox";
945
+ var StyledWrapper = styled("div", {
946
+ display: "flex",
947
+ alignSelf: "flex-start",
948
+ alignItems: "center",
949
+ lineHeight: "150%",
950
+ variants: {
951
+ hasError: {
952
+ true: {
953
+ marginBottom: "0px",
954
+ "&:focus": {
955
+ border: "2px solid $danger_dark"
956
+ }
957
+ },
958
+ false: {
959
+ marginBottom: "$6"
960
+ }
961
+ }
962
+ }
963
+ });
964
+ var CheckboxContainer = styled(Checkbox.Root, {
965
+ all: "unset",
966
+ width: "$6",
967
+ height: "$6",
968
+ backgroundColor: "$white",
969
+ borderRadius: "$md",
970
+ lineHeight: 0,
971
+ cursor: "pointer",
972
+ overflow: "hidden",
973
+ boxSizing: "border-box",
974
+ display: "flex",
975
+ justifyContent: "center",
976
+ alignItems: "center",
977
+ borderWidth: "3px",
978
+ borderStyle: "solid",
979
+ borderColor: "$gray_mid",
980
+ '&[data-state="checked"]': {
981
+ outline: "none",
982
+ backgroundColor: "$clickpalm_dark",
983
+ borderColor: "$clickpalm_dark"
984
+ },
985
+ "&:focus": {
986
+ outline: "none",
987
+ border: "2px solid $clickpalm_light"
988
+ },
989
+ "&:disabled": {
990
+ opacity: 0.5,
991
+ cursor: "not-allowed"
992
+ },
993
+ variants: {
994
+ hasError: {
995
+ true: {
996
+ borderColor: "$danger_dark",
997
+ marginBottom: "0px",
998
+ "&:focus, &:hover": {
999
+ outline: "none",
1000
+ border: "4px solid $danger_dark"
1001
+ },
1002
+ '&[data-state="checked"]': {
1003
+ outline: "none",
1004
+ backgroundColor: "$danger_dark",
1005
+ borderColor: "$danger_dark"
1006
+ }
1007
+ }
1008
+ }
1009
+ }
1010
+ });
1011
+ var slideIn = keyframes({
1012
+ from: {
1013
+ transform: "translateY(-100%)"
1014
+ },
1015
+ to: {
1016
+ transform: "translateY(0)"
1017
+ }
1018
+ });
1019
+ var slideOut = keyframes({
1020
+ from: {
1021
+ transform: "translateY(0)"
1022
+ },
1023
+ to: {
1024
+ transform: "translateY(-100%)"
1025
+ }
1026
+ });
1027
+ var CheckboxIndicator = styled(Checkbox.Indicator, {
1028
+ color: "$white",
1029
+ width: "$4",
1030
+ height: "$4",
1031
+ '&[data-state="checked"]': {
1032
+ animation: `${slideIn} 200ms ease-out`
1033
+ },
1034
+ '&[data-state="unchecked"]': {
1035
+ animation: `${slideOut} 200ms ease-out`
1036
+ }
1037
+ });
1038
+ var CheckboxLabel = styled("label", {
1039
+ display: "flex",
1040
+ paddingLeft: "$3",
1041
+ fontSize: "$md",
1042
+ lineHeight: "$base"
1043
+ });
1044
+ var Span = styled("span", {
1045
+ fontFamily: "$default",
1046
+ fontWeight: "$regular",
1047
+ fontSize: "$sm",
1048
+ color: "$danger_dark",
1049
+ alignSelf: "flex-start",
1050
+ paddingLeft: "1px",
1051
+ marginTop: "2px",
1052
+ marginBottom: "$6"
1053
+ });
1054
+
1055
+ // src/components/Checkbox/index.tsx
1056
+ import { jsx as jsx17, jsxs as jsxs3 } from "react/jsx-runtime";
1057
+ function Checkbox2({ label, checked, onCheckedChange, errorMessage, ...rest }) {
1058
+ return /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
1059
+ /* @__PURE__ */ jsxs3(StyledWrapper, { hasError: !!errorMessage, children: [
1060
+ /* @__PURE__ */ jsx17(
1061
+ CheckboxContainer,
1062
+ {
1063
+ checked,
1064
+ onCheckedChange,
1065
+ hasError: !!errorMessage,
1066
+ ...rest,
1067
+ children: /* @__PURE__ */ jsx17(CheckboxIndicator, { asChild: true, children: /* @__PURE__ */ jsx17(Icon, { name: "Check", size: 16 }) })
1068
+ }
1069
+ ),
1070
+ /* @__PURE__ */ jsx17(CheckboxLabel, { children: label })
1071
+ ] }),
1072
+ errorMessage && /* @__PURE__ */ jsx17(Span, { children: errorMessage })
1073
+ ] });
1074
+ }
1075
+ Checkbox2.displayName = "Checkbox";
1076
+
1077
+ // src/components/Datepicker/index.tsx
1078
+ import { format as format2 } from "date-fns";
1079
+ import { ptBR as ptBR2 } from "date-fns/locale";
1080
+ import { useEffect as useEffect2, useRef as useRef3, useState as useState2 } from "react";
1081
+ import { DayPicker as DayPicker2 } from "react-day-picker";
1082
+ import "react-day-picker/dist/style.css";
1083
+
1084
+ // src/components/Input/index.tsx
1085
+ import React, { forwardRef as forwardRef2, useRef as useRef2 } from "react";
1086
+
1087
+ // src/components/Input/styles.ts
1088
+ var StyledWrapper2 = styled("div", {
1089
+ display: "flex",
1090
+ flexDirection: "column"
1091
+ });
1092
+ var Label = styled("label", {
1093
+ fontSize: "$md",
1094
+ fontWeight: "$regular",
1095
+ alignSelf: "flex-start",
1096
+ marginBottom: "$2",
1097
+ paddingLeft: "1px",
1098
+ color: "$black"
1099
+ });
1100
+ var TextInputContainer = styled("div", {
1101
+ backgroundColor: "$white",
1102
+ borderRadius: "$md",
1103
+ boxSizing: "border-box",
1104
+ border: "1px solid $gray_mid",
1105
+ display: "flex",
1106
+ alignItems: "center",
1107
+ padding: "$4 $4",
1108
+ marginBottom: "$6",
1109
+ FontSize: "$md",
1110
+ "&:has(input:focus)": {
1111
+ border: "2px solid $clickpalm_light"
1112
+ },
1113
+ "&:has(input:disabled)": {
1114
+ opacity: 0.5,
1115
+ cursor: "not-allowed"
1116
+ },
1117
+ variants: {
1118
+ hasButtonSuffix: {
1119
+ true: {
1120
+ paddingTop: "10px",
1121
+ paddingBottom: "10px"
1122
+ }
1123
+ },
1124
+ noMargin: {
1125
+ true: { marginBottom: "0px" }
1126
+ },
1127
+ hasError: {
1128
+ true: {
1129
+ border: "1px solid $danger_dark",
1130
+ marginBottom: "0px",
1131
+ "&:has(input:focus)": {
1132
+ border: "2px solid $danger_dark"
1133
+ }
1134
+ }
1135
+ }
1136
+ }
1137
+ });
1138
+ var Prefix = styled("span", {
1139
+ fontFamily: "$default",
1140
+ fontSize: "$sm",
1141
+ color: "$gray_light",
1142
+ fontWeight: "regular"
1143
+ });
1144
+ var Input = styled("input", {
1145
+ fontFamily: "$default",
1146
+ fontSize: "$md",
1147
+ color: "$black",
1148
+ fontWeight: "regular",
1149
+ background: "transparent",
1150
+ border: 0,
1151
+ width: "100%",
1152
+ "&:focus": {
1153
+ outline: 0
1154
+ },
1155
+ "&:disabled": {
1156
+ cursor: "not-allowed",
1157
+ opacity: 0.5
1158
+ },
1159
+ "&::placeholder": {
1160
+ color: "$gray_mid"
1161
+ }
1162
+ });
1163
+ var Suffix = styled("div", {
1164
+ display: "flex",
1165
+ alignItems: "center",
1166
+ justifyContent: "center",
1167
+ marginLeft: "$2",
1168
+ color: "$gray_light"
1169
+ });
1170
+ var Span2 = styled("span", {
1171
+ fontFamily: "$default",
1172
+ fontWeight: "$regular",
1173
+ fontSize: "$sm",
1174
+ color: "$danger_dark",
1175
+ alignSelf: "flex-start",
1176
+ paddingLeft: "1px",
1177
+ marginTop: "2px",
1178
+ marginBottom: "$6"
1179
+ });
1180
+
1181
+ // src/components/Input/index.tsx
1182
+ import { jsx as jsx18, jsxs as jsxs4 } from "react/jsx-runtime";
1183
+ var Input2 = forwardRef2(
1184
+ ({ prefix, suffix, label, errorMessage, noMargin = false, ...props }, forwardedRef) => {
1185
+ const localInputRef = useRef2(null);
1186
+ const inputRef = forwardedRef || localInputRef;
1187
+ const handleContainerClick = () => {
1188
+ inputRef?.current?.focus();
1189
+ };
1190
+ const isButtonElement = (node) => {
1191
+ if (!React.isValidElement(node))
1192
+ return false;
1193
+ const type = node.type;
1194
+ return type?.displayName === "Button";
1195
+ };
1196
+ return /* @__PURE__ */ jsxs4(StyledWrapper2, { children: [
1197
+ label && /* @__PURE__ */ jsx18(Label, { children: label }),
1198
+ /* @__PURE__ */ jsxs4(
1199
+ TextInputContainer,
1200
+ {
1201
+ hasButtonSuffix: isButtonElement(suffix),
1202
+ noMargin,
1203
+ hasError: !!errorMessage,
1204
+ onClick: handleContainerClick,
1205
+ children: [
1206
+ !!prefix && /* @__PURE__ */ jsx18(Prefix, { children: prefix }),
1207
+ /* @__PURE__ */ jsx18(Input, { ref: inputRef, ...props }),
1208
+ !!suffix && /* @__PURE__ */ jsx18(Suffix, { children: suffix })
1209
+ ]
1210
+ }
1211
+ ),
1212
+ errorMessage && /* @__PURE__ */ jsx18(Span2, { children: errorMessage })
1213
+ ] });
1214
+ }
1215
+ );
1216
+ Input2.displayName = "Input";
1217
+
1218
+ // src/components/Datepicker/styles.ts
1219
+ var datePickerStyles = globalCss({
1220
+ ".rdp-root": {
1221
+ "--rdp-accent-color": theme.colors.clickpalm_light,
1222
+ "--rdp-accent-background-color": theme.colors.clickpalm_light,
1223
+ "--rdp-day-height": "45px",
1224
+ "--rdp-day-width": "45px",
1225
+ "--rdp-day_button-border-radius": theme.radii.md.value,
1226
+ "--rdp-day_button-height": "40px",
1227
+ "--rdp-day_button-width": "40px",
1228
+ "--rdp-selected-border": "2px solid var(--rdp-accent-color)",
1229
+ "--rdp-disabled-opacity": "0.5",
1230
+ "--rdp-outside-opacity": "1",
1231
+ "--rdp-today-color": theme.colors.clickpalm_light,
1232
+ "--rdp-nav_button-disabled-opacity": "0.5",
1233
+ "--rdp-nav_button-height": "36px",
1234
+ "--rdp-nav_button-width": "36px",
1235
+ "--rdp-nav-height": "44px",
1236
+ "--rdp-weekday-opacity": "1",
1237
+ "--rdp-weekday-padding": "0.5rem 0",
1238
+ "--rdp-weekday-text-align": "center",
1239
+ "--rdp-animation_duration": "0.3s",
1240
+ "--rdp-animation_timing": "cubic-bezier(0.4, 0, 0.2, 1)",
1241
+ padding: theme.space[3],
1242
+ paddingLeft: "15px"
1243
+ },
1244
+ ".rdp-caption_label": {
1245
+ paddingLeft: theme.space[1]
1246
+ },
1247
+ ".rdp-nav": {
1248
+ gap: theme.space[1]
1249
+ },
1250
+ ".rdp-weekday": {
1251
+ fontFamily: theme.fonts.default,
1252
+ fontWeight: theme.fontWeights.bold
1253
+ },
1254
+ ".rdp-day_button": {
1255
+ background: theme.colors.gray_background,
1256
+ color: theme.colors.black,
1257
+ fontFamily: theme.fonts.default,
1258
+ fontWeight: theme.fontWeights.bold,
1259
+ fontSize: theme.fontSizes.md,
1260
+ "&:hover": {
1261
+ border: `2px solid ${theme.colors.clickpalm_light}`
1262
+ },
1263
+ "&:focus": {
1264
+ border: `2px solid ${theme.colors.clickpalm_light}`,
1265
+ outline: "none"
1266
+ }
1267
+ },
1268
+ ".rdp-outside .rdp-day_button": {
1269
+ fontFamily: theme.fonts.default,
1270
+ background: theme.colors.gray_mid,
1271
+ color: theme.colors.black
1272
+ },
1273
+ ".rdp-selected .rdp-day_button": {
1274
+ background: theme.colors.clickpalm_light,
1275
+ color: theme.colors.white
1276
+ }
1277
+ });
1278
+
1279
+ // src/components/Datepicker/index.tsx
1280
+ import { jsx as jsx19, jsxs as jsxs5 } from "react/jsx-runtime";
1281
+ datePickerStyles();
1282
+ var Datepicker = ({ label, value, onChange }) => {
1283
+ const [selected, setSelected] = useState2(void 0);
1284
+ const [month, setMonth] = useState2(/* @__PURE__ */ new Date());
1285
+ const [open, setOpen] = useState2(false);
1286
+ const inputRef = useRef3(null);
1287
+ const calendarRef = useRef3(null);
1288
+ const handleDaySelect = (date) => {
1289
+ setSelected(date);
1290
+ if (date) {
1291
+ const formatted = format2(date, "dd/MM/yyyy");
1292
+ onChange(formatted);
1293
+ }
1294
+ setOpen(false);
1295
+ };
1296
+ useEffect2(() => {
1297
+ const handleClickOutside = (event) => {
1298
+ if (calendarRef.current && !calendarRef.current.contains(event.target) && inputRef.current && !inputRef.current.contains(event.target)) {
1299
+ setOpen(false);
1300
+ }
1301
+ };
1302
+ document.addEventListener("mousedown", handleClickOutside);
1303
+ return () => document.removeEventListener("mousedown", handleClickOutside);
1304
+ }, []);
1305
+ useEffect2(() => {
1306
+ if (!open && selected) {
1307
+ setMonth(selected);
1308
+ }
1309
+ }, [open, selected]);
1310
+ return /* @__PURE__ */ jsxs5("div", { children: [
1311
+ /* @__PURE__ */ jsx19(
1312
+ Input2,
1313
+ {
1314
+ ref: inputRef,
1315
+ label,
1316
+ placeholder: "dd/mm/aaaa",
1317
+ onFocus: () => setOpen(true),
1318
+ value: value || "",
1319
+ noMargin: true,
1320
+ readOnly: true,
1321
+ suffix: /* @__PURE__ */ jsx19(Icon, { name: "Calendar", size: 16 })
1322
+ }
1323
+ ),
1324
+ open && /* @__PURE__ */ jsx19(
1325
+ "div",
1326
+ {
1327
+ ref: calendarRef,
1328
+ style: {
1329
+ position: "absolute",
1330
+ marginTop: "4px",
1331
+ zIndex: 100,
1332
+ backgroundColor: "#fff",
1333
+ boxShadow: "0 2px 8px rgba(0,0,0,0.15)",
1334
+ borderRadius: "8px"
1335
+ },
1336
+ children: /* @__PURE__ */ jsx19(
1337
+ DayPicker2,
1338
+ {
1339
+ mode: "single",
1340
+ selected,
1341
+ onSelect: handleDaySelect,
1342
+ month,
1343
+ onMonthChange: setMonth,
1344
+ locale: ptBR2,
1345
+ showOutsideDays: true,
1346
+ formatters: {
1347
+ formatCaption: (month2, options) => {
1348
+ const mes = format2(month2, "MMMM", options).replace(/^./, (c) => c.toUpperCase());
1349
+ const ano = format2(month2, "yyyy", options);
1350
+ return `${mes} de ${ano}`;
1351
+ },
1352
+ formatWeekdayName: (date, options) => {
1353
+ const dia = format2(date, "EEEEEE", options);
1354
+ return dia.charAt(0).toUpperCase() + dia.slice(1);
1355
+ }
1356
+ },
1357
+ components: {
1358
+ PreviousMonthButton: (props) => /* @__PURE__ */ jsx19(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ jsx19(Icon, { name: "TriangleLeft", size: 16 }) }),
1359
+ NextMonthButton: (props) => /* @__PURE__ */ jsx19(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ jsx19(Icon, { name: "TriangleRight", size: 16 }) })
1360
+ }
1361
+ }
1362
+ )
1363
+ }
1364
+ )
1365
+ ] });
1366
+ };
1367
+
1368
+ // src/components/Hr.tsx
1369
+ var Hr = styled("hr", {
1370
+ border: "none",
1371
+ height: "1px",
1372
+ width: "100%",
1373
+ variants: {
1374
+ variant: {
1375
+ gray: {
1376
+ backgroundColor: "$gray_mid"
1377
+ },
1378
+ purple: {
1379
+ backgroundColor: "$clickpalm_light"
1380
+ }
1381
+ }
1382
+ }
1383
+ });
1384
+
1385
+ // src/components/Modal/index.tsx
1386
+ import * as Dialog2 from "@radix-ui/react-dialog";
1387
+
1388
+ // src/components/Modal/styles.ts
1389
+ import * as Dialog from "@radix-ui/react-dialog";
1390
+ import { styled as styled2 } from "@stitches/react";
1391
+ var StyledOverlay = styled2(Dialog.Overlay, {
1392
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
1393
+ position: "fixed",
1394
+ inset: 0,
1395
+ zIndex: 999999999
1396
+ });
1397
+ var StyledContent = styled2(Dialog.Content, {
1398
+ position: "fixed",
1399
+ top: "50%",
1400
+ left: "50%",
1401
+ display: "flex",
1402
+ flexDirection: "column",
1403
+ padding: "$4",
1404
+ width: "90%",
1405
+ maxWidth: "500px",
1406
+ backgroundColor: "$white",
1407
+ borderRadius: "$md",
1408
+ boxShadow: "0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)",
1409
+ transform: "translate(-50%, -50%)",
1410
+ zIndex: 1e9,
1411
+ fontFamily: "$default"
1412
+ });
1413
+ var Wrapper = styled2("div", {
1414
+ display: "flex",
1415
+ justifyContent: "space-between",
1416
+ alignItems: "center"
1417
+ });
1418
+ var StyledTitle = styled2(Dialog.Title, {
1419
+ fontSize: "$lg",
1420
+ fontWeight: "bold"
1421
+ });
1422
+ var StyledClose = styled2(Dialog.Close, {
1423
+ all: "unset",
1424
+ position: "absolute",
1425
+ top: "16px",
1426
+ right: "16px",
1427
+ cursor: "pointer",
1428
+ fontSize: "18px",
1429
+ color: "#999",
1430
+ "&:hover": {
1431
+ color: "#333"
1432
+ }
1433
+ });
1434
+ var StyledDivider = styled2("hr", {
1435
+ width: "100%",
1436
+ border: "none",
1437
+ borderTop: "1px solid $gray_mid"
1438
+ });
1439
+
1440
+ // src/components/Modal/index.tsx
1441
+ import { jsx as jsx20, jsxs as jsxs6 } from "react/jsx-runtime";
1442
+ var Modal = ({ open, onOpenChange, title, children }) => {
1443
+ return /* @__PURE__ */ jsx20(Dialog2.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs6(Dialog2.Portal, { children: [
1444
+ /* @__PURE__ */ jsx20(StyledOverlay, {}),
1445
+ /* @__PURE__ */ jsxs6(StyledContent, { children: [
1446
+ /* @__PURE__ */ jsxs6(Wrapper, { children: [
1447
+ /* @__PURE__ */ jsx20(StyledTitle, { children: title }),
1448
+ /* @__PURE__ */ jsx20(StyledClose, { asChild: true, "aria-label": "Close", children: /* @__PURE__ */ jsx20(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ jsx20(Icon, { name: "Closed", size: 8 }) }) })
1449
+ ] }),
1450
+ /* @__PURE__ */ jsx20(StyledDivider, {}),
1451
+ children
1452
+ ] })
1453
+ ] }) });
1454
+ };
1455
+
1456
+ // src/components/ProgressBar/index.tsx
1457
+ import { useEffect as useEffect3, useState as useState3 } from "react";
1458
+
1459
+ // src/components/ProgressBar/styles.ts
1460
+ import * as Progress from "@radix-ui/react-progress";
1461
+ var StyledWrapper3 = styled("div", {
1462
+ display: "flex",
1463
+ flexDirection: "column",
1464
+ gap: "$2",
1465
+ marginBottom: "$6"
1466
+ });
1467
+ var StyledRoot = styled(Progress.Root, {
1468
+ position: "relative",
1469
+ overflow: "hidden",
1470
+ background: "$gray_background",
1471
+ borderRadius: "$md",
1472
+ border: "1px solid $gray_dark",
1473
+ boxSizing: "border-box",
1474
+ transform: "translateZ(0)",
1475
+ width: "100%",
1476
+ height: "10px"
1477
+ });
1478
+ var StyledIndicator = styled(Progress.Indicator, {
1479
+ backgroundColor: "$ignite_light",
1480
+ borderRadius: "$md",
1481
+ height: "100%",
1482
+ transition: "transform 660ms cubic-bezier(0.65, 0, 0.35, 1)",
1483
+ transformOrigin: "left"
1484
+ });
1485
+
1486
+ // src/components/ProgressBar/index.tsx
1487
+ import { jsx as jsx21, jsxs as jsxs7 } from "react/jsx-runtime";
1488
+ var ProgressBar = ({ label, value = 0, max = 100, ...rest }) => {
1489
+ const [progress2, setProgress] = useState3(0);
1490
+ useEffect3(() => {
1491
+ const timer = setTimeout(() => setProgress(value), 500);
1492
+ return () => clearTimeout(timer);
1493
+ }, [value]);
1494
+ const valueLabel = `${Math.round(progress2 / max * 100)}%`;
1495
+ return /* @__PURE__ */ jsxs7(StyledWrapper3, { children: [
1496
+ /* @__PURE__ */ jsx21("label", { style: { fontSize: 16, alignSelf: "flex-start" }, children: label }),
1497
+ /* @__PURE__ */ jsx21(
1498
+ StyledRoot,
1499
+ {
1500
+ value: progress2,
1501
+ "aria-valuetext": valueLabel,
1502
+ ...rest,
1503
+ children: /* @__PURE__ */ jsx21(
1504
+ StyledIndicator,
1505
+ {
1506
+ style: { transform: `translateX(-${100 - progress2}%)` }
1507
+ }
1508
+ )
1509
+ }
1510
+ )
1511
+ ] });
1512
+ };
1513
+ ProgressBar.displayName = "ProgressBar";
1514
+
1515
+ // src/components/Radio/styles.ts
1516
+ import * as RadioGroup from "@radix-ui/react-radio-group";
1517
+ var StyledRoot2 = styled(RadioGroup.Root, {
1518
+ display: "flex",
1519
+ flexDirection: "column",
1520
+ gap: "$2",
1521
+ cursor: "pointer",
1522
+ variants: {
1523
+ hasError: {
1524
+ true: {
1525
+ marginBottom: "0px",
1526
+ "&:focus": {
1527
+ border: "2px solid $danger_dark"
1528
+ }
1529
+ },
1530
+ false: {
1531
+ marginBottom: "$6"
1532
+ }
1533
+ }
1534
+ }
1535
+ });
1536
+ var Wrapper2 = styled("div", {
1537
+ display: "flex",
1538
+ alignItems: "center"
1539
+ });
1540
+ var StyledItem = styled(RadioGroup.Item, {
1541
+ all: "unset",
1542
+ display: "flex",
1543
+ justifyContent: "center",
1544
+ alignItems: "center",
1545
+ width: "$5",
1546
+ height: "$5",
1547
+ borderRadius: "50%",
1548
+ boxSizing: "border-box",
1549
+ backgroundColor: "$clickpalm_dark",
1550
+ '&[data-state="checked"]': {
1551
+ backgroundColor: "$clickpalm_dark"
1552
+ },
1553
+ '&[data-state="unchecked"]': {
1554
+ backgroundColor: "$white",
1555
+ border: "2px solid $gray_dark"
1556
+ },
1557
+ "&:disabled": {
1558
+ opacity: 0.5,
1559
+ cursor: "not-allowed"
1560
+ },
1561
+ "&:focus": {
1562
+ outline: "1px solid $clickpalm_light"
1563
+ },
1564
+ variants: {
1565
+ hasError: {
1566
+ true: {
1567
+ borderColor: "$danger_dark",
1568
+ marginBottom: "0px",
1569
+ "&:focus": {
1570
+ outline: "none",
1571
+ border: "4px solid $danger_dark"
1572
+ },
1573
+ '&[data-state="unchecked"]': {
1574
+ outline: "none",
1575
+ border: "2px solid $danger_dark"
1576
+ },
1577
+ '&[data-state="checked"]': {
1578
+ backgroundColor: "$danger_dark"
1579
+ }
1580
+ }
1581
+ }
1582
+ }
1583
+ });
1584
+ var StyledIndicator2 = styled(RadioGroup.Indicator, {
1585
+ width: "$3",
1586
+ height: "$3",
1587
+ borderRadius: "50%",
1588
+ backgroundColor: "$white"
1589
+ });
1590
+ var ItemLabel = styled("label", {
1591
+ paddingLeft: "$3",
1592
+ color: "$black",
1593
+ cursor: "pointer"
1594
+ });
1595
+ var Span3 = styled("span", {
1596
+ fontFamily: "$default",
1597
+ fontWeight: "$regular",
1598
+ fontSize: "$sm",
1599
+ color: "$danger_dark",
1600
+ alignSelf: "flex-start",
1601
+ paddingLeft: "1px",
1602
+ marginTop: "2px",
1603
+ marginBottom: "$6"
1604
+ });
1605
+
1606
+ // src/components/Radio/index.tsx
1607
+ import { jsx as jsx22, jsxs as jsxs8 } from "react/jsx-runtime";
1608
+ var Radio = ({
1609
+ labels,
1610
+ value,
1611
+ onChange,
1612
+ disabled = false,
1613
+ required = false,
1614
+ errorMessage
1615
+ }) => {
1616
+ return /* @__PURE__ */ jsxs8("form", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
1617
+ /* @__PURE__ */ jsx22(
1618
+ StyledRoot2,
1619
+ {
1620
+ value,
1621
+ onValueChange: onChange,
1622
+ hasError: !!errorMessage,
1623
+ disabled,
1624
+ required,
1625
+ loop: true,
1626
+ children: labels.map((label, index) => /* @__PURE__ */ jsxs8(Wrapper2, { children: [
1627
+ /* @__PURE__ */ jsx22(
1628
+ StyledItem,
1629
+ {
1630
+ value: label,
1631
+ id: `radio-${index}`,
1632
+ "aria-label": label,
1633
+ hasError: !!errorMessage,
1634
+ children: /* @__PURE__ */ jsx22(StyledIndicator2, {})
1635
+ }
1636
+ ),
1637
+ /* @__PURE__ */ jsx22(ItemLabel, { htmlFor: `radio-${index}`, children: label })
1638
+ ] }, label))
1639
+ }
1640
+ ),
1641
+ errorMessage && /* @__PURE__ */ jsx22(Span3, { children: errorMessage })
1642
+ ] });
1643
+ };
1644
+
1645
+ // src/components/Spacing.tsx
1646
+ import { jsx as jsx23 } from "react/jsx-runtime";
1647
+ var spacingMap = {
1648
+ xs: 8,
1649
+ sm: 12,
1650
+ md: 16,
1651
+ lg: 24,
1652
+ xlg: 32,
1653
+ xxlg: 40,
1654
+ xxxlg: 64
1655
+ };
1656
+ var Spacing = ({ size, axis = "vertical" }) => {
1657
+ const style = axis === "vertical" ? { height: spacingMap[size], width: "100%" } : { width: spacingMap[size], height: "100%" };
1658
+ return /* @__PURE__ */ jsx23("div", { style, "data-testid": `spacing-${size}-${axis}` });
1659
+ };
1660
+
1661
+ // src/components/Switch/styles.ts
1662
+ import * as Switch from "@radix-ui/react-switch";
1663
+ var Wrapper3 = styled("div", {
1664
+ all: "unset",
1665
+ display: "flex",
1666
+ alignItems: "center",
1667
+ variants: {
1668
+ hasError: {
1669
+ true: {
1670
+ marginBottom: "0px"
1671
+ },
1672
+ false: {
1673
+ marginBottom: "$6"
1674
+ }
1675
+ }
1676
+ }
1677
+ });
1678
+ var Label2 = styled("label", {
1679
+ paddingLeft: "$3",
1680
+ color: "$black",
1681
+ cursor: "pointer"
1682
+ });
1683
+ var StyledRoot3 = styled(Switch.Root, {
1684
+ border: "none",
1685
+ outline: "none",
1686
+ boxShadow: "none",
1687
+ position: "relative",
1688
+ width: "$10",
1689
+ height: "$5",
1690
+ padding: "0 2px",
1691
+ borderRadius: "30px",
1692
+ boxSizing: "border-box",
1693
+ WebkitTapHighlightColor: "rgba(0, 0, 0, 0)",
1694
+ cursor: "pointer",
1695
+ '&[data-state="checked"]': {
1696
+ backgroundColor: "$clickpalm_dark"
1697
+ },
1698
+ '&[data-state="unchecked"]': {
1699
+ backgroundColor: "$white",
1700
+ border: "2px solid $gray_dark"
1701
+ },
1702
+ "&:disabled": {
1703
+ opacity: 0.5,
1704
+ cursor: "not-allowed"
1705
+ },
1706
+ "&:focus": {
1707
+ outline: "1px solid $clickpalm_light"
1708
+ },
1709
+ variants: {
1710
+ hasError: {
1711
+ true: {
1712
+ border: "2px solid $danger_dark",
1713
+ marginBottom: "0px",
1714
+ "&:focus": {
1715
+ outline: "1px solid $danger_dark"
1716
+ },
1717
+ '&[data-state="unchecked"]': {
1718
+ border: "2px solid $danger_dark"
1719
+ }
1720
+ }
1721
+ }
1722
+ }
1723
+ });
1724
+ var StyledThumb = styled(Switch.Thumb, {
1725
+ position: "absolute",
1726
+ top: "50%",
1727
+ left: "2px",
1728
+ borderRadius: "$full",
1729
+ transition: "transform 100ms",
1730
+ transform: "translateY(-50%)",
1731
+ willChange: "transform",
1732
+ '[data-state="checked"] &': {
1733
+ width: "14px",
1734
+ height: "14px",
1735
+ backgroundColor: "$white",
1736
+ transform: "translate(20px, -50%)"
1737
+ },
1738
+ '&[data-state="unchecked"]': {
1739
+ width: "12px",
1740
+ height: "12px",
1741
+ backgroundColor: "$gray_light"
1742
+ }
1743
+ });
1744
+ var Span4 = styled("span", {
1745
+ fontFamily: "$default",
1746
+ fontWeight: "$regular",
1747
+ fontSize: "$sm",
1748
+ color: "$danger_dark",
1749
+ alignSelf: "flex-start",
1750
+ paddingLeft: "1px",
1751
+ marginTop: "2px",
1752
+ marginBottom: "$6"
1753
+ });
1754
+
1755
+ // src/components/Switch/index.tsx
1756
+ import { jsx as jsx24, jsxs as jsxs9 } from "react/jsx-runtime";
1757
+ var Switch2 = ({
1758
+ label,
1759
+ checked,
1760
+ defaultChecked,
1761
+ onCheckedChange,
1762
+ disabled = false,
1763
+ required = false,
1764
+ id,
1765
+ errorMessage
1766
+ }) => {
1767
+ return /* @__PURE__ */ jsxs9("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
1768
+ /* @__PURE__ */ jsxs9(Wrapper3, { hasError: !!errorMessage, children: [
1769
+ /* @__PURE__ */ jsx24(
1770
+ StyledRoot3,
1771
+ {
1772
+ id,
1773
+ checked,
1774
+ defaultChecked,
1775
+ onCheckedChange,
1776
+ hasError: !!errorMessage,
1777
+ disabled,
1778
+ required,
1779
+ children: /* @__PURE__ */ jsx24(StyledThumb, {})
1780
+ }
1781
+ ),
1782
+ label && /* @__PURE__ */ jsx24(Label2, { htmlFor: id, children: label })
1783
+ ] }),
1784
+ errorMessage && /* @__PURE__ */ jsx24(Span4, { children: errorMessage })
1785
+ ] });
1786
+ };
1787
+
1788
+ // src/components/Tabs/index.tsx
1789
+ import { Children, isValidElement, useLayoutEffect, useRef as useRef4, useState as useState4 } from "react";
1790
+
1791
+ // src/components/Tabs/styles.ts
1792
+ import * as Tabs from "@radix-ui/react-tabs";
1793
+ var TabsRoot = styled(Tabs.Root, {
1794
+ all: "unset",
1795
+ display: "flex",
1796
+ flexDirection: "column",
1797
+ width: "100%",
1798
+ backgroundColor: "$white"
1799
+ });
1800
+ var TabsList = styled(Tabs.List, {
1801
+ all: "unset",
1802
+ border: "none",
1803
+ outline: "none",
1804
+ boxShadow: "none",
1805
+ display: "flex",
1806
+ gap: "$2",
1807
+ overflowX: "auto",
1808
+ overflowY: "hidden",
1809
+ whiteSpace: "nowrap",
1810
+ "::-webkit-scrollbar": { display: "none" },
1811
+ "-ms-overflow-style": "none",
1812
+ "scrollbar-width": "none",
1813
+ variants: {
1814
+ scrollable: {
1815
+ true: {
1816
+ flex: 1
1817
+ },
1818
+ false: {
1819
+ width: "100%",
1820
+ flexShrink: 0,
1821
+ flex: "0 0 auto",
1822
+ justifyContent: "space-around"
1823
+ }
1824
+ }
1825
+ }
1826
+ });
1827
+ var TabsTrigger = styled(Tabs.Trigger, {
1828
+ all: "unset",
1829
+ border: "none",
1830
+ outline: "none",
1831
+ boxShadow: "none",
1832
+ display: "flex",
1833
+ flex: "0 0 auto",
1834
+ alignItems: "center",
1835
+ justifyContent: "center",
1836
+ padding: "0 $2",
1837
+ height: "$11",
1838
+ fontSize: "$md",
1839
+ lineHeight: "$base",
1840
+ whiteSpace: "nowrap",
1841
+ textOverflow: "ellipsis",
1842
+ overflow: "hidden",
1843
+ userSelect: "none",
1844
+ background: "$gray100",
1845
+ backgroundImage: "linear-gradient(to bottom, $clickpalm_mid, $clickpalm_superDark)",
1846
+ WebkitBackgroundClip: "text",
1847
+ WebkitTextFillColor: "transparent",
1848
+ '&[data-state="active"]': {
1849
+ color: "$ignite_light",
1850
+ borderBottom: "3px solid $ignite_light",
1851
+ outline: "none"
1852
+ }
1853
+ });
1854
+ var TabsContent = styled(Tabs.Content, {
1855
+ padding: "$3",
1856
+ backgroundColor: "$white",
1857
+ outline: "none",
1858
+ variants: {
1859
+ colorContent: {
1860
+ gray: { backgroundColor: "$gray_background" },
1861
+ white: { backgroundColor: "$white" }
1862
+ }
1863
+ },
1864
+ defaultVariants: {
1865
+ colorContent: "white"
1866
+ }
1867
+ });
1868
+
1869
+ // src/components/Tabs/index.tsx
1870
+ import { Fragment, jsx as jsx25, jsxs as jsxs10 } from "react/jsx-runtime";
1871
+ var TabsItem = ({ children }) => {
1872
+ return /* @__PURE__ */ jsx25(Fragment, { children });
1873
+ };
1874
+ var Tabs2 = ({ defaultValue, colorContent, children }) => {
1875
+ const items = [];
1876
+ const childrenArray = Children.toArray(children);
1877
+ childrenArray.forEach((child) => {
1878
+ if (isValidElement(child) && child.type === TabsItem) {
1879
+ const { value, label, children: content } = child.props;
1880
+ items.push({ value, label, children: content });
1881
+ }
1882
+ });
1883
+ const listRef = useRef4(null);
1884
+ const rootRef = useRef4(null);
1885
+ const hasOverflowRef = useRef4(false);
1886
+ const [hasOverflow, setHasOverflow] = useState4(false);
1887
+ const checkOverflow = () => {
1888
+ const listEl = listRef.current;
1889
+ const rootEl = rootRef.current;
1890
+ if (listEl && rootEl) {
1891
+ const availableWidth = rootEl.clientWidth;
1892
+ const contentWidth = listEl.scrollWidth;
1893
+ const overflow = contentWidth > availableWidth;
1894
+ if (overflow !== hasOverflow) {
1895
+ hasOverflowRef.current = overflow;
1896
+ setHasOverflow(overflow);
1897
+ }
1898
+ setHasOverflow(overflow);
1899
+ }
1900
+ };
1901
+ useLayoutEffect(() => {
1902
+ checkOverflow();
1903
+ const resizeObserver = new ResizeObserver(checkOverflow);
1904
+ if (listRef.current) {
1905
+ resizeObserver.observe(listRef.current);
1906
+ }
1907
+ return () => {
1908
+ if (listRef.current) {
1909
+ resizeObserver.unobserve(listRef.current);
1910
+ }
1911
+ };
1912
+ }, []);
1913
+ const scroll = (direction) => {
1914
+ if (listRef.current) {
1915
+ const scrollAmount = 120;
1916
+ listRef.current.scrollBy({
1917
+ left: direction === "left" ? -scrollAmount : scrollAmount,
1918
+ behavior: "smooth"
1919
+ });
1920
+ }
1921
+ };
1922
+ return /* @__PURE__ */ jsxs10(
1923
+ TabsRoot,
1924
+ {
1925
+ defaultValue: defaultValue || items[0]?.value,
1926
+ ref: rootRef,
1927
+ children: [
1928
+ /* @__PURE__ */ jsxs10("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1929
+ hasOverflow && /* @__PURE__ */ jsx25(
1930
+ Button,
1931
+ {
1932
+ variant: "secondary",
1933
+ size: "sm",
1934
+ onClick: () => scroll("left"),
1935
+ children: /* @__PURE__ */ jsx25(Icon, { name: "TriangleLeft", size: 64 })
1936
+ }
1937
+ ),
1938
+ /* @__PURE__ */ jsx25(
1939
+ TabsList,
1940
+ {
1941
+ ref: listRef,
1942
+ scrollable: hasOverflow,
1943
+ children: items.map((item) => /* @__PURE__ */ jsx25(
1944
+ TabsTrigger,
1945
+ {
1946
+ value: item.value,
1947
+ style: !hasOverflow ? { flexGrow: 1 } : { flexGrow: "0 0 auto" },
1948
+ children: item.label
1949
+ },
1950
+ `trigger-${item.value}`
1951
+ ))
1952
+ }
1953
+ ),
1954
+ hasOverflow && /* @__PURE__ */ jsx25(
1955
+ Button,
1956
+ {
1957
+ variant: "secondary",
1958
+ size: "sm",
1959
+ onClick: () => scroll("right"),
1960
+ children: /* @__PURE__ */ jsx25(Icon, { name: "TriangleRight", size: 64 })
1961
+ }
1962
+ )
1963
+ ] }),
1964
+ items.map((item) => /* @__PURE__ */ jsx25(
1965
+ TabsContent,
1966
+ {
1967
+ colorContent,
1968
+ value: item.value,
1969
+ children: item.children
1970
+ },
1971
+ `content-${item.value}`
1972
+ ))
1973
+ ]
1974
+ }
1975
+ );
1976
+ };
1977
+ Tabs2.Item = TabsItem;
1978
+
1979
+ // src/components/TextArea.tsx
1980
+ import { jsx as jsx26, jsxs as jsxs11 } from "react/jsx-runtime";
1981
+ var Wrapper4 = styled("div", {
1982
+ display: "flex",
1983
+ flexDirection: "column"
1984
+ });
1985
+ var StyledLabel2 = styled("label", {
1986
+ fontSize: "$md",
1987
+ fontWeight: "$regular",
1988
+ color: "$black",
1989
+ marginBottom: "$2",
1990
+ paddingLeft: "1px",
1991
+ alignSelf: "flex-start"
1992
+ });
1993
+ var TextAreaElement = styled("textarea", {
1994
+ backgroundColor: "$white",
1995
+ padding: "$3 $4",
1996
+ marginBottom: "$6",
1997
+ borderRadius: "$md",
1998
+ boxSizing: "border-box",
1999
+ border: "1px solid $gray_mid",
2000
+ fontFamily: "$default",
2001
+ fontSize: "$sm",
2002
+ color: "$black",
2003
+ fontWeight: "$regular",
2004
+ resize: "none",
2005
+ minHeight: 100,
2006
+ maxHeight: "170px",
2007
+ overflowY: "auto",
2008
+ width: "100%",
2009
+ "&:focus": {
2010
+ outline: 0,
2011
+ border: "2px solid $clickpalm_light"
2012
+ },
2013
+ "&:disabled": {
2014
+ opacity: 0.5,
2015
+ cursor: "not-allowed"
2016
+ },
2017
+ "&::placeholder": {
2018
+ color: "$gray_mid"
2019
+ },
2020
+ "&::-webkit-scrollbar": {
2021
+ width: "6px"
2022
+ },
2023
+ "&::-webkit-scrollbar-track": {
2024
+ background: "transparent",
2025
+ borderRadius: "$md",
2026
+ margin: "$2"
2027
+ },
2028
+ "&::-webkit-scrollbar-thumb": {
2029
+ backgroundColor: "$gray_mid",
2030
+ borderRadius: "$md",
2031
+ border: "2px solid $white"
2032
+ },
2033
+ variants: {
2034
+ hasError: {
2035
+ true: {
2036
+ border: "1px solid $danger_dark",
2037
+ marginBottom: "0px",
2038
+ "&:focus": {
2039
+ border: "2px solid $danger_dark"
2040
+ }
2041
+ }
2042
+ }
2043
+ }
2044
+ });
2045
+ var Span5 = styled("span", {
2046
+ fontFamily: "$default",
2047
+ fontWeight: "$regular",
2048
+ fontSize: "$sm",
2049
+ color: "$danger_dark",
2050
+ alignSelf: "flex-start",
2051
+ paddingLeft: "1px",
2052
+ marginTop: "2px",
2053
+ marginBottom: "$6"
2054
+ });
2055
+ var TextArea = ({ label, id, htmlFor, errorMessage, ...props }) => {
2056
+ const textAreaId = id || htmlFor || `textarea-${crypto.randomUUID()}`;
2057
+ return /* @__PURE__ */ jsxs11(Wrapper4, { children: [
2058
+ label && /* @__PURE__ */ jsx26(StyledLabel2, { htmlFor: textAreaId, children: label }),
2059
+ /* @__PURE__ */ jsx26(TextAreaElement, { id: textAreaId, ...props, hasError: !!errorMessage }),
2060
+ errorMessage && /* @__PURE__ */ jsx26(Span5, { children: errorMessage })
2061
+ ] });
2062
+ };
2063
+ TextArea.displayName = "TextArea";
2064
+
2065
+ // src/components/Tooltip/index.tsx
2066
+ import * as RadixTooltip2 from "@radix-ui/react-tooltip";
2067
+
2068
+ // src/components/Tooltip/styles.ts
2069
+ import * as RadixTooltip from "@radix-ui/react-tooltip";
2070
+ var slideUpAndFade = keyframes({
2071
+ "0%": { opacity: 0, transform: "translateY(2px)" },
2072
+ "100%": { opacity: 1, transform: "translateY(0)" }
2073
+ });
2074
+ var slideDownAndFade = keyframes({
2075
+ "0%": { opacity: 0, transform: "translateY(-2px)" },
2076
+ "100%": { opacity: 1, transform: "translateY(0)" }
2077
+ });
2078
+ var slideLeftAndFade = keyframes({
2079
+ "0%": { opacity: 0, transform: "translateX(2px)" },
2080
+ "100%": { opacity: 1, transform: "translateX(0)" }
2081
+ });
2082
+ var slideRightAndFade = keyframes({
2083
+ "0%": { opacity: 0, transform: "translateX(-2px)" },
2084
+ "100%": { opacity: 1, transform: "translateX(0)" }
2085
+ });
2086
+ var TooltipTrigger = RadixTooltip.Trigger;
2087
+ var TooltipContent = styled(RadixTooltip.Content, {
2088
+ borderRadius: "$sm",
2089
+ border: "2px solid $gray_background",
2090
+ padding: "$2 $4",
2091
+ fontSize: "$sm",
2092
+ lineHeight: "1",
2093
+ color: "$black",
2094
+ backgroundColor: "$white",
2095
+ boxShadow: "0px 4px 10px rgba(0, 0, 0, 0.2)",
2096
+ zIndex: 50,
2097
+ maxWidth: "200px",
2098
+ whiteSpace: "normal",
2099
+ wordBreak: "break-word",
2100
+ textAlign: "left",
2101
+ "@media (prefers-reduced-motion: no-preference)": {
2102
+ animationDuration: "200ms",
2103
+ animationTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
2104
+ willChange: "transform, opacity",
2105
+ '&[data-state="delayed-open"][data-side="top"]': { animationName: slideDownAndFade },
2106
+ '&[data-state="delayed-open"][data-side="right"]': { animationName: slideLeftAndFade },
2107
+ '&[data-state="delayed-open"][data-side="bottom"]': { animationName: slideUpAndFade },
2108
+ '&[data-state="delayed-open"][data-side="left"]': { animationName: slideRightAndFade }
2109
+ }
2110
+ });
2111
+ var TooltipArrow = styled(RadixTooltip.Arrow, {
2112
+ fill: "$gray_background"
2113
+ });
2114
+
2115
+ // src/components/Tooltip/index.tsx
2116
+ import { jsx as jsx27, jsxs as jsxs12 } from "react/jsx-runtime";
2117
+ var Tooltip = ({
2118
+ content,
2119
+ children,
2120
+ side = "top",
2121
+ sideOffset = 5,
2122
+ open,
2123
+ onOpenChange,
2124
+ delayDuration = 100
2125
+ }) => {
2126
+ return /* @__PURE__ */ jsx27(RadixTooltip2.Provider, { children: /* @__PURE__ */ jsxs12(RadixTooltip2.Root, { open, onOpenChange, delayDuration, children: [
2127
+ /* @__PURE__ */ jsx27(TooltipTrigger, { asChild: true, children }),
2128
+ /* @__PURE__ */ jsxs12(TooltipContent, { side, sideOffset, children: [
2129
+ content,
2130
+ /* @__PURE__ */ jsx27(TooltipArrow, {})
2131
+ ] })
2132
+ ] }) });
2133
+ };
2134
+ Tooltip.displayName = "Tooltip";
2135
+
2136
+ // src/components/Box.tsx
2137
+ import { jsx as jsx28 } from "react/jsx-runtime";
2138
+ var StyledBox = styled("div", {
2139
+ padding: "$5",
2140
+ borderRadius: "$md",
2141
+ textAlign: "center",
2142
+ marginBottom: "$6",
2143
+ variants: {
2144
+ variant: {
2145
+ gray: {
2146
+ backgroundColor: "$gray_background",
2147
+ boxShadow: "0 1px 2px $colors$gray_dark"
2148
+ },
2149
+ white: {
2150
+ backgroundColor: "$white"
2151
+ }
2152
+ }
2153
+ },
2154
+ defaultVariants: {
2155
+ variant: "gray"
2156
+ }
2157
+ });
2158
+ var Box = (props) => {
2159
+ return /* @__PURE__ */ jsx28(StyledBox, { ...props });
2160
+ };
2161
+ Box.displayName = "Box";
2162
+
2163
+ // src/components/Text.tsx
2164
+ import { jsx as jsx29 } from "react/jsx-runtime";
2165
+ var StyledText = styled("p", {
2166
+ fontFamily: "$default",
2167
+ lineHeight: "$short",
2168
+ margin: 0,
2169
+ variants: {
2170
+ size: {
2171
+ xxs: { fontSize: "$xxs" },
2172
+ xs: { fontSize: "$xs" },
2173
+ sm: { fontSize: "$sm" },
2174
+ md: { fontSize: "$md" },
2175
+ lg: { fontSize: "$lg" },
2176
+ xl: { fontSize: "$xl" },
2177
+ "2xl": { fontSize: "$2xl" },
2178
+ "4xl": { fontSize: "$4xl" },
2179
+ "5xl": { fontSize: "$5xl" },
2180
+ "6xl": { fontSize: "$6xl" },
2181
+ "7xl": { fontSize: "$7xl" },
2182
+ "8xl": { fontSize: "$8xl" },
2183
+ "9xl": { fontSize: "$9xl" }
2184
+ },
2185
+ wheight: {
2186
+ regular: { fontWeight: "$regular" },
2187
+ medium: { fontWeight: "$medium" },
2188
+ bold: { fontWeight: "$bold" }
2189
+ },
2190
+ lineHeight: {
2191
+ regular: { lineHeight: "$regular" },
2192
+ shorter: { lineHeight: "$shorter" },
2193
+ short: { lineHeight: "$short" },
2194
+ base: { lineHeight: "$base" },
2195
+ tall: { lineHeight: "$tall" }
2196
+ }
2197
+ },
2198
+ defaultVariants: {
2199
+ size: "md",
2200
+ wheight: "regular",
2201
+ lineHeight: "short"
2202
+ }
2203
+ });
2204
+ var Text = (props) => {
2205
+ return /* @__PURE__ */ jsx29(StyledText, { ...props });
2206
+ };
2207
+ Text.displayName = "Text";
2208
+
2209
+ // src/components/Heading.tsx
2210
+ var Heading = styled("h2", {
2211
+ fontFamily: "$default",
2212
+ lineHeight: "$shorter",
2213
+ margin: 0,
2214
+ color: "$black",
2215
+ variants: {
2216
+ size: {
2217
+ sm: { fontSize: "$xl" },
2218
+ md: { fontSize: "$2xl" },
2219
+ lg: { fontSize: "$4xl" },
2220
+ "2xl": { fontSize: "$5xl" },
2221
+ "3xl": { fontSize: "$6xl" },
2222
+ "4xl": { fontSize: "$7xl" },
2223
+ "5xl": { fontSize: "$8xl" },
2224
+ "6xl": { fontSize: "$9xl" }
2225
+ }
2226
+ },
2227
+ defaultVariants: {
2228
+ size: "md"
2229
+ }
2230
+ });
2231
+ Heading.displayName = "Heading";
2232
+
2233
+ // src/components/Select/index.tsx
2234
+ import { TriangleDownIcon, TriangleUpIcon } from "@radix-ui/react-icons";
2235
+ import * as CustomSelect from "@radix-ui/react-select";
2236
+ import { useState as useState5 } from "react";
2237
+
2238
+ // src/components/Select/styles.ts
2239
+ import * as Select from "@radix-ui/react-select";
2240
+ var StyledWrapper4 = styled("div", {
2241
+ display: "flex",
2242
+ flexDirection: "column"
2243
+ });
2244
+ var Label3 = styled("label", {
2245
+ fontSize: "$md",
2246
+ fontWeight: "$regular",
2247
+ alignSelf: "flex-start",
2248
+ marginBottom: "$2",
2249
+ paddingLeft: "1px",
2250
+ color: "$black"
2251
+ });
2252
+ var StyledTrigger = styled(Select.Trigger, {
2253
+ all: "unset",
2254
+ display: "flex",
2255
+ alignItems: "center",
2256
+ justifyContent: "space-between",
2257
+ marginBottom: "$6",
2258
+ padding: "$3 $4",
2259
+ boxSizing: "border-box",
2260
+ borderRadius: "$md",
2261
+ border: "1px solid $gray_mid",
2262
+ fontSize: "$md",
2263
+ backgroundColor: "white",
2264
+ cursor: "pointer",
2265
+ "&[data-placeholder]": {
2266
+ color: "$gray_mid"
2267
+ },
2268
+ "&[data-highlighted], &:focus, &:hover": {
2269
+ outline: "none",
2270
+ border: "2px solid $clickpalm_light"
2271
+ },
2272
+ "&:disabled": {
2273
+ opacity: 0.5,
2274
+ cursor: "not-allowed"
2275
+ },
2276
+ variants: {
2277
+ hasError: {
2278
+ true: {
2279
+ border: "1px solid $danger_dark",
2280
+ marginBottom: "0px",
2281
+ "&[data-highlighted], &:focus, &:hover": {
2282
+ outline: "none",
2283
+ border: "2px solid $danger_dark"
2284
+ }
2285
+ }
2286
+ }
2287
+ }
2288
+ });
2289
+ var StyledContent2 = styled(Select.Content, {
2290
+ overflow: "hidden",
2291
+ backgroundColor: "$gray_background",
2292
+ borderRadius: "$md",
2293
+ boxShadow: "0px 4px 6px rgba(0, 0, 0, 0.1)",
2294
+ zIndex: 10,
2295
+ width: "var(--radix-select-trigger-width)",
2296
+ maxHeight: "var(--radix-select-content-available-height)"
2297
+ });
2298
+ var StyledViewport = styled(Select.Viewport, {
2299
+ padding: "4px"
2300
+ });
2301
+ var StyledItem2 = styled(Select.Item, {
2302
+ position: "relative",
2303
+ fontSize: "$md",
2304
+ padding: "14px 12px",
2305
+ color: "$black",
2306
+ cursor: "pointer",
2307
+ "&[data-highlighted]": {
2308
+ outline: "none",
2309
+ color: "$clickpalm_light"
2310
+ },
2311
+ "&:not(:last-child)::after": {
2312
+ content: '""',
2313
+ position: "absolute",
2314
+ bottom: 0,
2315
+ left: "$3",
2316
+ right: "$3",
2317
+ height: "1px",
2318
+ backgroundColor: "$gray_light"
2319
+ }
2320
+ });
2321
+ var StyledIcon = styled(Select.Icon, {
2322
+ display: "flex",
2323
+ alignItems: "center",
2324
+ color: "$black",
2325
+ transition: "transform 0.4s ease",
2326
+ variants: {
2327
+ open: {
2328
+ true: {
2329
+ transform: "rotate(180deg)"
2330
+ },
2331
+ false: {
2332
+ transform: "rotate(0deg)"
2333
+ }
2334
+ }
2335
+ },
2336
+ svg: {
2337
+ width: 26,
2338
+ height: 26
2339
+ }
2340
+ });
2341
+ var Span6 = styled("span", {
2342
+ fontFamily: "$default",
2343
+ fontWeight: "$regular",
2344
+ fontSize: "$sm",
2345
+ color: "$danger_dark",
2346
+ alignSelf: "flex-start",
2347
+ paddingLeft: "1px",
2348
+ marginTop: "2px",
2349
+ marginBottom: "$6"
2350
+ });
2351
+
2352
+ // src/components/Select/index.tsx
2353
+ import { jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
2354
+ function Select2({
2355
+ value,
2356
+ onValueChange,
2357
+ items,
2358
+ placeholder = "Selecione",
2359
+ label,
2360
+ errorMessage,
2361
+ ...rest
2362
+ }) {
2363
+ const [open, setOpen] = useState5(false);
2364
+ return /* @__PURE__ */ jsxs13(StyledWrapper4, { children: [
2365
+ label && /* @__PURE__ */ jsx30(Label3, { children: label }),
2366
+ /* @__PURE__ */ jsxs13(
2367
+ CustomSelect.Root,
2368
+ {
2369
+ value,
2370
+ onValueChange,
2371
+ onOpenChange: setOpen,
2372
+ ...rest,
2373
+ children: [
2374
+ /* @__PURE__ */ jsxs13(StyledTrigger, { "aria-label": label, hasError: !!errorMessage, children: [
2375
+ /* @__PURE__ */ jsx30(CustomSelect.Value, { placeholder }),
2376
+ /* @__PURE__ */ jsx30(StyledIcon, { open, children: /* @__PURE__ */ jsx30(TriangleDownIcon, {}) })
2377
+ ] }),
2378
+ errorMessage && /* @__PURE__ */ jsx30(Span6, { children: errorMessage }),
2379
+ /* @__PURE__ */ jsx30(CustomSelect.Portal, { children: /* @__PURE__ */ jsxs13(
2380
+ StyledContent2,
2381
+ {
2382
+ side: "bottom",
2383
+ align: "start",
2384
+ position: "popper",
2385
+ children: [
2386
+ /* @__PURE__ */ jsx30(CustomSelect.ScrollUpButton, { children: /* @__PURE__ */ jsx30(TriangleUpIcon, {}) }),
2387
+ /* @__PURE__ */ jsx30(StyledViewport, { children: items.map((item) => /* @__PURE__ */ jsx30(StyledItem2, { value: item.value, children: /* @__PURE__ */ jsx30(CustomSelect.ItemText, { children: item.label }) }, item.value)) }),
2388
+ /* @__PURE__ */ jsx30(CustomSelect.ScrollDownButton, { children: /* @__PURE__ */ jsx30(TriangleDownIcon, {}) })
2389
+ ]
2390
+ }
2391
+ ) })
2392
+ ]
2393
+ }
2394
+ )
2395
+ ] });
2396
+ }
2397
+ Select2.displayName = "Select";
2398
+
2399
+ // src/components/LabelledValue/index.tsx
2400
+ import {
2401
+ Children as Children2,
2402
+ cloneElement,
2403
+ isValidElement as isValidElement2
2404
+ } from "react";
2405
+
2406
+ // src/components/LabelledValue/styles.ts
2407
+ var Container = styled("div", {
2408
+ display: "flex",
2409
+ variants: {
2410
+ position: {
2411
+ vertical: {
2412
+ flexDirection: "column",
2413
+ gap: "$5"
2414
+ },
2415
+ horizontal: {
2416
+ flexDirection: "column",
2417
+ flexWrap: "wrap",
2418
+ gap: "$3"
2419
+ }
2420
+ }
2421
+ }
2422
+ });
2423
+ var ItemWrapper = styled("div", {
2424
+ display: "flex",
2425
+ alignItems: "center",
2426
+ variants: {
2427
+ position: {
2428
+ vertical: {
2429
+ flexDirection: "column",
2430
+ alignItems: "flex-start"
2431
+ },
2432
+ horizontal: {
2433
+ paddingBottom: "$2",
2434
+ flexDirection: "row",
2435
+ alignItems: "center",
2436
+ justifyContent: "space-between",
2437
+ borderBottom: "1px solid $gray_mid"
2438
+ }
2439
+ },
2440
+ withRow: {
2441
+ true: {
2442
+ paddingBottom: "$2",
2443
+ borderBottom: "1px solid $gray_mid"
2444
+ }
2445
+ }
2446
+ }
2447
+ });
2448
+ var Label4 = styled("div", {
2449
+ fontWeight: "$regular",
2450
+ fontSize: "$md",
2451
+ color: "$black",
2452
+ whiteSpace: "nowrap"
2453
+ });
2454
+ var Value2 = styled("div", {
2455
+ fontWeight: "$bold",
2456
+ fontSize: "$md",
2457
+ color: "$black",
2458
+ textAlign: "right",
2459
+ wordBreak: "break-word",
2460
+ maxWidth: "100%",
2461
+ flex: 1
2462
+ });
2463
+
2464
+ // src/components/LabelledValue/index.tsx
2465
+ import { jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
2466
+ function LabelledValue({ position = "vertical", withRow = false, children }) {
2467
+ return /* @__PURE__ */ jsx31(Container, { position, children: Children2.map(children, (child) => {
2468
+ if (isValidElement2(child)) {
2469
+ return cloneElement(child, { position, withRow });
2470
+ }
2471
+ return child;
2472
+ }) });
2473
+ }
2474
+ function Item3({ label, value, position = "vertical", withRow = false }) {
2475
+ return /* @__PURE__ */ jsxs14(ItemWrapper, { position, withRow, children: [
2476
+ /* @__PURE__ */ jsx31(Label4, { children: label }),
2477
+ /* @__PURE__ */ jsx31(Value2, { children: value })
2478
+ ] });
2479
+ }
2480
+ LabelledValue.Item = Item3;
2481
+
2482
+ // src/components/OneTimePassword/index.tsx
2483
+ import * as OneTimePasswordField2 from "@radix-ui/react-one-time-password-field";
2484
+
2485
+ // src/components/OneTimePassword/styles.ts
2486
+ import * as OneTimePasswordField from "@radix-ui/react-one-time-password-field";
2487
+ var StyledWrapper5 = styled("div", {
2488
+ display: "flex",
2489
+ flexDirection: "column",
2490
+ justifyContent: "center",
2491
+ alignItems: "center",
2492
+ gap: "$5",
2493
+ marginBottom: "$6"
2494
+ });
2495
+ var StyledRoot4 = styled(OneTimePasswordField.Root, {
2496
+ display: "flex",
2497
+ gap: "$2",
2498
+ flexWrap: "nowrap"
2499
+ });
2500
+ var StyledInput = styled(OneTimePasswordField.Input, {
2501
+ all: "unset",
2502
+ gap: "1rem",
2503
+ display: "inline-flex",
2504
+ alignItems: "center",
2505
+ justifyContent: "center",
2506
+ textAlign: "center",
2507
+ boxSizing: "border-box",
2508
+ borderRadius: "$md",
2509
+ borderStyle: "solid",
2510
+ borderColor: "#C2C2C2",
2511
+ borderWidth: "3px",
2512
+ fontSize: "$md",
2513
+ color: "$black",
2514
+ padding: "0",
2515
+ height: "50px",
2516
+ width: "53px",
2517
+ "&:hover": {
2518
+ borderColor: "$gray_dark"
2519
+ },
2520
+ "&:focus": {
2521
+ borderColor: "$clickpalm_mid"
2522
+ }
2523
+ });
2524
+
2525
+ // src/components/OneTimePassword/index.tsx
2526
+ import { jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
2527
+ var OneTimePassword = ({ label, length, value, onValueChange, ...rootProps }) => {
2528
+ return /* @__PURE__ */ jsxs15(StyledWrapper5, { children: [
2529
+ /* @__PURE__ */ jsx32("label", { children: label }),
2530
+ /* @__PURE__ */ jsxs15(
2531
+ StyledRoot4,
2532
+ {
2533
+ value,
2534
+ onValueChange,
2535
+ ...rootProps,
2536
+ children: [
2537
+ Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx32(StyledInput, {}, index)),
2538
+ /* @__PURE__ */ jsx32(OneTimePasswordField2.HiddenInput, {})
2539
+ ]
2540
+ }
2541
+ )
2542
+ ] });
2543
+ };
2544
+ OneTimePassword.displayName = "OneTimePasswordInput";
2545
+
2546
+ // src/components/Toast/index.tsx
2547
+ import * as ToastPrimitive2 from "@radix-ui/react-toast";
2548
+ import * as React2 from "react";
2549
+
2550
+ // src/components/Toast/styles.ts
2551
+ import * as ToastPrimitive from "@radix-ui/react-toast";
2552
+ var hide = keyframes({
2553
+ from: { opacity: 1 },
2554
+ to: { opacity: 0 }
2555
+ });
2556
+ var slideIn2 = keyframes({
2557
+ from: { transform: "translateX(calc(100% + 25px))" },
2558
+ to: { transform: "translateX(0)" }
2559
+ });
2560
+ var swipeOut = keyframes({
2561
+ from: { transform: "translateX(var(--radix-toast-swipe-end-x))" },
2562
+ to: { transform: "translateX(calc(100% + 25px))" }
2563
+ });
2564
+ var ToastRoot = styled(ToastPrimitive.Root, {
2565
+ position: "relative",
2566
+ display: "flex",
2567
+ justifyContent: "space-between",
2568
+ alignItems: "center",
2569
+ flexWrap: "nowrap",
2570
+ gap: "$2",
2571
+ width: "100%",
2572
+ boxSizing: "border-box",
2573
+ borderRadius: "$md",
2574
+ padding: "$4 $6",
2575
+ color: "$black",
2576
+ fontSize: "$md",
2577
+ boxShadow: "0 2px 10px rgba(0,0,0,0.1)",
2578
+ '&[data-state="open"]': {
2579
+ animation: `${slideIn2} 150ms cubic-bezier(0.16, 1, 0.3, 1)`
2580
+ },
2581
+ '&[data-state="closed"]': {
2582
+ animation: `${hide} 100ms ease-in`
2583
+ },
2584
+ '&[data-swipe="move"]': {
2585
+ transform: "translateX(var(--radix-toast-swipe-move-x))"
2586
+ },
2587
+ '&[data-swipe="cancel"]': {
2588
+ transform: "translateX(0)",
2589
+ transition: "transform 200ms ease-out"
2590
+ },
2591
+ '&[data-swipe="end"]': {
2592
+ animation: `${swipeOut} 100ms ease-out`
2593
+ },
2594
+ variants: {
2595
+ variant: {
2596
+ success: { backgroundColor: "$success" },
2597
+ warning: { backgroundColor: "$warning" },
2598
+ error: { backgroundColor: "$danger" }
2599
+ }
2600
+ }
2601
+ });
2602
+ var ToastAction = styled(ToastPrimitive.Action, {
2603
+ marginLeft: "auto",
2604
+ background: "transparent",
2605
+ border: "none",
2606
+ cursor: "pointer"
2607
+ });
2608
+ var ToastContent = styled("div", {
2609
+ display: "flex",
2610
+ flexDirection: "column",
2611
+ gap: "$1",
2612
+ width: "100%",
2613
+ alignItems: "flex-start",
2614
+ "@lg": {
2615
+ justifyContent: "space-between",
2616
+ alignItems: "center",
2617
+ flexDirection: "row"
2618
+ }
2619
+ });
2620
+ var ToastTitle = styled("strong", {
2621
+ fontWeight: "$bold",
2622
+ display: "block"
2623
+ });
2624
+ var ToastDescription = styled("span", {
2625
+ marginRight: "$6",
2626
+ display: "block"
2627
+ });
2628
+ var ToastViewport = styled(ToastPrimitive.Viewport, {
2629
+ position: "fixed",
2630
+ top: "110px",
2631
+ left: "50%",
2632
+ transform: "translateX(-50%)",
2633
+ display: "flex",
2634
+ flexDirection: "column",
2635
+ justifyContent: "flex-start",
2636
+ alignItems: "center",
2637
+ padding: 0,
2638
+ margin: "0 auto",
2639
+ gap: "$2",
2640
+ width: "79%",
2641
+ listStyle: "none",
2642
+ outline: "none",
2643
+ zIndex: 9999,
2644
+ "@lg": {
2645
+ maxWidth: "900px"
2646
+ }
2647
+ });
2648
+ var progress = keyframes({
2649
+ from: { width: "100%" },
2650
+ to: { width: "0%" }
2651
+ });
2652
+ var ToastProgress = styled("div", {
2653
+ position: "absolute",
2654
+ bottom: 0,
2655
+ left: 0,
2656
+ height: "6px",
2657
+ width: "90%",
2658
+ justifyContent: "center",
2659
+ borderBottomLeftRadius: "$full",
2660
+ borderBottomRightRadius: "$full",
2661
+ backgroundColor: "$clickpalm_light",
2662
+ animationTimingFunction: "linear",
2663
+ animation: `${progress} 3s linear`,
2664
+ animationFillMode: "forwards",
2665
+ variants: {
2666
+ paused: {
2667
+ true: {
2668
+ animationPlayState: "paused"
2669
+ },
2670
+ false: {
2671
+ animationPlayState: "running"
2672
+ }
2673
+ },
2674
+ variant: {
2675
+ success: { backgroundColor: "$success_dark" },
2676
+ warning: { backgroundColor: "$warning_dark" },
2677
+ error: { backgroundColor: "$danger_dark" }
2678
+ }
2679
+ }
2680
+ });
2681
+
2682
+ // src/components/Toast/toast.ts
2683
+ var subscribers = [];
2684
+ var toastImpl = {
2685
+ success(title, description) {
2686
+ publish({ id: crypto.randomUUID(), variant: "success", title, description });
2687
+ },
2688
+ warning(title, description) {
2689
+ publish({ id: crypto.randomUUID(), variant: "warning", title, description });
2690
+ },
2691
+ error(title, description) {
2692
+ publish({ id: crypto.randomUUID(), variant: "error", title, description });
2693
+ },
2694
+ _subscribe(fn) {
2695
+ subscribers.push(fn);
2696
+ },
2697
+ _unsubscribe(fn) {
2698
+ subscribers = subscribers.filter((sub) => sub !== fn);
2699
+ }
2700
+ };
2701
+ function publish(msg) {
2702
+ subscribers.forEach((fn) => fn(msg));
2703
+ }
2704
+ var toast = {
2705
+ success: toastImpl.success,
2706
+ warning: toastImpl.warning,
2707
+ error: toastImpl.error
2708
+ };
2709
+
2710
+ // src/components/Toast/index.tsx
2711
+ import { jsx as jsx33, jsxs as jsxs16 } from "react/jsx-runtime";
2712
+ var Toast = () => {
2713
+ const [messages, setMessages] = React2.useState([]);
2714
+ const [paused, setPaused] = React2.useState(false);
2715
+ React2.useEffect(() => {
2716
+ const handleNewToast = (msg) => {
2717
+ setMessages((prev) => [...prev, msg]);
2718
+ };
2719
+ toastImpl._subscribe(handleNewToast);
2720
+ return () => {
2721
+ toastImpl._unsubscribe(handleNewToast);
2722
+ };
2723
+ }, []);
2724
+ const removeToast = (id) => {
2725
+ setMessages((prev) => prev.filter((msg) => msg.id !== id));
2726
+ };
2727
+ return /* @__PURE__ */ jsxs16(ToastPrimitive2.Provider, { swipeDirection: "right", children: [
2728
+ messages.map((message) => /* @__PURE__ */ jsxs16(
2729
+ ToastRoot,
2730
+ {
2731
+ open: true,
2732
+ onOpenChange: (open) => {
2733
+ if (!open)
2734
+ removeToast(message.id);
2735
+ },
2736
+ variant: message.variant,
2737
+ duration: 3e3,
2738
+ onPause: () => setPaused(true),
2739
+ onResume: () => setPaused(false),
2740
+ children: [
2741
+ /* @__PURE__ */ jsxs16(ToastContent, { children: [
2742
+ /* @__PURE__ */ jsx33(ToastTitle, { children: message.title }),
2743
+ /* @__PURE__ */ jsx33(ToastDescription, { children: message.description })
2744
+ ] }),
2745
+ /* @__PURE__ */ jsx33(ToastAction, { altText: "Fechar", asChild: true, children: /* @__PURE__ */ jsx33(
2746
+ "button",
2747
+ {
2748
+ style: {
2749
+ all: "unset",
2750
+ display: "flex",
2751
+ justifyContent: "space-between",
2752
+ alignItems: "center"
2753
+ },
2754
+ onClick: () => removeToast(message.id),
2755
+ children: /* @__PURE__ */ jsx33(Icon, { name: "Closed", size: 16, height: 14, width: 14 })
2756
+ }
2757
+ ) }),
2758
+ /* @__PURE__ */ jsx33(ToastProgress, { paused, variant: message.variant })
2759
+ ]
2760
+ },
2761
+ message.id
2762
+ )),
2763
+ /* @__PURE__ */ jsx33(ToastViewport, {})
2764
+ ] });
2765
+ };
2766
+
2767
+ // src/components/MultiStep/styles.ts
2768
+ var Wrapper5 = styled("div", {
2769
+ display: "flex",
2770
+ "--circle-size": "48px",
2771
+ "--gap": "16px",
2772
+ variants: {
2773
+ orientation: {
2774
+ horizontal: {
2775
+ flexDirection: "row",
2776
+ alignItems: "center",
2777
+ gap: "var(--gap)"
2778
+ },
2779
+ vertical: {
2780
+ flexDirection: "column",
2781
+ alignItems: "flex-start"
2782
+ }
2783
+ }
2784
+ }
2785
+ });
2786
+ var StepItem = styled("div", {
2787
+ display: "flex",
2788
+ alignItems: "center",
2789
+ position: "relative",
2790
+ variants: {
2791
+ orientation: {
2792
+ horizontal: {
2793
+ flex: 1,
2794
+ flexDirection: "column",
2795
+ textAlign: "center"
2796
+ },
2797
+ vertical: {
2798
+ margin: "$4 0",
2799
+ flexDirection: "row"
2800
+ }
2801
+ }
2802
+ }
2803
+ });
2804
+ var StepCircle = styled("div", {
2805
+ position: "relative",
2806
+ zIndex: 999,
2807
+ width: "var(--circle-size)",
2808
+ height: "var(--circle-size)",
2809
+ borderRadius: "50%",
2810
+ border: "2px solid",
2811
+ display: "flex",
2812
+ alignItems: "center",
2813
+ justifyContent: "center",
2814
+ fontWeight: "$regular",
2815
+ color: "$black",
2816
+ variants: {
2817
+ isActive: {
2818
+ true: {},
2819
+ false: {}
2820
+ },
2821
+ hasLeftLine: {
2822
+ true: {}
2823
+ },
2824
+ hasRightLine: {
2825
+ true: {}
2826
+ },
2827
+ orientation: {
2828
+ horizontal: {},
2829
+ vertical: {
2830
+ "&::before": {
2831
+ content: "",
2832
+ position: "absolute",
2833
+ top: 0,
2834
+ left: "50%",
2835
+ transform: "translate(-50%, -100%)",
2836
+ width: "3px",
2837
+ height: "$6",
2838
+ backgroundColor: "$clickpalm_dark"
2839
+ },
2840
+ "&::after": {
2841
+ content: "",
2842
+ position: "absolute",
2843
+ bottom: 0,
2844
+ left: "50%",
2845
+ transform: "translate(-50%, 100%)",
2846
+ width: "3px",
2847
+ height: "$6",
2848
+ backgroundColor: "$clickpalm_dark"
2849
+ }
2850
+ }
2851
+ },
2852
+ variant: {
2853
+ primary: {
2854
+ borderColor: "$clickpalm_dark"
2855
+ },
2856
+ secondary: {}
2857
+ }
2858
+ },
2859
+ compoundVariants: [
2860
+ {
2861
+ hasLeftLine: false,
2862
+ orientation: "horizontal",
2863
+ css: {
2864
+ "&::before": { display: "none" }
2865
+ }
2866
+ },
2867
+ {
2868
+ hasRightLine: false,
2869
+ orientation: "horizontal",
2870
+ css: {
2871
+ "&::after": { display: "none" }
2872
+ }
2873
+ },
2874
+ {
2875
+ hasLeftLine: false,
2876
+ orientation: "vertical",
2877
+ css: {
2878
+ "&::before": { display: "none" }
2879
+ }
2880
+ },
2881
+ {
2882
+ hasRightLine: false,
2883
+ orientation: "vertical",
2884
+ css: {
2885
+ "&::after": { display: "none" }
2886
+ }
2887
+ },
2888
+ {
2889
+ isActive: true,
2890
+ variant: "primary",
2891
+ css: {
2892
+ backgroundColor: "$clickpalm_dark",
2893
+ color: "$white"
2894
+ }
2895
+ },
2896
+ {
2897
+ isActive: false,
2898
+ variant: "primary",
2899
+ css: {
2900
+ borderColor: "$clickpalm_dark"
2901
+ }
2902
+ },
2903
+ {
2904
+ isActive: true,
2905
+ variant: "secondary",
2906
+ css: {
2907
+ borderColor: "$ignite_light",
2908
+ backgroundColor: "$ignite_light"
2909
+ }
2910
+ },
2911
+ {
2912
+ isActive: false,
2913
+ variant: "secondary",
2914
+ css: {
2915
+ borderColor: "$white",
2916
+ color: "$white"
2917
+ }
2918
+ },
2919
+ {
2920
+ isActive: true,
2921
+ variant: "primary",
2922
+ orientation: "vertical",
2923
+ css: {
2924
+ "&::before": {
2925
+ backgroundColor: "$clickpalm_dark"
2926
+ },
2927
+ "&::after": {
2928
+ backgroundColor: "$clickpalm_dark"
2929
+ }
2930
+ }
2931
+ },
2932
+ {
2933
+ isActive: false,
2934
+ variant: "primary",
2935
+ orientation: "vertical",
2936
+ css: {
2937
+ "&::before": {
2938
+ backgroundColor: "$clickpalm_dark"
2939
+ },
2940
+ "&::after": {
2941
+ backgroundColor: "$clickpalm_dark"
2942
+ }
2943
+ }
2944
+ },
2945
+ {
2946
+ isActive: true,
2947
+ variant: "secondary",
2948
+ orientation: "vertical",
2949
+ css: {
2950
+ "&::before": {
2951
+ backgroundColor: "$ignite_light"
2952
+ },
2953
+ "&::after": {
2954
+ backgroundColor: "$ignite_light"
2955
+ }
2956
+ }
2957
+ },
2958
+ {
2959
+ isActive: false,
2960
+ variant: "secondary",
2961
+ orientation: "vertical",
2962
+ css: {
2963
+ "&::before": {
2964
+ backgroundColor: "$white"
2965
+ },
2966
+ "&::after": {
2967
+ backgroundColor: "$white"
2968
+ }
2969
+ }
2970
+ }
2971
+ ]
2972
+ });
2973
+ var StepLabel = styled("span", {
2974
+ fontSize: "$md",
2975
+ whiteSpace: "nowrap",
2976
+ overflow: "hidden",
2977
+ textOverflow: "ellipsis",
2978
+ variants: {
2979
+ orientation: {
2980
+ horizontal: {
2981
+ marginTop: "$2"
2982
+ },
2983
+ vertical: {
2984
+ marginLeft: "$3"
2985
+ }
2986
+ },
2987
+ variant: {
2988
+ primary: {
2989
+ color: "$black"
2990
+ },
2991
+ secondary: {
2992
+ color: "$white"
2993
+ }
2994
+ }
2995
+ }
2996
+ });
2997
+
2998
+ // src/components/MultiStep/index.tsx
2999
+ import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
3000
+ var MultiStep = ({
3001
+ steps,
3002
+ currentStep,
3003
+ orientation = "horizontal",
3004
+ variant
3005
+ }) => {
3006
+ return /* @__PURE__ */ jsx34(
3007
+ Wrapper5,
3008
+ {
3009
+ orientation,
3010
+ children: steps.map((step, index) => {
3011
+ const isFirst = index === 0;
3012
+ const isLast = index === steps.length - 1;
3013
+ return /* @__PURE__ */ jsxs17(StepItem, { orientation, children: [
3014
+ /* @__PURE__ */ jsx34(
3015
+ StepCircle,
3016
+ {
3017
+ orientation,
3018
+ variant,
3019
+ isActive: currentStep >= index,
3020
+ hasLeftLine: !isFirst,
3021
+ hasRightLine: !isLast,
3022
+ children: index + 1
3023
+ }
3024
+ ),
3025
+ /* @__PURE__ */ jsx34(
3026
+ StepLabel,
3027
+ {
3028
+ orientation,
3029
+ variant,
3030
+ children: step.label
3031
+ }
3032
+ )
3033
+ ] }, index);
3034
+ })
3035
+ }
3036
+ );
3037
+ };
3038
+ MultiStep.displayName = "MultiStep";
3039
+
3040
+ // src/components/Carousel/index.tsx
3041
+ import { useState as useState7, Children as Children3, cloneElement as cloneElement2 } from "react";
3042
+
3043
+ // src/components/Carousel/styles.ts
3044
+ var CarouselContainer = styled("div", {
3045
+ display: "flex",
3046
+ flexDirection: "column",
3047
+ alignItems: "center",
3048
+ width: "100%",
3049
+ maxWidth: "720px",
3050
+ userSelect: "none"
3051
+ });
3052
+ var Wrapper6 = styled("div", {
3053
+ display: "flex",
3054
+ flexDirection: "column",
3055
+ alignItems: "center",
3056
+ borderRadius: "$md",
3057
+ width: "stretch",
3058
+ padding: "$4",
3059
+ variants: {
3060
+ variant: {
3061
+ gray: {
3062
+ backgroundColor: "$gray_background",
3063
+ boxShadow: "0 1px 2px $colors$gray_dark"
3064
+ },
3065
+ purple: {
3066
+ backgroundColor: "$clickpalm_mid",
3067
+ color: "$white"
3068
+ }
3069
+ }
3070
+ }
3071
+ });
3072
+ var CarouselHeader = styled("div", {
3073
+ display: "flex",
3074
+ justifyContent: "space-between",
3075
+ alignItems: "center",
3076
+ width: "100%"
3077
+ });
3078
+ var Title2 = styled("h3", {
3079
+ fontFamily: "$default",
3080
+ fontWeight: "$bold",
3081
+ fontSize: "$md",
3082
+ margin: "0px",
3083
+ variants: {
3084
+ variant: {
3085
+ gray: {
3086
+ color: "$black"
3087
+ },
3088
+ purple: {
3089
+ color: "$white"
3090
+ }
3091
+ }
3092
+ }
3093
+ });
3094
+ var Navigation = styled("h3", {
3095
+ display: "flex",
3096
+ justifyContent: "center",
3097
+ alignItems: "center",
3098
+ gap: "$1",
3099
+ margin: "0px"
3100
+ });
3101
+ var CarouselContent = styled("div", {
3102
+ width: "100%",
3103
+ overflow: "hidden",
3104
+ position: "relative"
3105
+ });
3106
+ var DotsContainer = styled("div", {
3107
+ display: "flex",
3108
+ alignItems: "center",
3109
+ justifyContent: "center",
3110
+ width: "100%"
3111
+ });
3112
+ var Dots2 = styled("div", {
3113
+ display: "flex",
3114
+ gap: "$2",
3115
+ justifyContent: "center",
3116
+ flexWrap: "nowrap"
3117
+ });
3118
+ var DotButton = styled("button", {
3119
+ border: "2px solid $ignite_light",
3120
+ background: "transparent",
3121
+ height: "9px",
3122
+ width: "9px",
3123
+ borderRadius: "$full",
3124
+ padding: 0,
3125
+ cursor: "pointer",
3126
+ transition: "background-color 0.3s ease, border-color 0.3s ease",
3127
+ flexShrink: 0,
3128
+ variants: {
3129
+ active: {
3130
+ true: {
3131
+ backgroundColor: "$ignite_light",
3132
+ borderColor: "$ignite_light"
3133
+ },
3134
+ false: {}
3135
+ }
3136
+ },
3137
+ "&:focus": {
3138
+ outline: "none",
3139
+ borderColor: "$ignite_dark"
3140
+ }
3141
+ });
3142
+ var CarouselItemContainer = styled("div", {
3143
+ width: "100%"
3144
+ });
3145
+
3146
+ // src/components/Carousel/index.tsx
3147
+ import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
3148
+ var SWIPE_THRESHOLD = 50;
3149
+ var Carousel = ({ title, variant, children }) => {
3150
+ const items = Children3.toArray(children);
3151
+ const [activeIndex, setActiveIndex] = useState7(0);
3152
+ const [touchStartX, setTouchStartX] = useState7(null);
3153
+ const [touchEndX, setTouchEndX] = useState7(null);
3154
+ const prev = () => {
3155
+ setActiveIndex((prevIndex) => prevIndex === 0 ? items.length - 1 : prevIndex - 1);
3156
+ };
3157
+ const next = () => {
3158
+ setActiveIndex((prevIndex) => prevIndex === items.length - 1 ? 0 : prevIndex + 1);
3159
+ };
3160
+ const onTouchStart = (e) => {
3161
+ setTouchEndX(null);
3162
+ setTouchStartX(e.targetTouches[0].clientX);
3163
+ };
3164
+ const onTouchMove = (e) => {
3165
+ setTouchEndX(e.targetTouches[0].clientX);
3166
+ };
3167
+ const onTouchEnd = () => {
3168
+ if (touchStartX !== null && touchEndX !== null) {
3169
+ const distance = touchStartX - touchEndX;
3170
+ if (Math.abs(distance) > SWIPE_THRESHOLD) {
3171
+ if (distance > 0) {
3172
+ next();
3173
+ } else {
3174
+ prev();
3175
+ }
3176
+ }
3177
+ }
3178
+ setTouchStartX(null);
3179
+ setTouchEndX(null);
3180
+ };
3181
+ return /* @__PURE__ */ jsxs18(
3182
+ CarouselContainer,
3183
+ {
3184
+ role: "region",
3185
+ "aria-roledescription": "carousel",
3186
+ "aria-label": "Carousel Component",
3187
+ children: [
3188
+ /* @__PURE__ */ jsxs18(Wrapper6, { variant, children: [
3189
+ /* @__PURE__ */ jsxs18(CarouselHeader, { children: [
3190
+ /* @__PURE__ */ jsx35(Title2, { children: title }),
3191
+ /* @__PURE__ */ jsxs18(Navigation, { children: [
3192
+ /* @__PURE__ */ jsx35(
3193
+ Button,
3194
+ {
3195
+ size: "sm",
3196
+ variant: "secondary",
3197
+ "aria-label": "Previous Slide",
3198
+ onClick: prev,
3199
+ tabIndex: 0,
3200
+ children: /* @__PURE__ */ jsx35(Icon, { name: "TriangleLeft", size: 16, color: variant === "purple" ? "white" : "black" })
3201
+ }
3202
+ ),
3203
+ /* @__PURE__ */ jsx35(
3204
+ Button,
3205
+ {
3206
+ size: "sm",
3207
+ variant: "secondary",
3208
+ "aria-label": "Previous Slide",
3209
+ onClick: next,
3210
+ tabIndex: 0,
3211
+ children: /* @__PURE__ */ jsx35(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
3212
+ }
3213
+ )
3214
+ ] })
3215
+ ] }),
3216
+ /* @__PURE__ */ jsx35(Spacing, { size: "xs" }),
3217
+ /* @__PURE__ */ jsx35(Hr, { variant }),
3218
+ /* @__PURE__ */ jsx35(Spacing, { size: "xs" }),
3219
+ /* @__PURE__ */ jsx35(
3220
+ CarouselContent,
3221
+ {
3222
+ onTouchStart,
3223
+ onTouchMove,
3224
+ onTouchEnd,
3225
+ children: items.map(
3226
+ (child, index) => cloneElement2(child, {
3227
+ "aria-hidden": index !== activeIndex,
3228
+ style: {
3229
+ display: index === activeIndex ? "block" : "none"
3230
+ }
3231
+ })
3232
+ )
3233
+ }
3234
+ )
3235
+ ] }),
3236
+ /* @__PURE__ */ jsx35(Spacing, { size: "md" }),
3237
+ /* @__PURE__ */ jsx35(DotsContainer, { children: /* @__PURE__ */ jsx35(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: items.map((_, idx) => /* @__PURE__ */ jsx35(
3238
+ DotButton,
3239
+ {
3240
+ active: idx === activeIndex,
3241
+ "aria-label": `Go to slide ${idx + 1}`,
3242
+ "aria-selected": idx === activeIndex,
3243
+ role: "tab",
3244
+ onClick: () => setActiveIndex(idx),
3245
+ type: "button"
3246
+ },
3247
+ idx
3248
+ )) }) })
3249
+ ]
3250
+ }
3251
+ );
3252
+ };
3253
+ var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */ jsx35(CarouselItemContainer, { ...props, style: { ...style }, children });
3254
+ Carousel.Item = CarouselItem;
3255
+
3256
+ // src/components/PasswordInput.tsx
3257
+ import { forwardRef as forwardRef3, useRef as useRef5, useState as useState8, useImperativeHandle } from "react";
3258
+ import { jsx as jsx36 } from "react/jsx-runtime";
3259
+ var PasswordInput = forwardRef3(
3260
+ ({ value, onChange, ...props }, ref) => {
3261
+ console.log("\u{1F680} ~ value:", value);
3262
+ const [visible, setVisible] = useState8(false);
3263
+ const innerRef = useRef5(null);
3264
+ useImperativeHandle(ref, () => innerRef.current);
3265
+ const handleToggleVisibility = () => {
3266
+ setVisible((v) => !v);
3267
+ setTimeout(() => {
3268
+ if (innerRef.current) {
3269
+ const length = innerRef.current.value.length;
3270
+ innerRef.current.setSelectionRange(length, length);
3271
+ }
3272
+ }, 0);
3273
+ };
3274
+ return /* @__PURE__ */ jsx36(
3275
+ Input2,
3276
+ {
3277
+ ...props,
3278
+ ref: innerRef,
3279
+ type: visible ? "text" : "password",
3280
+ value,
3281
+ onChange,
3282
+ suffix: /* @__PURE__ */ jsx36(
3283
+ "button",
3284
+ {
3285
+ type: "button",
3286
+ onClick: handleToggleVisibility,
3287
+ onMouseDown: (e) => e.preventDefault(),
3288
+ style: {
3289
+ all: "unset",
3290
+ cursor: "pointer",
3291
+ display: "flex",
3292
+ alignItems: "center",
3293
+ justifyContent: "center"
3294
+ },
3295
+ "aria-label": visible ? "Ocultar senha" : "Mostrar senha",
3296
+ children: visible ? /* @__PURE__ */ jsx36(Icon, { name: "EyeClosed", size: 16, color: "black" }) : /* @__PURE__ */ jsx36(Icon, { name: "EyeOpen", size: 16, color: "black" })
3297
+ }
3298
+ )
3299
+ }
3300
+ );
3301
+ }
3302
+ );
3303
+ PasswordInput.displayName = "PasswordInput";
3304
+ export {
3305
+ Avatar2 as Avatar,
3306
+ Box,
3307
+ Button,
3308
+ Calendar2 as Calendar,
3309
+ Carousel,
3310
+ Checkbox2 as Checkbox,
3311
+ Datepicker,
3312
+ Heading,
3313
+ Hr,
3314
+ Icon,
3315
+ Input2 as Input,
3316
+ LabelledValue,
3317
+ Modal,
3318
+ MultiStep,
3319
+ OneTimePassword,
3320
+ PasswordInput,
3321
+ ProgressBar,
3322
+ Radio,
3323
+ Select2 as Select,
3324
+ Spacing,
3325
+ Span5 as Span,
3326
+ Switch2 as Switch,
3327
+ Tabs2 as Tabs,
3328
+ Text,
3329
+ TextArea,
3330
+ TextAreaElement,
3331
+ Toast,
3332
+ Tooltip,
3333
+ config,
3334
+ createTheme,
3335
+ css,
3336
+ getCssText,
3337
+ globalCss,
3338
+ keyframes,
3339
+ styled,
3340
+ theme,
3341
+ toast
3342
+ };