@clickpalm/react 1.0.0 → 1.1.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.d.ts +23 -11
- package/dist/index.js +416 -171
- package/dist/index.mjs +390 -147
- package/package.json +6 -3
package/dist/index.js
CHANGED
|
@@ -42,6 +42,8 @@ __export(src_exports, {
|
|
|
42
42
|
Icon: () => Icon,
|
|
43
43
|
Input: () => Input2,
|
|
44
44
|
LabelledValue: () => LabelledValue,
|
|
45
|
+
Loader: () => Loader,
|
|
46
|
+
MaskedInput: () => MaskedInput,
|
|
45
47
|
Modal: () => Modal,
|
|
46
48
|
MultiStep: () => MultiStep,
|
|
47
49
|
OneTimePassword: () => OneTimePassword,
|
|
@@ -690,6 +692,32 @@ var Check = (props) => {
|
|
|
690
692
|
);
|
|
691
693
|
};
|
|
692
694
|
|
|
695
|
+
// src/components/Icon/Svgs/Copy.tsx
|
|
696
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
697
|
+
var Copy = (props) => {
|
|
698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
699
|
+
"svg",
|
|
700
|
+
{
|
|
701
|
+
width: "18",
|
|
702
|
+
height: "19",
|
|
703
|
+
viewBox: "0 0 18 19",
|
|
704
|
+
fill: "none",
|
|
705
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
706
|
+
...props,
|
|
707
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
708
|
+
"path",
|
|
709
|
+
{
|
|
710
|
+
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",
|
|
711
|
+
stroke: "currentColor",
|
|
712
|
+
"stroke-width": "2",
|
|
713
|
+
"stroke-linecap": "round",
|
|
714
|
+
"stroke-linejoin": "round"
|
|
715
|
+
}
|
|
716
|
+
)
|
|
717
|
+
}
|
|
718
|
+
);
|
|
719
|
+
};
|
|
720
|
+
|
|
693
721
|
// src/components/Icon/icons.ts
|
|
694
722
|
var iconMap = {
|
|
695
723
|
TriangleDown: import_react_icons.TriangleDownIcon,
|
|
@@ -709,12 +737,13 @@ var iconMap = {
|
|
|
709
737
|
Search,
|
|
710
738
|
ChevronLeft,
|
|
711
739
|
ChevronRight,
|
|
712
|
-
Check
|
|
740
|
+
Check,
|
|
741
|
+
Copy
|
|
713
742
|
};
|
|
714
743
|
|
|
715
744
|
// src/components/Icon/index.tsx
|
|
716
745
|
var import_react3 = require("react");
|
|
717
|
-
var
|
|
746
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
718
747
|
var colorMap = {
|
|
719
748
|
black: "#000000",
|
|
720
749
|
green: "#78CB63",
|
|
@@ -727,7 +756,7 @@ function Icon({ name, size = 24, color = "black", ...rest }) {
|
|
|
727
756
|
return null;
|
|
728
757
|
}
|
|
729
758
|
const fillColor = (0, import_react3.useMemo)(() => colorMap[color], [color]);
|
|
730
|
-
return /* @__PURE__ */ (0,
|
|
759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
731
760
|
IconComponent,
|
|
732
761
|
{
|
|
733
762
|
width: size,
|
|
@@ -934,7 +963,7 @@ var StyledLabel = styled("label", {
|
|
|
934
963
|
});
|
|
935
964
|
|
|
936
965
|
// src/components/Calendar/index.tsx
|
|
937
|
-
var
|
|
966
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
938
967
|
calendarStyles();
|
|
939
968
|
var Calendar2 = ({ label, onChange }) => {
|
|
940
969
|
const [selected, setSelected] = (0, import_react4.useState)(void 0);
|
|
@@ -952,9 +981,9 @@ var Calendar2 = ({ label, onChange }) => {
|
|
|
952
981
|
setMonth(selected);
|
|
953
982
|
}
|
|
954
983
|
}, [selected]);
|
|
955
|
-
return /* @__PURE__ */ (0,
|
|
956
|
-
/* @__PURE__ */ (0,
|
|
957
|
-
/* @__PURE__ */ (0,
|
|
984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
985
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StyledLabel, { children: label }),
|
|
986
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
958
987
|
import_react_day_picker.DayPicker,
|
|
959
988
|
{
|
|
960
989
|
className: !open ? "calendar-root-collapsed" : "",
|
|
@@ -984,21 +1013,21 @@ var Calendar2 = ({ label, onChange }) => {
|
|
|
984
1013
|
components: {
|
|
985
1014
|
MonthCaption: ({ calendarMonth, displayIndex, ...safeprops }) => {
|
|
986
1015
|
const displayMonth = calendarMonth.date;
|
|
987
|
-
return /* @__PURE__ */ (0,
|
|
988
|
-
/* @__PURE__ */ (0,
|
|
1016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { ...safeprops, children: [
|
|
1017
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
989
1018
|
Button,
|
|
990
1019
|
{
|
|
991
1020
|
variant: "secondary",
|
|
992
1021
|
size: "sm",
|
|
993
1022
|
onClick: () => setOpen(!open),
|
|
994
|
-
children: /* @__PURE__ */ (0,
|
|
1023
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StyledButton2, { isOpen: open, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "TriangleUp", size: 16 }) })
|
|
995
1024
|
}
|
|
996
1025
|
) }),
|
|
997
|
-
/* @__PURE__ */ (0,
|
|
1026
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "calendar-month_caption", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "calendar-caption_label", role: "heading", "aria-level": 2, children: (0, import_date_fns.format)(displayMonth, "MMMM 'de' yyyy", { locale: import_locale.ptBR }).replace(/^./, (c) => c.toUpperCase()) }) })
|
|
998
1027
|
] });
|
|
999
1028
|
},
|
|
1000
|
-
PreviousMonthButton: (props) => /* @__PURE__ */ (0,
|
|
1001
|
-
NextMonthButton: (props) => /* @__PURE__ */ (0,
|
|
1029
|
+
PreviousMonthButton: (props) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "TriangleLeft", size: 16 }) }),
|
|
1030
|
+
NextMonthButton: (props) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "TriangleRight", size: 16 }) })
|
|
1002
1031
|
}
|
|
1003
1032
|
}
|
|
1004
1033
|
)
|
|
@@ -1118,23 +1147,23 @@ var Span = styled("span", {
|
|
|
1118
1147
|
});
|
|
1119
1148
|
|
|
1120
1149
|
// src/components/Checkbox/index.tsx
|
|
1121
|
-
var
|
|
1150
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1122
1151
|
function Checkbox2({ label, checked, onCheckedChange, errorMessage, ...rest }) {
|
|
1123
|
-
return /* @__PURE__ */ (0,
|
|
1124
|
-
/* @__PURE__ */ (0,
|
|
1125
|
-
/* @__PURE__ */ (0,
|
|
1152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
1153
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(StyledWrapper, { hasError: !!errorMessage, children: [
|
|
1154
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1126
1155
|
CheckboxContainer,
|
|
1127
1156
|
{
|
|
1128
1157
|
checked,
|
|
1129
1158
|
onCheckedChange,
|
|
1130
1159
|
hasError: !!errorMessage,
|
|
1131
1160
|
...rest,
|
|
1132
|
-
children: /* @__PURE__ */ (0,
|
|
1161
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CheckboxIndicator, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "Check", size: 16 }) })
|
|
1133
1162
|
}
|
|
1134
1163
|
),
|
|
1135
|
-
/* @__PURE__ */ (0,
|
|
1164
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CheckboxLabel, { children: label })
|
|
1136
1165
|
] }),
|
|
1137
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
1166
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Span, { children: errorMessage })
|
|
1138
1167
|
] });
|
|
1139
1168
|
}
|
|
1140
1169
|
Checkbox2.displayName = "Checkbox";
|
|
@@ -1244,7 +1273,7 @@ var Span2 = styled("span", {
|
|
|
1244
1273
|
});
|
|
1245
1274
|
|
|
1246
1275
|
// src/components/Input/index.tsx
|
|
1247
|
-
var
|
|
1276
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1248
1277
|
var Input2 = (0, import_react5.forwardRef)(
|
|
1249
1278
|
({ prefix, suffix, label, errorMessage, noMargin = false, ...props }, forwardedRef) => {
|
|
1250
1279
|
const localInputRef = (0, import_react5.useRef)(null);
|
|
@@ -1258,9 +1287,9 @@ var Input2 = (0, import_react5.forwardRef)(
|
|
|
1258
1287
|
const type = node.type;
|
|
1259
1288
|
return type?.displayName === "Button";
|
|
1260
1289
|
};
|
|
1261
|
-
return /* @__PURE__ */ (0,
|
|
1262
|
-
label && /* @__PURE__ */ (0,
|
|
1263
|
-
/* @__PURE__ */ (0,
|
|
1290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(StyledWrapper2, { children: [
|
|
1291
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Label, { children: label }),
|
|
1292
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1264
1293
|
TextInputContainer,
|
|
1265
1294
|
{
|
|
1266
1295
|
hasButtonSuffix: isButtonElement(suffix),
|
|
@@ -1268,13 +1297,13 @@ var Input2 = (0, import_react5.forwardRef)(
|
|
|
1268
1297
|
hasError: !!errorMessage,
|
|
1269
1298
|
onClick: handleContainerClick,
|
|
1270
1299
|
children: [
|
|
1271
|
-
!!prefix && /* @__PURE__ */ (0,
|
|
1272
|
-
/* @__PURE__ */ (0,
|
|
1273
|
-
!!suffix && /* @__PURE__ */ (0,
|
|
1300
|
+
!!prefix && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Prefix, { children: prefix }),
|
|
1301
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Input, { ref: inputRef, ...props }),
|
|
1302
|
+
!!suffix && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Suffix, { children: suffix })
|
|
1274
1303
|
]
|
|
1275
1304
|
}
|
|
1276
1305
|
),
|
|
1277
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
1306
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Span2, { children: errorMessage })
|
|
1278
1307
|
] });
|
|
1279
1308
|
}
|
|
1280
1309
|
);
|
|
@@ -1342,7 +1371,7 @@ var datePickerStyles = globalCss({
|
|
|
1342
1371
|
});
|
|
1343
1372
|
|
|
1344
1373
|
// src/components/Datepicker/index.tsx
|
|
1345
|
-
var
|
|
1374
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1346
1375
|
datePickerStyles();
|
|
1347
1376
|
var Datepicker = ({ label, value, onChange }) => {
|
|
1348
1377
|
const [selected, setSelected] = (0, import_react6.useState)(void 0);
|
|
@@ -1372,8 +1401,8 @@ var Datepicker = ({ label, value, onChange }) => {
|
|
|
1372
1401
|
setMonth(selected);
|
|
1373
1402
|
}
|
|
1374
1403
|
}, [open, selected]);
|
|
1375
|
-
return /* @__PURE__ */ (0,
|
|
1376
|
-
/* @__PURE__ */ (0,
|
|
1404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
1405
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1377
1406
|
Input2,
|
|
1378
1407
|
{
|
|
1379
1408
|
ref: inputRef,
|
|
@@ -1383,10 +1412,10 @@ var Datepicker = ({ label, value, onChange }) => {
|
|
|
1383
1412
|
value: value || "",
|
|
1384
1413
|
noMargin: true,
|
|
1385
1414
|
readOnly: true,
|
|
1386
|
-
suffix: /* @__PURE__ */ (0,
|
|
1415
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "Calendar", size: 16 })
|
|
1387
1416
|
}
|
|
1388
1417
|
),
|
|
1389
|
-
open && /* @__PURE__ */ (0,
|
|
1418
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1390
1419
|
"div",
|
|
1391
1420
|
{
|
|
1392
1421
|
ref: calendarRef,
|
|
@@ -1398,7 +1427,7 @@ var Datepicker = ({ label, value, onChange }) => {
|
|
|
1398
1427
|
boxShadow: "0 2px 8px rgba(0,0,0,0.15)",
|
|
1399
1428
|
borderRadius: "8px"
|
|
1400
1429
|
},
|
|
1401
|
-
children: /* @__PURE__ */ (0,
|
|
1430
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1402
1431
|
import_react_day_picker2.DayPicker,
|
|
1403
1432
|
{
|
|
1404
1433
|
mode: "single",
|
|
@@ -1420,8 +1449,8 @@ var Datepicker = ({ label, value, onChange }) => {
|
|
|
1420
1449
|
}
|
|
1421
1450
|
},
|
|
1422
1451
|
components: {
|
|
1423
|
-
PreviousMonthButton: (props) => /* @__PURE__ */ (0,
|
|
1424
|
-
NextMonthButton: (props) => /* @__PURE__ */ (0,
|
|
1452
|
+
PreviousMonthButton: (props) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "TriangleLeft", size: 16 }) }),
|
|
1453
|
+
NextMonthButton: (props) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "TriangleRight", size: 16 }) })
|
|
1425
1454
|
}
|
|
1426
1455
|
}
|
|
1427
1456
|
)
|
|
@@ -1503,16 +1532,16 @@ var StyledDivider = (0, import_react7.styled)("hr", {
|
|
|
1503
1532
|
});
|
|
1504
1533
|
|
|
1505
1534
|
// src/components/Modal/index.tsx
|
|
1506
|
-
var
|
|
1535
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1507
1536
|
var Modal = ({ open, onOpenChange, title, children }) => {
|
|
1508
|
-
return /* @__PURE__ */ (0,
|
|
1509
|
-
/* @__PURE__ */ (0,
|
|
1510
|
-
/* @__PURE__ */ (0,
|
|
1511
|
-
/* @__PURE__ */ (0,
|
|
1512
|
-
/* @__PURE__ */ (0,
|
|
1513
|
-
/* @__PURE__ */ (0,
|
|
1537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Dialog2.Root, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Dialog2.Portal, { children: [
|
|
1538
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StyledOverlay, {}),
|
|
1539
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(StyledContent, { children: [
|
|
1540
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Wrapper, { children: [
|
|
1541
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StyledTitle, { children: title }),
|
|
1542
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StyledClose, { asChild: true, "aria-label": "Close", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { name: "Closed", size: 8 }) }) })
|
|
1514
1543
|
] }),
|
|
1515
|
-
/* @__PURE__ */ (0,
|
|
1544
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StyledDivider, {}),
|
|
1516
1545
|
children
|
|
1517
1546
|
] })
|
|
1518
1547
|
] }) });
|
|
@@ -1549,7 +1578,7 @@ var StyledIndicator = styled(Progress.Indicator, {
|
|
|
1549
1578
|
});
|
|
1550
1579
|
|
|
1551
1580
|
// src/components/ProgressBar/index.tsx
|
|
1552
|
-
var
|
|
1581
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1553
1582
|
var ProgressBar = ({ label, value = 0, max = 100, ...rest }) => {
|
|
1554
1583
|
const [progress2, setProgress] = (0, import_react8.useState)(0);
|
|
1555
1584
|
(0, import_react8.useEffect)(() => {
|
|
@@ -1557,15 +1586,15 @@ var ProgressBar = ({ label, value = 0, max = 100, ...rest }) => {
|
|
|
1557
1586
|
return () => clearTimeout(timer);
|
|
1558
1587
|
}, [value]);
|
|
1559
1588
|
const valueLabel = `${Math.round(progress2 / max * 100)}%`;
|
|
1560
|
-
return /* @__PURE__ */ (0,
|
|
1561
|
-
/* @__PURE__ */ (0,
|
|
1562
|
-
/* @__PURE__ */ (0,
|
|
1589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(StyledWrapper3, { children: [
|
|
1590
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { style: { fontSize: 16, alignSelf: "flex-start" }, children: label }),
|
|
1591
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1563
1592
|
StyledRoot,
|
|
1564
1593
|
{
|
|
1565
1594
|
value: progress2,
|
|
1566
1595
|
"aria-valuetext": valueLabel,
|
|
1567
1596
|
...rest,
|
|
1568
|
-
children: /* @__PURE__ */ (0,
|
|
1597
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1569
1598
|
StyledIndicator,
|
|
1570
1599
|
{
|
|
1571
1600
|
style: { transform: `translateX(-${100 - progress2}%)` }
|
|
@@ -1669,7 +1698,7 @@ var Span3 = styled("span", {
|
|
|
1669
1698
|
});
|
|
1670
1699
|
|
|
1671
1700
|
// src/components/Radio/index.tsx
|
|
1672
|
-
var
|
|
1701
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1673
1702
|
var Radio = ({
|
|
1674
1703
|
labels,
|
|
1675
1704
|
value,
|
|
@@ -1678,8 +1707,8 @@ var Radio = ({
|
|
|
1678
1707
|
required = false,
|
|
1679
1708
|
errorMessage
|
|
1680
1709
|
}) => {
|
|
1681
|
-
return /* @__PURE__ */ (0,
|
|
1682
|
-
/* @__PURE__ */ (0,
|
|
1710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("form", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
1711
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1683
1712
|
StyledRoot2,
|
|
1684
1713
|
{
|
|
1685
1714
|
value,
|
|
@@ -1688,27 +1717,27 @@ var Radio = ({
|
|
|
1688
1717
|
disabled,
|
|
1689
1718
|
required,
|
|
1690
1719
|
loop: true,
|
|
1691
|
-
children: labels.map((label, index) => /* @__PURE__ */ (0,
|
|
1692
|
-
/* @__PURE__ */ (0,
|
|
1720
|
+
children: labels.map((label, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Wrapper2, { children: [
|
|
1721
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1693
1722
|
StyledItem,
|
|
1694
1723
|
{
|
|
1695
1724
|
value: label,
|
|
1696
1725
|
id: `radio-${index}`,
|
|
1697
1726
|
"aria-label": label,
|
|
1698
1727
|
hasError: !!errorMessage,
|
|
1699
|
-
children: /* @__PURE__ */ (0,
|
|
1728
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledIndicator2, {})
|
|
1700
1729
|
}
|
|
1701
1730
|
),
|
|
1702
|
-
/* @__PURE__ */ (0,
|
|
1731
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ItemLabel, { htmlFor: `radio-${index}`, children: label })
|
|
1703
1732
|
] }, label))
|
|
1704
1733
|
}
|
|
1705
1734
|
),
|
|
1706
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
1735
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Span3, { children: errorMessage })
|
|
1707
1736
|
] });
|
|
1708
1737
|
};
|
|
1709
1738
|
|
|
1710
1739
|
// src/components/Spacing.tsx
|
|
1711
|
-
var
|
|
1740
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1712
1741
|
var spacingMap = {
|
|
1713
1742
|
xs: 8,
|
|
1714
1743
|
sm: 12,
|
|
@@ -1720,7 +1749,7 @@ var spacingMap = {
|
|
|
1720
1749
|
};
|
|
1721
1750
|
var Spacing = ({ size, axis = "vertical" }) => {
|
|
1722
1751
|
const style = axis === "vertical" ? { height: spacingMap[size], width: "100%" } : { width: spacingMap[size], height: "100%" };
|
|
1723
|
-
return /* @__PURE__ */ (0,
|
|
1752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { style, "data-testid": `spacing-${size}-${axis}` });
|
|
1724
1753
|
};
|
|
1725
1754
|
|
|
1726
1755
|
// src/components/Switch/styles.ts
|
|
@@ -1818,7 +1847,7 @@ var Span4 = styled("span", {
|
|
|
1818
1847
|
});
|
|
1819
1848
|
|
|
1820
1849
|
// src/components/Switch/index.tsx
|
|
1821
|
-
var
|
|
1850
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1822
1851
|
var Switch2 = ({
|
|
1823
1852
|
label,
|
|
1824
1853
|
checked,
|
|
@@ -1829,9 +1858,9 @@ var Switch2 = ({
|
|
|
1829
1858
|
id,
|
|
1830
1859
|
errorMessage
|
|
1831
1860
|
}) => {
|
|
1832
|
-
return /* @__PURE__ */ (0,
|
|
1833
|
-
/* @__PURE__ */ (0,
|
|
1834
|
-
/* @__PURE__ */ (0,
|
|
1861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
1862
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Wrapper3, { hasError: !!errorMessage, children: [
|
|
1863
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1835
1864
|
StyledRoot3,
|
|
1836
1865
|
{
|
|
1837
1866
|
id,
|
|
@@ -1841,12 +1870,12 @@ var Switch2 = ({
|
|
|
1841
1870
|
hasError: !!errorMessage,
|
|
1842
1871
|
disabled,
|
|
1843
1872
|
required,
|
|
1844
|
-
children: /* @__PURE__ */ (0,
|
|
1873
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledThumb, {})
|
|
1845
1874
|
}
|
|
1846
1875
|
),
|
|
1847
|
-
label && /* @__PURE__ */ (0,
|
|
1876
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Label2, { htmlFor: id, children: label })
|
|
1848
1877
|
] }),
|
|
1849
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
1878
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Span4, { children: errorMessage })
|
|
1850
1879
|
] });
|
|
1851
1880
|
};
|
|
1852
1881
|
|
|
@@ -1932,9 +1961,9 @@ var TabsContent = styled(Tabs.Content, {
|
|
|
1932
1961
|
});
|
|
1933
1962
|
|
|
1934
1963
|
// src/components/Tabs/index.tsx
|
|
1935
|
-
var
|
|
1964
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1936
1965
|
var TabsItem = ({ children }) => {
|
|
1937
|
-
return /* @__PURE__ */ (0,
|
|
1966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children });
|
|
1938
1967
|
};
|
|
1939
1968
|
var Tabs2 = ({ defaultValue, colorContent, children }) => {
|
|
1940
1969
|
const items = [];
|
|
@@ -1984,28 +2013,28 @@ var Tabs2 = ({ defaultValue, colorContent, children }) => {
|
|
|
1984
2013
|
});
|
|
1985
2014
|
}
|
|
1986
2015
|
};
|
|
1987
|
-
return /* @__PURE__ */ (0,
|
|
2016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1988
2017
|
TabsRoot,
|
|
1989
2018
|
{
|
|
1990
2019
|
defaultValue: defaultValue || items[0]?.value,
|
|
1991
2020
|
ref: rootRef,
|
|
1992
2021
|
children: [
|
|
1993
|
-
/* @__PURE__ */ (0,
|
|
1994
|
-
hasOverflow && /* @__PURE__ */ (0,
|
|
2022
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2023
|
+
hasOverflow && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1995
2024
|
Button,
|
|
1996
2025
|
{
|
|
1997
2026
|
variant: "secondary",
|
|
1998
2027
|
size: "sm",
|
|
1999
2028
|
onClick: () => scroll("left"),
|
|
2000
|
-
children: /* @__PURE__ */ (0,
|
|
2029
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "TriangleLeft", size: 64 })
|
|
2001
2030
|
}
|
|
2002
2031
|
),
|
|
2003
|
-
/* @__PURE__ */ (0,
|
|
2032
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2004
2033
|
TabsList,
|
|
2005
2034
|
{
|
|
2006
2035
|
ref: listRef,
|
|
2007
2036
|
scrollable: hasOverflow,
|
|
2008
|
-
children: items.map((item) => /* @__PURE__ */ (0,
|
|
2037
|
+
children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2009
2038
|
TabsTrigger,
|
|
2010
2039
|
{
|
|
2011
2040
|
value: item.value,
|
|
@@ -2016,17 +2045,17 @@ var Tabs2 = ({ defaultValue, colorContent, children }) => {
|
|
|
2016
2045
|
))
|
|
2017
2046
|
}
|
|
2018
2047
|
),
|
|
2019
|
-
hasOverflow && /* @__PURE__ */ (0,
|
|
2048
|
+
hasOverflow && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2020
2049
|
Button,
|
|
2021
2050
|
{
|
|
2022
2051
|
variant: "secondary",
|
|
2023
2052
|
size: "sm",
|
|
2024
2053
|
onClick: () => scroll("right"),
|
|
2025
|
-
children: /* @__PURE__ */ (0,
|
|
2054
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "TriangleRight", size: 64 })
|
|
2026
2055
|
}
|
|
2027
2056
|
)
|
|
2028
2057
|
] }),
|
|
2029
|
-
items.map((item) => /* @__PURE__ */ (0,
|
|
2058
|
+
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2030
2059
|
TabsContent,
|
|
2031
2060
|
{
|
|
2032
2061
|
colorContent,
|
|
@@ -2042,7 +2071,7 @@ var Tabs2 = ({ defaultValue, colorContent, children }) => {
|
|
|
2042
2071
|
Tabs2.Item = TabsItem;
|
|
2043
2072
|
|
|
2044
2073
|
// src/components/TextArea.tsx
|
|
2045
|
-
var
|
|
2074
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2046
2075
|
var Wrapper4 = styled("div", {
|
|
2047
2076
|
display: "flex",
|
|
2048
2077
|
flexDirection: "column"
|
|
@@ -2119,10 +2148,10 @@ var Span5 = styled("span", {
|
|
|
2119
2148
|
});
|
|
2120
2149
|
var TextArea = ({ label, id, htmlFor, errorMessage, ...props }) => {
|
|
2121
2150
|
const textAreaId = id || htmlFor || `textarea-${crypto.randomUUID()}`;
|
|
2122
|
-
return /* @__PURE__ */ (0,
|
|
2123
|
-
label && /* @__PURE__ */ (0,
|
|
2124
|
-
/* @__PURE__ */ (0,
|
|
2125
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Wrapper4, { children: [
|
|
2152
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StyledLabel2, { htmlFor: textAreaId, children: label }),
|
|
2153
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TextAreaElement, { id: textAreaId, ...props, hasError: !!errorMessage }),
|
|
2154
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Span5, { children: errorMessage })
|
|
2126
2155
|
] });
|
|
2127
2156
|
};
|
|
2128
2157
|
TextArea.displayName = "TextArea";
|
|
@@ -2178,7 +2207,7 @@ var TooltipArrow = styled(RadixTooltip.Arrow, {
|
|
|
2178
2207
|
});
|
|
2179
2208
|
|
|
2180
2209
|
// src/components/Tooltip/index.tsx
|
|
2181
|
-
var
|
|
2210
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2182
2211
|
var Tooltip = ({
|
|
2183
2212
|
content,
|
|
2184
2213
|
children,
|
|
@@ -2188,18 +2217,233 @@ var Tooltip = ({
|
|
|
2188
2217
|
onOpenChange,
|
|
2189
2218
|
delayDuration = 100
|
|
2190
2219
|
}) => {
|
|
2191
|
-
return /* @__PURE__ */ (0,
|
|
2192
|
-
/* @__PURE__ */ (0,
|
|
2193
|
-
/* @__PURE__ */ (0,
|
|
2220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RadixTooltip2.Provider, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(RadixTooltip2.Root, { open, onOpenChange, delayDuration, children: [
|
|
2221
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TooltipTrigger, { asChild: true, children }),
|
|
2222
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(TooltipContent, { side, sideOffset, children: [
|
|
2194
2223
|
content,
|
|
2195
|
-
/* @__PURE__ */ (0,
|
|
2224
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TooltipArrow, {})
|
|
2196
2225
|
] })
|
|
2197
2226
|
] }) });
|
|
2198
2227
|
};
|
|
2199
2228
|
Tooltip.displayName = "Tooltip";
|
|
2200
2229
|
|
|
2230
|
+
// src/components/Loader/index.tsx
|
|
2231
|
+
var import_react10 = require("react");
|
|
2232
|
+
|
|
2233
|
+
// src/components/Loader/style.ts
|
|
2234
|
+
var Content4 = styled("div", {
|
|
2235
|
+
position: "relative",
|
|
2236
|
+
height: "100%",
|
|
2237
|
+
width: "100%",
|
|
2238
|
+
minHeight: "inherit",
|
|
2239
|
+
top: 0,
|
|
2240
|
+
left: 0,
|
|
2241
|
+
backgroundColor: "YellowGreen"
|
|
2242
|
+
});
|
|
2243
|
+
var Overlay2 = styled("div", {
|
|
2244
|
+
display: "flex",
|
|
2245
|
+
justifyContent: "center",
|
|
2246
|
+
alignItems: "center",
|
|
2247
|
+
backgroundColor: "rgba(255, 255, 255, 0.6)",
|
|
2248
|
+
zIndex: 999,
|
|
2249
|
+
variants: {
|
|
2250
|
+
show: {
|
|
2251
|
+
true: {
|
|
2252
|
+
opacity: 1
|
|
2253
|
+
},
|
|
2254
|
+
false: {
|
|
2255
|
+
opacity: 0
|
|
2256
|
+
}
|
|
2257
|
+
},
|
|
2258
|
+
fullscreen: {
|
|
2259
|
+
true: {
|
|
2260
|
+
position: "fixed",
|
|
2261
|
+
top: 0,
|
|
2262
|
+
left: 0,
|
|
2263
|
+
right: 0,
|
|
2264
|
+
bottom: 0
|
|
2265
|
+
},
|
|
2266
|
+
false: {
|
|
2267
|
+
position: "absolute"
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
});
|
|
2272
|
+
var SpinnerContainer = styled("div", {
|
|
2273
|
+
position: "relative"
|
|
2274
|
+
});
|
|
2275
|
+
var rotation = keyframes({
|
|
2276
|
+
"0%": { transform: "rotate(0deg)" },
|
|
2277
|
+
"100%": { transform: "rotate(360deg)" }
|
|
2278
|
+
});
|
|
2279
|
+
var Spinner = styled("span", {
|
|
2280
|
+
width: "$19",
|
|
2281
|
+
height: "$19",
|
|
2282
|
+
borderRadius: "50%",
|
|
2283
|
+
display: "inline-block",
|
|
2284
|
+
borderTop: "6px solid $ignite_light",
|
|
2285
|
+
borderRight: "6px solid transparent",
|
|
2286
|
+
boxSizing: "border-box",
|
|
2287
|
+
animation: `${rotation} 1s linear infinite`,
|
|
2288
|
+
"&::after": {
|
|
2289
|
+
content: '""',
|
|
2290
|
+
boxSizing: "border-box",
|
|
2291
|
+
position: "absolute",
|
|
2292
|
+
left: 0,
|
|
2293
|
+
top: 0,
|
|
2294
|
+
width: "$19",
|
|
2295
|
+
height: "$19",
|
|
2296
|
+
borderRadius: "50%",
|
|
2297
|
+
borderLeft: "6px solid $clickpalm_light",
|
|
2298
|
+
borderBottom: "6px solid transparent",
|
|
2299
|
+
animation: `${rotation} 0.5s linear infinite reverse`
|
|
2300
|
+
}
|
|
2301
|
+
});
|
|
2302
|
+
|
|
2303
|
+
// src/components/Loader/index.tsx
|
|
2304
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2305
|
+
var Loader = ({ show, fullscreen }) => {
|
|
2306
|
+
const ref = (0, import_react10.useRef)(null);
|
|
2307
|
+
const [parentRect, setParentRect] = (0, import_react10.useState)(null);
|
|
2308
|
+
(0, import_react10.useEffect)(() => {
|
|
2309
|
+
if (!fullscreen && ref.current?.parentElement) {
|
|
2310
|
+
const rect = ref.current.parentElement.getBoundingClientRect();
|
|
2311
|
+
setParentRect(rect);
|
|
2312
|
+
}
|
|
2313
|
+
}, [fullscreen, show]);
|
|
2314
|
+
if (!show)
|
|
2315
|
+
return null;
|
|
2316
|
+
const overlayStyles = fullscreen ? { position: "fixed", top: 0, left: 0, right: 0, bottom: 0 } : parentRect ? {
|
|
2317
|
+
top: parentRect.top + window.scrollY,
|
|
2318
|
+
left: parentRect.left + window.scrollX,
|
|
2319
|
+
width: parentRect.width,
|
|
2320
|
+
height: parentRect.height
|
|
2321
|
+
} : {};
|
|
2322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
2323
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref, style: { display: "none" } }),
|
|
2324
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Overlay2, { show: true, fullscreen, style: overlayStyles, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SpinnerContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Spinner, {}) }) })
|
|
2325
|
+
] });
|
|
2326
|
+
};
|
|
2327
|
+
Loader.displayName = "Loader";
|
|
2328
|
+
|
|
2329
|
+
// src/components/MaskedInput/index.tsx
|
|
2330
|
+
var import_react11 = require("react");
|
|
2331
|
+
|
|
2332
|
+
// src/components/MaskedInput/utils.ts
|
|
2333
|
+
var MAX_LENGTHS = {
|
|
2334
|
+
cellPhone: 15,
|
|
2335
|
+
homePhone: 14,
|
|
2336
|
+
cep: 9,
|
|
2337
|
+
cpf: 14,
|
|
2338
|
+
cnpj: 18,
|
|
2339
|
+
date: 10
|
|
2340
|
+
};
|
|
2341
|
+
var applyMask = (value, maskType) => {
|
|
2342
|
+
const digits = value.replace(/\D/g, "");
|
|
2343
|
+
const maxLength = MAX_LENGTHS[maskType];
|
|
2344
|
+
if (digits.length > maxLength) {
|
|
2345
|
+
return value.slice(0, -1);
|
|
2346
|
+
}
|
|
2347
|
+
switch (maskType) {
|
|
2348
|
+
case "cellPhone":
|
|
2349
|
+
if (digits.length <= 2)
|
|
2350
|
+
return digits;
|
|
2351
|
+
if (digits.length <= 7)
|
|
2352
|
+
return `(${digits.slice(0, 2)}) ${digits.slice(2)}`;
|
|
2353
|
+
return `(${digits.slice(0, 2)}) ${digits.slice(2, 7)}-${digits.slice(7, 11)}`;
|
|
2354
|
+
case "homePhone":
|
|
2355
|
+
if (digits.length <= 2)
|
|
2356
|
+
return digits;
|
|
2357
|
+
if (digits.length <= 6)
|
|
2358
|
+
return `(${digits.slice(0, 2)}) ${digits.slice(2)}`;
|
|
2359
|
+
return `(${digits.slice(0, 2)}) ${digits.slice(2, 6)}-${digits.slice(6, 10)}`;
|
|
2360
|
+
case "cep":
|
|
2361
|
+
if (digits.length <= 5)
|
|
2362
|
+
return digits;
|
|
2363
|
+
return `${digits.slice(0, 5)}-${digits.slice(5, 8)}`;
|
|
2364
|
+
case "cpf":
|
|
2365
|
+
if (digits.length <= 3)
|
|
2366
|
+
return digits;
|
|
2367
|
+
if (digits.length <= 6)
|
|
2368
|
+
return `${digits.slice(0, 3)}.${digits.slice(3)}`;
|
|
2369
|
+
if (digits.length <= 9)
|
|
2370
|
+
return `${digits.slice(0, 3)}.${digits.slice(3, 6)}.${digits.slice(6)}`;
|
|
2371
|
+
return `${digits.slice(0, 3)}.${digits.slice(3, 6)}.${digits.slice(6, 9)}-${digits.slice(9, 11)}`;
|
|
2372
|
+
case "cnpj":
|
|
2373
|
+
if (digits.length <= 2)
|
|
2374
|
+
return digits;
|
|
2375
|
+
if (digits.length <= 5)
|
|
2376
|
+
return `${digits.slice(0, 2)}.${digits.slice(2)}`;
|
|
2377
|
+
if (digits.length <= 8)
|
|
2378
|
+
return `${digits.slice(0, 2)}.${digits.slice(2, 5)}.${digits.slice(5)}`;
|
|
2379
|
+
if (digits.length <= 12)
|
|
2380
|
+
return `${digits.slice(0, 2)}.${digits.slice(2, 5)}.${digits.slice(5, 8)}/${digits.slice(8)}`;
|
|
2381
|
+
return `${digits.slice(0, 2)}.${digits.slice(2, 5)}.${digits.slice(5, 8)}/${digits.slice(8, 12)}-${digits.slice(12, 14)}`;
|
|
2382
|
+
case "date":
|
|
2383
|
+
if (digits.length <= 2)
|
|
2384
|
+
return digits;
|
|
2385
|
+
if (digits.length <= 4)
|
|
2386
|
+
return `${digits.slice(0, 2)}/${digits.slice(2)}`;
|
|
2387
|
+
return `${digits.slice(0, 2)}/${digits.slice(2, 4)}/${digits.slice(4, 8)}`;
|
|
2388
|
+
default:
|
|
2389
|
+
return value;
|
|
2390
|
+
}
|
|
2391
|
+
};
|
|
2392
|
+
|
|
2393
|
+
// src/components/MaskedInput/index.tsx
|
|
2394
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2395
|
+
var MaskedInput = (0, import_react11.forwardRef)(
|
|
2396
|
+
({ maskType, onChange, ...props }, ref) => {
|
|
2397
|
+
const [value, setValue] = (0, import_react11.useState)("");
|
|
2398
|
+
const inputRef = (0, import_react11.useRef)(null);
|
|
2399
|
+
const handleChange = (e) => {
|
|
2400
|
+
const { value: inputValue, selectionStart } = e.target;
|
|
2401
|
+
const isBackspace = value.length > inputValue.length;
|
|
2402
|
+
const rawValue = inputValue.replace(/\D/g, "");
|
|
2403
|
+
const maskedValue = applyMask(rawValue, maskType);
|
|
2404
|
+
setValue(maskedValue);
|
|
2405
|
+
if (inputRef.current && selectionStart !== null) {
|
|
2406
|
+
let newCursorPos = selectionStart;
|
|
2407
|
+
if (isBackspace && value.length > 0) {
|
|
2408
|
+
const prevChar = value[selectionStart || 0];
|
|
2409
|
+
if (prevChar && !/\d/.test(prevChar)) {
|
|
2410
|
+
newCursorPos = Math.max(0, (selectionStart || 0) - 1);
|
|
2411
|
+
}
|
|
2412
|
+
}
|
|
2413
|
+
setTimeout(() => {
|
|
2414
|
+
if (inputRef.current) {
|
|
2415
|
+
inputRef.current.setSelectionRange(newCursorPos, newCursorPos);
|
|
2416
|
+
}
|
|
2417
|
+
}, 0);
|
|
2418
|
+
}
|
|
2419
|
+
if (onChange) {
|
|
2420
|
+
const syntheticEvent = {
|
|
2421
|
+
...e,
|
|
2422
|
+
target: {
|
|
2423
|
+
...e.target,
|
|
2424
|
+
value: maskedValue,
|
|
2425
|
+
rawValue
|
|
2426
|
+
}
|
|
2427
|
+
};
|
|
2428
|
+
onChange(syntheticEvent);
|
|
2429
|
+
}
|
|
2430
|
+
};
|
|
2431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2432
|
+
Input2,
|
|
2433
|
+
{
|
|
2434
|
+
...props,
|
|
2435
|
+
ref,
|
|
2436
|
+
value,
|
|
2437
|
+
onChange: handleChange,
|
|
2438
|
+
maxLength: MAX_LENGTHS[maskType]
|
|
2439
|
+
}
|
|
2440
|
+
);
|
|
2441
|
+
}
|
|
2442
|
+
);
|
|
2443
|
+
MaskedInput.displayName = "MaskedInput";
|
|
2444
|
+
|
|
2201
2445
|
// src/components/Box.tsx
|
|
2202
|
-
var
|
|
2446
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2203
2447
|
var StyledBox = styled("div", {
|
|
2204
2448
|
padding: "$5",
|
|
2205
2449
|
borderRadius: "$md",
|
|
@@ -2221,12 +2465,12 @@ var StyledBox = styled("div", {
|
|
|
2221
2465
|
}
|
|
2222
2466
|
});
|
|
2223
2467
|
var Box = (props) => {
|
|
2224
|
-
return /* @__PURE__ */ (0,
|
|
2468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StyledBox, { ...props });
|
|
2225
2469
|
};
|
|
2226
2470
|
Box.displayName = "Box";
|
|
2227
2471
|
|
|
2228
2472
|
// src/components/Text.tsx
|
|
2229
|
-
var
|
|
2473
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2230
2474
|
var StyledText = styled("p", {
|
|
2231
2475
|
fontFamily: "$default",
|
|
2232
2476
|
lineHeight: "$short",
|
|
@@ -2267,7 +2511,7 @@ var StyledText = styled("p", {
|
|
|
2267
2511
|
}
|
|
2268
2512
|
});
|
|
2269
2513
|
var Text = (props) => {
|
|
2270
|
-
return /* @__PURE__ */ (0,
|
|
2514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StyledText, { ...props });
|
|
2271
2515
|
};
|
|
2272
2516
|
Text.displayName = "Text";
|
|
2273
2517
|
|
|
@@ -2298,7 +2542,7 @@ Heading.displayName = "Heading";
|
|
|
2298
2542
|
// src/components/Select/index.tsx
|
|
2299
2543
|
var import_react_icons2 = require("@radix-ui/react-icons");
|
|
2300
2544
|
var CustomSelect = __toESM(require("@radix-ui/react-select"));
|
|
2301
|
-
var
|
|
2545
|
+
var import_react12 = require("react");
|
|
2302
2546
|
|
|
2303
2547
|
// src/components/Select/styles.ts
|
|
2304
2548
|
var Select = __toESM(require("@radix-ui/react-select"));
|
|
@@ -2415,7 +2659,7 @@ var Span6 = styled("span", {
|
|
|
2415
2659
|
});
|
|
2416
2660
|
|
|
2417
2661
|
// src/components/Select/index.tsx
|
|
2418
|
-
var
|
|
2662
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2419
2663
|
function Select2({
|
|
2420
2664
|
value,
|
|
2421
2665
|
onValueChange,
|
|
@@ -2425,10 +2669,10 @@ function Select2({
|
|
|
2425
2669
|
errorMessage,
|
|
2426
2670
|
...rest
|
|
2427
2671
|
}) {
|
|
2428
|
-
const [open, setOpen] = (0,
|
|
2429
|
-
return /* @__PURE__ */ (0,
|
|
2430
|
-
label && /* @__PURE__ */ (0,
|
|
2431
|
-
/* @__PURE__ */ (0,
|
|
2672
|
+
const [open, setOpen] = (0, import_react12.useState)(false);
|
|
2673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(StyledWrapper4, { children: [
|
|
2674
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Label3, { children: label }),
|
|
2675
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2432
2676
|
CustomSelect.Root,
|
|
2433
2677
|
{
|
|
2434
2678
|
value,
|
|
@@ -2436,21 +2680,21 @@ function Select2({
|
|
|
2436
2680
|
onOpenChange: setOpen,
|
|
2437
2681
|
...rest,
|
|
2438
2682
|
children: [
|
|
2439
|
-
/* @__PURE__ */ (0,
|
|
2440
|
-
/* @__PURE__ */ (0,
|
|
2441
|
-
/* @__PURE__ */ (0,
|
|
2683
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(StyledTrigger, { "aria-label": label, hasError: !!errorMessage, children: [
|
|
2684
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CustomSelect.Value, { placeholder }),
|
|
2685
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(StyledIcon, { open, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_icons2.TriangleDownIcon, {}) })
|
|
2442
2686
|
] }),
|
|
2443
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2444
|
-
/* @__PURE__ */ (0,
|
|
2687
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Span6, { children: errorMessage }),
|
|
2688
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CustomSelect.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2445
2689
|
StyledContent2,
|
|
2446
2690
|
{
|
|
2447
2691
|
side: "bottom",
|
|
2448
2692
|
align: "start",
|
|
2449
2693
|
position: "popper",
|
|
2450
2694
|
children: [
|
|
2451
|
-
/* @__PURE__ */ (0,
|
|
2452
|
-
/* @__PURE__ */ (0,
|
|
2453
|
-
/* @__PURE__ */ (0,
|
|
2695
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CustomSelect.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_icons2.TriangleUpIcon, {}) }),
|
|
2696
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(StyledViewport, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(StyledItem2, { value: item.value, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CustomSelect.ItemText, { children: item.label }) }, item.value)) }),
|
|
2697
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CustomSelect.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_icons2.TriangleDownIcon, {}) })
|
|
2454
2698
|
]
|
|
2455
2699
|
}
|
|
2456
2700
|
) })
|
|
@@ -2462,7 +2706,7 @@ function Select2({
|
|
|
2462
2706
|
Select2.displayName = "Select";
|
|
2463
2707
|
|
|
2464
2708
|
// src/components/LabelledValue/index.tsx
|
|
2465
|
-
var
|
|
2709
|
+
var import_react13 = require("react");
|
|
2466
2710
|
|
|
2467
2711
|
// src/components/LabelledValue/styles.ts
|
|
2468
2712
|
var Container = styled("div", {
|
|
@@ -2523,19 +2767,19 @@ var Value2 = styled("div", {
|
|
|
2523
2767
|
});
|
|
2524
2768
|
|
|
2525
2769
|
// src/components/LabelledValue/index.tsx
|
|
2526
|
-
var
|
|
2770
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2527
2771
|
function LabelledValue({ position = "vertical", withRow = false, children }) {
|
|
2528
|
-
return /* @__PURE__ */ (0,
|
|
2529
|
-
if ((0,
|
|
2530
|
-
return (0,
|
|
2772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Container, { position, children: import_react13.Children.map(children, (child) => {
|
|
2773
|
+
if ((0, import_react13.isValidElement)(child)) {
|
|
2774
|
+
return (0, import_react13.cloneElement)(child, { position, withRow });
|
|
2531
2775
|
}
|
|
2532
2776
|
return child;
|
|
2533
2777
|
}) });
|
|
2534
2778
|
}
|
|
2535
2779
|
function Item3({ label, value, position = "vertical", withRow = false }) {
|
|
2536
|
-
return /* @__PURE__ */ (0,
|
|
2537
|
-
/* @__PURE__ */ (0,
|
|
2538
|
-
/* @__PURE__ */ (0,
|
|
2780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(ItemWrapper, { position, withRow, children: [
|
|
2781
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Label4, { children: label }),
|
|
2782
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Value2, { children: value })
|
|
2539
2783
|
] });
|
|
2540
2784
|
}
|
|
2541
2785
|
LabelledValue.Item = Item3;
|
|
@@ -2584,19 +2828,19 @@ var StyledInput = styled(OneTimePasswordField.Input, {
|
|
|
2584
2828
|
});
|
|
2585
2829
|
|
|
2586
2830
|
// src/components/OneTimePassword/index.tsx
|
|
2587
|
-
var
|
|
2831
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2588
2832
|
var OneTimePassword = ({ label, length, value, onValueChange, ...rootProps }) => {
|
|
2589
|
-
return /* @__PURE__ */ (0,
|
|
2590
|
-
/* @__PURE__ */ (0,
|
|
2591
|
-
/* @__PURE__ */ (0,
|
|
2833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(StyledWrapper5, { children: [
|
|
2834
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("label", { children: label }),
|
|
2835
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2592
2836
|
StyledRoot4,
|
|
2593
2837
|
{
|
|
2594
2838
|
value,
|
|
2595
2839
|
onValueChange,
|
|
2596
2840
|
...rootProps,
|
|
2597
2841
|
children: [
|
|
2598
|
-
Array.from({ length }).map((_, index) => /* @__PURE__ */ (0,
|
|
2599
|
-
/* @__PURE__ */ (0,
|
|
2842
|
+
Array.from({ length }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledInput, {}, index)),
|
|
2843
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(OneTimePasswordField2.HiddenInput, {})
|
|
2600
2844
|
]
|
|
2601
2845
|
}
|
|
2602
2846
|
)
|
|
@@ -2606,7 +2850,7 @@ OneTimePassword.displayName = "OneTimePasswordInput";
|
|
|
2606
2850
|
|
|
2607
2851
|
// src/components/Toast/index.tsx
|
|
2608
2852
|
var ToastPrimitive2 = __toESM(require("@radix-ui/react-toast"));
|
|
2609
|
-
var
|
|
2853
|
+
var React3 = __toESM(require("react"));
|
|
2610
2854
|
|
|
2611
2855
|
// src/components/Toast/styles.ts
|
|
2612
2856
|
var ToastPrimitive = __toESM(require("@radix-ui/react-toast"));
|
|
@@ -2769,11 +3013,11 @@ var toast = {
|
|
|
2769
3013
|
};
|
|
2770
3014
|
|
|
2771
3015
|
// src/components/Toast/index.tsx
|
|
2772
|
-
var
|
|
3016
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2773
3017
|
var Toast = () => {
|
|
2774
|
-
const [messages, setMessages] =
|
|
2775
|
-
const [paused, setPaused] =
|
|
2776
|
-
|
|
3018
|
+
const [messages, setMessages] = React3.useState([]);
|
|
3019
|
+
const [paused, setPaused] = React3.useState(false);
|
|
3020
|
+
React3.useEffect(() => {
|
|
2777
3021
|
const handleNewToast = (msg) => {
|
|
2778
3022
|
setMessages((prev) => [...prev, msg]);
|
|
2779
3023
|
};
|
|
@@ -2785,8 +3029,8 @@ var Toast = () => {
|
|
|
2785
3029
|
const removeToast = (id) => {
|
|
2786
3030
|
setMessages((prev) => prev.filter((msg) => msg.id !== id));
|
|
2787
3031
|
};
|
|
2788
|
-
return /* @__PURE__ */ (0,
|
|
2789
|
-
messages.map((message) => /* @__PURE__ */ (0,
|
|
3032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(ToastPrimitive2.Provider, { swipeDirection: "right", children: [
|
|
3033
|
+
messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2790
3034
|
ToastRoot,
|
|
2791
3035
|
{
|
|
2792
3036
|
open: true,
|
|
@@ -2799,11 +3043,11 @@ var Toast = () => {
|
|
|
2799
3043
|
onPause: () => setPaused(true),
|
|
2800
3044
|
onResume: () => setPaused(false),
|
|
2801
3045
|
children: [
|
|
2802
|
-
/* @__PURE__ */ (0,
|
|
2803
|
-
/* @__PURE__ */ (0,
|
|
2804
|
-
/* @__PURE__ */ (0,
|
|
3046
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(ToastContent, { children: [
|
|
3047
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ToastTitle, { children: message.title }),
|
|
3048
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ToastDescription, { children: message.description })
|
|
2805
3049
|
] }),
|
|
2806
|
-
/* @__PURE__ */ (0,
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ToastAction, { altText: "Fechar", asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2807
3051
|
"button",
|
|
2808
3052
|
{
|
|
2809
3053
|
style: {
|
|
@@ -2813,15 +3057,15 @@ var Toast = () => {
|
|
|
2813
3057
|
alignItems: "center"
|
|
2814
3058
|
},
|
|
2815
3059
|
onClick: () => removeToast(message.id),
|
|
2816
|
-
children: /* @__PURE__ */ (0,
|
|
3060
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { name: "Closed", size: 16, height: 14, width: 14 })
|
|
2817
3061
|
}
|
|
2818
3062
|
) }),
|
|
2819
|
-
/* @__PURE__ */ (0,
|
|
3063
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ToastProgress, { paused, variant: message.variant })
|
|
2820
3064
|
]
|
|
2821
3065
|
},
|
|
2822
3066
|
message.id
|
|
2823
3067
|
)),
|
|
2824
|
-
/* @__PURE__ */ (0,
|
|
3068
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ToastViewport, {})
|
|
2825
3069
|
] });
|
|
2826
3070
|
};
|
|
2827
3071
|
|
|
@@ -3057,22 +3301,22 @@ var StepLabel = styled("span", {
|
|
|
3057
3301
|
});
|
|
3058
3302
|
|
|
3059
3303
|
// src/components/MultiStep/index.tsx
|
|
3060
|
-
var
|
|
3304
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3061
3305
|
var MultiStep = ({
|
|
3062
3306
|
steps,
|
|
3063
3307
|
currentStep,
|
|
3064
3308
|
orientation = "horizontal",
|
|
3065
3309
|
variant
|
|
3066
3310
|
}) => {
|
|
3067
|
-
return /* @__PURE__ */ (0,
|
|
3311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3068
3312
|
Wrapper5,
|
|
3069
3313
|
{
|
|
3070
3314
|
orientation,
|
|
3071
3315
|
children: steps.map((step, index) => {
|
|
3072
3316
|
const isFirst = index === 0;
|
|
3073
3317
|
const isLast = index === steps.length - 1;
|
|
3074
|
-
return /* @__PURE__ */ (0,
|
|
3075
|
-
/* @__PURE__ */ (0,
|
|
3318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(StepItem, { orientation, children: [
|
|
3319
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3076
3320
|
StepCircle,
|
|
3077
3321
|
{
|
|
3078
3322
|
orientation,
|
|
@@ -3083,7 +3327,7 @@ var MultiStep = ({
|
|
|
3083
3327
|
children: index + 1
|
|
3084
3328
|
}
|
|
3085
3329
|
),
|
|
3086
|
-
/* @__PURE__ */ (0,
|
|
3330
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3087
3331
|
StepLabel,
|
|
3088
3332
|
{
|
|
3089
3333
|
orientation,
|
|
@@ -3099,7 +3343,7 @@ var MultiStep = ({
|
|
|
3099
3343
|
MultiStep.displayName = "MultiStep";
|
|
3100
3344
|
|
|
3101
3345
|
// src/components/Carousel/index.tsx
|
|
3102
|
-
var
|
|
3346
|
+
var import_react14 = require("react");
|
|
3103
3347
|
|
|
3104
3348
|
// src/components/Carousel/styles.ts
|
|
3105
3349
|
var CarouselContainer = styled("div", {
|
|
@@ -3205,13 +3449,13 @@ var CarouselItemContainer = styled("div", {
|
|
|
3205
3449
|
});
|
|
3206
3450
|
|
|
3207
3451
|
// src/components/Carousel/index.tsx
|
|
3208
|
-
var
|
|
3452
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3209
3453
|
var SWIPE_THRESHOLD = 50;
|
|
3210
3454
|
var Carousel = ({ title, variant, children }) => {
|
|
3211
|
-
const items =
|
|
3212
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
3213
|
-
const [touchStartX, setTouchStartX] = (0,
|
|
3214
|
-
const [touchEndX, setTouchEndX] = (0,
|
|
3455
|
+
const items = import_react14.Children.toArray(children);
|
|
3456
|
+
const [activeIndex, setActiveIndex] = (0, import_react14.useState)(0);
|
|
3457
|
+
const [touchStartX, setTouchStartX] = (0, import_react14.useState)(null);
|
|
3458
|
+
const [touchEndX, setTouchEndX] = (0, import_react14.useState)(null);
|
|
3215
3459
|
const prev = () => {
|
|
3216
3460
|
setActiveIndex((prevIndex) => prevIndex === 0 ? items.length - 1 : prevIndex - 1);
|
|
3217
3461
|
};
|
|
@@ -3239,18 +3483,18 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3239
3483
|
setTouchStartX(null);
|
|
3240
3484
|
setTouchEndX(null);
|
|
3241
3485
|
};
|
|
3242
|
-
return /* @__PURE__ */ (0,
|
|
3486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3243
3487
|
CarouselContainer,
|
|
3244
3488
|
{
|
|
3245
3489
|
role: "region",
|
|
3246
3490
|
"aria-roledescription": "carousel",
|
|
3247
3491
|
"aria-label": "Carousel Component",
|
|
3248
3492
|
children: [
|
|
3249
|
-
/* @__PURE__ */ (0,
|
|
3250
|
-
/* @__PURE__ */ (0,
|
|
3251
|
-
/* @__PURE__ */ (0,
|
|
3252
|
-
/* @__PURE__ */ (0,
|
|
3253
|
-
/* @__PURE__ */ (0,
|
|
3493
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Wrapper6, { variant, children: [
|
|
3494
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(CarouselHeader, { children: [
|
|
3495
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Title2, { children: title }),
|
|
3496
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Navigation, { children: [
|
|
3497
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3254
3498
|
Button,
|
|
3255
3499
|
{
|
|
3256
3500
|
size: "sm",
|
|
@@ -3258,10 +3502,10 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3258
3502
|
"aria-label": "Previous Slide",
|
|
3259
3503
|
onClick: prev,
|
|
3260
3504
|
tabIndex: 0,
|
|
3261
|
-
children: /* @__PURE__ */ (0,
|
|
3505
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { name: "TriangleLeft", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
3262
3506
|
}
|
|
3263
3507
|
),
|
|
3264
|
-
/* @__PURE__ */ (0,
|
|
3508
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3265
3509
|
Button,
|
|
3266
3510
|
{
|
|
3267
3511
|
size: "sm",
|
|
@@ -3269,22 +3513,22 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3269
3513
|
"aria-label": "Previous Slide",
|
|
3270
3514
|
onClick: next,
|
|
3271
3515
|
tabIndex: 0,
|
|
3272
|
-
children: /* @__PURE__ */ (0,
|
|
3516
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
3273
3517
|
}
|
|
3274
3518
|
)
|
|
3275
3519
|
] })
|
|
3276
3520
|
] }),
|
|
3277
|
-
/* @__PURE__ */ (0,
|
|
3278
|
-
/* @__PURE__ */ (0,
|
|
3279
|
-
/* @__PURE__ */ (0,
|
|
3280
|
-
/* @__PURE__ */ (0,
|
|
3521
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Spacing, { size: "xs" }),
|
|
3522
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Hr, { variant }),
|
|
3523
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Spacing, { size: "xs" }),
|
|
3524
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3281
3525
|
CarouselContent,
|
|
3282
3526
|
{
|
|
3283
3527
|
onTouchStart,
|
|
3284
3528
|
onTouchMove,
|
|
3285
3529
|
onTouchEnd,
|
|
3286
3530
|
children: items.map(
|
|
3287
|
-
(child, index) => (0,
|
|
3531
|
+
(child, index) => (0, import_react14.cloneElement)(child, {
|
|
3288
3532
|
"aria-hidden": index !== activeIndex,
|
|
3289
3533
|
style: {
|
|
3290
3534
|
display: index === activeIndex ? "block" : "none"
|
|
@@ -3294,8 +3538,8 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3294
3538
|
}
|
|
3295
3539
|
)
|
|
3296
3540
|
] }),
|
|
3297
|
-
/* @__PURE__ */ (0,
|
|
3298
|
-
/* @__PURE__ */ (0,
|
|
3541
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Spacing, { size: "md" }),
|
|
3542
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DotsContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: items.map((_, idx) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3299
3543
|
DotButton,
|
|
3300
3544
|
{
|
|
3301
3545
|
active: idx === activeIndex,
|
|
@@ -3311,18 +3555,17 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3311
3555
|
}
|
|
3312
3556
|
);
|
|
3313
3557
|
};
|
|
3314
|
-
var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */ (0,
|
|
3558
|
+
var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CarouselItemContainer, { ...props, style: { ...style }, children });
|
|
3315
3559
|
Carousel.Item = CarouselItem;
|
|
3316
3560
|
|
|
3317
3561
|
// src/components/PasswordInput.tsx
|
|
3318
|
-
var
|
|
3319
|
-
var
|
|
3320
|
-
var PasswordInput = (0,
|
|
3562
|
+
var import_react15 = require("react");
|
|
3563
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3564
|
+
var PasswordInput = (0, import_react15.forwardRef)(
|
|
3321
3565
|
({ value, onChange, ...props }, ref) => {
|
|
3322
|
-
|
|
3323
|
-
const
|
|
3324
|
-
|
|
3325
|
-
(0, import_react13.useImperativeHandle)(ref, () => innerRef.current);
|
|
3566
|
+
const [visible, setVisible] = (0, import_react15.useState)(false);
|
|
3567
|
+
const innerRef = (0, import_react15.useRef)(null);
|
|
3568
|
+
(0, import_react15.useImperativeHandle)(ref, () => innerRef.current);
|
|
3326
3569
|
const handleToggleVisibility = () => {
|
|
3327
3570
|
setVisible((v) => !v);
|
|
3328
3571
|
setTimeout(() => {
|
|
@@ -3332,7 +3575,7 @@ var PasswordInput = (0, import_react13.forwardRef)(
|
|
|
3332
3575
|
}
|
|
3333
3576
|
}, 0);
|
|
3334
3577
|
};
|
|
3335
|
-
return /* @__PURE__ */ (0,
|
|
3578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3336
3579
|
Input2,
|
|
3337
3580
|
{
|
|
3338
3581
|
...props,
|
|
@@ -3340,7 +3583,7 @@ var PasswordInput = (0, import_react13.forwardRef)(
|
|
|
3340
3583
|
type: visible ? "text" : "password",
|
|
3341
3584
|
value,
|
|
3342
3585
|
onChange,
|
|
3343
|
-
suffix: /* @__PURE__ */ (0,
|
|
3586
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3344
3587
|
"button",
|
|
3345
3588
|
{
|
|
3346
3589
|
type: "button",
|
|
@@ -3354,7 +3597,7 @@ var PasswordInput = (0, import_react13.forwardRef)(
|
|
|
3354
3597
|
justifyContent: "center"
|
|
3355
3598
|
},
|
|
3356
3599
|
"aria-label": visible ? "Ocultar senha" : "Mostrar senha",
|
|
3357
|
-
children: visible ? /* @__PURE__ */ (0,
|
|
3600
|
+
children: visible ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { name: "EyeClosed", size: 16, color: "black" }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { name: "EyeOpen", size: 16, color: "black" })
|
|
3358
3601
|
}
|
|
3359
3602
|
)
|
|
3360
3603
|
}
|
|
@@ -3376,6 +3619,8 @@ PasswordInput.displayName = "PasswordInput";
|
|
|
3376
3619
|
Icon,
|
|
3377
3620
|
Input,
|
|
3378
3621
|
LabelledValue,
|
|
3622
|
+
Loader,
|
|
3623
|
+
MaskedInput,
|
|
3379
3624
|
Modal,
|
|
3380
3625
|
MultiStep,
|
|
3381
3626
|
OneTimePassword,
|