@clickpalm/react 1.0.0 → 1.1.1
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.d.ts +56 -33
- package/dist/index.js +522 -249
- package/dist/index.mjs +456 -186
- package/package.json +6 -3
package/dist/index.mjs
CHANGED
|
@@ -271,7 +271,7 @@ var StyledButton = styled("button", {
|
|
|
271
271
|
primary: {
|
|
272
272
|
color: "$white",
|
|
273
273
|
backgroundImage: "linear-gradient(to bottom, $ignite_light, $ignite_dark)",
|
|
274
|
-
"&:not(:disabled):hover": {
|
|
274
|
+
"&:not(:disabled):is(:hover, :focus)": {
|
|
275
275
|
background: "$ignite_dark"
|
|
276
276
|
},
|
|
277
277
|
"&:disabled": {
|
|
@@ -281,7 +281,7 @@ var StyledButton = styled("button", {
|
|
|
281
281
|
secondary: {
|
|
282
282
|
color: "$clickpalm_mid",
|
|
283
283
|
border: "2px solid $ignite_light",
|
|
284
|
-
"&:not(:disabled):hover": {
|
|
284
|
+
"&:not(:disabled):is(:hover, :focus)": {
|
|
285
285
|
border: "2px solid $ignite_dark"
|
|
286
286
|
},
|
|
287
287
|
"&:disabled": {
|
|
@@ -291,7 +291,7 @@ var StyledButton = styled("button", {
|
|
|
291
291
|
tertiary: {
|
|
292
292
|
color: "$ignite_light",
|
|
293
293
|
border: "3px solid $clickpalm_mid",
|
|
294
|
-
"&:not(:disabled):hover": {
|
|
294
|
+
"&:not(:disabled):is(:hover, :focus)": {
|
|
295
295
|
color: "$ignite_dark"
|
|
296
296
|
},
|
|
297
297
|
"&:disabled": {
|
|
@@ -625,6 +625,32 @@ var Check = (props) => {
|
|
|
625
625
|
);
|
|
626
626
|
};
|
|
627
627
|
|
|
628
|
+
// src/components/Icon/Svgs/Copy.tsx
|
|
629
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
630
|
+
var Copy = (props) => {
|
|
631
|
+
return /* @__PURE__ */ jsx15(
|
|
632
|
+
"svg",
|
|
633
|
+
{
|
|
634
|
+
width: "18",
|
|
635
|
+
height: "19",
|
|
636
|
+
viewBox: "0 0 18 19",
|
|
637
|
+
fill: "none",
|
|
638
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
639
|
+
...props,
|
|
640
|
+
children: /* @__PURE__ */ jsx15(
|
|
641
|
+
"path",
|
|
642
|
+
{
|
|
643
|
+
d: "M3.4 11.9547H2.6C2.17565 11.9547 1.76869 11.7861 1.46863 11.4861C1.16857 11.186 1 10.779 1 10.3547V3.15469C1 2.73034 1.16857 2.32337 1.46863 2.02332C1.76869 1.72326 2.17565 1.55469 2.6 1.55469H9.8C10.2243 1.55469 10.6313 1.72326 10.9314 2.02332C11.2314 2.32337 11.4 2.73034 11.4 3.15469V3.95469M8.2 7.15469H15.4C16.2837 7.15469 17 7.87103 17 8.75469V15.9547C17 16.8383 16.2837 17.5547 15.4 17.5547H8.2C7.31634 17.5547 6.6 16.8383 6.6 15.9547V8.75469C6.6 7.87103 7.31634 7.15469 8.2 7.15469Z",
|
|
644
|
+
stroke: "currentColor",
|
|
645
|
+
"stroke-width": "2",
|
|
646
|
+
"stroke-linecap": "round",
|
|
647
|
+
"stroke-linejoin": "round"
|
|
648
|
+
}
|
|
649
|
+
)
|
|
650
|
+
}
|
|
651
|
+
);
|
|
652
|
+
};
|
|
653
|
+
|
|
628
654
|
// src/components/Icon/icons.ts
|
|
629
655
|
var iconMap = {
|
|
630
656
|
TriangleDown,
|
|
@@ -644,12 +670,13 @@ var iconMap = {
|
|
|
644
670
|
Search,
|
|
645
671
|
ChevronLeft,
|
|
646
672
|
ChevronRight,
|
|
647
|
-
Check
|
|
673
|
+
Check,
|
|
674
|
+
Copy
|
|
648
675
|
};
|
|
649
676
|
|
|
650
677
|
// src/components/Icon/index.tsx
|
|
651
678
|
import { useMemo } from "react";
|
|
652
|
-
import { jsx as
|
|
679
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
653
680
|
var colorMap = {
|
|
654
681
|
black: "#000000",
|
|
655
682
|
green: "#78CB63",
|
|
@@ -662,7 +689,7 @@ function Icon({ name, size = 24, color = "black", ...rest }) {
|
|
|
662
689
|
return null;
|
|
663
690
|
}
|
|
664
691
|
const fillColor = useMemo(() => colorMap[color], [color]);
|
|
665
|
-
return /* @__PURE__ */
|
|
692
|
+
return /* @__PURE__ */ jsx16(
|
|
666
693
|
IconComponent,
|
|
667
694
|
{
|
|
668
695
|
width: size,
|
|
@@ -869,7 +896,7 @@ var StyledLabel = styled("label", {
|
|
|
869
896
|
});
|
|
870
897
|
|
|
871
898
|
// src/components/Calendar/index.tsx
|
|
872
|
-
import { jsx as
|
|
899
|
+
import { jsx as jsx17, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
873
900
|
calendarStyles();
|
|
874
901
|
var Calendar2 = ({ label, onChange }) => {
|
|
875
902
|
const [selected, setSelected] = useState(void 0);
|
|
@@ -888,8 +915,8 @@ var Calendar2 = ({ label, onChange }) => {
|
|
|
888
915
|
}
|
|
889
916
|
}, [selected]);
|
|
890
917
|
return /* @__PURE__ */ jsxs2("div", { children: [
|
|
891
|
-
/* @__PURE__ */
|
|
892
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ jsx17(StyledLabel, { children: label }),
|
|
919
|
+
/* @__PURE__ */ jsx17(
|
|
893
920
|
DayPicker,
|
|
894
921
|
{
|
|
895
922
|
className: !open ? "calendar-root-collapsed" : "",
|
|
@@ -920,26 +947,29 @@ var Calendar2 = ({ label, onChange }) => {
|
|
|
920
947
|
MonthCaption: ({ calendarMonth, displayIndex, ...safeprops }) => {
|
|
921
948
|
const displayMonth = calendarMonth.date;
|
|
922
949
|
return /* @__PURE__ */ jsxs2("div", { ...safeprops, children: [
|
|
923
|
-
/* @__PURE__ */
|
|
950
|
+
/* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsx17(
|
|
924
951
|
Button,
|
|
925
952
|
{
|
|
926
953
|
variant: "secondary",
|
|
927
954
|
size: "sm",
|
|
928
955
|
onClick: () => setOpen(!open),
|
|
929
|
-
children: /* @__PURE__ */
|
|
956
|
+
children: /* @__PURE__ */ jsx17(StyledButton2, { isOpen: open, children: /* @__PURE__ */ jsx17(Icon, { name: "TriangleUp", size: 16 }) })
|
|
930
957
|
}
|
|
931
958
|
) }),
|
|
932
|
-
/* @__PURE__ */
|
|
959
|
+
/* @__PURE__ */ jsx17("div", { className: "calendar-month_caption", children: /* @__PURE__ */ jsx17("div", { className: "calendar-caption_label", role: "heading", "aria-level": 2, children: format(displayMonth, "MMMM 'de' yyyy", { locale: ptBR }).replace(/^./, (c) => c.toUpperCase()) }) })
|
|
933
960
|
] });
|
|
934
961
|
},
|
|
935
|
-
PreviousMonthButton: (props) => /* @__PURE__ */
|
|
936
|
-
NextMonthButton: (props) => /* @__PURE__ */
|
|
962
|
+
PreviousMonthButton: (props) => /* @__PURE__ */ jsx17(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ jsx17(Icon, { name: "TriangleLeft", size: 16 }) }),
|
|
963
|
+
NextMonthButton: (props) => /* @__PURE__ */ jsx17(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ jsx17(Icon, { name: "TriangleRight", size: 16 }) })
|
|
937
964
|
}
|
|
938
965
|
}
|
|
939
966
|
)
|
|
940
967
|
] });
|
|
941
968
|
};
|
|
942
969
|
|
|
970
|
+
// src/components/Checkbox/index.tsx
|
|
971
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
972
|
+
|
|
943
973
|
// src/components/Checkbox/styles.ts
|
|
944
974
|
import * as Checkbox from "@radix-ui/react-checkbox";
|
|
945
975
|
var StyledWrapper = styled("div", {
|
|
@@ -1053,25 +1083,28 @@ var Span = styled("span", {
|
|
|
1053
1083
|
});
|
|
1054
1084
|
|
|
1055
1085
|
// src/components/Checkbox/index.tsx
|
|
1056
|
-
import { jsx as
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
/* @__PURE__ */ jsxs3(
|
|
1060
|
-
/* @__PURE__ */
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
}
|
|
1086
|
+
import { jsx as jsx18, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1087
|
+
var Checkbox2 = forwardRef2(
|
|
1088
|
+
({ label, checked, onCheckedChange, errorMessage, ...rest }, ref) => {
|
|
1089
|
+
return /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
1090
|
+
/* @__PURE__ */ jsxs3(StyledWrapper, { hasError: !!errorMessage, children: [
|
|
1091
|
+
/* @__PURE__ */ jsx18(
|
|
1092
|
+
CheckboxContainer,
|
|
1093
|
+
{
|
|
1094
|
+
ref,
|
|
1095
|
+
checked,
|
|
1096
|
+
onCheckedChange,
|
|
1097
|
+
hasError: !!errorMessage,
|
|
1098
|
+
...rest,
|
|
1099
|
+
children: /* @__PURE__ */ jsx18(CheckboxIndicator, { asChild: true, children: /* @__PURE__ */ jsx18(Icon, { name: "Check", size: 16 }) })
|
|
1100
|
+
}
|
|
1101
|
+
),
|
|
1102
|
+
/* @__PURE__ */ jsx18(CheckboxLabel, { children: label })
|
|
1103
|
+
] }),
|
|
1104
|
+
errorMessage && /* @__PURE__ */ jsx18(Span, { children: errorMessage })
|
|
1105
|
+
] });
|
|
1106
|
+
}
|
|
1107
|
+
);
|
|
1075
1108
|
Checkbox2.displayName = "Checkbox";
|
|
1076
1109
|
|
|
1077
1110
|
// src/components/Datepicker/index.tsx
|
|
@@ -1082,7 +1115,7 @@ import { DayPicker as DayPicker2 } from "react-day-picker";
|
|
|
1082
1115
|
import "react-day-picker/dist/style.css";
|
|
1083
1116
|
|
|
1084
1117
|
// src/components/Input/index.tsx
|
|
1085
|
-
import React, { forwardRef as
|
|
1118
|
+
import React, { forwardRef as forwardRef3, useRef as useRef2 } from "react";
|
|
1086
1119
|
|
|
1087
1120
|
// src/components/Input/styles.ts
|
|
1088
1121
|
var StyledWrapper2 = styled("div", {
|
|
@@ -1179,8 +1212,8 @@ var Span2 = styled("span", {
|
|
|
1179
1212
|
});
|
|
1180
1213
|
|
|
1181
1214
|
// src/components/Input/index.tsx
|
|
1182
|
-
import { jsx as
|
|
1183
|
-
var Input2 =
|
|
1215
|
+
import { jsx as jsx19, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1216
|
+
var Input2 = forwardRef3(
|
|
1184
1217
|
({ prefix, suffix, label, errorMessage, noMargin = false, ...props }, forwardedRef) => {
|
|
1185
1218
|
const localInputRef = useRef2(null);
|
|
1186
1219
|
const inputRef = forwardedRef || localInputRef;
|
|
@@ -1194,7 +1227,7 @@ var Input2 = forwardRef2(
|
|
|
1194
1227
|
return type?.displayName === "Button";
|
|
1195
1228
|
};
|
|
1196
1229
|
return /* @__PURE__ */ jsxs4(StyledWrapper2, { children: [
|
|
1197
|
-
label && /* @__PURE__ */
|
|
1230
|
+
label && /* @__PURE__ */ jsx19(Label, { children: label }),
|
|
1198
1231
|
/* @__PURE__ */ jsxs4(
|
|
1199
1232
|
TextInputContainer,
|
|
1200
1233
|
{
|
|
@@ -1203,13 +1236,13 @@ var Input2 = forwardRef2(
|
|
|
1203
1236
|
hasError: !!errorMessage,
|
|
1204
1237
|
onClick: handleContainerClick,
|
|
1205
1238
|
children: [
|
|
1206
|
-
!!prefix && /* @__PURE__ */
|
|
1207
|
-
/* @__PURE__ */
|
|
1208
|
-
!!suffix && /* @__PURE__ */
|
|
1239
|
+
!!prefix && /* @__PURE__ */ jsx19(Prefix, { children: prefix }),
|
|
1240
|
+
/* @__PURE__ */ jsx19(Input, { ref: inputRef, ...props }),
|
|
1241
|
+
!!suffix && /* @__PURE__ */ jsx19(Suffix, { children: suffix })
|
|
1209
1242
|
]
|
|
1210
1243
|
}
|
|
1211
1244
|
),
|
|
1212
|
-
errorMessage && /* @__PURE__ */
|
|
1245
|
+
errorMessage && /* @__PURE__ */ jsx19(Span2, { children: errorMessage })
|
|
1213
1246
|
] });
|
|
1214
1247
|
}
|
|
1215
1248
|
);
|
|
@@ -1277,7 +1310,7 @@ var datePickerStyles = globalCss({
|
|
|
1277
1310
|
});
|
|
1278
1311
|
|
|
1279
1312
|
// src/components/Datepicker/index.tsx
|
|
1280
|
-
import { jsx as
|
|
1313
|
+
import { jsx as jsx20, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1281
1314
|
datePickerStyles();
|
|
1282
1315
|
var Datepicker = ({ label, value, onChange }) => {
|
|
1283
1316
|
const [selected, setSelected] = useState2(void 0);
|
|
@@ -1308,7 +1341,7 @@ var Datepicker = ({ label, value, onChange }) => {
|
|
|
1308
1341
|
}
|
|
1309
1342
|
}, [open, selected]);
|
|
1310
1343
|
return /* @__PURE__ */ jsxs5("div", { children: [
|
|
1311
|
-
/* @__PURE__ */
|
|
1344
|
+
/* @__PURE__ */ jsx20(
|
|
1312
1345
|
Input2,
|
|
1313
1346
|
{
|
|
1314
1347
|
ref: inputRef,
|
|
@@ -1318,10 +1351,10 @@ var Datepicker = ({ label, value, onChange }) => {
|
|
|
1318
1351
|
value: value || "",
|
|
1319
1352
|
noMargin: true,
|
|
1320
1353
|
readOnly: true,
|
|
1321
|
-
suffix: /* @__PURE__ */
|
|
1354
|
+
suffix: /* @__PURE__ */ jsx20(Icon, { name: "Calendar", size: 16 })
|
|
1322
1355
|
}
|
|
1323
1356
|
),
|
|
1324
|
-
open && /* @__PURE__ */
|
|
1357
|
+
open && /* @__PURE__ */ jsx20(
|
|
1325
1358
|
"div",
|
|
1326
1359
|
{
|
|
1327
1360
|
ref: calendarRef,
|
|
@@ -1333,7 +1366,7 @@ var Datepicker = ({ label, value, onChange }) => {
|
|
|
1333
1366
|
boxShadow: "0 2px 8px rgba(0,0,0,0.15)",
|
|
1334
1367
|
borderRadius: "8px"
|
|
1335
1368
|
},
|
|
1336
|
-
children: /* @__PURE__ */
|
|
1369
|
+
children: /* @__PURE__ */ jsx20(
|
|
1337
1370
|
DayPicker2,
|
|
1338
1371
|
{
|
|
1339
1372
|
mode: "single",
|
|
@@ -1355,8 +1388,8 @@ var Datepicker = ({ label, value, onChange }) => {
|
|
|
1355
1388
|
}
|
|
1356
1389
|
},
|
|
1357
1390
|
components: {
|
|
1358
|
-
PreviousMonthButton: (props) => /* @__PURE__ */
|
|
1359
|
-
NextMonthButton: (props) => /* @__PURE__ */
|
|
1391
|
+
PreviousMonthButton: (props) => /* @__PURE__ */ jsx20(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ jsx20(Icon, { name: "TriangleLeft", size: 16 }) }),
|
|
1392
|
+
NextMonthButton: (props) => /* @__PURE__ */ jsx20(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ jsx20(Icon, { name: "TriangleRight", size: 16 }) })
|
|
1360
1393
|
}
|
|
1361
1394
|
}
|
|
1362
1395
|
)
|
|
@@ -1366,7 +1399,9 @@ var Datepicker = ({ label, value, onChange }) => {
|
|
|
1366
1399
|
};
|
|
1367
1400
|
|
|
1368
1401
|
// src/components/Hr.tsx
|
|
1369
|
-
|
|
1402
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
1403
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1404
|
+
var StyledHr = styled("hr", {
|
|
1370
1405
|
border: "none",
|
|
1371
1406
|
height: "1px",
|
|
1372
1407
|
width: "100%",
|
|
@@ -1381,6 +1416,10 @@ var Hr = styled("hr", {
|
|
|
1381
1416
|
}
|
|
1382
1417
|
}
|
|
1383
1418
|
});
|
|
1419
|
+
var Hr = forwardRef4(function Hr2({ children, ...props }, ref) {
|
|
1420
|
+
return /* @__PURE__ */ jsx21(StyledHr, { ref, ...props, children });
|
|
1421
|
+
});
|
|
1422
|
+
Hr.displayName = "Hr";
|
|
1384
1423
|
|
|
1385
1424
|
// src/components/Modal/index.tsx
|
|
1386
1425
|
import * as Dialog2 from "@radix-ui/react-dialog";
|
|
@@ -1438,16 +1477,16 @@ var StyledDivider = styled2("hr", {
|
|
|
1438
1477
|
});
|
|
1439
1478
|
|
|
1440
1479
|
// src/components/Modal/index.tsx
|
|
1441
|
-
import { jsx as
|
|
1480
|
+
import { jsx as jsx22, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1442
1481
|
var Modal = ({ open, onOpenChange, title, children }) => {
|
|
1443
|
-
return /* @__PURE__ */
|
|
1444
|
-
/* @__PURE__ */
|
|
1482
|
+
return /* @__PURE__ */ jsx22(Dialog2.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs6(Dialog2.Portal, { children: [
|
|
1483
|
+
/* @__PURE__ */ jsx22(StyledOverlay, {}),
|
|
1445
1484
|
/* @__PURE__ */ jsxs6(StyledContent, { children: [
|
|
1446
1485
|
/* @__PURE__ */ jsxs6(Wrapper, { children: [
|
|
1447
|
-
/* @__PURE__ */
|
|
1448
|
-
/* @__PURE__ */
|
|
1486
|
+
/* @__PURE__ */ jsx22(StyledTitle, { children: title }),
|
|
1487
|
+
/* @__PURE__ */ jsx22(StyledClose, { asChild: true, "aria-label": "Close", children: /* @__PURE__ */ jsx22(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ jsx22(Icon, { name: "Closed", size: 8 }) }) })
|
|
1449
1488
|
] }),
|
|
1450
|
-
/* @__PURE__ */
|
|
1489
|
+
/* @__PURE__ */ jsx22(StyledDivider, {}),
|
|
1451
1490
|
children
|
|
1452
1491
|
] })
|
|
1453
1492
|
] }) });
|
|
@@ -1484,7 +1523,7 @@ var StyledIndicator = styled(Progress.Indicator, {
|
|
|
1484
1523
|
});
|
|
1485
1524
|
|
|
1486
1525
|
// src/components/ProgressBar/index.tsx
|
|
1487
|
-
import { jsx as
|
|
1526
|
+
import { jsx as jsx23, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1488
1527
|
var ProgressBar = ({ label, value = 0, max = 100, ...rest }) => {
|
|
1489
1528
|
const [progress2, setProgress] = useState3(0);
|
|
1490
1529
|
useEffect3(() => {
|
|
@@ -1493,14 +1532,14 @@ var ProgressBar = ({ label, value = 0, max = 100, ...rest }) => {
|
|
|
1493
1532
|
}, [value]);
|
|
1494
1533
|
const valueLabel = `${Math.round(progress2 / max * 100)}%`;
|
|
1495
1534
|
return /* @__PURE__ */ jsxs7(StyledWrapper3, { children: [
|
|
1496
|
-
/* @__PURE__ */
|
|
1497
|
-
/* @__PURE__ */
|
|
1535
|
+
/* @__PURE__ */ jsx23("label", { style: { fontSize: 16, alignSelf: "flex-start" }, children: label }),
|
|
1536
|
+
/* @__PURE__ */ jsx23(
|
|
1498
1537
|
StyledRoot,
|
|
1499
1538
|
{
|
|
1500
1539
|
value: progress2,
|
|
1501
1540
|
"aria-valuetext": valueLabel,
|
|
1502
1541
|
...rest,
|
|
1503
|
-
children: /* @__PURE__ */
|
|
1542
|
+
children: /* @__PURE__ */ jsx23(
|
|
1504
1543
|
StyledIndicator,
|
|
1505
1544
|
{
|
|
1506
1545
|
style: { transform: `translateX(-${100 - progress2}%)` }
|
|
@@ -1604,7 +1643,7 @@ var Span3 = styled("span", {
|
|
|
1604
1643
|
});
|
|
1605
1644
|
|
|
1606
1645
|
// src/components/Radio/index.tsx
|
|
1607
|
-
import { jsx as
|
|
1646
|
+
import { jsx as jsx24, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1608
1647
|
var Radio = ({
|
|
1609
1648
|
labels,
|
|
1610
1649
|
value,
|
|
@@ -1614,7 +1653,7 @@ var Radio = ({
|
|
|
1614
1653
|
errorMessage
|
|
1615
1654
|
}) => {
|
|
1616
1655
|
return /* @__PURE__ */ jsxs8("form", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
1617
|
-
/* @__PURE__ */
|
|
1656
|
+
/* @__PURE__ */ jsx24(
|
|
1618
1657
|
StyledRoot2,
|
|
1619
1658
|
{
|
|
1620
1659
|
value,
|
|
@@ -1624,26 +1663,26 @@ var Radio = ({
|
|
|
1624
1663
|
required,
|
|
1625
1664
|
loop: true,
|
|
1626
1665
|
children: labels.map((label, index) => /* @__PURE__ */ jsxs8(Wrapper2, { children: [
|
|
1627
|
-
/* @__PURE__ */
|
|
1666
|
+
/* @__PURE__ */ jsx24(
|
|
1628
1667
|
StyledItem,
|
|
1629
1668
|
{
|
|
1630
1669
|
value: label,
|
|
1631
1670
|
id: `radio-${index}`,
|
|
1632
1671
|
"aria-label": label,
|
|
1633
1672
|
hasError: !!errorMessage,
|
|
1634
|
-
children: /* @__PURE__ */
|
|
1673
|
+
children: /* @__PURE__ */ jsx24(StyledIndicator2, {})
|
|
1635
1674
|
}
|
|
1636
1675
|
),
|
|
1637
|
-
/* @__PURE__ */
|
|
1676
|
+
/* @__PURE__ */ jsx24(ItemLabel, { htmlFor: `radio-${index}`, children: label })
|
|
1638
1677
|
] }, label))
|
|
1639
1678
|
}
|
|
1640
1679
|
),
|
|
1641
|
-
errorMessage && /* @__PURE__ */
|
|
1680
|
+
errorMessage && /* @__PURE__ */ jsx24(Span3, { children: errorMessage })
|
|
1642
1681
|
] });
|
|
1643
1682
|
};
|
|
1644
1683
|
|
|
1645
1684
|
// src/components/Spacing.tsx
|
|
1646
|
-
import { jsx as
|
|
1685
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1647
1686
|
var spacingMap = {
|
|
1648
1687
|
xs: 8,
|
|
1649
1688
|
sm: 12,
|
|
@@ -1655,7 +1694,7 @@ var spacingMap = {
|
|
|
1655
1694
|
};
|
|
1656
1695
|
var Spacing = ({ size, axis = "vertical" }) => {
|
|
1657
1696
|
const style = axis === "vertical" ? { height: spacingMap[size], width: "100%" } : { width: spacingMap[size], height: "100%" };
|
|
1658
|
-
return /* @__PURE__ */
|
|
1697
|
+
return /* @__PURE__ */ jsx25("div", { style, "data-testid": `spacing-${size}-${axis}` });
|
|
1659
1698
|
};
|
|
1660
1699
|
|
|
1661
1700
|
// src/components/Switch/styles.ts
|
|
@@ -1753,7 +1792,7 @@ var Span4 = styled("span", {
|
|
|
1753
1792
|
});
|
|
1754
1793
|
|
|
1755
1794
|
// src/components/Switch/index.tsx
|
|
1756
|
-
import { jsx as
|
|
1795
|
+
import { jsx as jsx26, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1757
1796
|
var Switch2 = ({
|
|
1758
1797
|
label,
|
|
1759
1798
|
checked,
|
|
@@ -1766,7 +1805,7 @@ var Switch2 = ({
|
|
|
1766
1805
|
}) => {
|
|
1767
1806
|
return /* @__PURE__ */ jsxs9("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
1768
1807
|
/* @__PURE__ */ jsxs9(Wrapper3, { hasError: !!errorMessage, children: [
|
|
1769
|
-
/* @__PURE__ */
|
|
1808
|
+
/* @__PURE__ */ jsx26(
|
|
1770
1809
|
StyledRoot3,
|
|
1771
1810
|
{
|
|
1772
1811
|
id,
|
|
@@ -1776,12 +1815,12 @@ var Switch2 = ({
|
|
|
1776
1815
|
hasError: !!errorMessage,
|
|
1777
1816
|
disabled,
|
|
1778
1817
|
required,
|
|
1779
|
-
children: /* @__PURE__ */
|
|
1818
|
+
children: /* @__PURE__ */ jsx26(StyledThumb, {})
|
|
1780
1819
|
}
|
|
1781
1820
|
),
|
|
1782
|
-
label && /* @__PURE__ */
|
|
1821
|
+
label && /* @__PURE__ */ jsx26(Label2, { htmlFor: id, children: label })
|
|
1783
1822
|
] }),
|
|
1784
|
-
errorMessage && /* @__PURE__ */
|
|
1823
|
+
errorMessage && /* @__PURE__ */ jsx26(Span4, { children: errorMessage })
|
|
1785
1824
|
] });
|
|
1786
1825
|
};
|
|
1787
1826
|
|
|
@@ -1867,9 +1906,9 @@ var TabsContent = styled(Tabs.Content, {
|
|
|
1867
1906
|
});
|
|
1868
1907
|
|
|
1869
1908
|
// src/components/Tabs/index.tsx
|
|
1870
|
-
import { Fragment, jsx as
|
|
1909
|
+
import { Fragment, jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1871
1910
|
var TabsItem = ({ children }) => {
|
|
1872
|
-
return /* @__PURE__ */
|
|
1911
|
+
return /* @__PURE__ */ jsx27(Fragment, { children });
|
|
1873
1912
|
};
|
|
1874
1913
|
var Tabs2 = ({ defaultValue, colorContent, children }) => {
|
|
1875
1914
|
const items = [];
|
|
@@ -1926,21 +1965,21 @@ var Tabs2 = ({ defaultValue, colorContent, children }) => {
|
|
|
1926
1965
|
ref: rootRef,
|
|
1927
1966
|
children: [
|
|
1928
1967
|
/* @__PURE__ */ jsxs10("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
1929
|
-
hasOverflow && /* @__PURE__ */
|
|
1968
|
+
hasOverflow && /* @__PURE__ */ jsx27(
|
|
1930
1969
|
Button,
|
|
1931
1970
|
{
|
|
1932
1971
|
variant: "secondary",
|
|
1933
1972
|
size: "sm",
|
|
1934
1973
|
onClick: () => scroll("left"),
|
|
1935
|
-
children: /* @__PURE__ */
|
|
1974
|
+
children: /* @__PURE__ */ jsx27(Icon, { name: "TriangleLeft", size: 64 })
|
|
1936
1975
|
}
|
|
1937
1976
|
),
|
|
1938
|
-
/* @__PURE__ */
|
|
1977
|
+
/* @__PURE__ */ jsx27(
|
|
1939
1978
|
TabsList,
|
|
1940
1979
|
{
|
|
1941
1980
|
ref: listRef,
|
|
1942
1981
|
scrollable: hasOverflow,
|
|
1943
|
-
children: items.map((item) => /* @__PURE__ */
|
|
1982
|
+
children: items.map((item) => /* @__PURE__ */ jsx27(
|
|
1944
1983
|
TabsTrigger,
|
|
1945
1984
|
{
|
|
1946
1985
|
value: item.value,
|
|
@@ -1951,17 +1990,17 @@ var Tabs2 = ({ defaultValue, colorContent, children }) => {
|
|
|
1951
1990
|
))
|
|
1952
1991
|
}
|
|
1953
1992
|
),
|
|
1954
|
-
hasOverflow && /* @__PURE__ */
|
|
1993
|
+
hasOverflow && /* @__PURE__ */ jsx27(
|
|
1955
1994
|
Button,
|
|
1956
1995
|
{
|
|
1957
1996
|
variant: "secondary",
|
|
1958
1997
|
size: "sm",
|
|
1959
1998
|
onClick: () => scroll("right"),
|
|
1960
|
-
children: /* @__PURE__ */
|
|
1999
|
+
children: /* @__PURE__ */ jsx27(Icon, { name: "TriangleRight", size: 64 })
|
|
1961
2000
|
}
|
|
1962
2001
|
)
|
|
1963
2002
|
] }),
|
|
1964
|
-
items.map((item) => /* @__PURE__ */
|
|
2003
|
+
items.map((item) => /* @__PURE__ */ jsx27(
|
|
1965
2004
|
TabsContent,
|
|
1966
2005
|
{
|
|
1967
2006
|
colorContent,
|
|
@@ -1977,7 +2016,7 @@ var Tabs2 = ({ defaultValue, colorContent, children }) => {
|
|
|
1977
2016
|
Tabs2.Item = TabsItem;
|
|
1978
2017
|
|
|
1979
2018
|
// src/components/TextArea.tsx
|
|
1980
|
-
import { jsx as
|
|
2019
|
+
import { jsx as jsx28, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1981
2020
|
var Wrapper4 = styled("div", {
|
|
1982
2021
|
display: "flex",
|
|
1983
2022
|
flexDirection: "column"
|
|
@@ -2055,9 +2094,9 @@ var Span5 = styled("span", {
|
|
|
2055
2094
|
var TextArea = ({ label, id, htmlFor, errorMessage, ...props }) => {
|
|
2056
2095
|
const textAreaId = id || htmlFor || `textarea-${crypto.randomUUID()}`;
|
|
2057
2096
|
return /* @__PURE__ */ jsxs11(Wrapper4, { children: [
|
|
2058
|
-
label && /* @__PURE__ */
|
|
2059
|
-
/* @__PURE__ */
|
|
2060
|
-
errorMessage && /* @__PURE__ */
|
|
2097
|
+
label && /* @__PURE__ */ jsx28(StyledLabel2, { htmlFor: textAreaId, children: label }),
|
|
2098
|
+
/* @__PURE__ */ jsx28(TextAreaElement, { id: textAreaId, ...props, hasError: !!errorMessage }),
|
|
2099
|
+
errorMessage && /* @__PURE__ */ jsx28(Span5, { children: errorMessage })
|
|
2061
2100
|
] });
|
|
2062
2101
|
};
|
|
2063
2102
|
TextArea.displayName = "TextArea";
|
|
@@ -2113,7 +2152,7 @@ var TooltipArrow = styled(RadixTooltip.Arrow, {
|
|
|
2113
2152
|
});
|
|
2114
2153
|
|
|
2115
2154
|
// src/components/Tooltip/index.tsx
|
|
2116
|
-
import { jsx as
|
|
2155
|
+
import { jsx as jsx29, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2117
2156
|
var Tooltip = ({
|
|
2118
2157
|
content,
|
|
2119
2158
|
children,
|
|
@@ -2123,18 +2162,218 @@ var Tooltip = ({
|
|
|
2123
2162
|
onOpenChange,
|
|
2124
2163
|
delayDuration = 100
|
|
2125
2164
|
}) => {
|
|
2126
|
-
return /* @__PURE__ */
|
|
2127
|
-
/* @__PURE__ */
|
|
2165
|
+
return /* @__PURE__ */ jsx29(RadixTooltip2.Provider, { children: /* @__PURE__ */ jsxs12(RadixTooltip2.Root, { open, onOpenChange, delayDuration, children: [
|
|
2166
|
+
/* @__PURE__ */ jsx29(TooltipTrigger, { asChild: true, children }),
|
|
2128
2167
|
/* @__PURE__ */ jsxs12(TooltipContent, { side, sideOffset, children: [
|
|
2129
2168
|
content,
|
|
2130
|
-
/* @__PURE__ */
|
|
2169
|
+
/* @__PURE__ */ jsx29(TooltipArrow, {})
|
|
2131
2170
|
] })
|
|
2132
2171
|
] }) });
|
|
2133
2172
|
};
|
|
2134
2173
|
Tooltip.displayName = "Tooltip";
|
|
2135
2174
|
|
|
2175
|
+
// src/components/Loader/style.ts
|
|
2176
|
+
var Content4 = styled("div", {
|
|
2177
|
+
position: "relative",
|
|
2178
|
+
height: "100%",
|
|
2179
|
+
width: "100%",
|
|
2180
|
+
minHeight: "inherit",
|
|
2181
|
+
top: 0,
|
|
2182
|
+
left: 0,
|
|
2183
|
+
backgroundColor: "YellowGreen"
|
|
2184
|
+
});
|
|
2185
|
+
var Overlay2 = styled("div", {
|
|
2186
|
+
display: "flex",
|
|
2187
|
+
justifyContent: "center",
|
|
2188
|
+
alignItems: "center",
|
|
2189
|
+
backgroundColor: "rgba(255, 255, 255, 0.6)",
|
|
2190
|
+
zIndex: 999,
|
|
2191
|
+
transition: "opacity 0.3s ease-in-out",
|
|
2192
|
+
variants: {
|
|
2193
|
+
show: {
|
|
2194
|
+
true: {
|
|
2195
|
+
opacity: 1,
|
|
2196
|
+
pointerEvents: "auto"
|
|
2197
|
+
},
|
|
2198
|
+
false: {
|
|
2199
|
+
opacity: 0,
|
|
2200
|
+
pointerEvents: "none"
|
|
2201
|
+
}
|
|
2202
|
+
},
|
|
2203
|
+
fullscreen: {
|
|
2204
|
+
true: {
|
|
2205
|
+
position: "fixed",
|
|
2206
|
+
top: 0,
|
|
2207
|
+
left: 0,
|
|
2208
|
+
right: 0,
|
|
2209
|
+
bottom: 0
|
|
2210
|
+
},
|
|
2211
|
+
false: {
|
|
2212
|
+
position: "absolute",
|
|
2213
|
+
top: 0,
|
|
2214
|
+
left: 0,
|
|
2215
|
+
width: "100%",
|
|
2216
|
+
height: "100%"
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
});
|
|
2221
|
+
var SpinnerContainer = styled("div", {
|
|
2222
|
+
position: "relative"
|
|
2223
|
+
});
|
|
2224
|
+
var rotation = keyframes({
|
|
2225
|
+
"0%": { transform: "rotate(0deg)" },
|
|
2226
|
+
"100%": { transform: "rotate(360deg)" }
|
|
2227
|
+
});
|
|
2228
|
+
var Spinner = styled("span", {
|
|
2229
|
+
width: "$19",
|
|
2230
|
+
height: "$19",
|
|
2231
|
+
borderRadius: "50%",
|
|
2232
|
+
display: "inline-block",
|
|
2233
|
+
borderTop: "6px solid $ignite_light",
|
|
2234
|
+
borderRight: "6px solid transparent",
|
|
2235
|
+
boxSizing: "border-box",
|
|
2236
|
+
animation: `${rotation} 1s linear infinite`,
|
|
2237
|
+
"&::after": {
|
|
2238
|
+
content: '""',
|
|
2239
|
+
boxSizing: "border-box",
|
|
2240
|
+
position: "absolute",
|
|
2241
|
+
left: 0,
|
|
2242
|
+
top: 0,
|
|
2243
|
+
width: "$19",
|
|
2244
|
+
height: "$19",
|
|
2245
|
+
borderRadius: "50%",
|
|
2246
|
+
borderLeft: "6px solid $clickpalm_light",
|
|
2247
|
+
borderBottom: "6px solid transparent",
|
|
2248
|
+
animation: `${rotation} 0.5s linear infinite reverse`
|
|
2249
|
+
}
|
|
2250
|
+
});
|
|
2251
|
+
|
|
2252
|
+
// src/components/Loader/index.tsx
|
|
2253
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2254
|
+
var Loader = ({ show, fullscreen = false }) => {
|
|
2255
|
+
return /* @__PURE__ */ jsx30(Overlay2, { show, fullscreen, children: /* @__PURE__ */ jsx30(SpinnerContainer, { children: /* @__PURE__ */ jsx30(Spinner, {}) }) });
|
|
2256
|
+
};
|
|
2257
|
+
Loader.displayName = "Loader";
|
|
2258
|
+
|
|
2259
|
+
// src/components/MaskedInput/index.tsx
|
|
2260
|
+
import { forwardRef as forwardRef5, useState as useState5, useRef as useRef5 } from "react";
|
|
2261
|
+
|
|
2262
|
+
// src/components/MaskedInput/utils.ts
|
|
2263
|
+
var MAX_LENGTHS = {
|
|
2264
|
+
cellPhone: 15,
|
|
2265
|
+
homePhone: 14,
|
|
2266
|
+
cep: 9,
|
|
2267
|
+
cpf: 14,
|
|
2268
|
+
cnpj: 18,
|
|
2269
|
+
date: 10
|
|
2270
|
+
};
|
|
2271
|
+
var applyMask = (value, maskType) => {
|
|
2272
|
+
const digits = value.replace(/\D/g, "");
|
|
2273
|
+
const maxLength = MAX_LENGTHS[maskType];
|
|
2274
|
+
if (digits.length > maxLength) {
|
|
2275
|
+
return value.slice(0, -1);
|
|
2276
|
+
}
|
|
2277
|
+
switch (maskType) {
|
|
2278
|
+
case "cellPhone":
|
|
2279
|
+
if (digits.length <= 2)
|
|
2280
|
+
return digits;
|
|
2281
|
+
if (digits.length <= 7)
|
|
2282
|
+
return `(${digits.slice(0, 2)}) ${digits.slice(2)}`;
|
|
2283
|
+
return `(${digits.slice(0, 2)}) ${digits.slice(2, 7)}-${digits.slice(7, 11)}`;
|
|
2284
|
+
case "homePhone":
|
|
2285
|
+
if (digits.length <= 2)
|
|
2286
|
+
return digits;
|
|
2287
|
+
if (digits.length <= 6)
|
|
2288
|
+
return `(${digits.slice(0, 2)}) ${digits.slice(2)}`;
|
|
2289
|
+
return `(${digits.slice(0, 2)}) ${digits.slice(2, 6)}-${digits.slice(6, 10)}`;
|
|
2290
|
+
case "cep":
|
|
2291
|
+
if (digits.length <= 5)
|
|
2292
|
+
return digits;
|
|
2293
|
+
return `${digits.slice(0, 5)}-${digits.slice(5, 8)}`;
|
|
2294
|
+
case "cpf":
|
|
2295
|
+
if (digits.length <= 3)
|
|
2296
|
+
return digits;
|
|
2297
|
+
if (digits.length <= 6)
|
|
2298
|
+
return `${digits.slice(0, 3)}.${digits.slice(3)}`;
|
|
2299
|
+
if (digits.length <= 9)
|
|
2300
|
+
return `${digits.slice(0, 3)}.${digits.slice(3, 6)}.${digits.slice(6)}`;
|
|
2301
|
+
return `${digits.slice(0, 3)}.${digits.slice(3, 6)}.${digits.slice(6, 9)}-${digits.slice(9, 11)}`;
|
|
2302
|
+
case "cnpj":
|
|
2303
|
+
if (digits.length <= 2)
|
|
2304
|
+
return digits;
|
|
2305
|
+
if (digits.length <= 5)
|
|
2306
|
+
return `${digits.slice(0, 2)}.${digits.slice(2)}`;
|
|
2307
|
+
if (digits.length <= 8)
|
|
2308
|
+
return `${digits.slice(0, 2)}.${digits.slice(2, 5)}.${digits.slice(5)}`;
|
|
2309
|
+
if (digits.length <= 12)
|
|
2310
|
+
return `${digits.slice(0, 2)}.${digits.slice(2, 5)}.${digits.slice(5, 8)}/${digits.slice(8)}`;
|
|
2311
|
+
return `${digits.slice(0, 2)}.${digits.slice(2, 5)}.${digits.slice(5, 8)}/${digits.slice(8, 12)}-${digits.slice(12, 14)}`;
|
|
2312
|
+
case "date":
|
|
2313
|
+
if (digits.length <= 2)
|
|
2314
|
+
return digits;
|
|
2315
|
+
if (digits.length <= 4)
|
|
2316
|
+
return `${digits.slice(0, 2)}/${digits.slice(2)}`;
|
|
2317
|
+
return `${digits.slice(0, 2)}/${digits.slice(2, 4)}/${digits.slice(4, 8)}`;
|
|
2318
|
+
default:
|
|
2319
|
+
return value;
|
|
2320
|
+
}
|
|
2321
|
+
};
|
|
2322
|
+
|
|
2323
|
+
// src/components/MaskedInput/index.tsx
|
|
2324
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2325
|
+
var MaskedInput = forwardRef5(
|
|
2326
|
+
({ maskType, onChange, ...props }, ref) => {
|
|
2327
|
+
const [value, setValue] = useState5("");
|
|
2328
|
+
const inputRef = useRef5(null);
|
|
2329
|
+
const handleChange = (e) => {
|
|
2330
|
+
const { value: inputValue, selectionStart } = e.target;
|
|
2331
|
+
const isBackspace = value.length > inputValue.length;
|
|
2332
|
+
const rawValue = inputValue.replace(/\D/g, "");
|
|
2333
|
+
const maskedValue = applyMask(rawValue, maskType);
|
|
2334
|
+
setValue(maskedValue);
|
|
2335
|
+
if (inputRef.current && selectionStart !== null) {
|
|
2336
|
+
let newCursorPos = selectionStart;
|
|
2337
|
+
if (isBackspace && value.length > 0) {
|
|
2338
|
+
const prevChar = value[selectionStart || 0];
|
|
2339
|
+
if (prevChar && !/\d/.test(prevChar)) {
|
|
2340
|
+
newCursorPos = Math.max(0, (selectionStart || 0) - 1);
|
|
2341
|
+
}
|
|
2342
|
+
}
|
|
2343
|
+
setTimeout(() => {
|
|
2344
|
+
if (inputRef.current) {
|
|
2345
|
+
inputRef.current.setSelectionRange(newCursorPos, newCursorPos);
|
|
2346
|
+
}
|
|
2347
|
+
}, 0);
|
|
2348
|
+
}
|
|
2349
|
+
if (onChange) {
|
|
2350
|
+
const syntheticEvent = {
|
|
2351
|
+
...e,
|
|
2352
|
+
target: {
|
|
2353
|
+
...e.target,
|
|
2354
|
+
value: maskedValue,
|
|
2355
|
+
rawValue
|
|
2356
|
+
}
|
|
2357
|
+
};
|
|
2358
|
+
onChange(syntheticEvent);
|
|
2359
|
+
}
|
|
2360
|
+
};
|
|
2361
|
+
return /* @__PURE__ */ jsx31(
|
|
2362
|
+
Input2,
|
|
2363
|
+
{
|
|
2364
|
+
...props,
|
|
2365
|
+
ref,
|
|
2366
|
+
value,
|
|
2367
|
+
onChange: handleChange,
|
|
2368
|
+
maxLength: MAX_LENGTHS[maskType]
|
|
2369
|
+
}
|
|
2370
|
+
);
|
|
2371
|
+
}
|
|
2372
|
+
);
|
|
2373
|
+
MaskedInput.displayName = "MaskedInput";
|
|
2374
|
+
|
|
2136
2375
|
// src/components/Box.tsx
|
|
2137
|
-
import { jsx as
|
|
2376
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2138
2377
|
var StyledBox = styled("div", {
|
|
2139
2378
|
padding: "$5",
|
|
2140
2379
|
borderRadius: "$md",
|
|
@@ -2156,13 +2395,13 @@ var StyledBox = styled("div", {
|
|
|
2156
2395
|
}
|
|
2157
2396
|
});
|
|
2158
2397
|
var Box = (props) => {
|
|
2159
|
-
return /* @__PURE__ */
|
|
2398
|
+
return /* @__PURE__ */ jsx32(StyledBox, { ...props });
|
|
2160
2399
|
};
|
|
2161
2400
|
Box.displayName = "Box";
|
|
2162
2401
|
|
|
2163
|
-
// src/components/
|
|
2164
|
-
import { jsx as
|
|
2165
|
-
var
|
|
2402
|
+
// src/components/Paragraph.tsx
|
|
2403
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2404
|
+
var StyledParagraph = styled("p", {
|
|
2166
2405
|
fontFamily: "$default",
|
|
2167
2406
|
lineHeight: "$short",
|
|
2168
2407
|
margin: 0,
|
|
@@ -2201,13 +2440,15 @@ var StyledText = styled("p", {
|
|
|
2201
2440
|
lineHeight: "short"
|
|
2202
2441
|
}
|
|
2203
2442
|
});
|
|
2204
|
-
var
|
|
2205
|
-
return /* @__PURE__ */
|
|
2443
|
+
var Paragraph = (props) => {
|
|
2444
|
+
return /* @__PURE__ */ jsx33(StyledParagraph, { ...props });
|
|
2206
2445
|
};
|
|
2207
|
-
|
|
2446
|
+
Paragraph.displayName = "Paragraph";
|
|
2208
2447
|
|
|
2209
2448
|
// src/components/Heading.tsx
|
|
2210
|
-
|
|
2449
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
2450
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2451
|
+
var StyledHeading = styled("h2", {
|
|
2211
2452
|
fontFamily: "$default",
|
|
2212
2453
|
lineHeight: "$shorter",
|
|
2213
2454
|
margin: 0,
|
|
@@ -2228,12 +2469,15 @@ var Heading = styled("h2", {
|
|
|
2228
2469
|
size: "md"
|
|
2229
2470
|
}
|
|
2230
2471
|
});
|
|
2472
|
+
var Heading = forwardRef6(function Heading2({ children, ...props }, ref) {
|
|
2473
|
+
return /* @__PURE__ */ jsx34(StyledHeading, { ref, ...props, children });
|
|
2474
|
+
});
|
|
2231
2475
|
Heading.displayName = "Heading";
|
|
2232
2476
|
|
|
2233
2477
|
// src/components/Select/index.tsx
|
|
2234
2478
|
import { TriangleDownIcon, TriangleUpIcon } from "@radix-ui/react-icons";
|
|
2235
2479
|
import * as CustomSelect from "@radix-ui/react-select";
|
|
2236
|
-
import { useState as
|
|
2480
|
+
import { useState as useState6 } from "react";
|
|
2237
2481
|
|
|
2238
2482
|
// src/components/Select/styles.ts
|
|
2239
2483
|
import * as Select from "@radix-ui/react-select";
|
|
@@ -2255,7 +2499,7 @@ var StyledTrigger = styled(Select.Trigger, {
|
|
|
2255
2499
|
alignItems: "center",
|
|
2256
2500
|
justifyContent: "space-between",
|
|
2257
2501
|
marginBottom: "$6",
|
|
2258
|
-
padding: "$
|
|
2502
|
+
padding: "$4 $4",
|
|
2259
2503
|
boxSizing: "border-box",
|
|
2260
2504
|
borderRadius: "$md",
|
|
2261
2505
|
border: "1px solid $gray_mid",
|
|
@@ -2350,7 +2594,7 @@ var Span6 = styled("span", {
|
|
|
2350
2594
|
});
|
|
2351
2595
|
|
|
2352
2596
|
// src/components/Select/index.tsx
|
|
2353
|
-
import { jsx as
|
|
2597
|
+
import { jsx as jsx35, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2354
2598
|
function Select2({
|
|
2355
2599
|
value,
|
|
2356
2600
|
onValueChange,
|
|
@@ -2360,9 +2604,9 @@ function Select2({
|
|
|
2360
2604
|
errorMessage,
|
|
2361
2605
|
...rest
|
|
2362
2606
|
}) {
|
|
2363
|
-
const [open, setOpen] =
|
|
2607
|
+
const [open, setOpen] = useState6(false);
|
|
2364
2608
|
return /* @__PURE__ */ jsxs13(StyledWrapper4, { children: [
|
|
2365
|
-
label && /* @__PURE__ */
|
|
2609
|
+
label && /* @__PURE__ */ jsx35(Label3, { children: label }),
|
|
2366
2610
|
/* @__PURE__ */ jsxs13(
|
|
2367
2611
|
CustomSelect.Root,
|
|
2368
2612
|
{
|
|
@@ -2372,20 +2616,20 @@ function Select2({
|
|
|
2372
2616
|
...rest,
|
|
2373
2617
|
children: [
|
|
2374
2618
|
/* @__PURE__ */ jsxs13(StyledTrigger, { "aria-label": label, hasError: !!errorMessage, children: [
|
|
2375
|
-
/* @__PURE__ */
|
|
2376
|
-
/* @__PURE__ */
|
|
2619
|
+
/* @__PURE__ */ jsx35(CustomSelect.Value, { placeholder }),
|
|
2620
|
+
/* @__PURE__ */ jsx35(StyledIcon, { open, children: /* @__PURE__ */ jsx35(TriangleDownIcon, {}) })
|
|
2377
2621
|
] }),
|
|
2378
|
-
errorMessage && /* @__PURE__ */
|
|
2379
|
-
/* @__PURE__ */
|
|
2622
|
+
errorMessage && /* @__PURE__ */ jsx35(Span6, { children: errorMessage }),
|
|
2623
|
+
/* @__PURE__ */ jsx35(CustomSelect.Portal, { children: /* @__PURE__ */ jsxs13(
|
|
2380
2624
|
StyledContent2,
|
|
2381
2625
|
{
|
|
2382
2626
|
side: "bottom",
|
|
2383
2627
|
align: "start",
|
|
2384
2628
|
position: "popper",
|
|
2385
2629
|
children: [
|
|
2386
|
-
/* @__PURE__ */
|
|
2387
|
-
/* @__PURE__ */
|
|
2388
|
-
/* @__PURE__ */
|
|
2630
|
+
/* @__PURE__ */ jsx35(CustomSelect.ScrollUpButton, { children: /* @__PURE__ */ jsx35(TriangleUpIcon, {}) }),
|
|
2631
|
+
/* @__PURE__ */ jsx35(StyledViewport, { children: items.map((item) => /* @__PURE__ */ jsx35(StyledItem2, { value: item.value, children: /* @__PURE__ */ jsx35(CustomSelect.ItemText, { children: item.label }) }, item.value)) }),
|
|
2632
|
+
/* @__PURE__ */ jsx35(CustomSelect.ScrollDownButton, { children: /* @__PURE__ */ jsx35(TriangleDownIcon, {}) })
|
|
2389
2633
|
]
|
|
2390
2634
|
}
|
|
2391
2635
|
) })
|
|
@@ -2462,9 +2706,9 @@ var Value2 = styled("div", {
|
|
|
2462
2706
|
});
|
|
2463
2707
|
|
|
2464
2708
|
// src/components/LabelledValue/index.tsx
|
|
2465
|
-
import { jsx as
|
|
2709
|
+
import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2466
2710
|
function LabelledValue({ position = "vertical", withRow = false, children }) {
|
|
2467
|
-
return /* @__PURE__ */
|
|
2711
|
+
return /* @__PURE__ */ jsx36(Container, { position, children: Children2.map(children, (child) => {
|
|
2468
2712
|
if (isValidElement2(child)) {
|
|
2469
2713
|
return cloneElement(child, { position, withRow });
|
|
2470
2714
|
}
|
|
@@ -2473,8 +2717,8 @@ function LabelledValue({ position = "vertical", withRow = false, children }) {
|
|
|
2473
2717
|
}
|
|
2474
2718
|
function Item3({ label, value, position = "vertical", withRow = false }) {
|
|
2475
2719
|
return /* @__PURE__ */ jsxs14(ItemWrapper, { position, withRow, children: [
|
|
2476
|
-
/* @__PURE__ */
|
|
2477
|
-
/* @__PURE__ */
|
|
2720
|
+
/* @__PURE__ */ jsx36(Label4, { children: label }),
|
|
2721
|
+
/* @__PURE__ */ jsx36(Value2, { children: value })
|
|
2478
2722
|
] });
|
|
2479
2723
|
}
|
|
2480
2724
|
LabelledValue.Item = Item3;
|
|
@@ -2484,14 +2728,18 @@ import * as OneTimePasswordField2 from "@radix-ui/react-one-time-password-field"
|
|
|
2484
2728
|
|
|
2485
2729
|
// src/components/OneTimePassword/styles.ts
|
|
2486
2730
|
import * as OneTimePasswordField from "@radix-ui/react-one-time-password-field";
|
|
2487
|
-
var
|
|
2731
|
+
var Container2 = styled("div", {
|
|
2488
2732
|
display: "flex",
|
|
2489
2733
|
flexDirection: "column",
|
|
2490
2734
|
justifyContent: "center",
|
|
2491
2735
|
alignItems: "center",
|
|
2492
|
-
gap: "$5",
|
|
2493
2736
|
marginBottom: "$6"
|
|
2494
2737
|
});
|
|
2738
|
+
var StyledWrapper5 = styled("div", {
|
|
2739
|
+
display: "flex",
|
|
2740
|
+
flexDirection: "column",
|
|
2741
|
+
gap: "$5"
|
|
2742
|
+
});
|
|
2495
2743
|
var StyledRoot4 = styled(OneTimePasswordField.Root, {
|
|
2496
2744
|
display: "flex",
|
|
2497
2745
|
gap: "$2",
|
|
@@ -2507,7 +2755,7 @@ var StyledInput = styled(OneTimePasswordField.Input, {
|
|
|
2507
2755
|
boxSizing: "border-box",
|
|
2508
2756
|
borderRadius: "$md",
|
|
2509
2757
|
borderStyle: "solid",
|
|
2510
|
-
borderColor: "
|
|
2758
|
+
borderColor: "$gray_mid",
|
|
2511
2759
|
borderWidth: "3px",
|
|
2512
2760
|
fontSize: "$md",
|
|
2513
2761
|
color: "$black",
|
|
@@ -2521,31 +2769,44 @@ var StyledInput = styled(OneTimePasswordField.Input, {
|
|
|
2521
2769
|
borderColor: "$clickpalm_mid"
|
|
2522
2770
|
}
|
|
2523
2771
|
});
|
|
2772
|
+
var Span7 = styled("span", {
|
|
2773
|
+
fontFamily: "$default",
|
|
2774
|
+
fontWeight: "$regular",
|
|
2775
|
+
fontSize: "$sm",
|
|
2776
|
+
color: "$danger_dark",
|
|
2777
|
+
alignSelf: "flex-start",
|
|
2778
|
+
paddingLeft: "1px",
|
|
2779
|
+
marginTop: "2px",
|
|
2780
|
+
marginBottom: "$6"
|
|
2781
|
+
});
|
|
2524
2782
|
|
|
2525
2783
|
// src/components/OneTimePassword/index.tsx
|
|
2526
|
-
import { jsx as
|
|
2527
|
-
var OneTimePassword = ({ label, length, value, onValueChange, ...rootProps }) => {
|
|
2528
|
-
return /* @__PURE__ */ jsxs15(
|
|
2529
|
-
/* @__PURE__ */
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2784
|
+
import { jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2785
|
+
var OneTimePassword = ({ label, length, value, errorMessage, onValueChange, ...rootProps }) => {
|
|
2786
|
+
return /* @__PURE__ */ jsxs15(Container2, { children: [
|
|
2787
|
+
/* @__PURE__ */ jsxs15(StyledWrapper5, { children: [
|
|
2788
|
+
/* @__PURE__ */ jsx37("label", { children: label }),
|
|
2789
|
+
/* @__PURE__ */ jsxs15(
|
|
2790
|
+
StyledRoot4,
|
|
2791
|
+
{
|
|
2792
|
+
value,
|
|
2793
|
+
onValueChange,
|
|
2794
|
+
...rootProps,
|
|
2795
|
+
children: [
|
|
2796
|
+
Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx37(StyledInput, {}, index)),
|
|
2797
|
+
/* @__PURE__ */ jsx37(OneTimePasswordField2.HiddenInput, {})
|
|
2798
|
+
]
|
|
2799
|
+
}
|
|
2800
|
+
)
|
|
2801
|
+
] }),
|
|
2802
|
+
errorMessage && /* @__PURE__ */ jsx37(Span7, { children: errorMessage })
|
|
2542
2803
|
] });
|
|
2543
2804
|
};
|
|
2544
2805
|
OneTimePassword.displayName = "OneTimePasswordInput";
|
|
2545
2806
|
|
|
2546
2807
|
// src/components/Toast/index.tsx
|
|
2547
2808
|
import * as ToastPrimitive2 from "@radix-ui/react-toast";
|
|
2548
|
-
import * as
|
|
2809
|
+
import * as React3 from "react";
|
|
2549
2810
|
|
|
2550
2811
|
// src/components/Toast/styles.ts
|
|
2551
2812
|
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
@@ -2708,11 +2969,11 @@ var toast = {
|
|
|
2708
2969
|
};
|
|
2709
2970
|
|
|
2710
2971
|
// src/components/Toast/index.tsx
|
|
2711
|
-
import { jsx as
|
|
2972
|
+
import { jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2712
2973
|
var Toast = () => {
|
|
2713
|
-
const [messages, setMessages] =
|
|
2714
|
-
const [paused, setPaused] =
|
|
2715
|
-
|
|
2974
|
+
const [messages, setMessages] = React3.useState([]);
|
|
2975
|
+
const [paused, setPaused] = React3.useState(false);
|
|
2976
|
+
React3.useEffect(() => {
|
|
2716
2977
|
const handleNewToast = (msg) => {
|
|
2717
2978
|
setMessages((prev) => [...prev, msg]);
|
|
2718
2979
|
};
|
|
@@ -2739,10 +3000,10 @@ var Toast = () => {
|
|
|
2739
3000
|
onResume: () => setPaused(false),
|
|
2740
3001
|
children: [
|
|
2741
3002
|
/* @__PURE__ */ jsxs16(ToastContent, { children: [
|
|
2742
|
-
/* @__PURE__ */
|
|
2743
|
-
/* @__PURE__ */
|
|
3003
|
+
/* @__PURE__ */ jsx38(ToastTitle, { children: message.title }),
|
|
3004
|
+
message.description && /* @__PURE__ */ jsx38(ToastDescription, { children: message.description })
|
|
2744
3005
|
] }),
|
|
2745
|
-
/* @__PURE__ */
|
|
3006
|
+
/* @__PURE__ */ jsx38(ToastAction, { altText: "Fechar", asChild: true, children: /* @__PURE__ */ jsx38(
|
|
2746
3007
|
"button",
|
|
2747
3008
|
{
|
|
2748
3009
|
style: {
|
|
@@ -2752,15 +3013,15 @@ var Toast = () => {
|
|
|
2752
3013
|
alignItems: "center"
|
|
2753
3014
|
},
|
|
2754
3015
|
onClick: () => removeToast(message.id),
|
|
2755
|
-
children: /* @__PURE__ */
|
|
3016
|
+
children: /* @__PURE__ */ jsx38(Icon, { name: "Closed", size: 16, height: 14, width: 14 })
|
|
2756
3017
|
}
|
|
2757
3018
|
) }),
|
|
2758
|
-
/* @__PURE__ */
|
|
3019
|
+
/* @__PURE__ */ jsx38(ToastProgress, { paused, variant: message.variant })
|
|
2759
3020
|
]
|
|
2760
3021
|
},
|
|
2761
3022
|
message.id
|
|
2762
3023
|
)),
|
|
2763
|
-
/* @__PURE__ */
|
|
3024
|
+
/* @__PURE__ */ jsx38(ToastViewport, {})
|
|
2764
3025
|
] });
|
|
2765
3026
|
};
|
|
2766
3027
|
|
|
@@ -2795,7 +3056,7 @@ var StepItem = styled("div", {
|
|
|
2795
3056
|
textAlign: "center"
|
|
2796
3057
|
},
|
|
2797
3058
|
vertical: {
|
|
2798
|
-
margin: "$
|
|
3059
|
+
margin: "$2 0",
|
|
2799
3060
|
flexDirection: "row"
|
|
2800
3061
|
}
|
|
2801
3062
|
}
|
|
@@ -2834,7 +3095,7 @@ var StepCircle = styled("div", {
|
|
|
2834
3095
|
left: "50%",
|
|
2835
3096
|
transform: "translate(-50%, -100%)",
|
|
2836
3097
|
width: "3px",
|
|
2837
|
-
height: "$
|
|
3098
|
+
height: "$4",
|
|
2838
3099
|
backgroundColor: "$clickpalm_dark"
|
|
2839
3100
|
},
|
|
2840
3101
|
"&::after": {
|
|
@@ -2844,7 +3105,7 @@ var StepCircle = styled("div", {
|
|
|
2844
3105
|
left: "50%",
|
|
2845
3106
|
transform: "translate(-50%, 100%)",
|
|
2846
3107
|
width: "3px",
|
|
2847
|
-
height: "$
|
|
3108
|
+
height: "$4",
|
|
2848
3109
|
backgroundColor: "$clickpalm_dark"
|
|
2849
3110
|
}
|
|
2850
3111
|
}
|
|
@@ -2996,14 +3257,14 @@ var StepLabel = styled("span", {
|
|
|
2996
3257
|
});
|
|
2997
3258
|
|
|
2998
3259
|
// src/components/MultiStep/index.tsx
|
|
2999
|
-
import { jsx as
|
|
3260
|
+
import { jsx as jsx39, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3000
3261
|
var MultiStep = ({
|
|
3001
3262
|
steps,
|
|
3002
3263
|
currentStep,
|
|
3003
3264
|
orientation = "horizontal",
|
|
3004
3265
|
variant
|
|
3005
3266
|
}) => {
|
|
3006
|
-
return /* @__PURE__ */
|
|
3267
|
+
return /* @__PURE__ */ jsx39(
|
|
3007
3268
|
Wrapper5,
|
|
3008
3269
|
{
|
|
3009
3270
|
orientation,
|
|
@@ -3011,7 +3272,7 @@ var MultiStep = ({
|
|
|
3011
3272
|
const isFirst = index === 0;
|
|
3012
3273
|
const isLast = index === steps.length - 1;
|
|
3013
3274
|
return /* @__PURE__ */ jsxs17(StepItem, { orientation, children: [
|
|
3014
|
-
/* @__PURE__ */
|
|
3275
|
+
/* @__PURE__ */ jsx39(
|
|
3015
3276
|
StepCircle,
|
|
3016
3277
|
{
|
|
3017
3278
|
orientation,
|
|
@@ -3022,7 +3283,7 @@ var MultiStep = ({
|
|
|
3022
3283
|
children: index + 1
|
|
3023
3284
|
}
|
|
3024
3285
|
),
|
|
3025
|
-
/* @__PURE__ */
|
|
3286
|
+
/* @__PURE__ */ jsx39(
|
|
3026
3287
|
StepLabel,
|
|
3027
3288
|
{
|
|
3028
3289
|
orientation,
|
|
@@ -3038,7 +3299,7 @@ var MultiStep = ({
|
|
|
3038
3299
|
MultiStep.displayName = "MultiStep";
|
|
3039
3300
|
|
|
3040
3301
|
// src/components/Carousel/index.tsx
|
|
3041
|
-
import { useState as
|
|
3302
|
+
import { useState as useState8, Children as Children3, cloneElement as cloneElement2 } from "react";
|
|
3042
3303
|
|
|
3043
3304
|
// src/components/Carousel/styles.ts
|
|
3044
3305
|
var CarouselContainer = styled("div", {
|
|
@@ -3144,13 +3405,13 @@ var CarouselItemContainer = styled("div", {
|
|
|
3144
3405
|
});
|
|
3145
3406
|
|
|
3146
3407
|
// src/components/Carousel/index.tsx
|
|
3147
|
-
import { jsx as
|
|
3408
|
+
import { jsx as jsx40, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3148
3409
|
var SWIPE_THRESHOLD = 50;
|
|
3149
3410
|
var Carousel = ({ title, variant, children }) => {
|
|
3150
3411
|
const items = Children3.toArray(children);
|
|
3151
|
-
const [activeIndex, setActiveIndex] =
|
|
3152
|
-
const [touchStartX, setTouchStartX] =
|
|
3153
|
-
const [touchEndX, setTouchEndX] =
|
|
3412
|
+
const [activeIndex, setActiveIndex] = useState8(0);
|
|
3413
|
+
const [touchStartX, setTouchStartX] = useState8(null);
|
|
3414
|
+
const [touchEndX, setTouchEndX] = useState8(null);
|
|
3154
3415
|
const prev = () => {
|
|
3155
3416
|
setActiveIndex((prevIndex) => prevIndex === 0 ? items.length - 1 : prevIndex - 1);
|
|
3156
3417
|
};
|
|
@@ -3187,9 +3448,9 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3187
3448
|
children: [
|
|
3188
3449
|
/* @__PURE__ */ jsxs18(Wrapper6, { variant, children: [
|
|
3189
3450
|
/* @__PURE__ */ jsxs18(CarouselHeader, { children: [
|
|
3190
|
-
/* @__PURE__ */
|
|
3451
|
+
/* @__PURE__ */ jsx40(Title2, { children: title }),
|
|
3191
3452
|
/* @__PURE__ */ jsxs18(Navigation, { children: [
|
|
3192
|
-
/* @__PURE__ */
|
|
3453
|
+
/* @__PURE__ */ jsx40(
|
|
3193
3454
|
Button,
|
|
3194
3455
|
{
|
|
3195
3456
|
size: "sm",
|
|
@@ -3197,10 +3458,10 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3197
3458
|
"aria-label": "Previous Slide",
|
|
3198
3459
|
onClick: prev,
|
|
3199
3460
|
tabIndex: 0,
|
|
3200
|
-
children: /* @__PURE__ */
|
|
3461
|
+
children: /* @__PURE__ */ jsx40(Icon, { name: "TriangleLeft", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
3201
3462
|
}
|
|
3202
3463
|
),
|
|
3203
|
-
/* @__PURE__ */
|
|
3464
|
+
/* @__PURE__ */ jsx40(
|
|
3204
3465
|
Button,
|
|
3205
3466
|
{
|
|
3206
3467
|
size: "sm",
|
|
@@ -3208,15 +3469,15 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3208
3469
|
"aria-label": "Previous Slide",
|
|
3209
3470
|
onClick: next,
|
|
3210
3471
|
tabIndex: 0,
|
|
3211
|
-
children: /* @__PURE__ */
|
|
3472
|
+
children: /* @__PURE__ */ jsx40(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
3212
3473
|
}
|
|
3213
3474
|
)
|
|
3214
3475
|
] })
|
|
3215
3476
|
] }),
|
|
3216
|
-
/* @__PURE__ */
|
|
3217
|
-
/* @__PURE__ */
|
|
3218
|
-
/* @__PURE__ */
|
|
3219
|
-
/* @__PURE__ */
|
|
3477
|
+
/* @__PURE__ */ jsx40(Spacing, { size: "xs" }),
|
|
3478
|
+
/* @__PURE__ */ jsx40(Hr, { variant }),
|
|
3479
|
+
/* @__PURE__ */ jsx40(Spacing, { size: "xs" }),
|
|
3480
|
+
/* @__PURE__ */ jsx40(
|
|
3220
3481
|
CarouselContent,
|
|
3221
3482
|
{
|
|
3222
3483
|
onTouchStart,
|
|
@@ -3233,8 +3494,8 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3233
3494
|
}
|
|
3234
3495
|
)
|
|
3235
3496
|
] }),
|
|
3236
|
-
/* @__PURE__ */
|
|
3237
|
-
/* @__PURE__ */
|
|
3497
|
+
/* @__PURE__ */ jsx40(Spacing, { size: "md" }),
|
|
3498
|
+
/* @__PURE__ */ jsx40(DotsContainer, { children: /* @__PURE__ */ jsx40(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: items.map((_, idx) => /* @__PURE__ */ jsx40(
|
|
3238
3499
|
DotButton,
|
|
3239
3500
|
{
|
|
3240
3501
|
active: idx === activeIndex,
|
|
@@ -3250,17 +3511,30 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3250
3511
|
}
|
|
3251
3512
|
);
|
|
3252
3513
|
};
|
|
3253
|
-
var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */
|
|
3514
|
+
var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */ jsx40(CarouselItemContainer, { ...props, style: { ...style }, children });
|
|
3254
3515
|
Carousel.Item = CarouselItem;
|
|
3255
3516
|
|
|
3256
3517
|
// src/components/PasswordInput.tsx
|
|
3257
|
-
import { forwardRef as
|
|
3258
|
-
import { jsx as
|
|
3259
|
-
var
|
|
3518
|
+
import { forwardRef as forwardRef7, useImperativeHandle, useRef as useRef6, useState as useState9 } from "react";
|
|
3519
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
3520
|
+
var ToggleButton = styled("button", {
|
|
3521
|
+
all: "unset",
|
|
3522
|
+
cursor: "pointer",
|
|
3523
|
+
display: "flex",
|
|
3524
|
+
alignItems: "center",
|
|
3525
|
+
justifyContent: "center",
|
|
3526
|
+
borderRadius: "$sm",
|
|
3527
|
+
padding: "2px",
|
|
3528
|
+
"&:focus-visible": {
|
|
3529
|
+
outline: "none",
|
|
3530
|
+
boxShadow: "0 0 0 2px $colors$ignite_light",
|
|
3531
|
+
borderRadius: "$sm"
|
|
3532
|
+
}
|
|
3533
|
+
});
|
|
3534
|
+
var PasswordInput = forwardRef7(
|
|
3260
3535
|
({ value, onChange, ...props }, ref) => {
|
|
3261
|
-
|
|
3262
|
-
const
|
|
3263
|
-
const innerRef = useRef5(null);
|
|
3536
|
+
const [visible, setVisible] = useState9(false);
|
|
3537
|
+
const innerRef = useRef6(null);
|
|
3264
3538
|
useImperativeHandle(ref, () => innerRef.current);
|
|
3265
3539
|
const handleToggleVisibility = () => {
|
|
3266
3540
|
setVisible((v) => !v);
|
|
@@ -3271,7 +3545,7 @@ var PasswordInput = forwardRef3(
|
|
|
3271
3545
|
}
|
|
3272
3546
|
}, 0);
|
|
3273
3547
|
};
|
|
3274
|
-
return /* @__PURE__ */
|
|
3548
|
+
return /* @__PURE__ */ jsx41(
|
|
3275
3549
|
Input2,
|
|
3276
3550
|
{
|
|
3277
3551
|
...props,
|
|
@@ -3279,21 +3553,14 @@ var PasswordInput = forwardRef3(
|
|
|
3279
3553
|
type: visible ? "text" : "password",
|
|
3280
3554
|
value,
|
|
3281
3555
|
onChange,
|
|
3282
|
-
suffix: /* @__PURE__ */
|
|
3283
|
-
|
|
3556
|
+
suffix: /* @__PURE__ */ jsx41(
|
|
3557
|
+
ToggleButton,
|
|
3284
3558
|
{
|
|
3285
3559
|
type: "button",
|
|
3286
3560
|
onClick: handleToggleVisibility,
|
|
3287
3561
|
onMouseDown: (e) => e.preventDefault(),
|
|
3288
|
-
style: {
|
|
3289
|
-
all: "unset",
|
|
3290
|
-
cursor: "pointer",
|
|
3291
|
-
display: "flex",
|
|
3292
|
-
alignItems: "center",
|
|
3293
|
-
justifyContent: "center"
|
|
3294
|
-
},
|
|
3295
3562
|
"aria-label": visible ? "Ocultar senha" : "Mostrar senha",
|
|
3296
|
-
children: visible ? /* @__PURE__ */
|
|
3563
|
+
children: visible ? /* @__PURE__ */ jsx41(Icon, { name: "EyeClosed", size: 16, color: "black" }) : /* @__PURE__ */ jsx41(Icon, { name: "EyeOpen", size: 16, color: "black" })
|
|
3297
3564
|
}
|
|
3298
3565
|
)
|
|
3299
3566
|
}
|
|
@@ -3314,18 +3581,21 @@ export {
|
|
|
3314
3581
|
Icon,
|
|
3315
3582
|
Input2 as Input,
|
|
3316
3583
|
LabelledValue,
|
|
3584
|
+
Loader,
|
|
3585
|
+
MaskedInput,
|
|
3317
3586
|
Modal,
|
|
3318
3587
|
MultiStep,
|
|
3319
3588
|
OneTimePassword,
|
|
3589
|
+
Paragraph,
|
|
3320
3590
|
PasswordInput,
|
|
3321
3591
|
ProgressBar,
|
|
3322
3592
|
Radio,
|
|
3323
3593
|
Select2 as Select,
|
|
3324
3594
|
Spacing,
|
|
3325
3595
|
Span5 as Span,
|
|
3596
|
+
StyledHr,
|
|
3326
3597
|
Switch2 as Switch,
|
|
3327
3598
|
Tabs2 as Tabs,
|
|
3328
|
-
Text,
|
|
3329
3599
|
TextArea,
|
|
3330
3600
|
TextAreaElement,
|
|
3331
3601
|
Toast,
|