@clickpalm/react 1.3.8 → 1.3.10
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 +1 -0
- package/dist/index.js +244 -199
- package/dist/index.mjs +203 -158
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -726,6 +726,29 @@ var Copy = (props) => {
|
|
|
726
726
|
);
|
|
727
727
|
};
|
|
728
728
|
|
|
729
|
+
// src/components/Icon/Svgs/Download.tsx
|
|
730
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
731
|
+
var Download = (props) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
732
|
+
"svg",
|
|
733
|
+
{
|
|
734
|
+
width: "15",
|
|
735
|
+
height: "15",
|
|
736
|
+
viewBox: "0 0 15 15",
|
|
737
|
+
fill: "none",
|
|
738
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
739
|
+
...props,
|
|
740
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
741
|
+
"path",
|
|
742
|
+
{
|
|
743
|
+
d: "M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z",
|
|
744
|
+
fill: "currentColor",
|
|
745
|
+
"fill-rule": "evenodd",
|
|
746
|
+
"clip-rule": "evenodd"
|
|
747
|
+
}
|
|
748
|
+
)
|
|
749
|
+
}
|
|
750
|
+
);
|
|
751
|
+
|
|
729
752
|
// src/components/Icon/icons.ts
|
|
730
753
|
var iconMap = {
|
|
731
754
|
TriangleDown: import_react_icons.TriangleDownIcon,
|
|
@@ -739,6 +762,7 @@ var iconMap = {
|
|
|
739
762
|
Calendar,
|
|
740
763
|
Closed,
|
|
741
764
|
Dots,
|
|
765
|
+
Download,
|
|
742
766
|
Filter,
|
|
743
767
|
Hamburger,
|
|
744
768
|
Pencil,
|
|
@@ -752,7 +776,7 @@ var iconMap = {
|
|
|
752
776
|
};
|
|
753
777
|
|
|
754
778
|
// src/components/Icon/index.tsx
|
|
755
|
-
var
|
|
779
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
756
780
|
var colorMap = {
|
|
757
781
|
black: "#000000",
|
|
758
782
|
green: "#78CB63",
|
|
@@ -765,7 +789,7 @@ function Icon({ name, size = 24, color = "black", ...rest }) {
|
|
|
765
789
|
return null;
|
|
766
790
|
}
|
|
767
791
|
const fillColor = colorMap[color];
|
|
768
|
-
return /* @__PURE__ */ (0,
|
|
792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
769
793
|
IconComponent,
|
|
770
794
|
{
|
|
771
795
|
width: size,
|
|
@@ -972,7 +996,7 @@ var StyledLabel = styled("label", {
|
|
|
972
996
|
});
|
|
973
997
|
|
|
974
998
|
// src/components/Calendar/index.tsx
|
|
975
|
-
var
|
|
999
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
976
1000
|
calendarStyles();
|
|
977
1001
|
var Calendar2 = ({ label, onChange }) => {
|
|
978
1002
|
const [selected, setSelected] = (0, import_react3.useState)(void 0);
|
|
@@ -990,9 +1014,9 @@ var Calendar2 = ({ label, onChange }) => {
|
|
|
990
1014
|
setMonth(selected);
|
|
991
1015
|
}
|
|
992
1016
|
}, [selected]);
|
|
993
|
-
return /* @__PURE__ */ (0,
|
|
994
|
-
/* @__PURE__ */ (0,
|
|
995
|
-
/* @__PURE__ */ (0,
|
|
1017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
1018
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(StyledLabel, { children: label }),
|
|
1019
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
996
1020
|
import_react_day_picker.DayPicker,
|
|
997
1021
|
{
|
|
998
1022
|
className: !open ? "calendar-root-collapsed" : "",
|
|
@@ -1022,21 +1046,21 @@ var Calendar2 = ({ label, onChange }) => {
|
|
|
1022
1046
|
components: {
|
|
1023
1047
|
MonthCaption: ({ calendarMonth, displayIndex, ...safeprops }) => {
|
|
1024
1048
|
const displayMonth = calendarMonth.date;
|
|
1025
|
-
return /* @__PURE__ */ (0,
|
|
1026
|
-
/* @__PURE__ */ (0,
|
|
1049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { ...safeprops, children: [
|
|
1050
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1027
1051
|
Button,
|
|
1028
1052
|
{
|
|
1029
1053
|
variant: "secondary",
|
|
1030
1054
|
size: "sm",
|
|
1031
1055
|
onClick: () => setOpen(!open),
|
|
1032
|
-
children: /* @__PURE__ */ (0,
|
|
1056
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(StyledButton2, { isOpen: open, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "TriangleUp", size: 16 }) })
|
|
1033
1057
|
}
|
|
1034
1058
|
) }),
|
|
1035
|
-
/* @__PURE__ */ (0,
|
|
1059
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "calendar-month_caption", children: /* @__PURE__ */ (0, import_jsx_runtime18.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()) }) })
|
|
1036
1060
|
] });
|
|
1037
1061
|
},
|
|
1038
|
-
PreviousMonthButton: (props) => /* @__PURE__ */ (0,
|
|
1039
|
-
NextMonthButton: (props) => /* @__PURE__ */ (0,
|
|
1062
|
+
PreviousMonthButton: (props) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "TriangleLeft", size: 16 }) }),
|
|
1063
|
+
NextMonthButton: (props) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "TriangleRight", size: 16 }) })
|
|
1040
1064
|
}
|
|
1041
1065
|
}
|
|
1042
1066
|
)
|
|
@@ -1160,12 +1184,12 @@ var Span = styled("span", {
|
|
|
1160
1184
|
});
|
|
1161
1185
|
|
|
1162
1186
|
// src/components/Checkbox/index.tsx
|
|
1163
|
-
var
|
|
1187
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1164
1188
|
var Checkbox2 = (0, import_react4.forwardRef)(
|
|
1165
1189
|
({ label, checked, onCheckedChange, errorMessage, ...rest }, ref) => {
|
|
1166
|
-
return /* @__PURE__ */ (0,
|
|
1167
|
-
/* @__PURE__ */ (0,
|
|
1168
|
-
/* @__PURE__ */ (0,
|
|
1190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
1191
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(StyledWrapper, { hasError: !!errorMessage, children: [
|
|
1192
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1169
1193
|
CheckboxContainer,
|
|
1170
1194
|
{
|
|
1171
1195
|
ref,
|
|
@@ -1173,12 +1197,12 @@ var Checkbox2 = (0, import_react4.forwardRef)(
|
|
|
1173
1197
|
onCheckedChange,
|
|
1174
1198
|
hasError: !!errorMessage,
|
|
1175
1199
|
...rest,
|
|
1176
|
-
children: /* @__PURE__ */ (0,
|
|
1200
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CheckboxIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { name: "Check", size: 16, color: "white" }) })
|
|
1177
1201
|
}
|
|
1178
1202
|
),
|
|
1179
|
-
/* @__PURE__ */ (0,
|
|
1203
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CheckboxLabel, { children: label })
|
|
1180
1204
|
] }),
|
|
1181
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
1205
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Span, { children: errorMessage })
|
|
1182
1206
|
] });
|
|
1183
1207
|
}
|
|
1184
1208
|
);
|
|
@@ -1330,7 +1354,7 @@ var CharCounter = styled(Span2, {
|
|
|
1330
1354
|
});
|
|
1331
1355
|
|
|
1332
1356
|
// src/components/Input/index.tsx
|
|
1333
|
-
var
|
|
1357
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1334
1358
|
var Input2 = (0, import_react5.forwardRef)(
|
|
1335
1359
|
({ prefix, suffix, label, maxLength, showCounter = false, errorMessage, noMargin = false, redBorder, ...props }, forwardedRef) => {
|
|
1336
1360
|
const getDisplayValue = (value) => {
|
|
@@ -1376,9 +1400,9 @@ var Input2 = (0, import_react5.forwardRef)(
|
|
|
1376
1400
|
const type = node.type;
|
|
1377
1401
|
return type?.displayName === "Button";
|
|
1378
1402
|
};
|
|
1379
|
-
return /* @__PURE__ */ (0,
|
|
1380
|
-
label && /* @__PURE__ */ (0,
|
|
1381
|
-
/* @__PURE__ */ (0,
|
|
1403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(StyledWrapper2, { children: [
|
|
1404
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Label, { children: label }),
|
|
1405
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1382
1406
|
TextInputContainer,
|
|
1383
1407
|
{
|
|
1384
1408
|
hasButtonSuffix: isButtonElement(suffix),
|
|
@@ -1388,8 +1412,8 @@ var Input2 = (0, import_react5.forwardRef)(
|
|
|
1388
1412
|
onClick: handleContainerClick,
|
|
1389
1413
|
redBorder,
|
|
1390
1414
|
children: [
|
|
1391
|
-
!!prefix && /* @__PURE__ */ (0,
|
|
1392
|
-
/* @__PURE__ */ (0,
|
|
1415
|
+
!!prefix && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Prefix, { children: prefix }),
|
|
1416
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1393
1417
|
Input,
|
|
1394
1418
|
{
|
|
1395
1419
|
ref: inputRef,
|
|
@@ -1401,13 +1425,13 @@ var Input2 = (0, import_react5.forwardRef)(
|
|
|
1401
1425
|
onChange: handleChange
|
|
1402
1426
|
}
|
|
1403
1427
|
),
|
|
1404
|
-
!!suffix && /* @__PURE__ */ (0,
|
|
1428
|
+
!!suffix && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Suffix, { children: suffix })
|
|
1405
1429
|
]
|
|
1406
1430
|
}
|
|
1407
1431
|
),
|
|
1408
|
-
/* @__PURE__ */ (0,
|
|
1409
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
1410
|
-
showCounter && maxLength && /* @__PURE__ */ (0,
|
|
1432
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Footer, { children: [
|
|
1433
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Span2, { children: errorMessage }),
|
|
1434
|
+
showCounter && maxLength && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(CharCounter, { hasReachedMax: maxLength ? charCount >= maxLength : false, children: [
|
|
1411
1435
|
charCount,
|
|
1412
1436
|
"/",
|
|
1413
1437
|
maxLength
|
|
@@ -1547,7 +1571,7 @@ var SelectContainer = styled("div", {
|
|
|
1547
1571
|
});
|
|
1548
1572
|
|
|
1549
1573
|
// src/components/Datepicker/CustomSelect/index.tsx
|
|
1550
|
-
var
|
|
1574
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1551
1575
|
var CustomSelect = ({
|
|
1552
1576
|
options = [],
|
|
1553
1577
|
value,
|
|
@@ -1576,12 +1600,12 @@ var CustomSelect = ({
|
|
|
1576
1600
|
}, []);
|
|
1577
1601
|
const safeValue = value ?? "";
|
|
1578
1602
|
const selectedLabel = options.find((opt) => opt.value === safeValue)?.label || safeValue;
|
|
1579
|
-
return /* @__PURE__ */ (0,
|
|
1580
|
-
/* @__PURE__ */ (0,
|
|
1603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(SelectContainer, { color, isOpen, ref: selectRef, children: [
|
|
1604
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(SelectValueButton, { onClick: handleToggle, children: [
|
|
1581
1605
|
selectedLabel,
|
|
1582
|
-
/* @__PURE__ */ (0,
|
|
1606
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { name: "TriangleDown", size: 16 }) })
|
|
1583
1607
|
] }),
|
|
1584
|
-
isOpen && /* @__PURE__ */ (0,
|
|
1608
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectOptionsList, { onMouseDown: (e) => e.preventDefault(), children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1585
1609
|
SelectOptionItem,
|
|
1586
1610
|
{
|
|
1587
1611
|
selected: option.value === value,
|
|
@@ -1595,7 +1619,7 @@ var CustomSelect = ({
|
|
|
1595
1619
|
};
|
|
1596
1620
|
|
|
1597
1621
|
// src/components/Datepicker/DatePickerSelectAdapter.tsx
|
|
1598
|
-
var
|
|
1622
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1599
1623
|
function DatePickerSelectAdapter(props) {
|
|
1600
1624
|
const { options, value, onChange } = props;
|
|
1601
1625
|
const handleValueChange = (newValue) => {
|
|
@@ -1618,7 +1642,7 @@ function DatePickerSelectAdapter(props) {
|
|
|
1618
1642
|
if (isYearDropdown) {
|
|
1619
1643
|
selectOptions.reverse();
|
|
1620
1644
|
}
|
|
1621
|
-
return /* @__PURE__ */ (0,
|
|
1645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1622
1646
|
CustomSelect,
|
|
1623
1647
|
{
|
|
1624
1648
|
color: "black",
|
|
@@ -1721,7 +1745,7 @@ var datePickerStyles = globalCss({
|
|
|
1721
1745
|
});
|
|
1722
1746
|
|
|
1723
1747
|
// src/components/Datepicker/index.tsx
|
|
1724
|
-
var
|
|
1748
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1725
1749
|
datePickerStyles();
|
|
1726
1750
|
var oneYearMore = new Date((/* @__PURE__ */ new Date()).getFullYear() + 1, 11);
|
|
1727
1751
|
var Datepicker = (0, import_react7.forwardRef)(({ label, placeholder, value, onChange, errorMessage, endDate = oneYearMore }, ref) => {
|
|
@@ -1754,8 +1778,8 @@ var Datepicker = (0, import_react7.forwardRef)(({ label, placeholder, value, onC
|
|
|
1754
1778
|
}
|
|
1755
1779
|
}, [open, selected]);
|
|
1756
1780
|
const isOpenWithError = open && errorMessage ? true : false;
|
|
1757
|
-
return /* @__PURE__ */ (0,
|
|
1758
|
-
/* @__PURE__ */ (0,
|
|
1781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
|
|
1782
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1759
1783
|
Input2,
|
|
1760
1784
|
{
|
|
1761
1785
|
ref: inputRef,
|
|
@@ -1764,13 +1788,13 @@ var Datepicker = (0, import_react7.forwardRef)(({ label, placeholder, value, onC
|
|
|
1764
1788
|
onFocus: () => setOpen(true),
|
|
1765
1789
|
value: value || "",
|
|
1766
1790
|
readOnly: true,
|
|
1767
|
-
suffix: /* @__PURE__ */ (0,
|
|
1791
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "Calendar", size: 16 }),
|
|
1768
1792
|
noMargin: true,
|
|
1769
1793
|
errorMessage: open ? "" : errorMessage,
|
|
1770
1794
|
redBorder: isOpenWithError
|
|
1771
1795
|
}
|
|
1772
1796
|
),
|
|
1773
|
-
open && /* @__PURE__ */ (0,
|
|
1797
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1774
1798
|
"div",
|
|
1775
1799
|
{
|
|
1776
1800
|
ref: calendarRef,
|
|
@@ -1782,7 +1806,7 @@ var Datepicker = (0, import_react7.forwardRef)(({ label, placeholder, value, onC
|
|
|
1782
1806
|
boxShadow: "0 2px 8px rgba(0,0,0,0.15)",
|
|
1783
1807
|
borderRadius: "8px"
|
|
1784
1808
|
},
|
|
1785
|
-
children: /* @__PURE__ */ (0,
|
|
1809
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1786
1810
|
import_react_day_picker2.DayPicker,
|
|
1787
1811
|
{
|
|
1788
1812
|
mode: "single",
|
|
@@ -1796,8 +1820,8 @@ var Datepicker = (0, import_react7.forwardRef)(({ label, placeholder, value, onC
|
|
|
1796
1820
|
startMonth: new Date(1915, 0),
|
|
1797
1821
|
endMonth: endDate,
|
|
1798
1822
|
components: {
|
|
1799
|
-
PreviousMonthButton: (props) => /* @__PURE__ */ (0,
|
|
1800
|
-
NextMonthButton: (props) => /* @__PURE__ */ (0,
|
|
1823
|
+
PreviousMonthButton: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "TriangleLeft", size: 16 }) }),
|
|
1824
|
+
NextMonthButton: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "TriangleRight", size: 16 }) }),
|
|
1801
1825
|
Dropdown: DatePickerSelectAdapter
|
|
1802
1826
|
}
|
|
1803
1827
|
}
|
|
@@ -1810,7 +1834,7 @@ Datepicker.displayName = "Datepicker";
|
|
|
1810
1834
|
|
|
1811
1835
|
// src/components/Hr.tsx
|
|
1812
1836
|
var import_react8 = require("react");
|
|
1813
|
-
var
|
|
1837
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1814
1838
|
var StyledHr = styled("hr", {
|
|
1815
1839
|
border: "none",
|
|
1816
1840
|
height: "1px",
|
|
@@ -1827,7 +1851,7 @@ var StyledHr = styled("hr", {
|
|
|
1827
1851
|
}
|
|
1828
1852
|
});
|
|
1829
1853
|
var Hr = (0, import_react8.forwardRef)(function Hr2({ children, ...props }, ref) {
|
|
1830
|
-
return /* @__PURE__ */ (0,
|
|
1854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledHr, { ref, ...props, children });
|
|
1831
1855
|
});
|
|
1832
1856
|
Hr.displayName = "Hr";
|
|
1833
1857
|
|
|
@@ -1904,19 +1928,19 @@ var StyledChildren = styled("div", {
|
|
|
1904
1928
|
});
|
|
1905
1929
|
|
|
1906
1930
|
// src/components/Modal/index.tsx
|
|
1907
|
-
var
|
|
1931
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1908
1932
|
var Modal = ({ open, onOpenChange, title, description, children }) => {
|
|
1909
|
-
return /* @__PURE__ */ (0,
|
|
1910
|
-
/* @__PURE__ */ (0,
|
|
1911
|
-
/* @__PURE__ */ (0,
|
|
1912
|
-
/* @__PURE__ */ (0,
|
|
1913
|
-
/* @__PURE__ */ (0,
|
|
1914
|
-
/* @__PURE__ */ (0,
|
|
1933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Dialog2.Root, { open, onOpenChange, modal: true, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Dialog2.Portal, { children: [
|
|
1934
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledOverlay, {}),
|
|
1935
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(StyledContent, { children: [
|
|
1936
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Wrapper, { children: [
|
|
1937
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledTitle, { children: title }),
|
|
1938
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledClose, { asChild: true, "aria-label": "Close", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "Closed", size: 8 }) }) })
|
|
1915
1939
|
] }),
|
|
1916
|
-
/* @__PURE__ */ (0,
|
|
1917
|
-
/* @__PURE__ */ (0,
|
|
1918
|
-
description && /* @__PURE__ */ (0,
|
|
1919
|
-
/* @__PURE__ */ (0,
|
|
1940
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledDivider, {}),
|
|
1941
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
|
|
1942
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledDescription, { children: description }),
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledChildren, { children })
|
|
1920
1944
|
] })
|
|
1921
1945
|
] })
|
|
1922
1946
|
] }) });
|
|
@@ -1953,7 +1977,7 @@ var StyledIndicator = styled(Progress.Indicator, {
|
|
|
1953
1977
|
});
|
|
1954
1978
|
|
|
1955
1979
|
// src/components/ProgressBar/index.tsx
|
|
1956
|
-
var
|
|
1980
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1957
1981
|
var ProgressBar = ({ label, value = 0, max = 100, ...rest }) => {
|
|
1958
1982
|
const [progress2, setProgress] = (0, import_react9.useState)(0);
|
|
1959
1983
|
(0, import_react9.useEffect)(() => {
|
|
@@ -1961,15 +1985,15 @@ var ProgressBar = ({ label, value = 0, max = 100, ...rest }) => {
|
|
|
1961
1985
|
return () => clearTimeout(timer);
|
|
1962
1986
|
}, [value]);
|
|
1963
1987
|
const valueLabel = `${Math.round(progress2 / max * 100)}%`;
|
|
1964
|
-
return /* @__PURE__ */ (0,
|
|
1965
|
-
/* @__PURE__ */ (0,
|
|
1966
|
-
/* @__PURE__ */ (0,
|
|
1988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(StyledWrapper3, { children: [
|
|
1989
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { style: { fontSize: 16, alignSelf: "flex-start", color: "black" }, children: label }),
|
|
1990
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1967
1991
|
StyledRoot,
|
|
1968
1992
|
{
|
|
1969
1993
|
value: progress2,
|
|
1970
1994
|
"aria-valuetext": valueLabel,
|
|
1971
1995
|
...rest,
|
|
1972
|
-
children: /* @__PURE__ */ (0,
|
|
1996
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1973
1997
|
StyledIndicator,
|
|
1974
1998
|
{
|
|
1975
1999
|
style: { transform: `translateX(-${100 - progress2}%)` }
|
|
@@ -2076,7 +2100,7 @@ var Span3 = styled("span", {
|
|
|
2076
2100
|
});
|
|
2077
2101
|
|
|
2078
2102
|
// src/components/Radio/index.tsx
|
|
2079
|
-
var
|
|
2103
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2080
2104
|
var Radio = (0, import_react10.forwardRef)(({
|
|
2081
2105
|
labels,
|
|
2082
2106
|
value,
|
|
@@ -2085,8 +2109,8 @@ var Radio = (0, import_react10.forwardRef)(({
|
|
|
2085
2109
|
required = false,
|
|
2086
2110
|
errorMessage
|
|
2087
2111
|
}, ref) => {
|
|
2088
|
-
return /* @__PURE__ */ (0,
|
|
2089
|
-
/* @__PURE__ */ (0,
|
|
2112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("form", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
2113
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2090
2114
|
StyledRoot2,
|
|
2091
2115
|
{
|
|
2092
2116
|
ref,
|
|
@@ -2096,28 +2120,28 @@ var Radio = (0, import_react10.forwardRef)(({
|
|
|
2096
2120
|
disabled,
|
|
2097
2121
|
required,
|
|
2098
2122
|
loop: true,
|
|
2099
|
-
children: labels.map((label, index) => /* @__PURE__ */ (0,
|
|
2100
|
-
/* @__PURE__ */ (0,
|
|
2123
|
+
children: labels.map((label, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Wrapper2, { children: [
|
|
2124
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2101
2125
|
StyledItem,
|
|
2102
2126
|
{
|
|
2103
2127
|
value: label,
|
|
2104
2128
|
id: `radio-${index}`,
|
|
2105
2129
|
"aria-label": label,
|
|
2106
2130
|
hasError: !!errorMessage,
|
|
2107
|
-
children: /* @__PURE__ */ (0,
|
|
2131
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StyledIndicator2, {})
|
|
2108
2132
|
}
|
|
2109
2133
|
),
|
|
2110
|
-
/* @__PURE__ */ (0,
|
|
2134
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ItemLabel, { htmlFor: `radio-${index}`, children: label })
|
|
2111
2135
|
] }, label))
|
|
2112
2136
|
}
|
|
2113
2137
|
),
|
|
2114
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2138
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Span3, { children: errorMessage })
|
|
2115
2139
|
] });
|
|
2116
2140
|
});
|
|
2117
2141
|
Radio.displayName = "Radio";
|
|
2118
2142
|
|
|
2119
2143
|
// src/components/Spacing.tsx
|
|
2120
|
-
var
|
|
2144
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2121
2145
|
var spacingMap = {
|
|
2122
2146
|
xs: 8,
|
|
2123
2147
|
sm: 12,
|
|
@@ -2129,7 +2153,7 @@ var spacingMap = {
|
|
|
2129
2153
|
};
|
|
2130
2154
|
var Spacing = ({ size, axis = "vertical" }) => {
|
|
2131
2155
|
const style = axis === "vertical" ? { height: spacingMap[size], width: "100%" } : { width: spacingMap[size], height: "100%" };
|
|
2132
|
-
return /* @__PURE__ */ (0,
|
|
2156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style, "data-testid": `spacing-${size}-${axis}` });
|
|
2133
2157
|
};
|
|
2134
2158
|
|
|
2135
2159
|
// src/components/Switch/index.tsx
|
|
@@ -2230,7 +2254,7 @@ var Span4 = styled("span", {
|
|
|
2230
2254
|
});
|
|
2231
2255
|
|
|
2232
2256
|
// src/components/Switch/index.tsx
|
|
2233
|
-
var
|
|
2257
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2234
2258
|
var Switch2 = (0, import_react11.forwardRef)(({
|
|
2235
2259
|
label,
|
|
2236
2260
|
checked,
|
|
@@ -2241,9 +2265,9 @@ var Switch2 = (0, import_react11.forwardRef)(({
|
|
|
2241
2265
|
id,
|
|
2242
2266
|
errorMessage
|
|
2243
2267
|
}, ref) => {
|
|
2244
|
-
return /* @__PURE__ */ (0,
|
|
2245
|
-
/* @__PURE__ */ (0,
|
|
2246
|
-
/* @__PURE__ */ (0,
|
|
2268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
2269
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Wrapper3, { hasError: !!errorMessage, children: [
|
|
2270
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2247
2271
|
StyledRoot3,
|
|
2248
2272
|
{
|
|
2249
2273
|
ref,
|
|
@@ -2254,12 +2278,12 @@ var Switch2 = (0, import_react11.forwardRef)(({
|
|
|
2254
2278
|
hasError: !!errorMessage,
|
|
2255
2279
|
disabled,
|
|
2256
2280
|
required,
|
|
2257
|
-
children: /* @__PURE__ */ (0,
|
|
2281
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(StyledThumb, {})
|
|
2258
2282
|
}
|
|
2259
2283
|
),
|
|
2260
|
-
label && /* @__PURE__ */ (0,
|
|
2284
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Label2, { htmlFor: id, children: label })
|
|
2261
2285
|
] }),
|
|
2262
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2286
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Span4, { children: errorMessage })
|
|
2263
2287
|
] });
|
|
2264
2288
|
});
|
|
2265
2289
|
Switch2.displayName = "Switch";
|
|
@@ -2319,7 +2343,6 @@ var TabsTrigger = styled(Tabs.Trigger, {
|
|
|
2319
2343
|
whiteSpace: "nowrap",
|
|
2320
2344
|
textOverflow: "ellipsis",
|
|
2321
2345
|
overflow: "hidden",
|
|
2322
|
-
userSelect: "none",
|
|
2323
2346
|
background: "$gray100",
|
|
2324
2347
|
backgroundImage: "linear-gradient(to bottom, $clickpalm_mid, $clickpalm_superDark)",
|
|
2325
2348
|
WebkitBackgroundClip: "text",
|
|
@@ -2346,9 +2369,9 @@ var TabsContent = styled(Tabs.Content, {
|
|
|
2346
2369
|
});
|
|
2347
2370
|
|
|
2348
2371
|
// src/components/Tabs/index.tsx
|
|
2349
|
-
var
|
|
2372
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2350
2373
|
var TabsItem = ({ children }) => {
|
|
2351
|
-
return /* @__PURE__ */ (0,
|
|
2374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children });
|
|
2352
2375
|
};
|
|
2353
2376
|
var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) => {
|
|
2354
2377
|
const items = [];
|
|
@@ -2398,7 +2421,7 @@ var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) =>
|
|
|
2398
2421
|
});
|
|
2399
2422
|
}
|
|
2400
2423
|
};
|
|
2401
|
-
return /* @__PURE__ */ (0,
|
|
2424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2402
2425
|
TabsRoot,
|
|
2403
2426
|
{
|
|
2404
2427
|
defaultValue: defaultValue || items[0]?.value,
|
|
@@ -2406,22 +2429,22 @@ var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) =>
|
|
|
2406
2429
|
value,
|
|
2407
2430
|
onValueChange,
|
|
2408
2431
|
children: [
|
|
2409
|
-
/* @__PURE__ */ (0,
|
|
2410
|
-
hasOverflow && /* @__PURE__ */ (0,
|
|
2432
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2433
|
+
hasOverflow && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2411
2434
|
Button,
|
|
2412
2435
|
{
|
|
2413
2436
|
variant: "secondary",
|
|
2414
2437
|
size: "sm",
|
|
2415
2438
|
onClick: () => scroll("left"),
|
|
2416
|
-
children: /* @__PURE__ */ (0,
|
|
2439
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { name: "TriangleLeft", size: 64 })
|
|
2417
2440
|
}
|
|
2418
2441
|
),
|
|
2419
|
-
/* @__PURE__ */ (0,
|
|
2442
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2420
2443
|
TabsList,
|
|
2421
2444
|
{
|
|
2422
2445
|
ref: listRef,
|
|
2423
2446
|
scrollable: hasOverflow,
|
|
2424
|
-
children: items.map((item) => /* @__PURE__ */ (0,
|
|
2447
|
+
children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2425
2448
|
TabsTrigger,
|
|
2426
2449
|
{
|
|
2427
2450
|
value: item.value,
|
|
@@ -2432,17 +2455,17 @@ var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) =>
|
|
|
2432
2455
|
))
|
|
2433
2456
|
}
|
|
2434
2457
|
),
|
|
2435
|
-
hasOverflow && /* @__PURE__ */ (0,
|
|
2458
|
+
hasOverflow && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2436
2459
|
Button,
|
|
2437
2460
|
{
|
|
2438
2461
|
variant: "secondary",
|
|
2439
2462
|
size: "sm",
|
|
2440
2463
|
onClick: () => scroll("right"),
|
|
2441
|
-
children: /* @__PURE__ */ (0,
|
|
2464
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { name: "TriangleRight", size: 64 })
|
|
2442
2465
|
}
|
|
2443
2466
|
)
|
|
2444
2467
|
] }),
|
|
2445
|
-
items.map((item) => /* @__PURE__ */ (0,
|
|
2468
|
+
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2446
2469
|
TabsContent,
|
|
2447
2470
|
{
|
|
2448
2471
|
colorContent,
|
|
@@ -2460,7 +2483,7 @@ Tabs2.Item = TabsItem;
|
|
|
2460
2483
|
|
|
2461
2484
|
// src/components/TextArea.tsx
|
|
2462
2485
|
var import_react13 = require("react");
|
|
2463
|
-
var
|
|
2486
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2464
2487
|
var Wrapper4 = styled("div", {
|
|
2465
2488
|
display: "flex",
|
|
2466
2489
|
flexDirection: "column"
|
|
@@ -2573,9 +2596,9 @@ var TextArea = (0, import_react13.forwardRef)(
|
|
|
2573
2596
|
(0, import_react13.useEffect)(() => {
|
|
2574
2597
|
setCharCount(props.value?.toString().length || 0);
|
|
2575
2598
|
}, [props.value]);
|
|
2576
|
-
return /* @__PURE__ */ (0,
|
|
2577
|
-
label && /* @__PURE__ */ (0,
|
|
2578
|
-
/* @__PURE__ */ (0,
|
|
2599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Wrapper4, { children: [
|
|
2600
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StyledLabel2, { htmlFor: textAreaId, children: label }),
|
|
2601
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2579
2602
|
TextAreaElement,
|
|
2580
2603
|
{
|
|
2581
2604
|
id: textAreaId,
|
|
@@ -2592,9 +2615,9 @@ var TextArea = (0, import_react13.forwardRef)(
|
|
|
2592
2615
|
}
|
|
2593
2616
|
}
|
|
2594
2617
|
),
|
|
2595
|
-
/* @__PURE__ */ (0,
|
|
2596
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2597
|
-
showCounter && maxLength && /* @__PURE__ */ (0,
|
|
2618
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Footer2, { children: [
|
|
2619
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Span5, { children: errorMessage }),
|
|
2620
|
+
showCounter && maxLength && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(CharCounter2, { hasReachedMax: maxLength ? charCount >= maxLength : false, children: [
|
|
2598
2621
|
charCount,
|
|
2599
2622
|
"/",
|
|
2600
2623
|
maxLength
|
|
@@ -2657,7 +2680,7 @@ var TooltipArrow = styled(RadixTooltip.Arrow, {
|
|
|
2657
2680
|
|
|
2658
2681
|
// src/components/Tooltip/index.tsx
|
|
2659
2682
|
var import_react14 = require("react");
|
|
2660
|
-
var
|
|
2683
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2661
2684
|
var Tooltip = ({
|
|
2662
2685
|
content,
|
|
2663
2686
|
children,
|
|
@@ -2680,11 +2703,11 @@ var Tooltip = ({
|
|
|
2680
2703
|
setOpen(!open);
|
|
2681
2704
|
}
|
|
2682
2705
|
};
|
|
2683
|
-
return /* @__PURE__ */ (0,
|
|
2684
|
-
/* @__PURE__ */ (0,
|
|
2685
|
-
/* @__PURE__ */ (0,
|
|
2706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadixTooltip2.Provider, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(RadixTooltip2.Root, { open, onOpenChange: setOpen, delayDuration, children: [
|
|
2707
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TooltipTrigger, { asChild: true, onClick: handleClick, children }),
|
|
2708
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(TooltipContent, { side, sideOffset, children: [
|
|
2686
2709
|
content,
|
|
2687
|
-
/* @__PURE__ */ (0,
|
|
2710
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TooltipArrow, {})
|
|
2688
2711
|
] })
|
|
2689
2712
|
] }) });
|
|
2690
2713
|
};
|
|
@@ -2768,9 +2791,9 @@ var Spinner = styled("span", {
|
|
|
2768
2791
|
});
|
|
2769
2792
|
|
|
2770
2793
|
// src/components/Loader/index.tsx
|
|
2771
|
-
var
|
|
2794
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2772
2795
|
var Loader = ({ show, fullscreen = false }) => {
|
|
2773
|
-
return /* @__PURE__ */ (0,
|
|
2796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Overlay2, { show, fullscreen, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SpinnerContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Spinner, {}) }) });
|
|
2774
2797
|
};
|
|
2775
2798
|
Loader.displayName = "Loader";
|
|
2776
2799
|
|
|
@@ -2839,7 +2862,7 @@ var applyMask = (value, maskType) => {
|
|
|
2839
2862
|
};
|
|
2840
2863
|
|
|
2841
2864
|
// src/components/MaskedInput/index.tsx
|
|
2842
|
-
var
|
|
2865
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2843
2866
|
var MaskedInput = (0, import_react15.forwardRef)(
|
|
2844
2867
|
({ maskType, onChange, ...props }, ref) => {
|
|
2845
2868
|
const [value, setValue] = (0, import_react15.useState)("");
|
|
@@ -2876,7 +2899,7 @@ var MaskedInput = (0, import_react15.forwardRef)(
|
|
|
2876
2899
|
onChange(syntheticEvent);
|
|
2877
2900
|
}
|
|
2878
2901
|
};
|
|
2879
|
-
return /* @__PURE__ */ (0,
|
|
2902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2880
2903
|
Input2,
|
|
2881
2904
|
{
|
|
2882
2905
|
...props,
|
|
@@ -2977,27 +3000,27 @@ var IconButton = styled("button", {
|
|
|
2977
3000
|
});
|
|
2978
3001
|
|
|
2979
3002
|
// src/components/Dropdown/index.tsx
|
|
2980
|
-
var
|
|
3003
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2981
3004
|
var Dropdown = ({ children }) => {
|
|
2982
3005
|
const childrenArray = import_react16.Children.toArray(children);
|
|
2983
|
-
return /* @__PURE__ */ (0,
|
|
2984
|
-
/* @__PURE__ */ (0,
|
|
2985
|
-
/* @__PURE__ */ (0,
|
|
3006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(DropdownMenu2.Root, { modal: false, children: [
|
|
3007
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, { name: "Dots", size: 16 }) }) }),
|
|
3008
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledContent2, { sideOffset: 5, align: "end", children: childrenArray.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react16.Fragment, { children: [
|
|
2986
3009
|
child,
|
|
2987
|
-
index < childrenArray.length - 1 && /* @__PURE__ */ (0,
|
|
3010
|
+
index < childrenArray.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownSeparator, {})
|
|
2988
3011
|
] }, index)) }) })
|
|
2989
3012
|
] });
|
|
2990
3013
|
};
|
|
2991
3014
|
var DropdownSeparator = StyledSeparator;
|
|
2992
3015
|
var DropdownItem = import_react16.default.forwardRef(({ children, ...props }, forwardedRef) => {
|
|
2993
|
-
return /* @__PURE__ */ (0,
|
|
3016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledItem2, { ...props, ref: forwardedRef, children });
|
|
2994
3017
|
});
|
|
2995
3018
|
Dropdown.displayName = "Dropdown";
|
|
2996
3019
|
DropdownItem.displayName = "DropdownItem";
|
|
2997
3020
|
DropdownSeparator.displayName = "DropdownSeparator";
|
|
2998
3021
|
|
|
2999
3022
|
// src/components/Box.tsx
|
|
3000
|
-
var
|
|
3023
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3001
3024
|
var StyledBox = styled("div", {
|
|
3002
3025
|
padding: "$5",
|
|
3003
3026
|
borderRadius: "$md",
|
|
@@ -3019,12 +3042,12 @@ var StyledBox = styled("div", {
|
|
|
3019
3042
|
}
|
|
3020
3043
|
});
|
|
3021
3044
|
var Box = (props) => {
|
|
3022
|
-
return /* @__PURE__ */ (0,
|
|
3045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(StyledBox, { ...props });
|
|
3023
3046
|
};
|
|
3024
3047
|
Box.displayName = "Box";
|
|
3025
3048
|
|
|
3026
3049
|
// src/components/Paragraph.tsx
|
|
3027
|
-
var
|
|
3050
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3028
3051
|
var StyledParagraph = styled("p", {
|
|
3029
3052
|
fontFamily: "$default",
|
|
3030
3053
|
lineHeight: "$short",
|
|
@@ -3066,13 +3089,13 @@ var StyledParagraph = styled("p", {
|
|
|
3066
3089
|
}
|
|
3067
3090
|
});
|
|
3068
3091
|
var Paragraph = (props) => {
|
|
3069
|
-
return /* @__PURE__ */ (0,
|
|
3092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(StyledParagraph, { ...props });
|
|
3070
3093
|
};
|
|
3071
3094
|
Paragraph.displayName = "Paragraph";
|
|
3072
3095
|
|
|
3073
3096
|
// src/components/Heading.tsx
|
|
3074
3097
|
var import_react17 = require("react");
|
|
3075
|
-
var
|
|
3098
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3076
3099
|
var StyledHeading = styled("h2", {
|
|
3077
3100
|
fontFamily: "$default",
|
|
3078
3101
|
lineHeight: "$shorter",
|
|
@@ -3105,7 +3128,7 @@ var StyledHeading = styled("h2", {
|
|
|
3105
3128
|
});
|
|
3106
3129
|
var Heading = (0, import_react17.forwardRef)(
|
|
3107
3130
|
function Heading2({ children, bold = false, ...props }, ref) {
|
|
3108
|
-
return /* @__PURE__ */ (0,
|
|
3131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StyledHeading, { ref, bold, ...props, children });
|
|
3109
3132
|
}
|
|
3110
3133
|
);
|
|
3111
3134
|
Heading.displayName = "Heading";
|
|
@@ -3245,7 +3268,7 @@ var Span6 = styled("span", {
|
|
|
3245
3268
|
});
|
|
3246
3269
|
|
|
3247
3270
|
// src/components/Select/index.tsx
|
|
3248
|
-
var
|
|
3271
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3249
3272
|
var Select2 = (0, import_react18.forwardRef)(
|
|
3250
3273
|
({
|
|
3251
3274
|
value,
|
|
@@ -3260,9 +3283,9 @@ var Select2 = (0, import_react18.forwardRef)(
|
|
|
3260
3283
|
...rest
|
|
3261
3284
|
}, ref) => {
|
|
3262
3285
|
const [open, setOpen] = (0, import_react18.useState)(false);
|
|
3263
|
-
return /* @__PURE__ */ (0,
|
|
3264
|
-
label && /* @__PURE__ */ (0,
|
|
3265
|
-
/* @__PURE__ */ (0,
|
|
3286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(StyledWrapper4, { css: css2, className, style, children: [
|
|
3287
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Label3, { children: label }),
|
|
3288
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3266
3289
|
CustomSelect2.Root,
|
|
3267
3290
|
{
|
|
3268
3291
|
value,
|
|
@@ -3270,15 +3293,15 @@ var Select2 = (0, import_react18.forwardRef)(
|
|
|
3270
3293
|
onOpenChange: setOpen,
|
|
3271
3294
|
...rest,
|
|
3272
3295
|
children: [
|
|
3273
|
-
/* @__PURE__ */ (0,
|
|
3274
|
-
/* @__PURE__ */ (0,
|
|
3275
|
-
/* @__PURE__ */ (0,
|
|
3296
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(StyledTrigger, { "aria-label": label, hasError: !!errorMessage, ref, children: [
|
|
3297
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CustomSelect2.Value, { placeholder }),
|
|
3298
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StyledIcon, { open, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_icons2.TriangleDownIcon, {}) })
|
|
3276
3299
|
] }),
|
|
3277
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
3278
|
-
/* @__PURE__ */ (0,
|
|
3279
|
-
/* @__PURE__ */ (0,
|
|
3280
|
-
/* @__PURE__ */ (0,
|
|
3281
|
-
/* @__PURE__ */ (0,
|
|
3300
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Span6, { children: errorMessage }),
|
|
3301
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CustomSelect2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(StyledContent3, { side: "bottom", align: "start", position: "popper", children: [
|
|
3302
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CustomSelect2.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_icons2.TriangleUpIcon, {}) }),
|
|
3303
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StyledViewport, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StyledItem3, { value: item.value, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StyledItemText, { children: item.label }) }, item.value)) }),
|
|
3304
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CustomSelect2.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_icons2.TriangleDownIcon, {}) })
|
|
3282
3305
|
] }) })
|
|
3283
3306
|
]
|
|
3284
3307
|
}
|
|
@@ -3358,9 +3381,9 @@ var Value2 = styled("div", {
|
|
|
3358
3381
|
});
|
|
3359
3382
|
|
|
3360
3383
|
// src/components/LabelledValue/index.tsx
|
|
3361
|
-
var
|
|
3384
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3362
3385
|
function LabelledValue({ position = "vertical", withRow = false, children }) {
|
|
3363
|
-
return /* @__PURE__ */ (0,
|
|
3386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Container, { position, children: import_react19.Children.map(children, (child) => {
|
|
3364
3387
|
if ((0, import_react19.isValidElement)(child)) {
|
|
3365
3388
|
return (0, import_react19.cloneElement)(child, { position, withRow });
|
|
3366
3389
|
}
|
|
@@ -3368,9 +3391,9 @@ function LabelledValue({ position = "vertical", withRow = false, children }) {
|
|
|
3368
3391
|
}) });
|
|
3369
3392
|
}
|
|
3370
3393
|
function Item4({ label, value, position = "vertical", withRow = false }) {
|
|
3371
|
-
return /* @__PURE__ */ (0,
|
|
3372
|
-
/* @__PURE__ */ (0,
|
|
3373
|
-
/* @__PURE__ */ (0,
|
|
3394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(ItemWrapper, { position, withRow, children: [
|
|
3395
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Label4, { children: label }),
|
|
3396
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Value2, { children: value })
|
|
3374
3397
|
] });
|
|
3375
3398
|
}
|
|
3376
3399
|
LabelledValue.Item = Item4;
|
|
@@ -3442,11 +3465,11 @@ var Span7 = styled("span", {
|
|
|
3442
3465
|
});
|
|
3443
3466
|
|
|
3444
3467
|
// src/components/OneTimePassword/index.tsx
|
|
3445
|
-
var
|
|
3468
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3446
3469
|
var OneTimePassword = ({ label, length, value, errorMessage, onValueChange, ...rootProps }) => {
|
|
3447
|
-
return /* @__PURE__ */ (0,
|
|
3448
|
-
/* @__PURE__ */ (0,
|
|
3449
|
-
/* @__PURE__ */ (0,
|
|
3470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Container2, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(StyledWrapper5, { children: [
|
|
3471
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(StyledLabel3, { children: label }),
|
|
3472
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3450
3473
|
StyledRoot4,
|
|
3451
3474
|
{
|
|
3452
3475
|
value,
|
|
@@ -3454,12 +3477,12 @@ var OneTimePassword = ({ label, length, value, errorMessage, onValueChange, ...r
|
|
|
3454
3477
|
...rootProps,
|
|
3455
3478
|
style: { "--otp-length": length },
|
|
3456
3479
|
children: [
|
|
3457
|
-
Array.from({ length }).map((_, index) => /* @__PURE__ */ (0,
|
|
3458
|
-
/* @__PURE__ */ (0,
|
|
3480
|
+
Array.from({ length }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(StyledInput, {}, index)),
|
|
3481
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(OneTimePasswordField2.HiddenInput, {})
|
|
3459
3482
|
]
|
|
3460
3483
|
}
|
|
3461
3484
|
),
|
|
3462
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
3485
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Span7, { children: errorMessage })
|
|
3463
3486
|
] }) });
|
|
3464
3487
|
};
|
|
3465
3488
|
OneTimePassword.displayName = "OneTimePasswordInput";
|
|
@@ -3629,7 +3652,7 @@ var toast = {
|
|
|
3629
3652
|
};
|
|
3630
3653
|
|
|
3631
3654
|
// src/components/Toast/index.tsx
|
|
3632
|
-
var
|
|
3655
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3633
3656
|
var Toast = () => {
|
|
3634
3657
|
const [messages, setMessages] = React4.useState([]);
|
|
3635
3658
|
const [paused, setPaused] = React4.useState(false);
|
|
@@ -3645,8 +3668,8 @@ var Toast = () => {
|
|
|
3645
3668
|
const removeToast = (id) => {
|
|
3646
3669
|
setMessages((prev) => prev.filter((msg) => msg.id !== id));
|
|
3647
3670
|
};
|
|
3648
|
-
return /* @__PURE__ */ (0,
|
|
3649
|
-
messages.map((message) => /* @__PURE__ */ (0,
|
|
3671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(ToastPrimitive2.Provider, { swipeDirection: "right", children: [
|
|
3672
|
+
messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3650
3673
|
ToastRoot,
|
|
3651
3674
|
{
|
|
3652
3675
|
open: true,
|
|
@@ -3659,11 +3682,11 @@ var Toast = () => {
|
|
|
3659
3682
|
onPause: () => setPaused(true),
|
|
3660
3683
|
onResume: () => setPaused(false),
|
|
3661
3684
|
children: [
|
|
3662
|
-
/* @__PURE__ */ (0,
|
|
3663
|
-
/* @__PURE__ */ (0,
|
|
3664
|
-
message.description && /* @__PURE__ */ (0,
|
|
3685
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(ToastContent, { children: [
|
|
3686
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ToastTitle, { children: message.title }),
|
|
3687
|
+
message.description && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ToastDescription, { children: message.description })
|
|
3665
3688
|
] }),
|
|
3666
|
-
/* @__PURE__ */ (0,
|
|
3689
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ToastAction, { altText: "Fechar", asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3667
3690
|
"button",
|
|
3668
3691
|
{
|
|
3669
3692
|
style: {
|
|
@@ -3673,15 +3696,15 @@ var Toast = () => {
|
|
|
3673
3696
|
alignItems: "center"
|
|
3674
3697
|
},
|
|
3675
3698
|
onClick: () => removeToast(message.id),
|
|
3676
|
-
children: /* @__PURE__ */ (0,
|
|
3699
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: "Closed", size: 16, height: 14, width: 14 })
|
|
3677
3700
|
}
|
|
3678
3701
|
) }),
|
|
3679
|
-
/* @__PURE__ */ (0,
|
|
3702
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ToastProgress, { paused, variant: message.variant })
|
|
3680
3703
|
]
|
|
3681
3704
|
},
|
|
3682
3705
|
message.id
|
|
3683
3706
|
)),
|
|
3684
|
-
/* @__PURE__ */ (0,
|
|
3707
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ToastViewport, {})
|
|
3685
3708
|
] });
|
|
3686
3709
|
};
|
|
3687
3710
|
|
|
@@ -3916,22 +3939,22 @@ var StepLabel = styled("span", {
|
|
|
3916
3939
|
});
|
|
3917
3940
|
|
|
3918
3941
|
// src/components/MultiStep/index.tsx
|
|
3919
|
-
var
|
|
3942
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3920
3943
|
var MultiStep = ({
|
|
3921
3944
|
steps,
|
|
3922
3945
|
currentStep,
|
|
3923
3946
|
orientation = "horizontal",
|
|
3924
3947
|
variant
|
|
3925
3948
|
}) => {
|
|
3926
|
-
return /* @__PURE__ */ (0,
|
|
3949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3927
3950
|
Wrapper5,
|
|
3928
3951
|
{
|
|
3929
3952
|
orientation,
|
|
3930
3953
|
children: steps.map((step, index) => {
|
|
3931
3954
|
const isFirst = index === 0;
|
|
3932
3955
|
const isLast = index === steps.length - 1;
|
|
3933
|
-
return /* @__PURE__ */ (0,
|
|
3934
|
-
/* @__PURE__ */ (0,
|
|
3956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(StepItem, { orientation, children: [
|
|
3957
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3935
3958
|
StepCircle,
|
|
3936
3959
|
{
|
|
3937
3960
|
orientation,
|
|
@@ -3942,7 +3965,7 @@ var MultiStep = ({
|
|
|
3942
3965
|
children: index + 1
|
|
3943
3966
|
}
|
|
3944
3967
|
),
|
|
3945
|
-
/* @__PURE__ */ (0,
|
|
3968
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3946
3969
|
StepLabel,
|
|
3947
3970
|
{
|
|
3948
3971
|
orientation,
|
|
@@ -3966,8 +3989,7 @@ var CarouselContainer = styled("div", {
|
|
|
3966
3989
|
flexDirection: "column",
|
|
3967
3990
|
alignItems: "center",
|
|
3968
3991
|
width: "100%",
|
|
3969
|
-
maxWidth: "720px"
|
|
3970
|
-
userSelect: "none"
|
|
3992
|
+
maxWidth: "720px"
|
|
3971
3993
|
});
|
|
3972
3994
|
var Wrapper6 = styled("div", {
|
|
3973
3995
|
display: "flex",
|
|
@@ -4061,12 +4083,19 @@ var DotButton = styled("button", {
|
|
|
4061
4083
|
borderColor: "$ignite_dark"
|
|
4062
4084
|
}
|
|
4063
4085
|
});
|
|
4086
|
+
var Ellipsis = styled("span", {
|
|
4087
|
+
color: "$ignite_light",
|
|
4088
|
+
textDecoration: "none",
|
|
4089
|
+
height: "9px",
|
|
4090
|
+
display: "flex",
|
|
4091
|
+
alignItems: "center"
|
|
4092
|
+
});
|
|
4064
4093
|
var CarouselItemContainer = styled("div", {
|
|
4065
4094
|
width: "100%"
|
|
4066
4095
|
});
|
|
4067
4096
|
|
|
4068
4097
|
// src/components/Carousel/index.tsx
|
|
4069
|
-
var
|
|
4098
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
4070
4099
|
var SWIPE_THRESHOLD = 50;
|
|
4071
4100
|
var Carousel = ({ title, variant, children }) => {
|
|
4072
4101
|
const items = import_react20.Children.toArray(children);
|
|
@@ -4100,18 +4129,20 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
4100
4129
|
setTouchStartX(null);
|
|
4101
4130
|
setTouchEndX(null);
|
|
4102
4131
|
};
|
|
4103
|
-
|
|
4132
|
+
const activeItem = items[activeIndex];
|
|
4133
|
+
const itemTitle = activeItem.props.title;
|
|
4134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4104
4135
|
CarouselContainer,
|
|
4105
4136
|
{
|
|
4106
4137
|
role: "region",
|
|
4107
4138
|
"aria-roledescription": "carousel",
|
|
4108
4139
|
"aria-label": "Carousel Component",
|
|
4109
4140
|
children: [
|
|
4110
|
-
/* @__PURE__ */ (0,
|
|
4111
|
-
/* @__PURE__ */ (0,
|
|
4112
|
-
/* @__PURE__ */ (0,
|
|
4113
|
-
/* @__PURE__ */ (0,
|
|
4114
|
-
/* @__PURE__ */ (0,
|
|
4141
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Wrapper6, { variant, children: [
|
|
4142
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(CarouselHeader, { children: [
|
|
4143
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Title2, { children: itemTitle ?? title }),
|
|
4144
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Navigation, { children: [
|
|
4145
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4115
4146
|
Button,
|
|
4116
4147
|
{
|
|
4117
4148
|
size: "sm",
|
|
@@ -4119,10 +4150,10 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
4119
4150
|
"aria-label": "Previous Slide",
|
|
4120
4151
|
onClick: prev,
|
|
4121
4152
|
tabIndex: 0,
|
|
4122
|
-
children: /* @__PURE__ */ (0,
|
|
4153
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { name: "TriangleLeft", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
4123
4154
|
}
|
|
4124
4155
|
),
|
|
4125
|
-
/* @__PURE__ */ (0,
|
|
4156
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4126
4157
|
Button,
|
|
4127
4158
|
{
|
|
4128
4159
|
size: "sm",
|
|
@@ -4130,15 +4161,15 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
4130
4161
|
"aria-label": "Previous Slide",
|
|
4131
4162
|
onClick: next,
|
|
4132
4163
|
tabIndex: 0,
|
|
4133
|
-
children: /* @__PURE__ */ (0,
|
|
4164
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
4134
4165
|
}
|
|
4135
4166
|
)
|
|
4136
4167
|
] })
|
|
4137
4168
|
] }),
|
|
4138
|
-
/* @__PURE__ */ (0,
|
|
4139
|
-
/* @__PURE__ */ (0,
|
|
4140
|
-
/* @__PURE__ */ (0,
|
|
4141
|
-
/* @__PURE__ */ (0,
|
|
4169
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Spacing, { size: "xs" }),
|
|
4170
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Hr, { variant }),
|
|
4171
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Spacing, { size: "xs" }),
|
|
4172
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4142
4173
|
CarouselContent,
|
|
4143
4174
|
{
|
|
4144
4175
|
onTouchStart,
|
|
@@ -4155,29 +4186,43 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
4155
4186
|
}
|
|
4156
4187
|
)
|
|
4157
4188
|
] }),
|
|
4158
|
-
/* @__PURE__ */ (0,
|
|
4159
|
-
/* @__PURE__ */ (0,
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4189
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Spacing, { size: "md" }),
|
|
4190
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DotsContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: getPaginationItems(items.length, activeIndex).map(
|
|
4191
|
+
(page, index) => typeof page === "number" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4192
|
+
DotButton,
|
|
4193
|
+
{
|
|
4194
|
+
active: page === activeIndex,
|
|
4195
|
+
"aria-label": `Go to slide ${page + 1}`,
|
|
4196
|
+
"aria-selected": page === activeIndex,
|
|
4197
|
+
role: "tab",
|
|
4198
|
+
onClick: () => setActiveIndex(page),
|
|
4199
|
+
type: "button"
|
|
4200
|
+
},
|
|
4201
|
+
page
|
|
4202
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Ellipsis, { children: "..." }, `ellipsis-${index}`)
|
|
4203
|
+
) }) })
|
|
4171
4204
|
]
|
|
4172
4205
|
}
|
|
4173
4206
|
);
|
|
4174
4207
|
};
|
|
4175
|
-
var
|
|
4208
|
+
var getPaginationItems = (totalItems, activeIndex) => {
|
|
4209
|
+
if (totalItems <= 10) {
|
|
4210
|
+
return Array.from({ length: totalItems }, (_, i) => i);
|
|
4211
|
+
}
|
|
4212
|
+
if (activeIndex < 7) {
|
|
4213
|
+
return [0, 1, 2, 3, 4, 5, 6, "...", totalItems - 1];
|
|
4214
|
+
}
|
|
4215
|
+
if (activeIndex >= totalItems - 5) {
|
|
4216
|
+
return [0, "...", totalItems - 5, totalItems - 4, totalItems - 3, totalItems - 2, totalItems - 1];
|
|
4217
|
+
}
|
|
4218
|
+
return [0, "...", activeIndex - 2, activeIndex - 1, activeIndex, activeIndex + 1, activeIndex + 2, "...", totalItems - 1];
|
|
4219
|
+
};
|
|
4220
|
+
var CarouselItem = ({ children, style, title, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CarouselItemContainer, { ...props, style: { ...style }, children });
|
|
4176
4221
|
Carousel.Item = CarouselItem;
|
|
4177
4222
|
|
|
4178
4223
|
// src/components/PasswordInput.tsx
|
|
4179
4224
|
var import_react21 = require("react");
|
|
4180
|
-
var
|
|
4225
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4181
4226
|
var ToggleButton = styled("button", {
|
|
4182
4227
|
all: "unset",
|
|
4183
4228
|
cursor: "pointer",
|
|
@@ -4206,7 +4251,7 @@ var PasswordInput = (0, import_react21.forwardRef)(
|
|
|
4206
4251
|
}
|
|
4207
4252
|
}, 0);
|
|
4208
4253
|
};
|
|
4209
|
-
return /* @__PURE__ */ (0,
|
|
4254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4210
4255
|
Input2,
|
|
4211
4256
|
{
|
|
4212
4257
|
...props,
|
|
@@ -4214,14 +4259,14 @@ var PasswordInput = (0, import_react21.forwardRef)(
|
|
|
4214
4259
|
type: visible ? "text" : "password",
|
|
4215
4260
|
value,
|
|
4216
4261
|
onChange,
|
|
4217
|
-
suffix: /* @__PURE__ */ (0,
|
|
4262
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4218
4263
|
ToggleButton,
|
|
4219
4264
|
{
|
|
4220
4265
|
type: "button",
|
|
4221
4266
|
onClick: handleToggleVisibility,
|
|
4222
4267
|
onMouseDown: (e) => e.preventDefault(),
|
|
4223
4268
|
"aria-label": visible ? "Ocultar senha" : "Mostrar senha",
|
|
4224
|
-
children: visible ? /* @__PURE__ */ (0,
|
|
4269
|
+
children: visible ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icon, { name: "EyeClosed", size: 16, color: "black" }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icon, { name: "EyeOpen", size: 16, color: "black" })
|
|
4225
4270
|
}
|
|
4226
4271
|
)
|
|
4227
4272
|
}
|
|
@@ -4318,18 +4363,18 @@ var OptionsButton = styled(Button, {
|
|
|
4318
4363
|
});
|
|
4319
4364
|
|
|
4320
4365
|
// src/components/Accordion/index.tsx
|
|
4321
|
-
var
|
|
4366
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4322
4367
|
var Accordion2 = import_react22.default.forwardRef(
|
|
4323
4368
|
({ title, children, dropdownItems }, ref) => {
|
|
4324
|
-
return /* @__PURE__ */ (0,
|
|
4325
|
-
/* @__PURE__ */ (0,
|
|
4326
|
-
/* @__PURE__ */ (0,
|
|
4327
|
-
/* @__PURE__ */ (0,
|
|
4369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(AccordionContainer, { type: "single", collapsible: true, ref, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(AccordionItem, { value: "item-1", children: [
|
|
4370
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(AccordionHeader, { children: [
|
|
4371
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(AccordionTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: title }) }),
|
|
4372
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(TriggerContent, { children: [
|
|
4328
4373
|
dropdownItems && dropdownItems,
|
|
4329
|
-
/* @__PURE__ */ (0,
|
|
4374
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(RadixAccordion.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(StyledButton, { as: "div", variant: "secondary", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(AccordionChevron, { name: "TriangleDown", size: 16, "aria-hidden": true }) }) })
|
|
4330
4375
|
] })
|
|
4331
4376
|
] }),
|
|
4332
|
-
/* @__PURE__ */ (0,
|
|
4377
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(RadixAccordion.Content, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(AccordionContent, { children }) })
|
|
4333
4378
|
] }) });
|
|
4334
4379
|
}
|
|
4335
4380
|
);
|