design-zystem 1.0.259 → 1.0.261
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 +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +710 -511
- package/dist/index.mjs +673 -476
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -93,7 +93,7 @@ __export(index_exports, {
|
|
|
93
93
|
PageContainer: () => PageContainer,
|
|
94
94
|
Pagination: () => Pagination,
|
|
95
95
|
Popover: () => Popover,
|
|
96
|
-
ProgressBar: () =>
|
|
96
|
+
ProgressBar: () => ProgressBar2,
|
|
97
97
|
Radio: () => Radio,
|
|
98
98
|
Row: () => Row,
|
|
99
99
|
Select: () => Select,
|
|
@@ -116,6 +116,7 @@ __export(index_exports, {
|
|
|
116
116
|
TagBubble: () => TagBubble,
|
|
117
117
|
Text: () => Text,
|
|
118
118
|
Timeline: () => Timeline,
|
|
119
|
+
Toaster: () => Toaster,
|
|
119
120
|
Tooltip: () => Tooltip,
|
|
120
121
|
addBusinessDays: () => addBusinessDays,
|
|
121
122
|
appendCacheBuster: () => appendCacheBuster,
|
|
@@ -157,6 +158,7 @@ __export(index_exports, {
|
|
|
157
158
|
optimizeImage: () => optimizeImage_default,
|
|
158
159
|
parseAmount: () => parseAmount,
|
|
159
160
|
parseIsoDate: () => parseIsoDate,
|
|
161
|
+
toast: () => toast,
|
|
160
162
|
truncateFileName: () => truncateFileName,
|
|
161
163
|
truncateText: () => truncateText
|
|
162
164
|
});
|
|
@@ -1624,9 +1626,204 @@ var Drawer = ({
|
|
|
1624
1626
|
) });
|
|
1625
1627
|
};
|
|
1626
1628
|
|
|
1627
|
-
// src/Components/
|
|
1629
|
+
// src/Components/Toast/Toaster.tsx
|
|
1630
|
+
var import_react8 = require("react");
|
|
1631
|
+
var import_react_dom = require("react-dom");
|
|
1632
|
+
var import_styled_components14 = __toESM(require("styled-components"));
|
|
1633
|
+
|
|
1634
|
+
// src/Components/Toast/ToastCard.tsx
|
|
1635
|
+
var import_react7 = require("react");
|
|
1628
1636
|
var import_styled_components13 = __toESM(require("styled-components"));
|
|
1637
|
+
|
|
1638
|
+
// src/Components/Toast/toastStore.ts
|
|
1639
|
+
var DEFAULT_TIMEOUT = 2e3;
|
|
1640
|
+
var toasts = [];
|
|
1641
|
+
var nextId = 0;
|
|
1642
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
1643
|
+
var emitChange = () => {
|
|
1644
|
+
listeners.forEach((listener) => listener());
|
|
1645
|
+
};
|
|
1646
|
+
var subscribeToasts = (listener) => {
|
|
1647
|
+
listeners.add(listener);
|
|
1648
|
+
return () => listeners.delete(listener);
|
|
1649
|
+
};
|
|
1650
|
+
var getToastsSnapshot = () => toasts;
|
|
1651
|
+
var pushToast = (type, message, options = {}) => {
|
|
1652
|
+
var _a;
|
|
1653
|
+
const isDuplicateVisible = toasts.some(
|
|
1654
|
+
(toast2) => toast2.type === type && toast2.message === message
|
|
1655
|
+
);
|
|
1656
|
+
if (isDuplicateVisible) return;
|
|
1657
|
+
toasts = [
|
|
1658
|
+
...toasts,
|
|
1659
|
+
{
|
|
1660
|
+
id: `toast-${nextId++}`,
|
|
1661
|
+
type,
|
|
1662
|
+
message,
|
|
1663
|
+
title: options.title,
|
|
1664
|
+
timeOut: (_a = options.timeOut) != null ? _a : DEFAULT_TIMEOUT
|
|
1665
|
+
}
|
|
1666
|
+
];
|
|
1667
|
+
emitChange();
|
|
1668
|
+
};
|
|
1669
|
+
var dismissToast = (id) => {
|
|
1670
|
+
toasts = toasts.filter((toast2) => toast2.id !== id);
|
|
1671
|
+
emitChange();
|
|
1672
|
+
};
|
|
1673
|
+
|
|
1674
|
+
// src/Components/Toast/ToastCard.tsx
|
|
1629
1675
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1676
|
+
var EXIT_DURATION = 180;
|
|
1677
|
+
var ToastCard = ({ toastItem }) => {
|
|
1678
|
+
const [isExiting, setIsExiting] = (0, import_react7.useState)(false);
|
|
1679
|
+
const handleDismiss = (0, import_react7.useCallback)(() => {
|
|
1680
|
+
setIsExiting(true);
|
|
1681
|
+
setTimeout(() => dismissToast(toastItem.id), EXIT_DURATION);
|
|
1682
|
+
}, [toastItem.id]);
|
|
1683
|
+
(0, import_react7.useEffect)(() => {
|
|
1684
|
+
const dismissTimer = setTimeout(handleDismiss, toastItem.timeOut);
|
|
1685
|
+
return () => clearTimeout(dismissTimer);
|
|
1686
|
+
}, [handleDismiss, toastItem.timeOut]);
|
|
1687
|
+
const { icon, accent, background } = TOAST[toastItem.type];
|
|
1688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Card, { $accent: accent, $isExiting: isExiting, role: "status", children: [
|
|
1689
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconBadge, { $background: background, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: icon, family: "regular", size: "m", color: accent }) }),
|
|
1690
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Content, { children: [
|
|
1691
|
+
toastItem.title && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { size: "s", weight: "700", children: toastItem.title }),
|
|
1692
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { size: "s", children: toastItem.message })
|
|
1693
|
+
] }),
|
|
1694
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1695
|
+
Icon,
|
|
1696
|
+
{
|
|
1697
|
+
name: "xmark",
|
|
1698
|
+
family: "regular",
|
|
1699
|
+
size: "s",
|
|
1700
|
+
color: colors.grey_500,
|
|
1701
|
+
onClick: handleDismiss,
|
|
1702
|
+
style: { position: "absolute", top: 10, right: 10, cursor: "pointer" },
|
|
1703
|
+
"aria-label": "Fermer"
|
|
1704
|
+
}
|
|
1705
|
+
),
|
|
1706
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1707
|
+
ProgressBar,
|
|
1708
|
+
{
|
|
1709
|
+
$accent: accent,
|
|
1710
|
+
$timeOut: toastItem.timeOut,
|
|
1711
|
+
$isExiting: isExiting
|
|
1712
|
+
}
|
|
1713
|
+
)
|
|
1714
|
+
] });
|
|
1715
|
+
};
|
|
1716
|
+
var TOAST = {
|
|
1717
|
+
success: {
|
|
1718
|
+
icon: "circle-check",
|
|
1719
|
+
accent: colors.green,
|
|
1720
|
+
background: colors.green_50
|
|
1721
|
+
},
|
|
1722
|
+
error: {
|
|
1723
|
+
icon: "circle-xmark",
|
|
1724
|
+
accent: colors.red_950,
|
|
1725
|
+
background: colors.red_50
|
|
1726
|
+
},
|
|
1727
|
+
warning: {
|
|
1728
|
+
icon: "triangle-exclamation",
|
|
1729
|
+
accent: colors.orange_500,
|
|
1730
|
+
background: colors.orange_50
|
|
1731
|
+
},
|
|
1732
|
+
info: {
|
|
1733
|
+
icon: "circle-info",
|
|
1734
|
+
accent: colors.blue_700,
|
|
1735
|
+
background: colors.blue_50
|
|
1736
|
+
}
|
|
1737
|
+
};
|
|
1738
|
+
var slideIn = import_styled_components13.keyframes`
|
|
1739
|
+
from { transform: translateX(16px); opacity: 0; }
|
|
1740
|
+
to { transform: translateX(0); opacity: 1; }
|
|
1741
|
+
`;
|
|
1742
|
+
var slideOut = import_styled_components13.keyframes`
|
|
1743
|
+
from { transform: translateX(0); opacity: 1; }
|
|
1744
|
+
to { transform: translateX(16px); opacity: 0; }
|
|
1745
|
+
`;
|
|
1746
|
+
var shrink = import_styled_components13.keyframes`
|
|
1747
|
+
from { transform: scaleX(1); }
|
|
1748
|
+
to { transform: scaleX(0); }
|
|
1749
|
+
`;
|
|
1750
|
+
var Card = import_styled_components13.default.div`
|
|
1751
|
+
position: relative;
|
|
1752
|
+
display: flex;
|
|
1753
|
+
align-items: flex-start;
|
|
1754
|
+
gap: 12px;
|
|
1755
|
+
width: 360px;
|
|
1756
|
+
padding: 12px 36px 14px 12px;
|
|
1757
|
+
background: ${colors.white};
|
|
1758
|
+
border-left: 4px solid ${({ $accent }) => $accent};
|
|
1759
|
+
border-radius: 8px;
|
|
1760
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
|
|
1761
|
+
overflow: hidden;
|
|
1762
|
+
pointer-events: auto;
|
|
1763
|
+
animation: ${({ $isExiting }) => $isExiting ? slideOut : slideIn} 180ms
|
|
1764
|
+
ease-out forwards;
|
|
1765
|
+
`;
|
|
1766
|
+
var IconBadge = import_styled_components13.default.div`
|
|
1767
|
+
display: flex;
|
|
1768
|
+
align-items: center;
|
|
1769
|
+
justify-content: center;
|
|
1770
|
+
width: 28px;
|
|
1771
|
+
height: 28px;
|
|
1772
|
+
border-radius: 50%;
|
|
1773
|
+
background: ${({ $background }) => $background};
|
|
1774
|
+
flex-shrink: 0;
|
|
1775
|
+
`;
|
|
1776
|
+
var Content = import_styled_components13.default.div`
|
|
1777
|
+
display: flex;
|
|
1778
|
+
flex-direction: column;
|
|
1779
|
+
gap: 2px;
|
|
1780
|
+
flex: 1;
|
|
1781
|
+
min-width: 0;
|
|
1782
|
+
`;
|
|
1783
|
+
var ProgressBar = import_styled_components13.default.div`
|
|
1784
|
+
position: absolute;
|
|
1785
|
+
left: 0;
|
|
1786
|
+
bottom: 0;
|
|
1787
|
+
width: 100%;
|
|
1788
|
+
height: 3px;
|
|
1789
|
+
background: ${({ $accent }) => $accent};
|
|
1790
|
+
transform-origin: left;
|
|
1791
|
+
animation: ${shrink} ${({ $timeOut }) => $timeOut}ms linear forwards;
|
|
1792
|
+
animation-play-state: ${({ $isExiting }) => $isExiting ? "paused" : "running"};
|
|
1793
|
+
`;
|
|
1794
|
+
|
|
1795
|
+
// src/Components/Toast/Toaster.tsx
|
|
1796
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1797
|
+
var Toaster = () => {
|
|
1798
|
+
const toasts2 = (0, import_react8.useSyncExternalStore)(subscribeToasts, getToastsSnapshot);
|
|
1799
|
+
if (toasts2.length === 0) return null;
|
|
1800
|
+
return (0, import_react_dom.createPortal)(
|
|
1801
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Stack, { "aria-live": "polite", children: toasts2.map((toastItem) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToastCard, { toastItem }, toastItem.id)) }),
|
|
1802
|
+
document.body
|
|
1803
|
+
);
|
|
1804
|
+
};
|
|
1805
|
+
var Stack = import_styled_components14.default.div`
|
|
1806
|
+
position: fixed;
|
|
1807
|
+
right: 24px;
|
|
1808
|
+
bottom: 24px;
|
|
1809
|
+
z-index: 100000;
|
|
1810
|
+
display: flex;
|
|
1811
|
+
flex-direction: column-reverse;
|
|
1812
|
+
gap: 8px;
|
|
1813
|
+
pointer-events: none;
|
|
1814
|
+
`;
|
|
1815
|
+
|
|
1816
|
+
// src/Components/Toast/toast.ts
|
|
1817
|
+
var toast = {
|
|
1818
|
+
success: (message, options) => pushToast("success", message, options),
|
|
1819
|
+
error: (message, options) => pushToast("error", message, options),
|
|
1820
|
+
warning: (message, options) => pushToast("warning", message, options),
|
|
1821
|
+
info: (message, options) => pushToast("info", message, options)
|
|
1822
|
+
};
|
|
1823
|
+
|
|
1824
|
+
// src/Components/TagBubble/TagBubble.tsx
|
|
1825
|
+
var import_styled_components15 = __toESM(require("styled-components"));
|
|
1826
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1630
1827
|
var sizeToPx = {
|
|
1631
1828
|
xxs: 10,
|
|
1632
1829
|
xs: 12,
|
|
@@ -1636,7 +1833,7 @@ var sizeToPx = {
|
|
|
1636
1833
|
xl: 20,
|
|
1637
1834
|
xxl: 22
|
|
1638
1835
|
};
|
|
1639
|
-
var Wrapper2 =
|
|
1836
|
+
var Wrapper2 = import_styled_components15.default.div`
|
|
1640
1837
|
display: inline-flex;
|
|
1641
1838
|
align-items: center;
|
|
1642
1839
|
gap: ${(p) => p.$gap}px;
|
|
@@ -1650,20 +1847,20 @@ var Wrapper2 = import_styled_components13.default.div`
|
|
|
1650
1847
|
|
|
1651
1848
|
box-shadow: ${(p) => p.$hasShadow ? "0 2px 15px 0 rgba(198, 198, 198, 0.25)" : "none"};
|
|
1652
1849
|
`;
|
|
1653
|
-
var Dot =
|
|
1850
|
+
var Dot = import_styled_components15.default.span`
|
|
1654
1851
|
width: ${(p) => p.$size}px;
|
|
1655
1852
|
height: ${(p) => p.$size}px;
|
|
1656
1853
|
border-radius: 999px;
|
|
1657
1854
|
background: ${(p) => colors[p.$color] || p.$color || colors.grey_400};
|
|
1658
1855
|
flex: 0 0 auto;
|
|
1659
1856
|
`;
|
|
1660
|
-
var Label =
|
|
1857
|
+
var Label = import_styled_components15.default.span`
|
|
1661
1858
|
font-size: ${(p) => p.$fontSize};
|
|
1662
1859
|
font-weight: ${(p) => p.$weight};
|
|
1663
1860
|
color: ${(p) => colors[p.$color] || p.$color || colors.text};
|
|
1664
1861
|
white-space: nowrap;
|
|
1665
1862
|
`;
|
|
1666
|
-
var Count =
|
|
1863
|
+
var Count = import_styled_components15.default.span`
|
|
1667
1864
|
padding: ${(p) => p.$countPadding};
|
|
1668
1865
|
border-radius: 999px;
|
|
1669
1866
|
|
|
@@ -1728,7 +1925,7 @@ var TagBubble = (_a) => {
|
|
|
1728
1925
|
const showCircle = !hideCircle;
|
|
1729
1926
|
const showCount = !hideCount && count !== void 0 && count !== null;
|
|
1730
1927
|
const dotColor = isActive ? circleColorActive : circleColorInactive;
|
|
1731
|
-
return /* @__PURE__ */ (0,
|
|
1928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1732
1929
|
Wrapper2,
|
|
1733
1930
|
__spreadProps(__spreadValues({
|
|
1734
1931
|
onClick,
|
|
@@ -1741,8 +1938,8 @@ var TagBubble = (_a) => {
|
|
|
1741
1938
|
style: { cursor: onClick ? "pointer" : "default" }
|
|
1742
1939
|
}, rest), {
|
|
1743
1940
|
children: [
|
|
1744
|
-
showCircle && /* @__PURE__ */ (0,
|
|
1745
|
-
/* @__PURE__ */ (0,
|
|
1941
|
+
showCircle && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Dot, { $size: circleSize, $color: dotColor }),
|
|
1942
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1746
1943
|
Label,
|
|
1747
1944
|
{
|
|
1748
1945
|
$fontSize: resolveFontSize(labelSize),
|
|
@@ -1751,7 +1948,7 @@ var TagBubble = (_a) => {
|
|
|
1751
1948
|
children: label
|
|
1752
1949
|
}
|
|
1753
1950
|
),
|
|
1754
|
-
showCount && /* @__PURE__ */ (0,
|
|
1951
|
+
showCount && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1755
1952
|
Count,
|
|
1756
1953
|
{
|
|
1757
1954
|
$bg: countBg,
|
|
@@ -1767,8 +1964,8 @@ var TagBubble = (_a) => {
|
|
|
1767
1964
|
};
|
|
1768
1965
|
|
|
1769
1966
|
// src/Components/Link/Link.tsx
|
|
1770
|
-
var
|
|
1771
|
-
var
|
|
1967
|
+
var import_styled_components16 = __toESM(require("styled-components"));
|
|
1968
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1772
1969
|
var textSizes4 = {
|
|
1773
1970
|
xxs: ".4em",
|
|
1774
1971
|
xs: ".6em",
|
|
@@ -1788,7 +1985,7 @@ var shouldForwardProp7 = (prop) => ![
|
|
|
1788
1985
|
"align",
|
|
1789
1986
|
"underline"
|
|
1790
1987
|
].includes(prop);
|
|
1791
|
-
var StyledLink =
|
|
1988
|
+
var StyledLink = import_styled_components16.default.a.withConfig({ shouldForwardProp: shouldForwardProp7 })`
|
|
1792
1989
|
font-size: ${(props) => textSizes4[props.size] || props.size || "1em"};
|
|
1793
1990
|
font-weight: ${(props) => props.fontWeight || "700"};
|
|
1794
1991
|
color: ${(props) => colors[props.variant] || props.color || colors.primary};
|
|
@@ -1818,7 +2015,7 @@ var Link = (_a) => {
|
|
|
1818
2015
|
"size",
|
|
1819
2016
|
"variant"
|
|
1820
2017
|
]);
|
|
1821
|
-
return /* @__PURE__ */ (0,
|
|
2018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1822
2019
|
StyledLink,
|
|
1823
2020
|
__spreadProps(__spreadValues({
|
|
1824
2021
|
href: url,
|
|
@@ -1834,13 +2031,13 @@ var Link = (_a) => {
|
|
|
1834
2031
|
};
|
|
1835
2032
|
|
|
1836
2033
|
// src/Components/Avatar/Avatar.tsx
|
|
1837
|
-
var
|
|
1838
|
-
var
|
|
2034
|
+
var import_react9 = require("react");
|
|
2035
|
+
var import_styled_components18 = __toESM(require("styled-components"));
|
|
1839
2036
|
|
|
1840
2037
|
// src/Components/Image/Image.tsx
|
|
1841
|
-
var
|
|
1842
|
-
var
|
|
1843
|
-
var StyledImage =
|
|
2038
|
+
var import_styled_components17 = __toESM(require("styled-components"));
|
|
2039
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2040
|
+
var StyledImage = import_styled_components17.default.img`
|
|
1844
2041
|
object-fit: ${(props) => props.$objectFit || "cover"};
|
|
1845
2042
|
align-self: ${(props) => props.$alignSelf || "center"};
|
|
1846
2043
|
border-radius: ${(props) => props.$borderRadius || "5px"};
|
|
@@ -1868,7 +2065,7 @@ var Image2 = (_a) => {
|
|
|
1868
2065
|
"alignSelf",
|
|
1869
2066
|
"style"
|
|
1870
2067
|
]);
|
|
1871
|
-
return /* @__PURE__ */ (0,
|
|
2068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1872
2069
|
StyledImage,
|
|
1873
2070
|
__spreadValues({
|
|
1874
2071
|
src,
|
|
@@ -1884,13 +2081,13 @@ var Image2 = (_a) => {
|
|
|
1884
2081
|
};
|
|
1885
2082
|
|
|
1886
2083
|
// src/Components/Avatar/Avatar.tsx
|
|
1887
|
-
var
|
|
1888
|
-
var Wrapper3 =
|
|
2084
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2085
|
+
var Wrapper3 = import_styled_components18.default.div`
|
|
1889
2086
|
position: relative;
|
|
1890
2087
|
display: inline-flex;
|
|
1891
2088
|
flex-shrink: 0;
|
|
1892
2089
|
`;
|
|
1893
|
-
var Container =
|
|
2090
|
+
var Container = import_styled_components18.default.div`
|
|
1894
2091
|
width: ${(props) => props.$size}px;
|
|
1895
2092
|
height: ${(props) => props.$size}px;
|
|
1896
2093
|
border-radius: ${(props) => props.$shape === "circle" ? "50%" : "4px"};
|
|
@@ -1901,7 +2098,7 @@ var Container = import_styled_components16.default.div`
|
|
|
1901
2098
|
flex-shrink: 0;
|
|
1902
2099
|
overflow: hidden;
|
|
1903
2100
|
`;
|
|
1904
|
-
var BadgeSlot =
|
|
2101
|
+
var BadgeSlot = import_styled_components18.default.div`
|
|
1905
2102
|
position: absolute;
|
|
1906
2103
|
right: 0;
|
|
1907
2104
|
bottom: 0;
|
|
@@ -1915,12 +2112,12 @@ var BadgeSlot = import_styled_components16.default.div`
|
|
|
1915
2112
|
box-shadow: 0 2px 6px ${colors.blue_950}66;
|
|
1916
2113
|
line-height: 0;
|
|
1917
2114
|
`;
|
|
1918
|
-
var BadgeIcon =
|
|
2115
|
+
var BadgeIcon = import_styled_components18.default.i`
|
|
1919
2116
|
color: ${colors.blue_950};
|
|
1920
2117
|
font-size: ${(props) => Math.round(props.$size * 0.2)}px;
|
|
1921
2118
|
line-height: 2;
|
|
1922
2119
|
`;
|
|
1923
|
-
var Initials =
|
|
2120
|
+
var Initials = import_styled_components18.default.span`
|
|
1924
2121
|
color: ${(props) => props.$textColor};
|
|
1925
2122
|
font-weight: 600;
|
|
1926
2123
|
font-size: ${(props) => Math.round(props.$size * 0.4)}px;
|
|
@@ -1942,20 +2139,20 @@ var Avatar = ({
|
|
|
1942
2139
|
badge
|
|
1943
2140
|
}) => {
|
|
1944
2141
|
var _a;
|
|
1945
|
-
const [hasImageError, setHasImageError] = (0,
|
|
2142
|
+
const [hasImageError, setHasImageError] = (0, import_react9.useState)(false);
|
|
1946
2143
|
const resolvedBackground = resolveColor(backgroundColor, colors.grey_300);
|
|
1947
2144
|
const resolvedText = resolveColor(textColor, colors.dark);
|
|
1948
2145
|
const initials = getInitials(name);
|
|
1949
2146
|
const sizePx = `${size}px`;
|
|
1950
2147
|
const borderRadius = shape === "circle" ? "50%" : "4px";
|
|
1951
|
-
return /* @__PURE__ */ (0,
|
|
1952
|
-
/* @__PURE__ */ (0,
|
|
2148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Wrapper3, { children: [
|
|
2149
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1953
2150
|
Container,
|
|
1954
2151
|
{
|
|
1955
2152
|
$size: size,
|
|
1956
2153
|
$shape: shape,
|
|
1957
2154
|
$backgroundColor: resolvedBackground,
|
|
1958
|
-
children: src && !hasImageError ? /* @__PURE__ */ (0,
|
|
2155
|
+
children: src && !hasImageError ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1959
2156
|
Image2,
|
|
1960
2157
|
{
|
|
1961
2158
|
src,
|
|
@@ -1965,10 +2162,10 @@ var Avatar = ({
|
|
|
1965
2162
|
borderRadius,
|
|
1966
2163
|
onError: () => setHasImageError(true)
|
|
1967
2164
|
}
|
|
1968
|
-
) : /* @__PURE__ */ (0,
|
|
2165
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Initials, { $textColor: resolvedText, $size: size, children: initials })
|
|
1969
2166
|
}
|
|
1970
2167
|
),
|
|
1971
|
-
badge && /* @__PURE__ */ (0,
|
|
2168
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BadgeSlot, { $size: size, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1972
2169
|
BadgeIcon,
|
|
1973
2170
|
{
|
|
1974
2171
|
$size: size,
|
|
@@ -1979,11 +2176,11 @@ var Avatar = ({
|
|
|
1979
2176
|
};
|
|
1980
2177
|
|
|
1981
2178
|
// src/Components/Select/Select.tsx
|
|
1982
|
-
var
|
|
1983
|
-
var
|
|
1984
|
-
var
|
|
1985
|
-
var
|
|
1986
|
-
var StyledContainer =
|
|
2179
|
+
var import_react10 = require("react");
|
|
2180
|
+
var import_react_dom2 = __toESM(require("react-dom"));
|
|
2181
|
+
var import_styled_components19 = __toESM(require("styled-components"));
|
|
2182
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2183
|
+
var StyledContainer = import_styled_components19.default.div.withConfig({
|
|
1987
2184
|
shouldForwardProp: (prop) => !["width", "noFlex", "label"].includes(prop)
|
|
1988
2185
|
})`
|
|
1989
2186
|
display: flex;
|
|
@@ -1994,11 +2191,11 @@ var StyledContainer = import_styled_components17.default.div.withConfig({
|
|
|
1994
2191
|
min-width: 100px;
|
|
1995
2192
|
gap: ${(props) => props.label ? "6px" : "0"};
|
|
1996
2193
|
`;
|
|
1997
|
-
var SelectWrapper =
|
|
2194
|
+
var SelectWrapper = import_styled_components19.default.div`
|
|
1998
2195
|
position: relative;
|
|
1999
2196
|
width: 100%;
|
|
2000
2197
|
`;
|
|
2001
|
-
var SelectInput =
|
|
2198
|
+
var SelectInput = import_styled_components19.default.div`
|
|
2002
2199
|
width: 100%;
|
|
2003
2200
|
border-radius: 5px;
|
|
2004
2201
|
cursor: ${(props) => props.disabled ? "not-allowed" : "pointer"};
|
|
@@ -2032,13 +2229,13 @@ var SelectInput = import_styled_components17.default.div`
|
|
|
2032
2229
|
flex-shrink: 0;
|
|
2033
2230
|
}
|
|
2034
2231
|
`;
|
|
2035
|
-
var ChevronIcon = (0,
|
|
2232
|
+
var ChevronIcon = (0, import_styled_components19.default)(Icon).withConfig({
|
|
2036
2233
|
shouldForwardProp: (prop) => prop !== "isOpen"
|
|
2037
2234
|
})`
|
|
2038
2235
|
transition: transform 0.3s ease;
|
|
2039
2236
|
transform: ${(props) => props.isOpen ? "rotate(180deg)" : "rotate(0deg)"};
|
|
2040
2237
|
`;
|
|
2041
|
-
var Dropdown =
|
|
2238
|
+
var Dropdown = import_styled_components19.default.div`
|
|
2042
2239
|
position: absolute;
|
|
2043
2240
|
border: 1px solid ${colors.grey_200};
|
|
2044
2241
|
border-radius: 5px;
|
|
@@ -2050,10 +2247,10 @@ var Dropdown = import_styled_components17.default.div`
|
|
|
2050
2247
|
flex-direction: column;
|
|
2051
2248
|
font-size: 12px;
|
|
2052
2249
|
`;
|
|
2053
|
-
var DropdownList =
|
|
2250
|
+
var DropdownList = import_styled_components19.default.div`
|
|
2054
2251
|
overflow-y: scroll;
|
|
2055
2252
|
`;
|
|
2056
|
-
var SearchInput =
|
|
2253
|
+
var SearchInput = import_styled_components19.default.input`
|
|
2057
2254
|
position: relative;
|
|
2058
2255
|
width: 100%;
|
|
2059
2256
|
padding: 8px;
|
|
@@ -2068,7 +2265,7 @@ var SearchInput = import_styled_components17.default.input`
|
|
|
2068
2265
|
0 0 10px rgba(24, 49, 75, 0.188);
|
|
2069
2266
|
}
|
|
2070
2267
|
`;
|
|
2071
|
-
var Option =
|
|
2268
|
+
var Option = import_styled_components19.default.div`
|
|
2072
2269
|
padding: 8px;
|
|
2073
2270
|
cursor: pointer;
|
|
2074
2271
|
background-color: ${(props) => props.$isActive ? colors.grey_100 : "transparent"};
|
|
@@ -2092,13 +2289,13 @@ var Select = ({
|
|
|
2092
2289
|
hideSearchBar,
|
|
2093
2290
|
noFlex
|
|
2094
2291
|
}) => {
|
|
2095
|
-
const [isOpen, setIsOpen] = (0,
|
|
2096
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
2097
|
-
const [dropdownPosition, setDropdownPosition] = (0,
|
|
2098
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
2099
|
-
const containerRef = (0,
|
|
2100
|
-
const dropdownRef = (0,
|
|
2101
|
-
const searchInputRef = (0,
|
|
2292
|
+
const [isOpen, setIsOpen] = (0, import_react10.useState)(false);
|
|
2293
|
+
const [searchTerm, setSearchTerm] = (0, import_react10.useState)("");
|
|
2294
|
+
const [dropdownPosition, setDropdownPosition] = (0, import_react10.useState)({});
|
|
2295
|
+
const [activeIndex, setActiveIndex] = (0, import_react10.useState)(0);
|
|
2296
|
+
const containerRef = (0, import_react10.useRef)(null);
|
|
2297
|
+
const dropdownRef = (0, import_react10.useRef)(null);
|
|
2298
|
+
const searchInputRef = (0, import_react10.useRef)(null);
|
|
2102
2299
|
const selectedOption = options.find((option) => option.value === value);
|
|
2103
2300
|
const handleSelect = (option) => {
|
|
2104
2301
|
onChange == null ? void 0 : onChange(option.value);
|
|
@@ -2151,7 +2348,7 @@ var Select = ({
|
|
|
2151
2348
|
}
|
|
2152
2349
|
}
|
|
2153
2350
|
};
|
|
2154
|
-
(0,
|
|
2351
|
+
(0, import_react10.useEffect)(() => {
|
|
2155
2352
|
const handleClickOutside = (event) => {
|
|
2156
2353
|
if (containerRef.current && !containerRef.current.contains(event.target) && dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
2157
2354
|
setSearchTerm("");
|
|
@@ -2183,14 +2380,14 @@ var Select = ({
|
|
|
2183
2380
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
2184
2381
|
};
|
|
2185
2382
|
}, [isOpen]);
|
|
2186
|
-
return /* @__PURE__ */ (0,
|
|
2187
|
-
/* @__PURE__ */ (0,
|
|
2383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(StyledContainer, { width, noFlex, label, children: [
|
|
2384
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { size: "xs", children: [
|
|
2188
2385
|
label,
|
|
2189
2386
|
" ",
|
|
2190
|
-
required && /* @__PURE__ */ (0,
|
|
2387
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { style: { color: "red" }, children: "*" })
|
|
2191
2388
|
] }),
|
|
2192
|
-
/* @__PURE__ */ (0,
|
|
2193
|
-
/* @__PURE__ */ (0,
|
|
2389
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(SelectWrapper, { ref: containerRef, onKeyDown: handleKeyDown, tabIndex: 0, children: [
|
|
2390
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2194
2391
|
SelectInput,
|
|
2195
2392
|
{
|
|
2196
2393
|
height,
|
|
@@ -2199,13 +2396,13 @@ var Select = ({
|
|
|
2199
2396
|
onClick: handleToggle,
|
|
2200
2397
|
disabled,
|
|
2201
2398
|
children: [
|
|
2202
|
-
/* @__PURE__ */ (0,
|
|
2203
|
-
/* @__PURE__ */ (0,
|
|
2399
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: selectedOption ? selectedOption.label : placeholder }),
|
|
2400
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChevronIcon, { name: "chevron-down", isOpen })
|
|
2204
2401
|
]
|
|
2205
2402
|
}
|
|
2206
2403
|
),
|
|
2207
|
-
isOpen &&
|
|
2208
|
-
/* @__PURE__ */ (0,
|
|
2404
|
+
isOpen && import_react_dom2.default.createPortal(
|
|
2405
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2209
2406
|
Dropdown,
|
|
2210
2407
|
{
|
|
2211
2408
|
ref: dropdownRef,
|
|
@@ -2215,7 +2412,7 @@ var Select = ({
|
|
|
2215
2412
|
width: dropdownPosition.width
|
|
2216
2413
|
},
|
|
2217
2414
|
children: [
|
|
2218
|
-
!hideSearchBar && /* @__PURE__ */ (0,
|
|
2415
|
+
!hideSearchBar && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2219
2416
|
SearchInput,
|
|
2220
2417
|
{
|
|
2221
2418
|
ref: searchInputRef,
|
|
@@ -2225,7 +2422,7 @@ var Select = ({
|
|
|
2225
2422
|
onChange: handleSearch
|
|
2226
2423
|
}
|
|
2227
2424
|
),
|
|
2228
|
-
/* @__PURE__ */ (0,
|
|
2425
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropdownList, { children: filteredOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2229
2426
|
Option,
|
|
2230
2427
|
{
|
|
2231
2428
|
$isActive: index === activeIndex,
|
|
@@ -2246,9 +2443,9 @@ var Select = ({
|
|
|
2246
2443
|
};
|
|
2247
2444
|
|
|
2248
2445
|
// src/Components/Input/Input.tsx
|
|
2249
|
-
var
|
|
2250
|
-
var
|
|
2251
|
-
var
|
|
2446
|
+
var import_react11 = require("react");
|
|
2447
|
+
var import_styled_components20 = __toESM(require("styled-components"));
|
|
2448
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2252
2449
|
var shouldForwardProp8 = (prop) => ![
|
|
2253
2450
|
"width",
|
|
2254
2451
|
"fullWidth",
|
|
@@ -2260,7 +2457,7 @@ var shouldForwardProp8 = (prop) => ![
|
|
|
2260
2457
|
"marginTop",
|
|
2261
2458
|
"asTextArea"
|
|
2262
2459
|
].includes(prop);
|
|
2263
|
-
var StyledContainer2 =
|
|
2460
|
+
var StyledContainer2 = import_styled_components20.default.div.withConfig({
|
|
2264
2461
|
shouldForwardProp: shouldForwardProp8
|
|
2265
2462
|
})`
|
|
2266
2463
|
display: flex;
|
|
@@ -2270,7 +2467,7 @@ var StyledContainer2 = import_styled_components18.default.div.withConfig({
|
|
|
2270
2467
|
max-width: ${(props) => props.width || "100%"};
|
|
2271
2468
|
gap: 6px;
|
|
2272
2469
|
`;
|
|
2273
|
-
var StyledInput =
|
|
2470
|
+
var StyledInput = import_styled_components20.default.input.withConfig({
|
|
2274
2471
|
shouldForwardProp: shouldForwardProp8
|
|
2275
2472
|
})`
|
|
2276
2473
|
max-width: ${(props) => props.width || "100%"};
|
|
@@ -2301,7 +2498,7 @@ var StyledInput = import_styled_components18.default.input.withConfig({
|
|
|
2301
2498
|
background-color: ${colors.grey_100};
|
|
2302
2499
|
}
|
|
2303
2500
|
`;
|
|
2304
|
-
var StyledTextarea =
|
|
2501
|
+
var StyledTextarea = import_styled_components20.default.textarea.withConfig({
|
|
2305
2502
|
shouldForwardProp: shouldForwardProp8
|
|
2306
2503
|
})`
|
|
2307
2504
|
max-width: ${(props) => props.width || "100%"};
|
|
@@ -2331,7 +2528,7 @@ var StyledTextarea = import_styled_components18.default.textarea.withConfig({
|
|
|
2331
2528
|
background-color: ${colors.grey_100};
|
|
2332
2529
|
}
|
|
2333
2530
|
`;
|
|
2334
|
-
var EyeButton =
|
|
2531
|
+
var EyeButton = import_styled_components20.default.button`
|
|
2335
2532
|
background: none;
|
|
2336
2533
|
border: none;
|
|
2337
2534
|
position: absolute;
|
|
@@ -2343,11 +2540,11 @@ var EyeButton = import_styled_components18.default.button`
|
|
|
2343
2540
|
display: flex;
|
|
2344
2541
|
align-items: center;
|
|
2345
2542
|
`;
|
|
2346
|
-
var InputWrapper =
|
|
2543
|
+
var InputWrapper = import_styled_components20.default.div`
|
|
2347
2544
|
position: relative;
|
|
2348
2545
|
width: 100%;
|
|
2349
2546
|
`;
|
|
2350
|
-
var CalendarButton = (0,
|
|
2547
|
+
var CalendarButton = (0, import_styled_components20.default)(EyeButton)`
|
|
2351
2548
|
color: ${colors.grey_500};
|
|
2352
2549
|
|
|
2353
2550
|
&:disabled {
|
|
@@ -2355,7 +2552,7 @@ var CalendarButton = (0, import_styled_components18.default)(EyeButton)`
|
|
|
2355
2552
|
opacity: 0.5;
|
|
2356
2553
|
}
|
|
2357
2554
|
`;
|
|
2358
|
-
var HiddenDateInput =
|
|
2555
|
+
var HiddenDateInput = import_styled_components20.default.input`
|
|
2359
2556
|
position: absolute;
|
|
2360
2557
|
inset: 0;
|
|
2361
2558
|
opacity: 0;
|
|
@@ -2363,7 +2560,7 @@ var HiddenDateInput = import_styled_components18.default.input`
|
|
|
2363
2560
|
height: 100%;
|
|
2364
2561
|
width: 100%;
|
|
2365
2562
|
`;
|
|
2366
|
-
var SearchIconLeft =
|
|
2563
|
+
var SearchIconLeft = import_styled_components20.default.span`
|
|
2367
2564
|
position: absolute;
|
|
2368
2565
|
left: 10px;
|
|
2369
2566
|
top: 0;
|
|
@@ -2374,7 +2571,7 @@ var SearchIconLeft = import_styled_components18.default.span`
|
|
|
2374
2571
|
pointer-events: none;
|
|
2375
2572
|
z-index: 1;
|
|
2376
2573
|
`;
|
|
2377
|
-
var SearchIconRight =
|
|
2574
|
+
var SearchIconRight = import_styled_components20.default.span`
|
|
2378
2575
|
position: absolute;
|
|
2379
2576
|
right: 10px;
|
|
2380
2577
|
top: 0;
|
|
@@ -2452,7 +2649,7 @@ var displayToIso = (displayValue) => {
|
|
|
2452
2649
|
const isoDay = String(day).padStart(2, "0");
|
|
2453
2650
|
return `${yearStr}-${isoMonth}-${isoDay}`;
|
|
2454
2651
|
};
|
|
2455
|
-
var Input = (0,
|
|
2652
|
+
var Input = (0, import_react11.forwardRef)((props, ref) => {
|
|
2456
2653
|
const _a = props, {
|
|
2457
2654
|
label,
|
|
2458
2655
|
value,
|
|
@@ -2491,11 +2688,11 @@ var Input = (0, import_react9.forwardRef)((props, ref) => {
|
|
|
2491
2688
|
const inputName = otherProps == null ? void 0 : otherProps.name;
|
|
2492
2689
|
const { min, max, step } = otherProps || {};
|
|
2493
2690
|
const _b = otherProps || {}, { name } = _b, forwardProps = __objRest(_b, ["name"]);
|
|
2494
|
-
const [showPassword, setShowPassword] = (0,
|
|
2495
|
-
const [displayDateValue, setDisplayDateValue] = (0,
|
|
2496
|
-
const nativeDateRef = (0,
|
|
2497
|
-
const innerRef = (0,
|
|
2498
|
-
(0,
|
|
2691
|
+
const [showPassword, setShowPassword] = (0, import_react11.useState)(false);
|
|
2692
|
+
const [displayDateValue, setDisplayDateValue] = (0, import_react11.useState)("");
|
|
2693
|
+
const nativeDateRef = (0, import_react11.useRef)(null);
|
|
2694
|
+
const innerRef = (0, import_react11.useRef)(null);
|
|
2695
|
+
(0, import_react11.useImperativeHandle)(
|
|
2499
2696
|
ref,
|
|
2500
2697
|
() => innerRef.current
|
|
2501
2698
|
);
|
|
@@ -2513,7 +2710,7 @@ var Input = (0, import_react9.forwardRef)((props, ref) => {
|
|
|
2513
2710
|
const computedStyle = isSearch ? __spreadValues(__spreadValues({
|
|
2514
2711
|
paddingLeft: "34px"
|
|
2515
2712
|
}, hasSearchValue && onClear ? { paddingRight: "34px" } : {}), style2) : style2;
|
|
2516
|
-
(0,
|
|
2713
|
+
(0, import_react11.useEffect)(() => {
|
|
2517
2714
|
if (isDate) {
|
|
2518
2715
|
const formatted = formatIsoToDisplay(isoValue);
|
|
2519
2716
|
setDisplayDateValue((prev) => formatted !== prev ? formatted : prev);
|
|
@@ -2579,21 +2776,21 @@ var Input = (0, import_react9.forwardRef)((props, ref) => {
|
|
|
2579
2776
|
}
|
|
2580
2777
|
}
|
|
2581
2778
|
};
|
|
2582
|
-
return /* @__PURE__ */ (0,
|
|
2779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2583
2780
|
StyledContainer2,
|
|
2584
2781
|
__spreadProps(__spreadValues({
|
|
2585
2782
|
noFlex
|
|
2586
2783
|
}, forwardProps), {
|
|
2587
2784
|
children: [
|
|
2588
|
-
label && /* @__PURE__ */ (0,
|
|
2785
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text_default, { size: "xs", children: [
|
|
2589
2786
|
label,
|
|
2590
2787
|
" ",
|
|
2591
|
-
required && /* @__PURE__ */ (0,
|
|
2788
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { style: { color: "red" }, children: "*" })
|
|
2592
2789
|
] }),
|
|
2593
|
-
/* @__PURE__ */ (0,
|
|
2594
|
-
isSearch && /* @__PURE__ */ (0,
|
|
2595
|
-
isDate ? /* @__PURE__ */ (0,
|
|
2596
|
-
/* @__PURE__ */ (0,
|
|
2790
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(InputWrapper, { children: [
|
|
2791
|
+
isSearch && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SearchIconLeft, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon_default, { name: "magnifying-glass", size: "s", color: "grey_500" }) }),
|
|
2792
|
+
isDate ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
2793
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2597
2794
|
StyledInput,
|
|
2598
2795
|
__spreadProps(__spreadValues({
|
|
2599
2796
|
id: inputId,
|
|
@@ -2618,7 +2815,7 @@ var Input = (0, import_react9.forwardRef)((props, ref) => {
|
|
|
2618
2815
|
step: void 0
|
|
2619
2816
|
})
|
|
2620
2817
|
),
|
|
2621
|
-
/* @__PURE__ */ (0,
|
|
2818
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2622
2819
|
HiddenDateInput,
|
|
2623
2820
|
{
|
|
2624
2821
|
ref: nativeDateRef,
|
|
@@ -2635,14 +2832,14 @@ var Input = (0, import_react9.forwardRef)((props, ref) => {
|
|
|
2635
2832
|
name: inputName
|
|
2636
2833
|
}
|
|
2637
2834
|
),
|
|
2638
|
-
/* @__PURE__ */ (0,
|
|
2835
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2639
2836
|
CalendarButton,
|
|
2640
2837
|
{
|
|
2641
2838
|
type: "button",
|
|
2642
2839
|
onClick: openNativePicker,
|
|
2643
2840
|
"aria-label": "Ouvrir le calendrier",
|
|
2644
2841
|
disabled,
|
|
2645
|
-
children: /* @__PURE__ */ (0,
|
|
2842
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2646
2843
|
Icon_default,
|
|
2647
2844
|
{
|
|
2648
2845
|
family: "regular",
|
|
@@ -2653,7 +2850,7 @@ var Input = (0, import_react9.forwardRef)((props, ref) => {
|
|
|
2653
2850
|
)
|
|
2654
2851
|
}
|
|
2655
2852
|
)
|
|
2656
|
-
] }) : /* @__PURE__ */ (0,
|
|
2853
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2657
2854
|
Component,
|
|
2658
2855
|
__spreadValues({
|
|
2659
2856
|
id: inputId,
|
|
@@ -2670,17 +2867,17 @@ var Input = (0, import_react9.forwardRef)((props, ref) => {
|
|
|
2670
2867
|
style: computedStyle
|
|
2671
2868
|
}, forwardProps)
|
|
2672
2869
|
),
|
|
2673
|
-
isPassword && /* @__PURE__ */ (0,
|
|
2870
|
+
isPassword && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2674
2871
|
EyeButton,
|
|
2675
2872
|
{
|
|
2676
2873
|
type: "button",
|
|
2677
2874
|
tabIndex: -1,
|
|
2678
2875
|
onClick: () => setShowPassword((v) => !v),
|
|
2679
2876
|
"aria-label": showPassword ? "Masquer le mot de passe" : "Afficher le mot de passe",
|
|
2680
|
-
children: showPassword ? /* @__PURE__ */ (0,
|
|
2877
|
+
children: showPassword ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon_default, { name: "eye-slash", size: "m", color: "grey_500" }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon_default, { name: "eye", size: "m", color: "grey_500" })
|
|
2681
2878
|
}
|
|
2682
2879
|
),
|
|
2683
|
-
isSearch && hasSearchValue && onClear && /* @__PURE__ */ (0,
|
|
2880
|
+
isSearch && hasSearchValue && onClear && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SearchIconRight, { onClick: onClear, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon_default, { name: "xmark", size: "s", color: "grey_500" }) })
|
|
2684
2881
|
] })
|
|
2685
2882
|
]
|
|
2686
2883
|
})
|
|
@@ -2689,9 +2886,9 @@ var Input = (0, import_react9.forwardRef)((props, ref) => {
|
|
|
2689
2886
|
Input.displayName = "Input";
|
|
2690
2887
|
|
|
2691
2888
|
// src/Components/Checkbox/Checkbox.tsx
|
|
2692
|
-
var
|
|
2693
|
-
var
|
|
2694
|
-
var CheckboxContainer =
|
|
2889
|
+
var import_styled_components21 = __toESM(require("styled-components"));
|
|
2890
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2891
|
+
var CheckboxContainer = import_styled_components21.default.div`
|
|
2695
2892
|
display: flex;
|
|
2696
2893
|
flex-direction: row;
|
|
2697
2894
|
align-items: center;
|
|
@@ -2699,12 +2896,12 @@ var CheckboxContainer = import_styled_components19.default.div`
|
|
|
2699
2896
|
gap: 8px;
|
|
2700
2897
|
margin: ${(props) => props.margin || "0"};
|
|
2701
2898
|
`;
|
|
2702
|
-
var StyledCheckbox =
|
|
2899
|
+
var StyledCheckbox = import_styled_components21.default.input.attrs({ type: "checkbox" })`
|
|
2703
2900
|
width: 14px;
|
|
2704
2901
|
height: 14px;
|
|
2705
2902
|
accent-color: ${(props) => colors[props.$variant || ""] || colors.secondary};
|
|
2706
2903
|
`;
|
|
2707
|
-
var StyledLabel =
|
|
2904
|
+
var StyledLabel = import_styled_components21.default.label`
|
|
2708
2905
|
cursor: ${(props) => props.disabled ? "not-allowed" : "pointer"};
|
|
2709
2906
|
`;
|
|
2710
2907
|
var Checkbox = ({
|
|
@@ -2717,8 +2914,8 @@ var Checkbox = ({
|
|
|
2717
2914
|
variant = "blue_700"
|
|
2718
2915
|
}) => {
|
|
2719
2916
|
const uniqueId = `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
2720
|
-
return /* @__PURE__ */ (0,
|
|
2721
|
-
/* @__PURE__ */ (0,
|
|
2917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(CheckboxContainer, { children: [
|
|
2918
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2722
2919
|
StyledCheckbox,
|
|
2723
2920
|
{
|
|
2724
2921
|
id: uniqueId,
|
|
@@ -2728,28 +2925,28 @@ var Checkbox = ({
|
|
|
2728
2925
|
$variant: variant
|
|
2729
2926
|
}
|
|
2730
2927
|
),
|
|
2731
|
-
/* @__PURE__ */ (0,
|
|
2928
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledLabel, { htmlFor: uniqueId, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text_default, { size, children: label || children }) })
|
|
2732
2929
|
] });
|
|
2733
2930
|
};
|
|
2734
2931
|
|
|
2735
2932
|
// src/Components/Radio/Radio.tsx
|
|
2736
|
-
var
|
|
2737
|
-
var
|
|
2738
|
-
var
|
|
2739
|
-
var RadioContainer =
|
|
2933
|
+
var import_react12 = require("react");
|
|
2934
|
+
var import_styled_components22 = __toESM(require("styled-components"));
|
|
2935
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2936
|
+
var RadioContainer = import_styled_components22.default.div`
|
|
2740
2937
|
display: flex;
|
|
2741
2938
|
flex-direction: row;
|
|
2742
2939
|
align-items: center;
|
|
2743
2940
|
gap: 8px;
|
|
2744
2941
|
margin: ${(props) => props.margin || "0"};
|
|
2745
2942
|
`;
|
|
2746
|
-
var HiddenRadio =
|
|
2943
|
+
var HiddenRadio = import_styled_components22.default.input.attrs({ type: "radio" })`
|
|
2747
2944
|
opacity: 0;
|
|
2748
2945
|
width: 0;
|
|
2749
2946
|
height: 0;
|
|
2750
2947
|
position: absolute;
|
|
2751
2948
|
`;
|
|
2752
|
-
var CustomRadio =
|
|
2949
|
+
var CustomRadio = import_styled_components22.default.span`
|
|
2753
2950
|
display: inline-block;
|
|
2754
2951
|
vertical-align: middle;
|
|
2755
2952
|
width: 22px;
|
|
@@ -2775,7 +2972,7 @@ var CustomRadio = import_styled_components20.default.span`
|
|
|
2775
2972
|
transform: translate(-50%, -50%);
|
|
2776
2973
|
}
|
|
2777
2974
|
`;
|
|
2778
|
-
var StyledLabel2 =
|
|
2975
|
+
var StyledLabel2 = import_styled_components22.default.label`
|
|
2779
2976
|
cursor: ${(props) => props.disabled ? "not-allowed" : "pointer"};
|
|
2780
2977
|
`;
|
|
2781
2978
|
var Radio = ({
|
|
@@ -2790,10 +2987,10 @@ var Radio = ({
|
|
|
2790
2987
|
value
|
|
2791
2988
|
}) => {
|
|
2792
2989
|
const color = colors[variant] || colors.blue_950;
|
|
2793
|
-
const generatedId = (0,
|
|
2990
|
+
const generatedId = (0, import_react12.useId)();
|
|
2794
2991
|
const uniqueId = `radio-${generatedId}`;
|
|
2795
|
-
return /* @__PURE__ */ (0,
|
|
2796
|
-
/* @__PURE__ */ (0,
|
|
2992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RadioContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(StyledLabel2, { htmlFor: uniqueId, disabled, children: [
|
|
2993
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2797
2994
|
HiddenRadio,
|
|
2798
2995
|
{
|
|
2799
2996
|
id: uniqueId,
|
|
@@ -2804,21 +3001,21 @@ var Radio = ({
|
|
|
2804
3001
|
value
|
|
2805
3002
|
}
|
|
2806
3003
|
),
|
|
2807
|
-
/* @__PURE__ */ (0,
|
|
2808
|
-
/* @__PURE__ */ (0,
|
|
3004
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CustomRadio, { color, checked, disabled }),
|
|
3005
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text_default, { size, children: label || children })
|
|
2809
3006
|
] }) });
|
|
2810
3007
|
};
|
|
2811
3008
|
|
|
2812
3009
|
// src/Components/Accordion/Accordion.tsx
|
|
2813
|
-
var
|
|
2814
|
-
var
|
|
2815
|
-
var
|
|
2816
|
-
var Wrapper4 =
|
|
3010
|
+
var import_react13 = require("react");
|
|
3011
|
+
var import_styled_components23 = __toESM(require("styled-components"));
|
|
3012
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3013
|
+
var Wrapper4 = import_styled_components23.default.div`
|
|
2817
3014
|
width: 100%;
|
|
2818
3015
|
border-radius: 8px;
|
|
2819
3016
|
overflow: hidden;
|
|
2820
3017
|
`;
|
|
2821
|
-
var ItemWrapper =
|
|
3018
|
+
var ItemWrapper = import_styled_components23.default.div`
|
|
2822
3019
|
width: 100%;
|
|
2823
3020
|
border-bottom: 1px solid ${colors.grey_300};
|
|
2824
3021
|
background-color: ${colors.white};
|
|
@@ -2829,7 +3026,7 @@ var ItemWrapper = import_styled_components21.default.div`
|
|
|
2829
3026
|
border-bottom: none;
|
|
2830
3027
|
}
|
|
2831
3028
|
`;
|
|
2832
|
-
var Header =
|
|
3029
|
+
var Header = import_styled_components23.default.div`
|
|
2833
3030
|
display: flex;
|
|
2834
3031
|
align-items: center;
|
|
2835
3032
|
justify-content: space-between;
|
|
@@ -2843,13 +3040,13 @@ var Header = import_styled_components21.default.div`
|
|
|
2843
3040
|
background-color: ${(p) => p.$disabled ? "transparent" : colors.grey_100};
|
|
2844
3041
|
}
|
|
2845
3042
|
`;
|
|
2846
|
-
var TriggerRow =
|
|
3043
|
+
var TriggerRow = import_styled_components23.default.div`
|
|
2847
3044
|
display: flex;
|
|
2848
3045
|
align-items: center;
|
|
2849
3046
|
gap: 8px;
|
|
2850
3047
|
flex: 1;
|
|
2851
3048
|
`;
|
|
2852
|
-
var ContentPadding =
|
|
3049
|
+
var ContentPadding = import_styled_components23.default.div`
|
|
2853
3050
|
padding: 8px;
|
|
2854
3051
|
`;
|
|
2855
3052
|
var Accordion = ({
|
|
@@ -2871,8 +3068,8 @@ var Accordion = ({
|
|
|
2871
3068
|
backgroundHeader = colors.white
|
|
2872
3069
|
}) => {
|
|
2873
3070
|
const resolvedBackgroundHeader = typeof backgroundHeader === "string" && backgroundHeader in colors ? colors[backgroundHeader] : backgroundHeader;
|
|
2874
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
2875
|
-
const [internalOpenId, setInternalOpenId] = (0,
|
|
3071
|
+
const [internalOpen, setInternalOpen] = (0, import_react13.useState)(defaultOpen);
|
|
3072
|
+
const [internalOpenId, setInternalOpenId] = (0, import_react13.useState)(
|
|
2876
3073
|
null
|
|
2877
3074
|
);
|
|
2878
3075
|
const isControlled = controlledOpen !== void 0;
|
|
@@ -2887,21 +3084,21 @@ var Accordion = ({
|
|
|
2887
3084
|
setInternalOpen((prev) => !prev);
|
|
2888
3085
|
}
|
|
2889
3086
|
};
|
|
2890
|
-
const toggleItem = (0,
|
|
3087
|
+
const toggleItem = (0, import_react13.useCallback)(
|
|
2891
3088
|
(id) => {
|
|
2892
3089
|
if (disabled) return;
|
|
2893
|
-
const
|
|
3090
|
+
const nextId2 = activeItemId === id ? null : id;
|
|
2894
3091
|
if (isMultiControlled) {
|
|
2895
|
-
onItemToggle == null ? void 0 : onItemToggle(
|
|
3092
|
+
onItemToggle == null ? void 0 : onItemToggle(nextId2);
|
|
2896
3093
|
} else {
|
|
2897
|
-
setInternalOpenId(
|
|
3094
|
+
setInternalOpenId(nextId2);
|
|
2898
3095
|
}
|
|
2899
3096
|
},
|
|
2900
3097
|
[disabled, activeItemId, isMultiControlled, onItemToggle]
|
|
2901
3098
|
);
|
|
2902
3099
|
if (items) {
|
|
2903
|
-
return /* @__PURE__ */ (0,
|
|
2904
|
-
/* @__PURE__ */ (0,
|
|
3100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Wrapper4, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ItemWrapper, { $bordered: bordered, children: [
|
|
3101
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2905
3102
|
Header,
|
|
2906
3103
|
{
|
|
2907
3104
|
$disabled: disabled,
|
|
@@ -2910,9 +3107,9 @@ var Accordion = ({
|
|
|
2910
3107
|
"aria-expanded": activeItemId === item.id,
|
|
2911
3108
|
onClick: () => toggleItem(item.id),
|
|
2912
3109
|
children: [
|
|
2913
|
-
/* @__PURE__ */ (0,
|
|
3110
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TriggerRow, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { size: "s", weight: "600", children: item.title }) }),
|
|
2914
3111
|
titleEnd,
|
|
2915
|
-
/* @__PURE__ */ (0,
|
|
3112
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2916
3113
|
Icon,
|
|
2917
3114
|
{
|
|
2918
3115
|
name: activeItemId === item.id ? "chevron-up" : "chevron-down",
|
|
@@ -2922,11 +3119,11 @@ var Accordion = ({
|
|
|
2922
3119
|
]
|
|
2923
3120
|
}
|
|
2924
3121
|
),
|
|
2925
|
-
/* @__PURE__ */ (0,
|
|
3122
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Collapse, { open: activeItemId === item.id, maxHeight, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ContentPadding, { children: item.content }) })
|
|
2926
3123
|
] }, item.id)) });
|
|
2927
3124
|
}
|
|
2928
|
-
return /* @__PURE__ */ (0,
|
|
2929
|
-
/* @__PURE__ */ (0,
|
|
3125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ItemWrapper, { $bordered: bordered, children: [
|
|
3126
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2930
3127
|
Header,
|
|
2931
3128
|
{
|
|
2932
3129
|
$disabled: disabled,
|
|
@@ -2935,7 +3132,7 @@ var Accordion = ({
|
|
|
2935
3132
|
"aria-expanded": isOpen,
|
|
2936
3133
|
onClick: handleToggle,
|
|
2937
3134
|
children: [
|
|
2938
|
-
needCheckbox && /* @__PURE__ */ (0,
|
|
3135
|
+
needCheckbox && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2939
3136
|
Checkbox,
|
|
2940
3137
|
{
|
|
2941
3138
|
value: checkboxValue,
|
|
@@ -2943,46 +3140,46 @@ var Accordion = ({
|
|
|
2943
3140
|
disabled
|
|
2944
3141
|
}
|
|
2945
3142
|
),
|
|
2946
|
-
/* @__PURE__ */ (0,
|
|
3143
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TriggerRow, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { size: "s", weight: "600", children: title }) }),
|
|
2947
3144
|
titleEnd,
|
|
2948
|
-
/* @__PURE__ */ (0,
|
|
3145
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { name: isOpen ? "chevron-up" : "chevron-down", size: "m" })
|
|
2949
3146
|
]
|
|
2950
3147
|
}
|
|
2951
3148
|
),
|
|
2952
|
-
/* @__PURE__ */ (0,
|
|
3149
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Collapse, { open: isOpen, maxHeight, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ContentPadding, { children }) })
|
|
2953
3150
|
] });
|
|
2954
3151
|
};
|
|
2955
3152
|
|
|
2956
3153
|
// src/Components/ColorPicker/ColorPicker.tsx
|
|
2957
|
-
var
|
|
2958
|
-
var
|
|
2959
|
-
var
|
|
3154
|
+
var import_react14 = require("react");
|
|
3155
|
+
var import_styled_components24 = __toESM(require("styled-components"));
|
|
3156
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2960
3157
|
var SIZES = {
|
|
2961
3158
|
s: { swatch: 28, fontSize: 12, inputPadding: "6px 10px" },
|
|
2962
3159
|
m: { swatch: 36, fontSize: 14, inputPadding: "8px 12px" },
|
|
2963
3160
|
l: { swatch: 44, fontSize: 16, inputPadding: "10px 14px" }
|
|
2964
3161
|
};
|
|
2965
|
-
var Container2 =
|
|
3162
|
+
var Container2 = import_styled_components24.default.div`
|
|
2966
3163
|
display: flex;
|
|
2967
3164
|
flex-direction: column;
|
|
2968
3165
|
gap: 6px;
|
|
2969
3166
|
width: 100%;
|
|
2970
3167
|
opacity: ${(p) => p.$disabled ? 0.6 : 1};
|
|
2971
3168
|
`;
|
|
2972
|
-
var InputRow =
|
|
3169
|
+
var InputRow = import_styled_components24.default.div`
|
|
2973
3170
|
display: flex;
|
|
2974
3171
|
align-items: stretch;
|
|
2975
3172
|
gap: 8px;
|
|
2976
3173
|
width: 100%;
|
|
2977
3174
|
`;
|
|
2978
|
-
var SwatchLabel =
|
|
3175
|
+
var SwatchLabel = import_styled_components24.default.label`
|
|
2979
3176
|
display: inline-flex;
|
|
2980
3177
|
cursor: ${(p) => p.$disabled ? "not-allowed" : "pointer"};
|
|
2981
3178
|
width: ${(p) => p.$size}px;
|
|
2982
3179
|
height: ${(p) => p.$size}px;
|
|
2983
3180
|
flex-shrink: 0;
|
|
2984
3181
|
`;
|
|
2985
|
-
var Swatch =
|
|
3182
|
+
var Swatch = import_styled_components24.default.span`
|
|
2986
3183
|
display: inline-block;
|
|
2987
3184
|
width: 100%;
|
|
2988
3185
|
height: 100%;
|
|
@@ -2992,7 +3189,7 @@ var Swatch = import_styled_components22.default.span`
|
|
|
2992
3189
|
position: relative;
|
|
2993
3190
|
overflow: hidden;
|
|
2994
3191
|
`;
|
|
2995
|
-
var HiddenInput =
|
|
3192
|
+
var HiddenInput = import_styled_components24.default.input`
|
|
2996
3193
|
position: absolute;
|
|
2997
3194
|
top: 0;
|
|
2998
3195
|
left: 0;
|
|
@@ -3003,7 +3200,7 @@ var HiddenInput = import_styled_components22.default.input`
|
|
|
3003
3200
|
border: none;
|
|
3004
3201
|
padding: 0;
|
|
3005
3202
|
`;
|
|
3006
|
-
var HexInput =
|
|
3203
|
+
var HexInput = import_styled_components24.default.input`
|
|
3007
3204
|
flex: 1;
|
|
3008
3205
|
font-family: inherit;
|
|
3009
3206
|
font-size: ${(p) => p.$fontSize}px;
|
|
@@ -3031,7 +3228,7 @@ var TEXT_SIZE_MAP = {
|
|
|
3031
3228
|
m: "xs",
|
|
3032
3229
|
l: "s"
|
|
3033
3230
|
};
|
|
3034
|
-
var ColorPicker = (0,
|
|
3231
|
+
var ColorPicker = (0, import_react14.forwardRef)(
|
|
3035
3232
|
({
|
|
3036
3233
|
label,
|
|
3037
3234
|
value,
|
|
@@ -3040,11 +3237,11 @@ var ColorPicker = (0, import_react12.forwardRef)(
|
|
|
3040
3237
|
disabled = false,
|
|
3041
3238
|
size = "m"
|
|
3042
3239
|
}, ref) => {
|
|
3043
|
-
const innerRef = (0,
|
|
3044
|
-
const [internalColor, setInternalColor] = (0,
|
|
3240
|
+
const innerRef = (0, import_react14.useRef)(null);
|
|
3241
|
+
const [internalColor, setInternalColor] = (0, import_react14.useState)(defaultValue);
|
|
3045
3242
|
const currentColor = value !== void 0 ? value : internalColor;
|
|
3046
3243
|
const dims = SIZES[size];
|
|
3047
|
-
(0,
|
|
3244
|
+
(0, import_react14.useEffect)(() => {
|
|
3048
3245
|
if (!ref) return;
|
|
3049
3246
|
if (typeof ref === "function") {
|
|
3050
3247
|
ref(innerRef.current);
|
|
@@ -3059,10 +3256,10 @@ var ColorPicker = (0, import_react12.forwardRef)(
|
|
|
3059
3256
|
}
|
|
3060
3257
|
onChange == null ? void 0 : onChange(newColor);
|
|
3061
3258
|
};
|
|
3062
|
-
return /* @__PURE__ */ (0,
|
|
3063
|
-
label && /* @__PURE__ */ (0,
|
|
3064
|
-
/* @__PURE__ */ (0,
|
|
3065
|
-
/* @__PURE__ */ (0,
|
|
3259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Container2, { $disabled: disabled, children: [
|
|
3260
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { size: TEXT_SIZE_MAP[size], weight: "600", children: label }),
|
|
3261
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(InputRow, { children: [
|
|
3262
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SwatchLabel, { $disabled: disabled, $size: dims.swatch, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Swatch, { $color: currentColor, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3066
3263
|
HiddenInput,
|
|
3067
3264
|
{
|
|
3068
3265
|
ref: innerRef,
|
|
@@ -3072,7 +3269,7 @@ var ColorPicker = (0, import_react12.forwardRef)(
|
|
|
3072
3269
|
disabled
|
|
3073
3270
|
}
|
|
3074
3271
|
) }) }),
|
|
3075
|
-
/* @__PURE__ */ (0,
|
|
3272
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3076
3273
|
HexInput,
|
|
3077
3274
|
{
|
|
3078
3275
|
type: "text",
|
|
@@ -3090,10 +3287,10 @@ var ColorPicker = (0, import_react12.forwardRef)(
|
|
|
3090
3287
|
ColorPicker.displayName = "ColorPicker";
|
|
3091
3288
|
|
|
3092
3289
|
// src/Components/SliderInput/SliderInput.tsx
|
|
3093
|
-
var
|
|
3094
|
-
var
|
|
3095
|
-
var
|
|
3096
|
-
var Container3 =
|
|
3290
|
+
var import_react15 = require("react");
|
|
3291
|
+
var import_styled_components25 = __toESM(require("styled-components"));
|
|
3292
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3293
|
+
var Container3 = import_styled_components25.default.label`
|
|
3097
3294
|
display: flex;
|
|
3098
3295
|
flex-direction: column;
|
|
3099
3296
|
gap: 4px;
|
|
@@ -3112,19 +3309,19 @@ var THUMB = `
|
|
|
3112
3309
|
cursor: inherit;
|
|
3113
3310
|
transition: transform 160ms ease;
|
|
3114
3311
|
`;
|
|
3115
|
-
var TrackWrapper =
|
|
3312
|
+
var TrackWrapper = import_styled_components25.default.span`
|
|
3116
3313
|
position: relative;
|
|
3117
3314
|
width: 100%;
|
|
3118
3315
|
padding-top: 24px;
|
|
3119
3316
|
`;
|
|
3120
|
-
var ValueBubble =
|
|
3317
|
+
var ValueBubble = import_styled_components25.default.span`
|
|
3121
3318
|
position: absolute;
|
|
3122
3319
|
top: 0;
|
|
3123
3320
|
left: ${(p) => p.$left}%;
|
|
3124
3321
|
transform: translateX(-50%);
|
|
3125
3322
|
pointer-events: none;
|
|
3126
3323
|
`;
|
|
3127
|
-
var TrackInput =
|
|
3324
|
+
var TrackInput = import_styled_components25.default.input`
|
|
3128
3325
|
-webkit-appearance: none;
|
|
3129
3326
|
appearance: none;
|
|
3130
3327
|
width: 100%;
|
|
@@ -3167,12 +3364,12 @@ var TrackInput = import_styled_components23.default.input`
|
|
|
3167
3364
|
outline-offset: 2px;
|
|
3168
3365
|
}
|
|
3169
3366
|
`;
|
|
3170
|
-
var MinMaxRow =
|
|
3367
|
+
var MinMaxRow = import_styled_components25.default.span`
|
|
3171
3368
|
display: flex;
|
|
3172
3369
|
justify-content: space-between;
|
|
3173
3370
|
align-items: center;
|
|
3174
3371
|
`;
|
|
3175
|
-
var SliderInput = (0,
|
|
3372
|
+
var SliderInput = (0, import_react15.forwardRef)(
|
|
3176
3373
|
({
|
|
3177
3374
|
value,
|
|
3178
3375
|
onChange,
|
|
@@ -3191,11 +3388,11 @@ var SliderInput = (0, import_react13.forwardRef)(
|
|
|
3191
3388
|
const handleChange = (e) => {
|
|
3192
3389
|
onChange == null ? void 0 : onChange(Number(e.target.value), e);
|
|
3193
3390
|
};
|
|
3194
|
-
return /* @__PURE__ */ (0,
|
|
3195
|
-
label && /* @__PURE__ */ (0,
|
|
3196
|
-
/* @__PURE__ */ (0,
|
|
3197
|
-
showValue && /* @__PURE__ */ (0,
|
|
3198
|
-
/* @__PURE__ */ (0,
|
|
3391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Container3, { $disabled: disabled, htmlFor: id, children: [
|
|
3392
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { size: "xs", color: "grey_600", children: label }),
|
|
3393
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(TrackWrapper, { children: [
|
|
3394
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ValueBubble, { $left: progress, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { size: "xs", weight: "600", children: display(current) }) }),
|
|
3395
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3199
3396
|
TrackInput,
|
|
3200
3397
|
{
|
|
3201
3398
|
id,
|
|
@@ -3211,9 +3408,9 @@ var SliderInput = (0, import_react13.forwardRef)(
|
|
|
3211
3408
|
}
|
|
3212
3409
|
)
|
|
3213
3410
|
] }),
|
|
3214
|
-
showValue && /* @__PURE__ */ (0,
|
|
3215
|
-
/* @__PURE__ */ (0,
|
|
3216
|
-
/* @__PURE__ */ (0,
|
|
3411
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(MinMaxRow, { children: [
|
|
3412
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { size: "xs", color: "grey_600", children: display(min) }),
|
|
3413
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { size: "xs", color: "grey_600", children: display(max) })
|
|
3217
3414
|
] })
|
|
3218
3415
|
] });
|
|
3219
3416
|
}
|
|
@@ -3221,8 +3418,8 @@ var SliderInput = (0, import_react13.forwardRef)(
|
|
|
3221
3418
|
SliderInput.displayName = "SliderInput";
|
|
3222
3419
|
|
|
3223
3420
|
// src/Components/List/List.tsx
|
|
3224
|
-
var
|
|
3225
|
-
var
|
|
3421
|
+
var import_styled_components26 = __toESM(require("styled-components"));
|
|
3422
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3226
3423
|
var shouldForwardProp9 = (prop) => ![
|
|
3227
3424
|
"width",
|
|
3228
3425
|
"height",
|
|
@@ -3234,7 +3431,7 @@ var shouldForwardProp9 = (prop) => ![
|
|
|
3234
3431
|
"justifyContent",
|
|
3235
3432
|
"isScrollable"
|
|
3236
3433
|
].includes(prop);
|
|
3237
|
-
var StyledList =
|
|
3434
|
+
var StyledList = import_styled_components26.default.div.withConfig({
|
|
3238
3435
|
shouldForwardProp: shouldForwardProp9
|
|
3239
3436
|
})`
|
|
3240
3437
|
display: flex;
|
|
@@ -3251,7 +3448,7 @@ var StyledList = import_styled_components24.default.div.withConfig({
|
|
|
3251
3448
|
`;
|
|
3252
3449
|
var List = (props) => {
|
|
3253
3450
|
const _a = props, { children, onClick } = _a, rest = __objRest(_a, ["children", "onClick"]);
|
|
3254
|
-
return /* @__PURE__ */ (0,
|
|
3451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3255
3452
|
StyledList,
|
|
3256
3453
|
__spreadProps(__spreadValues({
|
|
3257
3454
|
onClick
|
|
@@ -3262,8 +3459,8 @@ var List = (props) => {
|
|
|
3262
3459
|
};
|
|
3263
3460
|
|
|
3264
3461
|
// src/Components/List/ListItem/ListItem.tsx
|
|
3265
|
-
var
|
|
3266
|
-
var
|
|
3462
|
+
var import_styled_components27 = __toESM(require("styled-components"));
|
|
3463
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3267
3464
|
var shouldForwardProp10 = (prop) => ![
|
|
3268
3465
|
"width",
|
|
3269
3466
|
"height",
|
|
@@ -3275,7 +3472,7 @@ var shouldForwardProp10 = (prop) => ![
|
|
|
3275
3472
|
"justifyContent",
|
|
3276
3473
|
"isScrollable"
|
|
3277
3474
|
].includes(prop);
|
|
3278
|
-
var StyledListItem =
|
|
3475
|
+
var StyledListItem = import_styled_components27.default.div.withConfig({
|
|
3279
3476
|
shouldForwardProp: shouldForwardProp10
|
|
3280
3477
|
})`
|
|
3281
3478
|
display: flex;
|
|
@@ -3296,7 +3493,7 @@ var StyledListItem = import_styled_components25.default.div.withConfig({
|
|
|
3296
3493
|
`;
|
|
3297
3494
|
var ListItem = (props) => {
|
|
3298
3495
|
const _a = props, { children, onClick } = _a, rest = __objRest(_a, ["children", "onClick"]);
|
|
3299
|
-
return /* @__PURE__ */ (0,
|
|
3496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3300
3497
|
StyledListItem,
|
|
3301
3498
|
__spreadProps(__spreadValues({
|
|
3302
3499
|
onClick
|
|
@@ -3307,9 +3504,9 @@ var ListItem = (props) => {
|
|
|
3307
3504
|
};
|
|
3308
3505
|
|
|
3309
3506
|
// src/Components/Table/Table.tsx
|
|
3310
|
-
var
|
|
3311
|
-
var
|
|
3312
|
-
var
|
|
3507
|
+
var import_react16 = require("react");
|
|
3508
|
+
var import_styled_components28 = __toESM(require("styled-components"));
|
|
3509
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3313
3510
|
var shouldForwardPropTable = (prop) => ![
|
|
3314
3511
|
"backgroundColor",
|
|
3315
3512
|
"height",
|
|
@@ -3318,7 +3515,7 @@ var shouldForwardPropTable = (prop) => ![
|
|
|
3318
3515
|
"borderRadius",
|
|
3319
3516
|
"hasShadow"
|
|
3320
3517
|
].includes(prop);
|
|
3321
|
-
var StyledTable =
|
|
3518
|
+
var StyledTable = import_styled_components28.default.div.withConfig({
|
|
3322
3519
|
shouldForwardProp: shouldForwardPropTable
|
|
3323
3520
|
})`
|
|
3324
3521
|
display: table;
|
|
@@ -3330,7 +3527,7 @@ var StyledTable = import_styled_components26.default.div.withConfig({
|
|
|
3330
3527
|
color: white;
|
|
3331
3528
|
z-index: 1;
|
|
3332
3529
|
`;
|
|
3333
|
-
var StyledContainer3 =
|
|
3530
|
+
var StyledContainer3 = import_styled_components28.default.div.withConfig({
|
|
3334
3531
|
shouldForwardProp: shouldForwardPropTable
|
|
3335
3532
|
})`
|
|
3336
3533
|
width: ${(props) => props.fullWidth === false ? "auto" : "100%"};
|
|
@@ -3343,18 +3540,18 @@ var StyledContainer3 = import_styled_components26.default.div.withConfig({
|
|
|
3343
3540
|
border: 1.4px solid ${colors.grey_200};
|
|
3344
3541
|
box-shadow: ${(props) => props.hasShadow ? "0 2px 12px 0 rgba(198, 198, 198, 0.25)" : "none"};
|
|
3345
3542
|
`;
|
|
3346
|
-
var Table = (0,
|
|
3543
|
+
var Table = (0, import_react16.forwardRef)((props, ref) => {
|
|
3347
3544
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3348
3545
|
const safeChildren = children;
|
|
3349
|
-
return /* @__PURE__ */ (0,
|
|
3546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StyledContainer3, __spreadProps(__spreadValues({}, otherProps), { ref, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StyledTable, __spreadProps(__spreadValues({}, otherProps), { children: safeChildren })) }));
|
|
3350
3547
|
});
|
|
3351
3548
|
Table.displayName = "Table";
|
|
3352
3549
|
|
|
3353
3550
|
// src/Components/Table/TableHeader/TableHeader.tsx
|
|
3354
|
-
var
|
|
3355
|
-
var
|
|
3551
|
+
var import_styled_components29 = __toESM(require("styled-components"));
|
|
3552
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3356
3553
|
var shouldForwardPropTableHeader = (prop) => !["backgroundColor"].includes(prop);
|
|
3357
|
-
var StyledTableHeader =
|
|
3554
|
+
var StyledTableHeader = import_styled_components29.default.div.withConfig({
|
|
3358
3555
|
shouldForwardProp: shouldForwardPropTableHeader
|
|
3359
3556
|
})`
|
|
3360
3557
|
display: table;
|
|
@@ -3369,17 +3566,17 @@ var StyledTableHeader = import_styled_components27.default.div.withConfig({
|
|
|
3369
3566
|
`;
|
|
3370
3567
|
var TableHeader = (props) => {
|
|
3371
3568
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3372
|
-
return /* @__PURE__ */ (0,
|
|
3569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(StyledTableHeader, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
3373
3570
|
};
|
|
3374
3571
|
|
|
3375
3572
|
// src/Components/Table/TableBody/TableBody.tsx
|
|
3376
|
-
var
|
|
3377
|
-
var
|
|
3378
|
-
var
|
|
3573
|
+
var import_react17 = require("react");
|
|
3574
|
+
var import_styled_components30 = __toESM(require("styled-components"));
|
|
3575
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3379
3576
|
var shouldForwardPropTableBody = (prop) => !["backgroundColor", "useEvenBackground", "fixedHeight", "color"].includes(
|
|
3380
3577
|
prop
|
|
3381
3578
|
);
|
|
3382
|
-
var StyledTableBody =
|
|
3579
|
+
var StyledTableBody = import_styled_components30.default.div.withConfig({
|
|
3383
3580
|
shouldForwardProp: shouldForwardPropTableBody
|
|
3384
3581
|
})`
|
|
3385
3582
|
display: block;
|
|
@@ -3392,18 +3589,18 @@ var StyledTableBody = import_styled_components28.default.div.withConfig({
|
|
|
3392
3589
|
background-color: ${(props) => props.useEvenBackground ? "#f2f2f2" : ""};
|
|
3393
3590
|
}
|
|
3394
3591
|
`;
|
|
3395
|
-
var TableBody = (0,
|
|
3592
|
+
var TableBody = (0, import_react17.forwardRef)(
|
|
3396
3593
|
(props, ref) => {
|
|
3397
3594
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3398
3595
|
const safeChildren = children;
|
|
3399
|
-
return /* @__PURE__ */ (0,
|
|
3596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(StyledTableBody, __spreadProps(__spreadValues({ ref }, otherProps), { children: safeChildren }));
|
|
3400
3597
|
}
|
|
3401
3598
|
);
|
|
3402
3599
|
TableBody.displayName = "TableBody";
|
|
3403
3600
|
|
|
3404
3601
|
// src/Components/Table/TableRow/TableRow.tsx
|
|
3405
|
-
var
|
|
3406
|
-
var
|
|
3602
|
+
var import_styled_components31 = __toESM(require("styled-components"));
|
|
3603
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3407
3604
|
var shouldForwardPropTableRow = (prop) => ![
|
|
3408
3605
|
"backgroundColor",
|
|
3409
3606
|
"borderTop",
|
|
@@ -3411,7 +3608,7 @@ var shouldForwardPropTableRow = (prop) => ![
|
|
|
3411
3608
|
"isClickable",
|
|
3412
3609
|
"hoverable"
|
|
3413
3610
|
].includes(prop);
|
|
3414
|
-
var StyledTableRow =
|
|
3611
|
+
var StyledTableRow = import_styled_components31.default.div.withConfig({
|
|
3415
3612
|
shouldForwardProp: shouldForwardPropTableRow
|
|
3416
3613
|
})`
|
|
3417
3614
|
display: flex;
|
|
@@ -3429,12 +3626,12 @@ var StyledTableRow = import_styled_components29.default.div.withConfig({
|
|
|
3429
3626
|
`;
|
|
3430
3627
|
var TableRow = (props) => {
|
|
3431
3628
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3432
|
-
return /* @__PURE__ */ (0,
|
|
3629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledTableRow, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
3433
3630
|
};
|
|
3434
3631
|
|
|
3435
3632
|
// src/Components/Table/TableCell/TableCell.tsx
|
|
3436
|
-
var
|
|
3437
|
-
var
|
|
3633
|
+
var import_styled_components32 = __toESM(require("styled-components"));
|
|
3634
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3438
3635
|
var shouldForwardPropTableCell = (prop) => ![
|
|
3439
3636
|
"backgroundColor",
|
|
3440
3637
|
"flexGrow",
|
|
@@ -3444,7 +3641,7 @@ var shouldForwardPropTableCell = (prop) => ![
|
|
|
3444
3641
|
"colSpan",
|
|
3445
3642
|
"padding"
|
|
3446
3643
|
].includes(prop);
|
|
3447
|
-
var StyledTableCell =
|
|
3644
|
+
var StyledTableCell = import_styled_components32.default.div.withConfig({
|
|
3448
3645
|
shouldForwardProp: shouldForwardPropTableCell
|
|
3449
3646
|
})`
|
|
3450
3647
|
flex-grow: ${(props) => props.flexGrow || "1"};
|
|
@@ -3463,15 +3660,15 @@ var StyledTableCell = import_styled_components30.default.div.withConfig({
|
|
|
3463
3660
|
`;
|
|
3464
3661
|
var TableCell = (props) => {
|
|
3465
3662
|
const _a = props, { centerContent, children } = _a, otherProps = __objRest(_a, ["centerContent", "children"]);
|
|
3466
|
-
return /* @__PURE__ */ (0,
|
|
3663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(StyledTableCell, __spreadProps(__spreadValues({}, otherProps), { children: centerContent ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { style: { display: "flex", justifyContent: "center" }, children }) : children }));
|
|
3467
3664
|
};
|
|
3468
3665
|
|
|
3469
3666
|
// src/Components/Table/TableHeaderCell/TableHeaderCell.tsx
|
|
3470
|
-
var
|
|
3471
|
-
var
|
|
3472
|
-
var
|
|
3667
|
+
var import_react18 = require("react");
|
|
3668
|
+
var import_styled_components33 = __toESM(require("styled-components"));
|
|
3669
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3473
3670
|
var shouldForwardPropTableHeaderCell = (prop) => !["useSort", "isSort", "flexGrow", "flexShrink", "width"].includes(prop);
|
|
3474
|
-
var StyledTableHeaderCell =
|
|
3671
|
+
var StyledTableHeaderCell = import_styled_components33.default.div.withConfig({
|
|
3475
3672
|
shouldForwardProp: shouldForwardPropTableHeaderCell
|
|
3476
3673
|
})`
|
|
3477
3674
|
flex-grow: ${(props) => props.flexGrow || "1"};
|
|
@@ -3488,13 +3685,13 @@ var StyledTableHeaderCell = import_styled_components31.default.div.withConfig({
|
|
|
3488
3685
|
max-width: ${(props) => props.width || "auto"};
|
|
3489
3686
|
min-width: ${(props) => props.width || "auto"};
|
|
3490
3687
|
`;
|
|
3491
|
-
var SortingButton =
|
|
3688
|
+
var SortingButton = import_styled_components33.default.span`
|
|
3492
3689
|
display: inline-flex;
|
|
3493
3690
|
align-items: center;
|
|
3494
3691
|
gap: 8px;
|
|
3495
3692
|
cursor: pointer;
|
|
3496
3693
|
`;
|
|
3497
|
-
var SortArrow =
|
|
3694
|
+
var SortArrow = import_styled_components33.default.span`
|
|
3498
3695
|
font-style: normal;
|
|
3499
3696
|
font-size: 0.9em;
|
|
3500
3697
|
line-height: 1;
|
|
@@ -3503,11 +3700,11 @@ var SortArrow = import_styled_components31.default.span`
|
|
|
3503
3700
|
`;
|
|
3504
3701
|
var TableHeaderCell = (props) => {
|
|
3505
3702
|
const _a = props, { children, useSort, isSort, sortOrder } = _a, otherProps = __objRest(_a, ["children", "useSort", "isSort", "sortOrder"]);
|
|
3506
|
-
const [hovered, setHovered] = (0,
|
|
3703
|
+
const [hovered, setHovered] = (0, import_react18.useState)(false);
|
|
3507
3704
|
const showArrow = useSort && (isSort || hovered);
|
|
3508
3705
|
const arrowChar = isSort && sortOrder === "asc" ? "\u2191" : "\u2193";
|
|
3509
3706
|
const arrowOpacity = isSort ? 1 : 0.35;
|
|
3510
|
-
return /* @__PURE__ */ (0,
|
|
3707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3511
3708
|
StyledTableHeaderCell,
|
|
3512
3709
|
__spreadProps(__spreadValues({}, otherProps), {
|
|
3513
3710
|
useSort,
|
|
@@ -3522,19 +3719,19 @@ var TableHeaderCell = (props) => {
|
|
|
3522
3719
|
if (useSort) setHovered(false);
|
|
3523
3720
|
(_a2 = otherProps.onMouseLeave) == null ? void 0 : _a2.call(otherProps, e);
|
|
3524
3721
|
},
|
|
3525
|
-
children: useSort ? /* @__PURE__ */ (0,
|
|
3722
|
+
children: useSort ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(SortingButton, { children: [
|
|
3526
3723
|
children,
|
|
3527
|
-
showArrow && /* @__PURE__ */ (0,
|
|
3724
|
+
showArrow && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SortArrow, { $opacity: arrowOpacity, children: arrowChar })
|
|
3528
3725
|
] }) : children
|
|
3529
3726
|
})
|
|
3530
3727
|
);
|
|
3531
3728
|
};
|
|
3532
3729
|
|
|
3533
3730
|
// src/Components/Table/TableHeaderRow/TableHeaderRow.tsx
|
|
3534
|
-
var
|
|
3535
|
-
var
|
|
3731
|
+
var import_styled_components34 = __toESM(require("styled-components"));
|
|
3732
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3536
3733
|
var shouldForwardPropTableHeaderRow = (prop) => !["backgroundColor"].includes(prop);
|
|
3537
|
-
var StyledTableHeaderRow =
|
|
3734
|
+
var StyledTableHeaderRow = import_styled_components34.default.div.withConfig({
|
|
3538
3735
|
shouldForwardProp: shouldForwardPropTableHeaderRow
|
|
3539
3736
|
})`
|
|
3540
3737
|
display: flex;
|
|
@@ -3544,14 +3741,14 @@ var StyledTableHeaderRow = import_styled_components32.default.div.withConfig({
|
|
|
3544
3741
|
`;
|
|
3545
3742
|
var TableHeaderRow = (props) => {
|
|
3546
3743
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3547
|
-
return /* @__PURE__ */ (0,
|
|
3744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StyledTableHeaderRow, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
3548
3745
|
};
|
|
3549
3746
|
|
|
3550
3747
|
// src/Components/Table/TableFooter/TableFooter.tsx
|
|
3551
|
-
var
|
|
3552
|
-
var
|
|
3748
|
+
var import_styled_components35 = __toESM(require("styled-components"));
|
|
3749
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3553
3750
|
var shouldForwardPropTableFooter = (prop) => !["backgroundColor"].includes(prop);
|
|
3554
|
-
var StyledTableFooter =
|
|
3751
|
+
var StyledTableFooter = import_styled_components35.default.div.withConfig({
|
|
3555
3752
|
shouldForwardProp: shouldForwardPropTableFooter
|
|
3556
3753
|
})`
|
|
3557
3754
|
display: table;
|
|
@@ -3566,14 +3763,14 @@ var StyledTableFooter = import_styled_components33.default.div.withConfig({
|
|
|
3566
3763
|
`;
|
|
3567
3764
|
var TableFooter = (props) => {
|
|
3568
3765
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3569
|
-
return /* @__PURE__ */ (0,
|
|
3766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StyledTableFooter, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
3570
3767
|
};
|
|
3571
3768
|
|
|
3572
3769
|
// src/Components/Table/TableFooterRow/TableFooterRow.tsx
|
|
3573
|
-
var
|
|
3574
|
-
var
|
|
3770
|
+
var import_styled_components36 = __toESM(require("styled-components"));
|
|
3771
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3575
3772
|
var shouldForwardPropTableFooterRow = (prop) => !["backgroundColor"].includes(prop);
|
|
3576
|
-
var StyledTableFooterRow =
|
|
3773
|
+
var StyledTableFooterRow = import_styled_components36.default.div.withConfig({
|
|
3577
3774
|
shouldForwardProp: shouldForwardPropTableFooterRow
|
|
3578
3775
|
})`
|
|
3579
3776
|
display: flex;
|
|
@@ -3583,14 +3780,14 @@ var StyledTableFooterRow = import_styled_components34.default.div.withConfig({
|
|
|
3583
3780
|
`;
|
|
3584
3781
|
var TableFooterRow = (props) => {
|
|
3585
3782
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3586
|
-
return /* @__PURE__ */ (0,
|
|
3783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(StyledTableFooterRow, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
3587
3784
|
};
|
|
3588
3785
|
|
|
3589
3786
|
// src/Components/Table/TableFooterCell/TableFooterCell.tsx
|
|
3590
|
-
var
|
|
3591
|
-
var
|
|
3787
|
+
var import_styled_components37 = __toESM(require("styled-components"));
|
|
3788
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3592
3789
|
var shouldForwardPropTableFooterCell = (prop) => !["useSort", "flexGrow", "flexShrink", "width"].includes(prop);
|
|
3593
|
-
var StyledTableFooterCell =
|
|
3790
|
+
var StyledTableFooterCell = import_styled_components37.default.div.withConfig({
|
|
3594
3791
|
shouldForwardProp: shouldForwardPropTableFooterCell
|
|
3595
3792
|
})`
|
|
3596
3793
|
flex-grow: ${(props) => props.flexGrow || "1"};
|
|
@@ -3616,17 +3813,17 @@ var StyledTableFooterCell = import_styled_components35.default.div.withConfig({
|
|
|
3616
3813
|
`;
|
|
3617
3814
|
var TableFooterCell = (props) => {
|
|
3618
3815
|
const _a = props, { children, useSort } = _a, otherProps = __objRest(_a, ["children", "useSort"]);
|
|
3619
|
-
return /* @__PURE__ */ (0,
|
|
3816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3620
3817
|
StyledTableFooterCell,
|
|
3621
3818
|
__spreadProps(__spreadValues({}, otherProps), {
|
|
3622
3819
|
useSort,
|
|
3623
|
-
children: useSort ? /* @__PURE__ */ (0,
|
|
3820
|
+
children: useSort ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "sortingButton", children }) : children
|
|
3624
3821
|
})
|
|
3625
3822
|
);
|
|
3626
3823
|
};
|
|
3627
3824
|
|
|
3628
3825
|
// src/Components/Table/SkeletonRow/SkeletonRow.tsx
|
|
3629
|
-
var
|
|
3826
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3630
3827
|
var style = `
|
|
3631
3828
|
.skeleton-loader {
|
|
3632
3829
|
width: 100%;
|
|
@@ -3645,15 +3842,15 @@ var style = `
|
|
|
3645
3842
|
}
|
|
3646
3843
|
}
|
|
3647
3844
|
`;
|
|
3648
|
-
var SkeletonRow = ({ columns = 9 }) => /* @__PURE__ */ (0,
|
|
3649
|
-
/* @__PURE__ */ (0,
|
|
3650
|
-
/* @__PURE__ */ (0,
|
|
3845
|
+
var SkeletonRow = ({ columns = 9 }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
3846
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("style", { children: style }),
|
|
3847
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TableRow, { children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "skeleton-loader" }) }, index)) })
|
|
3651
3848
|
] });
|
|
3652
3849
|
|
|
3653
3850
|
// src/Components/Switch/Switch.tsx
|
|
3654
|
-
var
|
|
3655
|
-
var
|
|
3656
|
-
var
|
|
3851
|
+
var import_react19 = require("react");
|
|
3852
|
+
var import_styled_components38 = __toESM(require("styled-components"));
|
|
3853
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3657
3854
|
var BASE = {
|
|
3658
3855
|
s: { w: 36, h: 20, knob: 16, pad: 2 },
|
|
3659
3856
|
m: { w: 48, h: 28, knob: 24, pad: 2 },
|
|
@@ -3664,7 +3861,7 @@ var SIZES2 = __spreadProps(__spreadValues({}, BASE), {
|
|
|
3664
3861
|
md: BASE.m,
|
|
3665
3862
|
lg: BASE.l
|
|
3666
3863
|
});
|
|
3667
|
-
var Container4 =
|
|
3864
|
+
var Container4 = import_styled_components38.default.label`
|
|
3668
3865
|
display: inline-flex;
|
|
3669
3866
|
align-items: center;
|
|
3670
3867
|
gap: 10px;
|
|
@@ -3672,14 +3869,14 @@ var Container4 = import_styled_components36.default.label`
|
|
|
3672
3869
|
cursor: ${(p) => p.$disabled ? "not-allowed" : "pointer"};
|
|
3673
3870
|
opacity: ${(p) => p.$disabled ? 0.6 : 1};
|
|
3674
3871
|
`;
|
|
3675
|
-
var HiddenCheckbox =
|
|
3872
|
+
var HiddenCheckbox = import_styled_components38.default.input.attrs({ type: "checkbox" })`
|
|
3676
3873
|
position: absolute;
|
|
3677
3874
|
opacity: 0;
|
|
3678
3875
|
pointer-events: none;
|
|
3679
3876
|
width: 1px;
|
|
3680
3877
|
height: 1px;
|
|
3681
3878
|
`;
|
|
3682
|
-
var Track =
|
|
3879
|
+
var Track = import_styled_components38.default.span`
|
|
3683
3880
|
position: relative;
|
|
3684
3881
|
display: inline-flex;
|
|
3685
3882
|
align-items: center;
|
|
@@ -3691,7 +3888,7 @@ var Track = import_styled_components36.default.span`
|
|
|
3691
3888
|
|
|
3692
3889
|
${(p) => {
|
|
3693
3890
|
const s = SIZES2[p.$size || "m"] || SIZES2.m;
|
|
3694
|
-
return
|
|
3891
|
+
return import_styled_components38.css`
|
|
3695
3892
|
width: ${s.w}px;
|
|
3696
3893
|
height: ${s.h}px;
|
|
3697
3894
|
padding: ${s.pad}px;
|
|
@@ -3707,7 +3904,7 @@ var Track = import_styled_components36.default.span`
|
|
|
3707
3904
|
inset 0 0 0 1px rgba(0, 0, 0, 0.08);
|
|
3708
3905
|
}
|
|
3709
3906
|
`;
|
|
3710
|
-
var Knob =
|
|
3907
|
+
var Knob = import_styled_components38.default.span`
|
|
3711
3908
|
position: absolute;
|
|
3712
3909
|
top: 50%;
|
|
3713
3910
|
transform: translateY(-50%);
|
|
@@ -3721,7 +3918,7 @@ var Knob = import_styled_components36.default.span`
|
|
|
3721
3918
|
${(p) => {
|
|
3722
3919
|
const s = SIZES2[p.$size || "m"] || SIZES2.m;
|
|
3723
3920
|
const left = p.$checked ? s.w - s.pad - s.knob : s.pad;
|
|
3724
|
-
return
|
|
3921
|
+
return import_styled_components38.css`
|
|
3725
3922
|
width: ${s.knob}px;
|
|
3726
3923
|
height: ${s.knob}px;
|
|
3727
3924
|
left: ${left}px;
|
|
@@ -3732,7 +3929,7 @@ var Knob = import_styled_components36.default.span`
|
|
|
3732
3929
|
transform: translateY(-50%) scale(0.96);
|
|
3733
3930
|
}
|
|
3734
3931
|
`;
|
|
3735
|
-
var Switch = (0,
|
|
3932
|
+
var Switch = (0, import_react19.forwardRef)(
|
|
3736
3933
|
(_a, ref) => {
|
|
3737
3934
|
var _b = _a, {
|
|
3738
3935
|
checked,
|
|
@@ -3754,8 +3951,8 @@ var Switch = (0, import_react17.forwardRef)(
|
|
|
3754
3951
|
if (disabled) return;
|
|
3755
3952
|
onChange == null ? void 0 : onChange(!!e.target.checked, e);
|
|
3756
3953
|
};
|
|
3757
|
-
return /* @__PURE__ */ (0,
|
|
3758
|
-
/* @__PURE__ */ (0,
|
|
3954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Container4, { $disabled: disabled, htmlFor: id, children: [
|
|
3955
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3759
3956
|
HiddenCheckbox,
|
|
3760
3957
|
__spreadValues({
|
|
3761
3958
|
id,
|
|
@@ -3768,16 +3965,16 @@ var Switch = (0, import_react17.forwardRef)(
|
|
|
3768
3965
|
ref
|
|
3769
3966
|
}, rest)
|
|
3770
3967
|
),
|
|
3771
|
-
/* @__PURE__ */ (0,
|
|
3968
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Track, { $checked: !!checked, $size: size, $color: color, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Knob, { $checked: !!checked, $size: size }) })
|
|
3772
3969
|
] });
|
|
3773
3970
|
}
|
|
3774
3971
|
);
|
|
3775
3972
|
Switch.displayName = "Switch";
|
|
3776
3973
|
|
|
3777
3974
|
// src/Components/CardSkeleton/CardSkeleton.tsx
|
|
3778
|
-
var
|
|
3975
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3779
3976
|
var CardSkeleton = () => {
|
|
3780
|
-
return /* @__PURE__ */ (0,
|
|
3977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3781
3978
|
Box,
|
|
3782
3979
|
{
|
|
3783
3980
|
fullWidth: true,
|
|
@@ -3788,8 +3985,8 @@ var CardSkeleton = () => {
|
|
|
3788
3985
|
};
|
|
3789
3986
|
|
|
3790
3987
|
// src/Components/Options/Options.tsx
|
|
3791
|
-
var
|
|
3792
|
-
var
|
|
3988
|
+
var import_react20 = require("react");
|
|
3989
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3793
3990
|
var Options = ({
|
|
3794
3991
|
icon,
|
|
3795
3992
|
options,
|
|
@@ -3798,8 +3995,8 @@ var Options = ({
|
|
|
3798
3995
|
onChange,
|
|
3799
3996
|
disabled = false
|
|
3800
3997
|
}) => {
|
|
3801
|
-
const [state, setState] = (0,
|
|
3802
|
-
(0,
|
|
3998
|
+
const [state, setState] = (0, import_react20.useState)(0);
|
|
3999
|
+
(0, import_react20.useEffect)(() => {
|
|
3803
4000
|
if (defaultId) {
|
|
3804
4001
|
const defaultIndex = options.findIndex(
|
|
3805
4002
|
(option) => option.id === defaultId
|
|
@@ -3820,7 +4017,7 @@ var Options = ({
|
|
|
3820
4017
|
}
|
|
3821
4018
|
};
|
|
3822
4019
|
const { label, color } = options[state] || options[0];
|
|
3823
|
-
return /* @__PURE__ */ (0,
|
|
4020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3824
4021
|
"div",
|
|
3825
4022
|
{
|
|
3826
4023
|
onClick: disabled ? void 0 : handleClick,
|
|
@@ -3848,32 +4045,32 @@ var Options = ({
|
|
|
3848
4045
|
e.currentTarget.style.transform = "translateY(0px)";
|
|
3849
4046
|
}
|
|
3850
4047
|
},
|
|
3851
|
-
children: /* @__PURE__ */ (0,
|
|
3852
|
-
/* @__PURE__ */ (0,
|
|
3853
|
-
/* @__PURE__ */ (0,
|
|
4048
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Row_default, { gap: "8", alignItems: "center", justifyContent: "center", children: [
|
|
4049
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Col_default, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icon_default, { name: icon, type: "regular", color: "#414652" }) }),
|
|
4050
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Col_default, { children: label })
|
|
3854
4051
|
] })
|
|
3855
4052
|
}
|
|
3856
4053
|
);
|
|
3857
4054
|
};
|
|
3858
4055
|
|
|
3859
4056
|
// src/Components/Stepper/Stepper.tsx
|
|
3860
|
-
var
|
|
3861
|
-
var
|
|
3862
|
-
var
|
|
3863
|
-
var Wrapper5 =
|
|
4057
|
+
var import_react21 = require("react");
|
|
4058
|
+
var import_styled_components39 = __toESM(require("styled-components"));
|
|
4059
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4060
|
+
var Wrapper5 = import_styled_components39.default.nav`
|
|
3864
4061
|
width: 100%;
|
|
3865
4062
|
display: flex;
|
|
3866
4063
|
align-items: center;
|
|
3867
4064
|
justify-content: center;
|
|
3868
4065
|
gap: 5px;
|
|
3869
4066
|
`;
|
|
3870
|
-
var Connector =
|
|
4067
|
+
var Connector = import_styled_components39.default.div`
|
|
3871
4068
|
height: 1px;
|
|
3872
4069
|
background: ${colors.grey_300};
|
|
3873
4070
|
flex: 1;
|
|
3874
4071
|
min-width: 8px;
|
|
3875
4072
|
`;
|
|
3876
|
-
var Circle =
|
|
4073
|
+
var Circle = import_styled_components39.default.div`
|
|
3877
4074
|
width: ${({ size }) => `${size}px`};
|
|
3878
4075
|
height: ${({ size }) => `${size}px`};
|
|
3879
4076
|
border-radius: 9999px;
|
|
@@ -3893,29 +4090,29 @@ var Stepper = ({
|
|
|
3893
4090
|
size = 28,
|
|
3894
4091
|
className
|
|
3895
4092
|
}) => {
|
|
3896
|
-
return /* @__PURE__ */ (0,
|
|
4093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Wrapper5, { "aria-label": "progression", className, children: Array.from({ length: numberOfSteps }, (_, i) => {
|
|
3897
4094
|
const isActive = i === current;
|
|
3898
4095
|
const isCompleted = i < current;
|
|
3899
|
-
return /* @__PURE__ */ (0,
|
|
3900
|
-
/* @__PURE__ */ (0,
|
|
4096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react21.Fragment, { children: [
|
|
4097
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3901
4098
|
Circle,
|
|
3902
4099
|
{
|
|
3903
4100
|
size,
|
|
3904
4101
|
active: isActive,
|
|
3905
4102
|
completed: isCompleted,
|
|
3906
4103
|
"aria-hidden": true,
|
|
3907
|
-
children: isCompleted ? /* @__PURE__ */ (0,
|
|
4104
|
+
children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon, { name: "check", size: "xs", color: "white" }) : i + 1
|
|
3908
4105
|
}
|
|
3909
4106
|
),
|
|
3910
|
-
i < numberOfSteps - 1 && /* @__PURE__ */ (0,
|
|
4107
|
+
i < numberOfSteps - 1 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Connector, {})
|
|
3911
4108
|
] }, i);
|
|
3912
4109
|
}) });
|
|
3913
4110
|
};
|
|
3914
4111
|
|
|
3915
4112
|
// src/Components/Tabs/Tabs.tsx
|
|
3916
|
-
var
|
|
3917
|
-
var
|
|
3918
|
-
var
|
|
4113
|
+
var import_react22 = require("react");
|
|
4114
|
+
var import_styled_components40 = __toESM(require("styled-components"));
|
|
4115
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3919
4116
|
var TOKENS = {
|
|
3920
4117
|
fontFamily: '"Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif'
|
|
3921
4118
|
};
|
|
@@ -3923,7 +4120,7 @@ var shouldForwardTabs = (p) => !["align", "showBaseline", "baselineColor", "vari
|
|
|
3923
4120
|
p
|
|
3924
4121
|
);
|
|
3925
4122
|
var shouldForwardTab = (p) => !["$active", "$disabled", "$variant", "$fullWidth"].includes(p);
|
|
3926
|
-
var TabsRoot =
|
|
4123
|
+
var TabsRoot = import_styled_components40.default.div.withConfig({
|
|
3927
4124
|
shouldForwardProp: shouldForwardTabs
|
|
3928
4125
|
})`
|
|
3929
4126
|
width: 100%;
|
|
@@ -3934,7 +4131,7 @@ var TabsRoot = import_styled_components38.default.div.withConfig({
|
|
|
3934
4131
|
|
|
3935
4132
|
border-bottom: ${(p) => p.variant === "pills" || p.showBaseline === false ? "0" : `1px solid ${p.baselineColor || colors.grey_300}`};
|
|
3936
4133
|
`;
|
|
3937
|
-
var ActiveBar =
|
|
4134
|
+
var ActiveBar = import_styled_components40.default.div`
|
|
3938
4135
|
position: absolute;
|
|
3939
4136
|
left: 0;
|
|
3940
4137
|
bottom: -1px;
|
|
@@ -3946,7 +4143,7 @@ var ActiveBar = import_styled_components38.default.div`
|
|
|
3946
4143
|
left 180ms ease,
|
|
3947
4144
|
width 180ms ease;
|
|
3948
4145
|
`;
|
|
3949
|
-
var TabsList =
|
|
4146
|
+
var TabsList = import_styled_components40.default.div.withConfig({
|
|
3950
4147
|
shouldForwardProp: shouldForwardTabs
|
|
3951
4148
|
})`
|
|
3952
4149
|
display: flex;
|
|
@@ -3959,7 +4156,7 @@ var TabsList = import_styled_components38.default.div.withConfig({
|
|
|
3959
4156
|
width: ${(p) => p.fullWidth ? "100%" : "auto"};
|
|
3960
4157
|
justify-content: ${(p) => p.align === "center" ? "center" : p.align === "end" ? "flex-end" : p.align === "between" ? "space-between" : "flex-start"};
|
|
3961
4158
|
`;
|
|
3962
|
-
var TabButton =
|
|
4159
|
+
var TabButton = import_styled_components40.default.button.withConfig({
|
|
3963
4160
|
shouldForwardProp: shouldForwardTab
|
|
3964
4161
|
})`
|
|
3965
4162
|
appearance: none;
|
|
@@ -4008,7 +4205,7 @@ var TabButton = import_styled_components38.default.button.withConfig({
|
|
|
4008
4205
|
opacity: 0.6;
|
|
4009
4206
|
}
|
|
4010
4207
|
`;
|
|
4011
|
-
var TabDot =
|
|
4208
|
+
var TabDot = import_styled_components40.default.span`
|
|
4012
4209
|
display: inline-block;
|
|
4013
4210
|
width: 8px;
|
|
4014
4211
|
height: 8px;
|
|
@@ -4036,7 +4233,7 @@ var Tab = (_a) => {
|
|
|
4036
4233
|
"variant",
|
|
4037
4234
|
"fullWidth"
|
|
4038
4235
|
]);
|
|
4039
|
-
return /* @__PURE__ */ (0,
|
|
4236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4040
4237
|
TabButton,
|
|
4041
4238
|
__spreadProps(__spreadValues({
|
|
4042
4239
|
ref: innerRef,
|
|
@@ -4075,13 +4272,13 @@ var Tabs = (_a) => {
|
|
|
4075
4272
|
"baselineColor",
|
|
4076
4273
|
"children"
|
|
4077
4274
|
]);
|
|
4078
|
-
const rootRef = (0,
|
|
4079
|
-
const refsMap = (0,
|
|
4080
|
-
const [bar, setBar] = (0,
|
|
4275
|
+
const rootRef = (0, import_react22.useRef)(null);
|
|
4276
|
+
const refsMap = (0, import_react22.useRef)(/* @__PURE__ */ new Map());
|
|
4277
|
+
const [bar, setBar] = (0, import_react22.useState)({ left: 0, width: 0 });
|
|
4081
4278
|
const setTabRef = (id) => (el) => {
|
|
4082
4279
|
if (el) refsMap.current.set(id, el);
|
|
4083
4280
|
};
|
|
4084
|
-
const updateBar = (0,
|
|
4281
|
+
const updateBar = (0, import_react22.useCallback)(() => {
|
|
4085
4282
|
const root = rootRef.current;
|
|
4086
4283
|
const activeEl = value !== void 0 ? refsMap.current.get(value) : void 0;
|
|
4087
4284
|
if (!root || !activeEl) return;
|
|
@@ -4089,7 +4286,7 @@ var Tabs = (_a) => {
|
|
|
4089
4286
|
const box = activeEl.getBoundingClientRect();
|
|
4090
4287
|
setBar({ left: box.left - rootBox.left, width: box.width });
|
|
4091
4288
|
}, [value]);
|
|
4092
|
-
(0,
|
|
4289
|
+
(0, import_react22.useEffect)(() => {
|
|
4093
4290
|
updateBar();
|
|
4094
4291
|
const ro = new ResizeObserver(updateBar);
|
|
4095
4292
|
const activeEl = value !== void 0 ? refsMap.current.get(value) : void 0;
|
|
@@ -4097,16 +4294,16 @@ var Tabs = (_a) => {
|
|
|
4097
4294
|
if (activeEl) ro.observe(activeEl);
|
|
4098
4295
|
return () => ro.disconnect();
|
|
4099
4296
|
}, [value, updateBar]);
|
|
4100
|
-
const handleSelect = (0,
|
|
4297
|
+
const handleSelect = (0, import_react22.useCallback)(
|
|
4101
4298
|
(id) => {
|
|
4102
4299
|
if (id !== value && onChange) onChange(id);
|
|
4103
4300
|
},
|
|
4104
4301
|
[onChange, value]
|
|
4105
4302
|
);
|
|
4106
4303
|
const isPillsFullWidth = variant === "pills" && align === "start";
|
|
4107
|
-
const rendered = (0,
|
|
4304
|
+
const rendered = (0, import_react22.useMemo)(() => {
|
|
4108
4305
|
if (items && items.length) {
|
|
4109
|
-
return items.map((it) => /* @__PURE__ */ (0,
|
|
4306
|
+
return items.map((it) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
4110
4307
|
Tab,
|
|
4111
4308
|
{
|
|
4112
4309
|
id: it.id,
|
|
@@ -4118,18 +4315,18 @@ var Tabs = (_a) => {
|
|
|
4118
4315
|
innerRef: setTabRef(it.id),
|
|
4119
4316
|
children: [
|
|
4120
4317
|
it.label,
|
|
4121
|
-
it.dot && /* @__PURE__ */ (0,
|
|
4318
|
+
it.dot && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TabDot, { $color: it.dotColor })
|
|
4122
4319
|
]
|
|
4123
4320
|
},
|
|
4124
4321
|
it.id
|
|
4125
4322
|
));
|
|
4126
4323
|
}
|
|
4127
|
-
return
|
|
4324
|
+
return import_react22.Children.map(children, (child) => {
|
|
4128
4325
|
var _a2;
|
|
4129
|
-
if (!(0,
|
|
4326
|
+
if (!(0, import_react22.isValidElement)(child)) return child;
|
|
4130
4327
|
const id = (_a2 = child.props.id) != null ? _a2 : child.key;
|
|
4131
4328
|
const active = id === value;
|
|
4132
|
-
return (0,
|
|
4329
|
+
return (0, import_react22.cloneElement)(child, {
|
|
4133
4330
|
active,
|
|
4134
4331
|
variant,
|
|
4135
4332
|
fullWidth: isPillsFullWidth,
|
|
@@ -4138,7 +4335,7 @@ var Tabs = (_a) => {
|
|
|
4138
4335
|
});
|
|
4139
4336
|
});
|
|
4140
4337
|
}, [items, children, value, variant, isPillsFullWidth, handleSelect]);
|
|
4141
|
-
return /* @__PURE__ */ (0,
|
|
4338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
4142
4339
|
TabsRoot,
|
|
4143
4340
|
__spreadProps(__spreadValues({
|
|
4144
4341
|
ref: rootRef,
|
|
@@ -4149,22 +4346,22 @@ var Tabs = (_a) => {
|
|
|
4149
4346
|
variant
|
|
4150
4347
|
}, rest), {
|
|
4151
4348
|
children: [
|
|
4152
|
-
/* @__PURE__ */ (0,
|
|
4153
|
-
variant === "line" && showBaseline && /* @__PURE__ */ (0,
|
|
4349
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TabsList, { align, variant, fullWidth: isPillsFullWidth, children: rendered }),
|
|
4350
|
+
variant === "line" && showBaseline && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ActiveBar, { style: { left: bar.left, width: bar.width } })
|
|
4154
4351
|
]
|
|
4155
4352
|
})
|
|
4156
4353
|
);
|
|
4157
4354
|
};
|
|
4158
4355
|
|
|
4159
4356
|
// src/Components/MultiSelect/MultiSelect.tsx
|
|
4160
|
-
var
|
|
4161
|
-
var
|
|
4162
|
-
var
|
|
4163
|
-
var Container5 =
|
|
4357
|
+
var import_react23 = require("react");
|
|
4358
|
+
var import_styled_components41 = __toESM(require("styled-components"));
|
|
4359
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4360
|
+
var Container5 = import_styled_components41.default.div`
|
|
4164
4361
|
position: relative;
|
|
4165
4362
|
display: inline-block;
|
|
4166
4363
|
`;
|
|
4167
|
-
var Dropdown2 =
|
|
4364
|
+
var Dropdown2 = import_styled_components41.default.div`
|
|
4168
4365
|
position: absolute;
|
|
4169
4366
|
top: calc(100% + 6px);
|
|
4170
4367
|
${(p) => p.$align === "right" ? "right: 0;" : "left: 0;"}
|
|
@@ -4177,7 +4374,7 @@ var Dropdown2 = import_styled_components39.default.div`
|
|
|
4177
4374
|
overflow-y: auto;
|
|
4178
4375
|
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
|
|
4179
4376
|
`;
|
|
4180
|
-
var Item =
|
|
4377
|
+
var Item = import_styled_components41.default.div`
|
|
4181
4378
|
padding: 8px 12px;
|
|
4182
4379
|
cursor: pointer;
|
|
4183
4380
|
display: flex;
|
|
@@ -4200,8 +4397,8 @@ var MultiSelect = ({
|
|
|
4200
4397
|
width,
|
|
4201
4398
|
align = "left"
|
|
4202
4399
|
}) => {
|
|
4203
|
-
const [isOpen, setIsOpen] = (0,
|
|
4204
|
-
const dropdownRef = (0,
|
|
4400
|
+
const [isOpen, setIsOpen] = (0, import_react23.useState)(false);
|
|
4401
|
+
const dropdownRef = (0, import_react23.useRef)(null);
|
|
4205
4402
|
const toggleOption = (value) => {
|
|
4206
4403
|
if (!onChange) return;
|
|
4207
4404
|
if (selectedValues.includes(value)) {
|
|
@@ -4211,7 +4408,7 @@ var MultiSelect = ({
|
|
|
4211
4408
|
onChange([...selectedValues, value]);
|
|
4212
4409
|
}
|
|
4213
4410
|
};
|
|
4214
|
-
(0,
|
|
4411
|
+
(0, import_react23.useEffect)(() => {
|
|
4215
4412
|
const handleClickOutside = (e) => {
|
|
4216
4413
|
if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
|
|
4217
4414
|
setIsOpen(false);
|
|
@@ -4220,8 +4417,8 @@ var MultiSelect = ({
|
|
|
4220
4417
|
document.addEventListener("mousedown", handleClickOutside);
|
|
4221
4418
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
4222
4419
|
}, []);
|
|
4223
|
-
return /* @__PURE__ */ (0,
|
|
4224
|
-
/* @__PURE__ */ (0,
|
|
4420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Container5, { ref: dropdownRef, children: [
|
|
4421
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4225
4422
|
Button,
|
|
4226
4423
|
{
|
|
4227
4424
|
onClick: () => setIsOpen((p) => !p),
|
|
@@ -4231,11 +4428,11 @@ var MultiSelect = ({
|
|
|
4231
4428
|
disabled
|
|
4232
4429
|
}
|
|
4233
4430
|
),
|
|
4234
|
-
isOpen && /* @__PURE__ */ (0,
|
|
4431
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Dropdown2, { $width: width, $align: align, children: [
|
|
4235
4432
|
options.map(({ label: optLabel, value }) => {
|
|
4236
4433
|
const active = selectedValues.includes(value);
|
|
4237
|
-
return /* @__PURE__ */ (0,
|
|
4238
|
-
/* @__PURE__ */ (0,
|
|
4434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Item, { onClick: () => toggleOption(value), children: [
|
|
4435
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4239
4436
|
Icon,
|
|
4240
4437
|
{
|
|
4241
4438
|
name: "check",
|
|
@@ -4244,17 +4441,17 @@ var MultiSelect = ({
|
|
|
4244
4441
|
color: active ? colors.blue_700 : colors.transparent
|
|
4245
4442
|
}
|
|
4246
4443
|
),
|
|
4247
|
-
/* @__PURE__ */ (0,
|
|
4444
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { size: "xs", color: active ? "blue_700" : "grey_700", children: optLabel })
|
|
4248
4445
|
] }, String(value));
|
|
4249
4446
|
}),
|
|
4250
|
-
options.length === 0 && /* @__PURE__ */ (0,
|
|
4447
|
+
options.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Item, { as: "div", style: { cursor: "default" }, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { size: "xs", color: "grey_500", children: "Aucune option" }) })
|
|
4251
4448
|
] })
|
|
4252
4449
|
] });
|
|
4253
4450
|
};
|
|
4254
4451
|
|
|
4255
4452
|
// src/Components/DatePicker/DatePicker.tsx
|
|
4256
|
-
var
|
|
4257
|
-
var
|
|
4453
|
+
var import_react24 = require("react");
|
|
4454
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4258
4455
|
var LOCALE_MAP = {
|
|
4259
4456
|
fr: "fr-FR",
|
|
4260
4457
|
en: "en-GB",
|
|
@@ -4324,28 +4521,28 @@ var DatePicker = (props) => {
|
|
|
4324
4521
|
const resolvedLocale = resolveLocale(locale);
|
|
4325
4522
|
const monthNames = getMonthNames(resolvedLocale);
|
|
4326
4523
|
const dayNames = getDayNames(resolvedLocale);
|
|
4327
|
-
const [isOpen, setIsOpen] = (0,
|
|
4328
|
-
const [currentMonth, setCurrentMonth] = (0,
|
|
4329
|
-
const [isSelectingEnd, setIsSelectingEnd] = (0,
|
|
4330
|
-
const [singleDate, setSingleDate] = (0,
|
|
4524
|
+
const [isOpen, setIsOpen] = (0, import_react24.useState)(defaultOpen);
|
|
4525
|
+
const [currentMonth, setCurrentMonth] = (0, import_react24.useState)(/* @__PURE__ */ new Date());
|
|
4526
|
+
const [isSelectingEnd, setIsSelectingEnd] = (0, import_react24.useState)(false);
|
|
4527
|
+
const [singleDate, setSingleDate] = (0, import_react24.useState)(
|
|
4331
4528
|
isSingle ? (_a = props.value) != null ? _a : null : null
|
|
4332
4529
|
);
|
|
4333
|
-
const [startDate, setStartDate] = (0,
|
|
4530
|
+
const [startDate, setStartDate] = (0, import_react24.useState)(
|
|
4334
4531
|
!isSingle ? (_c = (_b = props.value) == null ? void 0 : _b.start) != null ? _c : null : null
|
|
4335
4532
|
);
|
|
4336
|
-
const [endDate, setEndDate] = (0,
|
|
4533
|
+
const [endDate, setEndDate] = (0, import_react24.useState)(
|
|
4337
4534
|
!isSingle ? (_e = (_d = props.value) == null ? void 0 : _d.end) != null ? _e : null : null
|
|
4338
4535
|
);
|
|
4339
|
-
const ref = (0,
|
|
4536
|
+
const ref = (0, import_react24.useRef)(null);
|
|
4340
4537
|
const singleValueMs = isSingle ? (_f = props.value) == null ? void 0 : _f.getTime() : void 0;
|
|
4341
4538
|
const rangeStartMs = !isSingle ? (_h = (_g = props.value) == null ? void 0 : _g.start) == null ? void 0 : _h.getTime() : void 0;
|
|
4342
4539
|
const rangeEndMs = !isSingle ? (_j = (_i = props.value) == null ? void 0 : _i.end) == null ? void 0 : _j.getTime() : void 0;
|
|
4343
|
-
(0,
|
|
4540
|
+
(0, import_react24.useEffect)(() => {
|
|
4344
4541
|
if (!isSingle) return;
|
|
4345
4542
|
const v = props.value;
|
|
4346
4543
|
if (v !== void 0) setSingleDate(v);
|
|
4347
4544
|
}, [singleValueMs]);
|
|
4348
|
-
(0,
|
|
4545
|
+
(0, import_react24.useEffect)(() => {
|
|
4349
4546
|
var _a2, _b2;
|
|
4350
4547
|
if (isSingle) return;
|
|
4351
4548
|
const v = props.value;
|
|
@@ -4353,7 +4550,7 @@ var DatePicker = (props) => {
|
|
|
4353
4550
|
setStartDate((_a2 = v == null ? void 0 : v.start) != null ? _a2 : null);
|
|
4354
4551
|
setEndDate((_b2 = v == null ? void 0 : v.end) != null ? _b2 : null);
|
|
4355
4552
|
}, [rangeStartMs, rangeEndMs]);
|
|
4356
|
-
(0,
|
|
4553
|
+
(0, import_react24.useEffect)(() => {
|
|
4357
4554
|
const handleClickOutside = (e) => {
|
|
4358
4555
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
4359
4556
|
setIsOpen(false);
|
|
@@ -4442,28 +4639,28 @@ var DatePicker = (props) => {
|
|
|
4442
4639
|
}).format(date);
|
|
4443
4640
|
const inputLabel = isSingle ? singleDate ? formatShort(singleDate) : "S\xE9lectionner une date" : startDate && endDate ? `${formatShort(startDate)} \u2014 ${formatShort(endDate)}` : "S\xE9lectionner une p\xE9riode";
|
|
4444
4641
|
const inputHasValue = isSingle ? !!singleDate : !!startDate && !!endDate;
|
|
4445
|
-
return /* @__PURE__ */ (0,
|
|
4642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
4446
4643
|
"div",
|
|
4447
4644
|
{
|
|
4448
4645
|
className: "date-picker-container",
|
|
4449
4646
|
ref,
|
|
4450
4647
|
style: width ? { width } : void 0,
|
|
4451
4648
|
children: [
|
|
4452
|
-
variant === "input" ? /* @__PURE__ */ (0,
|
|
4649
|
+
variant === "input" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
4453
4650
|
"button",
|
|
4454
4651
|
{
|
|
4455
4652
|
className: `date-picker-input-trigger${inputHasValue ? " date-picker-input-trigger--filled" : ""}`,
|
|
4456
4653
|
onClick: () => setIsOpen((prev) => !prev),
|
|
4457
4654
|
disabled,
|
|
4458
4655
|
children: [
|
|
4459
|
-
/* @__PURE__ */ (0,
|
|
4656
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4460
4657
|
"span",
|
|
4461
4658
|
{
|
|
4462
4659
|
className: inputHasValue ? "" : "date-picker-input-placeholder",
|
|
4463
4660
|
children: inputLabel
|
|
4464
4661
|
}
|
|
4465
4662
|
),
|
|
4466
|
-
inputHasValue && /* @__PURE__ */ (0,
|
|
4663
|
+
inputHasValue && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4467
4664
|
"span",
|
|
4468
4665
|
{
|
|
4469
4666
|
className: "date-picker-input-clear",
|
|
@@ -4471,13 +4668,13 @@ var DatePicker = (props) => {
|
|
|
4471
4668
|
e.stopPropagation();
|
|
4472
4669
|
reset();
|
|
4473
4670
|
},
|
|
4474
|
-
children: /* @__PURE__ */ (0,
|
|
4671
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Icon, { name: "xmark", size: "s", color: colors.grey_400 })
|
|
4475
4672
|
}
|
|
4476
4673
|
)
|
|
4477
4674
|
]
|
|
4478
4675
|
}
|
|
4479
|
-
) : /* @__PURE__ */ (0,
|
|
4480
|
-
/* @__PURE__ */ (0,
|
|
4676
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
4677
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4481
4678
|
Button,
|
|
4482
4679
|
{
|
|
4483
4680
|
onClick: () => setIsOpen((prev) => !prev),
|
|
@@ -4486,7 +4683,7 @@ var DatePicker = (props) => {
|
|
|
4486
4683
|
disabled
|
|
4487
4684
|
}
|
|
4488
4685
|
),
|
|
4489
|
-
isFiltered && /* @__PURE__ */ (0,
|
|
4686
|
+
isFiltered && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4490
4687
|
"span",
|
|
4491
4688
|
{
|
|
4492
4689
|
style: {
|
|
@@ -4504,17 +4701,17 @@ var DatePicker = (props) => {
|
|
|
4504
4701
|
cursor: "pointer"
|
|
4505
4702
|
},
|
|
4506
4703
|
onClick: reset,
|
|
4507
|
-
children: /* @__PURE__ */ (0,
|
|
4704
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Icon, { name: "xmark", size: "s", color: colors.white })
|
|
4508
4705
|
}
|
|
4509
4706
|
)
|
|
4510
4707
|
] }),
|
|
4511
|
-
isOpen && /* @__PURE__ */ (0,
|
|
4708
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4512
4709
|
"div",
|
|
4513
4710
|
{
|
|
4514
4711
|
className: "date-picker-popup",
|
|
4515
4712
|
style: align === "right" ? { left: "auto", right: 0 } : void 0,
|
|
4516
|
-
children: /* @__PURE__ */ (0,
|
|
4517
|
-
hasPresets && /* @__PURE__ */ (0,
|
|
4713
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "date-picker-content", children: [
|
|
4714
|
+
hasPresets && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "date-picker-presets", children: rangeProps.presets.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4518
4715
|
"button",
|
|
4519
4716
|
{
|
|
4520
4717
|
onClick: () => handlePreset(preset),
|
|
@@ -4523,21 +4720,21 @@ var DatePicker = (props) => {
|
|
|
4523
4720
|
},
|
|
4524
4721
|
preset.label
|
|
4525
4722
|
)) }),
|
|
4526
|
-
/* @__PURE__ */ (0,
|
|
4527
|
-
/* @__PURE__ */ (0,
|
|
4528
|
-
/* @__PURE__ */ (0,
|
|
4723
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "calendar-container", children: [
|
|
4724
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "calendar-header", children: [
|
|
4725
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4529
4726
|
"button",
|
|
4530
4727
|
{
|
|
4531
4728
|
onClick: () => navigateMonth(-1),
|
|
4532
4729
|
className: "calendar-nav-button",
|
|
4533
|
-
children: /* @__PURE__ */ (0,
|
|
4730
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4534
4731
|
"svg",
|
|
4535
4732
|
{
|
|
4536
4733
|
className: "calendar-nav-icon",
|
|
4537
4734
|
fill: "none",
|
|
4538
4735
|
stroke: "currentColor",
|
|
4539
4736
|
viewBox: "0 0 24 24",
|
|
4540
|
-
children: /* @__PURE__ */ (0,
|
|
4737
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4541
4738
|
"path",
|
|
4542
4739
|
{
|
|
4543
4740
|
strokeLinecap: "round",
|
|
@@ -4550,24 +4747,24 @@ var DatePicker = (props) => {
|
|
|
4550
4747
|
)
|
|
4551
4748
|
}
|
|
4552
4749
|
),
|
|
4553
|
-
/* @__PURE__ */ (0,
|
|
4750
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("h3", { className: "calendar-month-title", children: [
|
|
4554
4751
|
monthNames[currentMonth.getMonth()],
|
|
4555
4752
|
" ",
|
|
4556
4753
|
currentMonth.getFullYear()
|
|
4557
4754
|
] }),
|
|
4558
|
-
/* @__PURE__ */ (0,
|
|
4755
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4559
4756
|
"button",
|
|
4560
4757
|
{
|
|
4561
4758
|
onClick: () => navigateMonth(1),
|
|
4562
4759
|
className: "calendar-nav-button",
|
|
4563
|
-
children: /* @__PURE__ */ (0,
|
|
4760
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4564
4761
|
"svg",
|
|
4565
4762
|
{
|
|
4566
4763
|
className: "calendar-nav-icon",
|
|
4567
4764
|
fill: "none",
|
|
4568
4765
|
stroke: "currentColor",
|
|
4569
4766
|
viewBox: "0 0 24 24",
|
|
4570
|
-
children: /* @__PURE__ */ (0,
|
|
4767
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4571
4768
|
"path",
|
|
4572
4769
|
{
|
|
4573
4770
|
strokeLinecap: "round",
|
|
@@ -4581,8 +4778,8 @@ var DatePicker = (props) => {
|
|
|
4581
4778
|
}
|
|
4582
4779
|
)
|
|
4583
4780
|
] }),
|
|
4584
|
-
/* @__PURE__ */ (0,
|
|
4585
|
-
/* @__PURE__ */ (0,
|
|
4781
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "calendar-days-header", children: dayNames.map((day) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "calendar-day-name", children: day }, day)) }),
|
|
4782
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "calendar-days-grid", children: getDaysInMonth(currentMonth).map((day, index) => {
|
|
4586
4783
|
const disabled2 = !day.isCurrentMonth || isDateDisabled(day.date);
|
|
4587
4784
|
const isToday = sameDay(day.date, today);
|
|
4588
4785
|
const isStart = isSingle ? false : !!startDate && sameDay(day.date, startDate);
|
|
@@ -4604,28 +4801,28 @@ var DatePicker = (props) => {
|
|
|
4604
4801
|
if (isToday && !isStart && !isEnd && !isSingleSelected)
|
|
4605
4802
|
classes.push("calendar-day-today");
|
|
4606
4803
|
}
|
|
4607
|
-
return /* @__PURE__ */ (0,
|
|
4804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4608
4805
|
"button",
|
|
4609
4806
|
{
|
|
4610
4807
|
onClick: () => !disabled2 && handleDateSelect(day.date),
|
|
4611
4808
|
className: classes.join(" "),
|
|
4612
4809
|
disabled: disabled2,
|
|
4613
|
-
children: /* @__PURE__ */ (0,
|
|
4810
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: day.date.getDate() })
|
|
4614
4811
|
},
|
|
4615
4812
|
index
|
|
4616
4813
|
);
|
|
4617
4814
|
}) }),
|
|
4618
|
-
!isSingle && /* @__PURE__ */ (0,
|
|
4619
|
-
/* @__PURE__ */ (0,
|
|
4620
|
-
/* @__PURE__ */ (0,
|
|
4815
|
+
!isSingle && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "calendar-footer", children: [
|
|
4816
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "calendar-footer-dates", children: startDate && endDate ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
4817
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("strong", { children: "Du" }),
|
|
4621
4818
|
" ",
|
|
4622
4819
|
formatDate(startDate, "weekday", "fr"),
|
|
4623
4820
|
" ",
|
|
4624
|
-
/* @__PURE__ */ (0,
|
|
4821
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("strong", { children: "au" }),
|
|
4625
4822
|
" ",
|
|
4626
4823
|
formatDate(endDate, "weekday", "fr")
|
|
4627
|
-
] }) : startDate ? /* @__PURE__ */ (0,
|
|
4628
|
-
/* @__PURE__ */ (0,
|
|
4824
|
+
] }) : startDate ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "calendar-footer-hint", children: "S\xE9lectionnez la date de fin" }) : null }),
|
|
4825
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { onClick: reset, className: "calendar-reset-button", children: "R\xE9initialiser" })
|
|
4629
4826
|
] })
|
|
4630
4827
|
] })
|
|
4631
4828
|
] })
|
|
@@ -4637,15 +4834,15 @@ var DatePicker = (props) => {
|
|
|
4637
4834
|
};
|
|
4638
4835
|
|
|
4639
4836
|
// src/Components/IconTabs/IconTabs.tsx
|
|
4640
|
-
var
|
|
4641
|
-
var
|
|
4642
|
-
var
|
|
4643
|
-
var TabsContainer =
|
|
4837
|
+
var import_react25 = require("react");
|
|
4838
|
+
var import_styled_components42 = __toESM(require("styled-components"));
|
|
4839
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4840
|
+
var TabsContainer = import_styled_components42.default.div`
|
|
4644
4841
|
display: flex;
|
|
4645
4842
|
flex-direction: column;
|
|
4646
4843
|
align-items: stretch;
|
|
4647
4844
|
`;
|
|
4648
|
-
var IconsRow =
|
|
4845
|
+
var IconsRow = import_styled_components42.default.div`
|
|
4649
4846
|
display: flex;
|
|
4650
4847
|
justify-content: space-around;
|
|
4651
4848
|
align-items: center;
|
|
@@ -4656,7 +4853,7 @@ var IconsRow = import_styled_components40.default.div`
|
|
|
4656
4853
|
border-radius: 5px;
|
|
4657
4854
|
font-size: 0.8em;
|
|
4658
4855
|
`;
|
|
4659
|
-
var Tab2 =
|
|
4856
|
+
var Tab2 = import_styled_components42.default.div`
|
|
4660
4857
|
margin: 5px;
|
|
4661
4858
|
cursor: pointer;
|
|
4662
4859
|
transition:
|
|
@@ -4670,16 +4867,16 @@ var Tab2 = import_styled_components40.default.div`
|
|
|
4670
4867
|
display: flex;
|
|
4671
4868
|
align-items: center;
|
|
4672
4869
|
justify-content: center;
|
|
4673
|
-
${({ selected }) => selected &&
|
|
4870
|
+
${({ selected }) => selected && import_styled_components42.css`
|
|
4674
4871
|
color: #fff;
|
|
4675
4872
|
`}
|
|
4676
|
-
${({ disabled }) => disabled &&
|
|
4873
|
+
${({ disabled }) => disabled && import_styled_components42.css`
|
|
4677
4874
|
opacity: 0.5;
|
|
4678
4875
|
pointer-events: none;
|
|
4679
4876
|
cursor: not-allowed;
|
|
4680
4877
|
`}
|
|
4681
4878
|
`;
|
|
4682
|
-
var TabSlider =
|
|
4879
|
+
var TabSlider = import_styled_components42.default.div`
|
|
4683
4880
|
margin: 5px 0;
|
|
4684
4881
|
position: absolute;
|
|
4685
4882
|
height: calc(100% - 10px);
|
|
@@ -4699,10 +4896,10 @@ var IconTabs = ({
|
|
|
4699
4896
|
defaultTabIndex = 0
|
|
4700
4897
|
}) => {
|
|
4701
4898
|
var _a;
|
|
4702
|
-
const [selectedTab, setSelectedTab] = (0,
|
|
4703
|
-
const sliderRef = (0,
|
|
4704
|
-
const tabRefs = (0,
|
|
4705
|
-
(0,
|
|
4899
|
+
const [selectedTab, setSelectedTab] = (0, import_react25.useState)(defaultTabIndex);
|
|
4900
|
+
const sliderRef = (0, import_react25.useRef)(null);
|
|
4901
|
+
const tabRefs = (0, import_react25.useRef)([]);
|
|
4902
|
+
(0, import_react25.useEffect)(() => {
|
|
4706
4903
|
if (defaultTabIndex >= 0 && defaultTabIndex !== selectedTab) {
|
|
4707
4904
|
setSelectedTab(defaultTabIndex);
|
|
4708
4905
|
}
|
|
@@ -4713,7 +4910,7 @@ var IconTabs = ({
|
|
|
4713
4910
|
onTabChange(index);
|
|
4714
4911
|
}
|
|
4715
4912
|
};
|
|
4716
|
-
(0,
|
|
4913
|
+
(0, import_react25.useEffect)(() => {
|
|
4717
4914
|
if (sliderRef.current && tabRefs.current[selectedTab]) {
|
|
4718
4915
|
const selectedTabRect = tabRefs.current[selectedTab].getBoundingClientRect();
|
|
4719
4916
|
const parentRect = tabRefs.current[selectedTab].parentElement.getBoundingClientRect();
|
|
@@ -4722,9 +4919,9 @@ var IconTabs = ({
|
|
|
4722
4919
|
sliderRef.current.style.backgroundColor = colors[selectedColor];
|
|
4723
4920
|
}
|
|
4724
4921
|
}, [selectedTab, selectedColor]);
|
|
4725
|
-
return /* @__PURE__ */ (0,
|
|
4726
|
-
/* @__PURE__ */ (0,
|
|
4727
|
-
items.map((item, index) => /* @__PURE__ */ (0,
|
|
4922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(TabsContainer, { children: [
|
|
4923
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(IconsRow, { children: [
|
|
4924
|
+
items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4728
4925
|
Tab2,
|
|
4729
4926
|
{
|
|
4730
4927
|
selected: selectedTab === index,
|
|
@@ -4733,7 +4930,7 @@ var IconTabs = ({
|
|
|
4733
4930
|
ref: (el) => {
|
|
4734
4931
|
tabRefs.current[index] = el;
|
|
4735
4932
|
},
|
|
4736
|
-
children: item.icon && /* @__PURE__ */ (0,
|
|
4933
|
+
children: item.icon && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4737
4934
|
Icon,
|
|
4738
4935
|
{
|
|
4739
4936
|
name: item.icon,
|
|
@@ -4745,28 +4942,28 @@ var IconTabs = ({
|
|
|
4745
4942
|
},
|
|
4746
4943
|
index
|
|
4747
4944
|
)),
|
|
4748
|
-
/* @__PURE__ */ (0,
|
|
4945
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TabSlider, { ref: sliderRef })
|
|
4749
4946
|
] }),
|
|
4750
|
-
/* @__PURE__ */ (0,
|
|
4947
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { align: "center", size: "xs", children: (_a = items[selectedTab]) == null ? void 0 : _a.label })
|
|
4751
4948
|
] });
|
|
4752
4949
|
};
|
|
4753
4950
|
|
|
4754
4951
|
// src/Components/Popover/Popover.tsx
|
|
4755
|
-
var
|
|
4756
|
-
var
|
|
4757
|
-
var
|
|
4758
|
-
var
|
|
4759
|
-
var PopoverWrapper =
|
|
4952
|
+
var import_react26 = require("react");
|
|
4953
|
+
var import_react_dom3 = require("react-dom");
|
|
4954
|
+
var import_styled_components43 = __toESM(require("styled-components"));
|
|
4955
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4956
|
+
var PopoverWrapper = import_styled_components43.default.div`
|
|
4760
4957
|
position: relative;
|
|
4761
4958
|
display: ${({ $fullWidth }) => $fullWidth ? "block" : "inline-block"};
|
|
4762
4959
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
4763
4960
|
`;
|
|
4764
|
-
var PopoverTrigger =
|
|
4961
|
+
var PopoverTrigger = import_styled_components43.default.span`
|
|
4765
4962
|
cursor: pointer;
|
|
4766
4963
|
display: ${({ $fullWidth }) => $fullWidth ? "block" : "inline"};
|
|
4767
4964
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
4768
4965
|
`;
|
|
4769
|
-
var PopoverMenu =
|
|
4966
|
+
var PopoverMenu = import_styled_components43.default.div`
|
|
4770
4967
|
position: fixed;
|
|
4771
4968
|
background: #fff;
|
|
4772
4969
|
border: 1px solid #eee;
|
|
@@ -4776,7 +4973,7 @@ var PopoverMenu = import_styled_components41.default.div`
|
|
|
4776
4973
|
min-width: 140px;
|
|
4777
4974
|
padding: 4px;
|
|
4778
4975
|
`;
|
|
4779
|
-
var PopoverItem =
|
|
4976
|
+
var PopoverItem = import_styled_components43.default.div`
|
|
4780
4977
|
padding: 8px 12px;
|
|
4781
4978
|
cursor: pointer;
|
|
4782
4979
|
border-radius: 4px;
|
|
@@ -4798,15 +4995,15 @@ var Popover = ({
|
|
|
4798
4995
|
align = "right",
|
|
4799
4996
|
fullWidth = false
|
|
4800
4997
|
}) => {
|
|
4801
|
-
const [open, setOpen] = (0,
|
|
4802
|
-
const ref = (0,
|
|
4803
|
-
const menuRef = (0,
|
|
4804
|
-
const [menuPosition, setMenuPosition] = (0,
|
|
4998
|
+
const [open, setOpen] = (0, import_react26.useState)(false);
|
|
4999
|
+
const ref = (0, import_react26.useRef)(null);
|
|
5000
|
+
const menuRef = (0, import_react26.useRef)(null);
|
|
5001
|
+
const [menuPosition, setMenuPosition] = (0, import_react26.useState)({
|
|
4805
5002
|
mode: "default",
|
|
4806
5003
|
top: 0,
|
|
4807
5004
|
left: 0
|
|
4808
5005
|
});
|
|
4809
|
-
const updatePosition = (0,
|
|
5006
|
+
const updatePosition = (0, import_react26.useCallback)(() => {
|
|
4810
5007
|
var _a;
|
|
4811
5008
|
if (!ref.current) return;
|
|
4812
5009
|
if (anchorRef == null ? void 0 : anchorRef.current) {
|
|
@@ -4835,7 +5032,7 @@ var Popover = ({
|
|
|
4835
5032
|
});
|
|
4836
5033
|
}
|
|
4837
5034
|
}, [items.length, anchorRef, offsetY, align]);
|
|
4838
|
-
(0,
|
|
5035
|
+
(0, import_react26.useEffect)(() => {
|
|
4839
5036
|
const handleClickOutside = (event) => {
|
|
4840
5037
|
var _a, _b;
|
|
4841
5038
|
const isInTrigger = (_a = ref.current) == null ? void 0 : _a.contains(event.target);
|
|
@@ -4868,10 +5065,10 @@ var Popover = ({
|
|
|
4868
5065
|
left: menuPosition.left,
|
|
4869
5066
|
transform: align === "left" ? "none" : "translateX(-100%)"
|
|
4870
5067
|
};
|
|
4871
|
-
return /* @__PURE__ */ (0,
|
|
4872
|
-
/* @__PURE__ */ (0,
|
|
4873
|
-
open && (0,
|
|
4874
|
-
/* @__PURE__ */ (0,
|
|
5068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(PopoverWrapper, { ref, $fullWidth: fullWidth, children: [
|
|
5069
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PopoverTrigger, { $fullWidth: fullWidth, onClick: () => setOpen((o) => !o), children }),
|
|
5070
|
+
open && (0, import_react_dom3.createPortal)(
|
|
5071
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PopoverMenu, { ref: menuRef, style: menuStyle, children: items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4875
5072
|
PopoverItem,
|
|
4876
5073
|
{
|
|
4877
5074
|
isLast: idx === items.length - 1,
|
|
@@ -4890,7 +5087,7 @@ var Popover = ({
|
|
|
4890
5087
|
};
|
|
4891
5088
|
|
|
4892
5089
|
// src/Components/MetricCard/MetricCard.tsx
|
|
4893
|
-
var
|
|
5090
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4894
5091
|
var MetricCard = ({
|
|
4895
5092
|
icon,
|
|
4896
5093
|
title,
|
|
@@ -4903,7 +5100,7 @@ var MetricCard = ({
|
|
|
4903
5100
|
onClick,
|
|
4904
5101
|
checked = false
|
|
4905
5102
|
}) => {
|
|
4906
|
-
return /* @__PURE__ */ (0,
|
|
5103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4907
5104
|
Box,
|
|
4908
5105
|
{
|
|
4909
5106
|
padding: "16px",
|
|
@@ -4914,8 +5111,8 @@ var MetricCard = ({
|
|
|
4914
5111
|
cursor: onClick ? "pointer" : "default"
|
|
4915
5112
|
},
|
|
4916
5113
|
onClick,
|
|
4917
|
-
children: /* @__PURE__ */ (0,
|
|
4918
|
-
/* @__PURE__ */ (0,
|
|
5114
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Row, { alignItems: "center", gap: "12", fullWidth: true, children: [
|
|
5115
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4919
5116
|
Box,
|
|
4920
5117
|
{
|
|
4921
5118
|
alignItems: "center",
|
|
@@ -4926,17 +5123,17 @@ var MetricCard = ({
|
|
|
4926
5123
|
height: 40,
|
|
4927
5124
|
borderRadius: 50
|
|
4928
5125
|
},
|
|
4929
|
-
children: /* @__PURE__ */ (0,
|
|
5126
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon, { name: icon, size: "m", color: iconColor, family: "regular" })
|
|
4930
5127
|
}
|
|
4931
5128
|
),
|
|
4932
|
-
contentLayout === "row" ? /* @__PURE__ */ (0,
|
|
4933
|
-
/* @__PURE__ */ (0,
|
|
4934
|
-
/* @__PURE__ */ (0,
|
|
4935
|
-
] }) : /* @__PURE__ */ (0,
|
|
4936
|
-
/* @__PURE__ */ (0,
|
|
4937
|
-
/* @__PURE__ */ (0,
|
|
4938
|
-
/* @__PURE__ */ (0,
|
|
4939
|
-
subtitle && /* @__PURE__ */ (0,
|
|
5129
|
+
contentLayout === "row" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Row, { gap: "6", alignItems: "center", children: [
|
|
5130
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { size: "s", weight: "bold", variant: valueColor || "grey_600", children: value }),
|
|
5131
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { size: "s", variant: "grey_600", children: title })
|
|
5132
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Col, { gap: "4", children: [
|
|
5133
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { size: "s", variant: "grey_600", children: title }),
|
|
5134
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Row, { gap: "6", alignItems: "baseline", children: [
|
|
5135
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { size: "s", weight: "bold", variant: valueColor || "grey_600", children: value }),
|
|
5136
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { size: "xs", variant: "grey_600", children: subtitle })
|
|
4940
5137
|
] })
|
|
4941
5138
|
] })
|
|
4942
5139
|
] })
|
|
@@ -4945,15 +5142,15 @@ var MetricCard = ({
|
|
|
4945
5142
|
};
|
|
4946
5143
|
|
|
4947
5144
|
// src/Components/Tooltip/Tooltip.tsx
|
|
4948
|
-
var
|
|
4949
|
-
var
|
|
4950
|
-
var
|
|
4951
|
-
var StyledTooltipWrapper =
|
|
5145
|
+
var import_react27 = require("react");
|
|
5146
|
+
var import_styled_components44 = __toESM(require("styled-components"));
|
|
5147
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5148
|
+
var StyledTooltipWrapper = import_styled_components44.default.div`
|
|
4952
5149
|
position: relative;
|
|
4953
5150
|
display: inline-block;
|
|
4954
5151
|
cursor: pointer;
|
|
4955
5152
|
`;
|
|
4956
|
-
var StyledTooltipContent =
|
|
5153
|
+
var StyledTooltipContent = import_styled_components44.default.div`
|
|
4957
5154
|
visibility: ${(props) => props.$isVisible ? "visible" : "hidden"};
|
|
4958
5155
|
background-color: ${(props) => props.$backgroundColor || colors.black};
|
|
4959
5156
|
color: ${colors.white};
|
|
@@ -5049,17 +5246,17 @@ var Tooltip = ({
|
|
|
5049
5246
|
direction = "top",
|
|
5050
5247
|
children
|
|
5051
5248
|
}) => {
|
|
5052
|
-
const [isVisible, setIsVisible] = (0,
|
|
5249
|
+
const [isVisible, setIsVisible] = (0, import_react27.useState)(false);
|
|
5053
5250
|
const handleMouseEnter = () => setIsVisible(true);
|
|
5054
5251
|
const handleMouseLeave = () => setIsVisible(false);
|
|
5055
|
-
return /* @__PURE__ */ (0,
|
|
5252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
5056
5253
|
StyledTooltipWrapper,
|
|
5057
5254
|
{
|
|
5058
5255
|
onMouseEnter: handleMouseEnter,
|
|
5059
5256
|
onMouseLeave: handleMouseLeave,
|
|
5060
5257
|
children: [
|
|
5061
5258
|
children,
|
|
5062
|
-
/* @__PURE__ */ (0,
|
|
5259
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
5063
5260
|
StyledTooltipContent,
|
|
5064
5261
|
{
|
|
5065
5262
|
$isVisible: isVisible,
|
|
@@ -5067,7 +5264,7 @@ var Tooltip = ({
|
|
|
5067
5264
|
$width: width,
|
|
5068
5265
|
$height: height,
|
|
5069
5266
|
$direction: direction,
|
|
5070
|
-
children: data.length > 0 ? data.map((item, index) => /* @__PURE__ */ (0,
|
|
5267
|
+
children: data.length > 0 ? data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Text, { size: "s", color: "white", children: item }, index)) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Text, { size: "s", color: "white", children: "Aucune donn\xE9e" })
|
|
5071
5268
|
}
|
|
5072
5269
|
)
|
|
5073
5270
|
]
|
|
@@ -5076,8 +5273,8 @@ var Tooltip = ({
|
|
|
5076
5273
|
};
|
|
5077
5274
|
|
|
5078
5275
|
// src/Components/Pagination/Pagination.tsx
|
|
5079
|
-
var
|
|
5080
|
-
var
|
|
5276
|
+
var import_react28 = require("react");
|
|
5277
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5081
5278
|
var getPageNumbers = (current, total) => {
|
|
5082
5279
|
if (total <= 5) {
|
|
5083
5280
|
return Array.from({ length: total }, (_, i) => i + 1);
|
|
@@ -5100,22 +5297,22 @@ var Pagination = ({
|
|
|
5100
5297
|
summaryLabel
|
|
5101
5298
|
}) => {
|
|
5102
5299
|
const totalPages = Math.max(1, Math.ceil(totalItems / itemsPerPage));
|
|
5103
|
-
const pages = (0,
|
|
5300
|
+
const pages = (0, import_react28.useMemo)(
|
|
5104
5301
|
() => getPageNumbers(currentPage, totalPages),
|
|
5105
5302
|
[currentPage, totalPages]
|
|
5106
5303
|
);
|
|
5107
5304
|
const startItem = (currentPage - 1) * itemsPerPage + 1;
|
|
5108
5305
|
const endItem = Math.min(currentPage * itemsPerPage, totalItems);
|
|
5109
5306
|
const summary = summaryLabel || defaultSummary(startItem, endItem, totalItems);
|
|
5110
|
-
return /* @__PURE__ */ (0,
|
|
5307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
5111
5308
|
Row,
|
|
5112
5309
|
{
|
|
5113
5310
|
justifyContent: showSummary ? "space-between" : "flex-end",
|
|
5114
5311
|
alignItems: "center",
|
|
5115
5312
|
children: [
|
|
5116
|
-
showSummary && /* @__PURE__ */ (0,
|
|
5117
|
-
/* @__PURE__ */ (0,
|
|
5118
|
-
/* @__PURE__ */ (0,
|
|
5313
|
+
showSummary && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Text, { size: "s", color: colors.grey_500, children: summary }),
|
|
5314
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Row, { gap: "4", alignItems: "center", style: { width: "fit-content" }, children: [
|
|
5315
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5119
5316
|
Button,
|
|
5120
5317
|
{
|
|
5121
5318
|
size: "xs",
|
|
@@ -5126,7 +5323,7 @@ var Pagination = ({
|
|
|
5126
5323
|
}
|
|
5127
5324
|
),
|
|
5128
5325
|
pages.map(
|
|
5129
|
-
(page, index) => page === "..." ? /* @__PURE__ */ (0,
|
|
5326
|
+
(page, index) => page === "..." ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Text, { size: "s", color: colors.grey_500, children: "..." }, `ellipsis-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5130
5327
|
Button,
|
|
5131
5328
|
{
|
|
5132
5329
|
size: "xs",
|
|
@@ -5137,7 +5334,7 @@ var Pagination = ({
|
|
|
5137
5334
|
page
|
|
5138
5335
|
)
|
|
5139
5336
|
),
|
|
5140
|
-
/* @__PURE__ */ (0,
|
|
5337
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5141
5338
|
Button,
|
|
5142
5339
|
{
|
|
5143
5340
|
size: "xs",
|
|
@@ -5154,9 +5351,9 @@ var Pagination = ({
|
|
|
5154
5351
|
};
|
|
5155
5352
|
|
|
5156
5353
|
// src/Components/FileUploadZone/FileUploadZone.tsx
|
|
5157
|
-
var
|
|
5158
|
-
var
|
|
5159
|
-
var
|
|
5354
|
+
var import_react29 = require("react");
|
|
5355
|
+
var import_styled_components45 = __toESM(require("styled-components"));
|
|
5356
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
5160
5357
|
var ACCEPT_MAP = {
|
|
5161
5358
|
png: "image/png",
|
|
5162
5359
|
jpg: "image/jpeg",
|
|
@@ -5172,7 +5369,7 @@ var getMimeTypes = (accept) => {
|
|
|
5172
5369
|
return accept.map((ext) => ACCEPT_MAP[ext.toLowerCase()] || ext);
|
|
5173
5370
|
};
|
|
5174
5371
|
var isPdf = (type) => type === "application/pdf";
|
|
5175
|
-
var StyledDropZone =
|
|
5372
|
+
var StyledDropZone = import_styled_components45.default.label`
|
|
5176
5373
|
display: flex;
|
|
5177
5374
|
flex-direction: column;
|
|
5178
5375
|
align-items: center;
|
|
@@ -5196,7 +5393,7 @@ var StyledDropZone = import_styled_components43.default.label`
|
|
|
5196
5393
|
border-color: ${(p) => p.$disabled ? colors.blue_50 : colors.blue_100};
|
|
5197
5394
|
}
|
|
5198
5395
|
`;
|
|
5199
|
-
var StyledPreview =
|
|
5396
|
+
var StyledPreview = import_styled_components45.default.div`
|
|
5200
5397
|
display: flex;
|
|
5201
5398
|
flex-direction: column;
|
|
5202
5399
|
align-items: center;
|
|
@@ -5207,18 +5404,18 @@ var StyledPreview = import_styled_components43.default.div`
|
|
|
5207
5404
|
width: ${(p) => p.$fullWidth ? "100%" : "auto"};
|
|
5208
5405
|
box-sizing: border-box;
|
|
5209
5406
|
`;
|
|
5210
|
-
var StyledImage2 =
|
|
5407
|
+
var StyledImage2 = import_styled_components45.default.img`
|
|
5211
5408
|
max-width: 100%;
|
|
5212
5409
|
max-height: 400px;
|
|
5213
5410
|
border-radius: 4px;
|
|
5214
5411
|
object-fit: contain;
|
|
5215
5412
|
`;
|
|
5216
|
-
var StyledEmbed =
|
|
5413
|
+
var StyledEmbed = import_styled_components45.default.embed`
|
|
5217
5414
|
width: 100%;
|
|
5218
5415
|
height: 500px;
|
|
5219
5416
|
border-radius: 4px;
|
|
5220
5417
|
`;
|
|
5221
|
-
var HiddenInput2 =
|
|
5418
|
+
var HiddenInput2 = import_styled_components45.default.input`
|
|
5222
5419
|
display: none;
|
|
5223
5420
|
`;
|
|
5224
5421
|
var FileUploadZone = ({
|
|
@@ -5241,19 +5438,19 @@ var FileUploadZone = ({
|
|
|
5241
5438
|
icon = "cloud-arrow-up",
|
|
5242
5439
|
showFileName = false
|
|
5243
5440
|
}) => {
|
|
5244
|
-
const [isDragging, setIsDragging] = (0,
|
|
5245
|
-
const [internalPreviewUrl, setInternalPreviewUrl] = (0,
|
|
5441
|
+
const [isDragging, setIsDragging] = (0, import_react29.useState)(false);
|
|
5442
|
+
const [internalPreviewUrl, setInternalPreviewUrl] = (0, import_react29.useState)(
|
|
5246
5443
|
null
|
|
5247
5444
|
);
|
|
5248
|
-
const [fileType, setFileType] = (0,
|
|
5249
|
-
const [fileName, setFileName] = (0,
|
|
5250
|
-
const [inlineError, setInlineError] = (0,
|
|
5251
|
-
const inputRef = (0,
|
|
5445
|
+
const [fileType, setFileType] = (0, import_react29.useState)(null);
|
|
5446
|
+
const [fileName, setFileName] = (0, import_react29.useState)(null);
|
|
5447
|
+
const [inlineError, setInlineError] = (0, import_react29.useState)(null);
|
|
5448
|
+
const inputRef = (0, import_react29.useRef)(null);
|
|
5252
5449
|
const resolvedAccept = acceptOnlyPdf ? PDF_ONLY : accept;
|
|
5253
5450
|
const mimeTypes = getMimeTypes(resolvedAccept);
|
|
5254
5451
|
const acceptString = mimeTypes.join(",");
|
|
5255
5452
|
const previewUrl = multiple ? null : controlledPreviewUrl || (showPreview ? internalPreviewUrl : null);
|
|
5256
|
-
const emitError = (0,
|
|
5453
|
+
const emitError = (0, import_react29.useCallback)(
|
|
5257
5454
|
(message) => {
|
|
5258
5455
|
if (onError) {
|
|
5259
5456
|
onError(message);
|
|
@@ -5263,7 +5460,7 @@ var FileUploadZone = ({
|
|
|
5263
5460
|
},
|
|
5264
5461
|
[onError]
|
|
5265
5462
|
);
|
|
5266
|
-
const validateFile = (0,
|
|
5463
|
+
const validateFile = (0, import_react29.useCallback)(
|
|
5267
5464
|
(file) => {
|
|
5268
5465
|
if (!mimeTypes.includes(file.type)) {
|
|
5269
5466
|
return { ok: false, error: "Format de fichier non accept\xE9." };
|
|
@@ -5278,7 +5475,7 @@ var FileUploadZone = ({
|
|
|
5278
5475
|
},
|
|
5279
5476
|
[mimeTypes, maxSizeMB]
|
|
5280
5477
|
);
|
|
5281
|
-
const processFile = (0,
|
|
5478
|
+
const processFile = (0, import_react29.useCallback)(
|
|
5282
5479
|
(file) => {
|
|
5283
5480
|
setInlineError(null);
|
|
5284
5481
|
const result = validateFile(file);
|
|
@@ -5296,7 +5493,7 @@ var FileUploadZone = ({
|
|
|
5296
5493
|
},
|
|
5297
5494
|
[validateFile, onSave, showPreview, emitError]
|
|
5298
5495
|
);
|
|
5299
|
-
const processFiles = (0,
|
|
5496
|
+
const processFiles = (0, import_react29.useCallback)(
|
|
5300
5497
|
(files) => {
|
|
5301
5498
|
setInlineError(null);
|
|
5302
5499
|
for (const file of files) {
|
|
@@ -5354,9 +5551,9 @@ var FileUploadZone = ({
|
|
|
5354
5551
|
onRemove == null ? void 0 : onRemove();
|
|
5355
5552
|
};
|
|
5356
5553
|
if (previewUrl) {
|
|
5357
|
-
return /* @__PURE__ */ (0,
|
|
5358
|
-
fileType && isPdf(fileType) ? /* @__PURE__ */ (0,
|
|
5359
|
-
/* @__PURE__ */ (0,
|
|
5554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(StyledPreview, { $fullWidth: fullWidth, children: [
|
|
5555
|
+
fileType && isPdf(fileType) ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(StyledEmbed, { src: previewUrl, type: "application/pdf" }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(StyledImage2, { src: previewUrl, alt: "Aper\xE7u du fichier" }),
|
|
5556
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Row, { gap: "8", justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5360
5557
|
Button,
|
|
5361
5558
|
{
|
|
5362
5559
|
onClick: handleRemove,
|
|
@@ -5370,8 +5567,8 @@ var FileUploadZone = ({
|
|
|
5370
5567
|
}
|
|
5371
5568
|
const showIcon = icon !== false;
|
|
5372
5569
|
const showBrowse = !compact && browseLabel !== false;
|
|
5373
|
-
return /* @__PURE__ */ (0,
|
|
5374
|
-
/* @__PURE__ */ (0,
|
|
5570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Col, { gap: "4", fullWidth, children: [
|
|
5571
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
5375
5572
|
StyledDropZone,
|
|
5376
5573
|
{
|
|
5377
5574
|
$isDragging: isDragging,
|
|
@@ -5382,7 +5579,7 @@ var FileUploadZone = ({
|
|
|
5382
5579
|
onDragLeave: handleDragLeave,
|
|
5383
5580
|
onDrop: handleDrop,
|
|
5384
5581
|
children: [
|
|
5385
|
-
/* @__PURE__ */ (0,
|
|
5582
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5386
5583
|
HiddenInput2,
|
|
5387
5584
|
{
|
|
5388
5585
|
ref: inputRef,
|
|
@@ -5393,7 +5590,7 @@ var FileUploadZone = ({
|
|
|
5393
5590
|
multiple
|
|
5394
5591
|
}
|
|
5395
5592
|
),
|
|
5396
|
-
showIcon && /* @__PURE__ */ (0,
|
|
5593
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5397
5594
|
Icon,
|
|
5398
5595
|
{
|
|
5399
5596
|
name: icon,
|
|
@@ -5402,9 +5599,9 @@ var FileUploadZone = ({
|
|
|
5402
5599
|
color: "blue_700"
|
|
5403
5600
|
}
|
|
5404
5601
|
),
|
|
5405
|
-
/* @__PURE__ */ (0,
|
|
5406
|
-
showBrowse && /* @__PURE__ */ (0,
|
|
5407
|
-
showBrowse && /* @__PURE__ */ (0,
|
|
5602
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { size: "s", variant: "grey_600", align: "center", children: label }),
|
|
5603
|
+
showBrowse && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { size: "xs", variant: "grey_600", align: "center", children: "ou" }),
|
|
5604
|
+
showBrowse && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5408
5605
|
Button,
|
|
5409
5606
|
{
|
|
5410
5607
|
outline: true,
|
|
@@ -5417,31 +5614,31 @@ var FileUploadZone = ({
|
|
|
5417
5614
|
}
|
|
5418
5615
|
}
|
|
5419
5616
|
),
|
|
5420
|
-
sublabel && /* @__PURE__ */ (0,
|
|
5617
|
+
sublabel && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { size: "xs", variant: "grey_500", align: "center", children: sublabel })
|
|
5421
5618
|
]
|
|
5422
5619
|
}
|
|
5423
5620
|
),
|
|
5424
|
-
showFileName && fileName && /* @__PURE__ */ (0,
|
|
5425
|
-
/* @__PURE__ */ (0,
|
|
5426
|
-
/* @__PURE__ */ (0,
|
|
5621
|
+
showFileName && fileName && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Row, { gap: "8", alignItems: "center", justifyContent: "center", children: [
|
|
5622
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon, { name: "file", size: "s", color: "green_700" }),
|
|
5623
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { size: "s", color: "green_700", children: fileName })
|
|
5427
5624
|
] }),
|
|
5428
|
-
inlineError && /* @__PURE__ */ (0,
|
|
5625
|
+
inlineError && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { size: "s", color: "danger", align: "center", children: inlineError })
|
|
5429
5626
|
] });
|
|
5430
5627
|
};
|
|
5431
5628
|
|
|
5432
5629
|
// src/Components/Spinner/Spinner.tsx
|
|
5433
|
-
var
|
|
5434
|
-
var
|
|
5630
|
+
var import_styled_components46 = __toESM(require("styled-components"));
|
|
5631
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5435
5632
|
var SIZES3 = {
|
|
5436
5633
|
s: 20,
|
|
5437
5634
|
m: 32,
|
|
5438
5635
|
l: 48
|
|
5439
5636
|
};
|
|
5440
|
-
var spin =
|
|
5637
|
+
var spin = import_styled_components46.keyframes`
|
|
5441
5638
|
0% { transform: rotate(0deg); }
|
|
5442
5639
|
100% { transform: rotate(360deg); }
|
|
5443
5640
|
`;
|
|
5444
|
-
var StyledSpinner =
|
|
5641
|
+
var StyledSpinner = import_styled_components46.default.span`
|
|
5445
5642
|
display: inline-block;
|
|
5446
5643
|
width: ${(p) => p.$size}px;
|
|
5447
5644
|
height: ${(p) => p.$size}px;
|
|
@@ -5454,7 +5651,7 @@ var StyledSpinner = import_styled_components44.default.span`
|
|
|
5454
5651
|
var Spinner = ({ size = "m", color = "primary" }) => {
|
|
5455
5652
|
const resolvedSize = SIZES3[size];
|
|
5456
5653
|
const resolvedColor = colors[color] || color || colors.primary;
|
|
5457
|
-
return /* @__PURE__ */ (0,
|
|
5654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5458
5655
|
StyledSpinner,
|
|
5459
5656
|
{
|
|
5460
5657
|
$size: resolvedSize,
|
|
@@ -5466,7 +5663,7 @@ var Spinner = ({ size = "m", color = "primary" }) => {
|
|
|
5466
5663
|
};
|
|
5467
5664
|
|
|
5468
5665
|
// src/Components/EmptyState/EmptyState.tsx
|
|
5469
|
-
var
|
|
5666
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5470
5667
|
var EmptyState = ({
|
|
5471
5668
|
icon = "inbox",
|
|
5472
5669
|
title = "Aucun r\xE9sultat",
|
|
@@ -5474,7 +5671,7 @@ var EmptyState = ({
|
|
|
5474
5671
|
actionLabel,
|
|
5475
5672
|
onAction
|
|
5476
5673
|
}) => {
|
|
5477
|
-
return /* @__PURE__ */ (0,
|
|
5674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
5478
5675
|
Col,
|
|
5479
5676
|
{
|
|
5480
5677
|
fullWidth: true,
|
|
@@ -5483,20 +5680,20 @@ var EmptyState = ({
|
|
|
5483
5680
|
gap: "24",
|
|
5484
5681
|
padding: "24px 16px",
|
|
5485
5682
|
children: [
|
|
5486
|
-
/* @__PURE__ */ (0,
|
|
5487
|
-
/* @__PURE__ */ (0,
|
|
5488
|
-
/* @__PURE__ */ (0,
|
|
5489
|
-
description && /* @__PURE__ */ (0,
|
|
5683
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Icon, { name: icon, family: "solid", size: "xxl", color: "grey_300" }),
|
|
5684
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Col, { alignItems: "center", gap: "4", style: { maxWidth: "360px" }, children: [
|
|
5685
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { size: "m", weight: "600", variant: "grey_600", align: "center", children: title }),
|
|
5686
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { size: "s", variant: "grey_500", align: "center", children: description })
|
|
5490
5687
|
] }),
|
|
5491
|
-
actionLabel && onAction && /* @__PURE__ */ (0,
|
|
5688
|
+
actionLabel && onAction && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { label: actionLabel, onClick: onAction })
|
|
5492
5689
|
]
|
|
5493
5690
|
}
|
|
5494
5691
|
);
|
|
5495
5692
|
};
|
|
5496
5693
|
|
|
5497
5694
|
// src/Components/FloatingButton/FloatingButton.tsx
|
|
5498
|
-
var
|
|
5499
|
-
var
|
|
5695
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
5696
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5500
5697
|
var FloatingButton = ({
|
|
5501
5698
|
isOpen,
|
|
5502
5699
|
onToggle,
|
|
@@ -5508,10 +5705,10 @@ var FloatingButton = ({
|
|
|
5508
5705
|
variant = "blue_700"
|
|
5509
5706
|
}) => {
|
|
5510
5707
|
const accent = colors[variant];
|
|
5511
|
-
return /* @__PURE__ */ (0,
|
|
5708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Container6, { children: [
|
|
5512
5709
|
actions.map((action, index) => {
|
|
5513
5710
|
var _a;
|
|
5514
|
-
return /* @__PURE__ */ (0,
|
|
5711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
5515
5712
|
SubButton,
|
|
5516
5713
|
{
|
|
5517
5714
|
type: "button",
|
|
@@ -5520,14 +5717,14 @@ var FloatingButton = ({
|
|
|
5520
5717
|
$transform: arcTransform(index, actions.length),
|
|
5521
5718
|
onClick: action.onClick,
|
|
5522
5719
|
children: [
|
|
5523
|
-
/* @__PURE__ */ (0,
|
|
5524
|
-
((_a = action.badge) != null ? _a : 0) > 0 && /* @__PURE__ */ (0,
|
|
5720
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: action.icon, family: "regular", size: "s", color: accent }),
|
|
5721
|
+
((_a = action.badge) != null ? _a : 0) > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(CountBadge, { children: action.badge })
|
|
5525
5722
|
]
|
|
5526
5723
|
},
|
|
5527
5724
|
action.id
|
|
5528
5725
|
);
|
|
5529
5726
|
}),
|
|
5530
|
-
/* @__PURE__ */ (0,
|
|
5727
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
5531
5728
|
MainButton,
|
|
5532
5729
|
{
|
|
5533
5730
|
type: "button",
|
|
@@ -5536,7 +5733,7 @@ var FloatingButton = ({
|
|
|
5536
5733
|
$accent: accent,
|
|
5537
5734
|
onClick: onToggle,
|
|
5538
5735
|
children: [
|
|
5539
|
-
/* @__PURE__ */ (0,
|
|
5736
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5540
5737
|
Icon,
|
|
5541
5738
|
{
|
|
5542
5739
|
name: isOpen ? openIcon : icon,
|
|
@@ -5545,7 +5742,7 @@ var FloatingButton = ({
|
|
|
5545
5742
|
color: colors.white
|
|
5546
5743
|
}
|
|
5547
5744
|
),
|
|
5548
|
-
!isOpen && mainBadge > 0 && /* @__PURE__ */ (0,
|
|
5745
|
+
!isOpen && mainBadge > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(CountBadge, { children: mainBadge })
|
|
5549
5746
|
]
|
|
5550
5747
|
}
|
|
5551
5748
|
)
|
|
@@ -5564,7 +5761,7 @@ var arcTransform = (index, total) => {
|
|
|
5564
5761
|
const y = Math.round(-Math.sin(angle) * ARC_RADIUS);
|
|
5565
5762
|
return `translate(${x}px, ${y}px)`;
|
|
5566
5763
|
};
|
|
5567
|
-
var Container6 =
|
|
5764
|
+
var Container6 = import_styled_components47.default.div`
|
|
5568
5765
|
position: fixed;
|
|
5569
5766
|
right: 32px;
|
|
5570
5767
|
bottom: 32px;
|
|
@@ -5572,7 +5769,7 @@ var Container6 = import_styled_components45.default.div`
|
|
|
5572
5769
|
height: ${FAB_SIZE}px;
|
|
5573
5770
|
z-index: 1000;
|
|
5574
5771
|
`;
|
|
5575
|
-
var MainButton =
|
|
5772
|
+
var MainButton = import_styled_components47.default.button`
|
|
5576
5773
|
position: absolute;
|
|
5577
5774
|
inset: 0;
|
|
5578
5775
|
display: flex;
|
|
@@ -5586,7 +5783,7 @@ var MainButton = import_styled_components45.default.button`
|
|
|
5586
5783
|
0 8px 5px rgba(0, 0, 0, 0.1),
|
|
5587
5784
|
0 20px 12.5px rgba(0, 0, 0, 0.1);
|
|
5588
5785
|
`;
|
|
5589
|
-
var SubButton =
|
|
5786
|
+
var SubButton = import_styled_components47.default.button`
|
|
5590
5787
|
position: absolute;
|
|
5591
5788
|
left: ${(FAB_SIZE - SUB_SIZE) / 2}px;
|
|
5592
5789
|
top: ${(FAB_SIZE - SUB_SIZE) / 2}px;
|
|
@@ -5609,7 +5806,7 @@ var SubButton = import_styled_components45.default.button`
|
|
|
5609
5806
|
opacity: ${({ $isOpen }) => $isOpen ? 1 : 0};
|
|
5610
5807
|
pointer-events: ${({ $isOpen }) => $isOpen ? "auto" : "none"};
|
|
5611
5808
|
`;
|
|
5612
|
-
var CountBadge =
|
|
5809
|
+
var CountBadge = import_styled_components47.default.span`
|
|
5613
5810
|
position: absolute;
|
|
5614
5811
|
top: -4px;
|
|
5615
5812
|
right: -4px;
|
|
@@ -5627,16 +5824,16 @@ var CountBadge = import_styled_components45.default.span`
|
|
|
5627
5824
|
`;
|
|
5628
5825
|
|
|
5629
5826
|
// src/Components/ProgressBar/ProgressBar.tsx
|
|
5630
|
-
var
|
|
5631
|
-
var
|
|
5827
|
+
var import_styled_components48 = __toESM(require("styled-components"));
|
|
5828
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5632
5829
|
var clampPercent = (value) => Math.max(0, Math.min(100, value));
|
|
5633
|
-
var Wrapper6 =
|
|
5830
|
+
var Wrapper6 = import_styled_components48.default.div`
|
|
5634
5831
|
display: flex;
|
|
5635
5832
|
align-items: center;
|
|
5636
5833
|
gap: 8px;
|
|
5637
5834
|
width: 100%;
|
|
5638
5835
|
`;
|
|
5639
|
-
var Track2 =
|
|
5836
|
+
var Track2 = import_styled_components48.default.div`
|
|
5640
5837
|
position: relative;
|
|
5641
5838
|
flex: 1;
|
|
5642
5839
|
height: ${({ $height }) => $height}px;
|
|
@@ -5644,14 +5841,14 @@ var Track2 = import_styled_components46.default.div`
|
|
|
5644
5841
|
border-radius: ${({ $height }) => $height}px;
|
|
5645
5842
|
overflow: hidden;
|
|
5646
5843
|
`;
|
|
5647
|
-
var Fill =
|
|
5844
|
+
var Fill = import_styled_components48.default.div`
|
|
5648
5845
|
height: 100%;
|
|
5649
5846
|
width: ${({ $percent }) => $percent}%;
|
|
5650
5847
|
background: ${({ $color }) => $color};
|
|
5651
5848
|
border-radius: ${({ $height }) => $height}px;
|
|
5652
5849
|
transition: width 0.2s ease;
|
|
5653
5850
|
`;
|
|
5654
|
-
var
|
|
5851
|
+
var ProgressBar2 = ({
|
|
5655
5852
|
value,
|
|
5656
5853
|
color = colors.blue_700,
|
|
5657
5854
|
trackColor = colors.grey_200,
|
|
@@ -5659,9 +5856,9 @@ var ProgressBar = ({
|
|
|
5659
5856
|
showLabel = false
|
|
5660
5857
|
}) => {
|
|
5661
5858
|
const percent = clampPercent(value);
|
|
5662
|
-
return /* @__PURE__ */ (0,
|
|
5663
|
-
/* @__PURE__ */ (0,
|
|
5664
|
-
showLabel && /* @__PURE__ */ (0,
|
|
5859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Wrapper6, { children: [
|
|
5860
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Track2, { $height: height, $trackColor: trackColor, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Fill, { $height: height, $color: color, $percent: percent }) }),
|
|
5861
|
+
showLabel && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Text, { size: "s", weight: "600", children: [
|
|
5665
5862
|
Math.round(percent),
|
|
5666
5863
|
" %"
|
|
5667
5864
|
] })
|
|
@@ -5669,24 +5866,24 @@ var ProgressBar = ({
|
|
|
5669
5866
|
};
|
|
5670
5867
|
|
|
5671
5868
|
// src/Components/Timeline/Timeline.tsx
|
|
5672
|
-
var
|
|
5673
|
-
var
|
|
5674
|
-
var List2 =
|
|
5869
|
+
var import_styled_components49 = __toESM(require("styled-components"));
|
|
5870
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5871
|
+
var List2 = import_styled_components49.default.div`
|
|
5675
5872
|
display: flex;
|
|
5676
5873
|
flex-direction: column;
|
|
5677
5874
|
`;
|
|
5678
|
-
var Item2 =
|
|
5875
|
+
var Item2 = import_styled_components49.default.div`
|
|
5679
5876
|
display: flex;
|
|
5680
5877
|
gap: 12px;
|
|
5681
5878
|
align-items: stretch;
|
|
5682
5879
|
`;
|
|
5683
|
-
var Rail =
|
|
5880
|
+
var Rail = import_styled_components49.default.div`
|
|
5684
5881
|
display: flex;
|
|
5685
5882
|
flex-direction: column;
|
|
5686
5883
|
align-items: center;
|
|
5687
5884
|
width: 16px;
|
|
5688
5885
|
`;
|
|
5689
|
-
var Dot2 =
|
|
5886
|
+
var Dot2 = import_styled_components49.default.div`
|
|
5690
5887
|
width: 10px;
|
|
5691
5888
|
height: 10px;
|
|
5692
5889
|
border-radius: 50%;
|
|
@@ -5694,13 +5891,13 @@ var Dot2 = import_styled_components47.default.div`
|
|
|
5694
5891
|
flex: 0 0 auto;
|
|
5695
5892
|
background: ${({ $color }) => $color};
|
|
5696
5893
|
`;
|
|
5697
|
-
var Line =
|
|
5894
|
+
var Line = import_styled_components49.default.div`
|
|
5698
5895
|
width: 2px;
|
|
5699
5896
|
flex: 1;
|
|
5700
5897
|
min-height: 16px;
|
|
5701
5898
|
background: ${({ $color }) => $color};
|
|
5702
5899
|
`;
|
|
5703
|
-
var
|
|
5900
|
+
var Content2 = import_styled_components49.default.div`
|
|
5704
5901
|
display: flex;
|
|
5705
5902
|
flex-direction: column;
|
|
5706
5903
|
gap: 2px;
|
|
@@ -5712,21 +5909,21 @@ var Timeline = ({
|
|
|
5712
5909
|
emptyLabel = "Aucun \xE9v\xE9nement"
|
|
5713
5910
|
}) => {
|
|
5714
5911
|
if (items.length === 0) {
|
|
5715
|
-
return /* @__PURE__ */ (0,
|
|
5912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { size: "s", color: colors.grey_600, children: emptyLabel });
|
|
5716
5913
|
}
|
|
5717
|
-
return /* @__PURE__ */ (0,
|
|
5914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(List2, { children: items.map((item, index) => {
|
|
5718
5915
|
var _a;
|
|
5719
5916
|
const isLast = index === items.length - 1;
|
|
5720
5917
|
const dotColor = (_a = item.color) != null ? _a : colors.blue_700;
|
|
5721
|
-
return /* @__PURE__ */ (0,
|
|
5722
|
-
/* @__PURE__ */ (0,
|
|
5723
|
-
/* @__PURE__ */ (0,
|
|
5724
|
-
!isLast && /* @__PURE__ */ (0,
|
|
5918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Item2, { children: [
|
|
5919
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Rail, { children: [
|
|
5920
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Dot2, { $color: dotColor }),
|
|
5921
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Line, { $color: lineColor })
|
|
5725
5922
|
] }),
|
|
5726
|
-
/* @__PURE__ */ (0,
|
|
5727
|
-
/* @__PURE__ */ (0,
|
|
5728
|
-
item.subtitle && /* @__PURE__ */ (0,
|
|
5729
|
-
item.description && /* @__PURE__ */ (0,
|
|
5923
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Content2, { $last: isLast, children: [
|
|
5924
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { size: "s", weight: item.highlighted ? "700" : "600", children: item.title }),
|
|
5925
|
+
item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { size: "xs", color: colors.grey_600, children: item.subtitle }),
|
|
5926
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { size: "xs", fontStyle: "italic", children: item.description })
|
|
5730
5927
|
] })
|
|
5731
5928
|
] }, item.id);
|
|
5732
5929
|
}) });
|
|
@@ -6410,6 +6607,7 @@ var parseAmount = (value) => {
|
|
|
6410
6607
|
TagBubble,
|
|
6411
6608
|
Text,
|
|
6412
6609
|
Timeline,
|
|
6610
|
+
Toaster,
|
|
6413
6611
|
Tooltip,
|
|
6414
6612
|
addBusinessDays,
|
|
6415
6613
|
appendCacheBuster,
|
|
@@ -6451,6 +6649,7 @@ var parseAmount = (value) => {
|
|
|
6451
6649
|
optimizeImage,
|
|
6452
6650
|
parseAmount,
|
|
6453
6651
|
parseIsoDate,
|
|
6652
|
+
toast,
|
|
6454
6653
|
truncateFileName,
|
|
6455
6654
|
truncateText
|
|
6456
6655
|
});
|