@norges-domstoler/dds-components 23.1.3 → 23.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +174 -92
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +876 -856
- package/dist/index.d.ts +876 -856
- package/dist/index.js +442 -413
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +409 -378
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -3
package/dist/index.mjs
CHANGED
|
@@ -628,7 +628,7 @@ function useReturnFocusOnBlur(active, onBlur, triggerElement) {
|
|
|
628
628
|
const focusableElements = getFocusableElements(elementRef);
|
|
629
629
|
const lastElement = focusableElements[focusableElements.length - 1];
|
|
630
630
|
const firstElement = focusableElements[0];
|
|
631
|
-
if (!e.shiftKey && document.activeElement === lastElement || e.shiftKey && document.activeElement === firstElement || e.shiftKey && document.activeElement ===
|
|
631
|
+
if (!e.shiftKey && document.activeElement === lastElement || e.shiftKey && document.activeElement === firstElement || e.shiftKey && document.activeElement === elementRef.current) {
|
|
632
632
|
triggerElement.focus();
|
|
633
633
|
e.preventDefault();
|
|
634
634
|
onBlur();
|
|
@@ -642,7 +642,7 @@ function useReturnFocusOnBlur(active, onBlur, triggerElement) {
|
|
|
642
642
|
return () => {
|
|
643
643
|
element == null ? void 0 : element.removeEventListener("keydown", handleFocus);
|
|
644
644
|
};
|
|
645
|
-
}, [active]);
|
|
645
|
+
}, [active, triggerElement, onBlur]);
|
|
646
646
|
return elementRef;
|
|
647
647
|
}
|
|
648
648
|
|
|
@@ -1036,9 +1036,7 @@ function Icon(props) {
|
|
|
1036
1036
|
return /* @__PURE__ */ jsx4(
|
|
1037
1037
|
C,
|
|
1038
1038
|
{
|
|
1039
|
-
...getBaseHTMLProps(id, className, style, htmlProps,
|
|
1040
|
-
...rest
|
|
1041
|
-
}),
|
|
1039
|
+
...getBaseHTMLProps(id, className, style, htmlProps, rest),
|
|
1042
1040
|
height: size2,
|
|
1043
1041
|
width: size2,
|
|
1044
1042
|
fill: color,
|
|
@@ -1142,19 +1140,30 @@ var getValue = (v, bp, invert) => {
|
|
|
1142
1140
|
};
|
|
1143
1141
|
var convertMultiValue = (value, bp, invert) => value.split(" ").map((v) => getValue(v, bp, invert)).join(" ");
|
|
1144
1142
|
var invertValue = (v) => v === "0" ? "0" : `calc(-1 * ${v})`;
|
|
1143
|
+
var buildCSSKey = (prefix2, suffix, bp) => {
|
|
1144
|
+
let key = `--${TOKEN_PREFIX}`;
|
|
1145
|
+
if (prefix2) key += `-${prefix2}`;
|
|
1146
|
+
if (bp) key += `-${bp}`;
|
|
1147
|
+
if (suffix) key += `-${suffix}`;
|
|
1148
|
+
return key;
|
|
1149
|
+
};
|
|
1150
|
+
function getCSSProperties(property, prefix2, suffix, invert) {
|
|
1151
|
+
if (property === void 0 || property === null) return;
|
|
1152
|
+
const properties = {};
|
|
1153
|
+
properties[buildCSSKey(prefix2, suffix)] = convertMultiValue(property.toString(), void 0, invert);
|
|
1154
|
+
return properties;
|
|
1155
|
+
}
|
|
1145
1156
|
function getResponsiveCSSProperties(property, prefix2, suffix, invert) {
|
|
1146
1157
|
if (!property) return;
|
|
1147
1158
|
const properties = {};
|
|
1148
|
-
const pPrefix = `--${TOKEN_PREFIX}-${prefix2}`;
|
|
1149
|
-
const pSuffix = suffix ? `-${suffix}` : "";
|
|
1150
1159
|
if (isBreakpointObject(property)) {
|
|
1151
1160
|
BREAKPOINTS.forEach((bp) => {
|
|
1152
1161
|
if (property[bp]) {
|
|
1153
|
-
properties[
|
|
1162
|
+
properties[buildCSSKey(prefix2, suffix, bp)] = convertMultiValue(property[bp].toString(), bp, invert);
|
|
1154
1163
|
}
|
|
1155
1164
|
});
|
|
1156
1165
|
} else {
|
|
1157
|
-
properties[
|
|
1166
|
+
properties[buildCSSKey(prefix2, suffix)] = convertMultiValue(property.toString(), void 0, invert);
|
|
1158
1167
|
}
|
|
1159
1168
|
return properties;
|
|
1160
1169
|
}
|
|
@@ -1430,9 +1439,17 @@ Contrast.displayName = "Contrast";
|
|
|
1430
1439
|
|
|
1431
1440
|
// src/components/layout/Grid/Grid.module.css
|
|
1432
1441
|
var Grid_default = {
|
|
1442
|
+
"dds-grid": "Grid_dds-grid",
|
|
1433
1443
|
"dds-grid-template-columns": "Grid_dds-grid-template-columns",
|
|
1444
|
+
"dds-grid-auto-flow": "Grid_dds-grid-auto-flow",
|
|
1445
|
+
"dds-grid-auto-columns": "Grid_dds-grid-auto-columns",
|
|
1446
|
+
"dds-grid-auto-rows": "Grid_dds-grid-auto-rows",
|
|
1447
|
+
"dds-grid-template": "Grid_dds-grid-template",
|
|
1448
|
+
"dds-grid-template-rows": "Grid_dds-grid-template-rows",
|
|
1449
|
+
"dds-grid-template-areas": "Grid_dds-grid-template-areas",
|
|
1434
1450
|
"dds-grid-column": "Grid_dds-grid-column",
|
|
1435
1451
|
"dds-grid-row": "Grid_dds-grid-row",
|
|
1452
|
+
"dds-grid-area": "Grid_dds-grid-area",
|
|
1436
1453
|
"dds-j-self": "Grid_dds-j-self",
|
|
1437
1454
|
"child--first-half": "Grid_child--first-half",
|
|
1438
1455
|
"child--second-half": "Grid_child--second-half",
|
|
@@ -1441,56 +1458,90 @@ var Grid_default = {
|
|
|
1441
1458
|
|
|
1442
1459
|
// src/components/layout/Grid/Grid.tsx
|
|
1443
1460
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1444
|
-
var
|
|
1445
|
-
|
|
1446
|
-
className,
|
|
1447
|
-
htmlProps,
|
|
1448
|
-
gridTemplateColumns = {
|
|
1461
|
+
var DEFAULT_PAGE_LAYOUT = {
|
|
1462
|
+
gridTemplateColumns: {
|
|
1449
1463
|
xs: "repeat(var(--dds-grid-xs-count), minmax(0, 1fr))",
|
|
1450
1464
|
sm: "repeat(var(--dds-grid-sm-count), minmax(0, 1fr))",
|
|
1451
1465
|
md: "repeat(var(--dds-grid-md-count), minmax(0, 1fr))",
|
|
1452
1466
|
lg: "repeat(var(--dds-grid-lg-count), minmax(0, 1fr))",
|
|
1453
1467
|
xl: "repeat(var(--dds-grid-xl-count), minmax(0, 1fr))"
|
|
1454
1468
|
},
|
|
1455
|
-
|
|
1469
|
+
gutterSize: {
|
|
1456
1470
|
xs: "var(--dds-grid-xs-gutter-size)",
|
|
1457
1471
|
sm: "var(--dds-grid-sm-gutter-size)",
|
|
1458
1472
|
md: "var(--dds-grid-md-gutter-size)",
|
|
1459
1473
|
lg: "var(--dds-grid-lg-gutter-size)",
|
|
1460
1474
|
xl: "var(--dds-grid-xl-gutter-size)"
|
|
1461
1475
|
},
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1476
|
+
marginInline: { xs: "x2", sm: "x2", md: "x4", lg: "x6", xl: "x10" }
|
|
1477
|
+
};
|
|
1478
|
+
var Grid = ({
|
|
1479
|
+
id,
|
|
1480
|
+
className,
|
|
1481
|
+
htmlProps,
|
|
1482
|
+
defaultPageLayout = true,
|
|
1483
|
+
display = "grid",
|
|
1484
|
+
grid,
|
|
1485
|
+
gridAutoColumns,
|
|
1486
|
+
gridAutoFlow,
|
|
1487
|
+
gridAutoRows,
|
|
1488
|
+
gridTemplate,
|
|
1489
|
+
gridTemplateAreas,
|
|
1490
|
+
gridTemplateRows,
|
|
1491
|
+
gridTemplateColumns,
|
|
1492
|
+
columnGap,
|
|
1493
|
+
rowGap,
|
|
1494
|
+
marginInline,
|
|
1470
1495
|
style,
|
|
1471
1496
|
...rest
|
|
1472
1497
|
}) => {
|
|
1498
|
+
const pageDefaults = defaultPageLayout ? DEFAULT_PAGE_LAYOUT : null;
|
|
1499
|
+
const resolvedGridTemplateColumns = gridTemplateColumns != null ? gridTemplateColumns : pageDefaults == null ? void 0 : pageDefaults.gridTemplateColumns;
|
|
1500
|
+
const resolvedColumnGap = columnGap != null ? columnGap : pageDefaults == null ? void 0 : pageDefaults.gutterSize;
|
|
1501
|
+
const resolvedRowGap = rowGap != null ? rowGap : pageDefaults == null ? void 0 : pageDefaults.gutterSize;
|
|
1502
|
+
const resolvedMarginInline = marginInline != null ? marginInline : pageDefaults == null ? void 0 : pageDefaults.marginInline;
|
|
1473
1503
|
const styleVariables = {
|
|
1474
1504
|
...getResponsiveCSSProperties(
|
|
1475
|
-
|
|
1505
|
+
resolvedGridTemplateColumns,
|
|
1476
1506
|
"r",
|
|
1477
1507
|
"grid-template-columns"
|
|
1508
|
+
),
|
|
1509
|
+
...getResponsiveCSSProperties(grid, "r", "grid"),
|
|
1510
|
+
...getResponsiveCSSProperties(gridAutoColumns, "r", "grid-auto-columns"),
|
|
1511
|
+
...getResponsiveCSSProperties(gridAutoFlow, "r", "grid-auto-flow"),
|
|
1512
|
+
...getResponsiveCSSProperties(gridAutoRows, "r", "grid-auto-rows"),
|
|
1513
|
+
...getResponsiveCSSProperties(gridTemplate, "r", "grid-template"),
|
|
1514
|
+
...getResponsiveCSSProperties(gridTemplateRows, "r", "grid-template-rows"),
|
|
1515
|
+
...getResponsiveCSSProperties(
|
|
1516
|
+
gridTemplateAreas,
|
|
1517
|
+
"r",
|
|
1518
|
+
"grid-template-areas"
|
|
1478
1519
|
)
|
|
1479
1520
|
};
|
|
1480
1521
|
return /* @__PURE__ */ jsx10(
|
|
1481
1522
|
Box,
|
|
1482
1523
|
{
|
|
1483
|
-
display: "grid",
|
|
1484
1524
|
...getBaseHTMLProps(
|
|
1485
1525
|
id,
|
|
1486
|
-
cn(
|
|
1526
|
+
cn(
|
|
1527
|
+
className,
|
|
1528
|
+
resolvedGridTemplateColumns && Grid_default["dds-grid-template-columns"],
|
|
1529
|
+
grid && Grid_default["dds-grid"],
|
|
1530
|
+
gridAutoColumns && Grid_default["dds-grid-auto-columns"],
|
|
1531
|
+
gridAutoFlow && Grid_default["dds-grid-auto-flow"],
|
|
1532
|
+
gridAutoRows && Grid_default["dds-grid-auto-rows"],
|
|
1533
|
+
gridTemplate && Grid_default["dds-grid-template"],
|
|
1534
|
+
gridTemplateRows && Grid_default["dds-grid-template-rows"],
|
|
1535
|
+
gridTemplateAreas && Grid_default["dds-grid-template-areas"]
|
|
1536
|
+
),
|
|
1487
1537
|
{ ...style, ...styleVariables },
|
|
1488
1538
|
htmlProps,
|
|
1489
1539
|
rest
|
|
1490
1540
|
),
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1541
|
+
display,
|
|
1542
|
+
marginInline: resolvedMarginInline,
|
|
1543
|
+
columnGap: resolvedColumnGap,
|
|
1544
|
+
rowGap: resolvedRowGap
|
|
1494
1545
|
}
|
|
1495
1546
|
);
|
|
1496
1547
|
};
|
|
@@ -1504,12 +1555,14 @@ var GridChild = ({
|
|
|
1504
1555
|
htmlProps,
|
|
1505
1556
|
style,
|
|
1506
1557
|
gridRow,
|
|
1558
|
+
gridArea,
|
|
1507
1559
|
justifySelf,
|
|
1508
1560
|
columnsOccupied,
|
|
1509
1561
|
...rest
|
|
1510
1562
|
}) => {
|
|
1511
1563
|
const styleVariables = {
|
|
1512
1564
|
...getResponsiveCSSProperties(gridRow, "r", "grid-row"),
|
|
1565
|
+
...getResponsiveCSSProperties(gridArea, "r", "grid-area"),
|
|
1513
1566
|
...getResponsiveCSSProperties(justifySelf, "r", "j-self"),
|
|
1514
1567
|
...getResponsiveCSSProperties(columnsOccupied, "r", "grid-column")
|
|
1515
1568
|
};
|
|
@@ -1522,6 +1575,7 @@ var GridChild = ({
|
|
|
1522
1575
|
className,
|
|
1523
1576
|
Grid_default["child-col-count"],
|
|
1524
1577
|
gridRow && Grid_default["dds-grid-row"],
|
|
1578
|
+
gridArea && Grid_default["dds-grid-area"],
|
|
1525
1579
|
justifySelf && Grid_default["dds-j-self"],
|
|
1526
1580
|
columnsOccupied && Grid_default["dds-grid-column"],
|
|
1527
1581
|
columnsOccupied === "firstHalf" && Grid_default["child--first-half"],
|
|
@@ -1566,8 +1620,8 @@ var Paper = ({
|
|
|
1566
1620
|
...rest
|
|
1567
1621
|
}) => {
|
|
1568
1622
|
const styleVariables = {
|
|
1569
|
-
...
|
|
1570
|
-
...
|
|
1623
|
+
...getCSSProperties(background, "paper", "background"),
|
|
1624
|
+
...getCSSProperties(border, "paper", "border")
|
|
1571
1625
|
};
|
|
1572
1626
|
return /* @__PURE__ */ jsx12(
|
|
1573
1627
|
Box,
|
|
@@ -1631,7 +1685,7 @@ var HStack = ({
|
|
|
1631
1685
|
HStack.displayName = "HStack";
|
|
1632
1686
|
|
|
1633
1687
|
// src/components/Spinner/Spinner.tsx
|
|
1634
|
-
import { useId as useId2
|
|
1688
|
+
import { useId as useId2 } from "react";
|
|
1635
1689
|
|
|
1636
1690
|
// src/components/Spinner/Spinner.module.css
|
|
1637
1691
|
var Spinner_default = {
|
|
@@ -1755,12 +1809,6 @@ function Spinner(props) {
|
|
|
1755
1809
|
...rest
|
|
1756
1810
|
} = props;
|
|
1757
1811
|
const { t } = useTranslation();
|
|
1758
|
-
const mountTime = useRef6(Date.now());
|
|
1759
|
-
const animationDelay = -(mountTime.current % 1500);
|
|
1760
|
-
const styleVariables = {
|
|
1761
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1762
|
-
["--dds-spinner-animation-delay"]: animationDelay
|
|
1763
|
-
};
|
|
1764
1812
|
const generatedId = useId2();
|
|
1765
1813
|
const uniqueId = `${generatedId}-spinnerTitle`;
|
|
1766
1814
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1789,8 +1837,7 @@ function Spinner(props) {
|
|
|
1789
1837
|
cy: "12.25",
|
|
1790
1838
|
r: "6",
|
|
1791
1839
|
fill: getTextColor(color),
|
|
1792
|
-
className: Spinner_default.jordskifterett
|
|
1793
|
-
style: styleVariables
|
|
1840
|
+
className: Spinner_default.jordskifterett
|
|
1794
1841
|
}
|
|
1795
1842
|
),
|
|
1796
1843
|
/* @__PURE__ */ jsx16(
|
|
@@ -1801,8 +1848,7 @@ function Spinner(props) {
|
|
|
1801
1848
|
width: "16",
|
|
1802
1849
|
height: "4",
|
|
1803
1850
|
fill: getTextColor(color),
|
|
1804
|
-
className: Spinner_default.lagmannsrett
|
|
1805
|
-
style: styleVariables
|
|
1851
|
+
className: Spinner_default.lagmannsrett
|
|
1806
1852
|
}
|
|
1807
1853
|
),
|
|
1808
1854
|
/* @__PURE__ */ jsx16(
|
|
@@ -1810,8 +1856,7 @@ function Spinner(props) {
|
|
|
1810
1856
|
{
|
|
1811
1857
|
d: "M12 16.6154C16.4183 16.6154 20 12.7581 20 8H4C4 12.7581 7.58172 16.6154 12 16.6154Z",
|
|
1812
1858
|
fill: getTextColor(color),
|
|
1813
|
-
className: Spinner_default.tingrett
|
|
1814
|
-
style: styleVariables
|
|
1859
|
+
className: Spinner_default.tingrett
|
|
1815
1860
|
}
|
|
1816
1861
|
)
|
|
1817
1862
|
]
|
|
@@ -1910,22 +1955,6 @@ var HiddenInput = ({
|
|
|
1910
1955
|
...rest
|
|
1911
1956
|
}) => /* @__PURE__ */ jsx19("input", { className: cn(className, utilStyles_default["hide-input"]), ...rest });
|
|
1912
1957
|
|
|
1913
|
-
// src/components/helpers/ScreenSize/ScreenSize.utils.tsx
|
|
1914
|
-
var getLiteralScreenSize = (screenSize) => {
|
|
1915
|
-
switch (screenSize) {
|
|
1916
|
-
case 4 /* XLarge */:
|
|
1917
|
-
return "xl";
|
|
1918
|
-
case 3 /* Large */:
|
|
1919
|
-
return "lg";
|
|
1920
|
-
case 2 /* Medium */:
|
|
1921
|
-
return "md";
|
|
1922
|
-
case 1 /* Small */:
|
|
1923
|
-
return "sm";
|
|
1924
|
-
case 0 /* XSmall */:
|
|
1925
|
-
return "xs";
|
|
1926
|
-
}
|
|
1927
|
-
};
|
|
1928
|
-
|
|
1929
1958
|
// src/components/helpers/StylelessButton/StylelessButton.tsx
|
|
1930
1959
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1931
1960
|
var StylelessButton = ({
|
|
@@ -2192,6 +2221,7 @@ function SvgWrapper({
|
|
|
2192
2221
|
// destructure for å unngå at `iconState` blir sendt videre til svg-elementet som ugyldig custom attribute.
|
|
2193
2222
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2194
2223
|
iconState: _iconState,
|
|
2224
|
+
style,
|
|
2195
2225
|
...props
|
|
2196
2226
|
}) {
|
|
2197
2227
|
return /* @__PURE__ */ jsxs3(
|
|
@@ -2203,6 +2233,7 @@ function SvgWrapper({
|
|
|
2203
2233
|
viewBox: `0 0 ${size} ${size}`,
|
|
2204
2234
|
className: cn(className, Icon_default.svg),
|
|
2205
2235
|
style: {
|
|
2236
|
+
...style,
|
|
2206
2237
|
height: height ? height : sizeCSS,
|
|
2207
2238
|
width: width ? width : sizeCSS
|
|
2208
2239
|
},
|
|
@@ -3703,7 +3734,7 @@ import {
|
|
|
3703
3734
|
createContext as createContext3,
|
|
3704
3735
|
useContext as useContext3,
|
|
3705
3736
|
useEffect as useEffect12,
|
|
3706
|
-
useRef as
|
|
3737
|
+
useRef as useRef6,
|
|
3707
3738
|
useState as useState7
|
|
3708
3739
|
} from "react";
|
|
3709
3740
|
|
|
@@ -3723,7 +3754,7 @@ function ThemeProvider({
|
|
|
3723
3754
|
theme = defaultTheme,
|
|
3724
3755
|
children
|
|
3725
3756
|
}) {
|
|
3726
|
-
const themeRef =
|
|
3757
|
+
const themeRef = useRef6(null);
|
|
3727
3758
|
const [element, setElement] = useState7(null);
|
|
3728
3759
|
useEffect12(() => {
|
|
3729
3760
|
setElement(themeRef.current);
|
|
@@ -3764,8 +3795,7 @@ function DdsProvider({ language, theme, children }) {
|
|
|
3764
3795
|
var Accordion_default = {
|
|
3765
3796
|
container: "Accordion_container",
|
|
3766
3797
|
"header-button": "Accordion_header-button",
|
|
3767
|
-
chevron: "Accordion_chevron"
|
|
3768
|
-
body: "Accordion_body"
|
|
3798
|
+
chevron: "Accordion_chevron"
|
|
3769
3799
|
};
|
|
3770
3800
|
|
|
3771
3801
|
// src/components/Accordion/Accordion.tsx
|
|
@@ -4684,7 +4714,7 @@ var OverflowMenu = ({
|
|
|
4684
4714
|
OverflowMenu.displayName = "OverflowMenu";
|
|
4685
4715
|
|
|
4686
4716
|
// src/components/OverflowMenu/components/OverflowMenuButton.tsx
|
|
4687
|
-
import { useEffect as useEffect15, useRef as
|
|
4717
|
+
import { useEffect as useEffect15, useRef as useRef7, useState as useState9 } from "react";
|
|
4688
4718
|
import { jsx as jsx213 } from "react/jsx-runtime";
|
|
4689
4719
|
var OverflowMenuButton = ({
|
|
4690
4720
|
onClick,
|
|
@@ -4695,7 +4725,7 @@ var OverflowMenuButton = ({
|
|
|
4695
4725
|
ref,
|
|
4696
4726
|
...rest
|
|
4697
4727
|
}) => {
|
|
4698
|
-
const itemRef =
|
|
4728
|
+
const itemRef = useRef7(null);
|
|
4699
4729
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
4700
4730
|
const { onClose, registerItem, unregisterItem, focusedRef } = useOverflowMenuContext();
|
|
4701
4731
|
const [internalLoading, setInternalLoading] = useState9(false);
|
|
@@ -4740,14 +4770,14 @@ var OverflowMenuButton = ({
|
|
|
4740
4770
|
OverflowMenuButton.displayName = "OverflowMenuButton";
|
|
4741
4771
|
|
|
4742
4772
|
// src/components/OverflowMenu/components/OverflowMenuLink.tsx
|
|
4743
|
-
import { useEffect as useEffect16, useRef as
|
|
4773
|
+
import { useEffect as useEffect16, useRef as useRef8 } from "react";
|
|
4744
4774
|
import { jsx as jsx214 } from "react/jsx-runtime";
|
|
4745
4775
|
var OverflowMenuLink = ({
|
|
4746
4776
|
onClick,
|
|
4747
4777
|
ref,
|
|
4748
4778
|
...rest
|
|
4749
4779
|
}) => {
|
|
4750
|
-
const itemRef =
|
|
4780
|
+
const itemRef = useRef8(null);
|
|
4751
4781
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
4752
4782
|
const { onClose, registerItem, unregisterItem, focusedRef } = useOverflowMenuContext();
|
|
4753
4783
|
useEffect16(() => {
|
|
@@ -4772,7 +4802,7 @@ var OverflowMenuLink = ({
|
|
|
4772
4802
|
OverflowMenuLink.displayName = "OverflowMenuLink";
|
|
4773
4803
|
|
|
4774
4804
|
// src/components/OverflowMenu/components/OverflowMenuToggle.tsx
|
|
4775
|
-
import { useEffect as useEffect17, useRef as
|
|
4805
|
+
import { useEffect as useEffect17, useRef as useRef9 } from "react";
|
|
4776
4806
|
|
|
4777
4807
|
// src/components/Toggle/Toggle.tsx
|
|
4778
4808
|
import {
|
|
@@ -4936,7 +4966,7 @@ var OverflowMenuToggle = ({
|
|
|
4936
4966
|
ref,
|
|
4937
4967
|
...rest
|
|
4938
4968
|
}) => {
|
|
4939
|
-
const itemRef =
|
|
4969
|
+
const itemRef = useRef9(null);
|
|
4940
4970
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
4941
4971
|
const { registerItem, unregisterItem, focusedRef } = useOverflowMenuContext();
|
|
4942
4972
|
useEffect17(() => {
|
|
@@ -5034,7 +5064,7 @@ import {
|
|
|
5034
5064
|
cloneElement,
|
|
5035
5065
|
isValidElement,
|
|
5036
5066
|
useId as useId4,
|
|
5037
|
-
useRef as
|
|
5067
|
+
useRef as useRef10,
|
|
5038
5068
|
useState as useState10
|
|
5039
5069
|
} from "react";
|
|
5040
5070
|
import { jsx as jsx223 } from "react/jsx-runtime";
|
|
@@ -5058,10 +5088,10 @@ var OverflowMenuGroup = ({
|
|
|
5058
5088
|
const uniqueOverflowMenuId = overflowMenuId != null ? overflowMenuId : `${generatedId}-overflowMenu`;
|
|
5059
5089
|
const [floatOptions, setFloatOptions] = useState10();
|
|
5060
5090
|
const { refs, styles: positionStyles } = useFloatPosition(null, floatOptions);
|
|
5061
|
-
const buttonRef =
|
|
5091
|
+
const buttonRef = useRef10(null);
|
|
5062
5092
|
const anchorRef = refs.setReference;
|
|
5063
5093
|
const combinedAnchorRef = useCombinedRef(buttonRef, anchorRef);
|
|
5064
|
-
const menuRef =
|
|
5094
|
+
const menuRef = useRef10(null);
|
|
5065
5095
|
const floatingRef = refs.setFloating;
|
|
5066
5096
|
const combinedMenuRef = useCombinedRef(menuRef, floatingRef);
|
|
5067
5097
|
const handleClose = () => {
|
|
@@ -6426,7 +6456,7 @@ import { isToday } from "@internationalized/date";
|
|
|
6426
6456
|
import {
|
|
6427
6457
|
useCalendarCell
|
|
6428
6458
|
} from "@react-aria/calendar";
|
|
6429
|
-
import { useRef as
|
|
6459
|
+
import { useRef as useRef11 } from "react";
|
|
6430
6460
|
|
|
6431
6461
|
// src/components/date-inputs/common/DateInput.module.css
|
|
6432
6462
|
var DateInput_default = {
|
|
@@ -6467,7 +6497,7 @@ var timezone = "Europe/Oslo";
|
|
|
6467
6497
|
// src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
|
|
6468
6498
|
import { jsx as jsx242 } from "react/jsx-runtime";
|
|
6469
6499
|
function CalendarCell({ date, state, onClose }) {
|
|
6470
|
-
const ref =
|
|
6500
|
+
const ref = useRef11(null);
|
|
6471
6501
|
const {
|
|
6472
6502
|
buttonProps,
|
|
6473
6503
|
cellProps,
|
|
@@ -6555,7 +6585,7 @@ import {
|
|
|
6555
6585
|
createContext as createContext9,
|
|
6556
6586
|
useContext as useContext10,
|
|
6557
6587
|
useEffect as useEffect18,
|
|
6558
|
-
useRef as
|
|
6588
|
+
useRef as useRef12
|
|
6559
6589
|
} from "react";
|
|
6560
6590
|
import { createPortal as createPortal2 } from "react-dom";
|
|
6561
6591
|
import { Fragment as Fragment6, jsx as jsx243, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
@@ -6571,8 +6601,8 @@ var CalendarPopover = ({
|
|
|
6571
6601
|
onClose,
|
|
6572
6602
|
...props
|
|
6573
6603
|
}) => {
|
|
6574
|
-
const anchorRef =
|
|
6575
|
-
const closeButtonRef =
|
|
6604
|
+
const anchorRef = useRef12(null);
|
|
6605
|
+
const closeButtonRef = useRef12(null);
|
|
6576
6606
|
useOnKeyDown("Escape", onClose);
|
|
6577
6607
|
return /* @__PURE__ */ jsx243(
|
|
6578
6608
|
CalendarPopoverContext,
|
|
@@ -6593,14 +6623,14 @@ var CalendarPopoverContent = ({
|
|
|
6593
6623
|
className,
|
|
6594
6624
|
smallScreenBreakpoint
|
|
6595
6625
|
}) => {
|
|
6596
|
-
const ref =
|
|
6597
|
-
const modalRef =
|
|
6626
|
+
const ref = useRef12(null);
|
|
6627
|
+
const modalRef = useRef12(null);
|
|
6598
6628
|
const { refs, styles: floatingStyles } = useFloatPosition(null, {
|
|
6599
6629
|
placement: "bottom-start"
|
|
6600
6630
|
});
|
|
6601
6631
|
const themeContext = useContext10(ThemeContext);
|
|
6602
6632
|
if (!themeContext) {
|
|
6603
|
-
throw new Error("DatePicker must be used within a
|
|
6633
|
+
throw new Error("DatePicker must be used within a DdsProvider");
|
|
6604
6634
|
}
|
|
6605
6635
|
const portalTarget = themeContext.el;
|
|
6606
6636
|
const { t } = useTranslation();
|
|
@@ -6964,7 +6994,7 @@ var texts7 = createTexts({
|
|
|
6964
6994
|
import { useDatePicker } from "@react-aria/datepicker";
|
|
6965
6995
|
import { I18nProvider } from "@react-aria/i18n";
|
|
6966
6996
|
import { useDatePickerState } from "@react-stately/datepicker";
|
|
6967
|
-
import { useId as useId11, useRef as
|
|
6997
|
+
import { useId as useId11, useRef as useRef17 } from "react";
|
|
6968
6998
|
|
|
6969
6999
|
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
6970
7000
|
import {
|
|
@@ -6975,11 +7005,11 @@ import {
|
|
|
6975
7005
|
} from "@react-aria/datepicker";
|
|
6976
7006
|
import { useLocale as useLocale3 } from "@react-aria/i18n";
|
|
6977
7007
|
import { useDateFieldState } from "@react-stately/datepicker";
|
|
6978
|
-
import { useRef as
|
|
7008
|
+
import { useRef as useRef15 } from "react";
|
|
6979
7009
|
|
|
6980
7010
|
// src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
|
|
6981
7011
|
import { useButton } from "@react-aria/button";
|
|
6982
|
-
import { useRef as
|
|
7012
|
+
import { useRef as useRef13 } from "react";
|
|
6983
7013
|
|
|
6984
7014
|
// src/components/helpers/InlineIconButton/InlineIconButton.module.css
|
|
6985
7015
|
var InlineIconButton_default = {
|
|
@@ -7058,7 +7088,7 @@ function CalendarButton({
|
|
|
7058
7088
|
isReadOnly,
|
|
7059
7089
|
...props
|
|
7060
7090
|
}) {
|
|
7061
|
-
const ref =
|
|
7091
|
+
const ref = useRef13(null);
|
|
7062
7092
|
const { buttonProps } = useButton(props, ref);
|
|
7063
7093
|
return /* @__PURE__ */ jsx247(
|
|
7064
7094
|
InlineIconButton,
|
|
@@ -7139,7 +7169,7 @@ var texts8 = createTexts({
|
|
|
7139
7169
|
|
|
7140
7170
|
// src/components/date-inputs/DatePicker/DateField/DateSegment.tsx
|
|
7141
7171
|
import { useDateSegment } from "@react-aria/datepicker";
|
|
7142
|
-
import { useRef as
|
|
7172
|
+
import { useRef as useRef14 } from "react";
|
|
7143
7173
|
import { jsx as jsx248, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
7144
7174
|
function DateSegment({
|
|
7145
7175
|
segment,
|
|
@@ -7148,7 +7178,7 @@ function DateSegment({
|
|
|
7148
7178
|
errorMessageId,
|
|
7149
7179
|
tipId
|
|
7150
7180
|
}) {
|
|
7151
|
-
const ref =
|
|
7181
|
+
const ref = useRef14(null);
|
|
7152
7182
|
const { segmentProps } = useDateSegment(segment, state, ref);
|
|
7153
7183
|
return /* @__PURE__ */ jsxs91(
|
|
7154
7184
|
Box,
|
|
@@ -7391,7 +7421,7 @@ function DateField({
|
|
|
7391
7421
|
locale,
|
|
7392
7422
|
createCalendar: createCalendar2
|
|
7393
7423
|
});
|
|
7394
|
-
const internalRef =
|
|
7424
|
+
const internalRef = useRef15(null);
|
|
7395
7425
|
const { labelProps, fieldProps } = useDateField(props, state, internalRef);
|
|
7396
7426
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
7397
7427
|
const showClearButton = clearable && !disabled && !props.isReadOnly;
|
|
@@ -7468,9 +7498,9 @@ var texts9 = createTexts({
|
|
|
7468
7498
|
|
|
7469
7499
|
// src/components/date-inputs/utils/useFocusManagerRef.ts
|
|
7470
7500
|
import { createFocusManager } from "@react-aria/focus";
|
|
7471
|
-
import { useImperativeHandle, useRef as
|
|
7501
|
+
import { useImperativeHandle, useRef as useRef16 } from "react";
|
|
7472
7502
|
function useFocusManagerRef(ref) {
|
|
7473
|
-
const domRef =
|
|
7503
|
+
const domRef = useRef16(null);
|
|
7474
7504
|
useImperativeHandle(ref, () => ({
|
|
7475
7505
|
...createDOMRef(domRef),
|
|
7476
7506
|
focus() {
|
|
@@ -7511,7 +7541,7 @@ function DatePicker({
|
|
|
7511
7541
|
}
|
|
7512
7542
|
const state = useDatePickerState(props);
|
|
7513
7543
|
const domRef = useFocusManagerRef(ref && refIsFocusable(ref) ? ref : null);
|
|
7514
|
-
const internalRef =
|
|
7544
|
+
const internalRef = useRef17(null);
|
|
7515
7545
|
const combinedRef = useCombinedRef(internalRef, domRef);
|
|
7516
7546
|
const { buttonProps, calendarProps, fieldProps, groupProps } = useDatePicker(
|
|
7517
7547
|
{ ...props, granularity: "day" },
|
|
@@ -7559,7 +7589,7 @@ DatePicker.displayName = "DatePicker";
|
|
|
7559
7589
|
// src/components/date-inputs/TimePicker/TimePicker.tsx
|
|
7560
7590
|
import { useTimeField } from "@react-aria/datepicker";
|
|
7561
7591
|
import { useTimeFieldState } from "@react-stately/datepicker";
|
|
7562
|
-
import { useId as useId12, useRef as
|
|
7592
|
+
import { useId as useId12, useRef as useRef18 } from "react";
|
|
7563
7593
|
|
|
7564
7594
|
// src/components/date-inputs/TimePicker/TimePicker.utils.ts
|
|
7565
7595
|
function formatTimeSegments(segments) {
|
|
@@ -7602,7 +7632,7 @@ function TimePicker({
|
|
|
7602
7632
|
if (!lang) {
|
|
7603
7633
|
throw new Error("TimePicker must be used within a DdsProvider");
|
|
7604
7634
|
}
|
|
7605
|
-
const internalRef =
|
|
7635
|
+
const internalRef = useRef18(null);
|
|
7606
7636
|
const state = useTimeFieldState({
|
|
7607
7637
|
...props,
|
|
7608
7638
|
locale: LOCALE[lang]
|
|
@@ -7937,7 +7967,7 @@ DetailListTerm.displayName = "DetailListTerm";
|
|
|
7937
7967
|
import {
|
|
7938
7968
|
useContext as useContext16,
|
|
7939
7969
|
useEffect as useEffect19,
|
|
7940
|
-
useRef as
|
|
7970
|
+
useRef as useRef19
|
|
7941
7971
|
} from "react";
|
|
7942
7972
|
import { createPortal as createPortal3 } from "react-dom";
|
|
7943
7973
|
|
|
@@ -7981,7 +8011,7 @@ var Drawer = ({
|
|
|
7981
8011
|
}) => {
|
|
7982
8012
|
const themeContext = useContext16(ThemeContext);
|
|
7983
8013
|
if (!themeContext) {
|
|
7984
|
-
throw new Error("Drawer must be used within a
|
|
8014
|
+
throw new Error("Drawer must be used within a DdsProvider");
|
|
7985
8015
|
}
|
|
7986
8016
|
const { t } = useTranslation();
|
|
7987
8017
|
const portalTarget = parentElement != null ? parentElement : themeContext == null ? void 0 : themeContext.el;
|
|
@@ -8007,7 +8037,7 @@ var Drawer = ({
|
|
|
8007
8037
|
onClose == null ? void 0 : onClose();
|
|
8008
8038
|
}
|
|
8009
8039
|
});
|
|
8010
|
-
const backdropRef =
|
|
8040
|
+
const backdropRef = useRef19(null);
|
|
8011
8041
|
const onBackdropClick = (event) => {
|
|
8012
8042
|
if (event.target === backdropRef.current && isOpen && withBackdrop) {
|
|
8013
8043
|
onClose == null ? void 0 : onClose();
|
|
@@ -8117,7 +8147,7 @@ import {
|
|
|
8117
8147
|
cloneElement as cloneElement2,
|
|
8118
8148
|
isValidElement as isValidElement3,
|
|
8119
8149
|
useId as useId13,
|
|
8120
|
-
useRef as
|
|
8150
|
+
useRef as useRef20,
|
|
8121
8151
|
useState as useState13
|
|
8122
8152
|
} from "react";
|
|
8123
8153
|
import { jsx as jsx265 } from "react/jsx-runtime";
|
|
@@ -8137,7 +8167,7 @@ var DrawerGroup = ({
|
|
|
8137
8167
|
];
|
|
8138
8168
|
const generatedId = useId13();
|
|
8139
8169
|
const uniqueDrawerId = drawerId != null ? drawerId : `${generatedId}-drawer`;
|
|
8140
|
-
const triggerRef =
|
|
8170
|
+
const triggerRef = useRef20(null);
|
|
8141
8171
|
const open = () => setIsOpen(true);
|
|
8142
8172
|
const close = () => setIsOpen(false);
|
|
8143
8173
|
const handleOpen = () => {
|
|
@@ -8428,7 +8458,7 @@ var Feedback_default = {
|
|
|
8428
8458
|
import {
|
|
8429
8459
|
useEffect as useEffect20,
|
|
8430
8460
|
useId as useId16,
|
|
8431
|
-
useRef as
|
|
8461
|
+
useRef as useRef21,
|
|
8432
8462
|
useState as useState14
|
|
8433
8463
|
} from "react";
|
|
8434
8464
|
|
|
@@ -8509,7 +8539,7 @@ var TextArea = ({
|
|
|
8509
8539
|
}) => {
|
|
8510
8540
|
const generatedId = useId16();
|
|
8511
8541
|
const uniqueId = id != null ? id : `${generatedId}-textArea`;
|
|
8512
|
-
const textAreaRef =
|
|
8542
|
+
const textAreaRef = useRef21(null);
|
|
8513
8543
|
const multiRef = useCombinedRef(ref, textAreaRef);
|
|
8514
8544
|
const [text, setText] = useState14(getDefaultText(value, defaultValue));
|
|
8515
8545
|
useEffect20(() => {
|
|
@@ -8661,7 +8691,7 @@ import {
|
|
|
8661
8691
|
cloneElement as cloneElement3,
|
|
8662
8692
|
useEffect as useEffect21,
|
|
8663
8693
|
useId as useId17,
|
|
8664
|
-
useRef as
|
|
8694
|
+
useRef as useRef22,
|
|
8665
8695
|
useState as useState15
|
|
8666
8696
|
} from "react";
|
|
8667
8697
|
|
|
@@ -8696,7 +8726,7 @@ var Tooltip = ({
|
|
|
8696
8726
|
placement,
|
|
8697
8727
|
offset: 4
|
|
8698
8728
|
});
|
|
8699
|
-
const tooltipRef =
|
|
8729
|
+
const tooltipRef = useRef22(null);
|
|
8700
8730
|
const combinedRef = useCombinedRef(ref, refs.setFloating, tooltipRef);
|
|
8701
8731
|
const closeWhenNotInView = (entries) => {
|
|
8702
8732
|
const [entry] = entries;
|
|
@@ -9214,7 +9244,46 @@ var texts16 = createTexts({
|
|
|
9214
9244
|
import {
|
|
9215
9245
|
fromEvent as getFilesFromEvent
|
|
9216
9246
|
} from "file-selector";
|
|
9217
|
-
import { useCallback as useCallback6, useEffect as useEffect24, useMemo, useReducer, useRef as
|
|
9247
|
+
import { useCallback as useCallback6, useEffect as useEffect24, useMemo, useReducer, useRef as useRef23 } from "react";
|
|
9248
|
+
|
|
9249
|
+
// src/components/FileUploader/attr-accept.ts
|
|
9250
|
+
function isAccepted(file, acceptedFiles) {
|
|
9251
|
+
if (file && acceptedFiles) {
|
|
9252
|
+
const acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(",");
|
|
9253
|
+
const fileName = file.name || "";
|
|
9254
|
+
const mimeType = (file.type || "").toLowerCase();
|
|
9255
|
+
const baseMimeType = mimeType.split("/")[0] || "";
|
|
9256
|
+
return acceptedFilesArray.some((type) => {
|
|
9257
|
+
const validType = type.trim().toLowerCase();
|
|
9258
|
+
if (validType.charAt(0) === ".") {
|
|
9259
|
+
return fileName.toLowerCase().endsWith(validType);
|
|
9260
|
+
} else if (validType.endsWith("/*")) {
|
|
9261
|
+
return baseMimeType === validType.slice(0, -2);
|
|
9262
|
+
}
|
|
9263
|
+
return mimeType === validType;
|
|
9264
|
+
});
|
|
9265
|
+
}
|
|
9266
|
+
return true;
|
|
9267
|
+
}
|
|
9268
|
+
|
|
9269
|
+
// src/components/FileUploader/FileUploader.utils.ts
|
|
9270
|
+
var preventDefaults = (event) => {
|
|
9271
|
+
event.preventDefault();
|
|
9272
|
+
event.stopPropagation();
|
|
9273
|
+
};
|
|
9274
|
+
var isDragEvent = (event) => {
|
|
9275
|
+
const asDragEvent = event;
|
|
9276
|
+
return asDragEvent.dataTransfer !== void 0;
|
|
9277
|
+
};
|
|
9278
|
+
var isEventWithFiles = (event) => {
|
|
9279
|
+
if (!isDragEvent(event)) {
|
|
9280
|
+
return event.target.files !== null && event.target.files !== void 0;
|
|
9281
|
+
}
|
|
9282
|
+
return event.dataTransfer.types.includes("Files") || event.dataTransfer.types.includes("application/x-moz-file");
|
|
9283
|
+
};
|
|
9284
|
+
var isFileAccepted = (file, accept) => {
|
|
9285
|
+
return accept !== void 0 ? isAccepted(file, accept) : true;
|
|
9286
|
+
};
|
|
9218
9287
|
|
|
9219
9288
|
// src/components/FileUploader/fileUploaderReducer.ts
|
|
9220
9289
|
var fileUploaderReducer = (state, action) => {
|
|
@@ -9259,45 +9328,6 @@ var fileUploaderReducer = (state, action) => {
|
|
|
9259
9328
|
}
|
|
9260
9329
|
};
|
|
9261
9330
|
|
|
9262
|
-
// src/components/FileUploader/attr-accept.ts
|
|
9263
|
-
function isAccepted(file, acceptedFiles) {
|
|
9264
|
-
if (file && acceptedFiles) {
|
|
9265
|
-
const acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(",");
|
|
9266
|
-
const fileName = file.name || "";
|
|
9267
|
-
const mimeType = (file.type || "").toLowerCase();
|
|
9268
|
-
const baseMimeType = mimeType.split("/")[0] || "";
|
|
9269
|
-
return acceptedFilesArray.some((type) => {
|
|
9270
|
-
const validType = type.trim().toLowerCase();
|
|
9271
|
-
if (validType.charAt(0) === ".") {
|
|
9272
|
-
return fileName.toLowerCase().endsWith(validType);
|
|
9273
|
-
} else if (validType.endsWith("/*")) {
|
|
9274
|
-
return baseMimeType === validType.slice(0, -2);
|
|
9275
|
-
}
|
|
9276
|
-
return mimeType === validType;
|
|
9277
|
-
});
|
|
9278
|
-
}
|
|
9279
|
-
return true;
|
|
9280
|
-
}
|
|
9281
|
-
|
|
9282
|
-
// src/components/FileUploader/utils.ts
|
|
9283
|
-
var preventDefaults = (event) => {
|
|
9284
|
-
event.preventDefault();
|
|
9285
|
-
event.stopPropagation();
|
|
9286
|
-
};
|
|
9287
|
-
var isDragEvent = (event) => {
|
|
9288
|
-
const asDragEvent = event;
|
|
9289
|
-
return asDragEvent.dataTransfer !== void 0;
|
|
9290
|
-
};
|
|
9291
|
-
var isEventWithFiles = (event) => {
|
|
9292
|
-
if (!isDragEvent(event)) {
|
|
9293
|
-
return event.target.files !== null && event.target.files !== void 0;
|
|
9294
|
-
}
|
|
9295
|
-
return event.dataTransfer.types.includes("Files") || event.dataTransfer.types.includes("application/x-moz-file");
|
|
9296
|
-
};
|
|
9297
|
-
var isFileAccepted = (file, accept) => {
|
|
9298
|
-
return accept !== void 0 ? isAccepted(file, accept) : true;
|
|
9299
|
-
};
|
|
9300
|
-
|
|
9301
9331
|
// src/components/FileUploader/useFileUploader.ts
|
|
9302
9332
|
var calcRootErrors = (maxFilesErrorMessage, files, maxFiles, errorMessage) => {
|
|
9303
9333
|
const errors = [];
|
|
@@ -9322,9 +9352,9 @@ var useFileUploader = (props) => {
|
|
|
9322
9352
|
errorMessage
|
|
9323
9353
|
} = props;
|
|
9324
9354
|
const { t } = useTranslation();
|
|
9325
|
-
const rootRef =
|
|
9326
|
-
const inputRef =
|
|
9327
|
-
const buttonRef =
|
|
9355
|
+
const rootRef = useRef23(null);
|
|
9356
|
+
const inputRef = useRef23(null);
|
|
9357
|
+
const buttonRef = useRef23(null);
|
|
9328
9358
|
const isControlled = !!value;
|
|
9329
9359
|
const initialFileUploaderFiles = useMemo(
|
|
9330
9360
|
() => (initialFiles != null ? initialFiles : []).map((f) => {
|
|
@@ -10060,7 +10090,7 @@ var InlineButton = ({
|
|
|
10060
10090
|
);
|
|
10061
10091
|
|
|
10062
10092
|
// src/components/InlineEdit/InlineEditTextArea/InlineEditTextArea.tsx
|
|
10063
|
-
import { useRef as
|
|
10093
|
+
import { useRef as useRef25 } from "react";
|
|
10064
10094
|
|
|
10065
10095
|
// src/components/InlineEdit/InlineEdit.context.tsx
|
|
10066
10096
|
import {
|
|
@@ -10130,7 +10160,7 @@ var InlineEditContextProvider = (props) => {
|
|
|
10130
10160
|
InlineEditContextProvider.displayName = "InlineEditContextProvider";
|
|
10131
10161
|
|
|
10132
10162
|
// src/components/InlineEdit/InlineField.tsx
|
|
10133
|
-
import { useId as useId19, useRef as
|
|
10163
|
+
import { useId as useId19, useRef as useRef24 } from "react";
|
|
10134
10164
|
|
|
10135
10165
|
// src/components/InlineEdit/InlineEdit.module.css
|
|
10136
10166
|
var InlineEdit_default = {
|
|
@@ -10249,7 +10279,7 @@ function InlineField(props) {
|
|
|
10249
10279
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
10250
10280
|
const descId = derivativeIdGenerator(uniqueId, "desc");
|
|
10251
10281
|
const hasValue = !!value;
|
|
10252
|
-
const inputRef =
|
|
10282
|
+
const inputRef = useRef24(null);
|
|
10253
10283
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
10254
10284
|
const clearInput = () => {
|
|
10255
10285
|
const clearChangeEvent = createClearChangeEvent(uniqueId);
|
|
@@ -10363,7 +10393,7 @@ var InlineEditTextArea = ({
|
|
|
10363
10393
|
ref,
|
|
10364
10394
|
...rest
|
|
10365
10395
|
}) => {
|
|
10366
|
-
const textareaRef =
|
|
10396
|
+
const textareaRef = useRef25(null);
|
|
10367
10397
|
const combinedRef = useCombinedRef(ref, textareaRef);
|
|
10368
10398
|
return /* @__PURE__ */ jsx297(
|
|
10369
10399
|
InlineEditContextProvider,
|
|
@@ -10381,7 +10411,7 @@ var InlineEditTextArea = ({
|
|
|
10381
10411
|
};
|
|
10382
10412
|
|
|
10383
10413
|
// src/components/InlineEdit/InlineEditInput/InlineEditInput.tsx
|
|
10384
|
-
import { useRef as
|
|
10414
|
+
import { useRef as useRef26 } from "react";
|
|
10385
10415
|
import { jsx as jsx298 } from "react/jsx-runtime";
|
|
10386
10416
|
var InlineEditInput = ({
|
|
10387
10417
|
onSetValue,
|
|
@@ -10393,7 +10423,7 @@ var InlineEditInput = ({
|
|
|
10393
10423
|
ref,
|
|
10394
10424
|
...rest
|
|
10395
10425
|
}) => {
|
|
10396
|
-
const inputRef =
|
|
10426
|
+
const inputRef = useRef26(null);
|
|
10397
10427
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
10398
10428
|
return /* @__PURE__ */ jsx298(
|
|
10399
10429
|
InlineEditContextProvider,
|
|
@@ -10411,7 +10441,7 @@ var InlineEditInput = ({
|
|
|
10411
10441
|
};
|
|
10412
10442
|
|
|
10413
10443
|
// src/components/InlineEdit/InlineEditSelect/InlineEditSelect.tsx
|
|
10414
|
-
import { useRef as
|
|
10444
|
+
import { useRef as useRef27 } from "react";
|
|
10415
10445
|
import { jsx as jsx299 } from "react/jsx-runtime";
|
|
10416
10446
|
var InlineEditSelect = ({
|
|
10417
10447
|
onSetValue,
|
|
@@ -10423,7 +10453,7 @@ var InlineEditSelect = ({
|
|
|
10423
10453
|
ref,
|
|
10424
10454
|
...rest
|
|
10425
10455
|
}) => {
|
|
10426
|
-
const inputRef =
|
|
10456
|
+
const inputRef = useRef27(null);
|
|
10427
10457
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
10428
10458
|
return /* @__PURE__ */ jsx299(
|
|
10429
10459
|
InlineEditContextProvider,
|
|
@@ -10638,22 +10668,14 @@ import { useState as useState21 } from "react";
|
|
|
10638
10668
|
var LocalMessage_default = {
|
|
10639
10669
|
container: "LocalMessage_container",
|
|
10640
10670
|
"container--info": "LocalMessage_container--info",
|
|
10641
|
-
icon: "LocalMessage_icon",
|
|
10642
10671
|
"container--warning": "LocalMessage_container--warning",
|
|
10643
10672
|
"container--danger": "LocalMessage_container--danger",
|
|
10644
10673
|
"container--success": "LocalMessage_container--success",
|
|
10645
|
-
"container--tips": "LocalMessage_container--tips"
|
|
10646
|
-
"container--horisontal": "LocalMessage_container--horisontal",
|
|
10647
|
-
"container--horisontal--closable": "LocalMessage_container--horisontal--closable",
|
|
10648
|
-
"container--vertical": "LocalMessage_container--vertical",
|
|
10649
|
-
"container--vertical--closable": "LocalMessage_container--vertical--closable",
|
|
10650
|
-
container__text: "LocalMessage_container__text",
|
|
10651
|
-
container__icon: "LocalMessage_container__icon",
|
|
10652
|
-
container__button: "LocalMessage_container__button"
|
|
10674
|
+
"container--tips": "LocalMessage_container--tips"
|
|
10653
10675
|
};
|
|
10654
10676
|
|
|
10655
10677
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
10656
|
-
import {
|
|
10678
|
+
import { jsx as jsx302, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
10657
10679
|
var L_MESSAGE_PURPOSES = createPurposes(
|
|
10658
10680
|
"info",
|
|
10659
10681
|
"success",
|
|
@@ -10682,12 +10704,28 @@ var LocalMessage = ({
|
|
|
10682
10704
|
...rest
|
|
10683
10705
|
}) => {
|
|
10684
10706
|
const { t } = useTranslation();
|
|
10685
|
-
const [
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10689
|
-
|
|
10690
|
-
|
|
10707
|
+
const [isOpen, setOpen] = useState21(true);
|
|
10708
|
+
const gridLayout = closable ? `${layout}-closable` : layout;
|
|
10709
|
+
const containerGridTemplateStyles = {
|
|
10710
|
+
horisontal: {
|
|
10711
|
+
gridTemplateAreas: `"icon text"`,
|
|
10712
|
+
gridTemplateColumns: "min-content 1fr"
|
|
10713
|
+
},
|
|
10714
|
+
"horisontal-closable": {
|
|
10715
|
+
gridTemplateAreas: `"icon text close-btn"`,
|
|
10716
|
+
gridTemplateColumns: "min-content 1fr min-content"
|
|
10717
|
+
},
|
|
10718
|
+
vertical: {
|
|
10719
|
+
gridTemplateAreas: `"icon" "text"`,
|
|
10720
|
+
gridTemplateColumns: "1fr"
|
|
10721
|
+
},
|
|
10722
|
+
"vertical-closable": {
|
|
10723
|
+
gridTemplateAreas: `"icon close-btn" "text text"`,
|
|
10724
|
+
gridTemplateColumns: "1fr min-content"
|
|
10725
|
+
}
|
|
10726
|
+
};
|
|
10727
|
+
return isOpen ? /* @__PURE__ */ jsxs112(
|
|
10728
|
+
Grid,
|
|
10691
10729
|
{
|
|
10692
10730
|
...getBaseHTMLProps(
|
|
10693
10731
|
id,
|
|
@@ -10695,8 +10733,6 @@ var LocalMessage = ({
|
|
|
10695
10733
|
className,
|
|
10696
10734
|
typographyStyles_default["body-short-medium"],
|
|
10697
10735
|
LocalMessage_default.container,
|
|
10698
|
-
LocalMessage_default[`container--${layout}`],
|
|
10699
|
-
closable && LocalMessage_default[`container--${layout}--closable`],
|
|
10700
10736
|
LocalMessage_default[`container--${purpose}`]
|
|
10701
10737
|
),
|
|
10702
10738
|
style,
|
|
@@ -10704,36 +10740,41 @@ var LocalMessage = ({
|
|
|
10704
10740
|
rest
|
|
10705
10741
|
),
|
|
10706
10742
|
width,
|
|
10707
|
-
display: "grid",
|
|
10708
10743
|
padding: "x0.75 x0.75 x0.75 x0.5",
|
|
10709
|
-
|
|
10744
|
+
rowGap: "x0.5",
|
|
10745
|
+
columnGap: "x0.5",
|
|
10746
|
+
marginInline: "x0",
|
|
10747
|
+
...containerGridTemplateStyles[gridLayout],
|
|
10710
10748
|
children: [
|
|
10711
10749
|
/* @__PURE__ */ jsx302(
|
|
10712
|
-
|
|
10750
|
+
GridChild,
|
|
10713
10751
|
{
|
|
10752
|
+
as: Icon,
|
|
10753
|
+
gridArea: "icon",
|
|
10714
10754
|
iconSize: "component",
|
|
10715
10755
|
icon: icons2[purpose],
|
|
10716
|
-
|
|
10756
|
+
color: `var(--dds-color-icon-on-${purpose === "tips" ? "info" : purpose}-default)`
|
|
10717
10757
|
}
|
|
10718
10758
|
),
|
|
10719
|
-
/* @__PURE__ */ jsx302(
|
|
10759
|
+
/* @__PURE__ */ jsx302(GridChild, { gridArea: "text", children }),
|
|
10720
10760
|
closable && /* @__PURE__ */ jsx302(
|
|
10721
|
-
|
|
10761
|
+
GridChild,
|
|
10722
10762
|
{
|
|
10763
|
+
as: Button,
|
|
10764
|
+
gridArea: "close-btn",
|
|
10723
10765
|
icon: CloseIcon,
|
|
10724
10766
|
purpose: "tertiary",
|
|
10725
10767
|
onClick: () => {
|
|
10726
|
-
|
|
10768
|
+
setOpen(false);
|
|
10727
10769
|
onClose == null ? void 0 : onClose();
|
|
10728
10770
|
},
|
|
10729
10771
|
size: "xsmall",
|
|
10730
|
-
"aria-label": t(commonTexts.closeMessage)
|
|
10731
|
-
className: LocalMessage_default.container__button
|
|
10772
|
+
"aria-label": t(commonTexts.closeMessage)
|
|
10732
10773
|
}
|
|
10733
10774
|
)
|
|
10734
10775
|
]
|
|
10735
10776
|
}
|
|
10736
|
-
);
|
|
10777
|
+
) : null;
|
|
10737
10778
|
};
|
|
10738
10779
|
LocalMessage.displayName = "LocalMessage";
|
|
10739
10780
|
|
|
@@ -10742,7 +10783,7 @@ import {
|
|
|
10742
10783
|
useContext as useContext18,
|
|
10743
10784
|
useEffect as useEffect25,
|
|
10744
10785
|
useId as useId20,
|
|
10745
|
-
useRef as
|
|
10786
|
+
useRef as useRef28
|
|
10746
10787
|
} from "react";
|
|
10747
10788
|
import { createPortal as createPortal4 } from "react-dom";
|
|
10748
10789
|
|
|
@@ -10788,7 +10829,7 @@ var Modal = ({
|
|
|
10788
10829
|
};
|
|
10789
10830
|
const themeContext = useContext18(ThemeContext);
|
|
10790
10831
|
if (!themeContext) {
|
|
10791
|
-
throw new Error("Modal must be used within a
|
|
10832
|
+
throw new Error("Modal must be used within a DdsProvider");
|
|
10792
10833
|
}
|
|
10793
10834
|
const { t } = useTranslation();
|
|
10794
10835
|
const portalTarget = parentElement != null ? parentElement : themeContext == null ? void 0 : themeContext.el;
|
|
@@ -10800,7 +10841,7 @@ var Modal = ({
|
|
|
10800
10841
|
}
|
|
10801
10842
|
return () => handleElementWithBackdropUnmount(document.body);
|
|
10802
10843
|
}, [isOpen]);
|
|
10803
|
-
const backdropRef =
|
|
10844
|
+
const backdropRef = useRef28(null);
|
|
10804
10845
|
const onBackdropClick = (event) => {
|
|
10805
10846
|
if (event.target === backdropRef.current && isOpen) {
|
|
10806
10847
|
handleClose();
|
|
@@ -10926,7 +10967,7 @@ var NewsPopover_default = {
|
|
|
10926
10967
|
};
|
|
10927
10968
|
|
|
10928
10969
|
// src/components/NewsPopover/NewsPopover.tsx
|
|
10929
|
-
import { Fragment as
|
|
10970
|
+
import { Fragment as Fragment10, jsx as jsx306, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
10930
10971
|
var NewsPopover = ({
|
|
10931
10972
|
id,
|
|
10932
10973
|
className,
|
|
@@ -10988,7 +11029,7 @@ var NewsPopover = ({
|
|
|
10988
11029
|
});
|
|
10989
11030
|
useOnKeyDown("Escape", () => setIsOpen(false));
|
|
10990
11031
|
const isList = news.length > 1;
|
|
10991
|
-
const slideContent = (el, i) => /* @__PURE__ */ jsxs114(
|
|
11032
|
+
const slideContent = (el, i) => /* @__PURE__ */ jsxs114(Fragment10, { children: [
|
|
10992
11033
|
/* @__PURE__ */ jsxs114(
|
|
10993
11034
|
Paper,
|
|
10994
11035
|
{
|
|
@@ -11107,9 +11148,6 @@ import { useState as useState23 } from "react";
|
|
|
11107
11148
|
|
|
11108
11149
|
// src/components/Pagination/Pagination.module.css
|
|
11109
11150
|
var Pagination_default = {
|
|
11110
|
-
list: "Pagination_list",
|
|
11111
|
-
list__item: "Pagination_list__item",
|
|
11112
|
-
indicators: "Pagination_indicators",
|
|
11113
11151
|
"truncation-icon": "Pagination_truncation-icon"
|
|
11114
11152
|
};
|
|
11115
11153
|
|
|
@@ -11710,7 +11748,7 @@ function Select({
|
|
|
11710
11748
|
Select.displayName = "Select";
|
|
11711
11749
|
|
|
11712
11750
|
// src/components/Select/NativeSelect/NativeSelect.tsx
|
|
11713
|
-
import { useEffect as useEffect26, useId as useId22, useRef as
|
|
11751
|
+
import { useEffect as useEffect26, useId as useId22, useRef as useRef29, useState as useState22 } from "react";
|
|
11714
11752
|
|
|
11715
11753
|
// src/components/Select/NativeSelect/NativeSelect.module.css
|
|
11716
11754
|
var NativeSelect_default = {
|
|
@@ -11746,7 +11784,7 @@ var NativeSelect = ({
|
|
|
11746
11784
|
...rest
|
|
11747
11785
|
}) => {
|
|
11748
11786
|
const { t } = useTranslation();
|
|
11749
|
-
const selectRef =
|
|
11787
|
+
const selectRef = useRef29(null);
|
|
11750
11788
|
const [hasValue, setHasValue] = useState22(false);
|
|
11751
11789
|
useEffect26(() => {
|
|
11752
11790
|
var _a, _b;
|
|
@@ -11883,6 +11921,7 @@ var createSelectOptions = (...args) => args.map((v) => ({ label: v, value: v }))
|
|
|
11883
11921
|
|
|
11884
11922
|
// src/components/Pagination/Pagination.tsx
|
|
11885
11923
|
import { jsx as jsx310, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
11924
|
+
import { createElement as createElement3 } from "react";
|
|
11886
11925
|
var Pagination = ({
|
|
11887
11926
|
itemsAmount,
|
|
11888
11927
|
defaultItemsPerPage = 10,
|
|
@@ -11935,9 +11974,22 @@ var Pagination = ({
|
|
|
11935
11974
|
onSelectOptionChange(option);
|
|
11936
11975
|
}
|
|
11937
11976
|
};
|
|
11977
|
+
const listItemProps = {
|
|
11978
|
+
as: "li",
|
|
11979
|
+
display: "inline-grid",
|
|
11980
|
+
alignContent: "center"
|
|
11981
|
+
};
|
|
11982
|
+
const listProps = {
|
|
11983
|
+
as: "ol",
|
|
11984
|
+
defaultPageLayout: false,
|
|
11985
|
+
gridAutoFlow: "column",
|
|
11986
|
+
margin: "x0",
|
|
11987
|
+
padding: "x0",
|
|
11988
|
+
gap: "x0.75"
|
|
11989
|
+
};
|
|
11938
11990
|
const listItems = items.length > 0 ? items.map((item, i) => {
|
|
11939
11991
|
const isActive = item === activePage;
|
|
11940
|
-
return /* @__PURE__ */
|
|
11992
|
+
return /* @__PURE__ */ createElement3(Box, { ...listItemProps, key: `pagination-item-${i}` }, item !== "truncator" && typeof item === "number" ? /* @__PURE__ */ jsx310(
|
|
11941
11993
|
Button,
|
|
11942
11994
|
{
|
|
11943
11995
|
purpose: isActive ? "primary" : "secondary",
|
|
@@ -11954,7 +12006,7 @@ var Pagination = ({
|
|
|
11954
12006
|
icon: MoreHorizontalIcon,
|
|
11955
12007
|
className: Pagination_default["truncation-icon"]
|
|
11956
12008
|
}
|
|
11957
|
-
)
|
|
12009
|
+
));
|
|
11958
12010
|
}) : void 0;
|
|
11959
12011
|
const previousPageButton = /* @__PURE__ */ jsx310(
|
|
11960
12012
|
Button,
|
|
@@ -11995,125 +12047,97 @@ var Pagination = ({
|
|
|
11995
12047
|
...baseHTMLProps
|
|
11996
12048
|
},
|
|
11997
12049
|
children: [
|
|
11998
|
-
/* @__PURE__ */ jsxs118(
|
|
11999
|
-
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
12016
|
-
|
|
12017
|
-
|
|
12018
|
-
|
|
12050
|
+
/* @__PURE__ */ jsxs118(Grid, { ...listProps, hideBelow: smallScreenBreakpoint, children: [
|
|
12051
|
+
/* @__PURE__ */ jsx310(
|
|
12052
|
+
Box,
|
|
12053
|
+
{
|
|
12054
|
+
...listItemProps,
|
|
12055
|
+
className: isOnFirstPage ? utilStyles_default.invisible : void 0,
|
|
12056
|
+
"aria-hidden": isOnFirstPage,
|
|
12057
|
+
children: previousPageButton
|
|
12058
|
+
}
|
|
12059
|
+
),
|
|
12060
|
+
listItems,
|
|
12061
|
+
/* @__PURE__ */ jsx310(
|
|
12062
|
+
Box,
|
|
12063
|
+
{
|
|
12064
|
+
...listItemProps,
|
|
12065
|
+
className: isOnLastPage ? utilStyles_default.invisible : void 0,
|
|
12066
|
+
"aria-hidden": isOnLastPage,
|
|
12067
|
+
children: nextPageButton
|
|
12068
|
+
}
|
|
12069
|
+
)
|
|
12070
|
+
] }),
|
|
12071
|
+
!!smallScreenBreakpoint && /* @__PURE__ */ jsxs118(Grid, { ...listProps, showBelow: smallScreenBreakpoint, children: [
|
|
12072
|
+
/* @__PURE__ */ jsx310(
|
|
12073
|
+
Box,
|
|
12074
|
+
{
|
|
12075
|
+
...listItemProps,
|
|
12076
|
+
className: isOnFirstPage ? utilStyles_default.invisible : void 0,
|
|
12077
|
+
"aria-hidden": isOnFirstPage,
|
|
12078
|
+
children: /* @__PURE__ */ jsx310(
|
|
12079
|
+
Button,
|
|
12019
12080
|
{
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
)
|
|
12024
|
-
|
|
12025
|
-
|
|
12081
|
+
purpose: "secondary",
|
|
12082
|
+
size: "small",
|
|
12083
|
+
icon: ChevronFirstIcon,
|
|
12084
|
+
onClick: (event) => {
|
|
12085
|
+
onPageChange(event, 1);
|
|
12086
|
+
},
|
|
12087
|
+
"aria-label": t(texts22.firstPage)
|
|
12026
12088
|
}
|
|
12027
12089
|
)
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
|
|
12036
|
-
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
|
|
12057
|
-
|
|
12058
|
-
|
|
12059
|
-
|
|
12060
|
-
|
|
12061
|
-
|
|
12062
|
-
|
|
12063
|
-
|
|
12064
|
-
|
|
12065
|
-
isOnFirstPage && utilStyles_default.invisible
|
|
12066
|
-
),
|
|
12067
|
-
"aria-hidden": isOnFirstPage,
|
|
12068
|
-
children: previousPageButton
|
|
12069
|
-
}
|
|
12070
|
-
),
|
|
12071
|
-
/* @__PURE__ */ jsx310("li", { className: Pagination_default.list__item, children: /* @__PURE__ */ jsx310(
|
|
12090
|
+
}
|
|
12091
|
+
),
|
|
12092
|
+
/* @__PURE__ */ jsx310(
|
|
12093
|
+
Box,
|
|
12094
|
+
{
|
|
12095
|
+
...listItemProps,
|
|
12096
|
+
className: isOnFirstPage ? utilStyles_default.invisible : void 0,
|
|
12097
|
+
"aria-hidden": isOnFirstPage,
|
|
12098
|
+
children: previousPageButton
|
|
12099
|
+
}
|
|
12100
|
+
),
|
|
12101
|
+
/* @__PURE__ */ jsx310(Box, { ...listItemProps, children: /* @__PURE__ */ jsx310(
|
|
12102
|
+
Button,
|
|
12103
|
+
{
|
|
12104
|
+
size: "small",
|
|
12105
|
+
onClick: (event) => {
|
|
12106
|
+
onPageChange(event, activePage);
|
|
12107
|
+
},
|
|
12108
|
+
children: activePage
|
|
12109
|
+
}
|
|
12110
|
+
) }),
|
|
12111
|
+
/* @__PURE__ */ jsx310(
|
|
12112
|
+
Box,
|
|
12113
|
+
{
|
|
12114
|
+
...listItemProps,
|
|
12115
|
+
className: isOnLastPage ? utilStyles_default.invisible : void 0,
|
|
12116
|
+
"aria-hidden": isOnLastPage,
|
|
12117
|
+
children: nextPageButton
|
|
12118
|
+
}
|
|
12119
|
+
),
|
|
12120
|
+
/* @__PURE__ */ jsx310(
|
|
12121
|
+
Box,
|
|
12122
|
+
{
|
|
12123
|
+
...listItemProps,
|
|
12124
|
+
className: isOnLastPage ? utilStyles_default.invisible : void 0,
|
|
12125
|
+
"aria-hidden": isOnLastPage,
|
|
12126
|
+
children: /* @__PURE__ */ jsx310(
|
|
12072
12127
|
Button,
|
|
12073
12128
|
{
|
|
12129
|
+
purpose: "secondary",
|
|
12074
12130
|
size: "small",
|
|
12131
|
+
icon: ChevronLastIcon,
|
|
12075
12132
|
onClick: (event) => {
|
|
12076
|
-
onPageChange(event,
|
|
12133
|
+
onPageChange(event, pagesLength);
|
|
12077
12134
|
},
|
|
12078
|
-
|
|
12079
|
-
}
|
|
12080
|
-
) }),
|
|
12081
|
-
/* @__PURE__ */ jsx310(
|
|
12082
|
-
"li",
|
|
12083
|
-
{
|
|
12084
|
-
className: cn(
|
|
12085
|
-
Pagination_default.list__item,
|
|
12086
|
-
isOnLastPage && utilStyles_default.invisible
|
|
12087
|
-
),
|
|
12088
|
-
"aria-hidden": isOnLastPage,
|
|
12089
|
-
children: nextPageButton
|
|
12090
|
-
}
|
|
12091
|
-
),
|
|
12092
|
-
/* @__PURE__ */ jsx310(
|
|
12093
|
-
"li",
|
|
12094
|
-
{
|
|
12095
|
-
className: cn(
|
|
12096
|
-
Pagination_default.list__item,
|
|
12097
|
-
isOnLastPage && utilStyles_default.invisible
|
|
12098
|
-
),
|
|
12099
|
-
"aria-hidden": isOnLastPage,
|
|
12100
|
-
children: /* @__PURE__ */ jsx310(
|
|
12101
|
-
Button,
|
|
12102
|
-
{
|
|
12103
|
-
purpose: "secondary",
|
|
12104
|
-
size: "small",
|
|
12105
|
-
icon: ChevronLastIcon,
|
|
12106
|
-
onClick: (event) => {
|
|
12107
|
-
onPageChange(event, pagesLength);
|
|
12108
|
-
},
|
|
12109
|
-
"aria-label": t(texts22.lastPage)
|
|
12110
|
-
}
|
|
12111
|
-
)
|
|
12135
|
+
"aria-label": t(texts22.lastPage)
|
|
12112
12136
|
}
|
|
12113
12137
|
)
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
)
|
|
12138
|
+
}
|
|
12139
|
+
)
|
|
12140
|
+
] })
|
|
12117
12141
|
]
|
|
12118
12142
|
}
|
|
12119
12143
|
) : null;
|
|
@@ -12131,12 +12155,12 @@ var Pagination = ({
|
|
|
12131
12155
|
...baseHTMLProps,
|
|
12132
12156
|
children: [
|
|
12133
12157
|
/* @__PURE__ */ jsxs118(
|
|
12134
|
-
|
|
12158
|
+
Grid,
|
|
12135
12159
|
{
|
|
12136
|
-
|
|
12160
|
+
defaultPageLayout: false,
|
|
12137
12161
|
gap: "x0.5",
|
|
12138
12162
|
alignItems: "center",
|
|
12139
|
-
|
|
12163
|
+
gridAutoFlow: "column",
|
|
12140
12164
|
children: [
|
|
12141
12165
|
withSelect && /* @__PURE__ */ jsx310(
|
|
12142
12166
|
Select,
|
|
@@ -12220,7 +12244,7 @@ import {
|
|
|
12220
12244
|
useEffect as useEffect27,
|
|
12221
12245
|
useId as useId23,
|
|
12222
12246
|
useLayoutEffect as useLayoutEffect3,
|
|
12223
|
-
useRef as
|
|
12247
|
+
useRef as useRef30,
|
|
12224
12248
|
useState as useState24
|
|
12225
12249
|
} from "react";
|
|
12226
12250
|
|
|
@@ -12636,9 +12660,7 @@ var prioritizedCountryOptions = prioritizedCountries.map((country) => {
|
|
|
12636
12660
|
countryCode: country.id
|
|
12637
12661
|
};
|
|
12638
12662
|
});
|
|
12639
|
-
var
|
|
12640
|
-
COUNTRIES
|
|
12641
|
-
).sort((a, b) => {
|
|
12663
|
+
var compareCountriesByName = (a, b) => {
|
|
12642
12664
|
if (a.name < b.name) {
|
|
12643
12665
|
return -1;
|
|
12644
12666
|
}
|
|
@@ -12646,18 +12668,21 @@ var sortedCountryOptions = Object.values(
|
|
|
12646
12668
|
return 1;
|
|
12647
12669
|
}
|
|
12648
12670
|
return 0;
|
|
12649
|
-
}
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
(country) =>
|
|
12654
|
-
|
|
12655
|
-
|
|
12656
|
-
)
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
12671
|
+
};
|
|
12672
|
+
var createCountryOptions = (countries) => {
|
|
12673
|
+
const sortedCountryOptions = Object.values(
|
|
12674
|
+
countries
|
|
12675
|
+
).sort(compareCountriesByName).map((country) => ({
|
|
12676
|
+
countryCode: country.id,
|
|
12677
|
+
label: `${country.name} ${country.dialCode}`
|
|
12678
|
+
})).filter(
|
|
12679
|
+
(country) => !prioritizedCountryOptions.some(
|
|
12680
|
+
(pCountry) => pCountry.countryCode === country.countryCode
|
|
12681
|
+
)
|
|
12682
|
+
);
|
|
12683
|
+
return [...prioritizedCountryOptions, ...sortedCountryOptions];
|
|
12684
|
+
};
|
|
12685
|
+
var countryOptions = createCountryOptions(COUNTRIES);
|
|
12661
12686
|
var PhoneInput = ({
|
|
12662
12687
|
label,
|
|
12663
12688
|
readOnly,
|
|
@@ -12705,14 +12730,14 @@ var PhoneInput = ({
|
|
|
12705
12730
|
);
|
|
12706
12731
|
const isControlled = value !== void 0;
|
|
12707
12732
|
const [callingCodeWidth, setCallingCodeWidth] = useState24(0);
|
|
12708
|
-
const callingCodeRef =
|
|
12733
|
+
const callingCodeRef = useRef30(null);
|
|
12709
12734
|
useLayoutEffect3(() => {
|
|
12710
12735
|
if (callingCodeRef.current) {
|
|
12711
12736
|
setCallingCodeWidth(callingCodeRef.current.offsetWidth);
|
|
12712
12737
|
}
|
|
12713
12738
|
}, [callingCode]);
|
|
12714
12739
|
const callingCodeInlineStart = callingCodeWidth ? `calc(var(--dds-spacing-x1) + ${callingCodeWidth}px)` : void 0;
|
|
12715
|
-
const internalSelectRef =
|
|
12740
|
+
const internalSelectRef = useRef30(null);
|
|
12716
12741
|
const combinedSelectRef = useCombinedRef(selectRef, internalSelectRef);
|
|
12717
12742
|
const displayedValue = isControlled ? value : internalValue;
|
|
12718
12743
|
useEffect27(() => {
|
|
@@ -13061,7 +13086,7 @@ import {
|
|
|
13061
13086
|
cloneElement as cloneElement4,
|
|
13062
13087
|
isValidElement as isValidElement4,
|
|
13063
13088
|
useId as useId25,
|
|
13064
|
-
useRef as
|
|
13089
|
+
useRef as useRef31,
|
|
13065
13090
|
useState as useState25
|
|
13066
13091
|
} from "react";
|
|
13067
13092
|
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
@@ -13101,10 +13126,10 @@ var PopoverGroup = ({
|
|
|
13101
13126
|
handleOpen();
|
|
13102
13127
|
}
|
|
13103
13128
|
};
|
|
13104
|
-
const buttonRef =
|
|
13129
|
+
const buttonRef = useRef31(null);
|
|
13105
13130
|
const anchorRef = refs.setReference;
|
|
13106
13131
|
const combinedAnchorRef = useCombinedRef(buttonRef, anchorRef);
|
|
13107
|
-
const popoverRef =
|
|
13132
|
+
const popoverRef = useRef31(null);
|
|
13108
13133
|
const floatingRef = refs.setFloating;
|
|
13109
13134
|
const combinedPopoverRef = useCombinedRef(popoverRef, floatingRef);
|
|
13110
13135
|
useOnKeyDown(["Esc", "Escape"], () => {
|
|
@@ -13188,7 +13213,7 @@ var ProgressTracker_default = {
|
|
|
13188
13213
|
|
|
13189
13214
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
13190
13215
|
import { useMemo as useMemo2 } from "react";
|
|
13191
|
-
import { Fragment as
|
|
13216
|
+
import { Fragment as Fragment11, jsx as jsx314, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
13192
13217
|
var toItemState = (active, completed, disabled) => {
|
|
13193
13218
|
if (disabled) {
|
|
13194
13219
|
return "disabled";
|
|
@@ -13245,7 +13270,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
13245
13270
|
if (active) return "text-action-resting";
|
|
13246
13271
|
}
|
|
13247
13272
|
const isInactiveLink = disabled || active;
|
|
13248
|
-
const stepContent = /* @__PURE__ */ jsxs121(
|
|
13273
|
+
const stepContent = /* @__PURE__ */ jsxs121(Fragment11, { children: [
|
|
13249
13274
|
/* @__PURE__ */ jsx314(
|
|
13250
13275
|
Box,
|
|
13251
13276
|
{
|
|
@@ -13537,21 +13562,20 @@ var useAutocompleteSearch = () => {
|
|
|
13537
13562
|
|
|
13538
13563
|
// src/components/Search/Search.module.css
|
|
13539
13564
|
var Search_default = {
|
|
13540
|
-
"with-button-container": "Search_with-button-container",
|
|
13541
13565
|
input: "Search_input",
|
|
13542
13566
|
"clear-button": "Search_clear-button",
|
|
13543
13567
|
suggestions: "Search_suggestions"
|
|
13544
13568
|
};
|
|
13545
13569
|
|
|
13546
13570
|
// src/components/Search/SearchSuggestionItem.tsx
|
|
13547
|
-
import { useEffect as useEffect30, useRef as
|
|
13571
|
+
import { useEffect as useEffect30, useRef as useRef32 } from "react";
|
|
13548
13572
|
import { jsx as jsx317 } from "react/jsx-runtime";
|
|
13549
13573
|
var SearchSuggestionItem = ({
|
|
13550
13574
|
focus,
|
|
13551
13575
|
ref,
|
|
13552
13576
|
...rest
|
|
13553
13577
|
}) => {
|
|
13554
|
-
const itemRef =
|
|
13578
|
+
const itemRef = useRef32(null);
|
|
13555
13579
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
13556
13580
|
useEffect30(() => {
|
|
13557
13581
|
var _a;
|
|
@@ -13655,7 +13679,7 @@ var texts26 = createTexts({
|
|
|
13655
13679
|
});
|
|
13656
13680
|
|
|
13657
13681
|
// src/components/Search/Search.tsx
|
|
13658
|
-
import { Fragment as
|
|
13682
|
+
import { Fragment as Fragment12, jsx as jsx319, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
13659
13683
|
var Search = ({
|
|
13660
13684
|
componentSize = "medium",
|
|
13661
13685
|
buttonProps,
|
|
@@ -13755,7 +13779,7 @@ var Search = ({
|
|
|
13755
13779
|
)
|
|
13756
13780
|
}
|
|
13757
13781
|
),
|
|
13758
|
-
hasSuggestions && /* @__PURE__ */ jsxs124(
|
|
13782
|
+
hasSuggestions && /* @__PURE__ */ jsxs124(Fragment12, { children: [
|
|
13759
13783
|
/* @__PURE__ */ jsx319(
|
|
13760
13784
|
SearchSuggestions,
|
|
13761
13785
|
{
|
|
@@ -13786,11 +13810,10 @@ var Search = ({
|
|
|
13786
13810
|
showSearchButton ? /* @__PURE__ */ jsxs124(
|
|
13787
13811
|
Grid,
|
|
13788
13812
|
{
|
|
13813
|
+
defaultPageLayout: false,
|
|
13789
13814
|
className,
|
|
13790
13815
|
width,
|
|
13791
13816
|
columnGap: "x0.5",
|
|
13792
|
-
rowGap: "0",
|
|
13793
|
-
marginInline: "0",
|
|
13794
13817
|
gridTemplateColumns: "1fr auto",
|
|
13795
13818
|
style,
|
|
13796
13819
|
children: [
|
|
@@ -13839,7 +13862,7 @@ var texts27 = createTexts({
|
|
|
13839
13862
|
// src/components/Search/SearchAutocompleteWrapper.tsx
|
|
13840
13863
|
import {
|
|
13841
13864
|
useEffect as useEffect31,
|
|
13842
|
-
useRef as
|
|
13865
|
+
useRef as useRef33,
|
|
13843
13866
|
useState as useState28
|
|
13844
13867
|
} from "react";
|
|
13845
13868
|
import { jsx as jsx320 } from "react/jsx-runtime";
|
|
@@ -13903,8 +13926,8 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
13903
13926
|
const handleSetInputValue = (value2) => {
|
|
13904
13927
|
setInputValue(value2 != null ? value2 : "");
|
|
13905
13928
|
};
|
|
13906
|
-
const inputRef =
|
|
13907
|
-
const suggestionsRef =
|
|
13929
|
+
const inputRef = useRef33(null);
|
|
13930
|
+
const suggestionsRef = useRef33(null);
|
|
13908
13931
|
useOnClickOutside([inputRef, suggestionsRef], () => {
|
|
13909
13932
|
closeSuggestions();
|
|
13910
13933
|
});
|
|
@@ -14062,7 +14085,7 @@ var texts28 = createTexts({
|
|
|
14062
14085
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
14063
14086
|
import {
|
|
14064
14087
|
Children as Children4,
|
|
14065
|
-
Fragment as
|
|
14088
|
+
Fragment as Fragment13,
|
|
14066
14089
|
cloneElement as cloneElement6,
|
|
14067
14090
|
isValidElement as isValidElement6,
|
|
14068
14091
|
useEffect as useEffect33,
|
|
@@ -14256,7 +14279,7 @@ Table.displayName = "Table";
|
|
|
14256
14279
|
import {
|
|
14257
14280
|
useContext as useContext26,
|
|
14258
14281
|
useEffect as useEffect32,
|
|
14259
|
-
useRef as
|
|
14282
|
+
useRef as useRef34,
|
|
14260
14283
|
useState as useState30
|
|
14261
14284
|
} from "react";
|
|
14262
14285
|
import { jsx as jsx331 } from "react/jsx-runtime";
|
|
@@ -14269,7 +14292,7 @@ var TableWrapper = ({ className, ...rest }) => {
|
|
|
14269
14292
|
function isOverflowingX(event) {
|
|
14270
14293
|
return event.offsetWidth < event.scrollWidth;
|
|
14271
14294
|
}
|
|
14272
|
-
const wrapperRef =
|
|
14295
|
+
const wrapperRef = useRef34(null);
|
|
14273
14296
|
useEffect32(() => {
|
|
14274
14297
|
if ((wrapperRef == null ? void 0 : wrapperRef.current) && isOverflowingX(wrapperRef.current)) {
|
|
14275
14298
|
setOverflowX(true);
|
|
@@ -14311,7 +14334,7 @@ Table2.Row = Row;
|
|
|
14311
14334
|
Table2.Foot = Foot;
|
|
14312
14335
|
|
|
14313
14336
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
14314
|
-
import { Fragment as
|
|
14337
|
+
import { Fragment as Fragment14, jsx as jsx332, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
14315
14338
|
var CollapsibleRow = ({
|
|
14316
14339
|
type: _type,
|
|
14317
14340
|
className,
|
|
@@ -14354,7 +14377,7 @@ var CollapsibleRow = ({
|
|
|
14354
14377
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
14355
14378
|
const id = derivativeIdGenerator(prefix2, index.toString());
|
|
14356
14379
|
collapsibleIds.push(id);
|
|
14357
|
-
return /* @__PURE__ */ jsxs127(
|
|
14380
|
+
return /* @__PURE__ */ jsxs127(Fragment13, { children: [
|
|
14358
14381
|
/* @__PURE__ */ jsx332(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
14359
14382
|
isValidElement6(child) && cloneElement6(child, {
|
|
14360
14383
|
collapsibleProps: { isCollapsibleChild: true }
|
|
@@ -14367,7 +14390,7 @@ var CollapsibleRow = ({
|
|
|
14367
14390
|
});
|
|
14368
14391
|
const headerRow = () => {
|
|
14369
14392
|
if (type !== "head" || !isCollapsed) return null;
|
|
14370
|
-
return /* @__PURE__ */ jsx332(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs127(
|
|
14393
|
+
return /* @__PURE__ */ jsx332(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs127(Fragment14, { children: [
|
|
14371
14394
|
definingColumnCells,
|
|
14372
14395
|
/* @__PURE__ */ jsxs127(Table2.Cell, { type: "head", layout: "center", children: [
|
|
14373
14396
|
t(texts30.expand),
|
|
@@ -14400,9 +14423,9 @@ var CollapsibleRow = ({
|
|
|
14400
14423
|
) })
|
|
14401
14424
|
] });
|
|
14402
14425
|
};
|
|
14403
|
-
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs127(
|
|
14426
|
+
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs127(Fragment14, { children: [
|
|
14404
14427
|
headerRow(),
|
|
14405
|
-
type === "body" && /* @__PURE__ */ jsxs127(
|
|
14428
|
+
type === "body" && /* @__PURE__ */ jsxs127(Fragment14, { children: [
|
|
14406
14429
|
rowWithChevron(),
|
|
14407
14430
|
childrenCollapsed ? null : collapsedRows
|
|
14408
14431
|
] })
|
|
@@ -14453,7 +14476,7 @@ var CollapsibleTable2 = CollapsibleTable;
|
|
|
14453
14476
|
CollapsibleTable2.Row = CollapsibleRow;
|
|
14454
14477
|
|
|
14455
14478
|
// src/components/Tabs/AddTabButton.tsx
|
|
14456
|
-
import { useRef as
|
|
14479
|
+
import { useRef as useRef35 } from "react";
|
|
14457
14480
|
|
|
14458
14481
|
// src/components/Tabs/Tabs.context.tsx
|
|
14459
14482
|
import { createContext as createContext18, useContext as useContext27 } from "react";
|
|
@@ -14474,8 +14497,6 @@ var useTabsContext = () => useContext27(TabsContext);
|
|
|
14474
14497
|
// src/components/Tabs/Tabs.module.css
|
|
14475
14498
|
var Tabs_default = {
|
|
14476
14499
|
"tab-row": "Tabs_tab-row",
|
|
14477
|
-
"tab-row--standard-widths": "Tabs_tab-row--standard-widths",
|
|
14478
|
-
"tab-row--custom-widths": "Tabs_tab-row--custom-widths",
|
|
14479
14500
|
tab: "Tabs_tab",
|
|
14480
14501
|
"tab--active": "Tabs_tab--active",
|
|
14481
14502
|
"tab--medium--row": "Tabs_tab--medium--row",
|
|
@@ -14540,7 +14561,7 @@ var AddTabButton = ({
|
|
|
14540
14561
|
...rest
|
|
14541
14562
|
}) => {
|
|
14542
14563
|
useSetTabWidth(index, width);
|
|
14543
|
-
const buttonRef =
|
|
14564
|
+
const buttonRef = useRef35(null);
|
|
14544
14565
|
const combinedRef = useCombinedRef(ref, buttonRef);
|
|
14545
14566
|
const { tabContentDirection, size: size2 } = useTabsContext();
|
|
14546
14567
|
return /* @__PURE__ */ jsxs128(
|
|
@@ -14565,7 +14586,7 @@ var AddTabButton = ({
|
|
|
14565
14586
|
AddTabButton.displayName = "AddTabButton";
|
|
14566
14587
|
|
|
14567
14588
|
// src/components/Tabs/Tabs.tsx
|
|
14568
|
-
import { useEffect as useEffect34, useId as useId28, useRef as
|
|
14589
|
+
import { useEffect as useEffect34, useId as useId28, useRef as useRef36, useState as useState32 } from "react";
|
|
14569
14590
|
import { jsx as jsx336 } from "react/jsx-runtime";
|
|
14570
14591
|
var TABS_SIZES = createSizes("small", "medium");
|
|
14571
14592
|
var Tabs = ({
|
|
@@ -14586,8 +14607,8 @@ var Tabs = ({
|
|
|
14586
14607
|
const uniqueId = id != null ? id : `${generatedId}-tabs`;
|
|
14587
14608
|
const [thisActiveTab, setActiveTab] = useState32(activeTab != null ? activeTab : 0);
|
|
14588
14609
|
const [hasTabFocus, setHasTabFocus] = useState32(false);
|
|
14589
|
-
const tabListRef =
|
|
14590
|
-
const tabPanelsRef =
|
|
14610
|
+
const tabListRef = useRef36(null);
|
|
14611
|
+
const tabPanelsRef = useRef36(null);
|
|
14591
14612
|
const handleTabChange = (index) => {
|
|
14592
14613
|
setActiveTab(index);
|
|
14593
14614
|
onChange == null ? void 0 : onChange(index);
|
|
@@ -14629,7 +14650,7 @@ Tabs.displayName = "Tabs";
|
|
|
14629
14650
|
import {
|
|
14630
14651
|
useCallback as useCallback8,
|
|
14631
14652
|
useEffect as useEffect35,
|
|
14632
|
-
useRef as
|
|
14653
|
+
useRef as useRef37
|
|
14633
14654
|
} from "react";
|
|
14634
14655
|
import { jsx as jsx337, jsxs as jsxs129 } from "react/jsx-runtime";
|
|
14635
14656
|
var Tab = ({
|
|
@@ -14650,7 +14671,7 @@ var Tab = ({
|
|
|
14650
14671
|
...rest
|
|
14651
14672
|
}) => {
|
|
14652
14673
|
useSetTabWidth(index, width);
|
|
14653
|
-
const itemRef =
|
|
14674
|
+
const itemRef = useRef37(null);
|
|
14654
14675
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
14655
14676
|
const { tabContentDirection, size: size2 } = useTabsContext();
|
|
14656
14677
|
const { type = "button", ...restHtmlProps } = htmlProps;
|
|
@@ -14772,9 +14793,16 @@ var TabList = ({
|
|
|
14772
14793
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14773
14794
|
["--dds-tab-widths"]: widths.join(" ")
|
|
14774
14795
|
};
|
|
14796
|
+
const gridLayout = widths ? {
|
|
14797
|
+
gridTemplateColumns: "var(--dds-tab-widths)"
|
|
14798
|
+
} : {
|
|
14799
|
+
gridAutoColumns: "1fr",
|
|
14800
|
+
gridAutoFlow: "column"
|
|
14801
|
+
};
|
|
14775
14802
|
return /* @__PURE__ */ jsx338(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ jsxs130(
|
|
14776
|
-
|
|
14803
|
+
Grid,
|
|
14777
14804
|
{
|
|
14805
|
+
defaultPageLayout: false,
|
|
14778
14806
|
...rest,
|
|
14779
14807
|
ref: combinedRef,
|
|
14780
14808
|
role: "tablist",
|
|
@@ -14782,13 +14810,9 @@ var TabList = ({
|
|
|
14782
14810
|
tabIndex: 0,
|
|
14783
14811
|
onFocus: handleOnFocus,
|
|
14784
14812
|
onBlur: handleOnBlur,
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
|
|
14788
|
-
Tabs_default["tab-row--custom-widths"],
|
|
14789
|
-
focusable,
|
|
14790
|
-
scrollbar
|
|
14791
|
-
),
|
|
14813
|
+
overflowX: "auto",
|
|
14814
|
+
...gridLayout,
|
|
14815
|
+
className: cn(Tabs_default["tab-row"], focusable, scrollbar),
|
|
14792
14816
|
style: { ...style, ...customWidths },
|
|
14793
14817
|
children: [
|
|
14794
14818
|
tabListChildren,
|
|
@@ -14924,7 +14948,7 @@ var Tag = ({
|
|
|
14924
14948
|
Tag.displayName = "Tag";
|
|
14925
14949
|
|
|
14926
14950
|
// src/components/TextInput/TextInput.tsx
|
|
14927
|
-
import { useId as useId29, useLayoutEffect as useLayoutEffect5, useRef as
|
|
14951
|
+
import { useId as useId29, useLayoutEffect as useLayoutEffect5, useRef as useRef38, useState as useState34 } from "react";
|
|
14928
14952
|
|
|
14929
14953
|
// src/components/TextInput/TextInput.module.css
|
|
14930
14954
|
var TextInput_default = {
|
|
@@ -14968,8 +14992,8 @@ var TextInput = ({
|
|
|
14968
14992
|
...rest
|
|
14969
14993
|
}) => {
|
|
14970
14994
|
const [text, setText] = useState34(getDefaultText(value, defaultValue));
|
|
14971
|
-
const prefixRef =
|
|
14972
|
-
const suffixRef =
|
|
14995
|
+
const prefixRef = useRef38(null);
|
|
14996
|
+
const suffixRef = useRef38(null);
|
|
14973
14997
|
const [prefixLength, setPrefixLength] = useState34(0);
|
|
14974
14998
|
const [suffixLength, setSuffixLength] = useState34(0);
|
|
14975
14999
|
useLayoutEffect5(() => {
|
|
@@ -15178,15 +15202,6 @@ var ToggleBarContext = createContext20({
|
|
|
15178
15202
|
});
|
|
15179
15203
|
var useToggleBarContext = () => useContext29(ToggleBarContext);
|
|
15180
15204
|
|
|
15181
|
-
// src/components/ToggleBar/ToggleBar.module.css
|
|
15182
|
-
var ToggleBar_default = {
|
|
15183
|
-
bar: "ToggleBar_bar",
|
|
15184
|
-
content: "ToggleBar_content",
|
|
15185
|
-
label: "ToggleBar_label",
|
|
15186
|
-
"label--primary": "ToggleBar_label--primary",
|
|
15187
|
-
"label--secondary": "ToggleBar_label--secondary"
|
|
15188
|
-
};
|
|
15189
|
-
|
|
15190
15205
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
15191
15206
|
import { jsx as jsx343, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
15192
15207
|
var ToggleBar = (props) => {
|
|
@@ -15233,7 +15248,15 @@ var ToggleBar = (props) => {
|
|
|
15233
15248
|
"aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
|
|
15234
15249
|
children: [
|
|
15235
15250
|
label && /* @__PURE__ */ jsx343(Typography, { id: labelId, as: "span", typographyType: "labelMedium", children: label }),
|
|
15236
|
-
/* @__PURE__ */ jsx343(
|
|
15251
|
+
/* @__PURE__ */ jsx343(
|
|
15252
|
+
Grid,
|
|
15253
|
+
{
|
|
15254
|
+
defaultPageLayout: false,
|
|
15255
|
+
gridAutoFlow: "column",
|
|
15256
|
+
gridAutoColumns: "1fr",
|
|
15257
|
+
children
|
|
15258
|
+
}
|
|
15259
|
+
)
|
|
15237
15260
|
]
|
|
15238
15261
|
}
|
|
15239
15262
|
)
|
|
@@ -15244,6 +15267,16 @@ ToggleBar.displayName = "ToggleBar";
|
|
|
15244
15267
|
|
|
15245
15268
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
15246
15269
|
import { useId as useId31 } from "react";
|
|
15270
|
+
|
|
15271
|
+
// src/components/ToggleBar/ToggleBar.module.css
|
|
15272
|
+
var ToggleBar_default = {
|
|
15273
|
+
content: "ToggleBar_content",
|
|
15274
|
+
label: "ToggleBar_label",
|
|
15275
|
+
"label--primary": "ToggleBar_label--primary",
|
|
15276
|
+
"label--secondary": "ToggleBar_label--secondary"
|
|
15277
|
+
};
|
|
15278
|
+
|
|
15279
|
+
// src/components/ToggleBar/ToggleRadio.tsx
|
|
15247
15280
|
import { jsx as jsx344, jsxs as jsxs134 } from "react/jsx-runtime";
|
|
15248
15281
|
var calculateChecked = (value, group, checked) => {
|
|
15249
15282
|
if (typeof checked !== "undefined") return checked;
|
|
@@ -15769,7 +15802,6 @@ export {
|
|
|
15769
15802
|
ZoomOutIcon,
|
|
15770
15803
|
calendarDateToNativeDate,
|
|
15771
15804
|
cn,
|
|
15772
|
-
countryOptions,
|
|
15773
15805
|
createPurposes,
|
|
15774
15806
|
createSelectOptions,
|
|
15775
15807
|
createSizes,
|
|
@@ -15780,7 +15812,6 @@ export {
|
|
|
15780
15812
|
getBaseHTMLProps,
|
|
15781
15813
|
getColorCn,
|
|
15782
15814
|
getElementType,
|
|
15783
|
-
getLiteralScreenSize,
|
|
15784
15815
|
getTypographyCn,
|
|
15785
15816
|
handleElementWithBackdropMount,
|
|
15786
15817
|
handleElementWithBackdropUnmount,
|