design-zystem 1.0.282 → 1.0.284
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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +167 -136
- package/dist/index.mjs +68 -37
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -87,7 +87,7 @@ interface ColProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
87
87
|
style?: CSSProperties;
|
|
88
88
|
className?: string;
|
|
89
89
|
}
|
|
90
|
-
declare const Col:
|
|
90
|
+
declare const Col: react.ForwardRefExoticComponent<ColProps & react.RefAttributes<HTMLDivElement>>;
|
|
91
91
|
|
|
92
92
|
interface BulkSection {
|
|
93
93
|
title: string;
|
|
@@ -250,6 +250,8 @@ interface BubbleProps {
|
|
|
250
250
|
borderRadius?: string;
|
|
251
251
|
boxShadow?: string;
|
|
252
252
|
width?: string;
|
|
253
|
+
/** Looping pulse to draw the eye to a critical bubble. Ring colour follows `backgroundColor`, content is centred on the cross axis, and the animation is dropped under `prefers-reduced-motion`. Spacing between children stays the caller's job. */
|
|
254
|
+
pulse?: boolean;
|
|
253
255
|
style?: CSSProperties;
|
|
254
256
|
onClick?: () => void;
|
|
255
257
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ interface ColProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
87
87
|
style?: CSSProperties;
|
|
88
88
|
className?: string;
|
|
89
89
|
}
|
|
90
|
-
declare const Col:
|
|
90
|
+
declare const Col: react.ForwardRefExoticComponent<ColProps & react.RefAttributes<HTMLDivElement>>;
|
|
91
91
|
|
|
92
92
|
interface BulkSection {
|
|
93
93
|
title: string;
|
|
@@ -250,6 +250,8 @@ interface BubbleProps {
|
|
|
250
250
|
borderRadius?: string;
|
|
251
251
|
boxShadow?: string;
|
|
252
252
|
width?: string;
|
|
253
|
+
/** Looping pulse to draw the eye to a critical bubble. Ring colour follows `backgroundColor`, content is centred on the cross axis, and the animation is dropped under `prefers-reduced-motion`. Spacing between children stays the caller's job. */
|
|
254
|
+
pulse?: boolean;
|
|
253
255
|
style?: CSSProperties;
|
|
254
256
|
onClick?: () => void;
|
|
255
257
|
}
|
package/dist/index.js
CHANGED
|
@@ -493,6 +493,7 @@ Row.displayName = "Row";
|
|
|
493
493
|
var Row_default = Row;
|
|
494
494
|
|
|
495
495
|
// src/Components/Col/Col.tsx
|
|
496
|
+
var import_react2 = require("react");
|
|
496
497
|
var import_styled_components5 = __toESM(require("styled-components"));
|
|
497
498
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
498
499
|
var shouldForwardPropCol = (prop) => ![
|
|
@@ -528,10 +529,11 @@ var StyledCol = import_styled_components5.default.div.withConfig({
|
|
|
528
529
|
align-items: ${(props) => props.alignItems || "flex-start"};
|
|
529
530
|
box-sizing: border-box;
|
|
530
531
|
`;
|
|
531
|
-
var Col = (props) => {
|
|
532
|
+
var Col = (0, import_react2.forwardRef)((props, ref) => {
|
|
532
533
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
533
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StyledCol, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
534
|
-
};
|
|
534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StyledCol, __spreadProps(__spreadValues({ ref }, otherProps), { children }));
|
|
535
|
+
});
|
|
536
|
+
Col.displayName = "Col";
|
|
535
537
|
var Col_default = Col;
|
|
536
538
|
|
|
537
539
|
// src/Components/Text/Text.tsx
|
|
@@ -826,7 +828,7 @@ var Bulk = ({
|
|
|
826
828
|
};
|
|
827
829
|
|
|
828
830
|
// src/Components/Collapse/Collapse.tsx
|
|
829
|
-
var
|
|
831
|
+
var import_react3 = require("react");
|
|
830
832
|
var import_styled_components8 = __toESM(require("styled-components"));
|
|
831
833
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
832
834
|
var Wrapper = import_styled_components8.default.div`
|
|
@@ -839,9 +841,9 @@ var Inner = import_styled_components8.default.div`
|
|
|
839
841
|
overflow-y: ${(p) => p.$maxHeight ? "auto" : "visible"};
|
|
840
842
|
`;
|
|
841
843
|
var Collapse = ({ open, children, maxHeight }) => {
|
|
842
|
-
const innerRef = (0,
|
|
843
|
-
const [height, setHeight] = (0,
|
|
844
|
-
const recalc = (0,
|
|
844
|
+
const innerRef = (0, import_react3.useRef)(null);
|
|
845
|
+
const [height, setHeight] = (0, import_react3.useState)(0);
|
|
846
|
+
const recalc = (0, import_react3.useCallback)(() => {
|
|
845
847
|
if (open && innerRef.current) {
|
|
846
848
|
const full = innerRef.current.scrollHeight;
|
|
847
849
|
setHeight(maxHeight ? Math.min(full, maxHeight) : full);
|
|
@@ -849,8 +851,8 @@ var Collapse = ({ open, children, maxHeight }) => {
|
|
|
849
851
|
setHeight(0);
|
|
850
852
|
}
|
|
851
853
|
}, [open, maxHeight]);
|
|
852
|
-
(0,
|
|
853
|
-
(0,
|
|
854
|
+
(0, import_react3.useEffect)(recalc, [recalc]);
|
|
855
|
+
(0, import_react3.useEffect)(() => {
|
|
854
856
|
if (!open || !innerRef.current) return;
|
|
855
857
|
const observer = new ResizeObserver(recalc);
|
|
856
858
|
observer.observe(innerRef.current);
|
|
@@ -860,7 +862,7 @@ var Collapse = ({ open, children, maxHeight }) => {
|
|
|
860
862
|
};
|
|
861
863
|
|
|
862
864
|
// src/Components/Button/Button.tsx
|
|
863
|
-
var
|
|
865
|
+
var import_react4 = require("react");
|
|
864
866
|
var import_styled_components9 = __toESM(require("styled-components"));
|
|
865
867
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
866
868
|
var defaultSizes = {
|
|
@@ -1031,7 +1033,7 @@ var Button = (_a) => {
|
|
|
1031
1033
|
"disabled",
|
|
1032
1034
|
"noHover"
|
|
1033
1035
|
]);
|
|
1034
|
-
const ref = (0,
|
|
1036
|
+
const ref = (0, import_react4.useRef)(null);
|
|
1035
1037
|
const sizeConfig = defaultSizes[size];
|
|
1036
1038
|
const renderIconSlot = (icon) => typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1037
1039
|
Icon,
|
|
@@ -1080,7 +1082,7 @@ var Button = (_a) => {
|
|
|
1080
1082
|
};
|
|
1081
1083
|
|
|
1082
1084
|
// src/Components/Modal/Modal.tsx
|
|
1083
|
-
var
|
|
1085
|
+
var import_react5 = require("react");
|
|
1084
1086
|
var import_styled_components10 = __toESM(require("styled-components"));
|
|
1085
1087
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1086
1088
|
var shouldForwardProp5 = (prop) => !["width", "height", "minHeight", "padding", "backgroundColor"].includes(prop);
|
|
@@ -1156,7 +1158,7 @@ var Modal = (props) => {
|
|
|
1156
1158
|
const hideModal = () => {
|
|
1157
1159
|
closeModal == null ? void 0 : closeModal();
|
|
1158
1160
|
};
|
|
1159
|
-
(0,
|
|
1161
|
+
(0, import_react5.useEffect)(() => {
|
|
1160
1162
|
if (showModal) {
|
|
1161
1163
|
document.body.classList.add("modal-open");
|
|
1162
1164
|
} else {
|
|
@@ -1203,7 +1205,7 @@ var ModalConfirmation = (props) => {
|
|
|
1203
1205
|
};
|
|
1204
1206
|
|
|
1205
1207
|
// src/Components/NewModal/NewModal.tsx
|
|
1206
|
-
var
|
|
1208
|
+
var import_react6 = require("react");
|
|
1207
1209
|
|
|
1208
1210
|
// src/Components/Bubble/Bubble.tsx
|
|
1209
1211
|
var import_styled_components11 = __toESM(require("styled-components"));
|
|
@@ -1226,6 +1228,21 @@ var paddingSizes = {
|
|
|
1226
1228
|
xl: "10px 20px",
|
|
1227
1229
|
xxl: "10px 20px"
|
|
1228
1230
|
};
|
|
1231
|
+
var resolveColor2 = (value, fallback = "transparent") => colors[value] || value || fallback;
|
|
1232
|
+
var pulseAnimation = import_styled_components11.keyframes`
|
|
1233
|
+
0% {
|
|
1234
|
+
transform: scale(1);
|
|
1235
|
+
box-shadow: 0 0 0 0 var(--bubble-pulse-color);
|
|
1236
|
+
}
|
|
1237
|
+
70% {
|
|
1238
|
+
transform: scale(1.06);
|
|
1239
|
+
box-shadow: 0 0 0 6px transparent;
|
|
1240
|
+
}
|
|
1241
|
+
100% {
|
|
1242
|
+
transform: scale(1);
|
|
1243
|
+
box-shadow: 0 0 0 0 transparent;
|
|
1244
|
+
}
|
|
1245
|
+
`;
|
|
1229
1246
|
var shouldForwardProp6 = (prop) => ![
|
|
1230
1247
|
"color",
|
|
1231
1248
|
"backgroundColor",
|
|
@@ -1235,13 +1252,14 @@ var shouldForwardProp6 = (prop) => ![
|
|
|
1235
1252
|
"maxChars",
|
|
1236
1253
|
"borderRadius",
|
|
1237
1254
|
"boxShadow",
|
|
1238
|
-
"width"
|
|
1255
|
+
"width",
|
|
1256
|
+
"pulse"
|
|
1239
1257
|
].includes(prop);
|
|
1240
1258
|
var StyledBubble = import_styled_components11.default.span.withConfig({
|
|
1241
1259
|
shouldForwardProp: shouldForwardProp6
|
|
1242
1260
|
})`
|
|
1243
|
-
color: ${(props) =>
|
|
1244
|
-
background: ${(props) =>
|
|
1261
|
+
color: ${(props) => resolveColor2(props.color, "inherit")};
|
|
1262
|
+
background: ${(props) => resolveColor2(props.backgroundColor)};
|
|
1245
1263
|
font-size: ${(props) => textSizes3[props.size] || props.size || "1em"};
|
|
1246
1264
|
border-radius: ${(props) => props.borderRadius || "20px"};
|
|
1247
1265
|
box-shadow: ${(props) => props.boxShadow || "none"};
|
|
@@ -1253,6 +1271,19 @@ var StyledBubble = import_styled_components11.default.span.withConfig({
|
|
|
1253
1271
|
text-overflow: ellipsis;
|
|
1254
1272
|
max-width: ${(props) => props.maxChars ? `${props.maxChars}ch` : "none"};
|
|
1255
1273
|
white-space: nowrap;
|
|
1274
|
+
${(props) => props.pulse && import_styled_components11.css`
|
|
1275
|
+
--bubble-pulse-color: ${resolveColor2(
|
|
1276
|
+
props.backgroundColor,
|
|
1277
|
+
colors.grey_600
|
|
1278
|
+
)};
|
|
1279
|
+
display: inline-flex;
|
|
1280
|
+
align-items: center;
|
|
1281
|
+
animation: ${pulseAnimation} 2s ease-in-out infinite;
|
|
1282
|
+
|
|
1283
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1284
|
+
animation: none;
|
|
1285
|
+
}
|
|
1286
|
+
`}
|
|
1256
1287
|
`;
|
|
1257
1288
|
var Bubble = (_a) => {
|
|
1258
1289
|
var _b = _a, { children } = _b, otherProps = __objRest(_b, ["children"]);
|
|
@@ -1286,11 +1317,11 @@ var NewModal = ({
|
|
|
1286
1317
|
}) => {
|
|
1287
1318
|
const mainColor = colors[variant] || colors.blue_700;
|
|
1288
1319
|
const showHeader = Boolean(title || showCloseButton);
|
|
1289
|
-
const [isDragging, setIsDragging] = (0,
|
|
1290
|
-
const [offset, setOffset] = (0,
|
|
1291
|
-
const lastPointRef = (0,
|
|
1292
|
-
const headerRef = (0,
|
|
1293
|
-
(0,
|
|
1320
|
+
const [isDragging, setIsDragging] = (0, import_react6.useState)(false);
|
|
1321
|
+
const [offset, setOffset] = (0, import_react6.useState)({ x: 0, y: 0 });
|
|
1322
|
+
const lastPointRef = (0, import_react6.useRef)({ x: 0, y: 0 });
|
|
1323
|
+
const headerRef = (0, import_react6.useRef)(null);
|
|
1324
|
+
(0, import_react6.useEffect)(() => {
|
|
1294
1325
|
if (!isDraggable) return;
|
|
1295
1326
|
const onPointerMove = (e) => {
|
|
1296
1327
|
if (!isDragging) return;
|
|
@@ -1326,7 +1357,7 @@ var NewModal = ({
|
|
|
1326
1357
|
if (isDragging) return;
|
|
1327
1358
|
closeModal == null ? void 0 : closeModal(e);
|
|
1328
1359
|
};
|
|
1329
|
-
(0,
|
|
1360
|
+
(0, import_react6.useEffect)(() => {
|
|
1330
1361
|
if (showModal === true) setOffset({ x: 0, y: 0 });
|
|
1331
1362
|
}, [showModal]);
|
|
1332
1363
|
if (!showModal) return null;
|
|
@@ -1509,7 +1540,7 @@ var NewModal = ({
|
|
|
1509
1540
|
};
|
|
1510
1541
|
|
|
1511
1542
|
// src/Components/Drawer/Drawer.tsx
|
|
1512
|
-
var
|
|
1543
|
+
var import_react7 = require("react");
|
|
1513
1544
|
var import_styled_components12 = __toESM(require("styled-components"));
|
|
1514
1545
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1515
1546
|
var StyledOverlay = import_styled_components12.default.div`
|
|
@@ -1567,10 +1598,10 @@ var Drawer = ({
|
|
|
1567
1598
|
rightOutline = false,
|
|
1568
1599
|
footer
|
|
1569
1600
|
}) => {
|
|
1570
|
-
const [isRendered, setIsRendered] = (0,
|
|
1571
|
-
const [isVisible, setIsVisible] = (0,
|
|
1572
|
-
const panelRef = (0,
|
|
1573
|
-
(0,
|
|
1601
|
+
const [isRendered, setIsRendered] = (0, import_react7.useState)(showDrawer);
|
|
1602
|
+
const [isVisible, setIsVisible] = (0, import_react7.useState)(false);
|
|
1603
|
+
const panelRef = (0, import_react7.useRef)(null);
|
|
1604
|
+
(0, import_react7.useEffect)(() => {
|
|
1574
1605
|
if (showDrawer) {
|
|
1575
1606
|
setIsRendered(true);
|
|
1576
1607
|
requestAnimationFrame(() => setIsVisible(true));
|
|
@@ -1639,12 +1670,12 @@ var Drawer = ({
|
|
|
1639
1670
|
};
|
|
1640
1671
|
|
|
1641
1672
|
// src/Components/Toast/Toaster.tsx
|
|
1642
|
-
var
|
|
1673
|
+
var import_react9 = require("react");
|
|
1643
1674
|
var import_react_dom = require("react-dom");
|
|
1644
1675
|
var import_styled_components14 = __toESM(require("styled-components"));
|
|
1645
1676
|
|
|
1646
1677
|
// src/Components/Toast/ToastCard.tsx
|
|
1647
|
-
var
|
|
1678
|
+
var import_react8 = require("react");
|
|
1648
1679
|
var import_styled_components13 = __toESM(require("styled-components"));
|
|
1649
1680
|
|
|
1650
1681
|
// src/Components/Toast/toastStore.ts
|
|
@@ -1692,12 +1723,12 @@ var dismissToast = (id) => {
|
|
|
1692
1723
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1693
1724
|
var EXIT_DURATION = 180;
|
|
1694
1725
|
var ToastCard = ({ toastItem }) => {
|
|
1695
|
-
const [isExiting, setIsExiting] = (0,
|
|
1696
|
-
const handleDismiss = (0,
|
|
1726
|
+
const [isExiting, setIsExiting] = (0, import_react8.useState)(false);
|
|
1727
|
+
const handleDismiss = (0, import_react8.useCallback)(() => {
|
|
1697
1728
|
setIsExiting(true);
|
|
1698
1729
|
setTimeout(() => dismissToast(toastItem.id), EXIT_DURATION);
|
|
1699
1730
|
}, [toastItem.id]);
|
|
1700
|
-
(0,
|
|
1731
|
+
(0, import_react8.useEffect)(() => {
|
|
1701
1732
|
const dismissTimer = setTimeout(handleDismiss, toastItem.timeOut);
|
|
1702
1733
|
return () => clearTimeout(dismissTimer);
|
|
1703
1734
|
}, [handleDismiss, toastItem.timeOut]);
|
|
@@ -1814,7 +1845,7 @@ var ProgressBar = import_styled_components13.default.div`
|
|
|
1814
1845
|
// src/Components/Toast/Toaster.tsx
|
|
1815
1846
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1816
1847
|
var Toaster = () => {
|
|
1817
|
-
const toasts2 = (0,
|
|
1848
|
+
const toasts2 = (0, import_react9.useSyncExternalStore)(subscribeToasts, getToastsSnapshot);
|
|
1818
1849
|
if (toasts2.length === 0) return null;
|
|
1819
1850
|
return (0, import_react_dom.createPortal)(
|
|
1820
1851
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Stack, { "aria-live": "polite", children: toasts2.map((toastItem) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToastCard, { toastItem }, toastItem.id)) }),
|
|
@@ -2050,7 +2081,7 @@ var Link = (_a) => {
|
|
|
2050
2081
|
};
|
|
2051
2082
|
|
|
2052
2083
|
// src/Components/Avatar/Avatar.tsx
|
|
2053
|
-
var
|
|
2084
|
+
var import_react10 = require("react");
|
|
2054
2085
|
var import_styled_components18 = __toESM(require("styled-components"));
|
|
2055
2086
|
|
|
2056
2087
|
// src/Components/Image/Image.tsx
|
|
@@ -2143,7 +2174,7 @@ var Initials = import_styled_components18.default.span`
|
|
|
2143
2174
|
line-height: 1;
|
|
2144
2175
|
user-select: none;
|
|
2145
2176
|
`;
|
|
2146
|
-
var
|
|
2177
|
+
var resolveColor3 = (token, fallback) => {
|
|
2147
2178
|
if (!token) return fallback;
|
|
2148
2179
|
return colors[token] || token;
|
|
2149
2180
|
};
|
|
@@ -2158,9 +2189,9 @@ var Avatar = ({
|
|
|
2158
2189
|
badge
|
|
2159
2190
|
}) => {
|
|
2160
2191
|
var _a, _b, _c;
|
|
2161
|
-
const [hasImageError, setHasImageError] = (0,
|
|
2162
|
-
const resolvedBackground =
|
|
2163
|
-
const resolvedText =
|
|
2192
|
+
const [hasImageError, setHasImageError] = (0, import_react10.useState)(false);
|
|
2193
|
+
const resolvedBackground = resolveColor3(backgroundColor, colors.grey_300);
|
|
2194
|
+
const resolvedText = resolveColor3(textColor, colors.dark);
|
|
2164
2195
|
const initials = getInitials(name);
|
|
2165
2196
|
const sizePx = `${size}px`;
|
|
2166
2197
|
const borderRadius = shape === "circle" ? "50%" : "4px";
|
|
@@ -2196,7 +2227,7 @@ var Avatar = ({
|
|
|
2196
2227
|
};
|
|
2197
2228
|
|
|
2198
2229
|
// src/Components/Select/Select.tsx
|
|
2199
|
-
var
|
|
2230
|
+
var import_react11 = require("react");
|
|
2200
2231
|
var import_react_dom2 = __toESM(require("react-dom"));
|
|
2201
2232
|
var import_styled_components19 = __toESM(require("styled-components"));
|
|
2202
2233
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
@@ -2309,13 +2340,13 @@ var Select = ({
|
|
|
2309
2340
|
hideSearchBar,
|
|
2310
2341
|
noFlex
|
|
2311
2342
|
}) => {
|
|
2312
|
-
const [isOpen, setIsOpen] = (0,
|
|
2313
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
2314
|
-
const [dropdownPosition, setDropdownPosition] = (0,
|
|
2315
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
2316
|
-
const containerRef = (0,
|
|
2317
|
-
const dropdownRef = (0,
|
|
2318
|
-
const searchInputRef = (0,
|
|
2343
|
+
const [isOpen, setIsOpen] = (0, import_react11.useState)(false);
|
|
2344
|
+
const [searchTerm, setSearchTerm] = (0, import_react11.useState)("");
|
|
2345
|
+
const [dropdownPosition, setDropdownPosition] = (0, import_react11.useState)({});
|
|
2346
|
+
const [activeIndex, setActiveIndex] = (0, import_react11.useState)(0);
|
|
2347
|
+
const containerRef = (0, import_react11.useRef)(null);
|
|
2348
|
+
const dropdownRef = (0, import_react11.useRef)(null);
|
|
2349
|
+
const searchInputRef = (0, import_react11.useRef)(null);
|
|
2319
2350
|
const selectedOption = options.find((option) => option.value === value);
|
|
2320
2351
|
const handleSelect = (option) => {
|
|
2321
2352
|
onChange == null ? void 0 : onChange(option.value);
|
|
@@ -2368,7 +2399,7 @@ var Select = ({
|
|
|
2368
2399
|
}
|
|
2369
2400
|
}
|
|
2370
2401
|
};
|
|
2371
|
-
(0,
|
|
2402
|
+
(0, import_react11.useEffect)(() => {
|
|
2372
2403
|
const handleClickOutside = (event) => {
|
|
2373
2404
|
if (containerRef.current && !containerRef.current.contains(event.target) && dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
2374
2405
|
setSearchTerm("");
|
|
@@ -2463,7 +2494,7 @@ var Select = ({
|
|
|
2463
2494
|
};
|
|
2464
2495
|
|
|
2465
2496
|
// src/Components/Input/Input.tsx
|
|
2466
|
-
var
|
|
2497
|
+
var import_react12 = require("react");
|
|
2467
2498
|
var import_styled_components20 = __toESM(require("styled-components"));
|
|
2468
2499
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2469
2500
|
var shouldForwardProp8 = (prop) => ![
|
|
@@ -2669,7 +2700,7 @@ var displayToIso = (displayValue) => {
|
|
|
2669
2700
|
const isoDay = String(day).padStart(2, "0");
|
|
2670
2701
|
return `${yearStr}-${isoMonth}-${isoDay}`;
|
|
2671
2702
|
};
|
|
2672
|
-
var Input = (0,
|
|
2703
|
+
var Input = (0, import_react12.forwardRef)((props, ref) => {
|
|
2673
2704
|
const _a = props, {
|
|
2674
2705
|
label,
|
|
2675
2706
|
value,
|
|
@@ -2708,11 +2739,11 @@ var Input = (0, import_react11.forwardRef)((props, ref) => {
|
|
|
2708
2739
|
const inputName = otherProps == null ? void 0 : otherProps.name;
|
|
2709
2740
|
const { min, max, step } = otherProps || {};
|
|
2710
2741
|
const _b = otherProps || {}, { name } = _b, forwardProps = __objRest(_b, ["name"]);
|
|
2711
|
-
const [showPassword, setShowPassword] = (0,
|
|
2712
|
-
const [displayDateValue, setDisplayDateValue] = (0,
|
|
2713
|
-
const nativeDateRef = (0,
|
|
2714
|
-
const innerRef = (0,
|
|
2715
|
-
(0,
|
|
2742
|
+
const [showPassword, setShowPassword] = (0, import_react12.useState)(false);
|
|
2743
|
+
const [displayDateValue, setDisplayDateValue] = (0, import_react12.useState)("");
|
|
2744
|
+
const nativeDateRef = (0, import_react12.useRef)(null);
|
|
2745
|
+
const innerRef = (0, import_react12.useRef)(null);
|
|
2746
|
+
(0, import_react12.useImperativeHandle)(
|
|
2716
2747
|
ref,
|
|
2717
2748
|
() => innerRef.current
|
|
2718
2749
|
);
|
|
@@ -2730,7 +2761,7 @@ var Input = (0, import_react11.forwardRef)((props, ref) => {
|
|
|
2730
2761
|
const computedStyle = isSearch ? __spreadValues(__spreadValues({
|
|
2731
2762
|
paddingLeft: "34px"
|
|
2732
2763
|
}, hasSearchValue && onClear ? { paddingRight: "34px" } : {}), style2) : style2;
|
|
2733
|
-
(0,
|
|
2764
|
+
(0, import_react12.useEffect)(() => {
|
|
2734
2765
|
if (isDate) {
|
|
2735
2766
|
const formatted = formatIsoToDisplay(isoValue);
|
|
2736
2767
|
setDisplayDateValue((prev) => formatted !== prev ? formatted : prev);
|
|
@@ -2950,7 +2981,7 @@ var Checkbox = ({
|
|
|
2950
2981
|
};
|
|
2951
2982
|
|
|
2952
2983
|
// src/Components/Radio/Radio.tsx
|
|
2953
|
-
var
|
|
2984
|
+
var import_react13 = require("react");
|
|
2954
2985
|
var import_styled_components22 = __toESM(require("styled-components"));
|
|
2955
2986
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2956
2987
|
var RadioContainer = import_styled_components22.default.div`
|
|
@@ -3007,7 +3038,7 @@ var Radio = ({
|
|
|
3007
3038
|
value
|
|
3008
3039
|
}) => {
|
|
3009
3040
|
const color = colors[variant] || colors.blue_950;
|
|
3010
|
-
const generatedId = (0,
|
|
3041
|
+
const generatedId = (0, import_react13.useId)();
|
|
3011
3042
|
const uniqueId = `radio-${generatedId}`;
|
|
3012
3043
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RadioContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(StyledLabel2, { htmlFor: uniqueId, disabled, children: [
|
|
3013
3044
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
@@ -3027,7 +3058,7 @@ var Radio = ({
|
|
|
3027
3058
|
};
|
|
3028
3059
|
|
|
3029
3060
|
// src/Components/Accordion/Accordion.tsx
|
|
3030
|
-
var
|
|
3061
|
+
var import_react14 = require("react");
|
|
3031
3062
|
var import_styled_components23 = __toESM(require("styled-components"));
|
|
3032
3063
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3033
3064
|
var Wrapper4 = import_styled_components23.default.div`
|
|
@@ -3088,8 +3119,8 @@ var Accordion = ({
|
|
|
3088
3119
|
backgroundHeader = colors.white
|
|
3089
3120
|
}) => {
|
|
3090
3121
|
const resolvedBackgroundHeader = typeof backgroundHeader === "string" && backgroundHeader in colors ? colors[backgroundHeader] : backgroundHeader;
|
|
3091
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
3092
|
-
const [internalOpenId, setInternalOpenId] = (0,
|
|
3122
|
+
const [internalOpen, setInternalOpen] = (0, import_react14.useState)(defaultOpen);
|
|
3123
|
+
const [internalOpenId, setInternalOpenId] = (0, import_react14.useState)(
|
|
3093
3124
|
null
|
|
3094
3125
|
);
|
|
3095
3126
|
const isControlled = controlledOpen !== void 0;
|
|
@@ -3104,7 +3135,7 @@ var Accordion = ({
|
|
|
3104
3135
|
setInternalOpen((prev) => !prev);
|
|
3105
3136
|
}
|
|
3106
3137
|
};
|
|
3107
|
-
const toggleItem = (0,
|
|
3138
|
+
const toggleItem = (0, import_react14.useCallback)(
|
|
3108
3139
|
(id) => {
|
|
3109
3140
|
if (disabled) return;
|
|
3110
3141
|
const nextId2 = activeItemId === id ? null : id;
|
|
@@ -3171,7 +3202,7 @@ var Accordion = ({
|
|
|
3171
3202
|
};
|
|
3172
3203
|
|
|
3173
3204
|
// src/Components/ColorPicker/ColorPicker.tsx
|
|
3174
|
-
var
|
|
3205
|
+
var import_react15 = require("react");
|
|
3175
3206
|
var import_styled_components24 = __toESM(require("styled-components"));
|
|
3176
3207
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3177
3208
|
var SIZES = {
|
|
@@ -3248,7 +3279,7 @@ var TEXT_SIZE_MAP = {
|
|
|
3248
3279
|
m: "xs",
|
|
3249
3280
|
l: "s"
|
|
3250
3281
|
};
|
|
3251
|
-
var ColorPicker = (0,
|
|
3282
|
+
var ColorPicker = (0, import_react15.forwardRef)(
|
|
3252
3283
|
({
|
|
3253
3284
|
label,
|
|
3254
3285
|
value,
|
|
@@ -3257,11 +3288,11 @@ var ColorPicker = (0, import_react14.forwardRef)(
|
|
|
3257
3288
|
disabled = false,
|
|
3258
3289
|
size = "m"
|
|
3259
3290
|
}, ref) => {
|
|
3260
|
-
const innerRef = (0,
|
|
3261
|
-
const [internalColor, setInternalColor] = (0,
|
|
3291
|
+
const innerRef = (0, import_react15.useRef)(null);
|
|
3292
|
+
const [internalColor, setInternalColor] = (0, import_react15.useState)(defaultValue);
|
|
3262
3293
|
const currentColor = value !== void 0 ? value : internalColor;
|
|
3263
3294
|
const dims = SIZES[size];
|
|
3264
|
-
(0,
|
|
3295
|
+
(0, import_react15.useEffect)(() => {
|
|
3265
3296
|
if (!ref) return;
|
|
3266
3297
|
if (typeof ref === "function") {
|
|
3267
3298
|
ref(innerRef.current);
|
|
@@ -3307,7 +3338,7 @@ var ColorPicker = (0, import_react14.forwardRef)(
|
|
|
3307
3338
|
ColorPicker.displayName = "ColorPicker";
|
|
3308
3339
|
|
|
3309
3340
|
// src/Components/SliderInput/SliderInput.tsx
|
|
3310
|
-
var
|
|
3341
|
+
var import_react16 = require("react");
|
|
3311
3342
|
var import_styled_components25 = __toESM(require("styled-components"));
|
|
3312
3343
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3313
3344
|
var Container3 = import_styled_components25.default.label`
|
|
@@ -3389,7 +3420,7 @@ var MinMaxRow = import_styled_components25.default.span`
|
|
|
3389
3420
|
justify-content: space-between;
|
|
3390
3421
|
align-items: center;
|
|
3391
3422
|
`;
|
|
3392
|
-
var SliderInput = (0,
|
|
3423
|
+
var SliderInput = (0, import_react16.forwardRef)(
|
|
3393
3424
|
({
|
|
3394
3425
|
value,
|
|
3395
3426
|
onChange,
|
|
@@ -3524,7 +3555,7 @@ var ListItem = (props) => {
|
|
|
3524
3555
|
};
|
|
3525
3556
|
|
|
3526
3557
|
// src/Components/Table/Table.tsx
|
|
3527
|
-
var
|
|
3558
|
+
var import_react17 = require("react");
|
|
3528
3559
|
var import_styled_components28 = __toESM(require("styled-components"));
|
|
3529
3560
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3530
3561
|
var shouldForwardPropTable = (prop) => ![
|
|
@@ -3560,7 +3591,7 @@ var StyledContainer3 = import_styled_components28.default.div.withConfig({
|
|
|
3560
3591
|
border: 1.4px solid ${colors.grey_200};
|
|
3561
3592
|
box-shadow: ${(props) => props.hasShadow ? "0 2px 12px 0 rgba(198, 198, 198, 0.25)" : "none"};
|
|
3562
3593
|
`;
|
|
3563
|
-
var Table = (0,
|
|
3594
|
+
var Table = (0, import_react17.forwardRef)((props, ref) => {
|
|
3564
3595
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3565
3596
|
const safeChildren = children;
|
|
3566
3597
|
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 })) }));
|
|
@@ -3590,7 +3621,7 @@ var TableHeader = (props) => {
|
|
|
3590
3621
|
};
|
|
3591
3622
|
|
|
3592
3623
|
// src/Components/Table/TableBody/TableBody.tsx
|
|
3593
|
-
var
|
|
3624
|
+
var import_react18 = require("react");
|
|
3594
3625
|
var import_styled_components30 = __toESM(require("styled-components"));
|
|
3595
3626
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3596
3627
|
var shouldForwardPropTableBody = (prop) => !["backgroundColor", "useEvenBackground", "fixedHeight", "color"].includes(
|
|
@@ -3609,7 +3640,7 @@ var StyledTableBody = import_styled_components30.default.div.withConfig({
|
|
|
3609
3640
|
background-color: ${(props) => props.useEvenBackground ? "#f2f2f2" : ""};
|
|
3610
3641
|
}
|
|
3611
3642
|
`;
|
|
3612
|
-
var TableBody = (0,
|
|
3643
|
+
var TableBody = (0, import_react18.forwardRef)(
|
|
3613
3644
|
(props, ref) => {
|
|
3614
3645
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3615
3646
|
const safeChildren = children;
|
|
@@ -3684,7 +3715,7 @@ var TableCell = (props) => {
|
|
|
3684
3715
|
};
|
|
3685
3716
|
|
|
3686
3717
|
// src/Components/Table/TableHeaderCell/TableHeaderCell.tsx
|
|
3687
|
-
var
|
|
3718
|
+
var import_react19 = require("react");
|
|
3688
3719
|
var import_styled_components33 = __toESM(require("styled-components"));
|
|
3689
3720
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3690
3721
|
var shouldForwardPropTableHeaderCell = (prop) => !["useSort", "isSort", "flexGrow", "flexShrink", "width"].includes(prop);
|
|
@@ -3720,7 +3751,7 @@ var SortArrow = import_styled_components33.default.span`
|
|
|
3720
3751
|
`;
|
|
3721
3752
|
var TableHeaderCell = (props) => {
|
|
3722
3753
|
const _a = props, { children, useSort, isSort, sortOrder } = _a, otherProps = __objRest(_a, ["children", "useSort", "isSort", "sortOrder"]);
|
|
3723
|
-
const [hovered, setHovered] = (0,
|
|
3754
|
+
const [hovered, setHovered] = (0, import_react19.useState)(false);
|
|
3724
3755
|
const showArrow = useSort && (isSort || hovered);
|
|
3725
3756
|
const arrowChar = isSort && sortOrder === "asc" ? "\u2191" : "\u2193";
|
|
3726
3757
|
const arrowOpacity = isSort ? 1 : 0.35;
|
|
@@ -3868,7 +3899,7 @@ var SkeletonRow = ({ columns = 9 }) => /* @__PURE__ */ (0, import_jsx_runtime42.
|
|
|
3868
3899
|
] });
|
|
3869
3900
|
|
|
3870
3901
|
// src/Components/Switch/Switch.tsx
|
|
3871
|
-
var
|
|
3902
|
+
var import_react20 = require("react");
|
|
3872
3903
|
var import_styled_components38 = __toESM(require("styled-components"));
|
|
3873
3904
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3874
3905
|
var BASE = {
|
|
@@ -3949,7 +3980,7 @@ var Knob = import_styled_components38.default.span`
|
|
|
3949
3980
|
transform: translateY(-50%) scale(0.96);
|
|
3950
3981
|
}
|
|
3951
3982
|
`;
|
|
3952
|
-
var Switch = (0,
|
|
3983
|
+
var Switch = (0, import_react20.forwardRef)(
|
|
3953
3984
|
(_a, ref) => {
|
|
3954
3985
|
var _b = _a, {
|
|
3955
3986
|
checked,
|
|
@@ -4005,7 +4036,7 @@ var CardSkeleton = () => {
|
|
|
4005
4036
|
};
|
|
4006
4037
|
|
|
4007
4038
|
// src/Components/Options/Options.tsx
|
|
4008
|
-
var
|
|
4039
|
+
var import_react21 = require("react");
|
|
4009
4040
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4010
4041
|
var Options = ({
|
|
4011
4042
|
icon,
|
|
@@ -4015,8 +4046,8 @@ var Options = ({
|
|
|
4015
4046
|
onChange,
|
|
4016
4047
|
disabled = false
|
|
4017
4048
|
}) => {
|
|
4018
|
-
const [state, setState] = (0,
|
|
4019
|
-
(0,
|
|
4049
|
+
const [state, setState] = (0, import_react21.useState)(0);
|
|
4050
|
+
(0, import_react21.useEffect)(() => {
|
|
4020
4051
|
if (defaultId) {
|
|
4021
4052
|
const defaultIndex = options.findIndex(
|
|
4022
4053
|
(option) => option.id === defaultId
|
|
@@ -4074,7 +4105,7 @@ var Options = ({
|
|
|
4074
4105
|
};
|
|
4075
4106
|
|
|
4076
4107
|
// src/Components/Stepper/Stepper.tsx
|
|
4077
|
-
var
|
|
4108
|
+
var import_react22 = require("react");
|
|
4078
4109
|
var import_styled_components39 = __toESM(require("styled-components"));
|
|
4079
4110
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4080
4111
|
var Wrapper5 = import_styled_components39.default.nav`
|
|
@@ -4113,7 +4144,7 @@ var Stepper = ({
|
|
|
4113
4144
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Wrapper5, { "aria-label": "progression", className, children: Array.from({ length: numberOfSteps }, (_, i) => {
|
|
4114
4145
|
const isActive = i === current;
|
|
4115
4146
|
const isCompleted = i < current;
|
|
4116
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
4147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react22.Fragment, { children: [
|
|
4117
4148
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4118
4149
|
Circle,
|
|
4119
4150
|
{
|
|
@@ -4130,7 +4161,7 @@ var Stepper = ({
|
|
|
4130
4161
|
};
|
|
4131
4162
|
|
|
4132
4163
|
// src/Components/Tabs/Tabs.tsx
|
|
4133
|
-
var
|
|
4164
|
+
var import_react23 = require("react");
|
|
4134
4165
|
var import_styled_components40 = __toESM(require("styled-components"));
|
|
4135
4166
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4136
4167
|
var TOKENS = {
|
|
@@ -4301,13 +4332,13 @@ var Tabs = (_a) => {
|
|
|
4301
4332
|
"baselineColor",
|
|
4302
4333
|
"children"
|
|
4303
4334
|
]);
|
|
4304
|
-
const rootRef = (0,
|
|
4305
|
-
const refsMap = (0,
|
|
4306
|
-
const [bar, setBar] = (0,
|
|
4335
|
+
const rootRef = (0, import_react23.useRef)(null);
|
|
4336
|
+
const refsMap = (0, import_react23.useRef)(/* @__PURE__ */ new Map());
|
|
4337
|
+
const [bar, setBar] = (0, import_react23.useState)({ left: 0, width: 0 });
|
|
4307
4338
|
const setTabRef = (id) => (el) => {
|
|
4308
4339
|
if (el) refsMap.current.set(id, el);
|
|
4309
4340
|
};
|
|
4310
|
-
const updateBar = (0,
|
|
4341
|
+
const updateBar = (0, import_react23.useCallback)(() => {
|
|
4311
4342
|
const root = rootRef.current;
|
|
4312
4343
|
const activeEl = value !== void 0 ? refsMap.current.get(value) : void 0;
|
|
4313
4344
|
if (!root || !activeEl) return;
|
|
@@ -4315,7 +4346,7 @@ var Tabs = (_a) => {
|
|
|
4315
4346
|
const box = activeEl.getBoundingClientRect();
|
|
4316
4347
|
setBar({ left: box.left - rootBox.left, width: box.width });
|
|
4317
4348
|
}, [value]);
|
|
4318
|
-
(0,
|
|
4349
|
+
(0, import_react23.useEffect)(() => {
|
|
4319
4350
|
updateBar();
|
|
4320
4351
|
const ro = new ResizeObserver(updateBar);
|
|
4321
4352
|
const activeEl = value !== void 0 ? refsMap.current.get(value) : void 0;
|
|
@@ -4323,14 +4354,14 @@ var Tabs = (_a) => {
|
|
|
4323
4354
|
if (activeEl) ro.observe(activeEl);
|
|
4324
4355
|
return () => ro.disconnect();
|
|
4325
4356
|
}, [value, updateBar]);
|
|
4326
|
-
const handleSelect = (0,
|
|
4357
|
+
const handleSelect = (0, import_react23.useCallback)(
|
|
4327
4358
|
(id) => {
|
|
4328
4359
|
if (id !== value && onChange) onChange(id);
|
|
4329
4360
|
},
|
|
4330
4361
|
[onChange, value]
|
|
4331
4362
|
);
|
|
4332
4363
|
const isPillsFullWidth = variant === "pills" && align === "start";
|
|
4333
|
-
const rendered = (0,
|
|
4364
|
+
const rendered = (0, import_react23.useMemo)(() => {
|
|
4334
4365
|
if (items && items.length) {
|
|
4335
4366
|
return items.map((it) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
4336
4367
|
Tab,
|
|
@@ -4360,12 +4391,12 @@ var Tabs = (_a) => {
|
|
|
4360
4391
|
it.id
|
|
4361
4392
|
));
|
|
4362
4393
|
}
|
|
4363
|
-
return
|
|
4394
|
+
return import_react23.Children.map(children, (child) => {
|
|
4364
4395
|
var _a2;
|
|
4365
|
-
if (!(0,
|
|
4396
|
+
if (!(0, import_react23.isValidElement)(child)) return child;
|
|
4366
4397
|
const id = (_a2 = child.props.id) != null ? _a2 : child.key;
|
|
4367
4398
|
const active = id === value;
|
|
4368
|
-
return (0,
|
|
4399
|
+
return (0, import_react23.cloneElement)(child, {
|
|
4369
4400
|
active,
|
|
4370
4401
|
variant,
|
|
4371
4402
|
fullWidth: isPillsFullWidth,
|
|
@@ -4393,7 +4424,7 @@ var Tabs = (_a) => {
|
|
|
4393
4424
|
};
|
|
4394
4425
|
|
|
4395
4426
|
// src/Components/MultiSelect/MultiSelect.tsx
|
|
4396
|
-
var
|
|
4427
|
+
var import_react24 = require("react");
|
|
4397
4428
|
var import_styled_components41 = __toESM(require("styled-components"));
|
|
4398
4429
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4399
4430
|
var Container5 = import_styled_components41.default.div`
|
|
@@ -4436,8 +4467,8 @@ var MultiSelect = ({
|
|
|
4436
4467
|
width,
|
|
4437
4468
|
align = "left"
|
|
4438
4469
|
}) => {
|
|
4439
|
-
const [isOpen, setIsOpen] = (0,
|
|
4440
|
-
const dropdownRef = (0,
|
|
4470
|
+
const [isOpen, setIsOpen] = (0, import_react24.useState)(false);
|
|
4471
|
+
const dropdownRef = (0, import_react24.useRef)(null);
|
|
4441
4472
|
const toggleOption = (value) => {
|
|
4442
4473
|
if (!onChange) return;
|
|
4443
4474
|
if (selectedValues.includes(value)) {
|
|
@@ -4447,7 +4478,7 @@ var MultiSelect = ({
|
|
|
4447
4478
|
onChange([...selectedValues, value]);
|
|
4448
4479
|
}
|
|
4449
4480
|
};
|
|
4450
|
-
(0,
|
|
4481
|
+
(0, import_react24.useEffect)(() => {
|
|
4451
4482
|
const handleClickOutside = (e) => {
|
|
4452
4483
|
if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
|
|
4453
4484
|
setIsOpen(false);
|
|
@@ -4489,7 +4520,7 @@ var MultiSelect = ({
|
|
|
4489
4520
|
};
|
|
4490
4521
|
|
|
4491
4522
|
// src/Components/DatePicker/DatePicker.tsx
|
|
4492
|
-
var
|
|
4523
|
+
var import_react25 = require("react");
|
|
4493
4524
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4494
4525
|
var LOCALE_MAP = {
|
|
4495
4526
|
fr: "fr-FR",
|
|
@@ -4560,28 +4591,28 @@ var DatePicker = (props) => {
|
|
|
4560
4591
|
const resolvedLocale = resolveLocale(locale);
|
|
4561
4592
|
const monthNames = getMonthNames(resolvedLocale);
|
|
4562
4593
|
const dayNames = getDayNames(resolvedLocale);
|
|
4563
|
-
const [isOpen, setIsOpen] = (0,
|
|
4564
|
-
const [currentMonth, setCurrentMonth] = (0,
|
|
4565
|
-
const [isSelectingEnd, setIsSelectingEnd] = (0,
|
|
4566
|
-
const [singleDate, setSingleDate] = (0,
|
|
4594
|
+
const [isOpen, setIsOpen] = (0, import_react25.useState)(defaultOpen);
|
|
4595
|
+
const [currentMonth, setCurrentMonth] = (0, import_react25.useState)(/* @__PURE__ */ new Date());
|
|
4596
|
+
const [isSelectingEnd, setIsSelectingEnd] = (0, import_react25.useState)(false);
|
|
4597
|
+
const [singleDate, setSingleDate] = (0, import_react25.useState)(
|
|
4567
4598
|
isSingle ? (_a = props.value) != null ? _a : null : null
|
|
4568
4599
|
);
|
|
4569
|
-
const [startDate, setStartDate] = (0,
|
|
4600
|
+
const [startDate, setStartDate] = (0, import_react25.useState)(
|
|
4570
4601
|
!isSingle ? (_c = (_b = props.value) == null ? void 0 : _b.start) != null ? _c : null : null
|
|
4571
4602
|
);
|
|
4572
|
-
const [endDate, setEndDate] = (0,
|
|
4603
|
+
const [endDate, setEndDate] = (0, import_react25.useState)(
|
|
4573
4604
|
!isSingle ? (_e = (_d = props.value) == null ? void 0 : _d.end) != null ? _e : null : null
|
|
4574
4605
|
);
|
|
4575
|
-
const ref = (0,
|
|
4606
|
+
const ref = (0, import_react25.useRef)(null);
|
|
4576
4607
|
const singleValueMs = isSingle ? (_f = props.value) == null ? void 0 : _f.getTime() : void 0;
|
|
4577
4608
|
const rangeStartMs = !isSingle ? (_h = (_g = props.value) == null ? void 0 : _g.start) == null ? void 0 : _h.getTime() : void 0;
|
|
4578
4609
|
const rangeEndMs = !isSingle ? (_j = (_i = props.value) == null ? void 0 : _i.end) == null ? void 0 : _j.getTime() : void 0;
|
|
4579
|
-
(0,
|
|
4610
|
+
(0, import_react25.useEffect)(() => {
|
|
4580
4611
|
if (!isSingle) return;
|
|
4581
4612
|
const v = props.value;
|
|
4582
4613
|
if (v !== void 0) setSingleDate(v);
|
|
4583
4614
|
}, [singleValueMs]);
|
|
4584
|
-
(0,
|
|
4615
|
+
(0, import_react25.useEffect)(() => {
|
|
4585
4616
|
var _a2, _b2;
|
|
4586
4617
|
if (isSingle) return;
|
|
4587
4618
|
const v = props.value;
|
|
@@ -4589,7 +4620,7 @@ var DatePicker = (props) => {
|
|
|
4589
4620
|
setStartDate((_a2 = v == null ? void 0 : v.start) != null ? _a2 : null);
|
|
4590
4621
|
setEndDate((_b2 = v == null ? void 0 : v.end) != null ? _b2 : null);
|
|
4591
4622
|
}, [rangeStartMs, rangeEndMs]);
|
|
4592
|
-
(0,
|
|
4623
|
+
(0, import_react25.useEffect)(() => {
|
|
4593
4624
|
const handleClickOutside = (e) => {
|
|
4594
4625
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
4595
4626
|
setIsOpen(false);
|
|
@@ -4873,7 +4904,7 @@ var DatePicker = (props) => {
|
|
|
4873
4904
|
};
|
|
4874
4905
|
|
|
4875
4906
|
// src/Components/IconTabs/IconTabs.tsx
|
|
4876
|
-
var
|
|
4907
|
+
var import_react26 = require("react");
|
|
4877
4908
|
var import_styled_components42 = __toESM(require("styled-components"));
|
|
4878
4909
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4879
4910
|
var TabsContainer = import_styled_components42.default.div`
|
|
@@ -4935,10 +4966,10 @@ var IconTabs = ({
|
|
|
4935
4966
|
defaultTabIndex = 0
|
|
4936
4967
|
}) => {
|
|
4937
4968
|
var _a;
|
|
4938
|
-
const [selectedTab, setSelectedTab] = (0,
|
|
4939
|
-
const sliderRef = (0,
|
|
4940
|
-
const tabRefs = (0,
|
|
4941
|
-
(0,
|
|
4969
|
+
const [selectedTab, setSelectedTab] = (0, import_react26.useState)(defaultTabIndex);
|
|
4970
|
+
const sliderRef = (0, import_react26.useRef)(null);
|
|
4971
|
+
const tabRefs = (0, import_react26.useRef)([]);
|
|
4972
|
+
(0, import_react26.useEffect)(() => {
|
|
4942
4973
|
if (defaultTabIndex >= 0 && defaultTabIndex !== selectedTab) {
|
|
4943
4974
|
setSelectedTab(defaultTabIndex);
|
|
4944
4975
|
}
|
|
@@ -4949,7 +4980,7 @@ var IconTabs = ({
|
|
|
4949
4980
|
onTabChange(index);
|
|
4950
4981
|
}
|
|
4951
4982
|
};
|
|
4952
|
-
(0,
|
|
4983
|
+
(0, import_react26.useEffect)(() => {
|
|
4953
4984
|
if (sliderRef.current && tabRefs.current[selectedTab]) {
|
|
4954
4985
|
const selectedTabRect = tabRefs.current[selectedTab].getBoundingClientRect();
|
|
4955
4986
|
const parentRect = tabRefs.current[selectedTab].parentElement.getBoundingClientRect();
|
|
@@ -4988,7 +5019,7 @@ var IconTabs = ({
|
|
|
4988
5019
|
};
|
|
4989
5020
|
|
|
4990
5021
|
// src/Components/Popover/Popover.tsx
|
|
4991
|
-
var
|
|
5022
|
+
var import_react27 = require("react");
|
|
4992
5023
|
var import_react_dom3 = require("react-dom");
|
|
4993
5024
|
var import_styled_components43 = __toESM(require("styled-components"));
|
|
4994
5025
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
@@ -5034,15 +5065,15 @@ var Popover = ({
|
|
|
5034
5065
|
align = "right",
|
|
5035
5066
|
fullWidth = false
|
|
5036
5067
|
}) => {
|
|
5037
|
-
const [open, setOpen] = (0,
|
|
5038
|
-
const ref = (0,
|
|
5039
|
-
const menuRef = (0,
|
|
5040
|
-
const [menuPosition, setMenuPosition] = (0,
|
|
5068
|
+
const [open, setOpen] = (0, import_react27.useState)(false);
|
|
5069
|
+
const ref = (0, import_react27.useRef)(null);
|
|
5070
|
+
const menuRef = (0, import_react27.useRef)(null);
|
|
5071
|
+
const [menuPosition, setMenuPosition] = (0, import_react27.useState)({
|
|
5041
5072
|
mode: "default",
|
|
5042
5073
|
top: 0,
|
|
5043
5074
|
left: 0
|
|
5044
5075
|
});
|
|
5045
|
-
const updatePosition = (0,
|
|
5076
|
+
const updatePosition = (0, import_react27.useCallback)(() => {
|
|
5046
5077
|
var _a;
|
|
5047
5078
|
if (!ref.current) return;
|
|
5048
5079
|
if (anchorRef == null ? void 0 : anchorRef.current) {
|
|
@@ -5071,7 +5102,7 @@ var Popover = ({
|
|
|
5071
5102
|
});
|
|
5072
5103
|
}
|
|
5073
5104
|
}, [items.length, anchorRef, offsetY, align]);
|
|
5074
|
-
(0,
|
|
5105
|
+
(0, import_react27.useEffect)(() => {
|
|
5075
5106
|
const handleClickOutside = (event) => {
|
|
5076
5107
|
var _a, _b;
|
|
5077
5108
|
const isInTrigger = (_a = ref.current) == null ? void 0 : _a.contains(event.target);
|
|
@@ -5396,7 +5427,7 @@ var Banner = ({
|
|
|
5396
5427
|
};
|
|
5397
5428
|
|
|
5398
5429
|
// src/Components/Tooltip/Tooltip.tsx
|
|
5399
|
-
var
|
|
5430
|
+
var import_react28 = require("react");
|
|
5400
5431
|
var import_styled_components46 = __toESM(require("styled-components"));
|
|
5401
5432
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
5402
5433
|
var StyledTooltipWrapper = import_styled_components46.default.div`
|
|
@@ -5500,7 +5531,7 @@ var Tooltip = ({
|
|
|
5500
5531
|
direction = "top",
|
|
5501
5532
|
children
|
|
5502
5533
|
}) => {
|
|
5503
|
-
const [isVisible, setIsVisible] = (0,
|
|
5534
|
+
const [isVisible, setIsVisible] = (0, import_react28.useState)(false);
|
|
5504
5535
|
const handleMouseEnter = () => setIsVisible(true);
|
|
5505
5536
|
const handleMouseLeave = () => setIsVisible(false);
|
|
5506
5537
|
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
@@ -5527,7 +5558,7 @@ var Tooltip = ({
|
|
|
5527
5558
|
};
|
|
5528
5559
|
|
|
5529
5560
|
// src/Components/Pagination/Pagination.tsx
|
|
5530
|
-
var
|
|
5561
|
+
var import_react29 = require("react");
|
|
5531
5562
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5532
5563
|
var getPageNumbers = (current, total) => {
|
|
5533
5564
|
if (total <= 5) {
|
|
@@ -5551,7 +5582,7 @@ var Pagination = ({
|
|
|
5551
5582
|
summaryLabel
|
|
5552
5583
|
}) => {
|
|
5553
5584
|
const totalPages = Math.max(1, Math.ceil(totalItems / itemsPerPage));
|
|
5554
|
-
const pages = (0,
|
|
5585
|
+
const pages = (0, import_react29.useMemo)(
|
|
5555
5586
|
() => getPageNumbers(currentPage, totalPages),
|
|
5556
5587
|
[currentPage, totalPages]
|
|
5557
5588
|
);
|
|
@@ -5605,7 +5636,7 @@ var Pagination = ({
|
|
|
5605
5636
|
};
|
|
5606
5637
|
|
|
5607
5638
|
// src/Components/FileUploadZone/FileUploadZone.tsx
|
|
5608
|
-
var
|
|
5639
|
+
var import_react30 = require("react");
|
|
5609
5640
|
var import_styled_components47 = __toESM(require("styled-components"));
|
|
5610
5641
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5611
5642
|
var ACCEPT_MAP = {
|
|
@@ -5692,19 +5723,19 @@ var FileUploadZone = ({
|
|
|
5692
5723
|
icon = "cloud-arrow-up",
|
|
5693
5724
|
showFileName = false
|
|
5694
5725
|
}) => {
|
|
5695
|
-
const [isDragging, setIsDragging] = (0,
|
|
5696
|
-
const [internalPreviewUrl, setInternalPreviewUrl] = (0,
|
|
5726
|
+
const [isDragging, setIsDragging] = (0, import_react30.useState)(false);
|
|
5727
|
+
const [internalPreviewUrl, setInternalPreviewUrl] = (0, import_react30.useState)(
|
|
5697
5728
|
null
|
|
5698
5729
|
);
|
|
5699
|
-
const [fileType, setFileType] = (0,
|
|
5700
|
-
const [fileName, setFileName] = (0,
|
|
5701
|
-
const [inlineError, setInlineError] = (0,
|
|
5702
|
-
const inputRef = (0,
|
|
5730
|
+
const [fileType, setFileType] = (0, import_react30.useState)(null);
|
|
5731
|
+
const [fileName, setFileName] = (0, import_react30.useState)(null);
|
|
5732
|
+
const [inlineError, setInlineError] = (0, import_react30.useState)(null);
|
|
5733
|
+
const inputRef = (0, import_react30.useRef)(null);
|
|
5703
5734
|
const resolvedAccept = acceptOnlyPdf ? PDF_ONLY : accept;
|
|
5704
5735
|
const mimeTypes = getMimeTypes(resolvedAccept);
|
|
5705
5736
|
const acceptString = mimeTypes.join(",");
|
|
5706
5737
|
const previewUrl = multiple ? null : controlledPreviewUrl || (showPreview ? internalPreviewUrl : null);
|
|
5707
|
-
const emitError = (0,
|
|
5738
|
+
const emitError = (0, import_react30.useCallback)(
|
|
5708
5739
|
(message) => {
|
|
5709
5740
|
if (onError) {
|
|
5710
5741
|
onError(message);
|
|
@@ -5714,7 +5745,7 @@ var FileUploadZone = ({
|
|
|
5714
5745
|
},
|
|
5715
5746
|
[onError]
|
|
5716
5747
|
);
|
|
5717
|
-
const validateFile = (0,
|
|
5748
|
+
const validateFile = (0, import_react30.useCallback)(
|
|
5718
5749
|
(file) => {
|
|
5719
5750
|
if (!mimeTypes.includes(file.type)) {
|
|
5720
5751
|
return { ok: false, error: "Format de fichier non accept\xE9." };
|
|
@@ -5729,7 +5760,7 @@ var FileUploadZone = ({
|
|
|
5729
5760
|
},
|
|
5730
5761
|
[mimeTypes, maxSizeMB]
|
|
5731
5762
|
);
|
|
5732
|
-
const processFile = (0,
|
|
5763
|
+
const processFile = (0, import_react30.useCallback)(
|
|
5733
5764
|
(file) => {
|
|
5734
5765
|
setInlineError(null);
|
|
5735
5766
|
const result = validateFile(file);
|
|
@@ -5747,7 +5778,7 @@ var FileUploadZone = ({
|
|
|
5747
5778
|
},
|
|
5748
5779
|
[validateFile, onSave, showPreview, emitError]
|
|
5749
5780
|
);
|
|
5750
|
-
const processFiles = (0,
|
|
5781
|
+
const processFiles = (0, import_react30.useCallback)(
|
|
5751
5782
|
(files) => {
|
|
5752
5783
|
setInlineError(null);
|
|
5753
5784
|
for (const file of files) {
|
package/dist/index.mjs
CHANGED
|
@@ -354,6 +354,7 @@ Row.displayName = "Row";
|
|
|
354
354
|
var Row_default = Row;
|
|
355
355
|
|
|
356
356
|
// src/Components/Col/Col.tsx
|
|
357
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
357
358
|
import styled5 from "styled-components";
|
|
358
359
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
359
360
|
var shouldForwardPropCol = (prop) => ![
|
|
@@ -389,10 +390,11 @@ var StyledCol = styled5.div.withConfig({
|
|
|
389
390
|
align-items: ${(props) => props.alignItems || "flex-start"};
|
|
390
391
|
box-sizing: border-box;
|
|
391
392
|
`;
|
|
392
|
-
var Col = (props) => {
|
|
393
|
+
var Col = forwardRef2((props, ref) => {
|
|
393
394
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
394
|
-
return /* @__PURE__ */ jsx5(StyledCol, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
395
|
-
};
|
|
395
|
+
return /* @__PURE__ */ jsx5(StyledCol, __spreadProps(__spreadValues({ ref }, otherProps), { children }));
|
|
396
|
+
});
|
|
397
|
+
Col.displayName = "Col";
|
|
396
398
|
var Col_default = Col;
|
|
397
399
|
|
|
398
400
|
// src/Components/Text/Text.tsx
|
|
@@ -1067,7 +1069,7 @@ var ModalConfirmation = (props) => {
|
|
|
1067
1069
|
import { useEffect as useEffect3, useRef as useRef3, useState as useState2 } from "react";
|
|
1068
1070
|
|
|
1069
1071
|
// src/Components/Bubble/Bubble.tsx
|
|
1070
|
-
import styled11 from "styled-components";
|
|
1072
|
+
import styled11, { css, keyframes } from "styled-components";
|
|
1071
1073
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1072
1074
|
var textSizes3 = {
|
|
1073
1075
|
xxs: ".4em",
|
|
@@ -1087,6 +1089,21 @@ var paddingSizes = {
|
|
|
1087
1089
|
xl: "10px 20px",
|
|
1088
1090
|
xxl: "10px 20px"
|
|
1089
1091
|
};
|
|
1092
|
+
var resolveColor2 = (value, fallback = "transparent") => colors[value] || value || fallback;
|
|
1093
|
+
var pulseAnimation = keyframes`
|
|
1094
|
+
0% {
|
|
1095
|
+
transform: scale(1);
|
|
1096
|
+
box-shadow: 0 0 0 0 var(--bubble-pulse-color);
|
|
1097
|
+
}
|
|
1098
|
+
70% {
|
|
1099
|
+
transform: scale(1.06);
|
|
1100
|
+
box-shadow: 0 0 0 6px transparent;
|
|
1101
|
+
}
|
|
1102
|
+
100% {
|
|
1103
|
+
transform: scale(1);
|
|
1104
|
+
box-shadow: 0 0 0 0 transparent;
|
|
1105
|
+
}
|
|
1106
|
+
`;
|
|
1090
1107
|
var shouldForwardProp6 = (prop) => ![
|
|
1091
1108
|
"color",
|
|
1092
1109
|
"backgroundColor",
|
|
@@ -1096,13 +1113,14 @@ var shouldForwardProp6 = (prop) => ![
|
|
|
1096
1113
|
"maxChars",
|
|
1097
1114
|
"borderRadius",
|
|
1098
1115
|
"boxShadow",
|
|
1099
|
-
"width"
|
|
1116
|
+
"width",
|
|
1117
|
+
"pulse"
|
|
1100
1118
|
].includes(prop);
|
|
1101
1119
|
var StyledBubble = styled11.span.withConfig({
|
|
1102
1120
|
shouldForwardProp: shouldForwardProp6
|
|
1103
1121
|
})`
|
|
1104
|
-
color: ${(props) =>
|
|
1105
|
-
background: ${(props) =>
|
|
1122
|
+
color: ${(props) => resolveColor2(props.color, "inherit")};
|
|
1123
|
+
background: ${(props) => resolveColor2(props.backgroundColor)};
|
|
1106
1124
|
font-size: ${(props) => textSizes3[props.size] || props.size || "1em"};
|
|
1107
1125
|
border-radius: ${(props) => props.borderRadius || "20px"};
|
|
1108
1126
|
box-shadow: ${(props) => props.boxShadow || "none"};
|
|
@@ -1114,6 +1132,19 @@ var StyledBubble = styled11.span.withConfig({
|
|
|
1114
1132
|
text-overflow: ellipsis;
|
|
1115
1133
|
max-width: ${(props) => props.maxChars ? `${props.maxChars}ch` : "none"};
|
|
1116
1134
|
white-space: nowrap;
|
|
1135
|
+
${(props) => props.pulse && css`
|
|
1136
|
+
--bubble-pulse-color: ${resolveColor2(
|
|
1137
|
+
props.backgroundColor,
|
|
1138
|
+
colors.grey_600
|
|
1139
|
+
)};
|
|
1140
|
+
display: inline-flex;
|
|
1141
|
+
align-items: center;
|
|
1142
|
+
animation: ${pulseAnimation} 2s ease-in-out infinite;
|
|
1143
|
+
|
|
1144
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1145
|
+
animation: none;
|
|
1146
|
+
}
|
|
1147
|
+
`}
|
|
1117
1148
|
`;
|
|
1118
1149
|
var Bubble = (_a) => {
|
|
1119
1150
|
var _b = _a, { children } = _b, otherProps = __objRest(_b, ["children"]);
|
|
@@ -1506,7 +1537,7 @@ import styled14 from "styled-components";
|
|
|
1506
1537
|
|
|
1507
1538
|
// src/Components/Toast/ToastCard.tsx
|
|
1508
1539
|
import { useCallback as useCallback2, useEffect as useEffect5, useState as useState4 } from "react";
|
|
1509
|
-
import styled13, { keyframes } from "styled-components";
|
|
1540
|
+
import styled13, { keyframes as keyframes2 } from "styled-components";
|
|
1510
1541
|
|
|
1511
1542
|
// src/Components/Toast/toastStore.ts
|
|
1512
1543
|
var DEFAULT_TIMEOUT_BY_TYPE = {
|
|
@@ -1613,15 +1644,15 @@ var TOAST = {
|
|
|
1613
1644
|
background: colors.blue_50
|
|
1614
1645
|
}
|
|
1615
1646
|
};
|
|
1616
|
-
var slideIn =
|
|
1647
|
+
var slideIn = keyframes2`
|
|
1617
1648
|
from { transform: translateX(16px); opacity: 0; }
|
|
1618
1649
|
to { transform: translateX(0); opacity: 1; }
|
|
1619
1650
|
`;
|
|
1620
|
-
var slideOut =
|
|
1651
|
+
var slideOut = keyframes2`
|
|
1621
1652
|
from { transform: translateX(0); opacity: 1; }
|
|
1622
1653
|
to { transform: translateX(16px); opacity: 0; }
|
|
1623
1654
|
`;
|
|
1624
|
-
var shrink =
|
|
1655
|
+
var shrink = keyframes2`
|
|
1625
1656
|
from { transform: scaleX(1); }
|
|
1626
1657
|
to { transform: scaleX(0); }
|
|
1627
1658
|
`;
|
|
@@ -2004,7 +2035,7 @@ var Initials = styled18.span`
|
|
|
2004
2035
|
line-height: 1;
|
|
2005
2036
|
user-select: none;
|
|
2006
2037
|
`;
|
|
2007
|
-
var
|
|
2038
|
+
var resolveColor3 = (token, fallback) => {
|
|
2008
2039
|
if (!token) return fallback;
|
|
2009
2040
|
return colors[token] || token;
|
|
2010
2041
|
};
|
|
@@ -2020,8 +2051,8 @@ var Avatar = ({
|
|
|
2020
2051
|
}) => {
|
|
2021
2052
|
var _a, _b, _c;
|
|
2022
2053
|
const [hasImageError, setHasImageError] = useState5(false);
|
|
2023
|
-
const resolvedBackground =
|
|
2024
|
-
const resolvedText =
|
|
2054
|
+
const resolvedBackground = resolveColor3(backgroundColor, colors.grey_300);
|
|
2055
|
+
const resolvedText = resolveColor3(textColor, colors.dark);
|
|
2025
2056
|
const initials = getInitials(name);
|
|
2026
2057
|
const sizePx = `${size}px`;
|
|
2027
2058
|
const borderRadius = shape === "circle" ? "50%" : "4px";
|
|
@@ -2325,7 +2356,7 @@ var Select = ({
|
|
|
2325
2356
|
|
|
2326
2357
|
// src/Components/Input/Input.tsx
|
|
2327
2358
|
import {
|
|
2328
|
-
forwardRef as
|
|
2359
|
+
forwardRef as forwardRef3,
|
|
2329
2360
|
useEffect as useEffect7,
|
|
2330
2361
|
useImperativeHandle,
|
|
2331
2362
|
useRef as useRef6,
|
|
@@ -2536,7 +2567,7 @@ var displayToIso = (displayValue) => {
|
|
|
2536
2567
|
const isoDay = String(day).padStart(2, "0");
|
|
2537
2568
|
return `${yearStr}-${isoMonth}-${isoDay}`;
|
|
2538
2569
|
};
|
|
2539
|
-
var Input =
|
|
2570
|
+
var Input = forwardRef3((props, ref) => {
|
|
2540
2571
|
const _a = props, {
|
|
2541
2572
|
label,
|
|
2542
2573
|
value,
|
|
@@ -3038,7 +3069,7 @@ var Accordion = ({
|
|
|
3038
3069
|
};
|
|
3039
3070
|
|
|
3040
3071
|
// src/Components/ColorPicker/ColorPicker.tsx
|
|
3041
|
-
import { forwardRef as
|
|
3072
|
+
import { forwardRef as forwardRef4, useState as useState9, useRef as useRef7, useEffect as useEffect8 } from "react";
|
|
3042
3073
|
import styled24 from "styled-components";
|
|
3043
3074
|
import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3044
3075
|
var SIZES = {
|
|
@@ -3115,7 +3146,7 @@ var TEXT_SIZE_MAP = {
|
|
|
3115
3146
|
m: "xs",
|
|
3116
3147
|
l: "s"
|
|
3117
3148
|
};
|
|
3118
|
-
var ColorPicker =
|
|
3149
|
+
var ColorPicker = forwardRef4(
|
|
3119
3150
|
({
|
|
3120
3151
|
label,
|
|
3121
3152
|
value,
|
|
@@ -3174,7 +3205,7 @@ var ColorPicker = forwardRef3(
|
|
|
3174
3205
|
ColorPicker.displayName = "ColorPicker";
|
|
3175
3206
|
|
|
3176
3207
|
// src/Components/SliderInput/SliderInput.tsx
|
|
3177
|
-
import { forwardRef as
|
|
3208
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
3178
3209
|
import styled25 from "styled-components";
|
|
3179
3210
|
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3180
3211
|
var Container3 = styled25.label`
|
|
@@ -3256,7 +3287,7 @@ var MinMaxRow = styled25.span`
|
|
|
3256
3287
|
justify-content: space-between;
|
|
3257
3288
|
align-items: center;
|
|
3258
3289
|
`;
|
|
3259
|
-
var SliderInput =
|
|
3290
|
+
var SliderInput = forwardRef5(
|
|
3260
3291
|
({
|
|
3261
3292
|
value,
|
|
3262
3293
|
onChange,
|
|
@@ -3391,7 +3422,7 @@ var ListItem = (props) => {
|
|
|
3391
3422
|
};
|
|
3392
3423
|
|
|
3393
3424
|
// src/Components/Table/Table.tsx
|
|
3394
|
-
import { forwardRef as
|
|
3425
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
3395
3426
|
import styled28 from "styled-components";
|
|
3396
3427
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3397
3428
|
var shouldForwardPropTable = (prop) => ![
|
|
@@ -3427,7 +3458,7 @@ var StyledContainer3 = styled28.div.withConfig({
|
|
|
3427
3458
|
border: 1.4px solid ${colors.grey_200};
|
|
3428
3459
|
box-shadow: ${(props) => props.hasShadow ? "0 2px 12px 0 rgba(198, 198, 198, 0.25)" : "none"};
|
|
3429
3460
|
`;
|
|
3430
|
-
var Table =
|
|
3461
|
+
var Table = forwardRef6((props, ref) => {
|
|
3431
3462
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3432
3463
|
const safeChildren = children;
|
|
3433
3464
|
return /* @__PURE__ */ jsx32(StyledContainer3, __spreadProps(__spreadValues({}, otherProps), { ref, children: /* @__PURE__ */ jsx32(StyledTable, __spreadProps(__spreadValues({}, otherProps), { children: safeChildren })) }));
|
|
@@ -3457,7 +3488,7 @@ var TableHeader = (props) => {
|
|
|
3457
3488
|
};
|
|
3458
3489
|
|
|
3459
3490
|
// src/Components/Table/TableBody/TableBody.tsx
|
|
3460
|
-
import { forwardRef as
|
|
3491
|
+
import { forwardRef as forwardRef7 } from "react";
|
|
3461
3492
|
import styled30 from "styled-components";
|
|
3462
3493
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3463
3494
|
var shouldForwardPropTableBody = (prop) => !["backgroundColor", "useEvenBackground", "fixedHeight", "color"].includes(
|
|
@@ -3476,7 +3507,7 @@ var StyledTableBody = styled30.div.withConfig({
|
|
|
3476
3507
|
background-color: ${(props) => props.useEvenBackground ? "#f2f2f2" : ""};
|
|
3477
3508
|
}
|
|
3478
3509
|
`;
|
|
3479
|
-
var TableBody =
|
|
3510
|
+
var TableBody = forwardRef7(
|
|
3480
3511
|
(props, ref) => {
|
|
3481
3512
|
const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
|
|
3482
3513
|
const safeChildren = children;
|
|
@@ -3735,8 +3766,8 @@ var SkeletonRow = ({ columns = 9 }) => /* @__PURE__ */ jsxs18(Fragment4, { child
|
|
|
3735
3766
|
] });
|
|
3736
3767
|
|
|
3737
3768
|
// src/Components/Switch/Switch.tsx
|
|
3738
|
-
import { forwardRef as
|
|
3739
|
-
import styled38, { css } from "styled-components";
|
|
3769
|
+
import { forwardRef as forwardRef8 } from "react";
|
|
3770
|
+
import styled38, { css as css2 } from "styled-components";
|
|
3740
3771
|
import { jsx as jsx43, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3741
3772
|
var BASE = {
|
|
3742
3773
|
s: { w: 36, h: 20, knob: 16, pad: 2 },
|
|
@@ -3775,7 +3806,7 @@ var Track = styled38.span`
|
|
|
3775
3806
|
|
|
3776
3807
|
${(p) => {
|
|
3777
3808
|
const s = SIZES2[p.$size || "m"] || SIZES2.m;
|
|
3778
|
-
return
|
|
3809
|
+
return css2`
|
|
3779
3810
|
width: ${s.w}px;
|
|
3780
3811
|
height: ${s.h}px;
|
|
3781
3812
|
padding: ${s.pad}px;
|
|
@@ -3805,7 +3836,7 @@ var Knob = styled38.span`
|
|
|
3805
3836
|
${(p) => {
|
|
3806
3837
|
const s = SIZES2[p.$size || "m"] || SIZES2.m;
|
|
3807
3838
|
const left = p.$checked ? s.w - s.pad - s.knob : s.pad;
|
|
3808
|
-
return
|
|
3839
|
+
return css2`
|
|
3809
3840
|
width: ${s.knob}px;
|
|
3810
3841
|
height: ${s.knob}px;
|
|
3811
3842
|
left: ${left}px;
|
|
@@ -3816,7 +3847,7 @@ var Knob = styled38.span`
|
|
|
3816
3847
|
transform: translateY(-50%) scale(0.96);
|
|
3817
3848
|
}
|
|
3818
3849
|
`;
|
|
3819
|
-
var Switch =
|
|
3850
|
+
var Switch = forwardRef8(
|
|
3820
3851
|
(_a, ref) => {
|
|
3821
3852
|
var _b = _a, {
|
|
3822
3853
|
checked,
|
|
@@ -4750,7 +4781,7 @@ var DatePicker = (props) => {
|
|
|
4750
4781
|
|
|
4751
4782
|
// src/Components/IconTabs/IconTabs.tsx
|
|
4752
4783
|
import { useState as useState15, useEffect as useEffect13, useRef as useRef11 } from "react";
|
|
4753
|
-
import styled42, { css as
|
|
4784
|
+
import styled42, { css as css3 } from "styled-components";
|
|
4754
4785
|
import { jsx as jsx50, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4755
4786
|
var TabsContainer = styled42.div`
|
|
4756
4787
|
display: flex;
|
|
@@ -4782,10 +4813,10 @@ var Tab2 = styled42.div`
|
|
|
4782
4813
|
display: flex;
|
|
4783
4814
|
align-items: center;
|
|
4784
4815
|
justify-content: center;
|
|
4785
|
-
${({ selected }) => selected &&
|
|
4816
|
+
${({ selected }) => selected && css3`
|
|
4786
4817
|
color: #fff;
|
|
4787
4818
|
`}
|
|
4788
|
-
${({ disabled }) => disabled &&
|
|
4819
|
+
${({ disabled }) => disabled && css3`
|
|
4789
4820
|
opacity: 0.5;
|
|
4790
4821
|
pointer-events: none;
|
|
4791
4822
|
cursor: not-allowed;
|
|
@@ -5098,7 +5129,7 @@ var Card2 = ({
|
|
|
5098
5129
|
);
|
|
5099
5130
|
|
|
5100
5131
|
// src/Components/Banner/Banner.tsx
|
|
5101
|
-
import styled45, { css as
|
|
5132
|
+
import styled45, { css as css4, keyframes as keyframes3 } from "styled-components";
|
|
5102
5133
|
import { Fragment as Fragment7, jsx as jsx54, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5103
5134
|
var PRESET_STYLES = {
|
|
5104
5135
|
blue: {
|
|
@@ -5140,11 +5171,11 @@ var resolveStyle = (variant, filled) => {
|
|
|
5140
5171
|
accent: variant
|
|
5141
5172
|
};
|
|
5142
5173
|
};
|
|
5143
|
-
var shimmerSweep =
|
|
5174
|
+
var shimmerSweep = keyframes3`
|
|
5144
5175
|
0% { transform: translateX(-120%) rotate(20deg); }
|
|
5145
5176
|
30%, 100% { transform: translateX(220%) rotate(20deg); }
|
|
5146
5177
|
`;
|
|
5147
|
-
var shimmerStyle =
|
|
5178
|
+
var shimmerStyle = css4`
|
|
5148
5179
|
position: relative;
|
|
5149
5180
|
overflow: hidden;
|
|
5150
5181
|
|
|
@@ -5762,14 +5793,14 @@ var FileUploadZone = ({
|
|
|
5762
5793
|
};
|
|
5763
5794
|
|
|
5764
5795
|
// src/Components/Spinner/Spinner.tsx
|
|
5765
|
-
import styled48, { keyframes as
|
|
5796
|
+
import styled48, { keyframes as keyframes4 } from "styled-components";
|
|
5766
5797
|
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
5767
5798
|
var SIZES3 = {
|
|
5768
5799
|
s: 20,
|
|
5769
5800
|
m: 32,
|
|
5770
5801
|
l: 48
|
|
5771
5802
|
};
|
|
5772
|
-
var spin =
|
|
5803
|
+
var spin = keyframes4`
|
|
5773
5804
|
0% { transform: rotate(0deg); }
|
|
5774
5805
|
100% { transform: rotate(360deg); }
|
|
5775
5806
|
`;
|