@norges-domstoler/dds-components 23.1.3 → 23.2.1
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/README.md +50 -50
- package/dist/IBMPlexSans-Italic-5TWWGFM4.woff2 +0 -0
- package/dist/IBMPlexSans-Italic-HH2T6U4G.woff +0 -0
- package/dist/IBMPlexSans-Light-6JVLZATI.woff2 +0 -0
- package/dist/IBMPlexSans-Light-DJGXOPZM.woff +0 -0
- package/dist/IBMPlexSans-LightItalic-DGDYT5M4.woff +0 -0
- package/dist/IBMPlexSans-LightItalic-HGYKQIYJ.woff2 +0 -0
- package/dist/IBMPlexSans-Medium-F6RY5FT3.woff +0 -0
- package/dist/IBMPlexSans-Medium-GPYSN6WY.woff2 +0 -0
- package/dist/IBMPlexSans-MediumItalic-HYTLJOHM.woff +0 -0
- package/dist/IBMPlexSans-MediumItalic-NOK4NVHM.woff2 +0 -0
- package/dist/IBMPlexSans-Regular-7XP7CCD2.woff2 +0 -0
- package/dist/IBMPlexSans-Regular-7YEDMBFF.woff +0 -0
- package/dist/IBMPlexSans-SemiBold-6YAECOM6.woff +0 -0
- package/dist/IBMPlexSans-SemiBold-G57W7BEN.woff2 +0 -0
- package/dist/IBMPlexSans-SemiBoldItalic-4CLIFUGS.woff2 +0 -0
- package/dist/IBMPlexSans-SemiBoldItalic-IK6VH5Y5.woff +0 -0
- package/dist/index.css +176 -147
- 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 +450 -416
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +417 -381
- package/dist/index.mjs.map +1 -1
- package/package.json +96 -92
- package/LICENSE +0 -21
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();
|
|
@@ -6610,7 +6640,7 @@ var CalendarPopoverContent = ({
|
|
|
6610
6640
|
const hasTransitionedIn = useMountTransition(isOpen, 500);
|
|
6611
6641
|
const isMounted = isOpen && hasTransitionedIn;
|
|
6612
6642
|
const combinedRef = useCombinedRef(refs.setFloating, ref);
|
|
6613
|
-
useOnClickOutside([ref, modalRef], onClose);
|
|
6643
|
+
useOnClickOutside([ref, modalRef, anchorRef != null ? anchorRef : void 0], onClose);
|
|
6614
6644
|
useEffect18(() => {
|
|
6615
6645
|
var _a;
|
|
6616
6646
|
refs.setReference((_a = anchorRef == null ? void 0 : anchorRef.current) != null ? _a : null);
|
|
@@ -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,
|
|
@@ -7314,7 +7344,6 @@ function DateInput({
|
|
|
7314
7344
|
return /* @__PURE__ */ jsxs92(
|
|
7315
7345
|
"div",
|
|
7316
7346
|
{
|
|
7317
|
-
...groupProps,
|
|
7318
7347
|
className: cn(className, Input_default.container),
|
|
7319
7348
|
ref,
|
|
7320
7349
|
children: [
|
|
@@ -7340,6 +7369,12 @@ function DateInput({
|
|
|
7340
7369
|
"div",
|
|
7341
7370
|
{
|
|
7342
7371
|
...fieldProps,
|
|
7372
|
+
...groupProps,
|
|
7373
|
+
onKeyDown: (e) => {
|
|
7374
|
+
var _a, _b;
|
|
7375
|
+
(_a = fieldProps == null ? void 0 : fieldProps.onKeyDown) == null ? void 0 : _a.call(fieldProps, e);
|
|
7376
|
+
(_b = groupProps == null ? void 0 : groupProps.onKeyDown) == null ? void 0 : _b.call(groupProps, e);
|
|
7377
|
+
},
|
|
7343
7378
|
ref: internalRef,
|
|
7344
7379
|
className: cn(
|
|
7345
7380
|
Input_default.input,
|
|
@@ -7391,7 +7426,7 @@ function DateField({
|
|
|
7391
7426
|
locale,
|
|
7392
7427
|
createCalendar: createCalendar2
|
|
7393
7428
|
});
|
|
7394
|
-
const internalRef =
|
|
7429
|
+
const internalRef = useRef15(null);
|
|
7395
7430
|
const { labelProps, fieldProps } = useDateField(props, state, internalRef);
|
|
7396
7431
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
7397
7432
|
const showClearButton = clearable && !disabled && !props.isReadOnly;
|
|
@@ -7468,9 +7503,9 @@ var texts9 = createTexts({
|
|
|
7468
7503
|
|
|
7469
7504
|
// src/components/date-inputs/utils/useFocusManagerRef.ts
|
|
7470
7505
|
import { createFocusManager } from "@react-aria/focus";
|
|
7471
|
-
import { useImperativeHandle, useRef as
|
|
7506
|
+
import { useImperativeHandle, useRef as useRef16 } from "react";
|
|
7472
7507
|
function useFocusManagerRef(ref) {
|
|
7473
|
-
const domRef =
|
|
7508
|
+
const domRef = useRef16(null);
|
|
7474
7509
|
useImperativeHandle(ref, () => ({
|
|
7475
7510
|
...createDOMRef(domRef),
|
|
7476
7511
|
focus() {
|
|
@@ -7511,7 +7546,7 @@ function DatePicker({
|
|
|
7511
7546
|
}
|
|
7512
7547
|
const state = useDatePickerState(props);
|
|
7513
7548
|
const domRef = useFocusManagerRef(ref && refIsFocusable(ref) ? ref : null);
|
|
7514
|
-
const internalRef =
|
|
7549
|
+
const internalRef = useRef17(null);
|
|
7515
7550
|
const combinedRef = useCombinedRef(internalRef, domRef);
|
|
7516
7551
|
const { buttonProps, calendarProps, fieldProps, groupProps } = useDatePicker(
|
|
7517
7552
|
{ ...props, granularity: "day" },
|
|
@@ -7559,7 +7594,7 @@ DatePicker.displayName = "DatePicker";
|
|
|
7559
7594
|
// src/components/date-inputs/TimePicker/TimePicker.tsx
|
|
7560
7595
|
import { useTimeField } from "@react-aria/datepicker";
|
|
7561
7596
|
import { useTimeFieldState } from "@react-stately/datepicker";
|
|
7562
|
-
import { useId as useId12, useRef as
|
|
7597
|
+
import { useId as useId12, useRef as useRef18 } from "react";
|
|
7563
7598
|
|
|
7564
7599
|
// src/components/date-inputs/TimePicker/TimePicker.utils.ts
|
|
7565
7600
|
function formatTimeSegments(segments) {
|
|
@@ -7602,7 +7637,7 @@ function TimePicker({
|
|
|
7602
7637
|
if (!lang) {
|
|
7603
7638
|
throw new Error("TimePicker must be used within a DdsProvider");
|
|
7604
7639
|
}
|
|
7605
|
-
const internalRef =
|
|
7640
|
+
const internalRef = useRef18(null);
|
|
7606
7641
|
const state = useTimeFieldState({
|
|
7607
7642
|
...props,
|
|
7608
7643
|
locale: LOCALE[lang]
|
|
@@ -7937,7 +7972,7 @@ DetailListTerm.displayName = "DetailListTerm";
|
|
|
7937
7972
|
import {
|
|
7938
7973
|
useContext as useContext16,
|
|
7939
7974
|
useEffect as useEffect19,
|
|
7940
|
-
useRef as
|
|
7975
|
+
useRef as useRef19
|
|
7941
7976
|
} from "react";
|
|
7942
7977
|
import { createPortal as createPortal3 } from "react-dom";
|
|
7943
7978
|
|
|
@@ -7981,7 +8016,7 @@ var Drawer = ({
|
|
|
7981
8016
|
}) => {
|
|
7982
8017
|
const themeContext = useContext16(ThemeContext);
|
|
7983
8018
|
if (!themeContext) {
|
|
7984
|
-
throw new Error("Drawer must be used within a
|
|
8019
|
+
throw new Error("Drawer must be used within a DdsProvider");
|
|
7985
8020
|
}
|
|
7986
8021
|
const { t } = useTranslation();
|
|
7987
8022
|
const portalTarget = parentElement != null ? parentElement : themeContext == null ? void 0 : themeContext.el;
|
|
@@ -8007,7 +8042,7 @@ var Drawer = ({
|
|
|
8007
8042
|
onClose == null ? void 0 : onClose();
|
|
8008
8043
|
}
|
|
8009
8044
|
});
|
|
8010
|
-
const backdropRef =
|
|
8045
|
+
const backdropRef = useRef19(null);
|
|
8011
8046
|
const onBackdropClick = (event) => {
|
|
8012
8047
|
if (event.target === backdropRef.current && isOpen && withBackdrop) {
|
|
8013
8048
|
onClose == null ? void 0 : onClose();
|
|
@@ -8117,7 +8152,7 @@ import {
|
|
|
8117
8152
|
cloneElement as cloneElement2,
|
|
8118
8153
|
isValidElement as isValidElement3,
|
|
8119
8154
|
useId as useId13,
|
|
8120
|
-
useRef as
|
|
8155
|
+
useRef as useRef20,
|
|
8121
8156
|
useState as useState13
|
|
8122
8157
|
} from "react";
|
|
8123
8158
|
import { jsx as jsx265 } from "react/jsx-runtime";
|
|
@@ -8137,7 +8172,7 @@ var DrawerGroup = ({
|
|
|
8137
8172
|
];
|
|
8138
8173
|
const generatedId = useId13();
|
|
8139
8174
|
const uniqueDrawerId = drawerId != null ? drawerId : `${generatedId}-drawer`;
|
|
8140
|
-
const triggerRef =
|
|
8175
|
+
const triggerRef = useRef20(null);
|
|
8141
8176
|
const open = () => setIsOpen(true);
|
|
8142
8177
|
const close = () => setIsOpen(false);
|
|
8143
8178
|
const handleOpen = () => {
|
|
@@ -8428,7 +8463,7 @@ var Feedback_default = {
|
|
|
8428
8463
|
import {
|
|
8429
8464
|
useEffect as useEffect20,
|
|
8430
8465
|
useId as useId16,
|
|
8431
|
-
useRef as
|
|
8466
|
+
useRef as useRef21,
|
|
8432
8467
|
useState as useState14
|
|
8433
8468
|
} from "react";
|
|
8434
8469
|
|
|
@@ -8509,7 +8544,7 @@ var TextArea = ({
|
|
|
8509
8544
|
}) => {
|
|
8510
8545
|
const generatedId = useId16();
|
|
8511
8546
|
const uniqueId = id != null ? id : `${generatedId}-textArea`;
|
|
8512
|
-
const textAreaRef =
|
|
8547
|
+
const textAreaRef = useRef21(null);
|
|
8513
8548
|
const multiRef = useCombinedRef(ref, textAreaRef);
|
|
8514
8549
|
const [text, setText] = useState14(getDefaultText(value, defaultValue));
|
|
8515
8550
|
useEffect20(() => {
|
|
@@ -8661,7 +8696,7 @@ import {
|
|
|
8661
8696
|
cloneElement as cloneElement3,
|
|
8662
8697
|
useEffect as useEffect21,
|
|
8663
8698
|
useId as useId17,
|
|
8664
|
-
useRef as
|
|
8699
|
+
useRef as useRef22,
|
|
8665
8700
|
useState as useState15
|
|
8666
8701
|
} from "react";
|
|
8667
8702
|
|
|
@@ -8696,7 +8731,7 @@ var Tooltip = ({
|
|
|
8696
8731
|
placement,
|
|
8697
8732
|
offset: 4
|
|
8698
8733
|
});
|
|
8699
|
-
const tooltipRef =
|
|
8734
|
+
const tooltipRef = useRef22(null);
|
|
8700
8735
|
const combinedRef = useCombinedRef(ref, refs.setFloating, tooltipRef);
|
|
8701
8736
|
const closeWhenNotInView = (entries) => {
|
|
8702
8737
|
const [entry] = entries;
|
|
@@ -9214,7 +9249,46 @@ var texts16 = createTexts({
|
|
|
9214
9249
|
import {
|
|
9215
9250
|
fromEvent as getFilesFromEvent
|
|
9216
9251
|
} from "file-selector";
|
|
9217
|
-
import { useCallback as useCallback6, useEffect as useEffect24, useMemo, useReducer, useRef as
|
|
9252
|
+
import { useCallback as useCallback6, useEffect as useEffect24, useMemo, useReducer, useRef as useRef23 } from "react";
|
|
9253
|
+
|
|
9254
|
+
// src/components/FileUploader/attr-accept.ts
|
|
9255
|
+
function isAccepted(file, acceptedFiles) {
|
|
9256
|
+
if (file && acceptedFiles) {
|
|
9257
|
+
const acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(",");
|
|
9258
|
+
const fileName = file.name || "";
|
|
9259
|
+
const mimeType = (file.type || "").toLowerCase();
|
|
9260
|
+
const baseMimeType = mimeType.split("/")[0] || "";
|
|
9261
|
+
return acceptedFilesArray.some((type) => {
|
|
9262
|
+
const validType = type.trim().toLowerCase();
|
|
9263
|
+
if (validType.charAt(0) === ".") {
|
|
9264
|
+
return fileName.toLowerCase().endsWith(validType);
|
|
9265
|
+
} else if (validType.endsWith("/*")) {
|
|
9266
|
+
return baseMimeType === validType.slice(0, -2);
|
|
9267
|
+
}
|
|
9268
|
+
return mimeType === validType;
|
|
9269
|
+
});
|
|
9270
|
+
}
|
|
9271
|
+
return true;
|
|
9272
|
+
}
|
|
9273
|
+
|
|
9274
|
+
// src/components/FileUploader/FileUploader.utils.ts
|
|
9275
|
+
var preventDefaults = (event) => {
|
|
9276
|
+
event.preventDefault();
|
|
9277
|
+
event.stopPropagation();
|
|
9278
|
+
};
|
|
9279
|
+
var isDragEvent = (event) => {
|
|
9280
|
+
const asDragEvent = event;
|
|
9281
|
+
return asDragEvent.dataTransfer !== void 0;
|
|
9282
|
+
};
|
|
9283
|
+
var isEventWithFiles = (event) => {
|
|
9284
|
+
if (!isDragEvent(event)) {
|
|
9285
|
+
return event.target.files !== null && event.target.files !== void 0;
|
|
9286
|
+
}
|
|
9287
|
+
return event.dataTransfer.types.includes("Files") || event.dataTransfer.types.includes("application/x-moz-file");
|
|
9288
|
+
};
|
|
9289
|
+
var isFileAccepted = (file, accept) => {
|
|
9290
|
+
return accept !== void 0 ? isAccepted(file, accept) : true;
|
|
9291
|
+
};
|
|
9218
9292
|
|
|
9219
9293
|
// src/components/FileUploader/fileUploaderReducer.ts
|
|
9220
9294
|
var fileUploaderReducer = (state, action) => {
|
|
@@ -9259,45 +9333,6 @@ var fileUploaderReducer = (state, action) => {
|
|
|
9259
9333
|
}
|
|
9260
9334
|
};
|
|
9261
9335
|
|
|
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
9336
|
// src/components/FileUploader/useFileUploader.ts
|
|
9302
9337
|
var calcRootErrors = (maxFilesErrorMessage, files, maxFiles, errorMessage) => {
|
|
9303
9338
|
const errors = [];
|
|
@@ -9322,9 +9357,9 @@ var useFileUploader = (props) => {
|
|
|
9322
9357
|
errorMessage
|
|
9323
9358
|
} = props;
|
|
9324
9359
|
const { t } = useTranslation();
|
|
9325
|
-
const rootRef =
|
|
9326
|
-
const inputRef =
|
|
9327
|
-
const buttonRef =
|
|
9360
|
+
const rootRef = useRef23(null);
|
|
9361
|
+
const inputRef = useRef23(null);
|
|
9362
|
+
const buttonRef = useRef23(null);
|
|
9328
9363
|
const isControlled = !!value;
|
|
9329
9364
|
const initialFileUploaderFiles = useMemo(
|
|
9330
9365
|
() => (initialFiles != null ? initialFiles : []).map((f) => {
|
|
@@ -9797,7 +9832,7 @@ import { jsx as jsx284 } from "react/jsx-runtime";
|
|
|
9797
9832
|
var FooterListHeader = (props) => /* @__PURE__ */ jsx284(Heading, { level: 2, typographyType: "headingSmall", ...props });
|
|
9798
9833
|
|
|
9799
9834
|
// src/components/Footer/norges_domstoler_logo.svg
|
|
9800
|
-
var norges_domstoler_logo_default = 'data:image/svg+xml,<svg width="151" height="80" viewBox="0 0 151 80" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Logo" clip-path="url(%23clip0_18254_1882)">%0A<path id="Vector" d="M0 19.5721V0.38501H3.50998L9.51314 13.2128C10.169 14.6541 10.6734 16.1596 11.0182 17.7051H11.1848C10.9502 16.2655 10.8311 14.8093 10.8287 13.3507V0.38501H13.0174V19.5721H9.51314L3.50998 6.77306C2.84978 5.3389 2.34334 3.83883 1.99914 2.29798H1.83829C2.07013 3.73991 2.18921 5.19772 2.19446 6.65817V19.5721H0Z" fill="white"/>%0A<path id="Vector_2" d="M19.2848 17.4063C17.9942 15.7059 17.3489 13.2299 17.3489 9.97846C17.3489 6.72699 17.9942 4.25104 19.2848 2.55062C20.5716 0.850208 22.4118 0 24.8054 0C27.199 0 29.0488 0.844463 30.3548 2.53339C31.6416 4.25679 32.2907 6.70401 32.2907 10.0014C32.2907 13.2989 31.6416 15.7461 30.3548 17.4695C29.068 19.1929 27.2182 20.0029 24.8054 20.0029C22.3927 20.0029 20.5716 19.101 19.2848 17.4063ZM21.3357 4.05572C20.6003 5.31955 20.2308 7.29379 20.2269 9.97846C20.2231 12.6631 20.5927 14.6355 21.3357 15.8954C21.6776 16.4998 22.1813 16.9969 22.7902 17.3307C23.3991 17.6646 24.089 17.8221 24.7825 17.7854C25.4832 17.8288 26.182 17.6747 26.7994 17.3406C27.4169 17.0064 27.9282 16.5058 28.2752 15.8954C29.0143 14.6355 29.3858 12.6631 29.3897 9.97846C29.3935 7.29379 29.0297 5.31955 28.2982 4.05572C27.9502 3.44633 27.4387 2.9464 26.8215 2.61242C26.2042 2.27844 25.5059 2.12372 24.8054 2.16573C24.1083 2.12541 23.4138 2.28107 22.8006 2.6151C22.1874 2.94912 21.6799 3.44817 21.3357 4.05572Z" fill="white"/>%0A<path id="Vector_3" d="M48.594 15.5968C48.8111 16.9446 49.1318 18.2737 49.5534 19.5721H46.5317C46.4288 19.2619 46.3463 18.9453 46.2847 18.6243C46.21 18.2681 46.1238 17.7856 46.0376 17.1709C45.9515 16.5562 45.8825 16.1254 45.8423 15.8668C45.5513 13.9903 45.1415 12.7207 44.613 12.0581C44.0845 11.3956 43.2151 11.0681 42.0049 11.0758H39.1326V19.5721H36.4556V0.38501H43.0045C44.7968 0.38501 46.1813 0.815859 47.1693 1.6833C47.6677 2.13766 48.0592 2.69689 48.3154 3.32072C48.5717 3.94454 48.6865 4.61743 48.6515 5.29094C48.6898 5.93617 48.5867 6.58197 48.3496 7.18326C48.1125 7.78455 47.7469 8.32682 47.2785 8.7722C46.2192 9.64565 44.8691 10.0868 43.4985 10.0073H42.7287V10.1681L43.5272 10.1969C44.1017 10.2313 44.4866 10.2658 44.7566 10.2945C45.102 10.3329 45.4427 10.4061 45.7734 10.5128C46.1234 10.601 46.4442 10.7792 46.704 11.0298C46.968 11.3147 47.2064 11.6223 47.4164 11.949C47.7076 12.4082 47.9301 12.9075 48.077 13.4311C48.2551 14.0343 48.4332 14.7581 48.594 15.5968ZM39.167 9.09964H42.43C42.8862 9.13106 43.3441 9.06822 43.775 8.91503C44.2059 8.76184 44.6006 8.52159 44.9347 8.20922C45.241 7.86617 45.4755 7.4653 45.6245 7.03021C45.7734 6.59512 45.8338 6.13462 45.8021 5.67583C45.8021 3.48138 44.6781 2.38415 42.43 2.38415H39.167V9.09964Z" fill="white"/>%0A<path id="Vector_4" d="M63.8634 6.27892C63.8374 5.16647 63.448 4.0931 62.7547 3.22277C62.4351 2.8708 62.0419 2.59361 61.6031 2.41091C61.1642 2.22821 60.6904 2.14451 60.2155 2.16575C59.518 2.12433 58.8231 2.28288 58.2125 2.62276C57.6019 2.96264 57.1011 3.46974 56.7688 4.08447C56.0334 5.36744 55.6658 7.33211 55.6658 9.97848C55.6658 12.6248 56.0315 14.5933 56.763 15.884C57.0847 16.4915 57.5726 16.995 58.1697 17.3358C58.7668 17.6765 59.4484 17.8404 60.1351 17.8084C62.8581 17.8084 64.2196 15.974 64.2196 12.3051V11.6214H59.9168V9.64529H66.7415V19.572H64.5757V17.6246C64.5824 16.3521 64.6552 15.0808 64.794 13.8159H64.6274C64.4283 15.9338 63.9132 17.4867 63.0821 18.4748C62.2491 19.4629 61.0198 19.9512 59.3941 19.9512C58.4312 19.9882 57.4753 19.7741 56.6202 19.3299C55.7651 18.8857 55.0403 18.2268 54.5169 17.4178C53.3679 15.7289 52.7935 13.2759 52.7935 10.0589C52.7935 6.77296 53.4292 4.28361 54.7007 2.59086C55.9722 0.898101 57.8009 0.0344883 60.1868 2.04411e-05C61.7689 -0.0690547 63.3242 0.425623 64.5757 1.39597C65.1677 1.92295 65.6473 2.56392 65.9859 3.28052C66.3244 3.99712 66.515 4.77464 66.5461 5.56659L63.8634 6.27892Z" fill="white"/>%0A<path id="Vector_5" d="M74.824 17.5673H82.8034V19.5721H72.1125V0.38501H82.6368V2.38415H74.824V8.66305H82.0048V10.6622H74.824V17.5673Z" fill="white"/>%0A<path id="Vector_6" d="M93.0633 19.9512C90.9953 19.9512 89.3695 19.4342 88.1804 18.3887C87.5786 17.8382 87.1032 17.164 86.7869 16.4123C86.4705 15.6606 86.3207 14.8493 86.3478 14.0342L89.0421 13.2645C89.1876 16.3283 90.5491 17.8602 93.1265 17.8602C94.0518 17.9146 94.9669 17.6422 95.7116 17.0904C96.0388 16.8086 96.2951 16.4538 96.4598 16.0546C96.6245 15.6554 96.6929 15.2231 96.6595 14.7925C96.6595 13.3334 95.838 12.284 94.195 11.6445L91.0699 10.3806C88.4159 9.32362 87.0908 7.55236 87.0947 5.06684C87.054 4.35555 87.1815 3.64468 87.467 2.99192C87.7524 2.33915 88.1878 1.76287 88.7376 1.30984C90.0484 0.449859 91.5818 -0.00830078 93.1495 -0.00830078C94.7172 -0.00830078 96.2507 0.449859 97.5614 1.30984C98.139 1.77201 98.6034 2.36008 98.919 3.02914C99.2346 3.6982 99.3931 4.43055 99.3825 5.17024L96.7801 5.9113C96.6155 3.36451 95.4014 2.09302 93.138 2.09685C92.2848 2.02806 91.4347 2.26195 90.7368 2.75749C90.4435 3.00371 90.2126 3.31574 90.0629 3.66814C89.9131 4.02055 89.8488 4.40335 89.8751 4.78535C89.835 5.48253 90.0539 6.16994 90.4897 6.71555C91.0398 7.27423 91.7096 7.70051 92.4487 7.96214L95.3612 9.15703C98.042 10.2294 99.3825 12.0006 99.3825 14.4708C99.4281 15.2308 99.2996 15.9911 99.0069 16.694C98.7143 17.3968 98.2651 18.0236 97.6935 18.5266C96.602 19.4802 95.051 19.9512 93.0633 19.9512Z" fill="white"/>%0A<path id="Vector_7" d="M5.2104 35.4617C7.95251 35.4617 9.98037 36.308 11.294 38.0008C12.6076 39.6936 13.2644 42.045 13.2644 45.0552C13.2644 48.0884 12.6076 50.4456 11.294 52.1269C9.98037 53.8082 7.95251 54.6488 5.2104 54.6488H0V35.4617H5.2104ZM4.96338 52.6497C6.97401 52.6497 8.3757 52.0063 9.17995 50.7195C9.9842 49.4327 10.3863 47.5427 10.3863 45.0552C10.3863 42.5678 9.9842 40.6836 9.17995 39.3968C8.3757 38.11 6.97401 37.4666 4.96338 37.4666H2.71148V52.6497H4.96338Z" fill="white"/>%0A<path id="Vector_8" d="M18.5954 52.4831C17.3047 50.7903 16.6594 48.3144 16.6594 45.0552C16.6594 41.7961 17.3047 39.3202 18.5954 37.6274C19.8898 35.9308 21.732 35.0825 24.1217 35.0825C26.5115 35.0825 28.3613 35.927 29.6711 37.6159C30.954 39.3048 31.5955 41.7846 31.5955 45.0552C31.5955 48.3259 30.9521 50.8152 29.6653 52.5233C28.3823 54.1969 26.5364 55.0337 24.1275 55.0337C21.7185 55.0337 19.8745 54.1835 18.5954 52.4831ZM20.6807 39.1382C19.9147 40.3944 19.5317 42.3667 19.5317 45.0552C19.5317 47.7437 19.9147 49.718 20.6807 50.978C21.0254 51.5787 21.5302 52.0719 22.1388 52.4025C22.7474 52.7332 23.4359 52.8884 24.1275 52.8507C24.8279 52.8921 25.5259 52.7371 26.143 52.4031C26.7601 52.0692 27.2717 51.5697 27.6202 50.9607C28.3555 49.7084 28.7232 47.7399 28.7232 45.0552C28.7232 42.3706 28.3536 40.3982 27.6145 39.1382C27.2674 38.5293 26.7569 38.0296 26.1407 37.6956C25.5245 37.3616 24.8271 37.2067 24.1275 37.2483C23.434 37.2116 22.7441 37.3691 22.1352 37.703C21.5264 38.0368 21.0226 38.5339 20.6807 39.1382Z" fill="white"/>%0A<path id="Vector_9" d="M35.7661 54.6488V35.4617H39.7414L42.8148 46.1237C43.5024 48.2936 43.9079 50.5429 44.0212 52.8163H44.2337C44.2993 50.5424 44.6861 48.2893 45.3827 46.1237L48.5939 35.4617H52.2762V54.6488H49.6911V43.7684C49.6911 41.5223 49.7773 39.414 49.9382 37.4493H49.7486C49.4555 39.2625 49.0527 41.0562 48.5422 42.8206L45.0954 54.6603H42.6827L39.121 42.5965C38.6304 40.9144 38.2467 39.2029 37.9721 37.4723H37.7767C37.9261 39.2417 38.0008 41.2638 38.0008 43.5272V54.6488H35.7661Z" fill="white"/>%0A<path id="Vector_10" d="M63.2314 55.0338C61.171 55.0338 59.5452 54.513 58.3542 53.4713C57.7505 52.9221 57.2734 52.2482 56.9559 51.4963C56.6385 50.7444 56.4884 49.9325 56.5159 49.1168L59.1699 48.3471C59.3155 51.4109 60.6769 52.9428 63.2544 52.9428C64.1809 52.9928 65.0963 52.7208 65.8452 52.173C66.1703 51.8898 66.4248 51.5346 66.5883 51.1356C66.7519 50.7367 66.82 50.3051 66.7873 49.8751C66.7873 48.416 65.9659 47.3647 64.3229 46.7213L61.1978 45.4632C58.5476 44.3986 57.2225 42.6254 57.2225 40.1437C57.1827 39.4334 57.3107 38.7236 57.5962 38.0719C57.8816 37.4202 58.3164 36.8449 58.8655 36.3924C60.1497 35.4549 61.7185 34.9902 63.3061 35.0769C64.8757 35.0068 66.4227 35.4705 67.695 36.3924C68.2714 36.8566 68.7344 37.4461 69.0489 38.116C69.3635 38.7859 69.5213 39.5186 69.5103 40.2586L66.9022 40.9997C66.7414 38.4605 65.5273 37.1909 63.2601 37.1909C62.4071 37.1241 61.5576 37.3578 60.8589 37.8516C60.5656 38.0978 60.3347 38.4098 60.185 38.7622C60.0352 39.1146 59.9709 39.4974 59.9972 39.8794C59.9571 40.5766 60.176 41.264 60.6118 41.8096C61.1632 42.3762 61.8346 42.812 62.5765 43.085L65.535 44.2339C68.2158 45.3139 69.5563 47.0871 69.5563 49.5534C69.6008 50.3128 69.4725 51.0723 69.181 51.7748C68.8894 52.4773 68.4422 53.1045 67.8731 53.6092C66.7529 54.5743 65.2076 55.0338 63.2314 55.0338Z" fill="white"/>%0A<path id="Vector_11" d="M85.8997 35.4617V37.6274H80.6376V54.6488H77.9491V37.6274H72.687V35.4617H85.8997Z" fill="white"/>%0A<path id="Vector_12" d="M90.4092 52.4831C89.1148 50.7903 88.4675 48.3144 88.4675 45.0552C88.4675 41.7961 89.1128 39.3202 90.4035 37.6274C91.6903 35.9308 93.5305 35.0825 95.9241 35.0825C98.3177 35.0825 100.167 35.927 101.473 37.6159C102.76 39.3048 103.404 41.7942 103.404 45.084C103.404 48.3737 102.76 50.8631 101.473 52.552C100.19 54.2065 98.3445 55.0337 95.9356 55.0337C93.5267 55.0337 91.6845 54.1835 90.4092 52.4831ZM92.4888 39.1382C91.7228 40.3944 91.3399 42.3667 91.3399 45.0552C91.3399 47.7437 91.7228 49.718 92.4888 50.978C92.866 51.5576 93.382 52.034 93.9899 52.3637C94.5978 52.6934 95.2785 52.8661 95.97 52.8661C96.6616 52.8661 97.3423 52.6934 97.9502 52.3637C98.5581 52.034 99.0741 51.5576 99.4513 50.978C100.171 49.7141 100.531 47.7399 100.531 45.0552C100.531 42.3706 100.162 40.3982 99.4226 39.1382C99.0454 38.5586 98.5294 38.0823 97.9215 37.7525C97.3136 37.4228 96.6329 37.2501 95.9413 37.2501C95.2497 37.2501 94.5691 37.4228 93.9612 37.7525C93.3532 38.0823 92.8373 38.5586 92.4601 39.1382H92.4888Z" fill="white"/>%0A<path id="Vector_13" d="M107.58 35.4617H110.297V52.4831H117.915V54.6488H107.574L107.58 35.4617Z" fill="white"/>%0A<path id="Vector_14" d="M124.544 52.6497H132.518V54.6488H121.833V35.4617H132.357V37.4666H124.544V43.7397H131.725V45.7446H124.544V52.6497Z" fill="white"/>%0A<path id="Vector_15" d="M149.321 50.6735C149.534 52.022 149.855 53.3513 150.28 54.6488H147.264C147.163 54.3399 147.081 54.0253 147.017 53.7067C146.942 53.3505 146.862 52.8622 146.77 52.2533C146.678 51.6444 146.615 51.2078 146.581 50.9493C146.289 49.0688 145.878 47.7993 145.345 47.1405C144.817 46.4857 143.949 46.1525 142.743 46.1525H139.871V54.6488H137.154V35.4617H143.731C145.52 35.4617 146.908 35.8963 147.896 36.7657C148.392 37.2209 148.781 37.7807 149.034 38.4047C149.288 39.0286 149.399 39.701 149.361 40.3733C149.394 41.0129 149.289 41.6521 149.052 42.247C148.815 42.8419 148.452 43.3786 147.988 43.8201C146.93 44.6951 145.579 45.1365 144.208 45.0552H143.438V45.2218H144.231C144.805 45.2563 145.19 45.285 145.466 45.3137C145.811 45.3579 146.151 45.4309 146.483 45.532C146.833 45.6236 147.153 45.8036 147.413 46.0548C147.676 46.3411 147.914 46.6485 148.126 46.9739C148.422 47.451 148.645 47.97 148.786 48.5135C148.982 49.1167 149.154 49.8348 149.321 50.6735ZM139.894 44.1821H143.151C143.608 44.2136 144.067 44.1508 144.499 43.9976C144.931 43.8445 145.326 43.6042 145.661 43.2916C146.273 42.5923 146.583 41.6795 146.523 40.7525C146.523 38.5638 145.403 37.4666 143.151 37.4666H139.894V44.1821Z" fill="white"/>%0A<path id="Vector_16" d="M150.389 75.0137H0V80H150.389V75.0137Z" fill="white"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_18254_1882">%0A<rect width="150.389" height="80" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';
|
|
9835
|
+
var norges_domstoler_logo_default = 'data:image/svg+xml,<svg width="151" height="80" viewBox="0 0 151 80" fill="none" xmlns="http://www.w3.org/2000/svg">%0D%0A<g id="Logo" clip-path="url(%23clip0_18254_1882)">%0D%0A<path id="Vector" d="M0 19.5721V0.38501H3.50998L9.51314 13.2128C10.169 14.6541 10.6734 16.1596 11.0182 17.7051H11.1848C10.9502 16.2655 10.8311 14.8093 10.8287 13.3507V0.38501H13.0174V19.5721H9.51314L3.50998 6.77306C2.84978 5.3389 2.34334 3.83883 1.99914 2.29798H1.83829C2.07013 3.73991 2.18921 5.19772 2.19446 6.65817V19.5721H0Z" fill="white"/>%0D%0A<path id="Vector_2" d="M19.2848 17.4063C17.9942 15.7059 17.3489 13.2299 17.3489 9.97846C17.3489 6.72699 17.9942 4.25104 19.2848 2.55062C20.5716 0.850208 22.4118 0 24.8054 0C27.199 0 29.0488 0.844463 30.3548 2.53339C31.6416 4.25679 32.2907 6.70401 32.2907 10.0014C32.2907 13.2989 31.6416 15.7461 30.3548 17.4695C29.068 19.1929 27.2182 20.0029 24.8054 20.0029C22.3927 20.0029 20.5716 19.101 19.2848 17.4063ZM21.3357 4.05572C20.6003 5.31955 20.2308 7.29379 20.2269 9.97846C20.2231 12.6631 20.5927 14.6355 21.3357 15.8954C21.6776 16.4998 22.1813 16.9969 22.7902 17.3307C23.3991 17.6646 24.089 17.8221 24.7825 17.7854C25.4832 17.8288 26.182 17.6747 26.7994 17.3406C27.4169 17.0064 27.9282 16.5058 28.2752 15.8954C29.0143 14.6355 29.3858 12.6631 29.3897 9.97846C29.3935 7.29379 29.0297 5.31955 28.2982 4.05572C27.9502 3.44633 27.4387 2.9464 26.8215 2.61242C26.2042 2.27844 25.5059 2.12372 24.8054 2.16573C24.1083 2.12541 23.4138 2.28107 22.8006 2.6151C22.1874 2.94912 21.6799 3.44817 21.3357 4.05572Z" fill="white"/>%0D%0A<path id="Vector_3" d="M48.594 15.5968C48.8111 16.9446 49.1318 18.2737 49.5534 19.5721H46.5317C46.4288 19.2619 46.3463 18.9453 46.2847 18.6243C46.21 18.2681 46.1238 17.7856 46.0376 17.1709C45.9515 16.5562 45.8825 16.1254 45.8423 15.8668C45.5513 13.9903 45.1415 12.7207 44.613 12.0581C44.0845 11.3956 43.2151 11.0681 42.0049 11.0758H39.1326V19.5721H36.4556V0.38501H43.0045C44.7968 0.38501 46.1813 0.815859 47.1693 1.6833C47.6677 2.13766 48.0592 2.69689 48.3154 3.32072C48.5717 3.94454 48.6865 4.61743 48.6515 5.29094C48.6898 5.93617 48.5867 6.58197 48.3496 7.18326C48.1125 7.78455 47.7469 8.32682 47.2785 8.7722C46.2192 9.64565 44.8691 10.0868 43.4985 10.0073H42.7287V10.1681L43.5272 10.1969C44.1017 10.2313 44.4866 10.2658 44.7566 10.2945C45.102 10.3329 45.4427 10.4061 45.7734 10.5128C46.1234 10.601 46.4442 10.7792 46.704 11.0298C46.968 11.3147 47.2064 11.6223 47.4164 11.949C47.7076 12.4082 47.9301 12.9075 48.077 13.4311C48.2551 14.0343 48.4332 14.7581 48.594 15.5968ZM39.167 9.09964H42.43C42.8862 9.13106 43.3441 9.06822 43.775 8.91503C44.2059 8.76184 44.6006 8.52159 44.9347 8.20922C45.241 7.86617 45.4755 7.4653 45.6245 7.03021C45.7734 6.59512 45.8338 6.13462 45.8021 5.67583C45.8021 3.48138 44.6781 2.38415 42.43 2.38415H39.167V9.09964Z" fill="white"/>%0D%0A<path id="Vector_4" d="M63.8634 6.27892C63.8374 5.16647 63.448 4.0931 62.7547 3.22277C62.4351 2.8708 62.0419 2.59361 61.6031 2.41091C61.1642 2.22821 60.6904 2.14451 60.2155 2.16575C59.518 2.12433 58.8231 2.28288 58.2125 2.62276C57.6019 2.96264 57.1011 3.46974 56.7688 4.08447C56.0334 5.36744 55.6658 7.33211 55.6658 9.97848C55.6658 12.6248 56.0315 14.5933 56.763 15.884C57.0847 16.4915 57.5726 16.995 58.1697 17.3358C58.7668 17.6765 59.4484 17.8404 60.1351 17.8084C62.8581 17.8084 64.2196 15.974 64.2196 12.3051V11.6214H59.9168V9.64529H66.7415V19.572H64.5757V17.6246C64.5824 16.3521 64.6552 15.0808 64.794 13.8159H64.6274C64.4283 15.9338 63.9132 17.4867 63.0821 18.4748C62.2491 19.4629 61.0198 19.9512 59.3941 19.9512C58.4312 19.9882 57.4753 19.7741 56.6202 19.3299C55.7651 18.8857 55.0403 18.2268 54.5169 17.4178C53.3679 15.7289 52.7935 13.2759 52.7935 10.0589C52.7935 6.77296 53.4292 4.28361 54.7007 2.59086C55.9722 0.898101 57.8009 0.0344883 60.1868 2.04411e-05C61.7689 -0.0690547 63.3242 0.425623 64.5757 1.39597C65.1677 1.92295 65.6473 2.56392 65.9859 3.28052C66.3244 3.99712 66.515 4.77464 66.5461 5.56659L63.8634 6.27892Z" fill="white"/>%0D%0A<path id="Vector_5" d="M74.824 17.5673H82.8034V19.5721H72.1125V0.38501H82.6368V2.38415H74.824V8.66305H82.0048V10.6622H74.824V17.5673Z" fill="white"/>%0D%0A<path id="Vector_6" d="M93.0633 19.9512C90.9953 19.9512 89.3695 19.4342 88.1804 18.3887C87.5786 17.8382 87.1032 17.164 86.7869 16.4123C86.4705 15.6606 86.3207 14.8493 86.3478 14.0342L89.0421 13.2645C89.1876 16.3283 90.5491 17.8602 93.1265 17.8602C94.0518 17.9146 94.9669 17.6422 95.7116 17.0904C96.0388 16.8086 96.2951 16.4538 96.4598 16.0546C96.6245 15.6554 96.6929 15.2231 96.6595 14.7925C96.6595 13.3334 95.838 12.284 94.195 11.6445L91.0699 10.3806C88.4159 9.32362 87.0908 7.55236 87.0947 5.06684C87.054 4.35555 87.1815 3.64468 87.467 2.99192C87.7524 2.33915 88.1878 1.76287 88.7376 1.30984C90.0484 0.449859 91.5818 -0.00830078 93.1495 -0.00830078C94.7172 -0.00830078 96.2507 0.449859 97.5614 1.30984C98.139 1.77201 98.6034 2.36008 98.919 3.02914C99.2346 3.6982 99.3931 4.43055 99.3825 5.17024L96.7801 5.9113C96.6155 3.36451 95.4014 2.09302 93.138 2.09685C92.2848 2.02806 91.4347 2.26195 90.7368 2.75749C90.4435 3.00371 90.2126 3.31574 90.0629 3.66814C89.9131 4.02055 89.8488 4.40335 89.8751 4.78535C89.835 5.48253 90.0539 6.16994 90.4897 6.71555C91.0398 7.27423 91.7096 7.70051 92.4487 7.96214L95.3612 9.15703C98.042 10.2294 99.3825 12.0006 99.3825 14.4708C99.4281 15.2308 99.2996 15.9911 99.0069 16.694C98.7143 17.3968 98.2651 18.0236 97.6935 18.5266C96.602 19.4802 95.051 19.9512 93.0633 19.9512Z" fill="white"/>%0D%0A<path id="Vector_7" d="M5.2104 35.4617C7.95251 35.4617 9.98037 36.308 11.294 38.0008C12.6076 39.6936 13.2644 42.045 13.2644 45.0552C13.2644 48.0884 12.6076 50.4456 11.294 52.1269C9.98037 53.8082 7.95251 54.6488 5.2104 54.6488H0V35.4617H5.2104ZM4.96338 52.6497C6.97401 52.6497 8.3757 52.0063 9.17995 50.7195C9.9842 49.4327 10.3863 47.5427 10.3863 45.0552C10.3863 42.5678 9.9842 40.6836 9.17995 39.3968C8.3757 38.11 6.97401 37.4666 4.96338 37.4666H2.71148V52.6497H4.96338Z" fill="white"/>%0D%0A<path id="Vector_8" d="M18.5954 52.4831C17.3047 50.7903 16.6594 48.3144 16.6594 45.0552C16.6594 41.7961 17.3047 39.3202 18.5954 37.6274C19.8898 35.9308 21.732 35.0825 24.1217 35.0825C26.5115 35.0825 28.3613 35.927 29.6711 37.6159C30.954 39.3048 31.5955 41.7846 31.5955 45.0552C31.5955 48.3259 30.9521 50.8152 29.6653 52.5233C28.3823 54.1969 26.5364 55.0337 24.1275 55.0337C21.7185 55.0337 19.8745 54.1835 18.5954 52.4831ZM20.6807 39.1382C19.9147 40.3944 19.5317 42.3667 19.5317 45.0552C19.5317 47.7437 19.9147 49.718 20.6807 50.978C21.0254 51.5787 21.5302 52.0719 22.1388 52.4025C22.7474 52.7332 23.4359 52.8884 24.1275 52.8507C24.8279 52.8921 25.5259 52.7371 26.143 52.4031C26.7601 52.0692 27.2717 51.5697 27.6202 50.9607C28.3555 49.7084 28.7232 47.7399 28.7232 45.0552C28.7232 42.3706 28.3536 40.3982 27.6145 39.1382C27.2674 38.5293 26.7569 38.0296 26.1407 37.6956C25.5245 37.3616 24.8271 37.2067 24.1275 37.2483C23.434 37.2116 22.7441 37.3691 22.1352 37.703C21.5264 38.0368 21.0226 38.5339 20.6807 39.1382Z" fill="white"/>%0D%0A<path id="Vector_9" d="M35.7661 54.6488V35.4617H39.7414L42.8148 46.1237C43.5024 48.2936 43.9079 50.5429 44.0212 52.8163H44.2337C44.2993 50.5424 44.6861 48.2893 45.3827 46.1237L48.5939 35.4617H52.2762V54.6488H49.6911V43.7684C49.6911 41.5223 49.7773 39.414 49.9382 37.4493H49.7486C49.4555 39.2625 49.0527 41.0562 48.5422 42.8206L45.0954 54.6603H42.6827L39.121 42.5965C38.6304 40.9144 38.2467 39.2029 37.9721 37.4723H37.7767C37.9261 39.2417 38.0008 41.2638 38.0008 43.5272V54.6488H35.7661Z" fill="white"/>%0D%0A<path id="Vector_10" d="M63.2314 55.0338C61.171 55.0338 59.5452 54.513 58.3542 53.4713C57.7505 52.9221 57.2734 52.2482 56.9559 51.4963C56.6385 50.7444 56.4884 49.9325 56.5159 49.1168L59.1699 48.3471C59.3155 51.4109 60.6769 52.9428 63.2544 52.9428C64.1809 52.9928 65.0963 52.7208 65.8452 52.173C66.1703 51.8898 66.4248 51.5346 66.5883 51.1356C66.7519 50.7367 66.82 50.3051 66.7873 49.8751C66.7873 48.416 65.9659 47.3647 64.3229 46.7213L61.1978 45.4632C58.5476 44.3986 57.2225 42.6254 57.2225 40.1437C57.1827 39.4334 57.3107 38.7236 57.5962 38.0719C57.8816 37.4202 58.3164 36.8449 58.8655 36.3924C60.1497 35.4549 61.7185 34.9902 63.3061 35.0769C64.8757 35.0068 66.4227 35.4705 67.695 36.3924C68.2714 36.8566 68.7344 37.4461 69.0489 38.116C69.3635 38.7859 69.5213 39.5186 69.5103 40.2586L66.9022 40.9997C66.7414 38.4605 65.5273 37.1909 63.2601 37.1909C62.4071 37.1241 61.5576 37.3578 60.8589 37.8516C60.5656 38.0978 60.3347 38.4098 60.185 38.7622C60.0352 39.1146 59.9709 39.4974 59.9972 39.8794C59.9571 40.5766 60.176 41.264 60.6118 41.8096C61.1632 42.3762 61.8346 42.812 62.5765 43.085L65.535 44.2339C68.2158 45.3139 69.5563 47.0871 69.5563 49.5534C69.6008 50.3128 69.4725 51.0723 69.181 51.7748C68.8894 52.4773 68.4422 53.1045 67.8731 53.6092C66.7529 54.5743 65.2076 55.0338 63.2314 55.0338Z" fill="white"/>%0D%0A<path id="Vector_11" d="M85.8997 35.4617V37.6274H80.6376V54.6488H77.9491V37.6274H72.687V35.4617H85.8997Z" fill="white"/>%0D%0A<path id="Vector_12" d="M90.4092 52.4831C89.1148 50.7903 88.4675 48.3144 88.4675 45.0552C88.4675 41.7961 89.1128 39.3202 90.4035 37.6274C91.6903 35.9308 93.5305 35.0825 95.9241 35.0825C98.3177 35.0825 100.167 35.927 101.473 37.6159C102.76 39.3048 103.404 41.7942 103.404 45.084C103.404 48.3737 102.76 50.8631 101.473 52.552C100.19 54.2065 98.3445 55.0337 95.9356 55.0337C93.5267 55.0337 91.6845 54.1835 90.4092 52.4831ZM92.4888 39.1382C91.7228 40.3944 91.3399 42.3667 91.3399 45.0552C91.3399 47.7437 91.7228 49.718 92.4888 50.978C92.866 51.5576 93.382 52.034 93.9899 52.3637C94.5978 52.6934 95.2785 52.8661 95.97 52.8661C96.6616 52.8661 97.3423 52.6934 97.9502 52.3637C98.5581 52.034 99.0741 51.5576 99.4513 50.978C100.171 49.7141 100.531 47.7399 100.531 45.0552C100.531 42.3706 100.162 40.3982 99.4226 39.1382C99.0454 38.5586 98.5294 38.0823 97.9215 37.7525C97.3136 37.4228 96.6329 37.2501 95.9413 37.2501C95.2497 37.2501 94.5691 37.4228 93.9612 37.7525C93.3532 38.0823 92.8373 38.5586 92.4601 39.1382H92.4888Z" fill="white"/>%0D%0A<path id="Vector_13" d="M107.58 35.4617H110.297V52.4831H117.915V54.6488H107.574L107.58 35.4617Z" fill="white"/>%0D%0A<path id="Vector_14" d="M124.544 52.6497H132.518V54.6488H121.833V35.4617H132.357V37.4666H124.544V43.7397H131.725V45.7446H124.544V52.6497Z" fill="white"/>%0D%0A<path id="Vector_15" d="M149.321 50.6735C149.534 52.022 149.855 53.3513 150.28 54.6488H147.264C147.163 54.3399 147.081 54.0253 147.017 53.7067C146.942 53.3505 146.862 52.8622 146.77 52.2533C146.678 51.6444 146.615 51.2078 146.581 50.9493C146.289 49.0688 145.878 47.7993 145.345 47.1405C144.817 46.4857 143.949 46.1525 142.743 46.1525H139.871V54.6488H137.154V35.4617H143.731C145.52 35.4617 146.908 35.8963 147.896 36.7657C148.392 37.2209 148.781 37.7807 149.034 38.4047C149.288 39.0286 149.399 39.701 149.361 40.3733C149.394 41.0129 149.289 41.6521 149.052 42.247C148.815 42.8419 148.452 43.3786 147.988 43.8201C146.93 44.6951 145.579 45.1365 144.208 45.0552H143.438V45.2218H144.231C144.805 45.2563 145.19 45.285 145.466 45.3137C145.811 45.3579 146.151 45.4309 146.483 45.532C146.833 45.6236 147.153 45.8036 147.413 46.0548C147.676 46.3411 147.914 46.6485 148.126 46.9739C148.422 47.451 148.645 47.97 148.786 48.5135C148.982 49.1167 149.154 49.8348 149.321 50.6735ZM139.894 44.1821H143.151C143.608 44.2136 144.067 44.1508 144.499 43.9976C144.931 43.8445 145.326 43.6042 145.661 43.2916C146.273 42.5923 146.583 41.6795 146.523 40.7525C146.523 38.5638 145.403 37.4666 143.151 37.4666H139.894V44.1821Z" fill="white"/>%0D%0A<path id="Vector_16" d="M150.389 75.0137H0V80H150.389V75.0137Z" fill="white"/>%0D%0A</g>%0D%0A<defs>%0D%0A<clipPath id="clip0_18254_1882">%0D%0A<rect width="150.389" height="80" fill="white"/>%0D%0A</clipPath>%0D%0A</defs>%0D%0A</svg>%0D%0A';
|
|
9801
9836
|
|
|
9802
9837
|
// src/components/Footer/FooterLogo.tsx
|
|
9803
9838
|
import { jsx as jsx285 } from "react/jsx-runtime";
|
|
@@ -10060,7 +10095,7 @@ var InlineButton = ({
|
|
|
10060
10095
|
);
|
|
10061
10096
|
|
|
10062
10097
|
// src/components/InlineEdit/InlineEditTextArea/InlineEditTextArea.tsx
|
|
10063
|
-
import { useRef as
|
|
10098
|
+
import { useRef as useRef25 } from "react";
|
|
10064
10099
|
|
|
10065
10100
|
// src/components/InlineEdit/InlineEdit.context.tsx
|
|
10066
10101
|
import {
|
|
@@ -10130,7 +10165,7 @@ var InlineEditContextProvider = (props) => {
|
|
|
10130
10165
|
InlineEditContextProvider.displayName = "InlineEditContextProvider";
|
|
10131
10166
|
|
|
10132
10167
|
// src/components/InlineEdit/InlineField.tsx
|
|
10133
|
-
import { useId as useId19, useRef as
|
|
10168
|
+
import { useId as useId19, useRef as useRef24 } from "react";
|
|
10134
10169
|
|
|
10135
10170
|
// src/components/InlineEdit/InlineEdit.module.css
|
|
10136
10171
|
var InlineEdit_default = {
|
|
@@ -10249,7 +10284,7 @@ function InlineField(props) {
|
|
|
10249
10284
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
10250
10285
|
const descId = derivativeIdGenerator(uniqueId, "desc");
|
|
10251
10286
|
const hasValue = !!value;
|
|
10252
|
-
const inputRef =
|
|
10287
|
+
const inputRef = useRef24(null);
|
|
10253
10288
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
10254
10289
|
const clearInput = () => {
|
|
10255
10290
|
const clearChangeEvent = createClearChangeEvent(uniqueId);
|
|
@@ -10363,7 +10398,7 @@ var InlineEditTextArea = ({
|
|
|
10363
10398
|
ref,
|
|
10364
10399
|
...rest
|
|
10365
10400
|
}) => {
|
|
10366
|
-
const textareaRef =
|
|
10401
|
+
const textareaRef = useRef25(null);
|
|
10367
10402
|
const combinedRef = useCombinedRef(ref, textareaRef);
|
|
10368
10403
|
return /* @__PURE__ */ jsx297(
|
|
10369
10404
|
InlineEditContextProvider,
|
|
@@ -10381,7 +10416,7 @@ var InlineEditTextArea = ({
|
|
|
10381
10416
|
};
|
|
10382
10417
|
|
|
10383
10418
|
// src/components/InlineEdit/InlineEditInput/InlineEditInput.tsx
|
|
10384
|
-
import { useRef as
|
|
10419
|
+
import { useRef as useRef26 } from "react";
|
|
10385
10420
|
import { jsx as jsx298 } from "react/jsx-runtime";
|
|
10386
10421
|
var InlineEditInput = ({
|
|
10387
10422
|
onSetValue,
|
|
@@ -10393,7 +10428,7 @@ var InlineEditInput = ({
|
|
|
10393
10428
|
ref,
|
|
10394
10429
|
...rest
|
|
10395
10430
|
}) => {
|
|
10396
|
-
const inputRef =
|
|
10431
|
+
const inputRef = useRef26(null);
|
|
10397
10432
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
10398
10433
|
return /* @__PURE__ */ jsx298(
|
|
10399
10434
|
InlineEditContextProvider,
|
|
@@ -10411,7 +10446,7 @@ var InlineEditInput = ({
|
|
|
10411
10446
|
};
|
|
10412
10447
|
|
|
10413
10448
|
// src/components/InlineEdit/InlineEditSelect/InlineEditSelect.tsx
|
|
10414
|
-
import { useRef as
|
|
10449
|
+
import { useRef as useRef27 } from "react";
|
|
10415
10450
|
import { jsx as jsx299 } from "react/jsx-runtime";
|
|
10416
10451
|
var InlineEditSelect = ({
|
|
10417
10452
|
onSetValue,
|
|
@@ -10423,7 +10458,7 @@ var InlineEditSelect = ({
|
|
|
10423
10458
|
ref,
|
|
10424
10459
|
...rest
|
|
10425
10460
|
}) => {
|
|
10426
|
-
const inputRef =
|
|
10461
|
+
const inputRef = useRef27(null);
|
|
10427
10462
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
10428
10463
|
return /* @__PURE__ */ jsx299(
|
|
10429
10464
|
InlineEditContextProvider,
|
|
@@ -10638,22 +10673,14 @@ import { useState as useState21 } from "react";
|
|
|
10638
10673
|
var LocalMessage_default = {
|
|
10639
10674
|
container: "LocalMessage_container",
|
|
10640
10675
|
"container--info": "LocalMessage_container--info",
|
|
10641
|
-
icon: "LocalMessage_icon",
|
|
10642
10676
|
"container--warning": "LocalMessage_container--warning",
|
|
10643
10677
|
"container--danger": "LocalMessage_container--danger",
|
|
10644
10678
|
"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"
|
|
10679
|
+
"container--tips": "LocalMessage_container--tips"
|
|
10653
10680
|
};
|
|
10654
10681
|
|
|
10655
10682
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
10656
|
-
import {
|
|
10683
|
+
import { jsx as jsx302, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
10657
10684
|
var L_MESSAGE_PURPOSES = createPurposes(
|
|
10658
10685
|
"info",
|
|
10659
10686
|
"success",
|
|
@@ -10682,12 +10709,28 @@ var LocalMessage = ({
|
|
|
10682
10709
|
...rest
|
|
10683
10710
|
}) => {
|
|
10684
10711
|
const { t } = useTranslation();
|
|
10685
|
-
const [
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10689
|
-
|
|
10690
|
-
|
|
10712
|
+
const [isOpen, setOpen] = useState21(true);
|
|
10713
|
+
const gridLayout = closable ? `${layout}-closable` : layout;
|
|
10714
|
+
const containerGridTemplateStyles = {
|
|
10715
|
+
horisontal: {
|
|
10716
|
+
gridTemplateAreas: `"icon text"`,
|
|
10717
|
+
gridTemplateColumns: "min-content 1fr"
|
|
10718
|
+
},
|
|
10719
|
+
"horisontal-closable": {
|
|
10720
|
+
gridTemplateAreas: `"icon text close-btn"`,
|
|
10721
|
+
gridTemplateColumns: "min-content 1fr min-content"
|
|
10722
|
+
},
|
|
10723
|
+
vertical: {
|
|
10724
|
+
gridTemplateAreas: `"icon" "text"`,
|
|
10725
|
+
gridTemplateColumns: "1fr"
|
|
10726
|
+
},
|
|
10727
|
+
"vertical-closable": {
|
|
10728
|
+
gridTemplateAreas: `"icon close-btn" "text text"`,
|
|
10729
|
+
gridTemplateColumns: "1fr min-content"
|
|
10730
|
+
}
|
|
10731
|
+
};
|
|
10732
|
+
return isOpen ? /* @__PURE__ */ jsxs112(
|
|
10733
|
+
Grid,
|
|
10691
10734
|
{
|
|
10692
10735
|
...getBaseHTMLProps(
|
|
10693
10736
|
id,
|
|
@@ -10695,8 +10738,6 @@ var LocalMessage = ({
|
|
|
10695
10738
|
className,
|
|
10696
10739
|
typographyStyles_default["body-short-medium"],
|
|
10697
10740
|
LocalMessage_default.container,
|
|
10698
|
-
LocalMessage_default[`container--${layout}`],
|
|
10699
|
-
closable && LocalMessage_default[`container--${layout}--closable`],
|
|
10700
10741
|
LocalMessage_default[`container--${purpose}`]
|
|
10701
10742
|
),
|
|
10702
10743
|
style,
|
|
@@ -10704,36 +10745,41 @@ var LocalMessage = ({
|
|
|
10704
10745
|
rest
|
|
10705
10746
|
),
|
|
10706
10747
|
width,
|
|
10707
|
-
display: "grid",
|
|
10708
10748
|
padding: "x0.75 x0.75 x0.75 x0.5",
|
|
10709
|
-
|
|
10749
|
+
rowGap: "x0.5",
|
|
10750
|
+
columnGap: "x0.5",
|
|
10751
|
+
marginInline: "x0",
|
|
10752
|
+
...containerGridTemplateStyles[gridLayout],
|
|
10710
10753
|
children: [
|
|
10711
10754
|
/* @__PURE__ */ jsx302(
|
|
10712
|
-
|
|
10755
|
+
GridChild,
|
|
10713
10756
|
{
|
|
10757
|
+
as: Icon,
|
|
10758
|
+
gridArea: "icon",
|
|
10714
10759
|
iconSize: "component",
|
|
10715
10760
|
icon: icons2[purpose],
|
|
10716
|
-
|
|
10761
|
+
color: `var(--dds-color-icon-on-${purpose === "tips" ? "info" : purpose}-default)`
|
|
10717
10762
|
}
|
|
10718
10763
|
),
|
|
10719
|
-
/* @__PURE__ */ jsx302(
|
|
10764
|
+
/* @__PURE__ */ jsx302(GridChild, { gridArea: "text", children }),
|
|
10720
10765
|
closable && /* @__PURE__ */ jsx302(
|
|
10721
|
-
|
|
10766
|
+
GridChild,
|
|
10722
10767
|
{
|
|
10768
|
+
as: Button,
|
|
10769
|
+
gridArea: "close-btn",
|
|
10723
10770
|
icon: CloseIcon,
|
|
10724
10771
|
purpose: "tertiary",
|
|
10725
10772
|
onClick: () => {
|
|
10726
|
-
|
|
10773
|
+
setOpen(false);
|
|
10727
10774
|
onClose == null ? void 0 : onClose();
|
|
10728
10775
|
},
|
|
10729
10776
|
size: "xsmall",
|
|
10730
|
-
"aria-label": t(commonTexts.closeMessage)
|
|
10731
|
-
className: LocalMessage_default.container__button
|
|
10777
|
+
"aria-label": t(commonTexts.closeMessage)
|
|
10732
10778
|
}
|
|
10733
10779
|
)
|
|
10734
10780
|
]
|
|
10735
10781
|
}
|
|
10736
|
-
);
|
|
10782
|
+
) : null;
|
|
10737
10783
|
};
|
|
10738
10784
|
LocalMessage.displayName = "LocalMessage";
|
|
10739
10785
|
|
|
@@ -10742,7 +10788,7 @@ import {
|
|
|
10742
10788
|
useContext as useContext18,
|
|
10743
10789
|
useEffect as useEffect25,
|
|
10744
10790
|
useId as useId20,
|
|
10745
|
-
useRef as
|
|
10791
|
+
useRef as useRef28
|
|
10746
10792
|
} from "react";
|
|
10747
10793
|
import { createPortal as createPortal4 } from "react-dom";
|
|
10748
10794
|
|
|
@@ -10788,7 +10834,7 @@ var Modal = ({
|
|
|
10788
10834
|
};
|
|
10789
10835
|
const themeContext = useContext18(ThemeContext);
|
|
10790
10836
|
if (!themeContext) {
|
|
10791
|
-
throw new Error("Modal must be used within a
|
|
10837
|
+
throw new Error("Modal must be used within a DdsProvider");
|
|
10792
10838
|
}
|
|
10793
10839
|
const { t } = useTranslation();
|
|
10794
10840
|
const portalTarget = parentElement != null ? parentElement : themeContext == null ? void 0 : themeContext.el;
|
|
@@ -10800,7 +10846,7 @@ var Modal = ({
|
|
|
10800
10846
|
}
|
|
10801
10847
|
return () => handleElementWithBackdropUnmount(document.body);
|
|
10802
10848
|
}, [isOpen]);
|
|
10803
|
-
const backdropRef =
|
|
10849
|
+
const backdropRef = useRef28(null);
|
|
10804
10850
|
const onBackdropClick = (event) => {
|
|
10805
10851
|
if (event.target === backdropRef.current && isOpen) {
|
|
10806
10852
|
handleClose();
|
|
@@ -10926,7 +10972,7 @@ var NewsPopover_default = {
|
|
|
10926
10972
|
};
|
|
10927
10973
|
|
|
10928
10974
|
// src/components/NewsPopover/NewsPopover.tsx
|
|
10929
|
-
import { Fragment as
|
|
10975
|
+
import { Fragment as Fragment10, jsx as jsx306, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
10930
10976
|
var NewsPopover = ({
|
|
10931
10977
|
id,
|
|
10932
10978
|
className,
|
|
@@ -10988,7 +11034,7 @@ var NewsPopover = ({
|
|
|
10988
11034
|
});
|
|
10989
11035
|
useOnKeyDown("Escape", () => setIsOpen(false));
|
|
10990
11036
|
const isList = news.length > 1;
|
|
10991
|
-
const slideContent = (el, i) => /* @__PURE__ */ jsxs114(
|
|
11037
|
+
const slideContent = (el, i) => /* @__PURE__ */ jsxs114(Fragment10, { children: [
|
|
10992
11038
|
/* @__PURE__ */ jsxs114(
|
|
10993
11039
|
Paper,
|
|
10994
11040
|
{
|
|
@@ -11107,9 +11153,6 @@ import { useState as useState23 } from "react";
|
|
|
11107
11153
|
|
|
11108
11154
|
// src/components/Pagination/Pagination.module.css
|
|
11109
11155
|
var Pagination_default = {
|
|
11110
|
-
list: "Pagination_list",
|
|
11111
|
-
list__item: "Pagination_list__item",
|
|
11112
|
-
indicators: "Pagination_indicators",
|
|
11113
11156
|
"truncation-icon": "Pagination_truncation-icon"
|
|
11114
11157
|
};
|
|
11115
11158
|
|
|
@@ -11710,7 +11753,7 @@ function Select({
|
|
|
11710
11753
|
Select.displayName = "Select";
|
|
11711
11754
|
|
|
11712
11755
|
// src/components/Select/NativeSelect/NativeSelect.tsx
|
|
11713
|
-
import { useEffect as useEffect26, useId as useId22, useRef as
|
|
11756
|
+
import { useEffect as useEffect26, useId as useId22, useRef as useRef29, useState as useState22 } from "react";
|
|
11714
11757
|
|
|
11715
11758
|
// src/components/Select/NativeSelect/NativeSelect.module.css
|
|
11716
11759
|
var NativeSelect_default = {
|
|
@@ -11746,7 +11789,7 @@ var NativeSelect = ({
|
|
|
11746
11789
|
...rest
|
|
11747
11790
|
}) => {
|
|
11748
11791
|
const { t } = useTranslation();
|
|
11749
|
-
const selectRef =
|
|
11792
|
+
const selectRef = useRef29(null);
|
|
11750
11793
|
const [hasValue, setHasValue] = useState22(false);
|
|
11751
11794
|
useEffect26(() => {
|
|
11752
11795
|
var _a, _b;
|
|
@@ -11883,6 +11926,7 @@ var createSelectOptions = (...args) => args.map((v) => ({ label: v, value: v }))
|
|
|
11883
11926
|
|
|
11884
11927
|
// src/components/Pagination/Pagination.tsx
|
|
11885
11928
|
import { jsx as jsx310, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
11929
|
+
import { createElement as createElement3 } from "react";
|
|
11886
11930
|
var Pagination = ({
|
|
11887
11931
|
itemsAmount,
|
|
11888
11932
|
defaultItemsPerPage = 10,
|
|
@@ -11935,9 +11979,22 @@ var Pagination = ({
|
|
|
11935
11979
|
onSelectOptionChange(option);
|
|
11936
11980
|
}
|
|
11937
11981
|
};
|
|
11982
|
+
const listItemProps = {
|
|
11983
|
+
as: "li",
|
|
11984
|
+
display: "inline-grid",
|
|
11985
|
+
alignContent: "center"
|
|
11986
|
+
};
|
|
11987
|
+
const listProps = {
|
|
11988
|
+
as: "ol",
|
|
11989
|
+
defaultPageLayout: false,
|
|
11990
|
+
gridAutoFlow: "column",
|
|
11991
|
+
margin: "x0",
|
|
11992
|
+
padding: "x0",
|
|
11993
|
+
gap: "x0.75"
|
|
11994
|
+
};
|
|
11938
11995
|
const listItems = items.length > 0 ? items.map((item, i) => {
|
|
11939
11996
|
const isActive = item === activePage;
|
|
11940
|
-
return /* @__PURE__ */
|
|
11997
|
+
return /* @__PURE__ */ createElement3(Box, { ...listItemProps, key: `pagination-item-${i}` }, item !== "truncator" && typeof item === "number" ? /* @__PURE__ */ jsx310(
|
|
11941
11998
|
Button,
|
|
11942
11999
|
{
|
|
11943
12000
|
purpose: isActive ? "primary" : "secondary",
|
|
@@ -11954,7 +12011,7 @@ var Pagination = ({
|
|
|
11954
12011
|
icon: MoreHorizontalIcon,
|
|
11955
12012
|
className: Pagination_default["truncation-icon"]
|
|
11956
12013
|
}
|
|
11957
|
-
)
|
|
12014
|
+
));
|
|
11958
12015
|
}) : void 0;
|
|
11959
12016
|
const previousPageButton = /* @__PURE__ */ jsx310(
|
|
11960
12017
|
Button,
|
|
@@ -11995,125 +12052,97 @@ var Pagination = ({
|
|
|
11995
12052
|
...baseHTMLProps
|
|
11996
12053
|
},
|
|
11997
12054
|
children: [
|
|
11998
|
-
/* @__PURE__ */ jsxs118(
|
|
11999
|
-
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
12016
|
-
|
|
12017
|
-
|
|
12018
|
-
|
|
12055
|
+
/* @__PURE__ */ jsxs118(Grid, { ...listProps, hideBelow: smallScreenBreakpoint, children: [
|
|
12056
|
+
/* @__PURE__ */ jsx310(
|
|
12057
|
+
Box,
|
|
12058
|
+
{
|
|
12059
|
+
...listItemProps,
|
|
12060
|
+
className: isOnFirstPage ? utilStyles_default.invisible : void 0,
|
|
12061
|
+
"aria-hidden": isOnFirstPage,
|
|
12062
|
+
children: previousPageButton
|
|
12063
|
+
}
|
|
12064
|
+
),
|
|
12065
|
+
listItems,
|
|
12066
|
+
/* @__PURE__ */ jsx310(
|
|
12067
|
+
Box,
|
|
12068
|
+
{
|
|
12069
|
+
...listItemProps,
|
|
12070
|
+
className: isOnLastPage ? utilStyles_default.invisible : void 0,
|
|
12071
|
+
"aria-hidden": isOnLastPage,
|
|
12072
|
+
children: nextPageButton
|
|
12073
|
+
}
|
|
12074
|
+
)
|
|
12075
|
+
] }),
|
|
12076
|
+
!!smallScreenBreakpoint && /* @__PURE__ */ jsxs118(Grid, { ...listProps, showBelow: smallScreenBreakpoint, children: [
|
|
12077
|
+
/* @__PURE__ */ jsx310(
|
|
12078
|
+
Box,
|
|
12079
|
+
{
|
|
12080
|
+
...listItemProps,
|
|
12081
|
+
className: isOnFirstPage ? utilStyles_default.invisible : void 0,
|
|
12082
|
+
"aria-hidden": isOnFirstPage,
|
|
12083
|
+
children: /* @__PURE__ */ jsx310(
|
|
12084
|
+
Button,
|
|
12019
12085
|
{
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
)
|
|
12024
|
-
|
|
12025
|
-
|
|
12086
|
+
purpose: "secondary",
|
|
12087
|
+
size: "small",
|
|
12088
|
+
icon: ChevronFirstIcon,
|
|
12089
|
+
onClick: (event) => {
|
|
12090
|
+
onPageChange(event, 1);
|
|
12091
|
+
},
|
|
12092
|
+
"aria-label": t(texts22.firstPage)
|
|
12026
12093
|
}
|
|
12027
12094
|
)
|
|
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(
|
|
12095
|
+
}
|
|
12096
|
+
),
|
|
12097
|
+
/* @__PURE__ */ jsx310(
|
|
12098
|
+
Box,
|
|
12099
|
+
{
|
|
12100
|
+
...listItemProps,
|
|
12101
|
+
className: isOnFirstPage ? utilStyles_default.invisible : void 0,
|
|
12102
|
+
"aria-hidden": isOnFirstPage,
|
|
12103
|
+
children: previousPageButton
|
|
12104
|
+
}
|
|
12105
|
+
),
|
|
12106
|
+
/* @__PURE__ */ jsx310(Box, { ...listItemProps, children: /* @__PURE__ */ jsx310(
|
|
12107
|
+
Button,
|
|
12108
|
+
{
|
|
12109
|
+
size: "small",
|
|
12110
|
+
onClick: (event) => {
|
|
12111
|
+
onPageChange(event, activePage);
|
|
12112
|
+
},
|
|
12113
|
+
children: activePage
|
|
12114
|
+
}
|
|
12115
|
+
) }),
|
|
12116
|
+
/* @__PURE__ */ jsx310(
|
|
12117
|
+
Box,
|
|
12118
|
+
{
|
|
12119
|
+
...listItemProps,
|
|
12120
|
+
className: isOnLastPage ? utilStyles_default.invisible : void 0,
|
|
12121
|
+
"aria-hidden": isOnLastPage,
|
|
12122
|
+
children: nextPageButton
|
|
12123
|
+
}
|
|
12124
|
+
),
|
|
12125
|
+
/* @__PURE__ */ jsx310(
|
|
12126
|
+
Box,
|
|
12127
|
+
{
|
|
12128
|
+
...listItemProps,
|
|
12129
|
+
className: isOnLastPage ? utilStyles_default.invisible : void 0,
|
|
12130
|
+
"aria-hidden": isOnLastPage,
|
|
12131
|
+
children: /* @__PURE__ */ jsx310(
|
|
12072
12132
|
Button,
|
|
12073
12133
|
{
|
|
12134
|
+
purpose: "secondary",
|
|
12074
12135
|
size: "small",
|
|
12136
|
+
icon: ChevronLastIcon,
|
|
12075
12137
|
onClick: (event) => {
|
|
12076
|
-
onPageChange(event,
|
|
12138
|
+
onPageChange(event, pagesLength);
|
|
12077
12139
|
},
|
|
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
|
-
)
|
|
12140
|
+
"aria-label": t(texts22.lastPage)
|
|
12112
12141
|
}
|
|
12113
12142
|
)
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
)
|
|
12143
|
+
}
|
|
12144
|
+
)
|
|
12145
|
+
] })
|
|
12117
12146
|
]
|
|
12118
12147
|
}
|
|
12119
12148
|
) : null;
|
|
@@ -12131,12 +12160,12 @@ var Pagination = ({
|
|
|
12131
12160
|
...baseHTMLProps,
|
|
12132
12161
|
children: [
|
|
12133
12162
|
/* @__PURE__ */ jsxs118(
|
|
12134
|
-
|
|
12163
|
+
Grid,
|
|
12135
12164
|
{
|
|
12136
|
-
|
|
12165
|
+
defaultPageLayout: false,
|
|
12137
12166
|
gap: "x0.5",
|
|
12138
12167
|
alignItems: "center",
|
|
12139
|
-
|
|
12168
|
+
gridAutoFlow: "column",
|
|
12140
12169
|
children: [
|
|
12141
12170
|
withSelect && /* @__PURE__ */ jsx310(
|
|
12142
12171
|
Select,
|
|
@@ -12220,7 +12249,7 @@ import {
|
|
|
12220
12249
|
useEffect as useEffect27,
|
|
12221
12250
|
useId as useId23,
|
|
12222
12251
|
useLayoutEffect as useLayoutEffect3,
|
|
12223
|
-
useRef as
|
|
12252
|
+
useRef as useRef30,
|
|
12224
12253
|
useState as useState24
|
|
12225
12254
|
} from "react";
|
|
12226
12255
|
|
|
@@ -12636,9 +12665,7 @@ var prioritizedCountryOptions = prioritizedCountries.map((country) => {
|
|
|
12636
12665
|
countryCode: country.id
|
|
12637
12666
|
};
|
|
12638
12667
|
});
|
|
12639
|
-
var
|
|
12640
|
-
COUNTRIES
|
|
12641
|
-
).sort((a, b) => {
|
|
12668
|
+
var compareCountriesByName = (a, b) => {
|
|
12642
12669
|
if (a.name < b.name) {
|
|
12643
12670
|
return -1;
|
|
12644
12671
|
}
|
|
@@ -12646,18 +12673,21 @@ var sortedCountryOptions = Object.values(
|
|
|
12646
12673
|
return 1;
|
|
12647
12674
|
}
|
|
12648
12675
|
return 0;
|
|
12649
|
-
}
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
(country) =>
|
|
12654
|
-
|
|
12655
|
-
|
|
12656
|
-
)
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
12676
|
+
};
|
|
12677
|
+
var createCountryOptions = (countries) => {
|
|
12678
|
+
const sortedCountryOptions = Object.values(
|
|
12679
|
+
countries
|
|
12680
|
+
).sort(compareCountriesByName).map((country) => ({
|
|
12681
|
+
countryCode: country.id,
|
|
12682
|
+
label: `${country.name} ${country.dialCode}`
|
|
12683
|
+
})).filter(
|
|
12684
|
+
(country) => !prioritizedCountryOptions.some(
|
|
12685
|
+
(pCountry) => pCountry.countryCode === country.countryCode
|
|
12686
|
+
)
|
|
12687
|
+
);
|
|
12688
|
+
return [...prioritizedCountryOptions, ...sortedCountryOptions];
|
|
12689
|
+
};
|
|
12690
|
+
var countryOptions = createCountryOptions(COUNTRIES);
|
|
12661
12691
|
var PhoneInput = ({
|
|
12662
12692
|
label,
|
|
12663
12693
|
readOnly,
|
|
@@ -12705,14 +12735,14 @@ var PhoneInput = ({
|
|
|
12705
12735
|
);
|
|
12706
12736
|
const isControlled = value !== void 0;
|
|
12707
12737
|
const [callingCodeWidth, setCallingCodeWidth] = useState24(0);
|
|
12708
|
-
const callingCodeRef =
|
|
12738
|
+
const callingCodeRef = useRef30(null);
|
|
12709
12739
|
useLayoutEffect3(() => {
|
|
12710
12740
|
if (callingCodeRef.current) {
|
|
12711
12741
|
setCallingCodeWidth(callingCodeRef.current.offsetWidth);
|
|
12712
12742
|
}
|
|
12713
12743
|
}, [callingCode]);
|
|
12714
12744
|
const callingCodeInlineStart = callingCodeWidth ? `calc(var(--dds-spacing-x1) + ${callingCodeWidth}px)` : void 0;
|
|
12715
|
-
const internalSelectRef =
|
|
12745
|
+
const internalSelectRef = useRef30(null);
|
|
12716
12746
|
const combinedSelectRef = useCombinedRef(selectRef, internalSelectRef);
|
|
12717
12747
|
const displayedValue = isControlled ? value : internalValue;
|
|
12718
12748
|
useEffect27(() => {
|
|
@@ -13061,7 +13091,7 @@ import {
|
|
|
13061
13091
|
cloneElement as cloneElement4,
|
|
13062
13092
|
isValidElement as isValidElement4,
|
|
13063
13093
|
useId as useId25,
|
|
13064
|
-
useRef as
|
|
13094
|
+
useRef as useRef31,
|
|
13065
13095
|
useState as useState25
|
|
13066
13096
|
} from "react";
|
|
13067
13097
|
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
@@ -13101,10 +13131,10 @@ var PopoverGroup = ({
|
|
|
13101
13131
|
handleOpen();
|
|
13102
13132
|
}
|
|
13103
13133
|
};
|
|
13104
|
-
const buttonRef =
|
|
13134
|
+
const buttonRef = useRef31(null);
|
|
13105
13135
|
const anchorRef = refs.setReference;
|
|
13106
13136
|
const combinedAnchorRef = useCombinedRef(buttonRef, anchorRef);
|
|
13107
|
-
const popoverRef =
|
|
13137
|
+
const popoverRef = useRef31(null);
|
|
13108
13138
|
const floatingRef = refs.setFloating;
|
|
13109
13139
|
const combinedPopoverRef = useCombinedRef(popoverRef, floatingRef);
|
|
13110
13140
|
useOnKeyDown(["Esc", "Escape"], () => {
|
|
@@ -13188,7 +13218,7 @@ var ProgressTracker_default = {
|
|
|
13188
13218
|
|
|
13189
13219
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
13190
13220
|
import { useMemo as useMemo2 } from "react";
|
|
13191
|
-
import { Fragment as
|
|
13221
|
+
import { Fragment as Fragment11, jsx as jsx314, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
13192
13222
|
var toItemState = (active, completed, disabled) => {
|
|
13193
13223
|
if (disabled) {
|
|
13194
13224
|
return "disabled";
|
|
@@ -13245,7 +13275,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
13245
13275
|
if (active) return "text-action-resting";
|
|
13246
13276
|
}
|
|
13247
13277
|
const isInactiveLink = disabled || active;
|
|
13248
|
-
const stepContent = /* @__PURE__ */ jsxs121(
|
|
13278
|
+
const stepContent = /* @__PURE__ */ jsxs121(Fragment11, { children: [
|
|
13249
13279
|
/* @__PURE__ */ jsx314(
|
|
13250
13280
|
Box,
|
|
13251
13281
|
{
|
|
@@ -13537,21 +13567,20 @@ var useAutocompleteSearch = () => {
|
|
|
13537
13567
|
|
|
13538
13568
|
// src/components/Search/Search.module.css
|
|
13539
13569
|
var Search_default = {
|
|
13540
|
-
"with-button-container": "Search_with-button-container",
|
|
13541
13570
|
input: "Search_input",
|
|
13542
13571
|
"clear-button": "Search_clear-button",
|
|
13543
13572
|
suggestions: "Search_suggestions"
|
|
13544
13573
|
};
|
|
13545
13574
|
|
|
13546
13575
|
// src/components/Search/SearchSuggestionItem.tsx
|
|
13547
|
-
import { useEffect as useEffect30, useRef as
|
|
13576
|
+
import { useEffect as useEffect30, useRef as useRef32 } from "react";
|
|
13548
13577
|
import { jsx as jsx317 } from "react/jsx-runtime";
|
|
13549
13578
|
var SearchSuggestionItem = ({
|
|
13550
13579
|
focus,
|
|
13551
13580
|
ref,
|
|
13552
13581
|
...rest
|
|
13553
13582
|
}) => {
|
|
13554
|
-
const itemRef =
|
|
13583
|
+
const itemRef = useRef32(null);
|
|
13555
13584
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
13556
13585
|
useEffect30(() => {
|
|
13557
13586
|
var _a;
|
|
@@ -13655,7 +13684,7 @@ var texts26 = createTexts({
|
|
|
13655
13684
|
});
|
|
13656
13685
|
|
|
13657
13686
|
// src/components/Search/Search.tsx
|
|
13658
|
-
import { Fragment as
|
|
13687
|
+
import { Fragment as Fragment12, jsx as jsx319, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
13659
13688
|
var Search = ({
|
|
13660
13689
|
componentSize = "medium",
|
|
13661
13690
|
buttonProps,
|
|
@@ -13755,7 +13784,7 @@ var Search = ({
|
|
|
13755
13784
|
)
|
|
13756
13785
|
}
|
|
13757
13786
|
),
|
|
13758
|
-
hasSuggestions && /* @__PURE__ */ jsxs124(
|
|
13787
|
+
hasSuggestions && /* @__PURE__ */ jsxs124(Fragment12, { children: [
|
|
13759
13788
|
/* @__PURE__ */ jsx319(
|
|
13760
13789
|
SearchSuggestions,
|
|
13761
13790
|
{
|
|
@@ -13786,11 +13815,10 @@ var Search = ({
|
|
|
13786
13815
|
showSearchButton ? /* @__PURE__ */ jsxs124(
|
|
13787
13816
|
Grid,
|
|
13788
13817
|
{
|
|
13818
|
+
defaultPageLayout: false,
|
|
13789
13819
|
className,
|
|
13790
13820
|
width,
|
|
13791
13821
|
columnGap: "x0.5",
|
|
13792
|
-
rowGap: "0",
|
|
13793
|
-
marginInline: "0",
|
|
13794
13822
|
gridTemplateColumns: "1fr auto",
|
|
13795
13823
|
style,
|
|
13796
13824
|
children: [
|
|
@@ -13839,7 +13867,7 @@ var texts27 = createTexts({
|
|
|
13839
13867
|
// src/components/Search/SearchAutocompleteWrapper.tsx
|
|
13840
13868
|
import {
|
|
13841
13869
|
useEffect as useEffect31,
|
|
13842
|
-
useRef as
|
|
13870
|
+
useRef as useRef33,
|
|
13843
13871
|
useState as useState28
|
|
13844
13872
|
} from "react";
|
|
13845
13873
|
import { jsx as jsx320 } from "react/jsx-runtime";
|
|
@@ -13903,8 +13931,8 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
13903
13931
|
const handleSetInputValue = (value2) => {
|
|
13904
13932
|
setInputValue(value2 != null ? value2 : "");
|
|
13905
13933
|
};
|
|
13906
|
-
const inputRef =
|
|
13907
|
-
const suggestionsRef =
|
|
13934
|
+
const inputRef = useRef33(null);
|
|
13935
|
+
const suggestionsRef = useRef33(null);
|
|
13908
13936
|
useOnClickOutside([inputRef, suggestionsRef], () => {
|
|
13909
13937
|
closeSuggestions();
|
|
13910
13938
|
});
|
|
@@ -14062,7 +14090,7 @@ var texts28 = createTexts({
|
|
|
14062
14090
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
14063
14091
|
import {
|
|
14064
14092
|
Children as Children4,
|
|
14065
|
-
Fragment as
|
|
14093
|
+
Fragment as Fragment13,
|
|
14066
14094
|
cloneElement as cloneElement6,
|
|
14067
14095
|
isValidElement as isValidElement6,
|
|
14068
14096
|
useEffect as useEffect33,
|
|
@@ -14256,7 +14284,7 @@ Table.displayName = "Table";
|
|
|
14256
14284
|
import {
|
|
14257
14285
|
useContext as useContext26,
|
|
14258
14286
|
useEffect as useEffect32,
|
|
14259
|
-
useRef as
|
|
14287
|
+
useRef as useRef34,
|
|
14260
14288
|
useState as useState30
|
|
14261
14289
|
} from "react";
|
|
14262
14290
|
import { jsx as jsx331 } from "react/jsx-runtime";
|
|
@@ -14269,7 +14297,7 @@ var TableWrapper = ({ className, ...rest }) => {
|
|
|
14269
14297
|
function isOverflowingX(event) {
|
|
14270
14298
|
return event.offsetWidth < event.scrollWidth;
|
|
14271
14299
|
}
|
|
14272
|
-
const wrapperRef =
|
|
14300
|
+
const wrapperRef = useRef34(null);
|
|
14273
14301
|
useEffect32(() => {
|
|
14274
14302
|
if ((wrapperRef == null ? void 0 : wrapperRef.current) && isOverflowingX(wrapperRef.current)) {
|
|
14275
14303
|
setOverflowX(true);
|
|
@@ -14311,7 +14339,7 @@ Table2.Row = Row;
|
|
|
14311
14339
|
Table2.Foot = Foot;
|
|
14312
14340
|
|
|
14313
14341
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
14314
|
-
import { Fragment as
|
|
14342
|
+
import { Fragment as Fragment14, jsx as jsx332, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
14315
14343
|
var CollapsibleRow = ({
|
|
14316
14344
|
type: _type,
|
|
14317
14345
|
className,
|
|
@@ -14354,7 +14382,7 @@ var CollapsibleRow = ({
|
|
|
14354
14382
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
14355
14383
|
const id = derivativeIdGenerator(prefix2, index.toString());
|
|
14356
14384
|
collapsibleIds.push(id);
|
|
14357
|
-
return /* @__PURE__ */ jsxs127(
|
|
14385
|
+
return /* @__PURE__ */ jsxs127(Fragment13, { children: [
|
|
14358
14386
|
/* @__PURE__ */ jsx332(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
14359
14387
|
isValidElement6(child) && cloneElement6(child, {
|
|
14360
14388
|
collapsibleProps: { isCollapsibleChild: true }
|
|
@@ -14367,7 +14395,7 @@ var CollapsibleRow = ({
|
|
|
14367
14395
|
});
|
|
14368
14396
|
const headerRow = () => {
|
|
14369
14397
|
if (type !== "head" || !isCollapsed) return null;
|
|
14370
|
-
return /* @__PURE__ */ jsx332(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs127(
|
|
14398
|
+
return /* @__PURE__ */ jsx332(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs127(Fragment14, { children: [
|
|
14371
14399
|
definingColumnCells,
|
|
14372
14400
|
/* @__PURE__ */ jsxs127(Table2.Cell, { type: "head", layout: "center", children: [
|
|
14373
14401
|
t(texts30.expand),
|
|
@@ -14400,9 +14428,9 @@ var CollapsibleRow = ({
|
|
|
14400
14428
|
) })
|
|
14401
14429
|
] });
|
|
14402
14430
|
};
|
|
14403
|
-
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs127(
|
|
14431
|
+
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs127(Fragment14, { children: [
|
|
14404
14432
|
headerRow(),
|
|
14405
|
-
type === "body" && /* @__PURE__ */ jsxs127(
|
|
14433
|
+
type === "body" && /* @__PURE__ */ jsxs127(Fragment14, { children: [
|
|
14406
14434
|
rowWithChevron(),
|
|
14407
14435
|
childrenCollapsed ? null : collapsedRows
|
|
14408
14436
|
] })
|
|
@@ -14453,7 +14481,7 @@ var CollapsibleTable2 = CollapsibleTable;
|
|
|
14453
14481
|
CollapsibleTable2.Row = CollapsibleRow;
|
|
14454
14482
|
|
|
14455
14483
|
// src/components/Tabs/AddTabButton.tsx
|
|
14456
|
-
import { useRef as
|
|
14484
|
+
import { useRef as useRef35 } from "react";
|
|
14457
14485
|
|
|
14458
14486
|
// src/components/Tabs/Tabs.context.tsx
|
|
14459
14487
|
import { createContext as createContext18, useContext as useContext27 } from "react";
|
|
@@ -14474,8 +14502,6 @@ var useTabsContext = () => useContext27(TabsContext);
|
|
|
14474
14502
|
// src/components/Tabs/Tabs.module.css
|
|
14475
14503
|
var Tabs_default = {
|
|
14476
14504
|
"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
14505
|
tab: "Tabs_tab",
|
|
14480
14506
|
"tab--active": "Tabs_tab--active",
|
|
14481
14507
|
"tab--medium--row": "Tabs_tab--medium--row",
|
|
@@ -14540,7 +14566,7 @@ var AddTabButton = ({
|
|
|
14540
14566
|
...rest
|
|
14541
14567
|
}) => {
|
|
14542
14568
|
useSetTabWidth(index, width);
|
|
14543
|
-
const buttonRef =
|
|
14569
|
+
const buttonRef = useRef35(null);
|
|
14544
14570
|
const combinedRef = useCombinedRef(ref, buttonRef);
|
|
14545
14571
|
const { tabContentDirection, size: size2 } = useTabsContext();
|
|
14546
14572
|
return /* @__PURE__ */ jsxs128(
|
|
@@ -14565,7 +14591,7 @@ var AddTabButton = ({
|
|
|
14565
14591
|
AddTabButton.displayName = "AddTabButton";
|
|
14566
14592
|
|
|
14567
14593
|
// src/components/Tabs/Tabs.tsx
|
|
14568
|
-
import { useEffect as useEffect34, useId as useId28, useRef as
|
|
14594
|
+
import { useEffect as useEffect34, useId as useId28, useRef as useRef36, useState as useState32 } from "react";
|
|
14569
14595
|
import { jsx as jsx336 } from "react/jsx-runtime";
|
|
14570
14596
|
var TABS_SIZES = createSizes("small", "medium");
|
|
14571
14597
|
var Tabs = ({
|
|
@@ -14586,8 +14612,8 @@ var Tabs = ({
|
|
|
14586
14612
|
const uniqueId = id != null ? id : `${generatedId}-tabs`;
|
|
14587
14613
|
const [thisActiveTab, setActiveTab] = useState32(activeTab != null ? activeTab : 0);
|
|
14588
14614
|
const [hasTabFocus, setHasTabFocus] = useState32(false);
|
|
14589
|
-
const tabListRef =
|
|
14590
|
-
const tabPanelsRef =
|
|
14615
|
+
const tabListRef = useRef36(null);
|
|
14616
|
+
const tabPanelsRef = useRef36(null);
|
|
14591
14617
|
const handleTabChange = (index) => {
|
|
14592
14618
|
setActiveTab(index);
|
|
14593
14619
|
onChange == null ? void 0 : onChange(index);
|
|
@@ -14629,7 +14655,7 @@ Tabs.displayName = "Tabs";
|
|
|
14629
14655
|
import {
|
|
14630
14656
|
useCallback as useCallback8,
|
|
14631
14657
|
useEffect as useEffect35,
|
|
14632
|
-
useRef as
|
|
14658
|
+
useRef as useRef37
|
|
14633
14659
|
} from "react";
|
|
14634
14660
|
import { jsx as jsx337, jsxs as jsxs129 } from "react/jsx-runtime";
|
|
14635
14661
|
var Tab = ({
|
|
@@ -14650,7 +14676,7 @@ var Tab = ({
|
|
|
14650
14676
|
...rest
|
|
14651
14677
|
}) => {
|
|
14652
14678
|
useSetTabWidth(index, width);
|
|
14653
|
-
const itemRef =
|
|
14679
|
+
const itemRef = useRef37(null);
|
|
14654
14680
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
14655
14681
|
const { tabContentDirection, size: size2 } = useTabsContext();
|
|
14656
14682
|
const { type = "button", ...restHtmlProps } = htmlProps;
|
|
@@ -14772,9 +14798,16 @@ var TabList = ({
|
|
|
14772
14798
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14773
14799
|
["--dds-tab-widths"]: widths.join(" ")
|
|
14774
14800
|
};
|
|
14801
|
+
const gridLayout = widths ? {
|
|
14802
|
+
gridTemplateColumns: "var(--dds-tab-widths)"
|
|
14803
|
+
} : {
|
|
14804
|
+
gridAutoColumns: "1fr",
|
|
14805
|
+
gridAutoFlow: "column"
|
|
14806
|
+
};
|
|
14775
14807
|
return /* @__PURE__ */ jsx338(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ jsxs130(
|
|
14776
|
-
|
|
14808
|
+
Grid,
|
|
14777
14809
|
{
|
|
14810
|
+
defaultPageLayout: false,
|
|
14778
14811
|
...rest,
|
|
14779
14812
|
ref: combinedRef,
|
|
14780
14813
|
role: "tablist",
|
|
@@ -14782,13 +14815,9 @@ var TabList = ({
|
|
|
14782
14815
|
tabIndex: 0,
|
|
14783
14816
|
onFocus: handleOnFocus,
|
|
14784
14817
|
onBlur: handleOnBlur,
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
|
|
14788
|
-
Tabs_default["tab-row--custom-widths"],
|
|
14789
|
-
focusable,
|
|
14790
|
-
scrollbar
|
|
14791
|
-
),
|
|
14818
|
+
overflowX: "auto",
|
|
14819
|
+
...gridLayout,
|
|
14820
|
+
className: cn(Tabs_default["tab-row"], focusable, scrollbar),
|
|
14792
14821
|
style: { ...style, ...customWidths },
|
|
14793
14822
|
children: [
|
|
14794
14823
|
tabListChildren,
|
|
@@ -14924,7 +14953,7 @@ var Tag = ({
|
|
|
14924
14953
|
Tag.displayName = "Tag";
|
|
14925
14954
|
|
|
14926
14955
|
// src/components/TextInput/TextInput.tsx
|
|
14927
|
-
import { useId as useId29, useLayoutEffect as useLayoutEffect5, useRef as
|
|
14956
|
+
import { useId as useId29, useLayoutEffect as useLayoutEffect5, useRef as useRef38, useState as useState34 } from "react";
|
|
14928
14957
|
|
|
14929
14958
|
// src/components/TextInput/TextInput.module.css
|
|
14930
14959
|
var TextInput_default = {
|
|
@@ -14968,8 +14997,8 @@ var TextInput = ({
|
|
|
14968
14997
|
...rest
|
|
14969
14998
|
}) => {
|
|
14970
14999
|
const [text, setText] = useState34(getDefaultText(value, defaultValue));
|
|
14971
|
-
const prefixRef =
|
|
14972
|
-
const suffixRef =
|
|
15000
|
+
const prefixRef = useRef38(null);
|
|
15001
|
+
const suffixRef = useRef38(null);
|
|
14973
15002
|
const [prefixLength, setPrefixLength] = useState34(0);
|
|
14974
15003
|
const [suffixLength, setSuffixLength] = useState34(0);
|
|
14975
15004
|
useLayoutEffect5(() => {
|
|
@@ -15178,15 +15207,6 @@ var ToggleBarContext = createContext20({
|
|
|
15178
15207
|
});
|
|
15179
15208
|
var useToggleBarContext = () => useContext29(ToggleBarContext);
|
|
15180
15209
|
|
|
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
15210
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
15191
15211
|
import { jsx as jsx343, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
15192
15212
|
var ToggleBar = (props) => {
|
|
@@ -15233,7 +15253,15 @@ var ToggleBar = (props) => {
|
|
|
15233
15253
|
"aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
|
|
15234
15254
|
children: [
|
|
15235
15255
|
label && /* @__PURE__ */ jsx343(Typography, { id: labelId, as: "span", typographyType: "labelMedium", children: label }),
|
|
15236
|
-
/* @__PURE__ */ jsx343(
|
|
15256
|
+
/* @__PURE__ */ jsx343(
|
|
15257
|
+
Grid,
|
|
15258
|
+
{
|
|
15259
|
+
defaultPageLayout: false,
|
|
15260
|
+
gridAutoFlow: "column",
|
|
15261
|
+
gridAutoColumns: "1fr",
|
|
15262
|
+
children
|
|
15263
|
+
}
|
|
15264
|
+
)
|
|
15237
15265
|
]
|
|
15238
15266
|
}
|
|
15239
15267
|
)
|
|
@@ -15244,6 +15272,16 @@ ToggleBar.displayName = "ToggleBar";
|
|
|
15244
15272
|
|
|
15245
15273
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
15246
15274
|
import { useId as useId31 } from "react";
|
|
15275
|
+
|
|
15276
|
+
// src/components/ToggleBar/ToggleBar.module.css
|
|
15277
|
+
var ToggleBar_default = {
|
|
15278
|
+
content: "ToggleBar_content",
|
|
15279
|
+
label: "ToggleBar_label",
|
|
15280
|
+
"label--primary": "ToggleBar_label--primary",
|
|
15281
|
+
"label--secondary": "ToggleBar_label--secondary"
|
|
15282
|
+
};
|
|
15283
|
+
|
|
15284
|
+
// src/components/ToggleBar/ToggleRadio.tsx
|
|
15247
15285
|
import { jsx as jsx344, jsxs as jsxs134 } from "react/jsx-runtime";
|
|
15248
15286
|
var calculateChecked = (value, group, checked) => {
|
|
15249
15287
|
if (typeof checked !== "undefined") return checked;
|
|
@@ -15769,7 +15807,6 @@ export {
|
|
|
15769
15807
|
ZoomOutIcon,
|
|
15770
15808
|
calendarDateToNativeDate,
|
|
15771
15809
|
cn,
|
|
15772
|
-
countryOptions,
|
|
15773
15810
|
createPurposes,
|
|
15774
15811
|
createSelectOptions,
|
|
15775
15812
|
createSizes,
|
|
@@ -15780,7 +15817,6 @@ export {
|
|
|
15780
15817
|
getBaseHTMLProps,
|
|
15781
15818
|
getColorCn,
|
|
15782
15819
|
getElementType,
|
|
15783
|
-
getLiteralScreenSize,
|
|
15784
15820
|
getTypographyCn,
|
|
15785
15821
|
handleElementWithBackdropMount,
|
|
15786
15822
|
handleElementWithBackdropUnmount,
|