@clickpalm/react 1.2.17 → 1.3.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 +4 -0
- package/dist/index.js +566 -247
- package/dist/index.mjs +542 -222
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -735,6 +735,7 @@ var iconMap = {
|
|
|
735
735
|
EyeClosed: import_react_icons.EyeClosedIcon,
|
|
736
736
|
EyeOpen: import_react_icons.EyeOpenIcon,
|
|
737
737
|
QuestionMark: import_react_icons.QuestionMarkIcon,
|
|
738
|
+
Reload: import_react_icons.ReloadIcon,
|
|
738
739
|
Calendar,
|
|
739
740
|
Closed,
|
|
740
741
|
Dots,
|
|
@@ -1186,7 +1187,7 @@ Checkbox2.displayName = "Checkbox";
|
|
|
1186
1187
|
// src/components/Datepicker/index.tsx
|
|
1187
1188
|
var import_date_fns2 = require("date-fns");
|
|
1188
1189
|
var import_locale2 = require("date-fns/locale");
|
|
1189
|
-
var
|
|
1190
|
+
var import_react7 = require("react");
|
|
1190
1191
|
var import_react_day_picker2 = require("react-day-picker");
|
|
1191
1192
|
var import_style2 = require("react-day-picker/dist/style.css");
|
|
1192
1193
|
|
|
@@ -1217,7 +1218,8 @@ var TextInputContainer = styled("div", {
|
|
|
1217
1218
|
marginBottom: "$6",
|
|
1218
1219
|
FontSize: "$md",
|
|
1219
1220
|
"&:has(input:focus), &:hover": {
|
|
1220
|
-
border: "2px solid $clickpalm_light"
|
|
1221
|
+
border: "2px solid $clickpalm_light",
|
|
1222
|
+
padding: "calc($4 - 0.9px) calc($4 - 0.9px)"
|
|
1221
1223
|
},
|
|
1222
1224
|
"&:has(input:disabled)": {
|
|
1223
1225
|
opacity: 0.5,
|
|
@@ -1238,9 +1240,15 @@ var TextInputContainer = styled("div", {
|
|
|
1238
1240
|
border: "1px solid $danger_dark",
|
|
1239
1241
|
marginBottom: "0px",
|
|
1240
1242
|
"&:has(input:focus), &:hover": {
|
|
1241
|
-
border: "2px solid $danger_dark"
|
|
1243
|
+
border: "2px solid $danger_dark",
|
|
1244
|
+
padding: "calc($4 - 0.9px) calc($4 - 0.9px)"
|
|
1242
1245
|
}
|
|
1243
1246
|
}
|
|
1247
|
+
},
|
|
1248
|
+
hasCounter: {
|
|
1249
|
+
true: {
|
|
1250
|
+
marginBottom: "0px"
|
|
1251
|
+
}
|
|
1244
1252
|
}
|
|
1245
1253
|
}
|
|
1246
1254
|
});
|
|
@@ -1280,17 +1288,45 @@ var Span2 = styled("span", {
|
|
|
1280
1288
|
fontFamily: "$default",
|
|
1281
1289
|
fontWeight: "$regular",
|
|
1282
1290
|
fontSize: "$sm",
|
|
1291
|
+
textAlign: "left",
|
|
1283
1292
|
color: "$danger_dark",
|
|
1284
1293
|
alignSelf: "flex-start",
|
|
1285
1294
|
paddingLeft: "1px",
|
|
1286
1295
|
marginTop: "2px",
|
|
1287
|
-
marginBottom: "$6"
|
|
1296
|
+
marginBottom: "$6",
|
|
1297
|
+
flexShrink: 1,
|
|
1298
|
+
wordBreak: "break-word"
|
|
1299
|
+
});
|
|
1300
|
+
var Footer = styled("div", {
|
|
1301
|
+
display: "flex",
|
|
1302
|
+
justifyContent: "space-between",
|
|
1303
|
+
width: "100%",
|
|
1304
|
+
gap: "$2"
|
|
1305
|
+
});
|
|
1306
|
+
var CharCounter = styled(Span2, {
|
|
1307
|
+
fontFamily: "$default",
|
|
1308
|
+
fontWeight: "$regular",
|
|
1309
|
+
fontSize: "$sm",
|
|
1310
|
+
color: "$gray_mid",
|
|
1311
|
+
marginLeft: "auto",
|
|
1312
|
+
whiteSpace: "nowrap",
|
|
1313
|
+
paddingRight: "1px",
|
|
1314
|
+
marginTop: "2px",
|
|
1315
|
+
marginBottom: "$6",
|
|
1316
|
+
variants: {
|
|
1317
|
+
hasReachedMax: {
|
|
1318
|
+
true: {
|
|
1319
|
+
color: "$danger_dark"
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1288
1323
|
});
|
|
1289
1324
|
|
|
1290
1325
|
// src/components/Input/index.tsx
|
|
1291
1326
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1292
1327
|
var Input2 = (0, import_react5.forwardRef)(
|
|
1293
|
-
({ prefix, suffix, label, errorMessage, noMargin = false, ...props }, forwardedRef) => {
|
|
1328
|
+
({ prefix, suffix, label, maxLength, errorMessage, noMargin = false, ...props }, forwardedRef) => {
|
|
1329
|
+
const [charCount, setCharCount] = (0, import_react5.useState)(0);
|
|
1294
1330
|
const localInputRef = (0, import_react5.useRef)(null);
|
|
1295
1331
|
const inputRef = forwardedRef || localInputRef;
|
|
1296
1332
|
const handleContainerClick = () => {
|
|
@@ -1310,20 +1346,237 @@ var Input2 = (0, import_react5.forwardRef)(
|
|
|
1310
1346
|
hasButtonSuffix: isButtonElement(suffix),
|
|
1311
1347
|
noMargin,
|
|
1312
1348
|
hasError: !!errorMessage,
|
|
1349
|
+
hasCounter: !!maxLength,
|
|
1313
1350
|
onClick: handleContainerClick,
|
|
1314
1351
|
children: [
|
|
1315
1352
|
!!prefix && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Prefix, { children: prefix }),
|
|
1316
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1353
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1354
|
+
Input,
|
|
1355
|
+
{
|
|
1356
|
+
ref: inputRef,
|
|
1357
|
+
...props,
|
|
1358
|
+
maxLength,
|
|
1359
|
+
onChange: (e) => {
|
|
1360
|
+
if (props.onChange) {
|
|
1361
|
+
props.onChange(e);
|
|
1362
|
+
}
|
|
1363
|
+
setCharCount(e.target.value.length);
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
),
|
|
1317
1367
|
!!suffix && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Suffix, { children: suffix })
|
|
1318
1368
|
]
|
|
1319
1369
|
}
|
|
1320
1370
|
),
|
|
1321
|
-
|
|
1371
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Footer, { children: [
|
|
1372
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Span2, { children: errorMessage }),
|
|
1373
|
+
maxLength && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(CharCounter, { hasReachedMax: maxLength ? charCount >= maxLength : false, children: [
|
|
1374
|
+
charCount,
|
|
1375
|
+
"/",
|
|
1376
|
+
maxLength
|
|
1377
|
+
] })
|
|
1378
|
+
] })
|
|
1322
1379
|
] });
|
|
1323
1380
|
}
|
|
1324
1381
|
);
|
|
1325
1382
|
Input2.displayName = "Input";
|
|
1326
1383
|
|
|
1384
|
+
// src/components/Datepicker/CustomSelect/index.tsx
|
|
1385
|
+
var import_react6 = require("react");
|
|
1386
|
+
|
|
1387
|
+
// src/components/Datepicker/CustomSelect/styles.ts
|
|
1388
|
+
var IconWrapper = styled("span", {
|
|
1389
|
+
display: "flex",
|
|
1390
|
+
alignItems: "center",
|
|
1391
|
+
justifyContent: "center",
|
|
1392
|
+
transition: "transform 0.3s ease"
|
|
1393
|
+
});
|
|
1394
|
+
var SelectValueButton = styled("button", {
|
|
1395
|
+
position: "relative",
|
|
1396
|
+
display: "flex",
|
|
1397
|
+
alignItems: "center",
|
|
1398
|
+
width: "100%",
|
|
1399
|
+
backgroundColor: "transparent",
|
|
1400
|
+
borderRadius: "8px",
|
|
1401
|
+
padding: "8px",
|
|
1402
|
+
fontSize: "16px",
|
|
1403
|
+
fontWeight: theme.fontWeights.bold,
|
|
1404
|
+
fontFamily: theme.fonts.default,
|
|
1405
|
+
textAlign: "left",
|
|
1406
|
+
cursor: "pointer",
|
|
1407
|
+
gap: theme.space[2],
|
|
1408
|
+
"&:hover, &:focus": {
|
|
1409
|
+
backgroundColor: "transparent",
|
|
1410
|
+
outline: "none",
|
|
1411
|
+
boxShadow: "none",
|
|
1412
|
+
border: `2px solid ${theme.colors.gray_mid}`
|
|
1413
|
+
}
|
|
1414
|
+
});
|
|
1415
|
+
var SelectOptionsList = styled("ul", {
|
|
1416
|
+
position: "absolute",
|
|
1417
|
+
top: "100%",
|
|
1418
|
+
left: 0,
|
|
1419
|
+
right: 0,
|
|
1420
|
+
backgroundColor: theme.colors.gray_background,
|
|
1421
|
+
border: `2px solid ${theme.colors.white}`,
|
|
1422
|
+
borderRadius: "8px",
|
|
1423
|
+
boxShadow: "0 2px 8px rgba(0,0,0,0.15)",
|
|
1424
|
+
listStyle: "none",
|
|
1425
|
+
margin: "4px 0 0",
|
|
1426
|
+
padding: "0 12px",
|
|
1427
|
+
zIndex: 10,
|
|
1428
|
+
maxHeight: "200px",
|
|
1429
|
+
overflowY: "auto",
|
|
1430
|
+
fontFamily: theme.fonts.default,
|
|
1431
|
+
fontWeight: theme.fontWeights.regular,
|
|
1432
|
+
textAlign: "left",
|
|
1433
|
+
width: "100%",
|
|
1434
|
+
"&::-webkit-scrollbar": {
|
|
1435
|
+
width: "8px"
|
|
1436
|
+
},
|
|
1437
|
+
"&::-webkit-scrollbar-track": {
|
|
1438
|
+
background: theme.colors.gray_light,
|
|
1439
|
+
borderRadius: "8px"
|
|
1440
|
+
},
|
|
1441
|
+
"&::-webkit-scrollbar-thumb": {
|
|
1442
|
+
backgroundColor: theme.colors.clickpalm_light,
|
|
1443
|
+
borderRadius: "8px"
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1446
|
+
var SelectOptionItem = styled("li", {
|
|
1447
|
+
padding: "12px 0",
|
|
1448
|
+
color: theme.colors.black,
|
|
1449
|
+
cursor: "pointer",
|
|
1450
|
+
borderBottom: `1px solid ${theme.colors.gray_mid}`,
|
|
1451
|
+
"&:last-child": {
|
|
1452
|
+
borderBottom: "none"
|
|
1453
|
+
},
|
|
1454
|
+
"&:hover": {
|
|
1455
|
+
backgroundColor: theme.colors.gray_background,
|
|
1456
|
+
color: theme.colors.clickpalm_mid
|
|
1457
|
+
},
|
|
1458
|
+
variants: {
|
|
1459
|
+
selected: {
|
|
1460
|
+
true: {
|
|
1461
|
+
backgroundColor: theme.colors.gray_background,
|
|
1462
|
+
color: theme.colors.clickpalm_mid
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
});
|
|
1467
|
+
var SelectContainer = styled("div", {
|
|
1468
|
+
position: "relative",
|
|
1469
|
+
width: "100%",
|
|
1470
|
+
maxWidth: "130px",
|
|
1471
|
+
variants: {
|
|
1472
|
+
isOpen: {
|
|
1473
|
+
true: {
|
|
1474
|
+
[`& ${IconWrapper}`]: {
|
|
1475
|
+
transform: "rotate(180deg)"
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
},
|
|
1479
|
+
color: {
|
|
1480
|
+
white: {
|
|
1481
|
+
[`& ${SelectValueButton}`]: {
|
|
1482
|
+
color: theme.colors.white,
|
|
1483
|
+
border: `2px solid ${theme.colors.white}`
|
|
1484
|
+
},
|
|
1485
|
+
[`& ${IconWrapper}`]: {
|
|
1486
|
+
color: theme.colors.white
|
|
1487
|
+
}
|
|
1488
|
+
},
|
|
1489
|
+
black: {
|
|
1490
|
+
marginBottom: 0,
|
|
1491
|
+
[`& ${SelectValueButton}`]: {
|
|
1492
|
+
color: theme.colors.black,
|
|
1493
|
+
border: "1px solid transparent"
|
|
1494
|
+
},
|
|
1495
|
+
[`& ${IconWrapper}`]: {
|
|
1496
|
+
color: theme.colors.black
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
});
|
|
1502
|
+
|
|
1503
|
+
// src/components/Datepicker/CustomSelect/index.tsx
|
|
1504
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1505
|
+
var CustomSelect = ({
|
|
1506
|
+
options = [],
|
|
1507
|
+
value,
|
|
1508
|
+
onChange,
|
|
1509
|
+
color = "white"
|
|
1510
|
+
}) => {
|
|
1511
|
+
const [isOpen, setIsOpen] = (0, import_react6.useState)(false);
|
|
1512
|
+
const selectRef = (0, import_react6.useRef)(null);
|
|
1513
|
+
const handleToggle = () => setIsOpen(!isOpen);
|
|
1514
|
+
const handleOptionClick = (optionValue) => {
|
|
1515
|
+
if (onChange) {
|
|
1516
|
+
onChange(optionValue);
|
|
1517
|
+
}
|
|
1518
|
+
setIsOpen(false);
|
|
1519
|
+
};
|
|
1520
|
+
(0, import_react6.useEffect)(() => {
|
|
1521
|
+
const handleClickOutside = (event) => {
|
|
1522
|
+
if (selectRef.current && !selectRef.current.contains(event.target)) {
|
|
1523
|
+
setIsOpen(false);
|
|
1524
|
+
}
|
|
1525
|
+
};
|
|
1526
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
1527
|
+
return () => {
|
|
1528
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
1529
|
+
};
|
|
1530
|
+
}, []);
|
|
1531
|
+
const safeValue = value ?? "";
|
|
1532
|
+
const selectedLabel = options.find((opt) => opt.value === safeValue)?.label || safeValue;
|
|
1533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(SelectContainer, { color, isOpen, ref: selectRef, children: [
|
|
1534
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(SelectValueButton, { onClick: handleToggle, children: [
|
|
1535
|
+
selectedLabel,
|
|
1536
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "TriangleDown", size: 16 }) })
|
|
1537
|
+
] }),
|
|
1538
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectOptionsList, { onMouseDown: (e) => e.preventDefault(), children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1539
|
+
SelectOptionItem,
|
|
1540
|
+
{
|
|
1541
|
+
selected: option.value === value,
|
|
1542
|
+
onClick: () => handleOptionClick(option.value),
|
|
1543
|
+
children: option.label
|
|
1544
|
+
},
|
|
1545
|
+
option.value
|
|
1546
|
+
)) })
|
|
1547
|
+
] });
|
|
1548
|
+
};
|
|
1549
|
+
|
|
1550
|
+
// src/components/Datepicker/DatePickerSelectAdapter.tsx
|
|
1551
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1552
|
+
function DatePickerSelectAdapter(props) {
|
|
1553
|
+
const { options, value, onChange } = props;
|
|
1554
|
+
const handleValueChange = (newValue) => {
|
|
1555
|
+
if (onChange) {
|
|
1556
|
+
const syntheticEvent = {
|
|
1557
|
+
target: { value: newValue }
|
|
1558
|
+
};
|
|
1559
|
+
onChange(syntheticEvent);
|
|
1560
|
+
}
|
|
1561
|
+
};
|
|
1562
|
+
const selectOptions = options?.map((option) => {
|
|
1563
|
+
const label = typeof option.label === "string" ? option.label.charAt(0).toUpperCase() + option.label.slice(1) : option.label;
|
|
1564
|
+
return {
|
|
1565
|
+
label,
|
|
1566
|
+
value: option.value?.toString() ?? ""
|
|
1567
|
+
};
|
|
1568
|
+
}) || [];
|
|
1569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1570
|
+
CustomSelect,
|
|
1571
|
+
{
|
|
1572
|
+
color: "black",
|
|
1573
|
+
options: selectOptions,
|
|
1574
|
+
value: value?.toString() || "",
|
|
1575
|
+
onChange: handleValueChange
|
|
1576
|
+
}
|
|
1577
|
+
);
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1327
1580
|
// src/components/Datepicker/styles.ts
|
|
1328
1581
|
var datePickerStyles = globalCss({
|
|
1329
1582
|
".rdp-root": {
|
|
@@ -1351,7 +1604,8 @@ var datePickerStyles = globalCss({
|
|
|
1351
1604
|
paddingLeft: "15px"
|
|
1352
1605
|
},
|
|
1353
1606
|
".rdp-caption_label": {
|
|
1354
|
-
paddingLeft: theme.space[1]
|
|
1607
|
+
paddingLeft: theme.space[1],
|
|
1608
|
+
textTransform: "capitalize"
|
|
1355
1609
|
},
|
|
1356
1610
|
".rdp-nav": {
|
|
1357
1611
|
gap: theme.space[1]
|
|
@@ -1383,18 +1637,47 @@ var datePickerStyles = globalCss({
|
|
|
1383
1637
|
background: theme.colors.clickpalm_light,
|
|
1384
1638
|
color: theme.colors.white
|
|
1385
1639
|
}
|
|
1640
|
+
// '.rdp-caption_dropdowns': {
|
|
1641
|
+
// display: 'flex',
|
|
1642
|
+
// gap: theme.space[2],
|
|
1643
|
+
// },
|
|
1644
|
+
// '.rdp-dropdown': {
|
|
1645
|
+
// padding: '6px 8px',
|
|
1646
|
+
// fontFamily: theme.fonts.default,
|
|
1647
|
+
// fontSize: theme.fontSizes.sm,
|
|
1648
|
+
// color: theme.colors.black,
|
|
1649
|
+
// border: `1px solid ${theme.colors.gray_light}`,
|
|
1650
|
+
// borderRadius: theme.radii.md,
|
|
1651
|
+
// backgroundColor: theme.colors.white,
|
|
1652
|
+
// appearance: 'none',
|
|
1653
|
+
// backgroundRepeat: 'no-repeat',
|
|
1654
|
+
// backgroundPosition: `right ${theme.space[2]} center`,
|
|
1655
|
+
// backgroundSize: '1em',
|
|
1656
|
+
// '&:focus, &:hover': {
|
|
1657
|
+
// outline: 'none',
|
|
1658
|
+
// borderColor: theme.colors.clickpalm_light,
|
|
1659
|
+
// },
|
|
1660
|
+
// '& option:checked': {
|
|
1661
|
+
// backgroundColor: theme.colors.clickpalm_light,
|
|
1662
|
+
// color: theme.colors.white,
|
|
1663
|
+
// },
|
|
1664
|
+
// '& option:hover': {
|
|
1665
|
+
// backgroundColor: theme.colors.gray_background,
|
|
1666
|
+
// color: theme.colors.black,
|
|
1667
|
+
// },
|
|
1668
|
+
// },
|
|
1386
1669
|
});
|
|
1387
1670
|
|
|
1388
1671
|
// src/components/Datepicker/index.tsx
|
|
1389
|
-
var
|
|
1672
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1390
1673
|
datePickerStyles();
|
|
1391
|
-
var Datepicker = (0,
|
|
1392
|
-
const [selected, setSelected] = (0,
|
|
1393
|
-
const [month, setMonth] = (0,
|
|
1394
|
-
const [open, setOpen] = (0,
|
|
1395
|
-
const inputRef = (0,
|
|
1396
|
-
const calendarRef = (0,
|
|
1397
|
-
(0,
|
|
1674
|
+
var Datepicker = (0, import_react7.forwardRef)(({ label, placeholder, value, onChange, errorMessage }, ref) => {
|
|
1675
|
+
const [selected, setSelected] = (0, import_react7.useState)(void 0);
|
|
1676
|
+
const [month, setMonth] = (0, import_react7.useState)(/* @__PURE__ */ new Date());
|
|
1677
|
+
const [open, setOpen] = (0, import_react7.useState)(false);
|
|
1678
|
+
const inputRef = (0, import_react7.useRef)(null);
|
|
1679
|
+
const calendarRef = (0, import_react7.useRef)(null);
|
|
1680
|
+
(0, import_react7.useImperativeHandle)(ref, () => inputRef.current);
|
|
1398
1681
|
const handleDaySelect = (date) => {
|
|
1399
1682
|
setSelected(date);
|
|
1400
1683
|
if (date) {
|
|
@@ -1403,7 +1686,7 @@ var Datepicker = (0, import_react6.forwardRef)(({ label, value, onChange, errorM
|
|
|
1403
1686
|
}
|
|
1404
1687
|
setOpen(false);
|
|
1405
1688
|
};
|
|
1406
|
-
(0,
|
|
1689
|
+
(0, import_react7.useEffect)(() => {
|
|
1407
1690
|
const handleClickOutside = (event) => {
|
|
1408
1691
|
if (calendarRef.current && !calendarRef.current.contains(event.target) && inputRef.current && !inputRef.current.contains(event.target)) {
|
|
1409
1692
|
setOpen(false);
|
|
@@ -1412,26 +1695,27 @@ var Datepicker = (0, import_react6.forwardRef)(({ label, value, onChange, errorM
|
|
|
1412
1695
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1413
1696
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1414
1697
|
}, []);
|
|
1415
|
-
(0,
|
|
1698
|
+
(0, import_react7.useEffect)(() => {
|
|
1416
1699
|
if (!open && selected) {
|
|
1417
1700
|
setMonth(selected);
|
|
1418
1701
|
}
|
|
1419
1702
|
}, [open, selected]);
|
|
1420
|
-
return /* @__PURE__ */ (0,
|
|
1421
|
-
/* @__PURE__ */ (0,
|
|
1703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
|
|
1704
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1422
1705
|
Input2,
|
|
1423
1706
|
{
|
|
1424
1707
|
ref: inputRef,
|
|
1425
1708
|
label,
|
|
1426
|
-
placeholder
|
|
1709
|
+
placeholder,
|
|
1427
1710
|
onFocus: () => setOpen(true),
|
|
1428
1711
|
value: value || "",
|
|
1429
1712
|
readOnly: true,
|
|
1430
|
-
suffix: /* @__PURE__ */ (0,
|
|
1431
|
-
errorMessage
|
|
1713
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "Calendar", size: 16 }),
|
|
1714
|
+
errorMessage,
|
|
1715
|
+
noMargin: true
|
|
1432
1716
|
}
|
|
1433
1717
|
),
|
|
1434
|
-
open && /* @__PURE__ */ (0,
|
|
1718
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1435
1719
|
"div",
|
|
1436
1720
|
{
|
|
1437
1721
|
ref: calendarRef,
|
|
@@ -1443,7 +1727,7 @@ var Datepicker = (0, import_react6.forwardRef)(({ label, value, onChange, errorM
|
|
|
1443
1727
|
boxShadow: "0 2px 8px rgba(0,0,0,0.15)",
|
|
1444
1728
|
borderRadius: "8px"
|
|
1445
1729
|
},
|
|
1446
|
-
children: /* @__PURE__ */ (0,
|
|
1730
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1447
1731
|
import_react_day_picker2.DayPicker,
|
|
1448
1732
|
{
|
|
1449
1733
|
mode: "single",
|
|
@@ -1453,20 +1737,13 @@ var Datepicker = (0, import_react6.forwardRef)(({ label, value, onChange, errorM
|
|
|
1453
1737
|
onMonthChange: setMonth,
|
|
1454
1738
|
locale: import_locale2.ptBR,
|
|
1455
1739
|
showOutsideDays: true,
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
const ano = (0, import_date_fns2.format)(month2, "yyyy", options);
|
|
1460
|
-
return `${mes} de ${ano}`;
|
|
1461
|
-
},
|
|
1462
|
-
formatWeekdayName: (date, options) => {
|
|
1463
|
-
const dia = (0, import_date_fns2.format)(date, "EEEEEE", options);
|
|
1464
|
-
return dia.charAt(0).toUpperCase() + dia.slice(1);
|
|
1465
|
-
}
|
|
1466
|
-
},
|
|
1740
|
+
captionLayout: "dropdown",
|
|
1741
|
+
startMonth: new Date(1915, 0),
|
|
1742
|
+
endMonth: /* @__PURE__ */ new Date(),
|
|
1467
1743
|
components: {
|
|
1468
|
-
PreviousMonthButton: (props) => /* @__PURE__ */ (0,
|
|
1469
|
-
NextMonthButton: (props) => /* @__PURE__ */ (0,
|
|
1744
|
+
PreviousMonthButton: (props) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "TriangleLeft", size: 16 }) }),
|
|
1745
|
+
NextMonthButton: (props) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Button, { size: "sm", variant: "secondary", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "TriangleRight", size: 16 }) }),
|
|
1746
|
+
Dropdown: DatePickerSelectAdapter
|
|
1470
1747
|
}
|
|
1471
1748
|
}
|
|
1472
1749
|
)
|
|
@@ -1477,8 +1754,8 @@ var Datepicker = (0, import_react6.forwardRef)(({ label, value, onChange, errorM
|
|
|
1477
1754
|
Datepicker.displayName = "Datepicker";
|
|
1478
1755
|
|
|
1479
1756
|
// src/components/Hr.tsx
|
|
1480
|
-
var
|
|
1481
|
-
var
|
|
1757
|
+
var import_react8 = require("react");
|
|
1758
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1482
1759
|
var StyledHr = styled("hr", {
|
|
1483
1760
|
border: "none",
|
|
1484
1761
|
height: "1px",
|
|
@@ -1494,8 +1771,8 @@ var StyledHr = styled("hr", {
|
|
|
1494
1771
|
}
|
|
1495
1772
|
}
|
|
1496
1773
|
});
|
|
1497
|
-
var Hr = (0,
|
|
1498
|
-
return /* @__PURE__ */ (0,
|
|
1774
|
+
var Hr = (0, import_react8.forwardRef)(function Hr2({ children, ...props }, ref) {
|
|
1775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledHr, { ref, ...props, children });
|
|
1499
1776
|
});
|
|
1500
1777
|
Hr.displayName = "Hr";
|
|
1501
1778
|
|
|
@@ -1572,26 +1849,26 @@ var StyledChildren = styled("div", {
|
|
|
1572
1849
|
});
|
|
1573
1850
|
|
|
1574
1851
|
// src/components/Modal/index.tsx
|
|
1575
|
-
var
|
|
1852
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1576
1853
|
var Modal = ({ open, onOpenChange, title, description, children }) => {
|
|
1577
|
-
return /* @__PURE__ */ (0,
|
|
1578
|
-
/* @__PURE__ */ (0,
|
|
1579
|
-
/* @__PURE__ */ (0,
|
|
1580
|
-
/* @__PURE__ */ (0,
|
|
1581
|
-
/* @__PURE__ */ (0,
|
|
1582
|
-
/* @__PURE__ */ (0,
|
|
1854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Dialog2.Root, { open, onOpenChange, modal: true, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Dialog2.Portal, { children: [
|
|
1855
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledOverlay, {}),
|
|
1856
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(StyledContent, { children: [
|
|
1857
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Wrapper, { children: [
|
|
1858
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledTitle, { children: title }),
|
|
1859
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledClose, { asChild: true, "aria-label": "Close", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { name: "Closed", size: 8 }) }) })
|
|
1583
1860
|
] }),
|
|
1584
|
-
/* @__PURE__ */ (0,
|
|
1585
|
-
/* @__PURE__ */ (0,
|
|
1586
|
-
description && /* @__PURE__ */ (0,
|
|
1587
|
-
/* @__PURE__ */ (0,
|
|
1861
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledDivider, {}),
|
|
1862
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
|
|
1863
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledDescription, { children: description }),
|
|
1864
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledChildren, { children })
|
|
1588
1865
|
] })
|
|
1589
1866
|
] })
|
|
1590
1867
|
] }) });
|
|
1591
1868
|
};
|
|
1592
1869
|
|
|
1593
1870
|
// src/components/ProgressBar/index.tsx
|
|
1594
|
-
var
|
|
1871
|
+
var import_react9 = require("react");
|
|
1595
1872
|
|
|
1596
1873
|
// src/components/ProgressBar/styles.ts
|
|
1597
1874
|
var Progress = __toESM(require("@radix-ui/react-progress"));
|
|
@@ -1621,23 +1898,23 @@ var StyledIndicator = styled(Progress.Indicator, {
|
|
|
1621
1898
|
});
|
|
1622
1899
|
|
|
1623
1900
|
// src/components/ProgressBar/index.tsx
|
|
1624
|
-
var
|
|
1901
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1625
1902
|
var ProgressBar = ({ label, value = 0, max = 100, ...rest }) => {
|
|
1626
|
-
const [progress2, setProgress] = (0,
|
|
1627
|
-
(0,
|
|
1903
|
+
const [progress2, setProgress] = (0, import_react9.useState)(0);
|
|
1904
|
+
(0, import_react9.useEffect)(() => {
|
|
1628
1905
|
const timer = setTimeout(() => setProgress(value), 500);
|
|
1629
1906
|
return () => clearTimeout(timer);
|
|
1630
1907
|
}, [value]);
|
|
1631
1908
|
const valueLabel = `${Math.round(progress2 / max * 100)}%`;
|
|
1632
|
-
return /* @__PURE__ */ (0,
|
|
1633
|
-
/* @__PURE__ */ (0,
|
|
1634
|
-
/* @__PURE__ */ (0,
|
|
1909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(StyledWrapper3, { children: [
|
|
1910
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { style: { fontSize: 16, alignSelf: "flex-start", color: "black" }, children: label }),
|
|
1911
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1635
1912
|
StyledRoot,
|
|
1636
1913
|
{
|
|
1637
1914
|
value: progress2,
|
|
1638
1915
|
"aria-valuetext": valueLabel,
|
|
1639
1916
|
...rest,
|
|
1640
|
-
children: /* @__PURE__ */ (0,
|
|
1917
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1641
1918
|
StyledIndicator,
|
|
1642
1919
|
{
|
|
1643
1920
|
style: { transform: `translateX(-${100 - progress2}%)` }
|
|
@@ -1650,7 +1927,7 @@ var ProgressBar = ({ label, value = 0, max = 100, ...rest }) => {
|
|
|
1650
1927
|
ProgressBar.displayName = "ProgressBar";
|
|
1651
1928
|
|
|
1652
1929
|
// src/components/Radio/index.tsx
|
|
1653
|
-
var
|
|
1930
|
+
var import_react10 = require("react");
|
|
1654
1931
|
|
|
1655
1932
|
// src/components/Radio/styles.ts
|
|
1656
1933
|
var RadioGroup = __toESM(require("@radix-ui/react-radio-group"));
|
|
@@ -1744,8 +2021,8 @@ var Span3 = styled("span", {
|
|
|
1744
2021
|
});
|
|
1745
2022
|
|
|
1746
2023
|
// src/components/Radio/index.tsx
|
|
1747
|
-
var
|
|
1748
|
-
var Radio = (0,
|
|
2024
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2025
|
+
var Radio = (0, import_react10.forwardRef)(({
|
|
1749
2026
|
labels,
|
|
1750
2027
|
value,
|
|
1751
2028
|
onChange,
|
|
@@ -1753,8 +2030,8 @@ var Radio = (0, import_react9.forwardRef)(({
|
|
|
1753
2030
|
required = false,
|
|
1754
2031
|
errorMessage
|
|
1755
2032
|
}, ref) => {
|
|
1756
|
-
return /* @__PURE__ */ (0,
|
|
1757
|
-
/* @__PURE__ */ (0,
|
|
2033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("form", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
2034
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1758
2035
|
StyledRoot2,
|
|
1759
2036
|
{
|
|
1760
2037
|
ref,
|
|
@@ -1764,28 +2041,28 @@ var Radio = (0, import_react9.forwardRef)(({
|
|
|
1764
2041
|
disabled,
|
|
1765
2042
|
required,
|
|
1766
2043
|
loop: true,
|
|
1767
|
-
children: labels.map((label, index) => /* @__PURE__ */ (0,
|
|
1768
|
-
/* @__PURE__ */ (0,
|
|
2044
|
+
children: labels.map((label, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Wrapper2, { children: [
|
|
2045
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1769
2046
|
StyledItem,
|
|
1770
2047
|
{
|
|
1771
2048
|
value: label,
|
|
1772
2049
|
id: `radio-${index}`,
|
|
1773
2050
|
"aria-label": label,
|
|
1774
2051
|
hasError: !!errorMessage,
|
|
1775
|
-
children: /* @__PURE__ */ (0,
|
|
2052
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StyledIndicator2, {})
|
|
1776
2053
|
}
|
|
1777
2054
|
),
|
|
1778
|
-
/* @__PURE__ */ (0,
|
|
2055
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ItemLabel, { htmlFor: `radio-${index}`, children: label })
|
|
1779
2056
|
] }, label))
|
|
1780
2057
|
}
|
|
1781
2058
|
),
|
|
1782
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2059
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Span3, { children: errorMessage })
|
|
1783
2060
|
] });
|
|
1784
2061
|
});
|
|
1785
2062
|
Radio.displayName = "Radio";
|
|
1786
2063
|
|
|
1787
2064
|
// src/components/Spacing.tsx
|
|
1788
|
-
var
|
|
2065
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1789
2066
|
var spacingMap = {
|
|
1790
2067
|
xs: 8,
|
|
1791
2068
|
sm: 12,
|
|
@@ -1797,11 +2074,11 @@ var spacingMap = {
|
|
|
1797
2074
|
};
|
|
1798
2075
|
var Spacing = ({ size, axis = "vertical" }) => {
|
|
1799
2076
|
const style = axis === "vertical" ? { height: spacingMap[size], width: "100%" } : { width: spacingMap[size], height: "100%" };
|
|
1800
|
-
return /* @__PURE__ */ (0,
|
|
2077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style, "data-testid": `spacing-${size}-${axis}` });
|
|
1801
2078
|
};
|
|
1802
2079
|
|
|
1803
2080
|
// src/components/Switch/index.tsx
|
|
1804
|
-
var
|
|
2081
|
+
var import_react11 = require("react");
|
|
1805
2082
|
|
|
1806
2083
|
// src/components/Switch/styles.ts
|
|
1807
2084
|
var Switch = __toESM(require("@radix-ui/react-switch"));
|
|
@@ -1898,8 +2175,8 @@ var Span4 = styled("span", {
|
|
|
1898
2175
|
});
|
|
1899
2176
|
|
|
1900
2177
|
// src/components/Switch/index.tsx
|
|
1901
|
-
var
|
|
1902
|
-
var Switch2 = (0,
|
|
2178
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2179
|
+
var Switch2 = (0, import_react11.forwardRef)(({
|
|
1903
2180
|
label,
|
|
1904
2181
|
checked,
|
|
1905
2182
|
defaultChecked,
|
|
@@ -1909,9 +2186,9 @@ var Switch2 = (0, import_react10.forwardRef)(({
|
|
|
1909
2186
|
id,
|
|
1910
2187
|
errorMessage
|
|
1911
2188
|
}, ref) => {
|
|
1912
|
-
return /* @__PURE__ */ (0,
|
|
1913
|
-
/* @__PURE__ */ (0,
|
|
1914
|
-
/* @__PURE__ */ (0,
|
|
2189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
2190
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Wrapper3, { hasError: !!errorMessage, children: [
|
|
2191
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1915
2192
|
StyledRoot3,
|
|
1916
2193
|
{
|
|
1917
2194
|
ref,
|
|
@@ -1922,18 +2199,18 @@ var Switch2 = (0, import_react10.forwardRef)(({
|
|
|
1922
2199
|
hasError: !!errorMessage,
|
|
1923
2200
|
disabled,
|
|
1924
2201
|
required,
|
|
1925
|
-
children: /* @__PURE__ */ (0,
|
|
2202
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StyledThumb, {})
|
|
1926
2203
|
}
|
|
1927
2204
|
),
|
|
1928
|
-
label && /* @__PURE__ */ (0,
|
|
2205
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Label2, { htmlFor: id, children: label })
|
|
1929
2206
|
] }),
|
|
1930
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2207
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Span4, { children: errorMessage })
|
|
1931
2208
|
] });
|
|
1932
2209
|
});
|
|
1933
2210
|
Switch2.displayName = "Switch";
|
|
1934
2211
|
|
|
1935
2212
|
// src/components/Tabs/index.tsx
|
|
1936
|
-
var
|
|
2213
|
+
var import_react12 = require("react");
|
|
1937
2214
|
|
|
1938
2215
|
// src/components/Tabs/styles.ts
|
|
1939
2216
|
var Tabs = __toESM(require("@radix-ui/react-tabs"));
|
|
@@ -2014,23 +2291,23 @@ var TabsContent = styled(Tabs.Content, {
|
|
|
2014
2291
|
});
|
|
2015
2292
|
|
|
2016
2293
|
// src/components/Tabs/index.tsx
|
|
2017
|
-
var
|
|
2294
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2018
2295
|
var TabsItem = ({ children }) => {
|
|
2019
|
-
return /* @__PURE__ */ (0,
|
|
2296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children });
|
|
2020
2297
|
};
|
|
2021
2298
|
var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) => {
|
|
2022
2299
|
const items = [];
|
|
2023
|
-
const childrenArray =
|
|
2300
|
+
const childrenArray = import_react12.Children.toArray(children);
|
|
2024
2301
|
childrenArray.forEach((child) => {
|
|
2025
|
-
if ((0,
|
|
2302
|
+
if ((0, import_react12.isValidElement)(child) && child.type === TabsItem) {
|
|
2026
2303
|
const { value: value2, label, forceMount, children: content } = child.props;
|
|
2027
2304
|
items.push({ value: value2, label, forceMount, children: content });
|
|
2028
2305
|
}
|
|
2029
2306
|
});
|
|
2030
|
-
const listRef = (0,
|
|
2031
|
-
const rootRef = (0,
|
|
2032
|
-
const hasOverflowRef = (0,
|
|
2033
|
-
const [hasOverflow, setHasOverflow] = (0,
|
|
2307
|
+
const listRef = (0, import_react12.useRef)(null);
|
|
2308
|
+
const rootRef = (0, import_react12.useRef)(null);
|
|
2309
|
+
const hasOverflowRef = (0, import_react12.useRef)(false);
|
|
2310
|
+
const [hasOverflow, setHasOverflow] = (0, import_react12.useState)(false);
|
|
2034
2311
|
const checkOverflow = () => {
|
|
2035
2312
|
const listEl = listRef.current;
|
|
2036
2313
|
const rootEl = rootRef.current;
|
|
@@ -2045,7 +2322,7 @@ var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) =>
|
|
|
2045
2322
|
setHasOverflow(overflow);
|
|
2046
2323
|
}
|
|
2047
2324
|
};
|
|
2048
|
-
(0,
|
|
2325
|
+
(0, import_react12.useLayoutEffect)(() => {
|
|
2049
2326
|
checkOverflow();
|
|
2050
2327
|
const resizeObserver = new ResizeObserver(checkOverflow);
|
|
2051
2328
|
if (listRef.current) {
|
|
@@ -2066,7 +2343,7 @@ var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) =>
|
|
|
2066
2343
|
});
|
|
2067
2344
|
}
|
|
2068
2345
|
};
|
|
2069
|
-
return /* @__PURE__ */ (0,
|
|
2346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2070
2347
|
TabsRoot,
|
|
2071
2348
|
{
|
|
2072
2349
|
defaultValue: defaultValue || items[0]?.value,
|
|
@@ -2074,22 +2351,22 @@ var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) =>
|
|
|
2074
2351
|
value,
|
|
2075
2352
|
onValueChange,
|
|
2076
2353
|
children: [
|
|
2077
|
-
/* @__PURE__ */ (0,
|
|
2078
|
-
hasOverflow && /* @__PURE__ */ (0,
|
|
2354
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2355
|
+
hasOverflow && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2079
2356
|
Button,
|
|
2080
2357
|
{
|
|
2081
2358
|
variant: "secondary",
|
|
2082
2359
|
size: "sm",
|
|
2083
2360
|
onClick: () => scroll("left"),
|
|
2084
|
-
children: /* @__PURE__ */ (0,
|
|
2361
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "TriangleLeft", size: 64 })
|
|
2085
2362
|
}
|
|
2086
2363
|
),
|
|
2087
|
-
/* @__PURE__ */ (0,
|
|
2364
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2088
2365
|
TabsList,
|
|
2089
2366
|
{
|
|
2090
2367
|
ref: listRef,
|
|
2091
2368
|
scrollable: hasOverflow,
|
|
2092
|
-
children: items.map((item) => /* @__PURE__ */ (0,
|
|
2369
|
+
children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2093
2370
|
TabsTrigger,
|
|
2094
2371
|
{
|
|
2095
2372
|
value: item.value,
|
|
@@ -2100,17 +2377,17 @@ var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) =>
|
|
|
2100
2377
|
))
|
|
2101
2378
|
}
|
|
2102
2379
|
),
|
|
2103
|
-
hasOverflow && /* @__PURE__ */ (0,
|
|
2380
|
+
hasOverflow && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2104
2381
|
Button,
|
|
2105
2382
|
{
|
|
2106
2383
|
variant: "secondary",
|
|
2107
2384
|
size: "sm",
|
|
2108
2385
|
onClick: () => scroll("right"),
|
|
2109
|
-
children: /* @__PURE__ */ (0,
|
|
2386
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "TriangleRight", size: 64 })
|
|
2110
2387
|
}
|
|
2111
2388
|
)
|
|
2112
2389
|
] }),
|
|
2113
|
-
items.map((item) => /* @__PURE__ */ (0,
|
|
2390
|
+
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2114
2391
|
TabsContent,
|
|
2115
2392
|
{
|
|
2116
2393
|
colorContent,
|
|
@@ -2127,8 +2404,8 @@ var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) =>
|
|
|
2127
2404
|
Tabs2.Item = TabsItem;
|
|
2128
2405
|
|
|
2129
2406
|
// src/components/TextArea.tsx
|
|
2130
|
-
var
|
|
2131
|
-
var
|
|
2407
|
+
var import_react13 = require("react");
|
|
2408
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2132
2409
|
var Wrapper4 = styled("div", {
|
|
2133
2410
|
display: "flex",
|
|
2134
2411
|
flexDirection: "column"
|
|
@@ -2152,9 +2429,8 @@ var TextAreaElement = styled("textarea", {
|
|
|
2152
2429
|
fontSize: "$sm",
|
|
2153
2430
|
color: "$black",
|
|
2154
2431
|
fontWeight: "$regular",
|
|
2155
|
-
resize: "
|
|
2156
|
-
minHeight:
|
|
2157
|
-
maxHeight: "170px",
|
|
2432
|
+
resize: "vertical",
|
|
2433
|
+
minHeight: "100px",
|
|
2158
2434
|
overflowY: "auto",
|
|
2159
2435
|
width: "100%",
|
|
2160
2436
|
"&:focus": {
|
|
@@ -2190,6 +2466,11 @@ var TextAreaElement = styled("textarea", {
|
|
|
2190
2466
|
border: "2px solid $danger_dark"
|
|
2191
2467
|
}
|
|
2192
2468
|
}
|
|
2469
|
+
},
|
|
2470
|
+
hasCounter: {
|
|
2471
|
+
true: {
|
|
2472
|
+
marginBottom: "0px"
|
|
2473
|
+
}
|
|
2193
2474
|
}
|
|
2194
2475
|
}
|
|
2195
2476
|
});
|
|
@@ -2197,27 +2478,70 @@ var Span5 = styled("span", {
|
|
|
2197
2478
|
fontFamily: "$default",
|
|
2198
2479
|
fontWeight: "$regular",
|
|
2199
2480
|
fontSize: "$sm",
|
|
2481
|
+
textAlign: "left",
|
|
2200
2482
|
color: "$danger_dark",
|
|
2201
2483
|
alignSelf: "flex-start",
|
|
2202
2484
|
paddingLeft: "1px",
|
|
2203
2485
|
marginTop: "2px",
|
|
2204
|
-
marginBottom: "$6"
|
|
2486
|
+
marginBottom: "$6",
|
|
2487
|
+
flexShrink: 1,
|
|
2488
|
+
wordBreak: "break-word"
|
|
2489
|
+
});
|
|
2490
|
+
var Footer2 = styled("div", {
|
|
2491
|
+
display: "flex",
|
|
2492
|
+
justifyContent: "space-between",
|
|
2493
|
+
width: "100%",
|
|
2494
|
+
gap: "$2"
|
|
2495
|
+
});
|
|
2496
|
+
var CharCounter2 = styled(Span5, {
|
|
2497
|
+
fontFamily: "$default",
|
|
2498
|
+
fontWeight: "$regular",
|
|
2499
|
+
fontSize: "$sm",
|
|
2500
|
+
color: "$gray_mid",
|
|
2501
|
+
marginLeft: "auto",
|
|
2502
|
+
whiteSpace: "nowrap",
|
|
2503
|
+
paddingRight: "1px",
|
|
2504
|
+
marginTop: "2px",
|
|
2505
|
+
marginBottom: "$6",
|
|
2506
|
+
variants: {
|
|
2507
|
+
hasReachedMax: {
|
|
2508
|
+
true: {
|
|
2509
|
+
color: "$danger_dark"
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
}
|
|
2205
2513
|
});
|
|
2206
|
-
var TextArea = (0,
|
|
2207
|
-
({ label, id, htmlFor, errorMessage, ...props }, ref) => {
|
|
2514
|
+
var TextArea = (0, import_react13.forwardRef)(
|
|
2515
|
+
({ label, id, htmlFor, errorMessage, maxLength, ...props }, ref) => {
|
|
2208
2516
|
const textAreaId = id || htmlFor || `textarea-${crypto.randomUUID()}`;
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
/* @__PURE__ */ (0,
|
|
2517
|
+
const [charCount, setCharCount] = (0, import_react13.useState)(0);
|
|
2518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Wrapper4, { children: [
|
|
2519
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(StyledLabel2, { htmlFor: textAreaId, children: label }),
|
|
2520
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2212
2521
|
TextAreaElement,
|
|
2213
2522
|
{
|
|
2214
2523
|
id: textAreaId,
|
|
2215
2524
|
...props,
|
|
2216
2525
|
hasError: !!errorMessage,
|
|
2217
|
-
|
|
2526
|
+
hasCounter: !!maxLength,
|
|
2527
|
+
ref,
|
|
2528
|
+
maxLength,
|
|
2529
|
+
onChange: (e) => {
|
|
2530
|
+
if (props.onChange) {
|
|
2531
|
+
props.onChange(e);
|
|
2532
|
+
}
|
|
2533
|
+
setCharCount(e.target.value.length);
|
|
2534
|
+
}
|
|
2218
2535
|
}
|
|
2219
2536
|
),
|
|
2220
|
-
|
|
2537
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Footer2, { children: [
|
|
2538
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Span5, { children: errorMessage }),
|
|
2539
|
+
maxLength && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(CharCounter2, { hasReachedMax: maxLength ? charCount >= maxLength : false, children: [
|
|
2540
|
+
charCount,
|
|
2541
|
+
"/",
|
|
2542
|
+
maxLength
|
|
2543
|
+
] })
|
|
2544
|
+
] })
|
|
2221
2545
|
] });
|
|
2222
2546
|
}
|
|
2223
2547
|
);
|
|
@@ -2274,7 +2598,7 @@ var TooltipArrow = styled(RadixTooltip.Arrow, {
|
|
|
2274
2598
|
});
|
|
2275
2599
|
|
|
2276
2600
|
// src/components/Tooltip/index.tsx
|
|
2277
|
-
var
|
|
2601
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2278
2602
|
var Tooltip = ({
|
|
2279
2603
|
content,
|
|
2280
2604
|
children,
|
|
@@ -2284,11 +2608,11 @@ var Tooltip = ({
|
|
|
2284
2608
|
onOpenChange,
|
|
2285
2609
|
delayDuration = 100
|
|
2286
2610
|
}) => {
|
|
2287
|
-
return /* @__PURE__ */ (0,
|
|
2288
|
-
/* @__PURE__ */ (0,
|
|
2289
|
-
/* @__PURE__ */ (0,
|
|
2611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(RadixTooltip2.Provider, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(RadixTooltip2.Root, { open, onOpenChange, delayDuration, children: [
|
|
2612
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TooltipTrigger, { asChild: true, children }),
|
|
2613
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(TooltipContent, { side, sideOffset, children: [
|
|
2290
2614
|
content,
|
|
2291
|
-
/* @__PURE__ */ (0,
|
|
2615
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TooltipArrow, {})
|
|
2292
2616
|
] })
|
|
2293
2617
|
] }) });
|
|
2294
2618
|
};
|
|
@@ -2372,14 +2696,14 @@ var Spinner = styled("span", {
|
|
|
2372
2696
|
});
|
|
2373
2697
|
|
|
2374
2698
|
// src/components/Loader/index.tsx
|
|
2375
|
-
var
|
|
2699
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2376
2700
|
var Loader = ({ show, fullscreen = false }) => {
|
|
2377
|
-
return /* @__PURE__ */ (0,
|
|
2701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Overlay2, { show, fullscreen, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SpinnerContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Spinner, {}) }) });
|
|
2378
2702
|
};
|
|
2379
2703
|
Loader.displayName = "Loader";
|
|
2380
2704
|
|
|
2381
2705
|
// src/components/MaskedInput/index.tsx
|
|
2382
|
-
var
|
|
2706
|
+
var import_react14 = require("react");
|
|
2383
2707
|
|
|
2384
2708
|
// src/components/MaskedInput/utils.ts
|
|
2385
2709
|
var MAX_LENGTHS = {
|
|
@@ -2443,11 +2767,11 @@ var applyMask = (value, maskType) => {
|
|
|
2443
2767
|
};
|
|
2444
2768
|
|
|
2445
2769
|
// src/components/MaskedInput/index.tsx
|
|
2446
|
-
var
|
|
2447
|
-
var MaskedInput = (0,
|
|
2770
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2771
|
+
var MaskedInput = (0, import_react14.forwardRef)(
|
|
2448
2772
|
({ maskType, onChange, ...props }, ref) => {
|
|
2449
|
-
const [value, setValue] = (0,
|
|
2450
|
-
const inputRef = (0,
|
|
2773
|
+
const [value, setValue] = (0, import_react14.useState)("");
|
|
2774
|
+
const inputRef = (0, import_react14.useRef)(null);
|
|
2451
2775
|
const handleChange = (e) => {
|
|
2452
2776
|
const { value: inputValue, selectionStart } = e.target;
|
|
2453
2777
|
const isBackspace = value.length > inputValue.length;
|
|
@@ -2480,7 +2804,7 @@ var MaskedInput = (0, import_react13.forwardRef)(
|
|
|
2480
2804
|
onChange(syntheticEvent);
|
|
2481
2805
|
}
|
|
2482
2806
|
};
|
|
2483
|
-
return /* @__PURE__ */ (0,
|
|
2807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2484
2808
|
Input2,
|
|
2485
2809
|
{
|
|
2486
2810
|
...props,
|
|
@@ -2495,7 +2819,7 @@ var MaskedInput = (0, import_react13.forwardRef)(
|
|
|
2495
2819
|
MaskedInput.displayName = "MaskedInput";
|
|
2496
2820
|
|
|
2497
2821
|
// src/components/Dropdown/index.tsx
|
|
2498
|
-
var
|
|
2822
|
+
var import_react15 = __toESM(require("react"));
|
|
2499
2823
|
var DropdownMenu2 = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
2500
2824
|
|
|
2501
2825
|
// src/components/Dropdown/styles.ts
|
|
@@ -2534,7 +2858,9 @@ var StyledContent2 = styled(DropdownMenu.Content, {
|
|
|
2534
2858
|
});
|
|
2535
2859
|
var itemStyles = {
|
|
2536
2860
|
all: "unset",
|
|
2861
|
+
fontFamily: "$default",
|
|
2537
2862
|
fontSize: "$sm",
|
|
2863
|
+
fontWeights: "$regular",
|
|
2538
2864
|
lineHeight: 1,
|
|
2539
2865
|
color: "$black",
|
|
2540
2866
|
borderRadius: "$sm",
|
|
@@ -2579,27 +2905,27 @@ var IconButton = styled("button", {
|
|
|
2579
2905
|
});
|
|
2580
2906
|
|
|
2581
2907
|
// src/components/Dropdown/index.tsx
|
|
2582
|
-
var
|
|
2908
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2583
2909
|
var Dropdown = ({ children }) => {
|
|
2584
|
-
const childrenArray =
|
|
2585
|
-
return /* @__PURE__ */ (0,
|
|
2586
|
-
/* @__PURE__ */ (0,
|
|
2587
|
-
/* @__PURE__ */ (0,
|
|
2910
|
+
const childrenArray = import_react15.Children.toArray(children);
|
|
2911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(DropdownMenu2.Root, { children: [
|
|
2912
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { name: "Dots", size: 16 }) }) }),
|
|
2913
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DropdownMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(StyledContent2, { sideOffset: 5, align: "end", children: childrenArray.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react15.Fragment, { children: [
|
|
2588
2914
|
child,
|
|
2589
|
-
index < childrenArray.length - 1 && /* @__PURE__ */ (0,
|
|
2915
|
+
index < childrenArray.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DropdownSeparator, {})
|
|
2590
2916
|
] }, index)) }) })
|
|
2591
2917
|
] });
|
|
2592
2918
|
};
|
|
2593
2919
|
var DropdownSeparator = StyledSeparator;
|
|
2594
|
-
var DropdownItem =
|
|
2595
|
-
return /* @__PURE__ */ (0,
|
|
2920
|
+
var DropdownItem = import_react15.default.forwardRef(({ children, ...props }, forwardedRef) => {
|
|
2921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(StyledItem2, { ...props, ref: forwardedRef, children });
|
|
2596
2922
|
});
|
|
2597
2923
|
Dropdown.displayName = "Dropdown";
|
|
2598
2924
|
DropdownItem.displayName = "DropdownItem";
|
|
2599
2925
|
DropdownSeparator.displayName = "DropdownSeparator";
|
|
2600
2926
|
|
|
2601
2927
|
// src/components/Box.tsx
|
|
2602
|
-
var
|
|
2928
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2603
2929
|
var StyledBox = styled("div", {
|
|
2604
2930
|
padding: "$5",
|
|
2605
2931
|
borderRadius: "$md",
|
|
@@ -2621,12 +2947,12 @@ var StyledBox = styled("div", {
|
|
|
2621
2947
|
}
|
|
2622
2948
|
});
|
|
2623
2949
|
var Box = (props) => {
|
|
2624
|
-
return /* @__PURE__ */ (0,
|
|
2950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledBox, { ...props });
|
|
2625
2951
|
};
|
|
2626
2952
|
Box.displayName = "Box";
|
|
2627
2953
|
|
|
2628
2954
|
// src/components/Paragraph.tsx
|
|
2629
|
-
var
|
|
2955
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2630
2956
|
var StyledParagraph = styled("p", {
|
|
2631
2957
|
fontFamily: "$default",
|
|
2632
2958
|
lineHeight: "$short",
|
|
@@ -2668,17 +2994,17 @@ var StyledParagraph = styled("p", {
|
|
|
2668
2994
|
}
|
|
2669
2995
|
});
|
|
2670
2996
|
var Paragraph = (props) => {
|
|
2671
|
-
return /* @__PURE__ */ (0,
|
|
2997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(StyledParagraph, { ...props });
|
|
2672
2998
|
};
|
|
2673
2999
|
Paragraph.displayName = "Paragraph";
|
|
2674
3000
|
|
|
2675
3001
|
// src/components/Heading.tsx
|
|
2676
|
-
var
|
|
2677
|
-
var
|
|
3002
|
+
var import_react16 = require("react");
|
|
3003
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2678
3004
|
var StyledHeading = styled("h2", {
|
|
2679
3005
|
fontFamily: "$default",
|
|
2680
3006
|
lineHeight: "$shorter",
|
|
2681
|
-
margin:
|
|
3007
|
+
margin: "1px",
|
|
2682
3008
|
color: "$black",
|
|
2683
3009
|
variants: {
|
|
2684
3010
|
size: {
|
|
@@ -2696,15 +3022,15 @@ var StyledHeading = styled("h2", {
|
|
|
2696
3022
|
size: "md"
|
|
2697
3023
|
}
|
|
2698
3024
|
});
|
|
2699
|
-
var Heading = (0,
|
|
2700
|
-
return /* @__PURE__ */ (0,
|
|
3025
|
+
var Heading = (0, import_react16.forwardRef)(function Heading2({ children, ...props }, ref) {
|
|
3026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(StyledHeading, { ref, ...props, children });
|
|
2701
3027
|
});
|
|
2702
3028
|
Heading.displayName = "Heading";
|
|
2703
3029
|
|
|
2704
3030
|
// src/components/Select/index.tsx
|
|
2705
3031
|
var import_react_icons2 = require("@radix-ui/react-icons");
|
|
2706
|
-
var
|
|
2707
|
-
var
|
|
3032
|
+
var CustomSelect2 = __toESM(require("@radix-ui/react-select"));
|
|
3033
|
+
var import_react17 = require("react");
|
|
2708
3034
|
|
|
2709
3035
|
// src/components/Select/styles.ts
|
|
2710
3036
|
var Select = __toESM(require("@radix-ui/react-select"));
|
|
@@ -2740,7 +3066,8 @@ var StyledTrigger = styled(Select.Trigger, {
|
|
|
2740
3066
|
},
|
|
2741
3067
|
"&[data-highlighted], &:focus, &:hover": {
|
|
2742
3068
|
outline: "none",
|
|
2743
|
-
border: "2px solid $clickpalm_light"
|
|
3069
|
+
border: "2px solid $clickpalm_light",
|
|
3070
|
+
padding: "calc(0.92rem - 0.9px) calc($4 - 0.9px)"
|
|
2744
3071
|
},
|
|
2745
3072
|
"&:disabled": {
|
|
2746
3073
|
opacity: 0.5,
|
|
@@ -2753,7 +3080,8 @@ var StyledTrigger = styled(Select.Trigger, {
|
|
|
2753
3080
|
marginBottom: "0px",
|
|
2754
3081
|
"&[data-highlighted], &:focus, &:hover": {
|
|
2755
3082
|
outline: "none",
|
|
2756
|
-
border: "2px solid $danger_dark"
|
|
3083
|
+
border: "2px solid $danger_dark",
|
|
3084
|
+
padding: "calc(0.92rem - 0.9px) calc($4 - 0.9px)"
|
|
2757
3085
|
}
|
|
2758
3086
|
}
|
|
2759
3087
|
}
|
|
@@ -2836,8 +3164,8 @@ var Span6 = styled("span", {
|
|
|
2836
3164
|
});
|
|
2837
3165
|
|
|
2838
3166
|
// src/components/Select/index.tsx
|
|
2839
|
-
var
|
|
2840
|
-
var Select2 = (0,
|
|
3167
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3168
|
+
var Select2 = (0, import_react17.forwardRef)(
|
|
2841
3169
|
({
|
|
2842
3170
|
value,
|
|
2843
3171
|
onValueChange,
|
|
@@ -2850,36 +3178,27 @@ var Select2 = (0, import_react16.forwardRef)(
|
|
|
2850
3178
|
style,
|
|
2851
3179
|
...rest
|
|
2852
3180
|
}, ref) => {
|
|
2853
|
-
const [open, setOpen] = (0,
|
|
2854
|
-
return /* @__PURE__ */ (0,
|
|
2855
|
-
label && /* @__PURE__ */ (0,
|
|
2856
|
-
/* @__PURE__ */ (0,
|
|
2857
|
-
|
|
3181
|
+
const [open, setOpen] = (0, import_react17.useState)(false);
|
|
3182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(StyledWrapper4, { css: css2, className, style, children: [
|
|
3183
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Label3, { children: label }),
|
|
3184
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3185
|
+
CustomSelect2.Root,
|
|
2858
3186
|
{
|
|
2859
3187
|
value,
|
|
2860
3188
|
onValueChange,
|
|
2861
3189
|
onOpenChange: setOpen,
|
|
2862
3190
|
...rest,
|
|
2863
3191
|
children: [
|
|
2864
|
-
/* @__PURE__ */ (0,
|
|
2865
|
-
/* @__PURE__ */ (0,
|
|
2866
|
-
/* @__PURE__ */ (0,
|
|
3192
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(StyledTrigger, { "aria-label": label, hasError: !!errorMessage, ref, children: [
|
|
3193
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CustomSelect2.Value, { placeholder }),
|
|
3194
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StyledIcon, { open, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_icons2.TriangleDownIcon, {}) })
|
|
2867
3195
|
] }),
|
|
2868
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2869
|
-
/* @__PURE__ */ (0,
|
|
2870
|
-
|
|
2871
|
-
{
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
position: "popper",
|
|
2875
|
-
className,
|
|
2876
|
-
children: [
|
|
2877
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CustomSelect.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_icons2.TriangleUpIcon, {}) }),
|
|
2878
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(StyledViewport, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(StyledItem3, { value: item.value, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(StyledItemText, { children: item.label }) }, item.value)) }),
|
|
2879
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CustomSelect.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_icons2.TriangleDownIcon, {}) })
|
|
2880
|
-
]
|
|
2881
|
-
}
|
|
2882
|
-
) })
|
|
3196
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Span6, { children: errorMessage }),
|
|
3197
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CustomSelect2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(StyledContent3, { side: "bottom", align: "start", position: "popper", children: [
|
|
3198
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CustomSelect2.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_icons2.TriangleUpIcon, {}) }),
|
|
3199
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StyledViewport, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StyledItem3, { value: item.value, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StyledItemText, { children: item.label }) }, item.value)) }),
|
|
3200
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CustomSelect2.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_icons2.TriangleDownIcon, {}) })
|
|
3201
|
+
] }) })
|
|
2883
3202
|
]
|
|
2884
3203
|
}
|
|
2885
3204
|
)
|
|
@@ -2889,7 +3208,7 @@ var Select2 = (0, import_react16.forwardRef)(
|
|
|
2889
3208
|
Select2.displayName = "Select";
|
|
2890
3209
|
|
|
2891
3210
|
// src/components/LabelledValue/index.tsx
|
|
2892
|
-
var
|
|
3211
|
+
var import_react18 = require("react");
|
|
2893
3212
|
|
|
2894
3213
|
// src/components/LabelledValue/styles.ts
|
|
2895
3214
|
var Container = styled("div", {
|
|
@@ -2950,19 +3269,19 @@ var Value2 = styled("div", {
|
|
|
2950
3269
|
});
|
|
2951
3270
|
|
|
2952
3271
|
// src/components/LabelledValue/index.tsx
|
|
2953
|
-
var
|
|
3272
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2954
3273
|
function LabelledValue({ position = "vertical", withRow = false, children }) {
|
|
2955
|
-
return /* @__PURE__ */ (0,
|
|
2956
|
-
if ((0,
|
|
2957
|
-
return (0,
|
|
3274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Container, { position, children: import_react18.Children.map(children, (child) => {
|
|
3275
|
+
if ((0, import_react18.isValidElement)(child)) {
|
|
3276
|
+
return (0, import_react18.cloneElement)(child, { position, withRow });
|
|
2958
3277
|
}
|
|
2959
3278
|
return child;
|
|
2960
3279
|
}) });
|
|
2961
3280
|
}
|
|
2962
3281
|
function Item4({ label, value, position = "vertical", withRow = false }) {
|
|
2963
|
-
return /* @__PURE__ */ (0,
|
|
2964
|
-
/* @__PURE__ */ (0,
|
|
2965
|
-
/* @__PURE__ */ (0,
|
|
3282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(ItemWrapper, { position, withRow, children: [
|
|
3283
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Label4, { children: label }),
|
|
3284
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Value2, { children: value })
|
|
2966
3285
|
] });
|
|
2967
3286
|
}
|
|
2968
3287
|
LabelledValue.Item = Item4;
|
|
@@ -3034,11 +3353,11 @@ var Span7 = styled("span", {
|
|
|
3034
3353
|
});
|
|
3035
3354
|
|
|
3036
3355
|
// src/components/OneTimePassword/index.tsx
|
|
3037
|
-
var
|
|
3356
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3038
3357
|
var OneTimePassword = ({ label, length, value, errorMessage, onValueChange, ...rootProps }) => {
|
|
3039
|
-
return /* @__PURE__ */ (0,
|
|
3040
|
-
/* @__PURE__ */ (0,
|
|
3041
|
-
/* @__PURE__ */ (0,
|
|
3358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Container2, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(StyledWrapper5, { children: [
|
|
3359
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(StyledLabel3, { children: label }),
|
|
3360
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3042
3361
|
StyledRoot4,
|
|
3043
3362
|
{
|
|
3044
3363
|
value,
|
|
@@ -3046,12 +3365,12 @@ var OneTimePassword = ({ label, length, value, errorMessage, onValueChange, ...r
|
|
|
3046
3365
|
...rootProps,
|
|
3047
3366
|
style: { "--otp-length": length },
|
|
3048
3367
|
children: [
|
|
3049
|
-
Array.from({ length }).map((_, index) => /* @__PURE__ */ (0,
|
|
3050
|
-
/* @__PURE__ */ (0,
|
|
3368
|
+
Array.from({ length }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(StyledInput, {}, index)),
|
|
3369
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OneTimePasswordField2.HiddenInput, {})
|
|
3051
3370
|
]
|
|
3052
3371
|
}
|
|
3053
3372
|
),
|
|
3054
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
3373
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Span7, { children: errorMessage })
|
|
3055
3374
|
] }) });
|
|
3056
3375
|
};
|
|
3057
3376
|
OneTimePassword.displayName = "OneTimePasswordInput";
|
|
@@ -3173,7 +3492,7 @@ var ToastProgress = styled("div", {
|
|
|
3173
3492
|
borderBottomRightRadius: "$full",
|
|
3174
3493
|
backgroundColor: "$clickpalm_light",
|
|
3175
3494
|
animationTimingFunction: "linear",
|
|
3176
|
-
animation: `${progress}
|
|
3495
|
+
animation: `${progress} 6s linear`,
|
|
3177
3496
|
animationFillMode: "forwards",
|
|
3178
3497
|
variants: {
|
|
3179
3498
|
paused: {
|
|
@@ -3221,7 +3540,7 @@ var toast = {
|
|
|
3221
3540
|
};
|
|
3222
3541
|
|
|
3223
3542
|
// src/components/Toast/index.tsx
|
|
3224
|
-
var
|
|
3543
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3225
3544
|
var Toast = () => {
|
|
3226
3545
|
const [messages, setMessages] = React4.useState([]);
|
|
3227
3546
|
const [paused, setPaused] = React4.useState(false);
|
|
@@ -3237,8 +3556,8 @@ var Toast = () => {
|
|
|
3237
3556
|
const removeToast = (id) => {
|
|
3238
3557
|
setMessages((prev) => prev.filter((msg) => msg.id !== id));
|
|
3239
3558
|
};
|
|
3240
|
-
return /* @__PURE__ */ (0,
|
|
3241
|
-
messages.map((message) => /* @__PURE__ */ (0,
|
|
3559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(ToastPrimitive2.Provider, { swipeDirection: "right", children: [
|
|
3560
|
+
messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3242
3561
|
ToastRoot,
|
|
3243
3562
|
{
|
|
3244
3563
|
open: true,
|
|
@@ -3247,15 +3566,15 @@ var Toast = () => {
|
|
|
3247
3566
|
removeToast(message.id);
|
|
3248
3567
|
},
|
|
3249
3568
|
variant: message.variant,
|
|
3250
|
-
duration:
|
|
3569
|
+
duration: 6e3,
|
|
3251
3570
|
onPause: () => setPaused(true),
|
|
3252
3571
|
onResume: () => setPaused(false),
|
|
3253
3572
|
children: [
|
|
3254
|
-
/* @__PURE__ */ (0,
|
|
3255
|
-
/* @__PURE__ */ (0,
|
|
3256
|
-
message.description && /* @__PURE__ */ (0,
|
|
3573
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(ToastContent, { children: [
|
|
3574
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ToastTitle, { children: message.title }),
|
|
3575
|
+
message.description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ToastDescription, { children: message.description })
|
|
3257
3576
|
] }),
|
|
3258
|
-
/* @__PURE__ */ (0,
|
|
3577
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ToastAction, { altText: "Fechar", asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3259
3578
|
"button",
|
|
3260
3579
|
{
|
|
3261
3580
|
style: {
|
|
@@ -3265,15 +3584,15 @@ var Toast = () => {
|
|
|
3265
3584
|
alignItems: "center"
|
|
3266
3585
|
},
|
|
3267
3586
|
onClick: () => removeToast(message.id),
|
|
3268
|
-
children: /* @__PURE__ */ (0,
|
|
3587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: "Closed", size: 16, height: 14, width: 14 })
|
|
3269
3588
|
}
|
|
3270
3589
|
) }),
|
|
3271
|
-
/* @__PURE__ */ (0,
|
|
3590
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ToastProgress, { paused, variant: message.variant })
|
|
3272
3591
|
]
|
|
3273
3592
|
},
|
|
3274
3593
|
message.id
|
|
3275
3594
|
)),
|
|
3276
|
-
/* @__PURE__ */ (0,
|
|
3595
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ToastViewport, {})
|
|
3277
3596
|
] });
|
|
3278
3597
|
};
|
|
3279
3598
|
|
|
@@ -3508,22 +3827,22 @@ var StepLabel = styled("span", {
|
|
|
3508
3827
|
});
|
|
3509
3828
|
|
|
3510
3829
|
// src/components/MultiStep/index.tsx
|
|
3511
|
-
var
|
|
3830
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3512
3831
|
var MultiStep = ({
|
|
3513
3832
|
steps,
|
|
3514
3833
|
currentStep,
|
|
3515
3834
|
orientation = "horizontal",
|
|
3516
3835
|
variant
|
|
3517
3836
|
}) => {
|
|
3518
|
-
return /* @__PURE__ */ (0,
|
|
3837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3519
3838
|
Wrapper5,
|
|
3520
3839
|
{
|
|
3521
3840
|
orientation,
|
|
3522
3841
|
children: steps.map((step, index) => {
|
|
3523
3842
|
const isFirst = index === 0;
|
|
3524
3843
|
const isLast = index === steps.length - 1;
|
|
3525
|
-
return /* @__PURE__ */ (0,
|
|
3526
|
-
/* @__PURE__ */ (0,
|
|
3844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(StepItem, { orientation, children: [
|
|
3845
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3527
3846
|
StepCircle,
|
|
3528
3847
|
{
|
|
3529
3848
|
orientation,
|
|
@@ -3534,7 +3853,7 @@ var MultiStep = ({
|
|
|
3534
3853
|
children: index + 1
|
|
3535
3854
|
}
|
|
3536
3855
|
),
|
|
3537
|
-
/* @__PURE__ */ (0,
|
|
3856
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3538
3857
|
StepLabel,
|
|
3539
3858
|
{
|
|
3540
3859
|
orientation,
|
|
@@ -3550,7 +3869,7 @@ var MultiStep = ({
|
|
|
3550
3869
|
MultiStep.displayName = "MultiStep";
|
|
3551
3870
|
|
|
3552
3871
|
// src/components/Carousel/index.tsx
|
|
3553
|
-
var
|
|
3872
|
+
var import_react19 = require("react");
|
|
3554
3873
|
|
|
3555
3874
|
// src/components/Carousel/styles.ts
|
|
3556
3875
|
var CarouselContainer = styled("div", {
|
|
@@ -3658,13 +3977,13 @@ var CarouselItemContainer = styled("div", {
|
|
|
3658
3977
|
});
|
|
3659
3978
|
|
|
3660
3979
|
// src/components/Carousel/index.tsx
|
|
3661
|
-
var
|
|
3980
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3662
3981
|
var SWIPE_THRESHOLD = 50;
|
|
3663
3982
|
var Carousel = ({ title, variant, children }) => {
|
|
3664
|
-
const items =
|
|
3665
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
3666
|
-
const [touchStartX, setTouchStartX] = (0,
|
|
3667
|
-
const [touchEndX, setTouchEndX] = (0,
|
|
3983
|
+
const items = import_react19.Children.toArray(children);
|
|
3984
|
+
const [activeIndex, setActiveIndex] = (0, import_react19.useState)(0);
|
|
3985
|
+
const [touchStartX, setTouchStartX] = (0, import_react19.useState)(null);
|
|
3986
|
+
const [touchEndX, setTouchEndX] = (0, import_react19.useState)(null);
|
|
3668
3987
|
const prev = () => {
|
|
3669
3988
|
setActiveIndex((prevIndex) => prevIndex === 0 ? items.length - 1 : prevIndex - 1);
|
|
3670
3989
|
};
|
|
@@ -3692,18 +4011,18 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3692
4011
|
setTouchStartX(null);
|
|
3693
4012
|
setTouchEndX(null);
|
|
3694
4013
|
};
|
|
3695
|
-
return /* @__PURE__ */ (0,
|
|
4014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3696
4015
|
CarouselContainer,
|
|
3697
4016
|
{
|
|
3698
4017
|
role: "region",
|
|
3699
4018
|
"aria-roledescription": "carousel",
|
|
3700
4019
|
"aria-label": "Carousel Component",
|
|
3701
4020
|
children: [
|
|
3702
|
-
/* @__PURE__ */ (0,
|
|
3703
|
-
/* @__PURE__ */ (0,
|
|
3704
|
-
/* @__PURE__ */ (0,
|
|
3705
|
-
/* @__PURE__ */ (0,
|
|
3706
|
-
/* @__PURE__ */ (0,
|
|
4021
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Wrapper6, { variant, children: [
|
|
4022
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(CarouselHeader, { children: [
|
|
4023
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Title2, { children: title }),
|
|
4024
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Navigation, { children: [
|
|
4025
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3707
4026
|
Button,
|
|
3708
4027
|
{
|
|
3709
4028
|
size: "sm",
|
|
@@ -3711,10 +4030,10 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3711
4030
|
"aria-label": "Previous Slide",
|
|
3712
4031
|
onClick: prev,
|
|
3713
4032
|
tabIndex: 0,
|
|
3714
|
-
children: /* @__PURE__ */ (0,
|
|
4033
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { name: "TriangleLeft", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
3715
4034
|
}
|
|
3716
4035
|
),
|
|
3717
|
-
/* @__PURE__ */ (0,
|
|
4036
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3718
4037
|
Button,
|
|
3719
4038
|
{
|
|
3720
4039
|
size: "sm",
|
|
@@ -3722,22 +4041,22 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3722
4041
|
"aria-label": "Previous Slide",
|
|
3723
4042
|
onClick: next,
|
|
3724
4043
|
tabIndex: 0,
|
|
3725
|
-
children: /* @__PURE__ */ (0,
|
|
4044
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
3726
4045
|
}
|
|
3727
4046
|
)
|
|
3728
4047
|
] })
|
|
3729
4048
|
] }),
|
|
3730
|
-
/* @__PURE__ */ (0,
|
|
3731
|
-
/* @__PURE__ */ (0,
|
|
3732
|
-
/* @__PURE__ */ (0,
|
|
3733
|
-
/* @__PURE__ */ (0,
|
|
4049
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Spacing, { size: "xs" }),
|
|
4050
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Hr, { variant }),
|
|
4051
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Spacing, { size: "xs" }),
|
|
4052
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3734
4053
|
CarouselContent,
|
|
3735
4054
|
{
|
|
3736
4055
|
onTouchStart,
|
|
3737
4056
|
onTouchMove,
|
|
3738
4057
|
onTouchEnd,
|
|
3739
4058
|
children: items.map(
|
|
3740
|
-
(child, index) => (0,
|
|
4059
|
+
(child, index) => (0, import_react19.cloneElement)(child, {
|
|
3741
4060
|
"aria-hidden": index !== activeIndex,
|
|
3742
4061
|
style: {
|
|
3743
4062
|
display: index === activeIndex ? "block" : "none"
|
|
@@ -3747,8 +4066,8 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3747
4066
|
}
|
|
3748
4067
|
)
|
|
3749
4068
|
] }),
|
|
3750
|
-
/* @__PURE__ */ (0,
|
|
3751
|
-
/* @__PURE__ */ (0,
|
|
4069
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Spacing, { size: "md" }),
|
|
4070
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DotsContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: items.map((_, idx) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3752
4071
|
DotButton,
|
|
3753
4072
|
{
|
|
3754
4073
|
active: idx === activeIndex,
|
|
@@ -3764,12 +4083,12 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3764
4083
|
}
|
|
3765
4084
|
);
|
|
3766
4085
|
};
|
|
3767
|
-
var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */ (0,
|
|
4086
|
+
var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CarouselItemContainer, { ...props, style: { ...style }, children });
|
|
3768
4087
|
Carousel.Item = CarouselItem;
|
|
3769
4088
|
|
|
3770
4089
|
// src/components/PasswordInput.tsx
|
|
3771
|
-
var
|
|
3772
|
-
var
|
|
4090
|
+
var import_react20 = require("react");
|
|
4091
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3773
4092
|
var ToggleButton = styled("button", {
|
|
3774
4093
|
all: "unset",
|
|
3775
4094
|
cursor: "pointer",
|
|
@@ -3784,11 +4103,11 @@ var ToggleButton = styled("button", {
|
|
|
3784
4103
|
borderRadius: "$sm"
|
|
3785
4104
|
}
|
|
3786
4105
|
});
|
|
3787
|
-
var PasswordInput = (0,
|
|
4106
|
+
var PasswordInput = (0, import_react20.forwardRef)(
|
|
3788
4107
|
({ value, onChange, ...props }, ref) => {
|
|
3789
|
-
const [visible, setVisible] = (0,
|
|
3790
|
-
const innerRef = (0,
|
|
3791
|
-
(0,
|
|
4108
|
+
const [visible, setVisible] = (0, import_react20.useState)(false);
|
|
4109
|
+
const innerRef = (0, import_react20.useRef)(null);
|
|
4110
|
+
(0, import_react20.useImperativeHandle)(ref, () => innerRef.current);
|
|
3792
4111
|
const handleToggleVisibility = () => {
|
|
3793
4112
|
setVisible((v) => !v);
|
|
3794
4113
|
setTimeout(() => {
|
|
@@ -3798,7 +4117,7 @@ var PasswordInput = (0, import_react19.forwardRef)(
|
|
|
3798
4117
|
}
|
|
3799
4118
|
}, 0);
|
|
3800
4119
|
};
|
|
3801
|
-
return /* @__PURE__ */ (0,
|
|
4120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3802
4121
|
Input2,
|
|
3803
4122
|
{
|
|
3804
4123
|
...props,
|
|
@@ -3806,14 +4125,14 @@ var PasswordInput = (0, import_react19.forwardRef)(
|
|
|
3806
4125
|
type: visible ? "text" : "password",
|
|
3807
4126
|
value,
|
|
3808
4127
|
onChange,
|
|
3809
|
-
suffix: /* @__PURE__ */ (0,
|
|
4128
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3810
4129
|
ToggleButton,
|
|
3811
4130
|
{
|
|
3812
4131
|
type: "button",
|
|
3813
4132
|
onClick: handleToggleVisibility,
|
|
3814
4133
|
onMouseDown: (e) => e.preventDefault(),
|
|
3815
4134
|
"aria-label": visible ? "Ocultar senha" : "Mostrar senha",
|
|
3816
|
-
children: visible ? /* @__PURE__ */ (0,
|
|
4135
|
+
children: visible ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { name: "EyeClosed", size: 16, color: "black" }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { name: "EyeOpen", size: 16, color: "black" })
|
|
3817
4136
|
}
|
|
3818
4137
|
)
|
|
3819
4138
|
}
|
|
@@ -3824,7 +4143,7 @@ PasswordInput.displayName = "PasswordInput";
|
|
|
3824
4143
|
|
|
3825
4144
|
// src/components/Accordion/index.tsx
|
|
3826
4145
|
var RadixAccordion = __toESM(require("@radix-ui/react-accordion"));
|
|
3827
|
-
var
|
|
4146
|
+
var import_react21 = __toESM(require("react"));
|
|
3828
4147
|
|
|
3829
4148
|
// src/components/Accordion/styles.ts
|
|
3830
4149
|
var Accordion = __toESM(require("@radix-ui/react-accordion"));
|
|
@@ -3905,18 +4224,18 @@ var OptionsButton = styled(Button, {
|
|
|
3905
4224
|
});
|
|
3906
4225
|
|
|
3907
4226
|
// src/components/Accordion/index.tsx
|
|
3908
|
-
var
|
|
3909
|
-
var Accordion2 =
|
|
4227
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4228
|
+
var Accordion2 = import_react21.default.forwardRef(
|
|
3910
4229
|
({ title, children, dropdownItems }, ref) => {
|
|
3911
|
-
return /* @__PURE__ */ (0,
|
|
3912
|
-
/* @__PURE__ */ (0,
|
|
3913
|
-
/* @__PURE__ */ (0,
|
|
3914
|
-
/* @__PURE__ */ (0,
|
|
4230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AccordionContainer, { type: "single", collapsible: true, ref, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(AccordionItem, { value: "item-1", children: [
|
|
4231
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(AccordionHeader, { children: [
|
|
4232
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AccordionTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: title }) }),
|
|
4233
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(TriggerContent, { children: [
|
|
3915
4234
|
dropdownItems && dropdownItems,
|
|
3916
|
-
/* @__PURE__ */ (0,
|
|
4235
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(RadixAccordion.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(StyledButton, { as: "div", variant: "secondary", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AccordionChevron, { name: "TriangleDown", size: 16, "aria-hidden": true }) }) })
|
|
3917
4236
|
] })
|
|
3918
4237
|
] }),
|
|
3919
|
-
/* @__PURE__ */ (0,
|
|
4238
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(RadixAccordion.Content, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AccordionContent, { children }) })
|
|
3920
4239
|
] }) });
|
|
3921
4240
|
}
|
|
3922
4241
|
);
|