design-zystem 1.0.308 → 1.0.310
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.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +664 -642
- package/dist/index.mjs +595 -573
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1149,7 +1149,7 @@ var ModalConfirmation = (props) => {
|
|
|
1149
1149
|
};
|
|
1150
1150
|
|
|
1151
1151
|
// src/Components/NewModal/NewModal.tsx
|
|
1152
|
-
import { useEffect as useEffect3, useRef as useRef3, useState as
|
|
1152
|
+
import { useEffect as useEffect3, useRef as useRef3, useState as useState3 } from "react";
|
|
1153
1153
|
|
|
1154
1154
|
// src/Components/Bubble/Bubble.tsx
|
|
1155
1155
|
import styled11, { css, keyframes } from "styled-components";
|
|
@@ -1236,8 +1236,139 @@ var Bubble = (_a) => {
|
|
|
1236
1236
|
return /* @__PURE__ */ jsx14(StyledBubble, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
1237
1237
|
};
|
|
1238
1238
|
|
|
1239
|
+
// src/Components/Tooltip/Tooltip.tsx
|
|
1240
|
+
import { useState as useState2 } from "react";
|
|
1241
|
+
import styled12 from "styled-components";
|
|
1242
|
+
import { jsx as jsx15, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1243
|
+
var StyledTooltipWrapper = styled12.div`
|
|
1244
|
+
position: relative;
|
|
1245
|
+
display: inline-block;
|
|
1246
|
+
cursor: pointer;
|
|
1247
|
+
`;
|
|
1248
|
+
var StyledTooltipContent = styled12.div`
|
|
1249
|
+
visibility: ${(props) => props.$isVisible ? "visible" : "hidden"};
|
|
1250
|
+
background-color: ${(props) => props.$backgroundColor || colors.black};
|
|
1251
|
+
color: ${colors.white};
|
|
1252
|
+
text-align: center;
|
|
1253
|
+
padding: 8px;
|
|
1254
|
+
border-radius: 4px;
|
|
1255
|
+
position: absolute;
|
|
1256
|
+
width: ${(props) => props.$width || "200px"};
|
|
1257
|
+
height: ${(props) => props.$height || "auto"};
|
|
1258
|
+
opacity: ${(props) => props.$isVisible ? 1 : 0};
|
|
1259
|
+
transition: opacity 0.3s;
|
|
1260
|
+
z-index: 1;
|
|
1261
|
+
display: flex;
|
|
1262
|
+
flex-direction: column;
|
|
1263
|
+
align-items: center;
|
|
1264
|
+
gap: 4px;
|
|
1265
|
+
|
|
1266
|
+
${(props) => {
|
|
1267
|
+
switch (props.$direction) {
|
|
1268
|
+
case "top":
|
|
1269
|
+
return `
|
|
1270
|
+
bottom: 125%;
|
|
1271
|
+
left: 50%;
|
|
1272
|
+
transform: translateX(-50%);
|
|
1273
|
+
&::after {
|
|
1274
|
+
content: "";
|
|
1275
|
+
position: absolute;
|
|
1276
|
+
top: 100%;
|
|
1277
|
+
left: 50%;
|
|
1278
|
+
transform: translateX(-50%);
|
|
1279
|
+
border-width: 5px;
|
|
1280
|
+
border-style: solid;
|
|
1281
|
+
border-color: ${props.$backgroundColor || colors.black} transparent transparent transparent;
|
|
1282
|
+
}
|
|
1283
|
+
`;
|
|
1284
|
+
case "bottom":
|
|
1285
|
+
return `
|
|
1286
|
+
top: 125%;
|
|
1287
|
+
left: 50%;
|
|
1288
|
+
transform: translateX(-50%);
|
|
1289
|
+
&::after {
|
|
1290
|
+
content: "";
|
|
1291
|
+
position: absolute;
|
|
1292
|
+
bottom: 100%;
|
|
1293
|
+
left: 50%;
|
|
1294
|
+
transform: translateX(-50%);
|
|
1295
|
+
border-width: 5px;
|
|
1296
|
+
border-style: solid;
|
|
1297
|
+
border-color: transparent transparent ${props.$backgroundColor || colors.black} transparent;
|
|
1298
|
+
}
|
|
1299
|
+
`;
|
|
1300
|
+
case "left":
|
|
1301
|
+
return `
|
|
1302
|
+
top: 50%;
|
|
1303
|
+
right: 125%;
|
|
1304
|
+
transform: translateY(-50%);
|
|
1305
|
+
&::after {
|
|
1306
|
+
content: "";
|
|
1307
|
+
position: absolute;
|
|
1308
|
+
top: 50%;
|
|
1309
|
+
left: 100%;
|
|
1310
|
+
transform: translateY(-50%);
|
|
1311
|
+
border-width: 5px;
|
|
1312
|
+
border-style: solid;
|
|
1313
|
+
border-color: transparent transparent transparent ${props.$backgroundColor || colors.black};
|
|
1314
|
+
}
|
|
1315
|
+
`;
|
|
1316
|
+
case "right":
|
|
1317
|
+
default:
|
|
1318
|
+
return `
|
|
1319
|
+
top: 50%;
|
|
1320
|
+
left: 125%;
|
|
1321
|
+
transform: translateY(-50%);
|
|
1322
|
+
&::after {
|
|
1323
|
+
content: "";
|
|
1324
|
+
position: absolute;
|
|
1325
|
+
top: 50%;
|
|
1326
|
+
right: 100%;
|
|
1327
|
+
transform: translateY(-50%);
|
|
1328
|
+
border-width: 5px;
|
|
1329
|
+
border-style: solid;
|
|
1330
|
+
border-color: transparent ${props.$backgroundColor || colors.black} transparent transparent;
|
|
1331
|
+
}
|
|
1332
|
+
`;
|
|
1333
|
+
}
|
|
1334
|
+
}}
|
|
1335
|
+
`;
|
|
1336
|
+
var Tooltip = ({
|
|
1337
|
+
backgroundColor,
|
|
1338
|
+
data = [],
|
|
1339
|
+
width,
|
|
1340
|
+
height,
|
|
1341
|
+
direction = "top",
|
|
1342
|
+
children
|
|
1343
|
+
}) => {
|
|
1344
|
+
const [isVisible, setIsVisible] = useState2(false);
|
|
1345
|
+
const handleMouseEnter = () => setIsVisible(true);
|
|
1346
|
+
const handleMouseLeave = () => setIsVisible(false);
|
|
1347
|
+
return /* @__PURE__ */ jsxs5(
|
|
1348
|
+
StyledTooltipWrapper,
|
|
1349
|
+
{
|
|
1350
|
+
onMouseEnter: handleMouseEnter,
|
|
1351
|
+
onMouseLeave: handleMouseLeave,
|
|
1352
|
+
children: [
|
|
1353
|
+
children,
|
|
1354
|
+
/* @__PURE__ */ jsx15(
|
|
1355
|
+
StyledTooltipContent,
|
|
1356
|
+
{
|
|
1357
|
+
$isVisible: isVisible,
|
|
1358
|
+
$backgroundColor: backgroundColor,
|
|
1359
|
+
$width: width,
|
|
1360
|
+
$height: height,
|
|
1361
|
+
$direction: direction,
|
|
1362
|
+
children: data.length > 0 ? data.map((item, index) => /* @__PURE__ */ jsx15(Text, { size: "s", color: "white", children: item }, index)) : /* @__PURE__ */ jsx15(Text, { size: "s", color: "white", children: "Aucune donn\xE9e" })
|
|
1363
|
+
}
|
|
1364
|
+
)
|
|
1365
|
+
]
|
|
1366
|
+
}
|
|
1367
|
+
);
|
|
1368
|
+
};
|
|
1369
|
+
|
|
1239
1370
|
// src/Components/NewModal/NewModal.tsx
|
|
1240
|
-
import { Fragment as Fragment2, jsx as
|
|
1371
|
+
import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1241
1372
|
var NewModal = ({
|
|
1242
1373
|
showModal,
|
|
1243
1374
|
closeModal,
|
|
@@ -1251,6 +1382,7 @@ var NewModal = ({
|
|
|
1251
1382
|
leftButtonAction,
|
|
1252
1383
|
rightButtonLabel,
|
|
1253
1384
|
rightButtonAction,
|
|
1385
|
+
rightButtonDisabledTooltip,
|
|
1254
1386
|
isLoading,
|
|
1255
1387
|
isOutline,
|
|
1256
1388
|
variant = "blue_700",
|
|
@@ -1263,8 +1395,8 @@ var NewModal = ({
|
|
|
1263
1395
|
}) => {
|
|
1264
1396
|
const mainColor = colors[variant] || colors.blue_700;
|
|
1265
1397
|
const showHeader = Boolean(title || showCloseButton);
|
|
1266
|
-
const [isDragging, setIsDragging] =
|
|
1267
|
-
const [offset, setOffset] =
|
|
1398
|
+
const [isDragging, setIsDragging] = useState3(false);
|
|
1399
|
+
const [offset, setOffset] = useState3({ x: 0, y: 0 });
|
|
1268
1400
|
const lastPointRef = useRef3({ x: 0, y: 0 });
|
|
1269
1401
|
const headerRef = useRef3(null);
|
|
1270
1402
|
useEffect3(() => {
|
|
@@ -1307,7 +1439,7 @@ var NewModal = ({
|
|
|
1307
1439
|
if (showModal === true) setOffset({ x: 0, y: 0 });
|
|
1308
1440
|
}, [showModal]);
|
|
1309
1441
|
if (!showModal) return null;
|
|
1310
|
-
return /* @__PURE__ */
|
|
1442
|
+
return /* @__PURE__ */ jsx16(
|
|
1311
1443
|
Box,
|
|
1312
1444
|
{
|
|
1313
1445
|
style: {
|
|
@@ -1330,7 +1462,7 @@ var NewModal = ({
|
|
|
1330
1462
|
role: "dialog",
|
|
1331
1463
|
"aria-modal": "true",
|
|
1332
1464
|
"aria-labelledby": title ? "modal-title" : void 0,
|
|
1333
|
-
children: /* @__PURE__ */
|
|
1465
|
+
children: /* @__PURE__ */ jsxs6(
|
|
1334
1466
|
Col,
|
|
1335
1467
|
{
|
|
1336
1468
|
onClick: (e) => e.stopPropagation(),
|
|
@@ -1349,7 +1481,7 @@ var NewModal = ({
|
|
|
1349
1481
|
maxHeight: "90vh"
|
|
1350
1482
|
},
|
|
1351
1483
|
children: [
|
|
1352
|
-
showHeader && /* @__PURE__ */
|
|
1484
|
+
showHeader && /* @__PURE__ */ jsxs6(
|
|
1353
1485
|
Row,
|
|
1354
1486
|
{
|
|
1355
1487
|
ref: headerRef,
|
|
@@ -1365,15 +1497,15 @@ var NewModal = ({
|
|
|
1365
1497
|
onPointerDown: startDrag,
|
|
1366
1498
|
"aria-grabbed": isDraggable ? isDragging : void 0,
|
|
1367
1499
|
children: [
|
|
1368
|
-
showHeaderIcon && showCloseButton && /* @__PURE__ */
|
|
1369
|
-
/* @__PURE__ */
|
|
1500
|
+
showHeaderIcon && showCloseButton && /* @__PURE__ */ jsx16("div", { style: { height: 38, width: 38 } }),
|
|
1501
|
+
/* @__PURE__ */ jsxs6(
|
|
1370
1502
|
Col,
|
|
1371
1503
|
{
|
|
1372
1504
|
gap: "8",
|
|
1373
1505
|
alignItems: showHeaderIcon ? "center" : "flex-start",
|
|
1374
1506
|
justifyContent: "center",
|
|
1375
1507
|
children: [
|
|
1376
|
-
showHeaderIcon && /* @__PURE__ */
|
|
1508
|
+
showHeaderIcon && /* @__PURE__ */ jsx16(
|
|
1377
1509
|
Icon,
|
|
1378
1510
|
{
|
|
1379
1511
|
name: icon,
|
|
@@ -1385,8 +1517,8 @@ var NewModal = ({
|
|
|
1385
1517
|
color: mainColor
|
|
1386
1518
|
}
|
|
1387
1519
|
),
|
|
1388
|
-
title && /* @__PURE__ */
|
|
1389
|
-
/* @__PURE__ */
|
|
1520
|
+
title && /* @__PURE__ */ jsx16(Fragment2, { children: tag ? /* @__PURE__ */ jsxs6(Row, { alignItems: "center", gap: "8", children: [
|
|
1521
|
+
/* @__PURE__ */ jsx16(
|
|
1390
1522
|
Text,
|
|
1391
1523
|
{
|
|
1392
1524
|
id: "modal-title",
|
|
@@ -1397,17 +1529,17 @@ var NewModal = ({
|
|
|
1397
1529
|
children: title
|
|
1398
1530
|
}
|
|
1399
1531
|
),
|
|
1400
|
-
/* @__PURE__ */
|
|
1532
|
+
/* @__PURE__ */ jsx16(
|
|
1401
1533
|
Bubble,
|
|
1402
1534
|
{
|
|
1403
1535
|
size: "xs",
|
|
1404
1536
|
backgroundColor: tag.backgroundColor,
|
|
1405
1537
|
color: tag.color,
|
|
1406
1538
|
borderRadius: tag.borderRadius || "8px",
|
|
1407
|
-
children: /* @__PURE__ */
|
|
1539
|
+
children: /* @__PURE__ */ jsx16(Text, { size: "11px", variant: tag.color || void 0, children: tag.label })
|
|
1408
1540
|
}
|
|
1409
1541
|
)
|
|
1410
|
-
] }) : /* @__PURE__ */
|
|
1542
|
+
] }) : /* @__PURE__ */ jsx16(
|
|
1411
1543
|
Text,
|
|
1412
1544
|
{
|
|
1413
1545
|
id: "modal-title",
|
|
@@ -1418,11 +1550,11 @@ var NewModal = ({
|
|
|
1418
1550
|
children: title
|
|
1419
1551
|
}
|
|
1420
1552
|
) }),
|
|
1421
|
-
subTitle && /* @__PURE__ */
|
|
1553
|
+
subTitle && /* @__PURE__ */ jsx16(Text, { align: "center", size: "s", weight: "400", children: subTitle })
|
|
1422
1554
|
]
|
|
1423
1555
|
}
|
|
1424
1556
|
),
|
|
1425
|
-
showCloseButton && /* @__PURE__ */
|
|
1557
|
+
showCloseButton && /* @__PURE__ */ jsx16(
|
|
1426
1558
|
Icon,
|
|
1427
1559
|
{
|
|
1428
1560
|
name: "xmark",
|
|
@@ -1436,7 +1568,7 @@ var NewModal = ({
|
|
|
1436
1568
|
]
|
|
1437
1569
|
}
|
|
1438
1570
|
),
|
|
1439
|
-
children && /* @__PURE__ */
|
|
1571
|
+
children && /* @__PURE__ */ jsx16(
|
|
1440
1572
|
Col,
|
|
1441
1573
|
{
|
|
1442
1574
|
fullWidth: true,
|
|
@@ -1448,8 +1580,8 @@ var NewModal = ({
|
|
|
1448
1580
|
children
|
|
1449
1581
|
}
|
|
1450
1582
|
),
|
|
1451
|
-
(leftButtonLabel || rightButtonLabel) && /* @__PURE__ */
|
|
1452
|
-
leftButtonLabel && /* @__PURE__ */
|
|
1583
|
+
(leftButtonLabel || rightButtonLabel) && /* @__PURE__ */ jsxs6(Row, { gap: "16", fullWidth: true, children: [
|
|
1584
|
+
leftButtonLabel && /* @__PURE__ */ jsx16(Row, { flex: "1", children: /* @__PURE__ */ jsx16(
|
|
1453
1585
|
Button,
|
|
1454
1586
|
{
|
|
1455
1587
|
outline: true,
|
|
@@ -1461,8 +1593,22 @@ var NewModal = ({
|
|
|
1461
1593
|
},
|
|
1462
1594
|
children: leftButtonLabel
|
|
1463
1595
|
}
|
|
1464
|
-
),
|
|
1465
|
-
rightButtonLabel && /* @__PURE__ */
|
|
1596
|
+
) }),
|
|
1597
|
+
rightButtonLabel && /* @__PURE__ */ jsx16(Row, { flex: "1", children: confirmDisabled && rightButtonDisabledTooltip ? /* @__PURE__ */ jsx16(Tooltip, { data: [rightButtonDisabledTooltip], children: /* @__PURE__ */ jsx16(
|
|
1598
|
+
Button,
|
|
1599
|
+
{
|
|
1600
|
+
outline: isOutline,
|
|
1601
|
+
onClick: rightButtonAction,
|
|
1602
|
+
style: {
|
|
1603
|
+
width: "100%",
|
|
1604
|
+
backgroundColor: "lightgray",
|
|
1605
|
+
border: "1px solid lightgray"
|
|
1606
|
+
},
|
|
1607
|
+
isLoading,
|
|
1608
|
+
disabled: true,
|
|
1609
|
+
children: rightButtonLabel
|
|
1610
|
+
}
|
|
1611
|
+
) }) : /* @__PURE__ */ jsx16(
|
|
1466
1612
|
Button,
|
|
1467
1613
|
{
|
|
1468
1614
|
outline: isOutline,
|
|
@@ -1476,7 +1622,7 @@ var NewModal = ({
|
|
|
1476
1622
|
disabled: confirmDisabled,
|
|
1477
1623
|
children: rightButtonLabel
|
|
1478
1624
|
}
|
|
1479
|
-
)
|
|
1625
|
+
) })
|
|
1480
1626
|
] })
|
|
1481
1627
|
]
|
|
1482
1628
|
}
|
|
@@ -1486,10 +1632,10 @@ var NewModal = ({
|
|
|
1486
1632
|
};
|
|
1487
1633
|
|
|
1488
1634
|
// src/Components/Drawer/Drawer.tsx
|
|
1489
|
-
import { useEffect as useEffect4, useRef as useRef4, useState as
|
|
1490
|
-
import
|
|
1491
|
-
import { jsx as
|
|
1492
|
-
var StyledOverlay =
|
|
1635
|
+
import { useEffect as useEffect4, useRef as useRef4, useState as useState4 } from "react";
|
|
1636
|
+
import styled13 from "styled-components";
|
|
1637
|
+
import { jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1638
|
+
var StyledOverlay = styled13.div`
|
|
1493
1639
|
position: fixed;
|
|
1494
1640
|
inset: 0;
|
|
1495
1641
|
z-index: 1000;
|
|
@@ -1499,7 +1645,7 @@ var StyledOverlay = styled12.div`
|
|
|
1499
1645
|
transition: background 220ms ease-out;
|
|
1500
1646
|
pointer-events: ${({ $visible }) => $visible ? "auto" : "none"};
|
|
1501
1647
|
`;
|
|
1502
|
-
var StyledPanel =
|
|
1648
|
+
var StyledPanel = styled13.div`
|
|
1503
1649
|
width: ${({ $width }) => $width};
|
|
1504
1650
|
max-width: 90vw;
|
|
1505
1651
|
height: 100%;
|
|
@@ -1515,7 +1661,7 @@ var StyledPanel = styled12.div`
|
|
|
1515
1661
|
transition: transform 220ms ease-out;
|
|
1516
1662
|
border-radius: 8px 0 0 8px;
|
|
1517
1663
|
`;
|
|
1518
|
-
var ScrollableContent =
|
|
1664
|
+
var ScrollableContent = styled13.div`
|
|
1519
1665
|
flex: 1 1 auto;
|
|
1520
1666
|
overflow-y: auto;
|
|
1521
1667
|
min-height: 0;
|
|
@@ -1545,8 +1691,8 @@ var Drawer = ({
|
|
|
1545
1691
|
footer,
|
|
1546
1692
|
stretchContent = false
|
|
1547
1693
|
}) => {
|
|
1548
|
-
const [isRendered, setIsRendered] =
|
|
1549
|
-
const [isVisible, setIsVisible] =
|
|
1694
|
+
const [isRendered, setIsRendered] = useState4(showDrawer);
|
|
1695
|
+
const [isVisible, setIsVisible] = useState4(false);
|
|
1550
1696
|
const panelRef = useRef4(null);
|
|
1551
1697
|
useEffect4(() => {
|
|
1552
1698
|
if (showDrawer) {
|
|
@@ -1560,7 +1706,7 @@ var Drawer = ({
|
|
|
1560
1706
|
if (!showDrawer) setIsRendered(false);
|
|
1561
1707
|
};
|
|
1562
1708
|
if (!isRendered) return null;
|
|
1563
|
-
return /* @__PURE__ */
|
|
1709
|
+
return /* @__PURE__ */ jsx17(StyledOverlay, { role: "dialog", onClick: closeDrawer, $visible: isVisible, children: /* @__PURE__ */ jsxs7(
|
|
1564
1710
|
StyledPanel,
|
|
1565
1711
|
{
|
|
1566
1712
|
ref: panelRef,
|
|
@@ -1569,9 +1715,9 @@ var Drawer = ({
|
|
|
1569
1715
|
$width: width,
|
|
1570
1716
|
$visible: isVisible,
|
|
1571
1717
|
children: [
|
|
1572
|
-
/* @__PURE__ */
|
|
1573
|
-
/* @__PURE__ */
|
|
1574
|
-
/* @__PURE__ */
|
|
1718
|
+
/* @__PURE__ */ jsxs7(Row, { alignItems: "center", justifyContent: "space-between", children: [
|
|
1719
|
+
/* @__PURE__ */ jsx17(Text, { weight: "bold", size: "m", color: "black", children: title }),
|
|
1720
|
+
/* @__PURE__ */ jsx17(
|
|
1575
1721
|
Icon,
|
|
1576
1722
|
{
|
|
1577
1723
|
name: "xmark",
|
|
@@ -1582,12 +1728,12 @@ var Drawer = ({
|
|
|
1582
1728
|
}
|
|
1583
1729
|
)
|
|
1584
1730
|
] }),
|
|
1585
|
-
title && /* @__PURE__ */
|
|
1586
|
-
/* @__PURE__ */
|
|
1587
|
-
/* @__PURE__ */
|
|
1731
|
+
title && /* @__PURE__ */ jsx17(Divider, { orientation: "horizontal", thickness: "1px" }),
|
|
1732
|
+
/* @__PURE__ */ jsx17(ScrollableContent, { children: children && /* @__PURE__ */ jsx17(Col, { fullWidth: true, fullHeight: stretchContent, children }) }),
|
|
1733
|
+
/* @__PURE__ */ jsx17(Divider, { orientation: "horizontal", thickness: "1px" }),
|
|
1588
1734
|
footer,
|
|
1589
|
-
(leftButtonLabel || rightButtonLabel) && /* @__PURE__ */
|
|
1590
|
-
leftButtonLabel && /* @__PURE__ */
|
|
1735
|
+
(leftButtonLabel || rightButtonLabel) && /* @__PURE__ */ jsxs7(Row, { gap: "12", fullWidth: true, children: [
|
|
1736
|
+
leftButtonLabel && /* @__PURE__ */ jsx17(
|
|
1591
1737
|
Button,
|
|
1592
1738
|
{
|
|
1593
1739
|
outline: leftOutline,
|
|
@@ -1598,7 +1744,7 @@ var Drawer = ({
|
|
|
1598
1744
|
children: leftButtonLabel
|
|
1599
1745
|
}
|
|
1600
1746
|
),
|
|
1601
|
-
rightButtonLabel && /* @__PURE__ */
|
|
1747
|
+
rightButtonLabel && /* @__PURE__ */ jsx17(
|
|
1602
1748
|
Button,
|
|
1603
1749
|
{
|
|
1604
1750
|
outline: rightOutline,
|
|
@@ -1619,11 +1765,11 @@ var Drawer = ({
|
|
|
1619
1765
|
// src/Components/Toast/Toaster.tsx
|
|
1620
1766
|
import { useSyncExternalStore } from "react";
|
|
1621
1767
|
import { createPortal } from "react-dom";
|
|
1622
|
-
import
|
|
1768
|
+
import styled15 from "styled-components";
|
|
1623
1769
|
|
|
1624
1770
|
// src/Components/Toast/ToastCard.tsx
|
|
1625
|
-
import { useCallback as useCallback2, useEffect as useEffect5, useState as
|
|
1626
|
-
import
|
|
1771
|
+
import { useCallback as useCallback2, useEffect as useEffect5, useState as useState5 } from "react";
|
|
1772
|
+
import styled14, { keyframes as keyframes2 } from "styled-components";
|
|
1627
1773
|
|
|
1628
1774
|
// src/Components/Toast/toastStore.ts
|
|
1629
1775
|
var DEFAULT_TIMEOUT_BY_TYPE = {
|
|
@@ -1668,10 +1814,10 @@ var dismissToast = (id) => {
|
|
|
1668
1814
|
};
|
|
1669
1815
|
|
|
1670
1816
|
// src/Components/Toast/ToastCard.tsx
|
|
1671
|
-
import { jsx as
|
|
1817
|
+
import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1672
1818
|
var EXIT_DURATION = 180;
|
|
1673
1819
|
var ToastCard = ({ toastItem }) => {
|
|
1674
|
-
const [isExiting, setIsExiting] =
|
|
1820
|
+
const [isExiting, setIsExiting] = useState5(false);
|
|
1675
1821
|
const handleDismiss = useCallback2(() => {
|
|
1676
1822
|
setIsExiting(true);
|
|
1677
1823
|
setTimeout(() => dismissToast(toastItem.id), EXIT_DURATION);
|
|
@@ -1681,7 +1827,7 @@ var ToastCard = ({ toastItem }) => {
|
|
|
1681
1827
|
return () => clearTimeout(dismissTimer);
|
|
1682
1828
|
}, [handleDismiss, toastItem.timeOut]);
|
|
1683
1829
|
const { icon, accent, background } = TOAST[toastItem.type];
|
|
1684
|
-
return /* @__PURE__ */
|
|
1830
|
+
return /* @__PURE__ */ jsxs8(
|
|
1685
1831
|
Card,
|
|
1686
1832
|
{
|
|
1687
1833
|
$accent: accent,
|
|
@@ -1690,19 +1836,19 @@ var ToastCard = ({ toastItem }) => {
|
|
|
1690
1836
|
role: "status",
|
|
1691
1837
|
onClick: toastItem.onClick,
|
|
1692
1838
|
children: [
|
|
1693
|
-
/* @__PURE__ */
|
|
1694
|
-
/* @__PURE__ */
|
|
1695
|
-
toastItem.title && /* @__PURE__ */
|
|
1696
|
-
/* @__PURE__ */
|
|
1839
|
+
/* @__PURE__ */ jsx18(IconBadge, { $background: background, children: /* @__PURE__ */ jsx18(Icon, { name: icon, family: "regular", size: "m", color: accent }) }),
|
|
1840
|
+
/* @__PURE__ */ jsxs8(Content, { children: [
|
|
1841
|
+
toastItem.title && /* @__PURE__ */ jsx18(Text, { size: "s", weight: "700", children: toastItem.title }),
|
|
1842
|
+
/* @__PURE__ */ jsx18(Text, { size: "s", children: toastItem.message })
|
|
1697
1843
|
] }),
|
|
1698
|
-
/* @__PURE__ */
|
|
1844
|
+
/* @__PURE__ */ jsx18(
|
|
1699
1845
|
DismissButton,
|
|
1700
1846
|
{
|
|
1701
1847
|
onClick: (event) => {
|
|
1702
1848
|
event.stopPropagation();
|
|
1703
1849
|
handleDismiss();
|
|
1704
1850
|
},
|
|
1705
|
-
children: /* @__PURE__ */
|
|
1851
|
+
children: /* @__PURE__ */ jsx18(
|
|
1706
1852
|
Icon,
|
|
1707
1853
|
{
|
|
1708
1854
|
name: "xmark",
|
|
@@ -1714,7 +1860,7 @@ var ToastCard = ({ toastItem }) => {
|
|
|
1714
1860
|
)
|
|
1715
1861
|
}
|
|
1716
1862
|
),
|
|
1717
|
-
/* @__PURE__ */
|
|
1863
|
+
/* @__PURE__ */ jsx18(
|
|
1718
1864
|
ProgressBar,
|
|
1719
1865
|
{
|
|
1720
1866
|
$accent: accent,
|
|
@@ -1760,7 +1906,7 @@ var shrink = keyframes2`
|
|
|
1760
1906
|
from { transform: scaleX(1); }
|
|
1761
1907
|
to { transform: scaleX(0); }
|
|
1762
1908
|
`;
|
|
1763
|
-
var Card =
|
|
1909
|
+
var Card = styled14.div`
|
|
1764
1910
|
position: relative;
|
|
1765
1911
|
display: flex;
|
|
1766
1912
|
align-items: flex-start;
|
|
@@ -1777,13 +1923,13 @@ var Card = styled13.div`
|
|
|
1777
1923
|
animation: ${({ $isExiting }) => $isExiting ? slideOut : slideIn} 180ms
|
|
1778
1924
|
ease-out forwards;
|
|
1779
1925
|
`;
|
|
1780
|
-
var DismissButton =
|
|
1926
|
+
var DismissButton = styled14.span`
|
|
1781
1927
|
position: absolute;
|
|
1782
1928
|
top: 10px;
|
|
1783
1929
|
right: 10px;
|
|
1784
1930
|
cursor: pointer;
|
|
1785
1931
|
`;
|
|
1786
|
-
var IconBadge =
|
|
1932
|
+
var IconBadge = styled14.div`
|
|
1787
1933
|
display: flex;
|
|
1788
1934
|
align-items: center;
|
|
1789
1935
|
justify-content: center;
|
|
@@ -1793,7 +1939,7 @@ var IconBadge = styled13.div`
|
|
|
1793
1939
|
background: ${({ $background }) => $background};
|
|
1794
1940
|
flex-shrink: 0;
|
|
1795
1941
|
`;
|
|
1796
|
-
var Content =
|
|
1942
|
+
var Content = styled14.div`
|
|
1797
1943
|
display: flex;
|
|
1798
1944
|
flex-direction: column;
|
|
1799
1945
|
justify-content: center;
|
|
@@ -1802,7 +1948,7 @@ var Content = styled13.div`
|
|
|
1802
1948
|
min-width: 0;
|
|
1803
1949
|
min-height: 28px;
|
|
1804
1950
|
`;
|
|
1805
|
-
var ProgressBar =
|
|
1951
|
+
var ProgressBar = styled14.div`
|
|
1806
1952
|
position: absolute;
|
|
1807
1953
|
left: 0;
|
|
1808
1954
|
bottom: 0;
|
|
@@ -1815,16 +1961,16 @@ var ProgressBar = styled13.div`
|
|
|
1815
1961
|
`;
|
|
1816
1962
|
|
|
1817
1963
|
// src/Components/Toast/Toaster.tsx
|
|
1818
|
-
import { jsx as
|
|
1964
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1819
1965
|
var Toaster = () => {
|
|
1820
1966
|
const toasts2 = useSyncExternalStore(subscribeToasts, getToastsSnapshot);
|
|
1821
1967
|
if (toasts2.length === 0) return null;
|
|
1822
1968
|
return createPortal(
|
|
1823
|
-
/* @__PURE__ */
|
|
1969
|
+
/* @__PURE__ */ jsx19(Stack, { "aria-live": "polite", children: toasts2.map((toastItem) => /* @__PURE__ */ jsx19(ToastCard, { toastItem }, toastItem.id)) }),
|
|
1824
1970
|
document.body
|
|
1825
1971
|
);
|
|
1826
1972
|
};
|
|
1827
|
-
var Stack =
|
|
1973
|
+
var Stack = styled15.div`
|
|
1828
1974
|
position: fixed;
|
|
1829
1975
|
right: 24px;
|
|
1830
1976
|
bottom: 24px;
|
|
@@ -1844,8 +1990,8 @@ var toast = {
|
|
|
1844
1990
|
};
|
|
1845
1991
|
|
|
1846
1992
|
// src/Components/TagBubble/TagBubble.tsx
|
|
1847
|
-
import
|
|
1848
|
-
import { jsx as
|
|
1993
|
+
import styled16 from "styled-components";
|
|
1994
|
+
import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1849
1995
|
var sizeToPx = {
|
|
1850
1996
|
xxs: 10,
|
|
1851
1997
|
xs: 12,
|
|
@@ -1855,7 +2001,7 @@ var sizeToPx = {
|
|
|
1855
2001
|
xl: 20,
|
|
1856
2002
|
xxl: 22
|
|
1857
2003
|
};
|
|
1858
|
-
var Wrapper2 =
|
|
2004
|
+
var Wrapper2 = styled16.div`
|
|
1859
2005
|
display: inline-flex;
|
|
1860
2006
|
align-items: center;
|
|
1861
2007
|
justify-content: center;
|
|
@@ -1870,20 +2016,20 @@ var Wrapper2 = styled15.div`
|
|
|
1870
2016
|
|
|
1871
2017
|
box-shadow: ${(p) => p.$hasShadow ? "0 2px 15px 0 rgba(198, 198, 198, 0.25)" : "none"};
|
|
1872
2018
|
`;
|
|
1873
|
-
var Dot =
|
|
2019
|
+
var Dot = styled16.span`
|
|
1874
2020
|
width: ${(p) => p.$size}px;
|
|
1875
2021
|
height: ${(p) => p.$size}px;
|
|
1876
2022
|
border-radius: 999px;
|
|
1877
2023
|
background: ${(p) => colors[p.$color] || p.$color || colors.grey_400};
|
|
1878
2024
|
flex: 0 0 auto;
|
|
1879
2025
|
`;
|
|
1880
|
-
var Label =
|
|
2026
|
+
var Label = styled16.span`
|
|
1881
2027
|
font-size: ${(p) => p.$fontSize};
|
|
1882
2028
|
font-weight: ${(p) => p.$weight};
|
|
1883
2029
|
color: ${(p) => colors[p.$color] || p.$color || colors.text};
|
|
1884
2030
|
white-space: nowrap;
|
|
1885
2031
|
`;
|
|
1886
|
-
var Count =
|
|
2032
|
+
var Count = styled16.span`
|
|
1887
2033
|
padding: ${(p) => p.$countPadding};
|
|
1888
2034
|
border-radius: 999px;
|
|
1889
2035
|
|
|
@@ -1948,7 +2094,7 @@ var TagBubble = (_a) => {
|
|
|
1948
2094
|
const showCircle = !hideCircle;
|
|
1949
2095
|
const showCount = !hideCount && count !== void 0 && count !== null;
|
|
1950
2096
|
const dotColor = isActive ? circleColorActive : circleColorInactive;
|
|
1951
|
-
return /* @__PURE__ */
|
|
2097
|
+
return /* @__PURE__ */ jsxs9(
|
|
1952
2098
|
Wrapper2,
|
|
1953
2099
|
__spreadProps(__spreadValues({
|
|
1954
2100
|
onClick,
|
|
@@ -1961,8 +2107,8 @@ var TagBubble = (_a) => {
|
|
|
1961
2107
|
style: { cursor: onClick ? "pointer" : "default" }
|
|
1962
2108
|
}, rest), {
|
|
1963
2109
|
children: [
|
|
1964
|
-
showCircle && /* @__PURE__ */
|
|
1965
|
-
/* @__PURE__ */
|
|
2110
|
+
showCircle && /* @__PURE__ */ jsx20(Dot, { $size: circleSize, $color: dotColor }),
|
|
2111
|
+
/* @__PURE__ */ jsx20(
|
|
1966
2112
|
Label,
|
|
1967
2113
|
{
|
|
1968
2114
|
$fontSize: resolveFontSize(labelSize),
|
|
@@ -1971,7 +2117,7 @@ var TagBubble = (_a) => {
|
|
|
1971
2117
|
children: label
|
|
1972
2118
|
}
|
|
1973
2119
|
),
|
|
1974
|
-
showCount && /* @__PURE__ */
|
|
2120
|
+
showCount && /* @__PURE__ */ jsx20(
|
|
1975
2121
|
Count,
|
|
1976
2122
|
{
|
|
1977
2123
|
$bg: countBg,
|
|
@@ -1987,8 +2133,8 @@ var TagBubble = (_a) => {
|
|
|
1987
2133
|
};
|
|
1988
2134
|
|
|
1989
2135
|
// src/Components/Link/Link.tsx
|
|
1990
|
-
import
|
|
1991
|
-
import { jsx as
|
|
2136
|
+
import styled17 from "styled-components";
|
|
2137
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1992
2138
|
var textSizes4 = {
|
|
1993
2139
|
xxs: ".4em",
|
|
1994
2140
|
xs: ".6em",
|
|
@@ -2008,7 +2154,7 @@ var shouldForwardProp7 = (prop) => ![
|
|
|
2008
2154
|
"align",
|
|
2009
2155
|
"underline"
|
|
2010
2156
|
].includes(prop);
|
|
2011
|
-
var StyledLink =
|
|
2157
|
+
var StyledLink = styled17.a.withConfig({ shouldForwardProp: shouldForwardProp7 })`
|
|
2012
2158
|
font-size: ${(props) => textSizes4[props.size] || props.size || "1em"};
|
|
2013
2159
|
font-weight: ${(props) => props.fontWeight || "700"};
|
|
2014
2160
|
color: ${(props) => colors[props.variant] || props.color || colors.primary};
|
|
@@ -2038,7 +2184,7 @@ var Link = (_a) => {
|
|
|
2038
2184
|
"size",
|
|
2039
2185
|
"variant"
|
|
2040
2186
|
]);
|
|
2041
|
-
return /* @__PURE__ */
|
|
2187
|
+
return /* @__PURE__ */ jsx21(
|
|
2042
2188
|
StyledLink,
|
|
2043
2189
|
__spreadProps(__spreadValues({
|
|
2044
2190
|
href: url,
|
|
@@ -2054,13 +2200,13 @@ var Link = (_a) => {
|
|
|
2054
2200
|
};
|
|
2055
2201
|
|
|
2056
2202
|
// src/Components/Avatar/Avatar.tsx
|
|
2057
|
-
import { useState as
|
|
2058
|
-
import
|
|
2203
|
+
import { useState as useState6 } from "react";
|
|
2204
|
+
import styled19 from "styled-components";
|
|
2059
2205
|
|
|
2060
2206
|
// src/Components/Image/Image.tsx
|
|
2061
|
-
import
|
|
2062
|
-
import { jsx as
|
|
2063
|
-
var StyledImage =
|
|
2207
|
+
import styled18 from "styled-components";
|
|
2208
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
2209
|
+
var StyledImage = styled18.img`
|
|
2064
2210
|
object-fit: ${(props) => props.$objectFit || "cover"};
|
|
2065
2211
|
align-self: ${(props) => props.$alignSelf || "center"};
|
|
2066
2212
|
border-radius: ${(props) => props.$borderRadius || "5px"};
|
|
@@ -2088,7 +2234,7 @@ var Image2 = (_a) => {
|
|
|
2088
2234
|
"alignSelf",
|
|
2089
2235
|
"style"
|
|
2090
2236
|
]);
|
|
2091
|
-
return /* @__PURE__ */
|
|
2237
|
+
return /* @__PURE__ */ jsx22(
|
|
2092
2238
|
StyledImage,
|
|
2093
2239
|
__spreadValues({
|
|
2094
2240
|
src,
|
|
@@ -2104,13 +2250,13 @@ var Image2 = (_a) => {
|
|
|
2104
2250
|
};
|
|
2105
2251
|
|
|
2106
2252
|
// src/Components/Avatar/Avatar.tsx
|
|
2107
|
-
import { jsx as
|
|
2108
|
-
var Wrapper3 =
|
|
2253
|
+
import { jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2254
|
+
var Wrapper3 = styled19.div`
|
|
2109
2255
|
position: relative;
|
|
2110
2256
|
display: inline-flex;
|
|
2111
2257
|
flex-shrink: 0;
|
|
2112
2258
|
`;
|
|
2113
|
-
var Container =
|
|
2259
|
+
var Container = styled19.div`
|
|
2114
2260
|
width: ${(props) => props.$size}px;
|
|
2115
2261
|
height: ${(props) => props.$size}px;
|
|
2116
2262
|
border-radius: ${(props) => props.$shape === "circle" ? "50%" : "4px"};
|
|
@@ -2121,7 +2267,7 @@ var Container = styled18.div`
|
|
|
2121
2267
|
flex-shrink: 0;
|
|
2122
2268
|
overflow: hidden;
|
|
2123
2269
|
`;
|
|
2124
|
-
var BadgeSlot =
|
|
2270
|
+
var BadgeSlot = styled19.div`
|
|
2125
2271
|
position: absolute;
|
|
2126
2272
|
right: 0;
|
|
2127
2273
|
bottom: 0;
|
|
@@ -2135,12 +2281,12 @@ var BadgeSlot = styled18.div`
|
|
|
2135
2281
|
box-shadow: 0 2px 6px ${colors.blue_950}66;
|
|
2136
2282
|
line-height: 0;
|
|
2137
2283
|
`;
|
|
2138
|
-
var BadgeIcon =
|
|
2284
|
+
var BadgeIcon = styled19.i`
|
|
2139
2285
|
color: ${(props) => colors[props.$color] || props.$color};
|
|
2140
2286
|
font-size: ${(props) => Math.round(props.$size * 0.2)}px;
|
|
2141
2287
|
line-height: 2;
|
|
2142
2288
|
`;
|
|
2143
|
-
var AvatarBadgeSlot =
|
|
2289
|
+
var AvatarBadgeSlot = styled19.div`
|
|
2144
2290
|
position: absolute;
|
|
2145
2291
|
right: 0;
|
|
2146
2292
|
bottom: 0;
|
|
@@ -2150,12 +2296,12 @@ var AvatarBadgeSlot = styled18.div`
|
|
|
2150
2296
|
box-shadow: 0 2px 6px ${colors.blue_950}66;
|
|
2151
2297
|
line-height: 0;
|
|
2152
2298
|
`;
|
|
2153
|
-
var MainIcon =
|
|
2299
|
+
var MainIcon = styled19.i`
|
|
2154
2300
|
color: ${(props) => props.$color};
|
|
2155
2301
|
font-size: ${(props) => Math.round(props.$size * 0.45)}px;
|
|
2156
2302
|
line-height: 1;
|
|
2157
2303
|
`;
|
|
2158
|
-
var Initials =
|
|
2304
|
+
var Initials = styled19.span`
|
|
2159
2305
|
color: ${(props) => props.$textColor};
|
|
2160
2306
|
font-weight: 600;
|
|
2161
2307
|
font-size: ${(props) => Math.round(props.$size * 0.4)}px;
|
|
@@ -2180,20 +2326,20 @@ var Avatar = ({
|
|
|
2180
2326
|
avatarBadge
|
|
2181
2327
|
}) => {
|
|
2182
2328
|
var _a, _b, _c, _d;
|
|
2183
|
-
const [hasImageError, setHasImageError] =
|
|
2329
|
+
const [hasImageError, setHasImageError] = useState6(false);
|
|
2184
2330
|
const resolvedBackground = resolveColor3(backgroundColor, colors.grey_300);
|
|
2185
2331
|
const resolvedText = resolveColor3(textColor, colors.dark);
|
|
2186
2332
|
const initials = getInitials(name);
|
|
2187
2333
|
const sizePx = `${size}px`;
|
|
2188
2334
|
const borderRadius = shape === "circle" ? "50%" : "4px";
|
|
2189
|
-
return /* @__PURE__ */
|
|
2190
|
-
/* @__PURE__ */
|
|
2335
|
+
return /* @__PURE__ */ jsxs10(Wrapper3, { children: [
|
|
2336
|
+
/* @__PURE__ */ jsx23(
|
|
2191
2337
|
Container,
|
|
2192
2338
|
{
|
|
2193
2339
|
$size: size,
|
|
2194
2340
|
$shape: shape,
|
|
2195
2341
|
$backgroundColor: resolvedBackground,
|
|
2196
|
-
children: src && !hasImageError ? /* @__PURE__ */
|
|
2342
|
+
children: src && !hasImageError ? /* @__PURE__ */ jsx23(
|
|
2197
2343
|
Image2,
|
|
2198
2344
|
{
|
|
2199
2345
|
src,
|
|
@@ -2204,7 +2350,7 @@ var Avatar = ({
|
|
|
2204
2350
|
objectFit,
|
|
2205
2351
|
onError: () => setHasImageError(true)
|
|
2206
2352
|
}
|
|
2207
|
-
) : icon ? /* @__PURE__ */
|
|
2353
|
+
) : icon ? /* @__PURE__ */ jsx23(
|
|
2208
2354
|
MainIcon,
|
|
2209
2355
|
{
|
|
2210
2356
|
$size: size,
|
|
@@ -2213,10 +2359,10 @@ var Avatar = ({
|
|
|
2213
2359
|
role: "img",
|
|
2214
2360
|
"aria-label": name
|
|
2215
2361
|
}
|
|
2216
|
-
) : /* @__PURE__ */
|
|
2362
|
+
) : /* @__PURE__ */ jsx23(Initials, { $textColor: resolvedText, $size: size, children: initials })
|
|
2217
2363
|
}
|
|
2218
2364
|
),
|
|
2219
|
-
avatarBadge ? /* @__PURE__ */
|
|
2365
|
+
avatarBadge ? /* @__PURE__ */ jsx23(AvatarBadgeSlot, { $size: size, children: /* @__PURE__ */ jsx23(
|
|
2220
2366
|
Avatar,
|
|
2221
2367
|
{
|
|
2222
2368
|
name: avatarBadge.name,
|
|
@@ -2225,14 +2371,14 @@ var Avatar = ({
|
|
|
2225
2371
|
textColor: avatarBadge.textColor,
|
|
2226
2372
|
size: Math.round(size * 0.4)
|
|
2227
2373
|
}
|
|
2228
|
-
) }) : badge && /* @__PURE__ */
|
|
2374
|
+
) }) : badge && /* @__PURE__ */ jsx23(
|
|
2229
2375
|
BadgeSlot,
|
|
2230
2376
|
{
|
|
2231
2377
|
$size: size,
|
|
2232
2378
|
$bg: (_b = badge.backgroundColor) != null ? _b : colors.white,
|
|
2233
2379
|
title: badge.label,
|
|
2234
2380
|
"aria-label": badge.label,
|
|
2235
|
-
children: /* @__PURE__ */
|
|
2381
|
+
children: /* @__PURE__ */ jsx23(
|
|
2236
2382
|
BadgeIcon,
|
|
2237
2383
|
{
|
|
2238
2384
|
$size: size,
|
|
@@ -2246,11 +2392,11 @@ var Avatar = ({
|
|
|
2246
2392
|
};
|
|
2247
2393
|
|
|
2248
2394
|
// src/Components/Select/Select.tsx
|
|
2249
|
-
import { useState as
|
|
2395
|
+
import { useState as useState7, useRef as useRef5, useEffect as useEffect6 } from "react";
|
|
2250
2396
|
import ReactDOM from "react-dom";
|
|
2251
|
-
import
|
|
2252
|
-
import { jsx as
|
|
2253
|
-
var StyledContainer =
|
|
2397
|
+
import styled20 from "styled-components";
|
|
2398
|
+
import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2399
|
+
var StyledContainer = styled20.div.withConfig({
|
|
2254
2400
|
shouldForwardProp: (prop) => !["width", "noFlex", "label"].includes(prop)
|
|
2255
2401
|
})`
|
|
2256
2402
|
display: flex;
|
|
@@ -2261,11 +2407,11 @@ var StyledContainer = styled19.div.withConfig({
|
|
|
2261
2407
|
min-width: 100px;
|
|
2262
2408
|
gap: ${(props) => props.label ? "6px" : "0"};
|
|
2263
2409
|
`;
|
|
2264
|
-
var SelectWrapper =
|
|
2410
|
+
var SelectWrapper = styled20.div`
|
|
2265
2411
|
position: relative;
|
|
2266
2412
|
width: 100%;
|
|
2267
2413
|
`;
|
|
2268
|
-
var SelectInput =
|
|
2414
|
+
var SelectInput = styled20.div`
|
|
2269
2415
|
width: 100%;
|
|
2270
2416
|
border-radius: 5px;
|
|
2271
2417
|
cursor: ${(props) => props.disabled ? "not-allowed" : "pointer"};
|
|
@@ -2299,13 +2445,13 @@ var SelectInput = styled19.div`
|
|
|
2299
2445
|
flex-shrink: 0;
|
|
2300
2446
|
}
|
|
2301
2447
|
`;
|
|
2302
|
-
var ChevronIcon =
|
|
2448
|
+
var ChevronIcon = styled20(Icon).withConfig({
|
|
2303
2449
|
shouldForwardProp: (prop) => prop !== "isOpen"
|
|
2304
2450
|
})`
|
|
2305
2451
|
transition: transform 0.3s ease;
|
|
2306
2452
|
transform: ${(props) => props.isOpen ? "rotate(180deg)" : "rotate(0deg)"};
|
|
2307
2453
|
`;
|
|
2308
|
-
var Dropdown =
|
|
2454
|
+
var Dropdown = styled20.div`
|
|
2309
2455
|
position: absolute;
|
|
2310
2456
|
border: 1px solid ${colors.grey_200};
|
|
2311
2457
|
border-radius: 5px;
|
|
@@ -2317,10 +2463,10 @@ var Dropdown = styled19.div`
|
|
|
2317
2463
|
flex-direction: column;
|
|
2318
2464
|
font-size: 12px;
|
|
2319
2465
|
`;
|
|
2320
|
-
var DropdownList =
|
|
2466
|
+
var DropdownList = styled20.div`
|
|
2321
2467
|
overflow-y: scroll;
|
|
2322
2468
|
`;
|
|
2323
|
-
var SearchInput =
|
|
2469
|
+
var SearchInput = styled20.input`
|
|
2324
2470
|
position: relative;
|
|
2325
2471
|
width: 100%;
|
|
2326
2472
|
padding: 8px;
|
|
@@ -2335,7 +2481,7 @@ var SearchInput = styled19.input`
|
|
|
2335
2481
|
0 0 10px rgba(24, 49, 75, 0.188);
|
|
2336
2482
|
}
|
|
2337
2483
|
`;
|
|
2338
|
-
var Option =
|
|
2484
|
+
var Option = styled20.div`
|
|
2339
2485
|
padding: 8px;
|
|
2340
2486
|
cursor: pointer;
|
|
2341
2487
|
background-color: ${(props) => props.$isActive ? colors.grey_100 : "transparent"};
|
|
@@ -2359,10 +2505,10 @@ var Select = ({
|
|
|
2359
2505
|
hideSearchBar,
|
|
2360
2506
|
noFlex
|
|
2361
2507
|
}) => {
|
|
2362
|
-
const [isOpen, setIsOpen] =
|
|
2363
|
-
const [searchTerm, setSearchTerm] =
|
|
2364
|
-
const [dropdownPosition, setDropdownPosition] =
|
|
2365
|
-
const [activeIndex, setActiveIndex] =
|
|
2508
|
+
const [isOpen, setIsOpen] = useState7(false);
|
|
2509
|
+
const [searchTerm, setSearchTerm] = useState7("");
|
|
2510
|
+
const [dropdownPosition, setDropdownPosition] = useState7({});
|
|
2511
|
+
const [activeIndex, setActiveIndex] = useState7(0);
|
|
2366
2512
|
const containerRef = useRef5(null);
|
|
2367
2513
|
const dropdownRef = useRef5(null);
|
|
2368
2514
|
const searchInputRef = useRef5(null);
|
|
@@ -2450,14 +2596,14 @@ var Select = ({
|
|
|
2450
2596
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
2451
2597
|
};
|
|
2452
2598
|
}, [isOpen]);
|
|
2453
|
-
return /* @__PURE__ */
|
|
2454
|
-
/* @__PURE__ */
|
|
2599
|
+
return /* @__PURE__ */ jsxs11(StyledContainer, { width, noFlex, label, children: [
|
|
2600
|
+
/* @__PURE__ */ jsxs11(Text, { size: "xs", children: [
|
|
2455
2601
|
label,
|
|
2456
2602
|
" ",
|
|
2457
|
-
required && /* @__PURE__ */
|
|
2603
|
+
required && /* @__PURE__ */ jsx24(Text, { style: { color: "red" }, children: "*" })
|
|
2458
2604
|
] }),
|
|
2459
|
-
/* @__PURE__ */
|
|
2460
|
-
/* @__PURE__ */
|
|
2605
|
+
/* @__PURE__ */ jsxs11(SelectWrapper, { ref: containerRef, onKeyDown: handleKeyDown, tabIndex: 0, children: [
|
|
2606
|
+
/* @__PURE__ */ jsxs11(
|
|
2461
2607
|
SelectInput,
|
|
2462
2608
|
{
|
|
2463
2609
|
height,
|
|
@@ -2466,13 +2612,13 @@ var Select = ({
|
|
|
2466
2612
|
onClick: handleToggle,
|
|
2467
2613
|
disabled,
|
|
2468
2614
|
children: [
|
|
2469
|
-
/* @__PURE__ */
|
|
2470
|
-
/* @__PURE__ */
|
|
2615
|
+
/* @__PURE__ */ jsx24("span", { children: selectedOption ? selectedOption.label : placeholder }),
|
|
2616
|
+
/* @__PURE__ */ jsx24(ChevronIcon, { name: "chevron-down", isOpen })
|
|
2471
2617
|
]
|
|
2472
2618
|
}
|
|
2473
2619
|
),
|
|
2474
2620
|
isOpen && ReactDOM.createPortal(
|
|
2475
|
-
/* @__PURE__ */
|
|
2621
|
+
/* @__PURE__ */ jsxs11(
|
|
2476
2622
|
Dropdown,
|
|
2477
2623
|
{
|
|
2478
2624
|
ref: dropdownRef,
|
|
@@ -2482,7 +2628,7 @@ var Select = ({
|
|
|
2482
2628
|
width: dropdownPosition.width
|
|
2483
2629
|
},
|
|
2484
2630
|
children: [
|
|
2485
|
-
!hideSearchBar && /* @__PURE__ */
|
|
2631
|
+
!hideSearchBar && /* @__PURE__ */ jsx24(
|
|
2486
2632
|
SearchInput,
|
|
2487
2633
|
{
|
|
2488
2634
|
ref: searchInputRef,
|
|
@@ -2492,7 +2638,7 @@ var Select = ({
|
|
|
2492
2638
|
onChange: handleSearch
|
|
2493
2639
|
}
|
|
2494
2640
|
),
|
|
2495
|
-
/* @__PURE__ */
|
|
2641
|
+
/* @__PURE__ */ jsx24(DropdownList, { children: filteredOptions.map((option, index) => /* @__PURE__ */ jsx24(
|
|
2496
2642
|
Option,
|
|
2497
2643
|
{
|
|
2498
2644
|
$isActive: index === activeIndex,
|
|
@@ -2518,10 +2664,10 @@ import {
|
|
|
2518
2664
|
useEffect as useEffect7,
|
|
2519
2665
|
useImperativeHandle,
|
|
2520
2666
|
useRef as useRef6,
|
|
2521
|
-
useState as
|
|
2667
|
+
useState as useState8
|
|
2522
2668
|
} from "react";
|
|
2523
|
-
import
|
|
2524
|
-
import { Fragment as Fragment3, jsx as
|
|
2669
|
+
import styled21 from "styled-components";
|
|
2670
|
+
import { Fragment as Fragment3, jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2525
2671
|
var shouldForwardProp8 = (prop) => ![
|
|
2526
2672
|
"width",
|
|
2527
2673
|
"fullWidth",
|
|
@@ -2534,7 +2680,7 @@ var shouldForwardProp8 = (prop) => ![
|
|
|
2534
2680
|
"asTextArea",
|
|
2535
2681
|
"fontSize"
|
|
2536
2682
|
].includes(prop);
|
|
2537
|
-
var StyledContainer2 =
|
|
2683
|
+
var StyledContainer2 = styled21.div.withConfig({
|
|
2538
2684
|
shouldForwardProp: shouldForwardProp8
|
|
2539
2685
|
})`
|
|
2540
2686
|
display: flex;
|
|
@@ -2544,7 +2690,7 @@ var StyledContainer2 = styled20.div.withConfig({
|
|
|
2544
2690
|
max-width: ${(props) => props.width || "100%"};
|
|
2545
2691
|
gap: 6px;
|
|
2546
2692
|
`;
|
|
2547
|
-
var StyledInput =
|
|
2693
|
+
var StyledInput = styled21.input.withConfig({
|
|
2548
2694
|
shouldForwardProp: shouldForwardProp8
|
|
2549
2695
|
})`
|
|
2550
2696
|
max-width: ${(props) => props.width || "100%"};
|
|
@@ -2572,7 +2718,7 @@ var StyledInput = styled20.input.withConfig({
|
|
|
2572
2718
|
color: ${colors.grey_500};
|
|
2573
2719
|
}
|
|
2574
2720
|
`;
|
|
2575
|
-
var StyledTextarea =
|
|
2721
|
+
var StyledTextarea = styled21.textarea.withConfig({
|
|
2576
2722
|
shouldForwardProp: shouldForwardProp8
|
|
2577
2723
|
})`
|
|
2578
2724
|
max-width: ${(props) => props.width || "100%"};
|
|
@@ -2599,7 +2745,7 @@ var StyledTextarea = styled20.textarea.withConfig({
|
|
|
2599
2745
|
color: ${colors.grey_500};
|
|
2600
2746
|
}
|
|
2601
2747
|
`;
|
|
2602
|
-
var EyeButton =
|
|
2748
|
+
var EyeButton = styled21.button`
|
|
2603
2749
|
background: none;
|
|
2604
2750
|
border: none;
|
|
2605
2751
|
position: absolute;
|
|
@@ -2611,11 +2757,11 @@ var EyeButton = styled20.button`
|
|
|
2611
2757
|
display: flex;
|
|
2612
2758
|
align-items: center;
|
|
2613
2759
|
`;
|
|
2614
|
-
var InputWrapper =
|
|
2760
|
+
var InputWrapper = styled21.div`
|
|
2615
2761
|
position: relative;
|
|
2616
2762
|
width: 100%;
|
|
2617
2763
|
`;
|
|
2618
|
-
var CalendarButton =
|
|
2764
|
+
var CalendarButton = styled21(EyeButton)`
|
|
2619
2765
|
color: ${colors.grey_500};
|
|
2620
2766
|
|
|
2621
2767
|
&:disabled {
|
|
@@ -2623,7 +2769,7 @@ var CalendarButton = styled20(EyeButton)`
|
|
|
2623
2769
|
opacity: 0.5;
|
|
2624
2770
|
}
|
|
2625
2771
|
`;
|
|
2626
|
-
var HiddenDateInput =
|
|
2772
|
+
var HiddenDateInput = styled21.input`
|
|
2627
2773
|
position: absolute;
|
|
2628
2774
|
inset: 0;
|
|
2629
2775
|
opacity: 0;
|
|
@@ -2631,7 +2777,7 @@ var HiddenDateInput = styled20.input`
|
|
|
2631
2777
|
height: 100%;
|
|
2632
2778
|
width: 100%;
|
|
2633
2779
|
`;
|
|
2634
|
-
var SearchIconLeft =
|
|
2780
|
+
var SearchIconLeft = styled21.span`
|
|
2635
2781
|
position: absolute;
|
|
2636
2782
|
left: 10px;
|
|
2637
2783
|
top: 0;
|
|
@@ -2642,7 +2788,7 @@ var SearchIconLeft = styled20.span`
|
|
|
2642
2788
|
pointer-events: none;
|
|
2643
2789
|
z-index: 1;
|
|
2644
2790
|
`;
|
|
2645
|
-
var SearchIconRight =
|
|
2791
|
+
var SearchIconRight = styled21.span`
|
|
2646
2792
|
position: absolute;
|
|
2647
2793
|
right: 10px;
|
|
2648
2794
|
top: 0;
|
|
@@ -2759,8 +2905,8 @@ var Input = forwardRef3((props, ref) => {
|
|
|
2759
2905
|
const inputName = otherProps == null ? void 0 : otherProps.name;
|
|
2760
2906
|
const { min, max, step } = otherProps || {};
|
|
2761
2907
|
const _b = otherProps || {}, { name } = _b, forwardProps = __objRest(_b, ["name"]);
|
|
2762
|
-
const [showPassword, setShowPassword] =
|
|
2763
|
-
const [displayDateValue, setDisplayDateValue] =
|
|
2908
|
+
const [showPassword, setShowPassword] = useState8(false);
|
|
2909
|
+
const [displayDateValue, setDisplayDateValue] = useState8("");
|
|
2764
2910
|
const nativeDateRef = useRef6(null);
|
|
2765
2911
|
const innerRef = useRef6(null);
|
|
2766
2912
|
useImperativeHandle(
|
|
@@ -2847,21 +2993,21 @@ var Input = forwardRef3((props, ref) => {
|
|
|
2847
2993
|
}
|
|
2848
2994
|
}
|
|
2849
2995
|
};
|
|
2850
|
-
return /* @__PURE__ */
|
|
2996
|
+
return /* @__PURE__ */ jsxs12(
|
|
2851
2997
|
StyledContainer2,
|
|
2852
2998
|
__spreadProps(__spreadValues({
|
|
2853
2999
|
noFlex
|
|
2854
3000
|
}, forwardProps), {
|
|
2855
3001
|
children: [
|
|
2856
|
-
label && /* @__PURE__ */
|
|
3002
|
+
label && /* @__PURE__ */ jsxs12(Text_default, { size: "xs", children: [
|
|
2857
3003
|
label,
|
|
2858
3004
|
" ",
|
|
2859
|
-
required && /* @__PURE__ */
|
|
3005
|
+
required && /* @__PURE__ */ jsx25("span", { style: { color: "red" }, children: "*" })
|
|
2860
3006
|
] }),
|
|
2861
|
-
/* @__PURE__ */
|
|
2862
|
-
isSearch && /* @__PURE__ */
|
|
2863
|
-
isDate ? /* @__PURE__ */
|
|
2864
|
-
/* @__PURE__ */
|
|
3007
|
+
/* @__PURE__ */ jsxs12(InputWrapper, { children: [
|
|
3008
|
+
isSearch && /* @__PURE__ */ jsx25(SearchIconLeft, { children: /* @__PURE__ */ jsx25(Icon_default, { name: "magnifying-glass", size: "s", color: "grey_500" }) }),
|
|
3009
|
+
isDate ? /* @__PURE__ */ jsxs12(Fragment3, { children: [
|
|
3010
|
+
/* @__PURE__ */ jsx25(
|
|
2865
3011
|
StyledInput,
|
|
2866
3012
|
__spreadProps(__spreadValues({
|
|
2867
3013
|
id: inputId,
|
|
@@ -2885,7 +3031,7 @@ var Input = forwardRef3((props, ref) => {
|
|
|
2885
3031
|
step: void 0
|
|
2886
3032
|
})
|
|
2887
3033
|
),
|
|
2888
|
-
/* @__PURE__ */
|
|
3034
|
+
/* @__PURE__ */ jsx25(
|
|
2889
3035
|
HiddenDateInput,
|
|
2890
3036
|
{
|
|
2891
3037
|
ref: nativeDateRef,
|
|
@@ -2902,14 +3048,14 @@ var Input = forwardRef3((props, ref) => {
|
|
|
2902
3048
|
name: inputName
|
|
2903
3049
|
}
|
|
2904
3050
|
),
|
|
2905
|
-
/* @__PURE__ */
|
|
3051
|
+
/* @__PURE__ */ jsx25(
|
|
2906
3052
|
CalendarButton,
|
|
2907
3053
|
{
|
|
2908
3054
|
type: "button",
|
|
2909
3055
|
onClick: openNativePicker,
|
|
2910
3056
|
"aria-label": "Ouvrir le calendrier",
|
|
2911
3057
|
disabled,
|
|
2912
|
-
children: /* @__PURE__ */
|
|
3058
|
+
children: /* @__PURE__ */ jsx25(
|
|
2913
3059
|
Icon_default,
|
|
2914
3060
|
{
|
|
2915
3061
|
family: "regular",
|
|
@@ -2920,7 +3066,7 @@ var Input = forwardRef3((props, ref) => {
|
|
|
2920
3066
|
)
|
|
2921
3067
|
}
|
|
2922
3068
|
)
|
|
2923
|
-
] }) : /* @__PURE__ */
|
|
3069
|
+
] }) : /* @__PURE__ */ jsx25(
|
|
2924
3070
|
Component,
|
|
2925
3071
|
__spreadValues({
|
|
2926
3072
|
id: inputId,
|
|
@@ -2936,17 +3082,17 @@ var Input = forwardRef3((props, ref) => {
|
|
|
2936
3082
|
style: computedStyle
|
|
2937
3083
|
}, forwardProps)
|
|
2938
3084
|
),
|
|
2939
|
-
isPassword && /* @__PURE__ */
|
|
3085
|
+
isPassword && /* @__PURE__ */ jsx25(
|
|
2940
3086
|
EyeButton,
|
|
2941
3087
|
{
|
|
2942
3088
|
type: "button",
|
|
2943
3089
|
tabIndex: -1,
|
|
2944
3090
|
onClick: () => setShowPassword((v) => !v),
|
|
2945
3091
|
"aria-label": showPassword ? "Masquer le mot de passe" : "Afficher le mot de passe",
|
|
2946
|
-
children: showPassword ? /* @__PURE__ */
|
|
3092
|
+
children: showPassword ? /* @__PURE__ */ jsx25(Icon_default, { name: "eye-slash", size: "m", color: "grey_500" }) : /* @__PURE__ */ jsx25(Icon_default, { name: "eye", size: "m", color: "grey_500" })
|
|
2947
3093
|
}
|
|
2948
3094
|
),
|
|
2949
|
-
isSearch && hasSearchValue && onClear && /* @__PURE__ */
|
|
3095
|
+
isSearch && hasSearchValue && onClear && /* @__PURE__ */ jsx25(SearchIconRight, { onClick: onClear, children: /* @__PURE__ */ jsx25(Icon_default, { name: "xmark", size: "s", color: "grey_500" }) })
|
|
2950
3096
|
] })
|
|
2951
3097
|
]
|
|
2952
3098
|
})
|
|
@@ -2956,9 +3102,9 @@ Input.displayName = "Input";
|
|
|
2956
3102
|
|
|
2957
3103
|
// src/Components/Checkbox/Checkbox.tsx
|
|
2958
3104
|
import { useId } from "react";
|
|
2959
|
-
import
|
|
2960
|
-
import { jsx as
|
|
2961
|
-
var CheckboxContainer =
|
|
3105
|
+
import styled22 from "styled-components";
|
|
3106
|
+
import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3107
|
+
var CheckboxContainer = styled22.div`
|
|
2962
3108
|
display: flex;
|
|
2963
3109
|
flex-direction: row;
|
|
2964
3110
|
align-items: center;
|
|
@@ -2966,12 +3112,12 @@ var CheckboxContainer = styled21.div`
|
|
|
2966
3112
|
gap: 8px;
|
|
2967
3113
|
margin: ${(props) => props.margin || "0"};
|
|
2968
3114
|
`;
|
|
2969
|
-
var StyledCheckbox =
|
|
3115
|
+
var StyledCheckbox = styled22.input.attrs({ type: "checkbox" })`
|
|
2970
3116
|
width: 14px;
|
|
2971
3117
|
height: 14px;
|
|
2972
3118
|
accent-color: ${(props) => colors[props.$variant || ""] || colors.secondary};
|
|
2973
3119
|
`;
|
|
2974
|
-
var StyledLabel =
|
|
3120
|
+
var StyledLabel = styled22.label`
|
|
2975
3121
|
cursor: ${(props) => props.disabled ? "not-allowed" : "pointer"};
|
|
2976
3122
|
`;
|
|
2977
3123
|
var Checkbox = ({
|
|
@@ -2985,8 +3131,8 @@ var Checkbox = ({
|
|
|
2985
3131
|
}) => {
|
|
2986
3132
|
const generatedId = useId();
|
|
2987
3133
|
const uniqueId = `checkbox-${generatedId}`;
|
|
2988
|
-
return /* @__PURE__ */
|
|
2989
|
-
/* @__PURE__ */
|
|
3134
|
+
return /* @__PURE__ */ jsxs13(CheckboxContainer, { children: [
|
|
3135
|
+
/* @__PURE__ */ jsx26(
|
|
2990
3136
|
StyledCheckbox,
|
|
2991
3137
|
{
|
|
2992
3138
|
id: uniqueId,
|
|
@@ -2996,28 +3142,28 @@ var Checkbox = ({
|
|
|
2996
3142
|
$variant: variant
|
|
2997
3143
|
}
|
|
2998
3144
|
),
|
|
2999
|
-
/* @__PURE__ */
|
|
3145
|
+
/* @__PURE__ */ jsx26(StyledLabel, { htmlFor: uniqueId, disabled, children: /* @__PURE__ */ jsx26(Text_default, { size, children: label || children }) })
|
|
3000
3146
|
] });
|
|
3001
3147
|
};
|
|
3002
3148
|
|
|
3003
3149
|
// src/Components/Radio/Radio.tsx
|
|
3004
3150
|
import { useId as useId2 } from "react";
|
|
3005
|
-
import
|
|
3006
|
-
import { jsx as
|
|
3007
|
-
var RadioContainer =
|
|
3151
|
+
import styled23 from "styled-components";
|
|
3152
|
+
import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3153
|
+
var RadioContainer = styled23.div`
|
|
3008
3154
|
display: flex;
|
|
3009
3155
|
flex-direction: row;
|
|
3010
3156
|
align-items: center;
|
|
3011
3157
|
gap: 8px;
|
|
3012
3158
|
margin: ${(props) => props.margin || "0"};
|
|
3013
3159
|
`;
|
|
3014
|
-
var HiddenRadio =
|
|
3160
|
+
var HiddenRadio = styled23.input.attrs({ type: "radio" })`
|
|
3015
3161
|
opacity: 0;
|
|
3016
3162
|
width: 0;
|
|
3017
3163
|
height: 0;
|
|
3018
3164
|
position: absolute;
|
|
3019
3165
|
`;
|
|
3020
|
-
var CustomRadio =
|
|
3166
|
+
var CustomRadio = styled23.span`
|
|
3021
3167
|
display: inline-block;
|
|
3022
3168
|
vertical-align: middle;
|
|
3023
3169
|
width: 22px;
|
|
@@ -3043,7 +3189,7 @@ var CustomRadio = styled22.span`
|
|
|
3043
3189
|
transform: translate(-50%, -50%);
|
|
3044
3190
|
}
|
|
3045
3191
|
`;
|
|
3046
|
-
var StyledLabel2 =
|
|
3192
|
+
var StyledLabel2 = styled23.label`
|
|
3047
3193
|
cursor: ${(props) => props.disabled ? "not-allowed" : "pointer"};
|
|
3048
3194
|
`;
|
|
3049
3195
|
var Radio = ({
|
|
@@ -3060,8 +3206,8 @@ var Radio = ({
|
|
|
3060
3206
|
const color = colors[variant] || colors.blue_950;
|
|
3061
3207
|
const generatedId = useId2();
|
|
3062
3208
|
const uniqueId = `radio-${generatedId}`;
|
|
3063
|
-
return /* @__PURE__ */
|
|
3064
|
-
/* @__PURE__ */
|
|
3209
|
+
return /* @__PURE__ */ jsx27(RadioContainer, { children: /* @__PURE__ */ jsxs14(StyledLabel2, { htmlFor: uniqueId, disabled, children: [
|
|
3210
|
+
/* @__PURE__ */ jsx27(
|
|
3065
3211
|
HiddenRadio,
|
|
3066
3212
|
{
|
|
3067
3213
|
id: uniqueId,
|
|
@@ -3072,21 +3218,21 @@ var Radio = ({
|
|
|
3072
3218
|
value
|
|
3073
3219
|
}
|
|
3074
3220
|
),
|
|
3075
|
-
/* @__PURE__ */
|
|
3076
|
-
/* @__PURE__ */
|
|
3221
|
+
/* @__PURE__ */ jsx27(CustomRadio, { color, checked, disabled }),
|
|
3222
|
+
/* @__PURE__ */ jsx27(Text_default, { size, children: label || children })
|
|
3077
3223
|
] }) });
|
|
3078
3224
|
};
|
|
3079
3225
|
|
|
3080
3226
|
// src/Components/Accordion/Accordion.tsx
|
|
3081
|
-
import { useState as
|
|
3082
|
-
import
|
|
3083
|
-
import { jsx as
|
|
3084
|
-
var Wrapper4 =
|
|
3227
|
+
import { useState as useState9, useCallback as useCallback3 } from "react";
|
|
3228
|
+
import styled24 from "styled-components";
|
|
3229
|
+
import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3230
|
+
var Wrapper4 = styled24.div`
|
|
3085
3231
|
width: 100%;
|
|
3086
3232
|
border-radius: 8px;
|
|
3087
3233
|
overflow: hidden;
|
|
3088
3234
|
`;
|
|
3089
|
-
var ItemWrapper =
|
|
3235
|
+
var ItemWrapper = styled24.div`
|
|
3090
3236
|
width: 100%;
|
|
3091
3237
|
border-bottom: 1px solid ${colors.grey_300};
|
|
3092
3238
|
background-color: ${colors.white};
|
|
@@ -3097,7 +3243,7 @@ var ItemWrapper = styled23.div`
|
|
|
3097
3243
|
border-bottom: none;
|
|
3098
3244
|
}
|
|
3099
3245
|
`;
|
|
3100
|
-
var Header =
|
|
3246
|
+
var Header = styled24.div`
|
|
3101
3247
|
display: flex;
|
|
3102
3248
|
align-items: center;
|
|
3103
3249
|
justify-content: space-between;
|
|
@@ -3111,13 +3257,13 @@ var Header = styled23.div`
|
|
|
3111
3257
|
background-color: ${(p) => p.$disabled ? "transparent" : colors.grey_100};
|
|
3112
3258
|
}
|
|
3113
3259
|
`;
|
|
3114
|
-
var TriggerRow =
|
|
3260
|
+
var TriggerRow = styled24.div`
|
|
3115
3261
|
display: flex;
|
|
3116
3262
|
align-items: center;
|
|
3117
3263
|
gap: 8px;
|
|
3118
3264
|
flex: 1;
|
|
3119
3265
|
`;
|
|
3120
|
-
var ContentPadding =
|
|
3266
|
+
var ContentPadding = styled24.div`
|
|
3121
3267
|
padding: 8px;
|
|
3122
3268
|
`;
|
|
3123
3269
|
var Accordion = ({
|
|
@@ -3139,8 +3285,8 @@ var Accordion = ({
|
|
|
3139
3285
|
backgroundHeader = colors.white
|
|
3140
3286
|
}) => {
|
|
3141
3287
|
const resolvedBackgroundHeader = typeof backgroundHeader === "string" && backgroundHeader in colors ? colors[backgroundHeader] : backgroundHeader;
|
|
3142
|
-
const [internalOpen, setInternalOpen] =
|
|
3143
|
-
const [internalOpenId, setInternalOpenId] =
|
|
3288
|
+
const [internalOpen, setInternalOpen] = useState9(defaultOpen);
|
|
3289
|
+
const [internalOpenId, setInternalOpenId] = useState9(
|
|
3144
3290
|
null
|
|
3145
3291
|
);
|
|
3146
3292
|
const isControlled = controlledOpen !== void 0;
|
|
@@ -3168,8 +3314,8 @@ var Accordion = ({
|
|
|
3168
3314
|
[disabled, activeItemId, isMultiControlled, onItemToggle]
|
|
3169
3315
|
);
|
|
3170
3316
|
if (items) {
|
|
3171
|
-
return /* @__PURE__ */
|
|
3172
|
-
/* @__PURE__ */
|
|
3317
|
+
return /* @__PURE__ */ jsx28(Wrapper4, { children: items.map((item) => /* @__PURE__ */ jsxs15(ItemWrapper, { $bordered: bordered, children: [
|
|
3318
|
+
/* @__PURE__ */ jsxs15(
|
|
3173
3319
|
Header,
|
|
3174
3320
|
{
|
|
3175
3321
|
$disabled: disabled,
|
|
@@ -3178,9 +3324,9 @@ var Accordion = ({
|
|
|
3178
3324
|
"aria-expanded": activeItemId === item.id,
|
|
3179
3325
|
onClick: () => toggleItem(item.id),
|
|
3180
3326
|
children: [
|
|
3181
|
-
/* @__PURE__ */
|
|
3327
|
+
/* @__PURE__ */ jsx28(TriggerRow, { children: /* @__PURE__ */ jsx28(Text, { size: "s", weight: "600", children: item.title }) }),
|
|
3182
3328
|
titleEnd,
|
|
3183
|
-
/* @__PURE__ */
|
|
3329
|
+
/* @__PURE__ */ jsx28(
|
|
3184
3330
|
Icon,
|
|
3185
3331
|
{
|
|
3186
3332
|
name: activeItemId === item.id ? "chevron-up" : "chevron-down",
|
|
@@ -3190,11 +3336,11 @@ var Accordion = ({
|
|
|
3190
3336
|
]
|
|
3191
3337
|
}
|
|
3192
3338
|
),
|
|
3193
|
-
/* @__PURE__ */
|
|
3339
|
+
/* @__PURE__ */ jsx28(Collapse, { open: activeItemId === item.id, maxHeight, children: /* @__PURE__ */ jsx28(ContentPadding, { children: item.content }) })
|
|
3194
3340
|
] }, item.id)) });
|
|
3195
3341
|
}
|
|
3196
|
-
return /* @__PURE__ */
|
|
3197
|
-
/* @__PURE__ */
|
|
3342
|
+
return /* @__PURE__ */ jsxs15(ItemWrapper, { $bordered: bordered, children: [
|
|
3343
|
+
/* @__PURE__ */ jsxs15(
|
|
3198
3344
|
Header,
|
|
3199
3345
|
{
|
|
3200
3346
|
$disabled: disabled,
|
|
@@ -3203,7 +3349,7 @@ var Accordion = ({
|
|
|
3203
3349
|
"aria-expanded": isOpen,
|
|
3204
3350
|
onClick: handleToggle,
|
|
3205
3351
|
children: [
|
|
3206
|
-
needCheckbox && /* @__PURE__ */
|
|
3352
|
+
needCheckbox && /* @__PURE__ */ jsx28(
|
|
3207
3353
|
Checkbox,
|
|
3208
3354
|
{
|
|
3209
3355
|
value: checkboxValue,
|
|
@@ -3211,46 +3357,46 @@ var Accordion = ({
|
|
|
3211
3357
|
disabled
|
|
3212
3358
|
}
|
|
3213
3359
|
),
|
|
3214
|
-
/* @__PURE__ */
|
|
3360
|
+
/* @__PURE__ */ jsx28(TriggerRow, { children: /* @__PURE__ */ jsx28(Text, { size: "s", weight: "600", children: title }) }),
|
|
3215
3361
|
titleEnd,
|
|
3216
|
-
/* @__PURE__ */
|
|
3362
|
+
/* @__PURE__ */ jsx28(Icon, { name: isOpen ? "chevron-up" : "chevron-down", size: "m" })
|
|
3217
3363
|
]
|
|
3218
3364
|
}
|
|
3219
3365
|
),
|
|
3220
|
-
/* @__PURE__ */
|
|
3366
|
+
/* @__PURE__ */ jsx28(Collapse, { open: isOpen, maxHeight, children: /* @__PURE__ */ jsx28(ContentPadding, { children }) })
|
|
3221
3367
|
] });
|
|
3222
3368
|
};
|
|
3223
3369
|
|
|
3224
3370
|
// src/Components/ColorPicker/ColorPicker.tsx
|
|
3225
|
-
import { forwardRef as forwardRef4, useState as
|
|
3226
|
-
import
|
|
3227
|
-
import { jsx as
|
|
3371
|
+
import { forwardRef as forwardRef4, useState as useState10, useRef as useRef7, useEffect as useEffect8 } from "react";
|
|
3372
|
+
import styled25 from "styled-components";
|
|
3373
|
+
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3228
3374
|
var SIZES = {
|
|
3229
3375
|
s: { swatch: 28, fontSize: 12, inputPadding: "6px 10px" },
|
|
3230
3376
|
m: { swatch: 36, fontSize: 14, inputPadding: "8px 12px" },
|
|
3231
3377
|
l: { swatch: 44, fontSize: 16, inputPadding: "10px 14px" }
|
|
3232
3378
|
};
|
|
3233
|
-
var Container2 =
|
|
3379
|
+
var Container2 = styled25.div`
|
|
3234
3380
|
display: flex;
|
|
3235
3381
|
flex-direction: column;
|
|
3236
3382
|
gap: 6px;
|
|
3237
3383
|
width: 100%;
|
|
3238
3384
|
opacity: ${(p) => p.$disabled ? 0.6 : 1};
|
|
3239
3385
|
`;
|
|
3240
|
-
var InputRow =
|
|
3386
|
+
var InputRow = styled25.div`
|
|
3241
3387
|
display: flex;
|
|
3242
3388
|
align-items: stretch;
|
|
3243
3389
|
gap: 8px;
|
|
3244
3390
|
width: 100%;
|
|
3245
3391
|
`;
|
|
3246
|
-
var SwatchLabel =
|
|
3392
|
+
var SwatchLabel = styled25.label`
|
|
3247
3393
|
display: inline-flex;
|
|
3248
3394
|
cursor: ${(p) => p.$disabled ? "not-allowed" : "pointer"};
|
|
3249
3395
|
width: ${(p) => p.$size}px;
|
|
3250
3396
|
height: ${(p) => p.$size}px;
|
|
3251
3397
|
flex-shrink: 0;
|
|
3252
3398
|
`;
|
|
3253
|
-
var Swatch =
|
|
3399
|
+
var Swatch = styled25.span`
|
|
3254
3400
|
display: inline-block;
|
|
3255
3401
|
width: 100%;
|
|
3256
3402
|
height: 100%;
|
|
@@ -3260,7 +3406,7 @@ var Swatch = styled24.span`
|
|
|
3260
3406
|
position: relative;
|
|
3261
3407
|
overflow: hidden;
|
|
3262
3408
|
`;
|
|
3263
|
-
var HiddenInput =
|
|
3409
|
+
var HiddenInput = styled25.input`
|
|
3264
3410
|
position: absolute;
|
|
3265
3411
|
top: 0;
|
|
3266
3412
|
left: 0;
|
|
@@ -3271,7 +3417,7 @@ var HiddenInput = styled24.input`
|
|
|
3271
3417
|
border: none;
|
|
3272
3418
|
padding: 0;
|
|
3273
3419
|
`;
|
|
3274
|
-
var HexInput =
|
|
3420
|
+
var HexInput = styled25.input`
|
|
3275
3421
|
flex: 1;
|
|
3276
3422
|
font-family: inherit;
|
|
3277
3423
|
font-size: ${(p) => p.$fontSize}px;
|
|
@@ -3309,7 +3455,7 @@ var ColorPicker = forwardRef4(
|
|
|
3309
3455
|
size = "m"
|
|
3310
3456
|
}, ref) => {
|
|
3311
3457
|
const innerRef = useRef7(null);
|
|
3312
|
-
const [internalColor, setInternalColor] =
|
|
3458
|
+
const [internalColor, setInternalColor] = useState10(defaultValue);
|
|
3313
3459
|
const currentColor = value !== void 0 ? value : internalColor;
|
|
3314
3460
|
const dims = SIZES[size];
|
|
3315
3461
|
useEffect8(() => {
|
|
@@ -3327,10 +3473,10 @@ var ColorPicker = forwardRef4(
|
|
|
3327
3473
|
}
|
|
3328
3474
|
onChange == null ? void 0 : onChange(newColor);
|
|
3329
3475
|
};
|
|
3330
|
-
return /* @__PURE__ */
|
|
3331
|
-
label && /* @__PURE__ */
|
|
3332
|
-
/* @__PURE__ */
|
|
3333
|
-
/* @__PURE__ */
|
|
3476
|
+
return /* @__PURE__ */ jsxs16(Container2, { $disabled: disabled, children: [
|
|
3477
|
+
label && /* @__PURE__ */ jsx29(Text, { size: TEXT_SIZE_MAP[size], weight: "600", children: label }),
|
|
3478
|
+
/* @__PURE__ */ jsxs16(InputRow, { children: [
|
|
3479
|
+
/* @__PURE__ */ jsx29(SwatchLabel, { $disabled: disabled, $size: dims.swatch, children: /* @__PURE__ */ jsx29(Swatch, { $color: currentColor, children: /* @__PURE__ */ jsx29(
|
|
3334
3480
|
HiddenInput,
|
|
3335
3481
|
{
|
|
3336
3482
|
ref: innerRef,
|
|
@@ -3340,7 +3486,7 @@ var ColorPicker = forwardRef4(
|
|
|
3340
3486
|
disabled
|
|
3341
3487
|
}
|
|
3342
3488
|
) }) }),
|
|
3343
|
-
/* @__PURE__ */
|
|
3489
|
+
/* @__PURE__ */ jsx29(
|
|
3344
3490
|
HexInput,
|
|
3345
3491
|
{
|
|
3346
3492
|
type: "text",
|
|
@@ -3359,9 +3505,9 @@ ColorPicker.displayName = "ColorPicker";
|
|
|
3359
3505
|
|
|
3360
3506
|
// src/Components/SliderInput/SliderInput.tsx
|
|
3361
3507
|
import { forwardRef as forwardRef5 } from "react";
|
|
3362
|
-
import
|
|
3363
|
-
import { jsx as
|
|
3364
|
-
var Container3 =
|
|
3508
|
+
import styled26 from "styled-components";
|
|
3509
|
+
import { jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3510
|
+
var Container3 = styled26.label`
|
|
3365
3511
|
display: flex;
|
|
3366
3512
|
flex-direction: column;
|
|
3367
3513
|
gap: 4px;
|
|
@@ -3380,19 +3526,19 @@ var THUMB = `
|
|
|
3380
3526
|
cursor: inherit;
|
|
3381
3527
|
transition: transform 160ms ease;
|
|
3382
3528
|
`;
|
|
3383
|
-
var TrackWrapper =
|
|
3529
|
+
var TrackWrapper = styled26.span`
|
|
3384
3530
|
position: relative;
|
|
3385
3531
|
width: 100%;
|
|
3386
3532
|
padding-top: 24px;
|
|
3387
3533
|
`;
|
|
3388
|
-
var ValueBubble =
|
|
3534
|
+
var ValueBubble = styled26.span`
|
|
3389
3535
|
position: absolute;
|
|
3390
3536
|
top: 0;
|
|
3391
3537
|
left: ${(p) => p.$left}%;
|
|
3392
3538
|
transform: translateX(-50%);
|
|
3393
3539
|
pointer-events: none;
|
|
3394
3540
|
`;
|
|
3395
|
-
var TrackInput =
|
|
3541
|
+
var TrackInput = styled26.input`
|
|
3396
3542
|
-webkit-appearance: none;
|
|
3397
3543
|
appearance: none;
|
|
3398
3544
|
width: 100%;
|
|
@@ -3435,7 +3581,7 @@ var TrackInput = styled25.input`
|
|
|
3435
3581
|
outline-offset: 2px;
|
|
3436
3582
|
}
|
|
3437
3583
|
`;
|
|
3438
|
-
var MinMaxRow =
|
|
3584
|
+
var MinMaxRow = styled26.span`
|
|
3439
3585
|
display: flex;
|
|
3440
3586
|
justify-content: space-between;
|
|
3441
3587
|
align-items: center;
|
|
@@ -3459,11 +3605,11 @@ var SliderInput = forwardRef5(
|
|
|
3459
3605
|
const handleChange = (e) => {
|
|
3460
3606
|
onChange == null ? void 0 : onChange(Number(e.target.value), e);
|
|
3461
3607
|
};
|
|
3462
|
-
return /* @__PURE__ */
|
|
3463
|
-
label && /* @__PURE__ */
|
|
3464
|
-
/* @__PURE__ */
|
|
3465
|
-
showValue && /* @__PURE__ */
|
|
3466
|
-
/* @__PURE__ */
|
|
3608
|
+
return /* @__PURE__ */ jsxs17(Container3, { $disabled: disabled, htmlFor: id, children: [
|
|
3609
|
+
label && /* @__PURE__ */ jsx30(Text, { size: "xs", color: "grey_600", children: label }),
|
|
3610
|
+
/* @__PURE__ */ jsxs17(TrackWrapper, { children: [
|
|
3611
|
+
showValue && /* @__PURE__ */ jsx30(ValueBubble, { $left: progress, children: /* @__PURE__ */ jsx30(Text, { size: "xs", weight: "600", children: display(current) }) }),
|
|
3612
|
+
/* @__PURE__ */ jsx30(
|
|
3467
3613
|
TrackInput,
|
|
3468
3614
|
{
|
|
3469
3615
|
id,
|
|
@@ -3479,9 +3625,9 @@ var SliderInput = forwardRef5(
|
|
|
3479
3625
|
}
|
|
3480
3626
|
)
|
|
3481
3627
|
] }),
|
|
3482
|
-
showValue && /* @__PURE__ */
|
|
3483
|
-
/* @__PURE__ */
|
|
3484
|
-
/* @__PURE__ */
|
|
3628
|
+
showValue && /* @__PURE__ */ jsxs17(MinMaxRow, { children: [
|
|
3629
|
+
/* @__PURE__ */ jsx30(Text, { size: "xs", color: "grey_600", children: display(min) }),
|
|
3630
|
+
/* @__PURE__ */ jsx30(Text, { size: "xs", color: "grey_600", children: display(max) })
|
|
3485
3631
|
] })
|
|
3486
3632
|
] });
|
|
3487
3633
|
}
|
|
@@ -3489,8 +3635,8 @@ var SliderInput = forwardRef5(
|
|
|
3489
3635
|
SliderInput.displayName = "SliderInput";
|
|
3490
3636
|
|
|
3491
3637
|
// src/Components/List/List.tsx
|
|
3492
|
-
import
|
|
3493
|
-
import { jsx as
|
|
3638
|
+
import styled27 from "styled-components";
|
|
3639
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3494
3640
|
var shouldForwardProp9 = (prop) => ![
|
|
3495
3641
|
"width",
|
|
3496
3642
|
"height",
|
|
@@ -3502,7 +3648,7 @@ var shouldForwardProp9 = (prop) => ![
|
|
|
3502
3648
|
"justifyContent",
|
|
3503
3649
|
"isScrollable"
|
|
3504
3650
|
].includes(prop);
|
|
3505
|
-
var StyledList =
|
|
3651
|
+
var StyledList = styled27.div.withConfig({
|
|
3506
3652
|
shouldForwardProp: shouldForwardProp9
|
|
3507
3653
|
})`
|
|
3508
3654
|
display: flex;
|
|
@@ -3519,7 +3665,7 @@ var StyledList = styled26.div.withConfig({
|
|
|
3519
3665
|
`;
|
|
3520
3666
|
var List = (props) => {
|
|
3521
3667
|
const _a = props, { children, onClick } = _a, rest = __objRest(_a, ["children", "onClick"]);
|
|
3522
|
-
return /* @__PURE__ */
|
|
3668
|
+
return /* @__PURE__ */ jsx31(
|
|
3523
3669
|
StyledList,
|
|
3524
3670
|
__spreadProps(__spreadValues({
|
|
3525
3671
|
onClick
|
|
@@ -3530,8 +3676,8 @@ var List = (props) => {
|
|
|
3530
3676
|
};
|
|
3531
3677
|
|
|
3532
3678
|
// src/Components/List/ListItem/ListItem.tsx
|
|
3533
|
-
import
|
|
3534
|
-
import { jsx as
|
|
3679
|
+
import styled28 from "styled-components";
|
|
3680
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3535
3681
|
var shouldForwardProp10 = (prop) => ![
|
|
3536
3682
|
"width",
|
|
3537
3683
|
"height",
|
|
@@ -3543,7 +3689,7 @@ var shouldForwardProp10 = (prop) => ![
|
|
|
3543
3689
|
"justifyContent",
|
|
3544
3690
|
"isScrollable"
|
|
3545
3691
|
].includes(prop);
|
|
3546
|
-
var StyledListItem =
|
|
3692
|
+
var StyledListItem = styled28.div.withConfig({
|
|
3547
3693
|
shouldForwardProp: shouldForwardProp10
|
|
3548
3694
|
})`
|
|
3549
3695
|
display: flex;
|
|
@@ -3564,7 +3710,7 @@ var StyledListItem = styled27.div.withConfig({
|
|
|
3564
3710
|
`;
|
|
3565
3711
|
var ListItem = (props) => {
|
|
3566
3712
|
const _a = props, { children, onClick } = _a, rest = __objRest(_a, ["children", "onClick"]);
|
|
3567
|
-
return /* @__PURE__ */
|
|
3713
|
+
return /* @__PURE__ */ jsx32(
|
|
3568
3714
|
StyledListItem,
|
|
3569
3715
|
__spreadProps(__spreadValues({
|
|
3570
3716
|
onClick
|
|
@@ -3576,8 +3722,8 @@ var ListItem = (props) => {
|
|
|
3576
3722
|
|
|
3577
3723
|
// src/Components/Table/Table.tsx
|
|
3578
3724
|
import { forwardRef as forwardRef6 } from "react";
|
|
3579
|
-
import
|
|
3580
|
-
import { jsx as
|
|
3725
|
+
import styled29 from "styled-components";
|
|
3726
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
3581
3727
|
var shouldForwardPropTable = (prop) => ![
|
|
3582
3728
|
"backgroundColor",
|
|
3583
3729
|
"height",
|
|
@@ -3586,7 +3732,7 @@ var shouldForwardPropTable = (prop) => ![
|
|
|
3586
3732
|
"borderRadius",
|
|
3587
3733
|
"hasShadow"
|
|
3588
3734
|
].includes(prop);
|
|
3589
|
-
var StyledTable =
|
|
3735
|
+
var StyledTable = styled29.div.withConfig({
|
|
3590
3736
|
shouldForwardProp: shouldForwardPropTable
|
|
3591
3737
|
})`
|
|
3592
3738
|
display: table;
|
|
@@ -3598,7 +3744,7 @@ var StyledTable = styled28.div.withConfig({
|
|
|
3598
3744
|
color: white;
|
|
3599
3745
|
z-index: 1;
|
|
3600
3746
|
`;
|
|
3601
|
-
var StyledContainer3 =
|
|
3747
|
+
var StyledContainer3 = styled29.div.withConfig({
|
|
3602
3748
|
shouldForwardProp: shouldForwardPropTable
|
|
3603
3749
|
})`
|
|
3604
3750
|
width: ${(props) => props.fullWidth === false ? "auto" : "100%"};
|
|
@@ -3614,15 +3760,15 @@ var StyledContainer3 = styled28.div.withConfig({
|
|
|
3614
3760
|
var Table = forwardRef6((props, ref) => {
|
|
3615
3761
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3616
3762
|
const safeChildren = children;
|
|
3617
|
-
return /* @__PURE__ */
|
|
3763
|
+
return /* @__PURE__ */ jsx33(StyledContainer3, __spreadProps(__spreadValues({}, otherProps), { ref, children: /* @__PURE__ */ jsx33(StyledTable, __spreadProps(__spreadValues({}, otherProps), { children: safeChildren })) }));
|
|
3618
3764
|
});
|
|
3619
3765
|
Table.displayName = "Table";
|
|
3620
3766
|
|
|
3621
3767
|
// src/Components/Table/TableHeader/TableHeader.tsx
|
|
3622
|
-
import
|
|
3623
|
-
import { jsx as
|
|
3768
|
+
import styled30 from "styled-components";
|
|
3769
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3624
3770
|
var shouldForwardPropTableHeader = (prop) => !["backgroundColor"].includes(prop);
|
|
3625
|
-
var StyledTableHeader =
|
|
3771
|
+
var StyledTableHeader = styled30.div.withConfig({
|
|
3626
3772
|
shouldForwardProp: shouldForwardPropTableHeader
|
|
3627
3773
|
})`
|
|
3628
3774
|
display: table;
|
|
@@ -3637,17 +3783,17 @@ var StyledTableHeader = styled29.div.withConfig({
|
|
|
3637
3783
|
`;
|
|
3638
3784
|
var TableHeader = (props) => {
|
|
3639
3785
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3640
|
-
return /* @__PURE__ */
|
|
3786
|
+
return /* @__PURE__ */ jsx34(StyledTableHeader, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
3641
3787
|
};
|
|
3642
3788
|
|
|
3643
3789
|
// src/Components/Table/TableBody/TableBody.tsx
|
|
3644
3790
|
import { forwardRef as forwardRef7 } from "react";
|
|
3645
|
-
import
|
|
3646
|
-
import { jsx as
|
|
3791
|
+
import styled31 from "styled-components";
|
|
3792
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
3647
3793
|
var shouldForwardPropTableBody = (prop) => !["backgroundColor", "useEvenBackground", "fixedHeight", "color"].includes(
|
|
3648
3794
|
prop
|
|
3649
3795
|
);
|
|
3650
|
-
var StyledTableBody =
|
|
3796
|
+
var StyledTableBody = styled31.div.withConfig({
|
|
3651
3797
|
shouldForwardProp: shouldForwardPropTableBody
|
|
3652
3798
|
})`
|
|
3653
3799
|
display: block;
|
|
@@ -3664,14 +3810,14 @@ var TableBody = forwardRef7(
|
|
|
3664
3810
|
(props, ref) => {
|
|
3665
3811
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3666
3812
|
const safeChildren = children;
|
|
3667
|
-
return /* @__PURE__ */
|
|
3813
|
+
return /* @__PURE__ */ jsx35(StyledTableBody, __spreadProps(__spreadValues({ ref }, otherProps), { children: safeChildren }));
|
|
3668
3814
|
}
|
|
3669
3815
|
);
|
|
3670
3816
|
TableBody.displayName = "TableBody";
|
|
3671
3817
|
|
|
3672
3818
|
// src/Components/Table/TableRow/TableRow.tsx
|
|
3673
|
-
import
|
|
3674
|
-
import { jsx as
|
|
3819
|
+
import styled32 from "styled-components";
|
|
3820
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3675
3821
|
var shouldForwardPropTableRow = (prop) => ![
|
|
3676
3822
|
"backgroundColor",
|
|
3677
3823
|
"borderTop",
|
|
@@ -3679,7 +3825,7 @@ var shouldForwardPropTableRow = (prop) => ![
|
|
|
3679
3825
|
"isClickable",
|
|
3680
3826
|
"hoverable"
|
|
3681
3827
|
].includes(prop);
|
|
3682
|
-
var StyledTableRow =
|
|
3828
|
+
var StyledTableRow = styled32.div.withConfig({
|
|
3683
3829
|
shouldForwardProp: shouldForwardPropTableRow
|
|
3684
3830
|
})`
|
|
3685
3831
|
display: flex;
|
|
@@ -3697,12 +3843,12 @@ var StyledTableRow = styled31.div.withConfig({
|
|
|
3697
3843
|
`;
|
|
3698
3844
|
var TableRow = (props) => {
|
|
3699
3845
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3700
|
-
return /* @__PURE__ */
|
|
3846
|
+
return /* @__PURE__ */ jsx36(StyledTableRow, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
3701
3847
|
};
|
|
3702
3848
|
|
|
3703
3849
|
// src/Components/Table/TableCell/TableCell.tsx
|
|
3704
|
-
import
|
|
3705
|
-
import { jsx as
|
|
3850
|
+
import styled33 from "styled-components";
|
|
3851
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3706
3852
|
var shouldForwardPropTableCell = (prop) => ![
|
|
3707
3853
|
"backgroundColor",
|
|
3708
3854
|
"flexGrow",
|
|
@@ -3712,7 +3858,7 @@ var shouldForwardPropTableCell = (prop) => ![
|
|
|
3712
3858
|
"colSpan",
|
|
3713
3859
|
"padding"
|
|
3714
3860
|
].includes(prop);
|
|
3715
|
-
var StyledTableCell =
|
|
3861
|
+
var StyledTableCell = styled33.div.withConfig({
|
|
3716
3862
|
shouldForwardProp: shouldForwardPropTableCell
|
|
3717
3863
|
})`
|
|
3718
3864
|
flex-grow: ${(props) => props.flexGrow || "1"};
|
|
@@ -3731,13 +3877,13 @@ var StyledTableCell = styled32.div.withConfig({
|
|
|
3731
3877
|
`;
|
|
3732
3878
|
var TableCell = (props) => {
|
|
3733
3879
|
const _a = props, { centerContent, children } = _a, otherProps = __objRest(_a, ["centerContent", "children"]);
|
|
3734
|
-
return /* @__PURE__ */
|
|
3880
|
+
return /* @__PURE__ */ jsx37(StyledTableCell, __spreadProps(__spreadValues({}, otherProps), { children: centerContent ? /* @__PURE__ */ jsx37("div", { style: { display: "flex", justifyContent: "center" }, children }) : children }));
|
|
3735
3881
|
};
|
|
3736
3882
|
|
|
3737
3883
|
// src/Components/Table/TableHeaderCell/TableHeaderCell.tsx
|
|
3738
|
-
import { useState as
|
|
3739
|
-
import
|
|
3740
|
-
import { jsx as
|
|
3884
|
+
import { useState as useState11 } from "react";
|
|
3885
|
+
import styled34 from "styled-components";
|
|
3886
|
+
import { jsx as jsx38, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3741
3887
|
var shouldForwardPropTableHeaderCell = (prop) => ![
|
|
3742
3888
|
"useSort",
|
|
3743
3889
|
"isSort",
|
|
@@ -3746,7 +3892,7 @@ var shouldForwardPropTableHeaderCell = (prop) => ![
|
|
|
3746
3892
|
"width",
|
|
3747
3893
|
"borderLeft"
|
|
3748
3894
|
].includes(prop);
|
|
3749
|
-
var StyledTableHeaderCell =
|
|
3895
|
+
var StyledTableHeaderCell = styled34.div.withConfig({
|
|
3750
3896
|
shouldForwardProp: shouldForwardPropTableHeaderCell
|
|
3751
3897
|
})`
|
|
3752
3898
|
flex-grow: ${(props) => props.flexGrow || "1"};
|
|
@@ -3764,13 +3910,13 @@ var StyledTableHeaderCell = styled33.div.withConfig({
|
|
|
3764
3910
|
min-width: ${(props) => props.width || "auto"};
|
|
3765
3911
|
${(props) => props.borderLeft ? `border-left: ${props.borderLeft};` : ""}
|
|
3766
3912
|
`;
|
|
3767
|
-
var SortingButton =
|
|
3913
|
+
var SortingButton = styled34.span`
|
|
3768
3914
|
display: inline-flex;
|
|
3769
3915
|
align-items: center;
|
|
3770
3916
|
gap: 8px;
|
|
3771
3917
|
cursor: pointer;
|
|
3772
3918
|
`;
|
|
3773
|
-
var SortArrow =
|
|
3919
|
+
var SortArrow = styled34.span`
|
|
3774
3920
|
font-style: normal;
|
|
3775
3921
|
font-size: 0.9em;
|
|
3776
3922
|
line-height: 1;
|
|
@@ -3779,11 +3925,11 @@ var SortArrow = styled33.span`
|
|
|
3779
3925
|
`;
|
|
3780
3926
|
var TableHeaderCell = (props) => {
|
|
3781
3927
|
const _a = props, { children, useSort, isSort, sortOrder } = _a, otherProps = __objRest(_a, ["children", "useSort", "isSort", "sortOrder"]);
|
|
3782
|
-
const [hovered, setHovered] =
|
|
3928
|
+
const [hovered, setHovered] = useState11(false);
|
|
3783
3929
|
const showArrow = useSort && (isSort || hovered);
|
|
3784
3930
|
const arrowChar = isSort && sortOrder === "asc" ? "\u2191" : "\u2193";
|
|
3785
3931
|
const arrowOpacity = isSort ? 1 : 0.35;
|
|
3786
|
-
return /* @__PURE__ */
|
|
3932
|
+
return /* @__PURE__ */ jsx38(
|
|
3787
3933
|
StyledTableHeaderCell,
|
|
3788
3934
|
__spreadProps(__spreadValues({}, otherProps), {
|
|
3789
3935
|
useSort,
|
|
@@ -3798,19 +3944,19 @@ var TableHeaderCell = (props) => {
|
|
|
3798
3944
|
if (useSort) setHovered(false);
|
|
3799
3945
|
(_a2 = otherProps.onMouseLeave) == null ? void 0 : _a2.call(otherProps, e);
|
|
3800
3946
|
},
|
|
3801
|
-
children: useSort ? /* @__PURE__ */
|
|
3947
|
+
children: useSort ? /* @__PURE__ */ jsxs18(SortingButton, { children: [
|
|
3802
3948
|
children,
|
|
3803
|
-
showArrow && /* @__PURE__ */
|
|
3949
|
+
showArrow && /* @__PURE__ */ jsx38(SortArrow, { $opacity: arrowOpacity, children: arrowChar })
|
|
3804
3950
|
] }) : children
|
|
3805
3951
|
})
|
|
3806
3952
|
);
|
|
3807
3953
|
};
|
|
3808
3954
|
|
|
3809
3955
|
// src/Components/Table/TableHeaderRow/TableHeaderRow.tsx
|
|
3810
|
-
import
|
|
3811
|
-
import { jsx as
|
|
3956
|
+
import styled35 from "styled-components";
|
|
3957
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3812
3958
|
var shouldForwardPropTableHeaderRow = (prop) => !["backgroundColor"].includes(prop);
|
|
3813
|
-
var StyledTableHeaderRow =
|
|
3959
|
+
var StyledTableHeaderRow = styled35.div.withConfig({
|
|
3814
3960
|
shouldForwardProp: shouldForwardPropTableHeaderRow
|
|
3815
3961
|
})`
|
|
3816
3962
|
display: flex;
|
|
@@ -3820,14 +3966,14 @@ var StyledTableHeaderRow = styled34.div.withConfig({
|
|
|
3820
3966
|
`;
|
|
3821
3967
|
var TableHeaderRow = (props) => {
|
|
3822
3968
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3823
|
-
return /* @__PURE__ */
|
|
3969
|
+
return /* @__PURE__ */ jsx39(StyledTableHeaderRow, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
3824
3970
|
};
|
|
3825
3971
|
|
|
3826
3972
|
// src/Components/Table/TableFooter/TableFooter.tsx
|
|
3827
|
-
import
|
|
3828
|
-
import { jsx as
|
|
3973
|
+
import styled36 from "styled-components";
|
|
3974
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3829
3975
|
var shouldForwardPropTableFooter = (prop) => !["backgroundColor"].includes(prop);
|
|
3830
|
-
var StyledTableFooter =
|
|
3976
|
+
var StyledTableFooter = styled36.div.withConfig({
|
|
3831
3977
|
shouldForwardProp: shouldForwardPropTableFooter
|
|
3832
3978
|
})`
|
|
3833
3979
|
display: table;
|
|
@@ -3842,14 +3988,14 @@ var StyledTableFooter = styled35.div.withConfig({
|
|
|
3842
3988
|
`;
|
|
3843
3989
|
var TableFooter = (props) => {
|
|
3844
3990
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3845
|
-
return /* @__PURE__ */
|
|
3991
|
+
return /* @__PURE__ */ jsx40(StyledTableFooter, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
3846
3992
|
};
|
|
3847
3993
|
|
|
3848
3994
|
// src/Components/Table/TableFooterRow/TableFooterRow.tsx
|
|
3849
|
-
import
|
|
3850
|
-
import { jsx as
|
|
3995
|
+
import styled37 from "styled-components";
|
|
3996
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
3851
3997
|
var shouldForwardPropTableFooterRow = (prop) => !["backgroundColor"].includes(prop);
|
|
3852
|
-
var StyledTableFooterRow =
|
|
3998
|
+
var StyledTableFooterRow = styled37.div.withConfig({
|
|
3853
3999
|
shouldForwardProp: shouldForwardPropTableFooterRow
|
|
3854
4000
|
})`
|
|
3855
4001
|
display: flex;
|
|
@@ -3859,14 +4005,14 @@ var StyledTableFooterRow = styled36.div.withConfig({
|
|
|
3859
4005
|
`;
|
|
3860
4006
|
var TableFooterRow = (props) => {
|
|
3861
4007
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3862
|
-
return /* @__PURE__ */
|
|
4008
|
+
return /* @__PURE__ */ jsx41(StyledTableFooterRow, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
3863
4009
|
};
|
|
3864
4010
|
|
|
3865
4011
|
// src/Components/Table/TableFooterCell/TableFooterCell.tsx
|
|
3866
|
-
import
|
|
3867
|
-
import { jsx as
|
|
4012
|
+
import styled38 from "styled-components";
|
|
4013
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3868
4014
|
var shouldForwardPropTableFooterCell = (prop) => !["useSort", "flexGrow", "flexShrink", "width"].includes(prop);
|
|
3869
|
-
var StyledTableFooterCell =
|
|
4015
|
+
var StyledTableFooterCell = styled38.div.withConfig({
|
|
3870
4016
|
shouldForwardProp: shouldForwardPropTableFooterCell
|
|
3871
4017
|
})`
|
|
3872
4018
|
flex-grow: ${(props) => props.flexGrow || "1"};
|
|
@@ -3892,17 +4038,17 @@ var StyledTableFooterCell = styled37.div.withConfig({
|
|
|
3892
4038
|
`;
|
|
3893
4039
|
var TableFooterCell = (props) => {
|
|
3894
4040
|
const _a = props, { children, useSort } = _a, otherProps = __objRest(_a, ["children", "useSort"]);
|
|
3895
|
-
return /* @__PURE__ */
|
|
4041
|
+
return /* @__PURE__ */ jsx42(
|
|
3896
4042
|
StyledTableFooterCell,
|
|
3897
4043
|
__spreadProps(__spreadValues({}, otherProps), {
|
|
3898
4044
|
useSort,
|
|
3899
|
-
children: useSort ? /* @__PURE__ */
|
|
4045
|
+
children: useSort ? /* @__PURE__ */ jsx42("div", { className: "sortingButton", children }) : children
|
|
3900
4046
|
})
|
|
3901
4047
|
);
|
|
3902
4048
|
};
|
|
3903
4049
|
|
|
3904
4050
|
// src/Components/Table/SkeletonRow/SkeletonRow.tsx
|
|
3905
|
-
import { Fragment as Fragment4, jsx as
|
|
4051
|
+
import { Fragment as Fragment4, jsx as jsx43, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3906
4052
|
var style = `
|
|
3907
4053
|
.skeleton-loader {
|
|
3908
4054
|
width: 100%;
|
|
@@ -3921,15 +4067,15 @@ var style = `
|
|
|
3921
4067
|
}
|
|
3922
4068
|
}
|
|
3923
4069
|
`;
|
|
3924
|
-
var SkeletonRow = ({ columns = 9 }) => /* @__PURE__ */
|
|
3925
|
-
/* @__PURE__ */
|
|
3926
|
-
/* @__PURE__ */
|
|
4070
|
+
var SkeletonRow = ({ columns = 9 }) => /* @__PURE__ */ jsxs19(Fragment4, { children: [
|
|
4071
|
+
/* @__PURE__ */ jsx43("style", { children: style }),
|
|
4072
|
+
/* @__PURE__ */ jsx43(TableRow, { children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ jsx43(TableCell, { children: /* @__PURE__ */ jsx43("div", { className: "skeleton-loader" }) }, index)) })
|
|
3927
4073
|
] });
|
|
3928
4074
|
|
|
3929
4075
|
// src/Components/Switch/Switch.tsx
|
|
3930
4076
|
import { forwardRef as forwardRef8 } from "react";
|
|
3931
|
-
import
|
|
3932
|
-
import { jsx as
|
|
4077
|
+
import styled39, { css as css2 } from "styled-components";
|
|
4078
|
+
import { jsx as jsx44, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3933
4079
|
var BASE = {
|
|
3934
4080
|
s: { w: 36, h: 20, knob: 16, pad: 2 },
|
|
3935
4081
|
m: { w: 48, h: 28, knob: 24, pad: 2 },
|
|
@@ -3940,7 +4086,7 @@ var SIZES2 = __spreadProps(__spreadValues({}, BASE), {
|
|
|
3940
4086
|
md: BASE.m,
|
|
3941
4087
|
lg: BASE.l
|
|
3942
4088
|
});
|
|
3943
|
-
var Container4 =
|
|
4089
|
+
var Container4 = styled39.label`
|
|
3944
4090
|
display: inline-flex;
|
|
3945
4091
|
align-items: center;
|
|
3946
4092
|
gap: 10px;
|
|
@@ -3948,14 +4094,14 @@ var Container4 = styled38.label`
|
|
|
3948
4094
|
cursor: ${(p) => p.$disabled ? "not-allowed" : "pointer"};
|
|
3949
4095
|
opacity: ${(p) => p.$disabled ? 0.6 : 1};
|
|
3950
4096
|
`;
|
|
3951
|
-
var HiddenCheckbox =
|
|
4097
|
+
var HiddenCheckbox = styled39.input.attrs({ type: "checkbox" })`
|
|
3952
4098
|
position: absolute;
|
|
3953
4099
|
opacity: 0;
|
|
3954
4100
|
pointer-events: none;
|
|
3955
4101
|
width: 1px;
|
|
3956
4102
|
height: 1px;
|
|
3957
4103
|
`;
|
|
3958
|
-
var Track =
|
|
4104
|
+
var Track = styled39.span`
|
|
3959
4105
|
position: relative;
|
|
3960
4106
|
display: inline-flex;
|
|
3961
4107
|
align-items: center;
|
|
@@ -3983,7 +4129,7 @@ var Track = styled38.span`
|
|
|
3983
4129
|
inset 0 0 0 1px rgba(0, 0, 0, 0.08);
|
|
3984
4130
|
}
|
|
3985
4131
|
`;
|
|
3986
|
-
var Knob =
|
|
4132
|
+
var Knob = styled39.span`
|
|
3987
4133
|
position: absolute;
|
|
3988
4134
|
top: 50%;
|
|
3989
4135
|
transform: translateY(-50%);
|
|
@@ -4030,8 +4176,8 @@ var Switch = forwardRef8(
|
|
|
4030
4176
|
if (disabled) return;
|
|
4031
4177
|
onChange == null ? void 0 : onChange(!!e.target.checked, e);
|
|
4032
4178
|
};
|
|
4033
|
-
return /* @__PURE__ */
|
|
4034
|
-
/* @__PURE__ */
|
|
4179
|
+
return /* @__PURE__ */ jsxs20(Container4, { $disabled: disabled, htmlFor: id, children: [
|
|
4180
|
+
/* @__PURE__ */ jsx44(
|
|
4035
4181
|
HiddenCheckbox,
|
|
4036
4182
|
__spreadValues({
|
|
4037
4183
|
id,
|
|
@@ -4044,16 +4190,16 @@ var Switch = forwardRef8(
|
|
|
4044
4190
|
ref
|
|
4045
4191
|
}, rest)
|
|
4046
4192
|
),
|
|
4047
|
-
/* @__PURE__ */
|
|
4193
|
+
/* @__PURE__ */ jsx44(Track, { $checked: !!checked, $size: size, $color: color, children: /* @__PURE__ */ jsx44(Knob, { $checked: !!checked, $size: size }) })
|
|
4048
4194
|
] });
|
|
4049
4195
|
}
|
|
4050
4196
|
);
|
|
4051
4197
|
Switch.displayName = "Switch";
|
|
4052
4198
|
|
|
4053
4199
|
// src/Components/CardSkeleton/CardSkeleton.tsx
|
|
4054
|
-
import { jsx as
|
|
4200
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
4055
4201
|
var CardSkeleton = () => {
|
|
4056
|
-
return /* @__PURE__ */
|
|
4202
|
+
return /* @__PURE__ */ jsx45(
|
|
4057
4203
|
Box,
|
|
4058
4204
|
{
|
|
4059
4205
|
fullWidth: true,
|
|
@@ -4064,8 +4210,8 @@ var CardSkeleton = () => {
|
|
|
4064
4210
|
};
|
|
4065
4211
|
|
|
4066
4212
|
// src/Components/Options/Options.tsx
|
|
4067
|
-
import { useState as
|
|
4068
|
-
import { jsx as
|
|
4213
|
+
import { useState as useState12, useEffect as useEffect9 } from "react";
|
|
4214
|
+
import { jsx as jsx46, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4069
4215
|
var Options = ({
|
|
4070
4216
|
icon,
|
|
4071
4217
|
options,
|
|
@@ -4074,7 +4220,7 @@ var Options = ({
|
|
|
4074
4220
|
onChange,
|
|
4075
4221
|
disabled = false
|
|
4076
4222
|
}) => {
|
|
4077
|
-
const [state, setState] =
|
|
4223
|
+
const [state, setState] = useState12(0);
|
|
4078
4224
|
useEffect9(() => {
|
|
4079
4225
|
if (defaultId) {
|
|
4080
4226
|
const defaultIndex = options.findIndex(
|
|
@@ -4096,7 +4242,7 @@ var Options = ({
|
|
|
4096
4242
|
}
|
|
4097
4243
|
};
|
|
4098
4244
|
const { label, color } = options[state] || options[0];
|
|
4099
|
-
return /* @__PURE__ */
|
|
4245
|
+
return /* @__PURE__ */ jsx46(
|
|
4100
4246
|
"div",
|
|
4101
4247
|
{
|
|
4102
4248
|
onClick: disabled ? void 0 : handleClick,
|
|
@@ -4124,9 +4270,9 @@ var Options = ({
|
|
|
4124
4270
|
e.currentTarget.style.transform = "translateY(0px)";
|
|
4125
4271
|
}
|
|
4126
4272
|
},
|
|
4127
|
-
children: /* @__PURE__ */
|
|
4128
|
-
/* @__PURE__ */
|
|
4129
|
-
/* @__PURE__ */
|
|
4273
|
+
children: /* @__PURE__ */ jsxs21(Row_default, { gap: "8", alignItems: "center", justifyContent: "center", children: [
|
|
4274
|
+
/* @__PURE__ */ jsx46(Col_default, { children: /* @__PURE__ */ jsx46(Icon_default, { name: icon, type: "regular", color: "#414652" }) }),
|
|
4275
|
+
/* @__PURE__ */ jsx46(Col_default, { children: label })
|
|
4130
4276
|
] })
|
|
4131
4277
|
}
|
|
4132
4278
|
);
|
|
@@ -4134,22 +4280,22 @@ var Options = ({
|
|
|
4134
4280
|
|
|
4135
4281
|
// src/Components/Stepper/Stepper.tsx
|
|
4136
4282
|
import { Fragment as Fragment5 } from "react";
|
|
4137
|
-
import
|
|
4138
|
-
import { jsx as
|
|
4139
|
-
var Wrapper5 =
|
|
4283
|
+
import styled40 from "styled-components";
|
|
4284
|
+
import { jsx as jsx47, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4285
|
+
var Wrapper5 = styled40.nav`
|
|
4140
4286
|
width: 100%;
|
|
4141
4287
|
display: flex;
|
|
4142
4288
|
align-items: center;
|
|
4143
4289
|
justify-content: center;
|
|
4144
4290
|
gap: 5px;
|
|
4145
4291
|
`;
|
|
4146
|
-
var Connector =
|
|
4292
|
+
var Connector = styled40.div`
|
|
4147
4293
|
height: 1px;
|
|
4148
4294
|
background: ${colors.grey_300};
|
|
4149
4295
|
flex: 1;
|
|
4150
4296
|
min-width: 8px;
|
|
4151
4297
|
`;
|
|
4152
|
-
var Circle =
|
|
4298
|
+
var Circle = styled40.div`
|
|
4153
4299
|
width: ${({ size }) => `${size}px`};
|
|
4154
4300
|
height: ${({ size }) => `${size}px`};
|
|
4155
4301
|
border-radius: 9999px;
|
|
@@ -4169,21 +4315,21 @@ var Stepper = ({
|
|
|
4169
4315
|
size = 28,
|
|
4170
4316
|
className
|
|
4171
4317
|
}) => {
|
|
4172
|
-
return /* @__PURE__ */
|
|
4318
|
+
return /* @__PURE__ */ jsx47(Wrapper5, { "aria-label": "progression", className, children: Array.from({ length: numberOfSteps }, (_, i) => {
|
|
4173
4319
|
const isActive = i === current;
|
|
4174
4320
|
const isCompleted = i < current;
|
|
4175
|
-
return /* @__PURE__ */
|
|
4176
|
-
/* @__PURE__ */
|
|
4321
|
+
return /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
4322
|
+
/* @__PURE__ */ jsx47(
|
|
4177
4323
|
Circle,
|
|
4178
4324
|
{
|
|
4179
4325
|
size,
|
|
4180
4326
|
active: isActive,
|
|
4181
4327
|
completed: isCompleted,
|
|
4182
4328
|
"aria-hidden": true,
|
|
4183
|
-
children: isCompleted ? /* @__PURE__ */
|
|
4329
|
+
children: isCompleted ? /* @__PURE__ */ jsx47(Icon, { name: "check", size: "xs", color: "white" }) : i + 1
|
|
4184
4330
|
}
|
|
4185
4331
|
),
|
|
4186
|
-
i < numberOfSteps - 1 && /* @__PURE__ */
|
|
4332
|
+
i < numberOfSteps - 1 && /* @__PURE__ */ jsx47(Connector, {})
|
|
4187
4333
|
] }, i);
|
|
4188
4334
|
}) });
|
|
4189
4335
|
};
|
|
@@ -4194,13 +4340,13 @@ import {
|
|
|
4194
4340
|
useEffect as useEffect10,
|
|
4195
4341
|
useMemo,
|
|
4196
4342
|
useRef as useRef8,
|
|
4197
|
-
useState as
|
|
4343
|
+
useState as useState13,
|
|
4198
4344
|
Children,
|
|
4199
4345
|
isValidElement,
|
|
4200
4346
|
cloneElement
|
|
4201
4347
|
} from "react";
|
|
4202
|
-
import
|
|
4203
|
-
import { jsx as
|
|
4348
|
+
import styled41 from "styled-components";
|
|
4349
|
+
import { jsx as jsx48, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4204
4350
|
var TOKENS = {
|
|
4205
4351
|
fontFamily: '"Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif'
|
|
4206
4352
|
};
|
|
@@ -4221,7 +4367,7 @@ var shouldForwardTab = (p) => ![
|
|
|
4221
4367
|
"$size",
|
|
4222
4368
|
"$activeColor"
|
|
4223
4369
|
].includes(p);
|
|
4224
|
-
var TabsRoot =
|
|
4370
|
+
var TabsRoot = styled41.div.withConfig({
|
|
4225
4371
|
shouldForwardProp: shouldForwardTabs
|
|
4226
4372
|
})`
|
|
4227
4373
|
width: 100%;
|
|
@@ -4232,7 +4378,7 @@ var TabsRoot = styled40.div.withConfig({
|
|
|
4232
4378
|
|
|
4233
4379
|
border-bottom: ${(p) => p.variant === "pills" || p.showBaseline === false ? "0" : `1px solid ${p.baselineColor || colors.grey_300}`};
|
|
4234
4380
|
`;
|
|
4235
|
-
var ActiveBar =
|
|
4381
|
+
var ActiveBar = styled41.div`
|
|
4236
4382
|
position: absolute;
|
|
4237
4383
|
left: 0;
|
|
4238
4384
|
bottom: -1px;
|
|
@@ -4244,7 +4390,7 @@ var ActiveBar = styled40.div`
|
|
|
4244
4390
|
left 180ms ease,
|
|
4245
4391
|
width 180ms ease;
|
|
4246
4392
|
`;
|
|
4247
|
-
var TabsList =
|
|
4393
|
+
var TabsList = styled41.div.withConfig({
|
|
4248
4394
|
shouldForwardProp: shouldForwardTabs
|
|
4249
4395
|
})`
|
|
4250
4396
|
display: flex;
|
|
@@ -4266,7 +4412,7 @@ var TabsList = styled40.div.withConfig({
|
|
|
4266
4412
|
width: ${(p) => p.fullWidth ? "100%" : "auto"};
|
|
4267
4413
|
justify-content: ${(p) => p.align === "center" ? "center" : p.align === "end" ? "flex-end" : p.align === "between" ? "space-between" : "flex-start"};
|
|
4268
4414
|
`;
|
|
4269
|
-
var TabButton =
|
|
4415
|
+
var TabButton = styled41.button.withConfig({
|
|
4270
4416
|
shouldForwardProp: shouldForwardTab
|
|
4271
4417
|
})`
|
|
4272
4418
|
appearance: none;
|
|
@@ -4328,7 +4474,7 @@ var TabButton = styled40.button.withConfig({
|
|
|
4328
4474
|
opacity: 0.6;
|
|
4329
4475
|
}
|
|
4330
4476
|
`;
|
|
4331
|
-
var TabDot =
|
|
4477
|
+
var TabDot = styled41.span`
|
|
4332
4478
|
display: inline-block;
|
|
4333
4479
|
width: 8px;
|
|
4334
4480
|
height: 8px;
|
|
@@ -4336,7 +4482,7 @@ var TabDot = styled40.span`
|
|
|
4336
4482
|
flex: none;
|
|
4337
4483
|
background: ${(p) => p.$color || colors.red_950};
|
|
4338
4484
|
`;
|
|
4339
|
-
var TabBubble =
|
|
4485
|
+
var TabBubble = styled41(Bubble)`
|
|
4340
4486
|
display: flex;
|
|
4341
4487
|
align-items: center;
|
|
4342
4488
|
justify-content: center;
|
|
@@ -4369,7 +4515,7 @@ var Tab = (_a) => {
|
|
|
4369
4515
|
"size",
|
|
4370
4516
|
"activeColor"
|
|
4371
4517
|
]);
|
|
4372
|
-
return /* @__PURE__ */
|
|
4518
|
+
return /* @__PURE__ */ jsx48(
|
|
4373
4519
|
TabButton,
|
|
4374
4520
|
__spreadProps(__spreadValues({
|
|
4375
4521
|
ref: innerRef,
|
|
@@ -4416,7 +4562,7 @@ var Tabs = (_a) => {
|
|
|
4416
4562
|
]);
|
|
4417
4563
|
const rootRef = useRef8(null);
|
|
4418
4564
|
const refsMap = useRef8(/* @__PURE__ */ new Map());
|
|
4419
|
-
const [bar, setBar] =
|
|
4565
|
+
const [bar, setBar] = useState13({ left: 0, width: 0 });
|
|
4420
4566
|
const setTabRef = (id) => (el) => {
|
|
4421
4567
|
if (el) refsMap.current.set(id, el);
|
|
4422
4568
|
};
|
|
@@ -4445,7 +4591,7 @@ var Tabs = (_a) => {
|
|
|
4445
4591
|
const isPillsFullWidth = variant === "pills" && align === "start";
|
|
4446
4592
|
const rendered = useMemo(() => {
|
|
4447
4593
|
if (items && items.length) {
|
|
4448
|
-
return items.map((it) => /* @__PURE__ */
|
|
4594
|
+
return items.map((it) => /* @__PURE__ */ jsxs23(
|
|
4449
4595
|
Tab,
|
|
4450
4596
|
{
|
|
4451
4597
|
id: it.id,
|
|
@@ -4459,8 +4605,8 @@ var Tabs = (_a) => {
|
|
|
4459
4605
|
activeColor,
|
|
4460
4606
|
children: [
|
|
4461
4607
|
it.label,
|
|
4462
|
-
it.dot && /* @__PURE__ */
|
|
4463
|
-
Boolean(it.bubbleActive || it.bubbleNumber) && /* @__PURE__ */
|
|
4608
|
+
it.dot && /* @__PURE__ */ jsx48(TabDot, { $color: it.dotColor }),
|
|
4609
|
+
Boolean(it.bubbleActive || it.bubbleNumber) && /* @__PURE__ */ jsx48(
|
|
4464
4610
|
TabBubble,
|
|
4465
4611
|
{
|
|
4466
4612
|
size: "xs",
|
|
@@ -4500,7 +4646,7 @@ var Tabs = (_a) => {
|
|
|
4500
4646
|
size,
|
|
4501
4647
|
activeColor
|
|
4502
4648
|
]);
|
|
4503
|
-
return /* @__PURE__ */
|
|
4649
|
+
return /* @__PURE__ */ jsxs23(
|
|
4504
4650
|
TabsRoot,
|
|
4505
4651
|
__spreadProps(__spreadValues({
|
|
4506
4652
|
ref: rootRef,
|
|
@@ -4511,7 +4657,7 @@ var Tabs = (_a) => {
|
|
|
4511
4657
|
variant
|
|
4512
4658
|
}, rest), {
|
|
4513
4659
|
children: [
|
|
4514
|
-
/* @__PURE__ */
|
|
4660
|
+
/* @__PURE__ */ jsx48(
|
|
4515
4661
|
TabsList,
|
|
4516
4662
|
{
|
|
4517
4663
|
align,
|
|
@@ -4521,21 +4667,21 @@ var Tabs = (_a) => {
|
|
|
4521
4667
|
children: rendered
|
|
4522
4668
|
}
|
|
4523
4669
|
),
|
|
4524
|
-
variant === "line" && showBaseline && /* @__PURE__ */
|
|
4670
|
+
variant === "line" && showBaseline && /* @__PURE__ */ jsx48(ActiveBar, { style: { left: bar.left, width: bar.width } })
|
|
4525
4671
|
]
|
|
4526
4672
|
})
|
|
4527
4673
|
);
|
|
4528
4674
|
};
|
|
4529
4675
|
|
|
4530
4676
|
// src/Components/MultiSelect/MultiSelect.tsx
|
|
4531
|
-
import { useState as
|
|
4532
|
-
import
|
|
4533
|
-
import { jsx as
|
|
4534
|
-
var Container5 =
|
|
4677
|
+
import { useState as useState14, useRef as useRef9, useEffect as useEffect11 } from "react";
|
|
4678
|
+
import styled42 from "styled-components";
|
|
4679
|
+
import { jsx as jsx49, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4680
|
+
var Container5 = styled42.div`
|
|
4535
4681
|
position: relative;
|
|
4536
4682
|
display: inline-block;
|
|
4537
4683
|
`;
|
|
4538
|
-
var Dropdown2 =
|
|
4684
|
+
var Dropdown2 = styled42.div`
|
|
4539
4685
|
position: absolute;
|
|
4540
4686
|
top: calc(100% + 6px);
|
|
4541
4687
|
${(p) => p.$align === "right" ? "right: 0;" : "left: 0;"}
|
|
@@ -4548,7 +4694,7 @@ var Dropdown2 = styled41.div`
|
|
|
4548
4694
|
overflow-y: auto;
|
|
4549
4695
|
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
|
|
4550
4696
|
`;
|
|
4551
|
-
var Item =
|
|
4697
|
+
var Item = styled42.div`
|
|
4552
4698
|
padding: 8px 12px;
|
|
4553
4699
|
cursor: pointer;
|
|
4554
4700
|
display: flex;
|
|
@@ -4571,7 +4717,7 @@ var MultiSelect = ({
|
|
|
4571
4717
|
width,
|
|
4572
4718
|
align = "left"
|
|
4573
4719
|
}) => {
|
|
4574
|
-
const [isOpen, setIsOpen] =
|
|
4720
|
+
const [isOpen, setIsOpen] = useState14(false);
|
|
4575
4721
|
const dropdownRef = useRef9(null);
|
|
4576
4722
|
const toggleOption = (value) => {
|
|
4577
4723
|
if (!onChange) return;
|
|
@@ -4591,8 +4737,8 @@ var MultiSelect = ({
|
|
|
4591
4737
|
document.addEventListener("mousedown", handleClickOutside);
|
|
4592
4738
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
4593
4739
|
}, []);
|
|
4594
|
-
return /* @__PURE__ */
|
|
4595
|
-
/* @__PURE__ */
|
|
4740
|
+
return /* @__PURE__ */ jsxs24(Container5, { ref: dropdownRef, children: [
|
|
4741
|
+
/* @__PURE__ */ jsx49(
|
|
4596
4742
|
Button,
|
|
4597
4743
|
{
|
|
4598
4744
|
onClick: () => setIsOpen((p) => !p),
|
|
@@ -4602,11 +4748,11 @@ var MultiSelect = ({
|
|
|
4602
4748
|
disabled
|
|
4603
4749
|
}
|
|
4604
4750
|
),
|
|
4605
|
-
isOpen && /* @__PURE__ */
|
|
4751
|
+
isOpen && /* @__PURE__ */ jsxs24(Dropdown2, { $width: width, $align: align, children: [
|
|
4606
4752
|
options.map(({ label: optLabel, value }) => {
|
|
4607
4753
|
const active = selectedValues.includes(value);
|
|
4608
|
-
return /* @__PURE__ */
|
|
4609
|
-
/* @__PURE__ */
|
|
4754
|
+
return /* @__PURE__ */ jsxs24(Item, { onClick: () => toggleOption(value), children: [
|
|
4755
|
+
/* @__PURE__ */ jsx49(
|
|
4610
4756
|
Icon,
|
|
4611
4757
|
{
|
|
4612
4758
|
name: "check",
|
|
@@ -4615,17 +4761,17 @@ var MultiSelect = ({
|
|
|
4615
4761
|
color: active ? colors.blue_700 : colors.transparent
|
|
4616
4762
|
}
|
|
4617
4763
|
),
|
|
4618
|
-
/* @__PURE__ */
|
|
4764
|
+
/* @__PURE__ */ jsx49(Text, { size: "xs", color: active ? "blue_700" : "grey_700", children: optLabel })
|
|
4619
4765
|
] }, String(value));
|
|
4620
4766
|
}),
|
|
4621
|
-
options.length === 0 && /* @__PURE__ */
|
|
4767
|
+
options.length === 0 && /* @__PURE__ */ jsx49(Item, { as: "div", style: { cursor: "default" }, children: /* @__PURE__ */ jsx49(Text, { size: "xs", color: "grey_500", children: "Aucune option" }) })
|
|
4622
4768
|
] })
|
|
4623
4769
|
] });
|
|
4624
4770
|
};
|
|
4625
4771
|
|
|
4626
4772
|
// src/Components/DatePicker/DatePicker.tsx
|
|
4627
|
-
import { useState as
|
|
4628
|
-
import { Fragment as Fragment6, jsx as
|
|
4773
|
+
import { useState as useState15, useRef as useRef10, useEffect as useEffect12 } from "react";
|
|
4774
|
+
import { Fragment as Fragment6, jsx as jsx50, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4629
4775
|
var LOCALE_MAP = {
|
|
4630
4776
|
fr: "fr-FR",
|
|
4631
4777
|
en: "en-GB",
|
|
@@ -4695,16 +4841,16 @@ var DatePicker = (props) => {
|
|
|
4695
4841
|
const resolvedLocale = resolveLocale(locale);
|
|
4696
4842
|
const monthNames = getMonthNames(resolvedLocale);
|
|
4697
4843
|
const dayNames = getDayNames(resolvedLocale);
|
|
4698
|
-
const [isOpen, setIsOpen] =
|
|
4699
|
-
const [currentMonth, setCurrentMonth] =
|
|
4700
|
-
const [isSelectingEnd, setIsSelectingEnd] =
|
|
4701
|
-
const [singleDate, setSingleDate] =
|
|
4844
|
+
const [isOpen, setIsOpen] = useState15(defaultOpen);
|
|
4845
|
+
const [currentMonth, setCurrentMonth] = useState15(/* @__PURE__ */ new Date());
|
|
4846
|
+
const [isSelectingEnd, setIsSelectingEnd] = useState15(false);
|
|
4847
|
+
const [singleDate, setSingleDate] = useState15(
|
|
4702
4848
|
isSingle ? (_a = props.value) != null ? _a : null : null
|
|
4703
4849
|
);
|
|
4704
|
-
const [startDate, setStartDate] =
|
|
4850
|
+
const [startDate, setStartDate] = useState15(
|
|
4705
4851
|
!isSingle ? (_c = (_b = props.value) == null ? void 0 : _b.start) != null ? _c : null : null
|
|
4706
4852
|
);
|
|
4707
|
-
const [endDate, setEndDate] =
|
|
4853
|
+
const [endDate, setEndDate] = useState15(
|
|
4708
4854
|
!isSingle ? (_e = (_d = props.value) == null ? void 0 : _d.end) != null ? _e : null : null
|
|
4709
4855
|
);
|
|
4710
4856
|
const ref = useRef10(null);
|
|
@@ -4813,28 +4959,28 @@ var DatePicker = (props) => {
|
|
|
4813
4959
|
}).format(date);
|
|
4814
4960
|
const inputLabel = isSingle ? singleDate ? formatShort(singleDate) : "S\xE9lectionner une date" : startDate && endDate ? `${formatShort(startDate)} \u2014 ${formatShort(endDate)}` : "S\xE9lectionner une p\xE9riode";
|
|
4815
4961
|
const inputHasValue = isSingle ? !!singleDate : !!startDate && !!endDate;
|
|
4816
|
-
return /* @__PURE__ */
|
|
4962
|
+
return /* @__PURE__ */ jsxs25(
|
|
4817
4963
|
"div",
|
|
4818
4964
|
{
|
|
4819
4965
|
className: "date-picker-container",
|
|
4820
4966
|
ref,
|
|
4821
4967
|
style: width ? { width } : void 0,
|
|
4822
4968
|
children: [
|
|
4823
|
-
variant === "input" ? /* @__PURE__ */
|
|
4969
|
+
variant === "input" ? /* @__PURE__ */ jsxs25(
|
|
4824
4970
|
"button",
|
|
4825
4971
|
{
|
|
4826
4972
|
className: `date-picker-input-trigger${inputHasValue ? " date-picker-input-trigger--filled" : ""}`,
|
|
4827
4973
|
onClick: () => setIsOpen((prev) => !prev),
|
|
4828
4974
|
disabled,
|
|
4829
4975
|
children: [
|
|
4830
|
-
/* @__PURE__ */
|
|
4976
|
+
/* @__PURE__ */ jsx50(
|
|
4831
4977
|
"span",
|
|
4832
4978
|
{
|
|
4833
4979
|
className: inputHasValue ? "" : "date-picker-input-placeholder",
|
|
4834
4980
|
children: inputLabel
|
|
4835
4981
|
}
|
|
4836
4982
|
),
|
|
4837
|
-
inputHasValue && /* @__PURE__ */
|
|
4983
|
+
inputHasValue && /* @__PURE__ */ jsx50(
|
|
4838
4984
|
"span",
|
|
4839
4985
|
{
|
|
4840
4986
|
className: "date-picker-input-clear",
|
|
@@ -4842,13 +4988,13 @@ var DatePicker = (props) => {
|
|
|
4842
4988
|
e.stopPropagation();
|
|
4843
4989
|
reset();
|
|
4844
4990
|
},
|
|
4845
|
-
children: /* @__PURE__ */
|
|
4991
|
+
children: /* @__PURE__ */ jsx50(Icon, { name: "xmark", size: "s", color: colors.grey_400 })
|
|
4846
4992
|
}
|
|
4847
4993
|
)
|
|
4848
4994
|
]
|
|
4849
4995
|
}
|
|
4850
|
-
) : /* @__PURE__ */
|
|
4851
|
-
/* @__PURE__ */
|
|
4996
|
+
) : /* @__PURE__ */ jsxs25(Fragment6, { children: [
|
|
4997
|
+
/* @__PURE__ */ jsx50(
|
|
4852
4998
|
Button,
|
|
4853
4999
|
{
|
|
4854
5000
|
onClick: () => setIsOpen((prev) => !prev),
|
|
@@ -4857,7 +5003,7 @@ var DatePicker = (props) => {
|
|
|
4857
5003
|
disabled
|
|
4858
5004
|
}
|
|
4859
5005
|
),
|
|
4860
|
-
isFiltered && /* @__PURE__ */
|
|
5006
|
+
isFiltered && /* @__PURE__ */ jsx50(
|
|
4861
5007
|
"span",
|
|
4862
5008
|
{
|
|
4863
5009
|
style: {
|
|
@@ -4875,17 +5021,17 @@ var DatePicker = (props) => {
|
|
|
4875
5021
|
cursor: "pointer"
|
|
4876
5022
|
},
|
|
4877
5023
|
onClick: reset,
|
|
4878
|
-
children: /* @__PURE__ */
|
|
5024
|
+
children: /* @__PURE__ */ jsx50(Icon, { name: "xmark", size: "s", color: colors.white })
|
|
4879
5025
|
}
|
|
4880
5026
|
)
|
|
4881
5027
|
] }),
|
|
4882
|
-
isOpen && /* @__PURE__ */
|
|
5028
|
+
isOpen && /* @__PURE__ */ jsx50(
|
|
4883
5029
|
"div",
|
|
4884
5030
|
{
|
|
4885
5031
|
className: "date-picker-popup",
|
|
4886
5032
|
style: align === "right" ? { left: "auto", right: 0 } : void 0,
|
|
4887
|
-
children: /* @__PURE__ */
|
|
4888
|
-
hasPresets && /* @__PURE__ */
|
|
5033
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "date-picker-content", children: [
|
|
5034
|
+
hasPresets && /* @__PURE__ */ jsx50("div", { className: "date-picker-presets", children: rangeProps.presets.map((preset) => /* @__PURE__ */ jsx50(
|
|
4889
5035
|
"button",
|
|
4890
5036
|
{
|
|
4891
5037
|
onClick: () => handlePreset(preset),
|
|
@@ -4894,21 +5040,21 @@ var DatePicker = (props) => {
|
|
|
4894
5040
|
},
|
|
4895
5041
|
preset.label
|
|
4896
5042
|
)) }),
|
|
4897
|
-
/* @__PURE__ */
|
|
4898
|
-
/* @__PURE__ */
|
|
4899
|
-
/* @__PURE__ */
|
|
5043
|
+
/* @__PURE__ */ jsxs25("div", { className: "calendar-container", children: [
|
|
5044
|
+
/* @__PURE__ */ jsxs25("div", { className: "calendar-header", children: [
|
|
5045
|
+
/* @__PURE__ */ jsx50(
|
|
4900
5046
|
"button",
|
|
4901
5047
|
{
|
|
4902
5048
|
onClick: () => navigateMonth(-1),
|
|
4903
5049
|
className: "calendar-nav-button",
|
|
4904
|
-
children: /* @__PURE__ */
|
|
5050
|
+
children: /* @__PURE__ */ jsx50(
|
|
4905
5051
|
"svg",
|
|
4906
5052
|
{
|
|
4907
5053
|
className: "calendar-nav-icon",
|
|
4908
5054
|
fill: "none",
|
|
4909
5055
|
stroke: "currentColor",
|
|
4910
5056
|
viewBox: "0 0 24 24",
|
|
4911
|
-
children: /* @__PURE__ */
|
|
5057
|
+
children: /* @__PURE__ */ jsx50(
|
|
4912
5058
|
"path",
|
|
4913
5059
|
{
|
|
4914
5060
|
strokeLinecap: "round",
|
|
@@ -4921,24 +5067,24 @@ var DatePicker = (props) => {
|
|
|
4921
5067
|
)
|
|
4922
5068
|
}
|
|
4923
5069
|
),
|
|
4924
|
-
/* @__PURE__ */
|
|
5070
|
+
/* @__PURE__ */ jsxs25("h3", { className: "calendar-month-title", children: [
|
|
4925
5071
|
monthNames[currentMonth.getMonth()],
|
|
4926
5072
|
" ",
|
|
4927
5073
|
currentMonth.getFullYear()
|
|
4928
5074
|
] }),
|
|
4929
|
-
/* @__PURE__ */
|
|
5075
|
+
/* @__PURE__ */ jsx50(
|
|
4930
5076
|
"button",
|
|
4931
5077
|
{
|
|
4932
5078
|
onClick: () => navigateMonth(1),
|
|
4933
5079
|
className: "calendar-nav-button",
|
|
4934
|
-
children: /* @__PURE__ */
|
|
5080
|
+
children: /* @__PURE__ */ jsx50(
|
|
4935
5081
|
"svg",
|
|
4936
5082
|
{
|
|
4937
5083
|
className: "calendar-nav-icon",
|
|
4938
5084
|
fill: "none",
|
|
4939
5085
|
stroke: "currentColor",
|
|
4940
5086
|
viewBox: "0 0 24 24",
|
|
4941
|
-
children: /* @__PURE__ */
|
|
5087
|
+
children: /* @__PURE__ */ jsx50(
|
|
4942
5088
|
"path",
|
|
4943
5089
|
{
|
|
4944
5090
|
strokeLinecap: "round",
|
|
@@ -4952,8 +5098,8 @@ var DatePicker = (props) => {
|
|
|
4952
5098
|
}
|
|
4953
5099
|
)
|
|
4954
5100
|
] }),
|
|
4955
|
-
/* @__PURE__ */
|
|
4956
|
-
/* @__PURE__ */
|
|
5101
|
+
/* @__PURE__ */ jsx50("div", { className: "calendar-days-header", children: dayNames.map((day) => /* @__PURE__ */ jsx50("div", { className: "calendar-day-name", children: day }, day)) }),
|
|
5102
|
+
/* @__PURE__ */ jsx50("div", { className: "calendar-days-grid", children: getDaysInMonth(currentMonth).map((day, index) => {
|
|
4957
5103
|
const disabled2 = !day.isCurrentMonth || isDateDisabled(day.date);
|
|
4958
5104
|
const isToday = sameDay(day.date, today);
|
|
4959
5105
|
const isStart = isSingle ? false : !!startDate && sameDay(day.date, startDate);
|
|
@@ -4975,28 +5121,28 @@ var DatePicker = (props) => {
|
|
|
4975
5121
|
if (isToday && !isStart && !isEnd && !isSingleSelected)
|
|
4976
5122
|
classes.push("calendar-day-today");
|
|
4977
5123
|
}
|
|
4978
|
-
return /* @__PURE__ */
|
|
5124
|
+
return /* @__PURE__ */ jsx50(
|
|
4979
5125
|
"button",
|
|
4980
5126
|
{
|
|
4981
5127
|
onClick: () => !disabled2 && handleDateSelect(day.date),
|
|
4982
5128
|
className: classes.join(" "),
|
|
4983
5129
|
disabled: disabled2,
|
|
4984
|
-
children: /* @__PURE__ */
|
|
5130
|
+
children: /* @__PURE__ */ jsx50("span", { children: day.date.getDate() })
|
|
4985
5131
|
},
|
|
4986
5132
|
index
|
|
4987
5133
|
);
|
|
4988
5134
|
}) }),
|
|
4989
|
-
!isSingle && /* @__PURE__ */
|
|
4990
|
-
/* @__PURE__ */
|
|
4991
|
-
/* @__PURE__ */
|
|
5135
|
+
!isSingle && /* @__PURE__ */ jsxs25("div", { className: "calendar-footer", children: [
|
|
5136
|
+
/* @__PURE__ */ jsx50("div", { className: "calendar-footer-dates", children: startDate && endDate ? /* @__PURE__ */ jsxs25(Fragment6, { children: [
|
|
5137
|
+
/* @__PURE__ */ jsx50("strong", { children: "Du" }),
|
|
4992
5138
|
" ",
|
|
4993
5139
|
formatDate(startDate, "weekday", "fr"),
|
|
4994
5140
|
" ",
|
|
4995
|
-
/* @__PURE__ */
|
|
5141
|
+
/* @__PURE__ */ jsx50("strong", { children: "au" }),
|
|
4996
5142
|
" ",
|
|
4997
5143
|
formatDate(endDate, "weekday", "fr")
|
|
4998
|
-
] }) : startDate ? /* @__PURE__ */
|
|
4999
|
-
/* @__PURE__ */
|
|
5144
|
+
] }) : startDate ? /* @__PURE__ */ jsx50("span", { className: "calendar-footer-hint", children: "S\xE9lectionnez la date de fin" }) : null }),
|
|
5145
|
+
/* @__PURE__ */ jsx50("button", { onClick: reset, className: "calendar-reset-button", children: "R\xE9initialiser" })
|
|
5000
5146
|
] })
|
|
5001
5147
|
] })
|
|
5002
5148
|
] })
|
|
@@ -5008,15 +5154,15 @@ var DatePicker = (props) => {
|
|
|
5008
5154
|
};
|
|
5009
5155
|
|
|
5010
5156
|
// src/Components/IconTabs/IconTabs.tsx
|
|
5011
|
-
import { useState as
|
|
5012
|
-
import
|
|
5013
|
-
import { jsx as
|
|
5014
|
-
var TabsContainer =
|
|
5157
|
+
import { useState as useState16, useEffect as useEffect13, useRef as useRef11 } from "react";
|
|
5158
|
+
import styled43, { css as css3 } from "styled-components";
|
|
5159
|
+
import { jsx as jsx51, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5160
|
+
var TabsContainer = styled43.div`
|
|
5015
5161
|
display: flex;
|
|
5016
5162
|
flex-direction: column;
|
|
5017
5163
|
align-items: stretch;
|
|
5018
5164
|
`;
|
|
5019
|
-
var IconsRow =
|
|
5165
|
+
var IconsRow = styled43.div`
|
|
5020
5166
|
display: flex;
|
|
5021
5167
|
justify-content: space-around;
|
|
5022
5168
|
align-items: center;
|
|
@@ -5027,7 +5173,7 @@ var IconsRow = styled42.div`
|
|
|
5027
5173
|
border-radius: 5px;
|
|
5028
5174
|
font-size: 0.8em;
|
|
5029
5175
|
`;
|
|
5030
|
-
var Tab2 =
|
|
5176
|
+
var Tab2 = styled43.div`
|
|
5031
5177
|
margin: 5px;
|
|
5032
5178
|
cursor: pointer;
|
|
5033
5179
|
transition:
|
|
@@ -5050,7 +5196,7 @@ var Tab2 = styled42.div`
|
|
|
5050
5196
|
cursor: not-allowed;
|
|
5051
5197
|
`}
|
|
5052
5198
|
`;
|
|
5053
|
-
var TabSlider =
|
|
5199
|
+
var TabSlider = styled43.div`
|
|
5054
5200
|
margin: 5px 0;
|
|
5055
5201
|
position: absolute;
|
|
5056
5202
|
height: calc(100% - 10px);
|
|
@@ -5071,7 +5217,7 @@ var IconTabs = ({
|
|
|
5071
5217
|
defaultTabIndex = 0
|
|
5072
5218
|
}) => {
|
|
5073
5219
|
var _a;
|
|
5074
|
-
const [selectedTab, setSelectedTab] =
|
|
5220
|
+
const [selectedTab, setSelectedTab] = useState16(defaultTabIndex);
|
|
5075
5221
|
const sliderRef = useRef11(null);
|
|
5076
5222
|
const tabRefs = useRef11([]);
|
|
5077
5223
|
useEffect13(() => {
|
|
@@ -5094,9 +5240,9 @@ var IconTabs = ({
|
|
|
5094
5240
|
sliderRef.current.style.backgroundColor = colors[selectedColor];
|
|
5095
5241
|
}
|
|
5096
5242
|
}, [selectedTab, selectedColor]);
|
|
5097
|
-
return /* @__PURE__ */
|
|
5098
|
-
/* @__PURE__ */
|
|
5099
|
-
items.map((item, index) => /* @__PURE__ */
|
|
5243
|
+
return /* @__PURE__ */ jsxs26(TabsContainer, { children: [
|
|
5244
|
+
/* @__PURE__ */ jsxs26(IconsRow, { children: [
|
|
5245
|
+
items.map((item, index) => /* @__PURE__ */ jsx51(
|
|
5100
5246
|
Tab2,
|
|
5101
5247
|
{
|
|
5102
5248
|
selected: selectedTab === index,
|
|
@@ -5105,7 +5251,7 @@ var IconTabs = ({
|
|
|
5105
5251
|
ref: (el) => {
|
|
5106
5252
|
tabRefs.current[index] = el;
|
|
5107
5253
|
},
|
|
5108
|
-
children: item.icon && /* @__PURE__ */
|
|
5254
|
+
children: item.icon && /* @__PURE__ */ jsx51(
|
|
5109
5255
|
Icon,
|
|
5110
5256
|
{
|
|
5111
5257
|
name: item.icon,
|
|
@@ -5117,43 +5263,45 @@ var IconTabs = ({
|
|
|
5117
5263
|
},
|
|
5118
5264
|
index
|
|
5119
5265
|
)),
|
|
5120
|
-
/* @__PURE__ */
|
|
5266
|
+
/* @__PURE__ */ jsx51(TabSlider, { ref: sliderRef })
|
|
5121
5267
|
] }),
|
|
5122
|
-
/* @__PURE__ */
|
|
5268
|
+
/* @__PURE__ */ jsx51(Text, { align: "center", size: "xs", children: (_a = items[selectedTab]) == null ? void 0 : _a.label })
|
|
5123
5269
|
] });
|
|
5124
5270
|
};
|
|
5125
5271
|
|
|
5126
5272
|
// src/Components/Popover/Popover.tsx
|
|
5127
5273
|
import {
|
|
5128
|
-
useState as
|
|
5274
|
+
useState as useState17,
|
|
5129
5275
|
useRef as useRef12,
|
|
5130
5276
|
useEffect as useEffect14,
|
|
5131
5277
|
useCallback as useCallback5
|
|
5132
5278
|
} from "react";
|
|
5133
5279
|
import { createPortal as createPortal2 } from "react-dom";
|
|
5134
|
-
import
|
|
5135
|
-
import { jsx as
|
|
5136
|
-
var PopoverWrapper =
|
|
5280
|
+
import styled44 from "styled-components";
|
|
5281
|
+
import { jsx as jsx52, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5282
|
+
var PopoverWrapper = styled44.div`
|
|
5137
5283
|
position: relative;
|
|
5138
5284
|
display: ${({ $fullWidth }) => $fullWidth ? "block" : "inline-block"};
|
|
5139
5285
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
5140
5286
|
`;
|
|
5141
|
-
var PopoverTrigger =
|
|
5287
|
+
var PopoverTrigger = styled44.span`
|
|
5142
5288
|
cursor: pointer;
|
|
5143
5289
|
display: ${({ $fullWidth }) => $fullWidth ? "block" : "inline"};
|
|
5144
5290
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
5145
5291
|
`;
|
|
5146
|
-
var PopoverMenu =
|
|
5292
|
+
var PopoverMenu = styled44.div`
|
|
5147
5293
|
position: fixed;
|
|
5148
5294
|
background: #fff;
|
|
5149
5295
|
border: 1px solid #eee;
|
|
5150
5296
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
5151
5297
|
border-radius: 6px;
|
|
5152
5298
|
z-index: 99999;
|
|
5153
|
-
|
|
5299
|
+
display: ${({ $horizontal }) => $horizontal ? "flex" : "block"};
|
|
5300
|
+
align-items: center;
|
|
5301
|
+
min-width: ${({ $horizontal }) => $horizontal ? "auto" : "140px"};
|
|
5154
5302
|
padding: 4px;
|
|
5155
5303
|
`;
|
|
5156
|
-
var PopoverItem =
|
|
5304
|
+
var PopoverItem = styled44.div`
|
|
5157
5305
|
padding: 8px 12px;
|
|
5158
5306
|
cursor: pointer;
|
|
5159
5307
|
border-radius: 4px;
|
|
@@ -5161,7 +5309,9 @@ var PopoverItem = styled43.div`
|
|
|
5161
5309
|
font-weight: 500;
|
|
5162
5310
|
color: #222;
|
|
5163
5311
|
transition: background 0.15s;
|
|
5164
|
-
|
|
5312
|
+
white-space: ${({ $horizontal }) => $horizontal ? "nowrap" : "normal"};
|
|
5313
|
+
border-bottom: ${({ isLast, $horizontal }) => isLast || $horizontal ? "none" : "1px solid #f0f0f0"};
|
|
5314
|
+
border-right: ${({ isLast, $horizontal }) => $horizontal && !isLast ? "1px solid #f0f0f0" : "none"};
|
|
5165
5315
|
|
|
5166
5316
|
&:hover {
|
|
5167
5317
|
background: #f5f5f5;
|
|
@@ -5173,12 +5323,14 @@ var Popover = ({
|
|
|
5173
5323
|
anchorRef,
|
|
5174
5324
|
offsetY = 8,
|
|
5175
5325
|
align = "right",
|
|
5326
|
+
direction = "vertical",
|
|
5176
5327
|
fullWidth = false
|
|
5177
5328
|
}) => {
|
|
5178
|
-
const
|
|
5329
|
+
const isHorizontal = direction === "horizontal";
|
|
5330
|
+
const [open, setOpen] = useState17(false);
|
|
5179
5331
|
const ref = useRef12(null);
|
|
5180
5332
|
const menuRef = useRef12(null);
|
|
5181
|
-
const [menuPosition, setMenuPosition] =
|
|
5333
|
+
const [menuPosition, setMenuPosition] = useState17({
|
|
5182
5334
|
mode: "default",
|
|
5183
5335
|
top: 0,
|
|
5184
5336
|
left: 0
|
|
@@ -5196,7 +5348,7 @@ var Popover = ({
|
|
|
5196
5348
|
});
|
|
5197
5349
|
} else {
|
|
5198
5350
|
const rect = ref.current.getBoundingClientRect();
|
|
5199
|
-
const estimatedMenuHeight = items.length * 42 + 8;
|
|
5351
|
+
const estimatedMenuHeight = isHorizontal ? 50 : items.length * 42 + 8;
|
|
5200
5352
|
const menuHeight = ((_a = menuRef.current) == null ? void 0 : _a.getBoundingClientRect().height) ? menuRef.current.getBoundingClientRect().height : estimatedMenuHeight;
|
|
5201
5353
|
const viewportPadding = 8;
|
|
5202
5354
|
const spaceBelow = window.innerHeight - rect.bottom;
|
|
@@ -5212,7 +5364,7 @@ var Popover = ({
|
|
|
5212
5364
|
width: fullWidth ? rect.width : void 0
|
|
5213
5365
|
});
|
|
5214
5366
|
}
|
|
5215
|
-
}, [items.length, anchorRef, offsetY, align, fullWidth]);
|
|
5367
|
+
}, [items.length, anchorRef, offsetY, align, fullWidth, isHorizontal]);
|
|
5216
5368
|
useEffect14(() => {
|
|
5217
5369
|
const handleClickOutside = (event) => {
|
|
5218
5370
|
var _a, _b;
|
|
@@ -5247,13 +5399,14 @@ var Popover = ({
|
|
|
5247
5399
|
minWidth: menuPosition.width,
|
|
5248
5400
|
transform: align === "left" ? "none" : "translateX(-100%)"
|
|
5249
5401
|
};
|
|
5250
|
-
return /* @__PURE__ */
|
|
5251
|
-
/* @__PURE__ */
|
|
5402
|
+
return /* @__PURE__ */ jsxs27(PopoverWrapper, { ref, $fullWidth: fullWidth, children: [
|
|
5403
|
+
/* @__PURE__ */ jsx52(PopoverTrigger, { $fullWidth: fullWidth, onClick: () => setOpen((o) => !o), children }),
|
|
5252
5404
|
open && createPortal2(
|
|
5253
|
-
/* @__PURE__ */
|
|
5405
|
+
/* @__PURE__ */ jsx52(PopoverMenu, { ref: menuRef, style: menuStyle, $horizontal: isHorizontal, children: items.map((item, idx) => /* @__PURE__ */ jsx52(
|
|
5254
5406
|
PopoverItem,
|
|
5255
5407
|
{
|
|
5256
5408
|
isLast: idx === items.length - 1,
|
|
5409
|
+
$horizontal: isHorizontal,
|
|
5257
5410
|
onClick: () => {
|
|
5258
5411
|
setOpen(false);
|
|
5259
5412
|
item.action();
|
|
@@ -5269,7 +5422,7 @@ var Popover = ({
|
|
|
5269
5422
|
};
|
|
5270
5423
|
|
|
5271
5424
|
// src/Components/MetricCard/MetricCard.tsx
|
|
5272
|
-
import { jsx as
|
|
5425
|
+
import { jsx as jsx53, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5273
5426
|
var MetricCard = ({
|
|
5274
5427
|
icon,
|
|
5275
5428
|
title,
|
|
@@ -5284,7 +5437,7 @@ var MetricCard = ({
|
|
|
5284
5437
|
checked = false,
|
|
5285
5438
|
children
|
|
5286
5439
|
}) => {
|
|
5287
|
-
return /* @__PURE__ */
|
|
5440
|
+
return /* @__PURE__ */ jsx53(
|
|
5288
5441
|
Box,
|
|
5289
5442
|
{
|
|
5290
5443
|
padding: "16px",
|
|
@@ -5297,8 +5450,8 @@ var MetricCard = ({
|
|
|
5297
5450
|
cursor: onClick ? "pointer" : "default"
|
|
5298
5451
|
},
|
|
5299
5452
|
onClick,
|
|
5300
|
-
children: /* @__PURE__ */
|
|
5301
|
-
/* @__PURE__ */
|
|
5453
|
+
children: /* @__PURE__ */ jsxs28(Row, { alignItems: "center", gap: "12", fullWidth: true, children: [
|
|
5454
|
+
/* @__PURE__ */ jsx53(
|
|
5302
5455
|
Box,
|
|
5303
5456
|
{
|
|
5304
5457
|
alignItems: "center",
|
|
@@ -5309,17 +5462,17 @@ var MetricCard = ({
|
|
|
5309
5462
|
height: 40,
|
|
5310
5463
|
borderRadius: 50
|
|
5311
5464
|
},
|
|
5312
|
-
children: /* @__PURE__ */
|
|
5465
|
+
children: /* @__PURE__ */ jsx53(Icon, { name: icon, size: "m", color: iconColor, family: "regular" })
|
|
5313
5466
|
}
|
|
5314
5467
|
),
|
|
5315
|
-
children ? children : contentLayout === "row" ? /* @__PURE__ */
|
|
5316
|
-
/* @__PURE__ */
|
|
5317
|
-
/* @__PURE__ */
|
|
5318
|
-
] }) : /* @__PURE__ */
|
|
5319
|
-
/* @__PURE__ */
|
|
5320
|
-
/* @__PURE__ */
|
|
5321
|
-
/* @__PURE__ */
|
|
5322
|
-
subtitle && /* @__PURE__ */
|
|
5468
|
+
children ? children : contentLayout === "row" ? /* @__PURE__ */ jsxs28(Row, { gap: "6", alignItems: "center", children: [
|
|
5469
|
+
/* @__PURE__ */ jsx53(Text, { size: "s", weight: "bold", variant: valueColor || "grey_600", children: value }),
|
|
5470
|
+
/* @__PURE__ */ jsx53(Text, { size: "s", variant: "grey_600", children: title })
|
|
5471
|
+
] }) : /* @__PURE__ */ jsxs28(Col, { gap: "4", children: [
|
|
5472
|
+
/* @__PURE__ */ jsx53(Text, { size: "s", variant: "grey_600", children: title }),
|
|
5473
|
+
/* @__PURE__ */ jsxs28(Row, { gap: "6", alignItems: "baseline", children: [
|
|
5474
|
+
/* @__PURE__ */ jsx53(Text, { size: "s", weight: "bold", variant: valueColor || "grey_600", children: value }),
|
|
5475
|
+
subtitle && /* @__PURE__ */ jsx53(Text, { size: "xs", variant: "grey_600", children: subtitle })
|
|
5323
5476
|
] })
|
|
5324
5477
|
] })
|
|
5325
5478
|
] })
|
|
@@ -5328,9 +5481,9 @@ var MetricCard = ({
|
|
|
5328
5481
|
};
|
|
5329
5482
|
|
|
5330
5483
|
// src/Components/Card/Card.tsx
|
|
5331
|
-
import
|
|
5332
|
-
import { jsx as
|
|
5333
|
-
var StyledCard =
|
|
5484
|
+
import styled45 from "styled-components";
|
|
5485
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
5486
|
+
var StyledCard = styled45.div`
|
|
5334
5487
|
overflow: hidden;
|
|
5335
5488
|
transition: box-shadow 0.15s ease;
|
|
5336
5489
|
${(p) => p.$flexShrink !== void 0 ? `flex-shrink: ${p.$flexShrink};` : ""}
|
|
@@ -5340,7 +5493,7 @@ var StyledCard = styled44.div`
|
|
|
5340
5493
|
${(p) => p.$clickable ? "cursor: pointer;" : ""}
|
|
5341
5494
|
${(p) => p.$clickable ? "&:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }" : ""}
|
|
5342
5495
|
`;
|
|
5343
|
-
var StyledCardInner =
|
|
5496
|
+
var StyledCardInner = styled45.div`
|
|
5344
5497
|
width: 100%;
|
|
5345
5498
|
padding: ${(p) => p.$padding};
|
|
5346
5499
|
`;
|
|
@@ -5352,7 +5505,7 @@ var Card2 = ({
|
|
|
5352
5505
|
padding = "10px 12px",
|
|
5353
5506
|
borderRadius = "8px",
|
|
5354
5507
|
flexShrink
|
|
5355
|
-
}) => /* @__PURE__ */
|
|
5508
|
+
}) => /* @__PURE__ */ jsx54(
|
|
5356
5509
|
StyledCard,
|
|
5357
5510
|
{
|
|
5358
5511
|
$clickable: !!onClick,
|
|
@@ -5361,13 +5514,13 @@ var Card2 = ({
|
|
|
5361
5514
|
$accentColor: accentColor,
|
|
5362
5515
|
$flexShrink: flexShrink,
|
|
5363
5516
|
onClick,
|
|
5364
|
-
children: /* @__PURE__ */
|
|
5517
|
+
children: /* @__PURE__ */ jsx54(StyledCardInner, { $padding: padding, children })
|
|
5365
5518
|
}
|
|
5366
5519
|
);
|
|
5367
5520
|
|
|
5368
5521
|
// src/Components/Banner/Banner.tsx
|
|
5369
|
-
import
|
|
5370
|
-
import { Fragment as Fragment7, jsx as
|
|
5522
|
+
import styled46, { css as css4, keyframes as keyframes3 } from "styled-components";
|
|
5523
|
+
import { Fragment as Fragment7, jsx as jsx55, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5371
5524
|
var PRESET_STYLES = {
|
|
5372
5525
|
blue: {
|
|
5373
5526
|
background: "rgba(219, 233, 254, 0.4)",
|
|
@@ -5447,7 +5600,7 @@ var shimmerStyle = css4`
|
|
|
5447
5600
|
}
|
|
5448
5601
|
}
|
|
5449
5602
|
`;
|
|
5450
|
-
var StyledBanner =
|
|
5603
|
+
var StyledBanner = styled46.div`
|
|
5451
5604
|
box-sizing: border-box;
|
|
5452
5605
|
width: 100%;
|
|
5453
5606
|
display: flex;
|
|
@@ -5460,13 +5613,13 @@ var StyledBanner = styled45.div`
|
|
|
5460
5613
|
background: ${(p) => p.$background};
|
|
5461
5614
|
${(p) => p.$shimmer && shimmerStyle}
|
|
5462
5615
|
`;
|
|
5463
|
-
var Content2 =
|
|
5616
|
+
var Content2 = styled46.div`
|
|
5464
5617
|
display: flex;
|
|
5465
5618
|
flex-direction: column;
|
|
5466
5619
|
gap: 4px;
|
|
5467
5620
|
align-items: flex-start;
|
|
5468
5621
|
`;
|
|
5469
|
-
var Heading =
|
|
5622
|
+
var Heading = styled46.div`
|
|
5470
5623
|
display: flex;
|
|
5471
5624
|
align-items: center;
|
|
5472
5625
|
gap: 8px;
|
|
@@ -5485,7 +5638,7 @@ var Banner = ({
|
|
|
5485
5638
|
}) => {
|
|
5486
5639
|
const style2 = resolveStyle(variant, filled);
|
|
5487
5640
|
if (children) {
|
|
5488
|
-
return /* @__PURE__ */
|
|
5641
|
+
return /* @__PURE__ */ jsx55(
|
|
5489
5642
|
StyledBanner,
|
|
5490
5643
|
{
|
|
5491
5644
|
$background: style2.background,
|
|
@@ -5495,16 +5648,16 @@ var Banner = ({
|
|
|
5495
5648
|
}
|
|
5496
5649
|
);
|
|
5497
5650
|
}
|
|
5498
|
-
return /* @__PURE__ */
|
|
5651
|
+
return /* @__PURE__ */ jsxs29(
|
|
5499
5652
|
StyledBanner,
|
|
5500
5653
|
{
|
|
5501
5654
|
$background: style2.background,
|
|
5502
5655
|
$borderColor: style2.borderColor,
|
|
5503
5656
|
$shimmer: shimmer,
|
|
5504
5657
|
children: [
|
|
5505
|
-
/* @__PURE__ */
|
|
5506
|
-
/* @__PURE__ */
|
|
5507
|
-
badge && /* @__PURE__ */
|
|
5658
|
+
/* @__PURE__ */ jsx55(Content2, { children: message ? /* @__PURE__ */ jsx55(Text, { size: "s", children: message }) : /* @__PURE__ */ jsxs29(Fragment7, { children: [
|
|
5659
|
+
/* @__PURE__ */ jsxs29(Heading, { children: [
|
|
5660
|
+
badge && /* @__PURE__ */ jsx55(
|
|
5508
5661
|
Bubble,
|
|
5509
5662
|
{
|
|
5510
5663
|
backgroundColor: style2.badgeBackground,
|
|
@@ -5515,7 +5668,7 @@ var Banner = ({
|
|
|
5515
5668
|
children: badge
|
|
5516
5669
|
}
|
|
5517
5670
|
),
|
|
5518
|
-
title && /* @__PURE__ */
|
|
5671
|
+
title && /* @__PURE__ */ jsx55(
|
|
5519
5672
|
Text,
|
|
5520
5673
|
{
|
|
5521
5674
|
size: "s",
|
|
@@ -5525,9 +5678,9 @@ var Banner = ({
|
|
|
5525
5678
|
}
|
|
5526
5679
|
)
|
|
5527
5680
|
] }),
|
|
5528
|
-
subtitle && /* @__PURE__ */
|
|
5681
|
+
subtitle && /* @__PURE__ */ jsx55(Text, { size: "xs", color: toggle ? style2.accent : void 0, children: subtitle })
|
|
5529
5682
|
] }) }),
|
|
5530
|
-
toggle ? /* @__PURE__ */
|
|
5683
|
+
toggle ? /* @__PURE__ */ jsx55(
|
|
5531
5684
|
Switch,
|
|
5532
5685
|
{
|
|
5533
5686
|
checked: toggle.checked,
|
|
@@ -5535,7 +5688,7 @@ var Banner = ({
|
|
|
5535
5688
|
disabled: toggle.disabled,
|
|
5536
5689
|
color: style2.accent
|
|
5537
5690
|
}
|
|
5538
|
-
) : action && /* @__PURE__ */
|
|
5691
|
+
) : action && /* @__PURE__ */ jsx55(
|
|
5539
5692
|
Button,
|
|
5540
5693
|
{
|
|
5541
5694
|
outline: true,
|
|
@@ -5551,137 +5704,6 @@ var Banner = ({
|
|
|
5551
5704
|
);
|
|
5552
5705
|
};
|
|
5553
5706
|
|
|
5554
|
-
// src/Components/Tooltip/Tooltip.tsx
|
|
5555
|
-
import { useState as useState17 } from "react";
|
|
5556
|
-
import styled46 from "styled-components";
|
|
5557
|
-
import { jsx as jsx55, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5558
|
-
var StyledTooltipWrapper = styled46.div`
|
|
5559
|
-
position: relative;
|
|
5560
|
-
display: inline-block;
|
|
5561
|
-
cursor: pointer;
|
|
5562
|
-
`;
|
|
5563
|
-
var StyledTooltipContent = styled46.div`
|
|
5564
|
-
visibility: ${(props) => props.$isVisible ? "visible" : "hidden"};
|
|
5565
|
-
background-color: ${(props) => props.$backgroundColor || colors.black};
|
|
5566
|
-
color: ${colors.white};
|
|
5567
|
-
text-align: center;
|
|
5568
|
-
padding: 8px;
|
|
5569
|
-
border-radius: 4px;
|
|
5570
|
-
position: absolute;
|
|
5571
|
-
width: ${(props) => props.$width || "200px"};
|
|
5572
|
-
height: ${(props) => props.$height || "auto"};
|
|
5573
|
-
opacity: ${(props) => props.$isVisible ? 1 : 0};
|
|
5574
|
-
transition: opacity 0.3s;
|
|
5575
|
-
z-index: 1;
|
|
5576
|
-
display: flex;
|
|
5577
|
-
flex-direction: column;
|
|
5578
|
-
align-items: center;
|
|
5579
|
-
gap: 4px;
|
|
5580
|
-
|
|
5581
|
-
${(props) => {
|
|
5582
|
-
switch (props.$direction) {
|
|
5583
|
-
case "top":
|
|
5584
|
-
return `
|
|
5585
|
-
bottom: 125%;
|
|
5586
|
-
left: 50%;
|
|
5587
|
-
transform: translateX(-50%);
|
|
5588
|
-
&::after {
|
|
5589
|
-
content: "";
|
|
5590
|
-
position: absolute;
|
|
5591
|
-
top: 100%;
|
|
5592
|
-
left: 50%;
|
|
5593
|
-
transform: translateX(-50%);
|
|
5594
|
-
border-width: 5px;
|
|
5595
|
-
border-style: solid;
|
|
5596
|
-
border-color: ${props.$backgroundColor || colors.black} transparent transparent transparent;
|
|
5597
|
-
}
|
|
5598
|
-
`;
|
|
5599
|
-
case "bottom":
|
|
5600
|
-
return `
|
|
5601
|
-
top: 125%;
|
|
5602
|
-
left: 50%;
|
|
5603
|
-
transform: translateX(-50%);
|
|
5604
|
-
&::after {
|
|
5605
|
-
content: "";
|
|
5606
|
-
position: absolute;
|
|
5607
|
-
bottom: 100%;
|
|
5608
|
-
left: 50%;
|
|
5609
|
-
transform: translateX(-50%);
|
|
5610
|
-
border-width: 5px;
|
|
5611
|
-
border-style: solid;
|
|
5612
|
-
border-color: transparent transparent ${props.$backgroundColor || colors.black} transparent;
|
|
5613
|
-
}
|
|
5614
|
-
`;
|
|
5615
|
-
case "left":
|
|
5616
|
-
return `
|
|
5617
|
-
top: 50%;
|
|
5618
|
-
right: 125%;
|
|
5619
|
-
transform: translateY(-50%);
|
|
5620
|
-
&::after {
|
|
5621
|
-
content: "";
|
|
5622
|
-
position: absolute;
|
|
5623
|
-
top: 50%;
|
|
5624
|
-
left: 100%;
|
|
5625
|
-
transform: translateY(-50%);
|
|
5626
|
-
border-width: 5px;
|
|
5627
|
-
border-style: solid;
|
|
5628
|
-
border-color: transparent transparent transparent ${props.$backgroundColor || colors.black};
|
|
5629
|
-
}
|
|
5630
|
-
`;
|
|
5631
|
-
case "right":
|
|
5632
|
-
default:
|
|
5633
|
-
return `
|
|
5634
|
-
top: 50%;
|
|
5635
|
-
left: 125%;
|
|
5636
|
-
transform: translateY(-50%);
|
|
5637
|
-
&::after {
|
|
5638
|
-
content: "";
|
|
5639
|
-
position: absolute;
|
|
5640
|
-
top: 50%;
|
|
5641
|
-
right: 100%;
|
|
5642
|
-
transform: translateY(-50%);
|
|
5643
|
-
border-width: 5px;
|
|
5644
|
-
border-style: solid;
|
|
5645
|
-
border-color: transparent ${props.$backgroundColor || colors.black} transparent transparent;
|
|
5646
|
-
}
|
|
5647
|
-
`;
|
|
5648
|
-
}
|
|
5649
|
-
}}
|
|
5650
|
-
`;
|
|
5651
|
-
var Tooltip = ({
|
|
5652
|
-
backgroundColor,
|
|
5653
|
-
data = [],
|
|
5654
|
-
width,
|
|
5655
|
-
height,
|
|
5656
|
-
direction = "top",
|
|
5657
|
-
children
|
|
5658
|
-
}) => {
|
|
5659
|
-
const [isVisible, setIsVisible] = useState17(false);
|
|
5660
|
-
const handleMouseEnter = () => setIsVisible(true);
|
|
5661
|
-
const handleMouseLeave = () => setIsVisible(false);
|
|
5662
|
-
return /* @__PURE__ */ jsxs29(
|
|
5663
|
-
StyledTooltipWrapper,
|
|
5664
|
-
{
|
|
5665
|
-
onMouseEnter: handleMouseEnter,
|
|
5666
|
-
onMouseLeave: handleMouseLeave,
|
|
5667
|
-
children: [
|
|
5668
|
-
children,
|
|
5669
|
-
/* @__PURE__ */ jsx55(
|
|
5670
|
-
StyledTooltipContent,
|
|
5671
|
-
{
|
|
5672
|
-
$isVisible: isVisible,
|
|
5673
|
-
$backgroundColor: backgroundColor,
|
|
5674
|
-
$width: width,
|
|
5675
|
-
$height: height,
|
|
5676
|
-
$direction: direction,
|
|
5677
|
-
children: data.length > 0 ? data.map((item, index) => /* @__PURE__ */ jsx55(Text, { size: "s", color: "white", children: item }, index)) : /* @__PURE__ */ jsx55(Text, { size: "s", color: "white", children: "Aucune donn\xE9e" })
|
|
5678
|
-
}
|
|
5679
|
-
)
|
|
5680
|
-
]
|
|
5681
|
-
}
|
|
5682
|
-
);
|
|
5683
|
-
};
|
|
5684
|
-
|
|
5685
5707
|
// src/Components/Pagination/Pagination.tsx
|
|
5686
5708
|
import { useMemo as useMemo2 } from "react";
|
|
5687
5709
|
import { jsx as jsx56, jsxs as jsxs30 } from "react/jsx-runtime";
|