@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.js
CHANGED
|
@@ -368,7 +368,6 @@ __export(index_exports, {
|
|
|
368
368
|
ZoomOutIcon: () => ZoomOutIcon,
|
|
369
369
|
calendarDateToNativeDate: () => calendarDateToNativeDate,
|
|
370
370
|
cn: () => cn,
|
|
371
|
-
countryOptions: () => countryOptions,
|
|
372
371
|
createPurposes: () => createPurposes,
|
|
373
372
|
createSelectOptions: () => createSelectOptions,
|
|
374
373
|
createSizes: () => createSizes,
|
|
@@ -379,7 +378,6 @@ __export(index_exports, {
|
|
|
379
378
|
getBaseHTMLProps: () => getBaseHTMLProps,
|
|
380
379
|
getColorCn: () => getColorCn,
|
|
381
380
|
getElementType: () => getElementType,
|
|
382
|
-
getLiteralScreenSize: () => getLiteralScreenSize,
|
|
383
381
|
getTypographyCn: () => getTypographyCn,
|
|
384
382
|
handleElementWithBackdropMount: () => handleElementWithBackdropMount,
|
|
385
383
|
handleElementWithBackdropUnmount: () => handleElementWithBackdropUnmount,
|
|
@@ -1034,7 +1032,7 @@ function useReturnFocusOnBlur(active, onBlur, triggerElement) {
|
|
|
1034
1032
|
const focusableElements = getFocusableElements(elementRef);
|
|
1035
1033
|
const lastElement = focusableElements[focusableElements.length - 1];
|
|
1036
1034
|
const firstElement = focusableElements[0];
|
|
1037
|
-
if (!e.shiftKey && document.activeElement === lastElement || e.shiftKey && document.activeElement === firstElement || e.shiftKey && document.activeElement ===
|
|
1035
|
+
if (!e.shiftKey && document.activeElement === lastElement || e.shiftKey && document.activeElement === firstElement || e.shiftKey && document.activeElement === elementRef.current) {
|
|
1038
1036
|
triggerElement.focus();
|
|
1039
1037
|
e.preventDefault();
|
|
1040
1038
|
onBlur();
|
|
@@ -1048,7 +1046,7 @@ function useReturnFocusOnBlur(active, onBlur, triggerElement) {
|
|
|
1048
1046
|
return () => {
|
|
1049
1047
|
element == null ? void 0 : element.removeEventListener("keydown", handleFocus);
|
|
1050
1048
|
};
|
|
1051
|
-
}, [active]);
|
|
1049
|
+
}, [active, triggerElement, onBlur]);
|
|
1052
1050
|
return elementRef;
|
|
1053
1051
|
}
|
|
1054
1052
|
|
|
@@ -1435,9 +1433,7 @@ function Icon(props) {
|
|
|
1435
1433
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1436
1434
|
C,
|
|
1437
1435
|
{
|
|
1438
|
-
...getBaseHTMLProps(id, className, style, htmlProps,
|
|
1439
|
-
...rest
|
|
1440
|
-
}),
|
|
1436
|
+
...getBaseHTMLProps(id, className, style, htmlProps, rest),
|
|
1441
1437
|
height: size2,
|
|
1442
1438
|
width: size2,
|
|
1443
1439
|
fill: color,
|
|
@@ -1541,19 +1537,30 @@ var getValue = (v, bp, invert) => {
|
|
|
1541
1537
|
};
|
|
1542
1538
|
var convertMultiValue = (value, bp, invert) => value.split(" ").map((v) => getValue(v, bp, invert)).join(" ");
|
|
1543
1539
|
var invertValue = (v) => v === "0" ? "0" : `calc(-1 * ${v})`;
|
|
1540
|
+
var buildCSSKey = (prefix2, suffix, bp) => {
|
|
1541
|
+
let key = `--${TOKEN_PREFIX}`;
|
|
1542
|
+
if (prefix2) key += `-${prefix2}`;
|
|
1543
|
+
if (bp) key += `-${bp}`;
|
|
1544
|
+
if (suffix) key += `-${suffix}`;
|
|
1545
|
+
return key;
|
|
1546
|
+
};
|
|
1547
|
+
function getCSSProperties(property, prefix2, suffix, invert) {
|
|
1548
|
+
if (property === void 0 || property === null) return;
|
|
1549
|
+
const properties = {};
|
|
1550
|
+
properties[buildCSSKey(prefix2, suffix)] = convertMultiValue(property.toString(), void 0, invert);
|
|
1551
|
+
return properties;
|
|
1552
|
+
}
|
|
1544
1553
|
function getResponsiveCSSProperties(property, prefix2, suffix, invert) {
|
|
1545
1554
|
if (!property) return;
|
|
1546
1555
|
const properties = {};
|
|
1547
|
-
const pPrefix = `--${TOKEN_PREFIX}-${prefix2}`;
|
|
1548
|
-
const pSuffix = suffix ? `-${suffix}` : "";
|
|
1549
1556
|
if (isBreakpointObject(property)) {
|
|
1550
1557
|
BREAKPOINTS.forEach((bp) => {
|
|
1551
1558
|
if (property[bp]) {
|
|
1552
|
-
properties[
|
|
1559
|
+
properties[buildCSSKey(prefix2, suffix, bp)] = convertMultiValue(property[bp].toString(), bp, invert);
|
|
1553
1560
|
}
|
|
1554
1561
|
});
|
|
1555
1562
|
} else {
|
|
1556
|
-
properties[
|
|
1563
|
+
properties[buildCSSKey(prefix2, suffix)] = convertMultiValue(property.toString(), void 0, invert);
|
|
1557
1564
|
}
|
|
1558
1565
|
return properties;
|
|
1559
1566
|
}
|
|
@@ -1829,9 +1836,17 @@ Contrast.displayName = "Contrast";
|
|
|
1829
1836
|
|
|
1830
1837
|
// src/components/layout/Grid/Grid.module.css
|
|
1831
1838
|
var Grid_default = {
|
|
1839
|
+
"dds-grid": "Grid_dds-grid",
|
|
1832
1840
|
"dds-grid-template-columns": "Grid_dds-grid-template-columns",
|
|
1841
|
+
"dds-grid-auto-flow": "Grid_dds-grid-auto-flow",
|
|
1842
|
+
"dds-grid-auto-columns": "Grid_dds-grid-auto-columns",
|
|
1843
|
+
"dds-grid-auto-rows": "Grid_dds-grid-auto-rows",
|
|
1844
|
+
"dds-grid-template": "Grid_dds-grid-template",
|
|
1845
|
+
"dds-grid-template-rows": "Grid_dds-grid-template-rows",
|
|
1846
|
+
"dds-grid-template-areas": "Grid_dds-grid-template-areas",
|
|
1833
1847
|
"dds-grid-column": "Grid_dds-grid-column",
|
|
1834
1848
|
"dds-grid-row": "Grid_dds-grid-row",
|
|
1849
|
+
"dds-grid-area": "Grid_dds-grid-area",
|
|
1835
1850
|
"dds-j-self": "Grid_dds-j-self",
|
|
1836
1851
|
"child--first-half": "Grid_child--first-half",
|
|
1837
1852
|
"child--second-half": "Grid_child--second-half",
|
|
@@ -1840,56 +1855,90 @@ var Grid_default = {
|
|
|
1840
1855
|
|
|
1841
1856
|
// src/components/layout/Grid/Grid.tsx
|
|
1842
1857
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1843
|
-
var
|
|
1844
|
-
|
|
1845
|
-
className,
|
|
1846
|
-
htmlProps,
|
|
1847
|
-
gridTemplateColumns = {
|
|
1858
|
+
var DEFAULT_PAGE_LAYOUT = {
|
|
1859
|
+
gridTemplateColumns: {
|
|
1848
1860
|
xs: "repeat(var(--dds-grid-xs-count), minmax(0, 1fr))",
|
|
1849
1861
|
sm: "repeat(var(--dds-grid-sm-count), minmax(0, 1fr))",
|
|
1850
1862
|
md: "repeat(var(--dds-grid-md-count), minmax(0, 1fr))",
|
|
1851
1863
|
lg: "repeat(var(--dds-grid-lg-count), minmax(0, 1fr))",
|
|
1852
1864
|
xl: "repeat(var(--dds-grid-xl-count), minmax(0, 1fr))"
|
|
1853
1865
|
},
|
|
1854
|
-
|
|
1866
|
+
gutterSize: {
|
|
1855
1867
|
xs: "var(--dds-grid-xs-gutter-size)",
|
|
1856
1868
|
sm: "var(--dds-grid-sm-gutter-size)",
|
|
1857
1869
|
md: "var(--dds-grid-md-gutter-size)",
|
|
1858
1870
|
lg: "var(--dds-grid-lg-gutter-size)",
|
|
1859
1871
|
xl: "var(--dds-grid-xl-gutter-size)"
|
|
1860
1872
|
},
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1873
|
+
marginInline: { xs: "x2", sm: "x2", md: "x4", lg: "x6", xl: "x10" }
|
|
1874
|
+
};
|
|
1875
|
+
var Grid = ({
|
|
1876
|
+
id,
|
|
1877
|
+
className,
|
|
1878
|
+
htmlProps,
|
|
1879
|
+
defaultPageLayout = true,
|
|
1880
|
+
display = "grid",
|
|
1881
|
+
grid,
|
|
1882
|
+
gridAutoColumns,
|
|
1883
|
+
gridAutoFlow,
|
|
1884
|
+
gridAutoRows,
|
|
1885
|
+
gridTemplate,
|
|
1886
|
+
gridTemplateAreas,
|
|
1887
|
+
gridTemplateRows,
|
|
1888
|
+
gridTemplateColumns,
|
|
1889
|
+
columnGap,
|
|
1890
|
+
rowGap,
|
|
1891
|
+
marginInline,
|
|
1869
1892
|
style,
|
|
1870
1893
|
...rest
|
|
1871
1894
|
}) => {
|
|
1895
|
+
const pageDefaults = defaultPageLayout ? DEFAULT_PAGE_LAYOUT : null;
|
|
1896
|
+
const resolvedGridTemplateColumns = gridTemplateColumns != null ? gridTemplateColumns : pageDefaults == null ? void 0 : pageDefaults.gridTemplateColumns;
|
|
1897
|
+
const resolvedColumnGap = columnGap != null ? columnGap : pageDefaults == null ? void 0 : pageDefaults.gutterSize;
|
|
1898
|
+
const resolvedRowGap = rowGap != null ? rowGap : pageDefaults == null ? void 0 : pageDefaults.gutterSize;
|
|
1899
|
+
const resolvedMarginInline = marginInline != null ? marginInline : pageDefaults == null ? void 0 : pageDefaults.marginInline;
|
|
1872
1900
|
const styleVariables = {
|
|
1873
1901
|
...getResponsiveCSSProperties(
|
|
1874
|
-
|
|
1902
|
+
resolvedGridTemplateColumns,
|
|
1875
1903
|
"r",
|
|
1876
1904
|
"grid-template-columns"
|
|
1905
|
+
),
|
|
1906
|
+
...getResponsiveCSSProperties(grid, "r", "grid"),
|
|
1907
|
+
...getResponsiveCSSProperties(gridAutoColumns, "r", "grid-auto-columns"),
|
|
1908
|
+
...getResponsiveCSSProperties(gridAutoFlow, "r", "grid-auto-flow"),
|
|
1909
|
+
...getResponsiveCSSProperties(gridAutoRows, "r", "grid-auto-rows"),
|
|
1910
|
+
...getResponsiveCSSProperties(gridTemplate, "r", "grid-template"),
|
|
1911
|
+
...getResponsiveCSSProperties(gridTemplateRows, "r", "grid-template-rows"),
|
|
1912
|
+
...getResponsiveCSSProperties(
|
|
1913
|
+
gridTemplateAreas,
|
|
1914
|
+
"r",
|
|
1915
|
+
"grid-template-areas"
|
|
1877
1916
|
)
|
|
1878
1917
|
};
|
|
1879
1918
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1880
1919
|
Box,
|
|
1881
1920
|
{
|
|
1882
|
-
display: "grid",
|
|
1883
1921
|
...getBaseHTMLProps(
|
|
1884
1922
|
id,
|
|
1885
|
-
cn(
|
|
1923
|
+
cn(
|
|
1924
|
+
className,
|
|
1925
|
+
resolvedGridTemplateColumns && Grid_default["dds-grid-template-columns"],
|
|
1926
|
+
grid && Grid_default["dds-grid"],
|
|
1927
|
+
gridAutoColumns && Grid_default["dds-grid-auto-columns"],
|
|
1928
|
+
gridAutoFlow && Grid_default["dds-grid-auto-flow"],
|
|
1929
|
+
gridAutoRows && Grid_default["dds-grid-auto-rows"],
|
|
1930
|
+
gridTemplate && Grid_default["dds-grid-template"],
|
|
1931
|
+
gridTemplateRows && Grid_default["dds-grid-template-rows"],
|
|
1932
|
+
gridTemplateAreas && Grid_default["dds-grid-template-areas"]
|
|
1933
|
+
),
|
|
1886
1934
|
{ ...style, ...styleVariables },
|
|
1887
1935
|
htmlProps,
|
|
1888
1936
|
rest
|
|
1889
1937
|
),
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1938
|
+
display,
|
|
1939
|
+
marginInline: resolvedMarginInline,
|
|
1940
|
+
columnGap: resolvedColumnGap,
|
|
1941
|
+
rowGap: resolvedRowGap
|
|
1893
1942
|
}
|
|
1894
1943
|
);
|
|
1895
1944
|
};
|
|
@@ -1903,12 +1952,14 @@ var GridChild = ({
|
|
|
1903
1952
|
htmlProps,
|
|
1904
1953
|
style,
|
|
1905
1954
|
gridRow,
|
|
1955
|
+
gridArea,
|
|
1906
1956
|
justifySelf,
|
|
1907
1957
|
columnsOccupied,
|
|
1908
1958
|
...rest
|
|
1909
1959
|
}) => {
|
|
1910
1960
|
const styleVariables = {
|
|
1911
1961
|
...getResponsiveCSSProperties(gridRow, "r", "grid-row"),
|
|
1962
|
+
...getResponsiveCSSProperties(gridArea, "r", "grid-area"),
|
|
1912
1963
|
...getResponsiveCSSProperties(justifySelf, "r", "j-self"),
|
|
1913
1964
|
...getResponsiveCSSProperties(columnsOccupied, "r", "grid-column")
|
|
1914
1965
|
};
|
|
@@ -1921,6 +1972,7 @@ var GridChild = ({
|
|
|
1921
1972
|
className,
|
|
1922
1973
|
Grid_default["child-col-count"],
|
|
1923
1974
|
gridRow && Grid_default["dds-grid-row"],
|
|
1975
|
+
gridArea && Grid_default["dds-grid-area"],
|
|
1924
1976
|
justifySelf && Grid_default["dds-j-self"],
|
|
1925
1977
|
columnsOccupied && Grid_default["dds-grid-column"],
|
|
1926
1978
|
columnsOccupied === "firstHalf" && Grid_default["child--first-half"],
|
|
@@ -1965,8 +2017,8 @@ var Paper = ({
|
|
|
1965
2017
|
...rest
|
|
1966
2018
|
}) => {
|
|
1967
2019
|
const styleVariables = {
|
|
1968
|
-
...
|
|
1969
|
-
...
|
|
2020
|
+
...getCSSProperties(background, "paper", "background"),
|
|
2021
|
+
...getCSSProperties(border, "paper", "border")
|
|
1970
2022
|
};
|
|
1971
2023
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1972
2024
|
Box,
|
|
@@ -2154,12 +2206,6 @@ function Spinner(props) {
|
|
|
2154
2206
|
...rest
|
|
2155
2207
|
} = props;
|
|
2156
2208
|
const { t } = useTranslation();
|
|
2157
|
-
const mountTime = (0, import_react17.useRef)(Date.now());
|
|
2158
|
-
const animationDelay = -(mountTime.current % 1500);
|
|
2159
|
-
const styleVariables = {
|
|
2160
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2161
|
-
["--dds-spinner-animation-delay"]: animationDelay
|
|
2162
|
-
};
|
|
2163
2209
|
const generatedId = (0, import_react17.useId)();
|
|
2164
2210
|
const uniqueId = `${generatedId}-spinnerTitle`;
|
|
2165
2211
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
@@ -2188,8 +2234,7 @@ function Spinner(props) {
|
|
|
2188
2234
|
cy: "12.25",
|
|
2189
2235
|
r: "6",
|
|
2190
2236
|
fill: getTextColor(color),
|
|
2191
|
-
className: Spinner_default.jordskifterett
|
|
2192
|
-
style: styleVariables
|
|
2237
|
+
className: Spinner_default.jordskifterett
|
|
2193
2238
|
}
|
|
2194
2239
|
),
|
|
2195
2240
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
@@ -2200,8 +2245,7 @@ function Spinner(props) {
|
|
|
2200
2245
|
width: "16",
|
|
2201
2246
|
height: "4",
|
|
2202
2247
|
fill: getTextColor(color),
|
|
2203
|
-
className: Spinner_default.lagmannsrett
|
|
2204
|
-
style: styleVariables
|
|
2248
|
+
className: Spinner_default.lagmannsrett
|
|
2205
2249
|
}
|
|
2206
2250
|
),
|
|
2207
2251
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
@@ -2209,8 +2253,7 @@ function Spinner(props) {
|
|
|
2209
2253
|
{
|
|
2210
2254
|
d: "M12 16.6154C16.4183 16.6154 20 12.7581 20 8H4C4 12.7581 7.58172 16.6154 12 16.6154Z",
|
|
2211
2255
|
fill: getTextColor(color),
|
|
2212
|
-
className: Spinner_default.tingrett
|
|
2213
|
-
style: styleVariables
|
|
2256
|
+
className: Spinner_default.tingrett
|
|
2214
2257
|
}
|
|
2215
2258
|
)
|
|
2216
2259
|
]
|
|
@@ -2309,22 +2352,6 @@ var HiddenInput = ({
|
|
|
2309
2352
|
...rest
|
|
2310
2353
|
}) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { className: cn(className, utilStyles_default["hide-input"]), ...rest });
|
|
2311
2354
|
|
|
2312
|
-
// src/components/helpers/ScreenSize/ScreenSize.utils.tsx
|
|
2313
|
-
var getLiteralScreenSize = (screenSize) => {
|
|
2314
|
-
switch (screenSize) {
|
|
2315
|
-
case 4 /* XLarge */:
|
|
2316
|
-
return "xl";
|
|
2317
|
-
case 3 /* Large */:
|
|
2318
|
-
return "lg";
|
|
2319
|
-
case 2 /* Medium */:
|
|
2320
|
-
return "md";
|
|
2321
|
-
case 1 /* Small */:
|
|
2322
|
-
return "sm";
|
|
2323
|
-
case 0 /* XSmall */:
|
|
2324
|
-
return "xs";
|
|
2325
|
-
}
|
|
2326
|
-
};
|
|
2327
|
-
|
|
2328
2355
|
// src/components/helpers/StylelessButton/StylelessButton.tsx
|
|
2329
2356
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2330
2357
|
var StylelessButton = ({
|
|
@@ -2591,6 +2618,7 @@ function SvgWrapper({
|
|
|
2591
2618
|
// destructure for å unngå at `iconState` blir sendt videre til svg-elementet som ugyldig custom attribute.
|
|
2592
2619
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2593
2620
|
iconState: _iconState,
|
|
2621
|
+
style,
|
|
2594
2622
|
...props
|
|
2595
2623
|
}) {
|
|
2596
2624
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
@@ -2602,6 +2630,7 @@ function SvgWrapper({
|
|
|
2602
2630
|
viewBox: `0 0 ${size} ${size}`,
|
|
2603
2631
|
className: cn(className, Icon_default.svg),
|
|
2604
2632
|
style: {
|
|
2633
|
+
...style,
|
|
2605
2634
|
height: height ? height : sizeCSS,
|
|
2606
2635
|
width: width ? width : sizeCSS
|
|
2607
2636
|
},
|
|
@@ -4157,8 +4186,7 @@ function DdsProvider({ language, theme, children }) {
|
|
|
4157
4186
|
var Accordion_default = {
|
|
4158
4187
|
container: "Accordion_container",
|
|
4159
4188
|
"header-button": "Accordion_header-button",
|
|
4160
|
-
chevron: "Accordion_chevron"
|
|
4161
|
-
body: "Accordion_body"
|
|
4189
|
+
chevron: "Accordion_chevron"
|
|
4162
4190
|
};
|
|
4163
4191
|
|
|
4164
4192
|
// src/components/Accordion/Accordion.tsx
|
|
@@ -6962,7 +6990,7 @@ var CalendarPopoverContent = ({
|
|
|
6962
6990
|
});
|
|
6963
6991
|
const themeContext = (0, import_react41.useContext)(ThemeContext);
|
|
6964
6992
|
if (!themeContext) {
|
|
6965
|
-
throw new Error("DatePicker must be used within a
|
|
6993
|
+
throw new Error("DatePicker must be used within a DdsProvider");
|
|
6966
6994
|
}
|
|
6967
6995
|
const portalTarget = themeContext.el;
|
|
6968
6996
|
const { t } = useTranslation();
|
|
@@ -6972,7 +7000,7 @@ var CalendarPopoverContent = ({
|
|
|
6972
7000
|
const hasTransitionedIn = useMountTransition(isOpen, 500);
|
|
6973
7001
|
const isMounted = isOpen && hasTransitionedIn;
|
|
6974
7002
|
const combinedRef = useCombinedRef(refs.setFloating, ref);
|
|
6975
|
-
useOnClickOutside([ref, modalRef], onClose);
|
|
7003
|
+
useOnClickOutside([ref, modalRef, anchorRef != null ? anchorRef : void 0], onClose);
|
|
6976
7004
|
(0, import_react41.useEffect)(() => {
|
|
6977
7005
|
var _a;
|
|
6978
7006
|
refs.setReference((_a = anchorRef == null ? void 0 : anchorRef.current) != null ? _a : null);
|
|
@@ -7672,7 +7700,6 @@ function DateInput({
|
|
|
7672
7700
|
return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(
|
|
7673
7701
|
"div",
|
|
7674
7702
|
{
|
|
7675
|
-
...groupProps,
|
|
7676
7703
|
className: cn(className, Input_default.container),
|
|
7677
7704
|
ref,
|
|
7678
7705
|
children: [
|
|
@@ -7698,6 +7725,12 @@ function DateInput({
|
|
|
7698
7725
|
"div",
|
|
7699
7726
|
{
|
|
7700
7727
|
...fieldProps,
|
|
7728
|
+
...groupProps,
|
|
7729
|
+
onKeyDown: (e) => {
|
|
7730
|
+
var _a, _b;
|
|
7731
|
+
(_a = fieldProps == null ? void 0 : fieldProps.onKeyDown) == null ? void 0 : _a.call(fieldProps, e);
|
|
7732
|
+
(_b = groupProps == null ? void 0 : groupProps.onKeyDown) == null ? void 0 : _b.call(groupProps, e);
|
|
7733
|
+
},
|
|
7701
7734
|
ref: internalRef,
|
|
7702
7735
|
className: cn(
|
|
7703
7736
|
Input_default.input,
|
|
@@ -8331,7 +8364,7 @@ var Drawer = ({
|
|
|
8331
8364
|
}) => {
|
|
8332
8365
|
const themeContext = (0, import_react53.useContext)(ThemeContext);
|
|
8333
8366
|
if (!themeContext) {
|
|
8334
|
-
throw new Error("Drawer must be used within a
|
|
8367
|
+
throw new Error("Drawer must be used within a DdsProvider");
|
|
8335
8368
|
}
|
|
8336
8369
|
const { t } = useTranslation();
|
|
8337
8370
|
const portalTarget = parentElement != null ? parentElement : themeContext == null ? void 0 : themeContext.el;
|
|
@@ -9545,6 +9578,45 @@ var texts16 = createTexts({
|
|
|
9545
9578
|
var import_file_selector = require("file-selector");
|
|
9546
9579
|
var import_react61 = require("react");
|
|
9547
9580
|
|
|
9581
|
+
// src/components/FileUploader/attr-accept.ts
|
|
9582
|
+
function isAccepted(file, acceptedFiles) {
|
|
9583
|
+
if (file && acceptedFiles) {
|
|
9584
|
+
const acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(",");
|
|
9585
|
+
const fileName = file.name || "";
|
|
9586
|
+
const mimeType = (file.type || "").toLowerCase();
|
|
9587
|
+
const baseMimeType = mimeType.split("/")[0] || "";
|
|
9588
|
+
return acceptedFilesArray.some((type) => {
|
|
9589
|
+
const validType = type.trim().toLowerCase();
|
|
9590
|
+
if (validType.charAt(0) === ".") {
|
|
9591
|
+
return fileName.toLowerCase().endsWith(validType);
|
|
9592
|
+
} else if (validType.endsWith("/*")) {
|
|
9593
|
+
return baseMimeType === validType.slice(0, -2);
|
|
9594
|
+
}
|
|
9595
|
+
return mimeType === validType;
|
|
9596
|
+
});
|
|
9597
|
+
}
|
|
9598
|
+
return true;
|
|
9599
|
+
}
|
|
9600
|
+
|
|
9601
|
+
// src/components/FileUploader/FileUploader.utils.ts
|
|
9602
|
+
var preventDefaults = (event) => {
|
|
9603
|
+
event.preventDefault();
|
|
9604
|
+
event.stopPropagation();
|
|
9605
|
+
};
|
|
9606
|
+
var isDragEvent = (event) => {
|
|
9607
|
+
const asDragEvent = event;
|
|
9608
|
+
return asDragEvent.dataTransfer !== void 0;
|
|
9609
|
+
};
|
|
9610
|
+
var isEventWithFiles = (event) => {
|
|
9611
|
+
if (!isDragEvent(event)) {
|
|
9612
|
+
return event.target.files !== null && event.target.files !== void 0;
|
|
9613
|
+
}
|
|
9614
|
+
return event.dataTransfer.types.includes("Files") || event.dataTransfer.types.includes("application/x-moz-file");
|
|
9615
|
+
};
|
|
9616
|
+
var isFileAccepted = (file, accept) => {
|
|
9617
|
+
return accept !== void 0 ? isAccepted(file, accept) : true;
|
|
9618
|
+
};
|
|
9619
|
+
|
|
9548
9620
|
// src/components/FileUploader/fileUploaderReducer.ts
|
|
9549
9621
|
var fileUploaderReducer = (state, action) => {
|
|
9550
9622
|
switch (action.type) {
|
|
@@ -9588,45 +9660,6 @@ var fileUploaderReducer = (state, action) => {
|
|
|
9588
9660
|
}
|
|
9589
9661
|
};
|
|
9590
9662
|
|
|
9591
|
-
// src/components/FileUploader/attr-accept.ts
|
|
9592
|
-
function isAccepted(file, acceptedFiles) {
|
|
9593
|
-
if (file && acceptedFiles) {
|
|
9594
|
-
const acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(",");
|
|
9595
|
-
const fileName = file.name || "";
|
|
9596
|
-
const mimeType = (file.type || "").toLowerCase();
|
|
9597
|
-
const baseMimeType = mimeType.split("/")[0] || "";
|
|
9598
|
-
return acceptedFilesArray.some((type) => {
|
|
9599
|
-
const validType = type.trim().toLowerCase();
|
|
9600
|
-
if (validType.charAt(0) === ".") {
|
|
9601
|
-
return fileName.toLowerCase().endsWith(validType);
|
|
9602
|
-
} else if (validType.endsWith("/*")) {
|
|
9603
|
-
return baseMimeType === validType.slice(0, -2);
|
|
9604
|
-
}
|
|
9605
|
-
return mimeType === validType;
|
|
9606
|
-
});
|
|
9607
|
-
}
|
|
9608
|
-
return true;
|
|
9609
|
-
}
|
|
9610
|
-
|
|
9611
|
-
// src/components/FileUploader/utils.ts
|
|
9612
|
-
var preventDefaults = (event) => {
|
|
9613
|
-
event.preventDefault();
|
|
9614
|
-
event.stopPropagation();
|
|
9615
|
-
};
|
|
9616
|
-
var isDragEvent = (event) => {
|
|
9617
|
-
const asDragEvent = event;
|
|
9618
|
-
return asDragEvent.dataTransfer !== void 0;
|
|
9619
|
-
};
|
|
9620
|
-
var isEventWithFiles = (event) => {
|
|
9621
|
-
if (!isDragEvent(event)) {
|
|
9622
|
-
return event.target.files !== null && event.target.files !== void 0;
|
|
9623
|
-
}
|
|
9624
|
-
return event.dataTransfer.types.includes("Files") || event.dataTransfer.types.includes("application/x-moz-file");
|
|
9625
|
-
};
|
|
9626
|
-
var isFileAccepted = (file, accept) => {
|
|
9627
|
-
return accept !== void 0 ? isAccepted(file, accept) : true;
|
|
9628
|
-
};
|
|
9629
|
-
|
|
9630
9663
|
// src/components/FileUploader/useFileUploader.ts
|
|
9631
9664
|
var calcRootErrors = (maxFilesErrorMessage, files, maxFiles, errorMessage) => {
|
|
9632
9665
|
const errors = [];
|
|
@@ -10126,7 +10159,7 @@ var import_jsx_runtime284 = require("react/jsx-runtime");
|
|
|
10126
10159
|
var FooterListHeader = (props) => /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(Heading, { level: 2, typographyType: "headingSmall", ...props });
|
|
10127
10160
|
|
|
10128
10161
|
// src/components/Footer/norges_domstoler_logo.svg
|
|
10129
|
-
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';
|
|
10162
|
+
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';
|
|
10130
10163
|
|
|
10131
10164
|
// src/components/Footer/FooterLogo.tsx
|
|
10132
10165
|
var import_jsx_runtime285 = require("react/jsx-runtime");
|
|
@@ -10963,18 +10996,10 @@ var import_react71 = require("react");
|
|
|
10963
10996
|
var LocalMessage_default = {
|
|
10964
10997
|
container: "LocalMessage_container",
|
|
10965
10998
|
"container--info": "LocalMessage_container--info",
|
|
10966
|
-
icon: "LocalMessage_icon",
|
|
10967
10999
|
"container--warning": "LocalMessage_container--warning",
|
|
10968
11000
|
"container--danger": "LocalMessage_container--danger",
|
|
10969
11001
|
"container--success": "LocalMessage_container--success",
|
|
10970
|
-
"container--tips": "LocalMessage_container--tips"
|
|
10971
|
-
"container--horisontal": "LocalMessage_container--horisontal",
|
|
10972
|
-
"container--horisontal--closable": "LocalMessage_container--horisontal--closable",
|
|
10973
|
-
"container--vertical": "LocalMessage_container--vertical",
|
|
10974
|
-
"container--vertical--closable": "LocalMessage_container--vertical--closable",
|
|
10975
|
-
container__text: "LocalMessage_container__text",
|
|
10976
|
-
container__icon: "LocalMessage_container__icon",
|
|
10977
|
-
container__button: "LocalMessage_container__button"
|
|
11002
|
+
"container--tips": "LocalMessage_container--tips"
|
|
10978
11003
|
};
|
|
10979
11004
|
|
|
10980
11005
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
@@ -11007,12 +11032,28 @@ var LocalMessage = ({
|
|
|
11007
11032
|
...rest
|
|
11008
11033
|
}) => {
|
|
11009
11034
|
const { t } = useTranslation();
|
|
11010
|
-
const [
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
11035
|
+
const [isOpen, setOpen] = (0, import_react71.useState)(true);
|
|
11036
|
+
const gridLayout = closable ? `${layout}-closable` : layout;
|
|
11037
|
+
const containerGridTemplateStyles = {
|
|
11038
|
+
horisontal: {
|
|
11039
|
+
gridTemplateAreas: `"icon text"`,
|
|
11040
|
+
gridTemplateColumns: "min-content 1fr"
|
|
11041
|
+
},
|
|
11042
|
+
"horisontal-closable": {
|
|
11043
|
+
gridTemplateAreas: `"icon text close-btn"`,
|
|
11044
|
+
gridTemplateColumns: "min-content 1fr min-content"
|
|
11045
|
+
},
|
|
11046
|
+
vertical: {
|
|
11047
|
+
gridTemplateAreas: `"icon" "text"`,
|
|
11048
|
+
gridTemplateColumns: "1fr"
|
|
11049
|
+
},
|
|
11050
|
+
"vertical-closable": {
|
|
11051
|
+
gridTemplateAreas: `"icon close-btn" "text text"`,
|
|
11052
|
+
gridTemplateColumns: "1fr min-content"
|
|
11053
|
+
}
|
|
11054
|
+
};
|
|
11055
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(
|
|
11056
|
+
Grid,
|
|
11016
11057
|
{
|
|
11017
11058
|
...getBaseHTMLProps(
|
|
11018
11059
|
id,
|
|
@@ -11020,8 +11061,6 @@ var LocalMessage = ({
|
|
|
11020
11061
|
className,
|
|
11021
11062
|
typographyStyles_default["body-short-medium"],
|
|
11022
11063
|
LocalMessage_default.container,
|
|
11023
|
-
LocalMessage_default[`container--${layout}`],
|
|
11024
|
-
closable && LocalMessage_default[`container--${layout}--closable`],
|
|
11025
11064
|
LocalMessage_default[`container--${purpose}`]
|
|
11026
11065
|
),
|
|
11027
11066
|
style,
|
|
@@ -11029,36 +11068,41 @@ var LocalMessage = ({
|
|
|
11029
11068
|
rest
|
|
11030
11069
|
),
|
|
11031
11070
|
width,
|
|
11032
|
-
display: "grid",
|
|
11033
11071
|
padding: "x0.75 x0.75 x0.75 x0.5",
|
|
11034
|
-
|
|
11072
|
+
rowGap: "x0.5",
|
|
11073
|
+
columnGap: "x0.5",
|
|
11074
|
+
marginInline: "x0",
|
|
11075
|
+
...containerGridTemplateStyles[gridLayout],
|
|
11035
11076
|
children: [
|
|
11036
11077
|
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
11037
|
-
|
|
11078
|
+
GridChild,
|
|
11038
11079
|
{
|
|
11080
|
+
as: Icon,
|
|
11081
|
+
gridArea: "icon",
|
|
11039
11082
|
iconSize: "component",
|
|
11040
11083
|
icon: icons2[purpose],
|
|
11041
|
-
|
|
11084
|
+
color: `var(--dds-color-icon-on-${purpose === "tips" ? "info" : purpose}-default)`
|
|
11042
11085
|
}
|
|
11043
11086
|
),
|
|
11044
|
-
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
11087
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(GridChild, { gridArea: "text", children }),
|
|
11045
11088
|
closable && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
11046
|
-
|
|
11089
|
+
GridChild,
|
|
11047
11090
|
{
|
|
11091
|
+
as: Button,
|
|
11092
|
+
gridArea: "close-btn",
|
|
11048
11093
|
icon: CloseIcon,
|
|
11049
11094
|
purpose: "tertiary",
|
|
11050
11095
|
onClick: () => {
|
|
11051
|
-
|
|
11096
|
+
setOpen(false);
|
|
11052
11097
|
onClose == null ? void 0 : onClose();
|
|
11053
11098
|
},
|
|
11054
11099
|
size: "xsmall",
|
|
11055
|
-
"aria-label": t(commonTexts.closeMessage)
|
|
11056
|
-
className: LocalMessage_default.container__button
|
|
11100
|
+
"aria-label": t(commonTexts.closeMessage)
|
|
11057
11101
|
}
|
|
11058
11102
|
)
|
|
11059
11103
|
]
|
|
11060
11104
|
}
|
|
11061
|
-
);
|
|
11105
|
+
) : null;
|
|
11062
11106
|
};
|
|
11063
11107
|
LocalMessage.displayName = "LocalMessage";
|
|
11064
11108
|
|
|
@@ -11108,7 +11152,7 @@ var Modal = ({
|
|
|
11108
11152
|
};
|
|
11109
11153
|
const themeContext = (0, import_react72.useContext)(ThemeContext);
|
|
11110
11154
|
if (!themeContext) {
|
|
11111
|
-
throw new Error("Modal must be used within a
|
|
11155
|
+
throw new Error("Modal must be used within a DdsProvider");
|
|
11112
11156
|
}
|
|
11113
11157
|
const { t } = useTranslation();
|
|
11114
11158
|
const portalTarget = parentElement != null ? parentElement : themeContext == null ? void 0 : themeContext.el;
|
|
@@ -11427,9 +11471,6 @@ var import_react76 = require("react");
|
|
|
11427
11471
|
|
|
11428
11472
|
// src/components/Pagination/Pagination.module.css
|
|
11429
11473
|
var Pagination_default = {
|
|
11430
|
-
list: "Pagination_list",
|
|
11431
|
-
list__item: "Pagination_list__item",
|
|
11432
|
-
indicators: "Pagination_indicators",
|
|
11433
11474
|
"truncation-icon": "Pagination_truncation-icon"
|
|
11434
11475
|
};
|
|
11435
11476
|
|
|
@@ -12195,6 +12236,7 @@ var createSelectOptions = (...args) => args.map((v) => ({ label: v, value: v }))
|
|
|
12195
12236
|
|
|
12196
12237
|
// src/components/Pagination/Pagination.tsx
|
|
12197
12238
|
var import_jsx_runtime311 = require("react/jsx-runtime");
|
|
12239
|
+
var import_react77 = require("react");
|
|
12198
12240
|
var Pagination = ({
|
|
12199
12241
|
itemsAmount,
|
|
12200
12242
|
defaultItemsPerPage = 10,
|
|
@@ -12247,9 +12289,22 @@ var Pagination = ({
|
|
|
12247
12289
|
onSelectOptionChange(option);
|
|
12248
12290
|
}
|
|
12249
12291
|
};
|
|
12292
|
+
const listItemProps = {
|
|
12293
|
+
as: "li",
|
|
12294
|
+
display: "inline-grid",
|
|
12295
|
+
alignContent: "center"
|
|
12296
|
+
};
|
|
12297
|
+
const listProps = {
|
|
12298
|
+
as: "ol",
|
|
12299
|
+
defaultPageLayout: false,
|
|
12300
|
+
gridAutoFlow: "column",
|
|
12301
|
+
margin: "x0",
|
|
12302
|
+
padding: "x0",
|
|
12303
|
+
gap: "x0.75"
|
|
12304
|
+
};
|
|
12250
12305
|
const listItems = items.length > 0 ? items.map((item, i) => {
|
|
12251
12306
|
const isActive = item === activePage;
|
|
12252
|
-
return /* @__PURE__ */ (0,
|
|
12307
|
+
return /* @__PURE__ */ (0, import_react77.createElement)(Box, { ...listItemProps, key: `pagination-item-${i}` }, item !== "truncator" && typeof item === "number" ? /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12253
12308
|
Button,
|
|
12254
12309
|
{
|
|
12255
12310
|
purpose: isActive ? "primary" : "secondary",
|
|
@@ -12266,7 +12321,7 @@ var Pagination = ({
|
|
|
12266
12321
|
icon: MoreHorizontalIcon,
|
|
12267
12322
|
className: Pagination_default["truncation-icon"]
|
|
12268
12323
|
}
|
|
12269
|
-
)
|
|
12324
|
+
));
|
|
12270
12325
|
}) : void 0;
|
|
12271
12326
|
const previousPageButton = /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12272
12327
|
Button,
|
|
@@ -12307,125 +12362,97 @@ var Pagination = ({
|
|
|
12307
12362
|
...baseHTMLProps
|
|
12308
12363
|
},
|
|
12309
12364
|
children: [
|
|
12310
|
-
/* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(
|
|
12311
|
-
|
|
12312
|
-
|
|
12313
|
-
|
|
12314
|
-
|
|
12315
|
-
|
|
12316
|
-
|
|
12317
|
-
|
|
12318
|
-
|
|
12319
|
-
|
|
12320
|
-
|
|
12321
|
-
|
|
12322
|
-
|
|
12323
|
-
|
|
12324
|
-
|
|
12325
|
-
|
|
12326
|
-
|
|
12327
|
-
|
|
12328
|
-
|
|
12329
|
-
|
|
12330
|
-
|
|
12365
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(Grid, { ...listProps, hideBelow: smallScreenBreakpoint, children: [
|
|
12366
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12367
|
+
Box,
|
|
12368
|
+
{
|
|
12369
|
+
...listItemProps,
|
|
12370
|
+
className: isOnFirstPage ? utilStyles_default.invisible : void 0,
|
|
12371
|
+
"aria-hidden": isOnFirstPage,
|
|
12372
|
+
children: previousPageButton
|
|
12373
|
+
}
|
|
12374
|
+
),
|
|
12375
|
+
listItems,
|
|
12376
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12377
|
+
Box,
|
|
12378
|
+
{
|
|
12379
|
+
...listItemProps,
|
|
12380
|
+
className: isOnLastPage ? utilStyles_default.invisible : void 0,
|
|
12381
|
+
"aria-hidden": isOnLastPage,
|
|
12382
|
+
children: nextPageButton
|
|
12383
|
+
}
|
|
12384
|
+
)
|
|
12385
|
+
] }),
|
|
12386
|
+
!!smallScreenBreakpoint && /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(Grid, { ...listProps, showBelow: smallScreenBreakpoint, children: [
|
|
12387
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12388
|
+
Box,
|
|
12389
|
+
{
|
|
12390
|
+
...listItemProps,
|
|
12391
|
+
className: isOnFirstPage ? utilStyles_default.invisible : void 0,
|
|
12392
|
+
"aria-hidden": isOnFirstPage,
|
|
12393
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12394
|
+
Button,
|
|
12331
12395
|
{
|
|
12332
|
-
|
|
12333
|
-
|
|
12334
|
-
|
|
12335
|
-
)
|
|
12336
|
-
|
|
12337
|
-
|
|
12396
|
+
purpose: "secondary",
|
|
12397
|
+
size: "small",
|
|
12398
|
+
icon: ChevronFirstIcon,
|
|
12399
|
+
onClick: (event) => {
|
|
12400
|
+
onPageChange(event, 1);
|
|
12401
|
+
},
|
|
12402
|
+
"aria-label": t(texts22.firstPage)
|
|
12338
12403
|
}
|
|
12339
12404
|
)
|
|
12340
|
-
|
|
12341
|
-
|
|
12342
|
-
|
|
12343
|
-
|
|
12344
|
-
|
|
12345
|
-
|
|
12346
|
-
|
|
12347
|
-
|
|
12348
|
-
|
|
12349
|
-
|
|
12350
|
-
|
|
12351
|
-
|
|
12352
|
-
|
|
12353
|
-
|
|
12354
|
-
|
|
12355
|
-
|
|
12356
|
-
|
|
12357
|
-
|
|
12358
|
-
|
|
12359
|
-
|
|
12360
|
-
|
|
12361
|
-
|
|
12362
|
-
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
|
|
12375
|
-
|
|
12376
|
-
|
|
12377
|
-
isOnFirstPage && utilStyles_default.invisible
|
|
12378
|
-
),
|
|
12379
|
-
"aria-hidden": isOnFirstPage,
|
|
12380
|
-
children: previousPageButton
|
|
12381
|
-
}
|
|
12382
|
-
),
|
|
12383
|
-
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("li", { className: Pagination_default.list__item, children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12405
|
+
}
|
|
12406
|
+
),
|
|
12407
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12408
|
+
Box,
|
|
12409
|
+
{
|
|
12410
|
+
...listItemProps,
|
|
12411
|
+
className: isOnFirstPage ? utilStyles_default.invisible : void 0,
|
|
12412
|
+
"aria-hidden": isOnFirstPage,
|
|
12413
|
+
children: previousPageButton
|
|
12414
|
+
}
|
|
12415
|
+
),
|
|
12416
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(Box, { ...listItemProps, children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12417
|
+
Button,
|
|
12418
|
+
{
|
|
12419
|
+
size: "small",
|
|
12420
|
+
onClick: (event) => {
|
|
12421
|
+
onPageChange(event, activePage);
|
|
12422
|
+
},
|
|
12423
|
+
children: activePage
|
|
12424
|
+
}
|
|
12425
|
+
) }),
|
|
12426
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12427
|
+
Box,
|
|
12428
|
+
{
|
|
12429
|
+
...listItemProps,
|
|
12430
|
+
className: isOnLastPage ? utilStyles_default.invisible : void 0,
|
|
12431
|
+
"aria-hidden": isOnLastPage,
|
|
12432
|
+
children: nextPageButton
|
|
12433
|
+
}
|
|
12434
|
+
),
|
|
12435
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12436
|
+
Box,
|
|
12437
|
+
{
|
|
12438
|
+
...listItemProps,
|
|
12439
|
+
className: isOnLastPage ? utilStyles_default.invisible : void 0,
|
|
12440
|
+
"aria-hidden": isOnLastPage,
|
|
12441
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12384
12442
|
Button,
|
|
12385
12443
|
{
|
|
12444
|
+
purpose: "secondary",
|
|
12386
12445
|
size: "small",
|
|
12446
|
+
icon: ChevronLastIcon,
|
|
12387
12447
|
onClick: (event) => {
|
|
12388
|
-
onPageChange(event,
|
|
12448
|
+
onPageChange(event, pagesLength);
|
|
12389
12449
|
},
|
|
12390
|
-
|
|
12391
|
-
}
|
|
12392
|
-
) }),
|
|
12393
|
-
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12394
|
-
"li",
|
|
12395
|
-
{
|
|
12396
|
-
className: cn(
|
|
12397
|
-
Pagination_default.list__item,
|
|
12398
|
-
isOnLastPage && utilStyles_default.invisible
|
|
12399
|
-
),
|
|
12400
|
-
"aria-hidden": isOnLastPage,
|
|
12401
|
-
children: nextPageButton
|
|
12402
|
-
}
|
|
12403
|
-
),
|
|
12404
|
-
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12405
|
-
"li",
|
|
12406
|
-
{
|
|
12407
|
-
className: cn(
|
|
12408
|
-
Pagination_default.list__item,
|
|
12409
|
-
isOnLastPage && utilStyles_default.invisible
|
|
12410
|
-
),
|
|
12411
|
-
"aria-hidden": isOnLastPage,
|
|
12412
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12413
|
-
Button,
|
|
12414
|
-
{
|
|
12415
|
-
purpose: "secondary",
|
|
12416
|
-
size: "small",
|
|
12417
|
-
icon: ChevronLastIcon,
|
|
12418
|
-
onClick: (event) => {
|
|
12419
|
-
onPageChange(event, pagesLength);
|
|
12420
|
-
},
|
|
12421
|
-
"aria-label": t(texts22.lastPage)
|
|
12422
|
-
}
|
|
12423
|
-
)
|
|
12450
|
+
"aria-label": t(texts22.lastPage)
|
|
12424
12451
|
}
|
|
12425
12452
|
)
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
)
|
|
12453
|
+
}
|
|
12454
|
+
)
|
|
12455
|
+
] })
|
|
12429
12456
|
]
|
|
12430
12457
|
}
|
|
12431
12458
|
) : null;
|
|
@@ -12443,12 +12470,12 @@ var Pagination = ({
|
|
|
12443
12470
|
...baseHTMLProps,
|
|
12444
12471
|
children: [
|
|
12445
12472
|
/* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(
|
|
12446
|
-
|
|
12473
|
+
Grid,
|
|
12447
12474
|
{
|
|
12448
|
-
|
|
12475
|
+
defaultPageLayout: false,
|
|
12449
12476
|
gap: "x0.5",
|
|
12450
12477
|
alignItems: "center",
|
|
12451
|
-
|
|
12478
|
+
gridAutoFlow: "column",
|
|
12452
12479
|
children: [
|
|
12453
12480
|
withSelect && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
12454
12481
|
Select,
|
|
@@ -12528,7 +12555,7 @@ var texts22 = createTexts({
|
|
|
12528
12555
|
});
|
|
12529
12556
|
|
|
12530
12557
|
// src/components/PhoneInput/PhoneInput.tsx
|
|
12531
|
-
var
|
|
12558
|
+
var import_react78 = require("react");
|
|
12532
12559
|
|
|
12533
12560
|
// src/components/PhoneInput/constants.ts
|
|
12534
12561
|
var COUNTRIES = {
|
|
@@ -12942,9 +12969,7 @@ var prioritizedCountryOptions = prioritizedCountries.map((country) => {
|
|
|
12942
12969
|
countryCode: country.id
|
|
12943
12970
|
};
|
|
12944
12971
|
});
|
|
12945
|
-
var
|
|
12946
|
-
COUNTRIES
|
|
12947
|
-
).sort((a, b) => {
|
|
12972
|
+
var compareCountriesByName = (a, b) => {
|
|
12948
12973
|
if (a.name < b.name) {
|
|
12949
12974
|
return -1;
|
|
12950
12975
|
}
|
|
@@ -12952,18 +12977,21 @@ var sortedCountryOptions = Object.values(
|
|
|
12952
12977
|
return 1;
|
|
12953
12978
|
}
|
|
12954
12979
|
return 0;
|
|
12955
|
-
}
|
|
12956
|
-
|
|
12957
|
-
|
|
12958
|
-
|
|
12959
|
-
(country) =>
|
|
12960
|
-
|
|
12961
|
-
|
|
12962
|
-
)
|
|
12963
|
-
|
|
12964
|
-
|
|
12965
|
-
|
|
12966
|
-
|
|
12980
|
+
};
|
|
12981
|
+
var createCountryOptions = (countries) => {
|
|
12982
|
+
const sortedCountryOptions = Object.values(
|
|
12983
|
+
countries
|
|
12984
|
+
).sort(compareCountriesByName).map((country) => ({
|
|
12985
|
+
countryCode: country.id,
|
|
12986
|
+
label: `${country.name} ${country.dialCode}`
|
|
12987
|
+
})).filter(
|
|
12988
|
+
(country) => !prioritizedCountryOptions.some(
|
|
12989
|
+
(pCountry) => pCountry.countryCode === country.countryCode
|
|
12990
|
+
)
|
|
12991
|
+
);
|
|
12992
|
+
return [...prioritizedCountryOptions, ...sortedCountryOptions];
|
|
12993
|
+
};
|
|
12994
|
+
var countryOptions = createCountryOptions(COUNTRIES);
|
|
12967
12995
|
var PhoneInput = ({
|
|
12968
12996
|
label,
|
|
12969
12997
|
readOnly,
|
|
@@ -12991,7 +13019,7 @@ var PhoneInput = ({
|
|
|
12991
13019
|
const { t } = useTranslation();
|
|
12992
13020
|
const tGroupLabel = groupLabel != null ? groupLabel : t(texts23.countryCodeAndPhoneNumber);
|
|
12993
13021
|
const tSelectLabel = selectLabel != null ? selectLabel : t(texts23.countryCode);
|
|
12994
|
-
const generatedId = (0,
|
|
13022
|
+
const generatedId = (0, import_react78.useId)();
|
|
12995
13023
|
const uniqueId = (_a = props.id) != null ? _a : generatedId;
|
|
12996
13024
|
const phoneInputId = `${uniqueId}-phone-input`;
|
|
12997
13025
|
const phoneNumberId = `${uniqueId}-phone-number`;
|
|
@@ -13001,27 +13029,27 @@ var PhoneInput = ({
|
|
|
13001
13029
|
const hasMessage = hasErrorMessage || hasTip;
|
|
13002
13030
|
const tipId = derivativeIdGenerator(phoneInputId, "tip");
|
|
13003
13031
|
const errorMessageId = derivativeIdGenerator(phoneInputId, "errorMessage");
|
|
13004
|
-
const [callingCode, setCallingCode] = (0,
|
|
13005
|
-
const [selectedCountryCodeText, setSelectedCountryCodeText] = (0,
|
|
13006
|
-
const [internalValue, setInternalValue] = (0,
|
|
13032
|
+
const [callingCode, setCallingCode] = (0, import_react78.useState)("");
|
|
13033
|
+
const [selectedCountryCodeText, setSelectedCountryCodeText] = (0, import_react78.useState)("");
|
|
13034
|
+
const [internalValue, setInternalValue] = (0, import_react78.useState)(
|
|
13007
13035
|
defaultValue != null ? defaultValue : {
|
|
13008
13036
|
countryCode: "",
|
|
13009
13037
|
phoneNumber: ""
|
|
13010
13038
|
}
|
|
13011
13039
|
);
|
|
13012
13040
|
const isControlled = value !== void 0;
|
|
13013
|
-
const [callingCodeWidth, setCallingCodeWidth] = (0,
|
|
13014
|
-
const callingCodeRef = (0,
|
|
13015
|
-
(0,
|
|
13041
|
+
const [callingCodeWidth, setCallingCodeWidth] = (0, import_react78.useState)(0);
|
|
13042
|
+
const callingCodeRef = (0, import_react78.useRef)(null);
|
|
13043
|
+
(0, import_react78.useLayoutEffect)(() => {
|
|
13016
13044
|
if (callingCodeRef.current) {
|
|
13017
13045
|
setCallingCodeWidth(callingCodeRef.current.offsetWidth);
|
|
13018
13046
|
}
|
|
13019
13047
|
}, [callingCode]);
|
|
13020
13048
|
const callingCodeInlineStart = callingCodeWidth ? `calc(var(--dds-spacing-x1) + ${callingCodeWidth}px)` : void 0;
|
|
13021
|
-
const internalSelectRef = (0,
|
|
13049
|
+
const internalSelectRef = (0, import_react78.useRef)(null);
|
|
13022
13050
|
const combinedSelectRef = useCombinedRef(selectRef, internalSelectRef);
|
|
13023
13051
|
const displayedValue = isControlled ? value : internalValue;
|
|
13024
|
-
(0,
|
|
13052
|
+
(0, import_react78.useEffect)(() => {
|
|
13025
13053
|
const selectEl = internalSelectRef.current;
|
|
13026
13054
|
if (selectEl && selectEl.value) {
|
|
13027
13055
|
const { options, selectedIndex } = selectEl;
|
|
@@ -13183,7 +13211,7 @@ var texts23 = createTexts({
|
|
|
13183
13211
|
});
|
|
13184
13212
|
|
|
13185
13213
|
// src/components/Popover/Popover.tsx
|
|
13186
|
-
var
|
|
13214
|
+
var import_react80 = require("react");
|
|
13187
13215
|
var import_react_dom6 = require("react-dom");
|
|
13188
13216
|
|
|
13189
13217
|
// src/components/Popover/Popover.module.css
|
|
@@ -13195,9 +13223,9 @@ var Popover_default = {
|
|
|
13195
13223
|
};
|
|
13196
13224
|
|
|
13197
13225
|
// src/components/Popover/Popover.context.tsx
|
|
13198
|
-
var
|
|
13199
|
-
var PopoverContext = (0,
|
|
13200
|
-
var usePopoverContext = () => (0,
|
|
13226
|
+
var import_react79 = require("react");
|
|
13227
|
+
var PopoverContext = (0, import_react79.createContext)({});
|
|
13228
|
+
var usePopoverContext = () => (0, import_react79.useContext)(PopoverContext);
|
|
13201
13229
|
|
|
13202
13230
|
// src/components/Popover/Popover.tsx
|
|
13203
13231
|
var import_jsx_runtime313 = require("react/jsx-runtime");
|
|
@@ -13232,7 +13260,7 @@ var Popover = ({
|
|
|
13232
13260
|
});
|
|
13233
13261
|
const { maxHeight, maxWidth, minHeight, minWidth, height, width } = sizeProps;
|
|
13234
13262
|
const context = usePopoverContext();
|
|
13235
|
-
const themeContext = (0,
|
|
13263
|
+
const themeContext = (0, import_react80.useContext)(ThemeContext);
|
|
13236
13264
|
const portalTarget = parentElement != null ? parentElement : themeContext == null ? void 0 : themeContext.el;
|
|
13237
13265
|
const {
|
|
13238
13266
|
floatStyling: contextFloatStyling,
|
|
@@ -13246,7 +13274,7 @@ var Popover = ({
|
|
|
13246
13274
|
} = context;
|
|
13247
13275
|
const { t } = useTranslation();
|
|
13248
13276
|
const hasContext = !isEmpty(context);
|
|
13249
|
-
const generatedId = (0,
|
|
13277
|
+
const generatedId = (0, import_react80.useId)();
|
|
13250
13278
|
const uniquePopoverId = id != null ? id : `${generatedId}-popover`;
|
|
13251
13279
|
const [
|
|
13252
13280
|
popoverId,
|
|
@@ -13286,7 +13314,7 @@ var Popover = ({
|
|
|
13286
13314
|
anchorEl && anchorEl
|
|
13287
13315
|
);
|
|
13288
13316
|
const multiRef = useCombinedRef(ref, popoverRef, floatingRef);
|
|
13289
|
-
(0,
|
|
13317
|
+
(0, import_react80.useEffect)(() => {
|
|
13290
13318
|
setFloatOptions == null ? void 0 : setFloatOptions({ placement, offset });
|
|
13291
13319
|
}, [placement, offset]);
|
|
13292
13320
|
useOnClickOutside([popoverRef, anchorRef], () => {
|
|
@@ -13355,7 +13383,7 @@ var Popover = ({
|
|
|
13355
13383
|
Popover.displayName = "Popover";
|
|
13356
13384
|
|
|
13357
13385
|
// src/components/Popover/PopoverGroup.tsx
|
|
13358
|
-
var
|
|
13386
|
+
var import_react81 = require("react");
|
|
13359
13387
|
var import_jsx_runtime314 = require("react/jsx-runtime");
|
|
13360
13388
|
var PopoverGroup = ({
|
|
13361
13389
|
isOpen: propIsOpen,
|
|
@@ -13367,12 +13395,12 @@ var PopoverGroup = ({
|
|
|
13367
13395
|
popoverId
|
|
13368
13396
|
}) => {
|
|
13369
13397
|
var _a;
|
|
13370
|
-
const [internalIsOpen, internalSetIsOpen] = (0,
|
|
13398
|
+
const [internalIsOpen, internalSetIsOpen] = (0, import_react81.useState)(isInitiallyOpen);
|
|
13371
13399
|
const open = propIsOpen != null ? propIsOpen : internalIsOpen;
|
|
13372
13400
|
const setOpen = propSetIsOpen != null ? propSetIsOpen : internalSetIsOpen;
|
|
13373
|
-
const generatedId = (0,
|
|
13401
|
+
const generatedId = (0, import_react81.useId)();
|
|
13374
13402
|
const uniquePopoverId = popoverId != null ? popoverId : `${generatedId}-popover`;
|
|
13375
|
-
const [floatOptions, setFloatOptions] = (0,
|
|
13403
|
+
const [floatOptions, setFloatOptions] = (0, import_react81.useState)();
|
|
13376
13404
|
const {
|
|
13377
13405
|
refs,
|
|
13378
13406
|
styles: positionStyles,
|
|
@@ -13393,10 +13421,10 @@ var PopoverGroup = ({
|
|
|
13393
13421
|
handleOpen();
|
|
13394
13422
|
}
|
|
13395
13423
|
};
|
|
13396
|
-
const buttonRef = (0,
|
|
13424
|
+
const buttonRef = (0, import_react81.useRef)(null);
|
|
13397
13425
|
const anchorRef = refs.setReference;
|
|
13398
13426
|
const combinedAnchorRef = useCombinedRef(buttonRef, anchorRef);
|
|
13399
|
-
const popoverRef = (0,
|
|
13427
|
+
const popoverRef = (0, import_react81.useRef)(null);
|
|
13400
13428
|
const floatingRef = refs.setFloating;
|
|
13401
13429
|
const combinedPopoverRef = useCombinedRef(popoverRef, floatingRef);
|
|
13402
13430
|
useOnKeyDown(["Esc", "Escape"], () => {
|
|
@@ -13412,8 +13440,8 @@ var PopoverGroup = ({
|
|
|
13412
13440
|
if (open) handleClose();
|
|
13413
13441
|
});
|
|
13414
13442
|
const isAnchorChild = (i) => i === 0;
|
|
13415
|
-
const Children7 =
|
|
13416
|
-
return (0,
|
|
13443
|
+
const Children7 = import_react81.Children.map(children, (child, childIndex) => {
|
|
13444
|
+
return (0, import_react81.isValidElement)(child) && (isAnchorChild(childIndex) ? (0, import_react81.cloneElement)(child, {
|
|
13417
13445
|
"aria-haspopup": "dialog",
|
|
13418
13446
|
"aria-controls": uniquePopoverId,
|
|
13419
13447
|
"aria-expanded": open,
|
|
@@ -13441,17 +13469,17 @@ var PopoverGroup = ({
|
|
|
13441
13469
|
PopoverGroup.displayName = "PopoverGroup";
|
|
13442
13470
|
|
|
13443
13471
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
13444
|
-
var
|
|
13472
|
+
var import_react84 = require("react");
|
|
13445
13473
|
|
|
13446
13474
|
// src/components/ProgressTracker/ProgressTracker.context.tsx
|
|
13447
|
-
var
|
|
13448
|
-
var ProgressTrackerContext = (0,
|
|
13475
|
+
var import_react82 = require("react");
|
|
13476
|
+
var ProgressTrackerContext = (0, import_react82.createContext)(
|
|
13449
13477
|
{
|
|
13450
13478
|
activeStep: 0,
|
|
13451
13479
|
direction: "column"
|
|
13452
13480
|
}
|
|
13453
13481
|
);
|
|
13454
|
-
var useProgressTrackerContext = () => (0,
|
|
13482
|
+
var useProgressTrackerContext = () => (0, import_react82.useContext)(ProgressTrackerContext);
|
|
13455
13483
|
|
|
13456
13484
|
// src/components/ProgressTracker/ProgressTracker.module.css
|
|
13457
13485
|
var ProgressTracker_default = {
|
|
@@ -13472,7 +13500,7 @@ var ProgressTracker_default = {
|
|
|
13472
13500
|
};
|
|
13473
13501
|
|
|
13474
13502
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
13475
|
-
var
|
|
13503
|
+
var import_react83 = require("react");
|
|
13476
13504
|
var import_jsx_runtime315 = require("react/jsx-runtime");
|
|
13477
13505
|
var toItemState = (active, completed, disabled) => {
|
|
13478
13506
|
if (disabled) {
|
|
@@ -13516,7 +13544,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
13516
13544
|
handleStepChange == null ? void 0 : handleStepChange(index);
|
|
13517
13545
|
}
|
|
13518
13546
|
};
|
|
13519
|
-
const stepNumberContent = (0,
|
|
13547
|
+
const stepNumberContent = (0, import_react83.useMemo)(() => {
|
|
13520
13548
|
if (completed) {
|
|
13521
13549
|
return /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(Icon, { icon: CheckIcon, iconSize: "small" });
|
|
13522
13550
|
}
|
|
@@ -13644,17 +13672,17 @@ var ProgressTracker = (() => {
|
|
|
13644
13672
|
...rest
|
|
13645
13673
|
}) => {
|
|
13646
13674
|
const { t } = useTranslation();
|
|
13647
|
-
const [thisActiveStep, setActiveStep] = (0,
|
|
13675
|
+
const [thisActiveStep, setActiveStep] = (0, import_react84.useState)(activeStep);
|
|
13648
13676
|
const handleChange = (step) => {
|
|
13649
13677
|
setActiveStep(step);
|
|
13650
13678
|
onStepChange == null ? void 0 : onStepChange(step);
|
|
13651
13679
|
};
|
|
13652
|
-
(0,
|
|
13680
|
+
(0, import_react84.useEffect)(() => {
|
|
13653
13681
|
if (activeStep !== void 0 && activeStep != thisActiveStep) {
|
|
13654
13682
|
setActiveStep(activeStep);
|
|
13655
13683
|
}
|
|
13656
13684
|
}, [activeStep, thisActiveStep]);
|
|
13657
|
-
const steps = (0,
|
|
13685
|
+
const steps = (0, import_react84.useMemo)(() => {
|
|
13658
13686
|
const validChildren = removeInvalidChildren(children);
|
|
13659
13687
|
const itemsWithIndex = passIndexPropToProgressTrackerItem(validChildren);
|
|
13660
13688
|
return itemsWithIndex;
|
|
@@ -13699,12 +13727,12 @@ var ProgressTracker = (() => {
|
|
|
13699
13727
|
return Res;
|
|
13700
13728
|
})();
|
|
13701
13729
|
function removeInvalidChildren(children) {
|
|
13702
|
-
return
|
|
13730
|
+
return import_react84.Children.toArray(children).filter(import_react84.isValidElement);
|
|
13703
13731
|
}
|
|
13704
13732
|
function passIndexPropToProgressTrackerItem(children) {
|
|
13705
|
-
return
|
|
13733
|
+
return import_react84.Children.map(
|
|
13706
13734
|
children,
|
|
13707
|
-
(item, index) => (0,
|
|
13735
|
+
(item, index) => (0, import_react84.cloneElement)(item, {
|
|
13708
13736
|
...item.props,
|
|
13709
13737
|
index
|
|
13710
13738
|
})
|
|
@@ -13721,7 +13749,7 @@ var texts25 = createTexts({
|
|
|
13721
13749
|
});
|
|
13722
13750
|
|
|
13723
13751
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
13724
|
-
var
|
|
13752
|
+
var import_react85 = require("react");
|
|
13725
13753
|
|
|
13726
13754
|
// src/components/ProgressBar/ProgressBar.module.css
|
|
13727
13755
|
var ProgressBar_default = {
|
|
@@ -13750,7 +13778,7 @@ var ProgressBar = ({
|
|
|
13750
13778
|
style,
|
|
13751
13779
|
...rest
|
|
13752
13780
|
}) => {
|
|
13753
|
-
const generatedId = (0,
|
|
13781
|
+
const generatedId = (0, import_react85.useId)();
|
|
13754
13782
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
13755
13783
|
const hasErrorMessage = !!errorMessage;
|
|
13756
13784
|
const hasTip = !!tip;
|
|
@@ -13805,34 +13833,33 @@ var ProgressBar = ({
|
|
|
13805
13833
|
ProgressBar.displayName = "ProgressBar";
|
|
13806
13834
|
|
|
13807
13835
|
// src/components/Search/Search.tsx
|
|
13808
|
-
var
|
|
13836
|
+
var import_react88 = require("react");
|
|
13809
13837
|
|
|
13810
13838
|
// src/components/Search/AutocompleteSearch.context.tsx
|
|
13811
|
-
var
|
|
13812
|
-
var AutocompleteSearchContext = (0,
|
|
13839
|
+
var import_react86 = require("react");
|
|
13840
|
+
var AutocompleteSearchContext = (0, import_react86.createContext)({});
|
|
13813
13841
|
var useAutocompleteSearch = () => {
|
|
13814
|
-
return (0,
|
|
13842
|
+
return (0, import_react86.useContext)(AutocompleteSearchContext);
|
|
13815
13843
|
};
|
|
13816
13844
|
|
|
13817
13845
|
// src/components/Search/Search.module.css
|
|
13818
13846
|
var Search_default = {
|
|
13819
|
-
"with-button-container": "Search_with-button-container",
|
|
13820
13847
|
input: "Search_input",
|
|
13821
13848
|
"clear-button": "Search_clear-button",
|
|
13822
13849
|
suggestions: "Search_suggestions"
|
|
13823
13850
|
};
|
|
13824
13851
|
|
|
13825
13852
|
// src/components/Search/SearchSuggestionItem.tsx
|
|
13826
|
-
var
|
|
13853
|
+
var import_react87 = require("react");
|
|
13827
13854
|
var import_jsx_runtime318 = require("react/jsx-runtime");
|
|
13828
13855
|
var SearchSuggestionItem = ({
|
|
13829
13856
|
focus,
|
|
13830
13857
|
ref,
|
|
13831
13858
|
...rest
|
|
13832
13859
|
}) => {
|
|
13833
|
-
const itemRef = (0,
|
|
13860
|
+
const itemRef = (0, import_react87.useRef)(null);
|
|
13834
13861
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
13835
|
-
(0,
|
|
13862
|
+
(0, import_react87.useEffect)(() => {
|
|
13836
13863
|
var _a;
|
|
13837
13864
|
if (focus) {
|
|
13838
13865
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
@@ -13953,7 +13980,7 @@ var Search = ({
|
|
|
13953
13980
|
...rest
|
|
13954
13981
|
}) => {
|
|
13955
13982
|
var _a;
|
|
13956
|
-
const generatedId = (0,
|
|
13983
|
+
const generatedId = (0, import_react88.useId)();
|
|
13957
13984
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
13958
13985
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
13959
13986
|
const suggestionsId = derivativeIdGenerator(uniqueId, "suggestions");
|
|
@@ -13962,7 +13989,7 @@ var Search = ({
|
|
|
13962
13989
|
"suggestions-description"
|
|
13963
13990
|
);
|
|
13964
13991
|
const { t } = useTranslation();
|
|
13965
|
-
const [hasValue, setHasValue] = (0,
|
|
13992
|
+
const [hasValue, setHasValue] = (0, import_react88.useState)(!!value);
|
|
13966
13993
|
const context = useAutocompleteSearch();
|
|
13967
13994
|
const combinedRef = context.inputRef ? useCombinedRef(context.inputRef, ref) : ref;
|
|
13968
13995
|
const handleChange = (e) => {
|
|
@@ -14065,11 +14092,10 @@ var Search = ({
|
|
|
14065
14092
|
showSearchButton ? /* @__PURE__ */ (0, import_jsx_runtime320.jsxs)(
|
|
14066
14093
|
Grid,
|
|
14067
14094
|
{
|
|
14095
|
+
defaultPageLayout: false,
|
|
14068
14096
|
className,
|
|
14069
14097
|
width,
|
|
14070
14098
|
columnGap: "x0.5",
|
|
14071
|
-
rowGap: "0",
|
|
14072
|
-
marginInline: "0",
|
|
14073
14099
|
gridTemplateColumns: "1fr auto",
|
|
14074
14100
|
style,
|
|
14075
14101
|
children: [
|
|
@@ -14116,7 +14142,7 @@ var texts27 = createTexts({
|
|
|
14116
14142
|
});
|
|
14117
14143
|
|
|
14118
14144
|
// src/components/Search/SearchAutocompleteWrapper.tsx
|
|
14119
|
-
var
|
|
14145
|
+
var import_react89 = require("react");
|
|
14120
14146
|
var import_jsx_runtime321 = require("react/jsx-runtime");
|
|
14121
14147
|
var SearchAutocompleteWrapper = (props) => {
|
|
14122
14148
|
const {
|
|
@@ -14128,12 +14154,12 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
14128
14154
|
onSuggestionSelection,
|
|
14129
14155
|
children
|
|
14130
14156
|
} = props;
|
|
14131
|
-
const [inputValue, setInputValue] = (0,
|
|
14132
|
-
const [suggestions, setSuggestions] = (0,
|
|
14133
|
-
const [showSuggestions, setShowSuggestions] = (0,
|
|
14157
|
+
const [inputValue, setInputValue] = (0, import_react89.useState)(value != null ? value : "");
|
|
14158
|
+
const [suggestions, setSuggestions] = (0, import_react89.useState)([]);
|
|
14159
|
+
const [showSuggestions, setShowSuggestions] = (0, import_react89.useState)(false);
|
|
14134
14160
|
const closeSuggestions = () => showSuggestions === true && setShowSuggestions(false);
|
|
14135
14161
|
const openSuggestions = () => showSuggestions === false && setShowSuggestions(true);
|
|
14136
|
-
(0,
|
|
14162
|
+
(0, import_react89.useEffect)(() => {
|
|
14137
14163
|
if (suggestions.length > 0) {
|
|
14138
14164
|
openSuggestions();
|
|
14139
14165
|
} else {
|
|
@@ -14178,8 +14204,8 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
14178
14204
|
const handleSetInputValue = (value2) => {
|
|
14179
14205
|
setInputValue(value2 != null ? value2 : "");
|
|
14180
14206
|
};
|
|
14181
|
-
const inputRef = (0,
|
|
14182
|
-
const suggestionsRef = (0,
|
|
14207
|
+
const inputRef = (0, import_react89.useRef)(null);
|
|
14208
|
+
const suggestionsRef = (0, import_react89.useRef)(null);
|
|
14183
14209
|
useOnClickOutside([inputRef, suggestionsRef], () => {
|
|
14184
14210
|
closeSuggestions();
|
|
14185
14211
|
});
|
|
@@ -14268,7 +14294,7 @@ var SkipToContent = ({
|
|
|
14268
14294
|
SkipToContent.displayName = "SkipToContent";
|
|
14269
14295
|
|
|
14270
14296
|
// src/components/SplitButton/SplitButton.tsx
|
|
14271
|
-
var
|
|
14297
|
+
var import_react90 = require("react");
|
|
14272
14298
|
|
|
14273
14299
|
// src/components/SplitButton/SplitButton.module.css
|
|
14274
14300
|
var SplitButton_default = {
|
|
@@ -14289,7 +14315,7 @@ var SplitButton = ({
|
|
|
14289
14315
|
...rest
|
|
14290
14316
|
}) => {
|
|
14291
14317
|
const { t } = useTranslation();
|
|
14292
|
-
const [isOpen, setIsOpen] = (0,
|
|
14318
|
+
const [isOpen, setIsOpen] = (0, import_react90.useState)(false);
|
|
14293
14319
|
const buttonStyleProps = {
|
|
14294
14320
|
purpose,
|
|
14295
14321
|
size: size2
|
|
@@ -14335,15 +14361,15 @@ var texts28 = createTexts({
|
|
|
14335
14361
|
});
|
|
14336
14362
|
|
|
14337
14363
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
14338
|
-
var
|
|
14364
|
+
var import_react94 = require("react");
|
|
14339
14365
|
|
|
14340
14366
|
// src/components/Table/collapsible/Table.context.tsx
|
|
14341
|
-
var
|
|
14342
|
-
var CollapsibleTableContext = (0,
|
|
14367
|
+
var import_react91 = require("react");
|
|
14368
|
+
var CollapsibleTableContext = (0, import_react91.createContext)({
|
|
14343
14369
|
headerValues: [],
|
|
14344
14370
|
definingColumnIndex: [0]
|
|
14345
14371
|
});
|
|
14346
|
-
var useCollapsibleTableContext = () => (0,
|
|
14372
|
+
var useCollapsibleTableContext = () => (0, import_react91.useContext)(CollapsibleTableContext);
|
|
14347
14373
|
|
|
14348
14374
|
// src/components/Table/normal/Body.tsx
|
|
14349
14375
|
var import_jsx_runtime325 = require("react/jsx-runtime");
|
|
@@ -14351,12 +14377,12 @@ var Body = (props) => /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("tbody", {
|
|
|
14351
14377
|
Body.displayName = "Table.Body";
|
|
14352
14378
|
|
|
14353
14379
|
// src/components/Table/normal/Head.tsx
|
|
14354
|
-
var
|
|
14380
|
+
var import_react92 = require("react");
|
|
14355
14381
|
var import_jsx_runtime326 = require("react/jsx-runtime");
|
|
14356
14382
|
var Head = ({ children, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("thead", { ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(HeadContext, { value: true, children }) });
|
|
14357
|
-
var HeadContext = (0,
|
|
14383
|
+
var HeadContext = (0, import_react92.createContext)(false);
|
|
14358
14384
|
function useIsInTableHead() {
|
|
14359
|
-
const isInTableHead = (0,
|
|
14385
|
+
const isInTableHead = (0, import_react92.useContext)(HeadContext);
|
|
14360
14386
|
return isInTableHead;
|
|
14361
14387
|
}
|
|
14362
14388
|
|
|
@@ -14521,26 +14547,26 @@ var Table = ({
|
|
|
14521
14547
|
Table.displayName = "Table";
|
|
14522
14548
|
|
|
14523
14549
|
// src/components/Table/normal/TableWrapper.tsx
|
|
14524
|
-
var
|
|
14550
|
+
var import_react93 = require("react");
|
|
14525
14551
|
var import_jsx_runtime332 = require("react/jsx-runtime");
|
|
14526
14552
|
var TableWrapper = ({ className, ...rest }) => {
|
|
14527
|
-
const themeContext = (0,
|
|
14553
|
+
const themeContext = (0, import_react93.useContext)(ThemeContext);
|
|
14528
14554
|
const container2 = themeContext == null ? void 0 : themeContext.el;
|
|
14529
14555
|
const containerWidth = container2 ? container2.clientWidth : 0;
|
|
14530
|
-
const [overflowX, setOverflowX] = (0,
|
|
14531
|
-
const [themeContainerWidth, setThemeContainerWidth] = (0,
|
|
14556
|
+
const [overflowX, setOverflowX] = (0, import_react93.useState)(false);
|
|
14557
|
+
const [themeContainerWidth, setThemeContainerWidth] = (0, import_react93.useState)(containerWidth);
|
|
14532
14558
|
function isOverflowingX(event) {
|
|
14533
14559
|
return event.offsetWidth < event.scrollWidth;
|
|
14534
14560
|
}
|
|
14535
|
-
const wrapperRef = (0,
|
|
14536
|
-
(0,
|
|
14561
|
+
const wrapperRef = (0, import_react93.useRef)(null);
|
|
14562
|
+
(0, import_react93.useEffect)(() => {
|
|
14537
14563
|
if ((wrapperRef == null ? void 0 : wrapperRef.current) && isOverflowingX(wrapperRef.current)) {
|
|
14538
14564
|
setOverflowX(true);
|
|
14539
14565
|
return;
|
|
14540
14566
|
}
|
|
14541
14567
|
setOverflowX(false);
|
|
14542
14568
|
}, [themeContainerWidth]);
|
|
14543
|
-
(0,
|
|
14569
|
+
(0, import_react93.useEffect)(() => {
|
|
14544
14570
|
function handleResize() {
|
|
14545
14571
|
setThemeContainerWidth(containerWidth);
|
|
14546
14572
|
}
|
|
@@ -14589,8 +14615,8 @@ var CollapsibleRow = ({
|
|
|
14589
14615
|
const isInHead = useIsInTableHead();
|
|
14590
14616
|
const type = _type != null ? _type : isInHead ? "head" : "body";
|
|
14591
14617
|
const { isCollapsed, headerValues, definingColumnIndex } = useCollapsibleTableContext();
|
|
14592
|
-
const [childrenCollapsed, setChildrenCollapsed] = (0,
|
|
14593
|
-
(0,
|
|
14618
|
+
const [childrenCollapsed, setChildrenCollapsed] = (0, import_react94.useState)(true);
|
|
14619
|
+
(0, import_react94.useEffect)(() => {
|
|
14594
14620
|
if (!isCollapsed) setChildrenCollapsed(true);
|
|
14595
14621
|
}, [isCollapsed]);
|
|
14596
14622
|
const rowProps = (isOpenCollapsibleHeader) => {
|
|
@@ -14608,7 +14634,7 @@ var CollapsibleRow = ({
|
|
|
14608
14634
|
const collapsedHeaderValues = headerValues.filter(
|
|
14609
14635
|
(column, index) => definingColumnIndex.indexOf(index) === -1
|
|
14610
14636
|
);
|
|
14611
|
-
const childrenArray =
|
|
14637
|
+
const childrenArray = import_react94.Children.toArray(children);
|
|
14612
14638
|
const collapsedChildren = childrenArray.filter(
|
|
14613
14639
|
(column, index) => definingColumnIndex.indexOf(index) === -1
|
|
14614
14640
|
);
|
|
@@ -14617,9 +14643,9 @@ var CollapsibleRow = ({
|
|
|
14617
14643
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
14618
14644
|
const id = derivativeIdGenerator(prefix2, index.toString());
|
|
14619
14645
|
collapsibleIds.push(id);
|
|
14620
|
-
return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)(
|
|
14646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)(import_react94.Fragment, { children: [
|
|
14621
14647
|
/* @__PURE__ */ (0, import_jsx_runtime333.jsx)(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
14622
|
-
(0,
|
|
14648
|
+
(0, import_react94.isValidElement)(child) && (0, import_react94.cloneElement)(child, {
|
|
14623
14649
|
collapsibleProps: { isCollapsibleChild: true }
|
|
14624
14650
|
})
|
|
14625
14651
|
] }, `DL-${index}`);
|
|
@@ -14716,11 +14742,11 @@ var CollapsibleTable2 = CollapsibleTable;
|
|
|
14716
14742
|
CollapsibleTable2.Row = CollapsibleRow;
|
|
14717
14743
|
|
|
14718
14744
|
// src/components/Tabs/AddTabButton.tsx
|
|
14719
|
-
var
|
|
14745
|
+
var import_react97 = require("react");
|
|
14720
14746
|
|
|
14721
14747
|
// src/components/Tabs/Tabs.context.tsx
|
|
14722
|
-
var
|
|
14723
|
-
var TabsContext = (0,
|
|
14748
|
+
var import_react95 = require("react");
|
|
14749
|
+
var TabsContext = (0, import_react95.createContext)({
|
|
14724
14750
|
activeTab: 0,
|
|
14725
14751
|
tabsId: "",
|
|
14726
14752
|
size: "small",
|
|
@@ -14732,13 +14758,11 @@ var TabsContext = (0, import_react94.createContext)({
|
|
|
14732
14758
|
tabContentDirection: "row",
|
|
14733
14759
|
addTabButtonProps: void 0
|
|
14734
14760
|
});
|
|
14735
|
-
var useTabsContext = () => (0,
|
|
14761
|
+
var useTabsContext = () => (0, import_react95.useContext)(TabsContext);
|
|
14736
14762
|
|
|
14737
14763
|
// src/components/Tabs/Tabs.module.css
|
|
14738
14764
|
var Tabs_default = {
|
|
14739
14765
|
"tab-row": "Tabs_tab-row",
|
|
14740
|
-
"tab-row--standard-widths": "Tabs_tab-row--standard-widths",
|
|
14741
|
-
"tab-row--custom-widths": "Tabs_tab-row--custom-widths",
|
|
14742
14766
|
tab: "Tabs_tab",
|
|
14743
14767
|
"tab--active": "Tabs_tab--active",
|
|
14744
14768
|
"tab--medium--row": "Tabs_tab--medium--row",
|
|
@@ -14750,9 +14774,9 @@ var Tabs_default = {
|
|
|
14750
14774
|
};
|
|
14751
14775
|
|
|
14752
14776
|
// src/components/Tabs/TabWidthContext.tsx
|
|
14753
|
-
var
|
|
14777
|
+
var import_react96 = require("react");
|
|
14754
14778
|
var import_jsx_runtime335 = require("react/jsx-runtime");
|
|
14755
|
-
var TabContext = (0,
|
|
14779
|
+
var TabContext = (0, import_react96.createContext)(null);
|
|
14756
14780
|
function TabWidthContextProvider({
|
|
14757
14781
|
children,
|
|
14758
14782
|
onChangeWidths
|
|
@@ -14781,8 +14805,8 @@ function TabWidthContextProvider({
|
|
|
14781
14805
|
);
|
|
14782
14806
|
}
|
|
14783
14807
|
function useSetTabWidth(index, width) {
|
|
14784
|
-
const context = (0,
|
|
14785
|
-
(0,
|
|
14808
|
+
const context = (0, import_react96.useContext)(TabContext);
|
|
14809
|
+
(0, import_react96.useLayoutEffect)(() => {
|
|
14786
14810
|
context == null ? void 0 : context.updateWidth(index, width);
|
|
14787
14811
|
return () => context == null ? void 0 : context.removeTab(index);
|
|
14788
14812
|
}, [index, width]);
|
|
@@ -14799,7 +14823,7 @@ var AddTabButton = ({
|
|
|
14799
14823
|
...rest
|
|
14800
14824
|
}) => {
|
|
14801
14825
|
useSetTabWidth(index, width);
|
|
14802
|
-
const buttonRef = (0,
|
|
14826
|
+
const buttonRef = (0, import_react97.useRef)(null);
|
|
14803
14827
|
const combinedRef = useCombinedRef(ref, buttonRef);
|
|
14804
14828
|
const { tabContentDirection, size: size2 } = useTabsContext();
|
|
14805
14829
|
return /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)(
|
|
@@ -14824,7 +14848,7 @@ var AddTabButton = ({
|
|
|
14824
14848
|
AddTabButton.displayName = "AddTabButton";
|
|
14825
14849
|
|
|
14826
14850
|
// src/components/Tabs/Tabs.tsx
|
|
14827
|
-
var
|
|
14851
|
+
var import_react98 = require("react");
|
|
14828
14852
|
var import_jsx_runtime337 = require("react/jsx-runtime");
|
|
14829
14853
|
var TABS_SIZES = createSizes("small", "medium");
|
|
14830
14854
|
var Tabs = ({
|
|
@@ -14841,17 +14865,17 @@ var Tabs = ({
|
|
|
14841
14865
|
htmlProps,
|
|
14842
14866
|
...rest
|
|
14843
14867
|
}) => {
|
|
14844
|
-
const generatedId = (0,
|
|
14868
|
+
const generatedId = (0, import_react98.useId)();
|
|
14845
14869
|
const uniqueId = id != null ? id : `${generatedId}-tabs`;
|
|
14846
|
-
const [thisActiveTab, setActiveTab] = (0,
|
|
14847
|
-
const [hasTabFocus, setHasTabFocus] = (0,
|
|
14848
|
-
const tabListRef = (0,
|
|
14849
|
-
const tabPanelsRef = (0,
|
|
14870
|
+
const [thisActiveTab, setActiveTab] = (0, import_react98.useState)(activeTab != null ? activeTab : 0);
|
|
14871
|
+
const [hasTabFocus, setHasTabFocus] = (0, import_react98.useState)(false);
|
|
14872
|
+
const tabListRef = (0, import_react98.useRef)(null);
|
|
14873
|
+
const tabPanelsRef = (0, import_react98.useRef)(null);
|
|
14850
14874
|
const handleTabChange = (index) => {
|
|
14851
14875
|
setActiveTab(index);
|
|
14852
14876
|
onChange == null ? void 0 : onChange(index);
|
|
14853
14877
|
};
|
|
14854
|
-
(0,
|
|
14878
|
+
(0, import_react98.useEffect)(() => {
|
|
14855
14879
|
if (activeTab !== void 0 && activeTab !== thisActiveTab) {
|
|
14856
14880
|
setActiveTab(activeTab);
|
|
14857
14881
|
}
|
|
@@ -14885,7 +14909,7 @@ var Tabs = ({
|
|
|
14885
14909
|
Tabs.displayName = "Tabs";
|
|
14886
14910
|
|
|
14887
14911
|
// src/components/Tabs/Tab.tsx
|
|
14888
|
-
var
|
|
14912
|
+
var import_react99 = require("react");
|
|
14889
14913
|
var import_jsx_runtime338 = require("react/jsx-runtime");
|
|
14890
14914
|
var Tab = ({
|
|
14891
14915
|
active = false,
|
|
@@ -14905,18 +14929,18 @@ var Tab = ({
|
|
|
14905
14929
|
...rest
|
|
14906
14930
|
}) => {
|
|
14907
14931
|
useSetTabWidth(index, width);
|
|
14908
|
-
const itemRef = (0,
|
|
14932
|
+
const itemRef = (0, import_react99.useRef)(null);
|
|
14909
14933
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
14910
14934
|
const { tabContentDirection, size: size2 } = useTabsContext();
|
|
14911
14935
|
const { type = "button", ...restHtmlProps } = htmlProps;
|
|
14912
14936
|
const fixedHtmlProps = { type, ...restHtmlProps };
|
|
14913
|
-
(0,
|
|
14937
|
+
(0, import_react99.useEffect)(() => {
|
|
14914
14938
|
var _a;
|
|
14915
14939
|
if (focus) {
|
|
14916
14940
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
14917
14941
|
}
|
|
14918
14942
|
}, [focus]);
|
|
14919
|
-
const handleSelect = (0,
|
|
14943
|
+
const handleSelect = (0, import_react99.useCallback)(() => {
|
|
14920
14944
|
if (setFocus && index) {
|
|
14921
14945
|
setFocus(index);
|
|
14922
14946
|
}
|
|
@@ -14963,7 +14987,7 @@ var Tab = ({
|
|
|
14963
14987
|
Tab.displayName = "Tab";
|
|
14964
14988
|
|
|
14965
14989
|
// src/components/Tabs/TabList.tsx
|
|
14966
|
-
var
|
|
14990
|
+
var import_react100 = require("react");
|
|
14967
14991
|
var import_jsx_runtime339 = require("react/jsx-runtime");
|
|
14968
14992
|
var TabList = ({
|
|
14969
14993
|
children,
|
|
@@ -14983,15 +15007,15 @@ var TabList = ({
|
|
|
14983
15007
|
addTabButtonProps
|
|
14984
15008
|
} = useTabsContext();
|
|
14985
15009
|
const uniqueId = id != null ? id : `${tabsId}-tablist`;
|
|
14986
|
-
const childrenArray =
|
|
15010
|
+
const childrenArray = import_react100.Children.toArray(children).length;
|
|
14987
15011
|
const [focus, setFocus] = useRoveFocus(childrenArray, hasTabFocus, "row");
|
|
14988
15012
|
const combinedRef = useCombinedRef(ref, tabListRef);
|
|
14989
15013
|
const hasButton = addTabButtonProps ? true : false;
|
|
14990
|
-
const tabListChildren =
|
|
15014
|
+
const tabListChildren = import_react100.Children ? import_react100.Children.map(children, (child, index) => {
|
|
14991
15015
|
const handleThisTabChange = () => {
|
|
14992
15016
|
handleTabChange(index);
|
|
14993
15017
|
};
|
|
14994
|
-
return (0,
|
|
15018
|
+
return (0, import_react100.isValidElement)(child) && (0, import_react100.cloneElement)(child, {
|
|
14995
15019
|
id: `${tabsId}-tab-${index}`,
|
|
14996
15020
|
htmlProps: {
|
|
14997
15021
|
...child.props.htmlProps,
|
|
@@ -15004,7 +15028,7 @@ var TabList = ({
|
|
|
15004
15028
|
onClick: combineHandlers(handleThisTabChange, child.props.onClick)
|
|
15005
15029
|
});
|
|
15006
15030
|
}) : [];
|
|
15007
|
-
const [widths, setWidths] = (0,
|
|
15031
|
+
const [widths, setWidths] = (0, import_react100.useState)([]);
|
|
15008
15032
|
const handleOnFocus = (event) => {
|
|
15009
15033
|
setHasTabFocus(true);
|
|
15010
15034
|
onFocus == null ? void 0 : onFocus(event);
|
|
@@ -15022,9 +15046,16 @@ var TabList = ({
|
|
|
15022
15046
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15023
15047
|
["--dds-tab-widths"]: widths.join(" ")
|
|
15024
15048
|
};
|
|
15049
|
+
const gridLayout = widths ? {
|
|
15050
|
+
gridTemplateColumns: "var(--dds-tab-widths)"
|
|
15051
|
+
} : {
|
|
15052
|
+
gridAutoColumns: "1fr",
|
|
15053
|
+
gridAutoFlow: "column"
|
|
15054
|
+
};
|
|
15025
15055
|
return /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
|
|
15026
|
-
|
|
15056
|
+
Grid,
|
|
15027
15057
|
{
|
|
15058
|
+
defaultPageLayout: false,
|
|
15028
15059
|
...rest,
|
|
15029
15060
|
ref: combinedRef,
|
|
15030
15061
|
role: "tablist",
|
|
@@ -15032,13 +15063,9 @@ var TabList = ({
|
|
|
15032
15063
|
tabIndex: 0,
|
|
15033
15064
|
onFocus: handleOnFocus,
|
|
15034
15065
|
onBlur: handleOnBlur,
|
|
15035
|
-
|
|
15036
|
-
|
|
15037
|
-
|
|
15038
|
-
Tabs_default["tab-row--custom-widths"],
|
|
15039
|
-
focusable,
|
|
15040
|
-
scrollbar
|
|
15041
|
-
),
|
|
15066
|
+
overflowX: "auto",
|
|
15067
|
+
...gridLayout,
|
|
15068
|
+
className: cn(Tabs_default["tab-row"], focusable, scrollbar),
|
|
15042
15069
|
style: { ...style, ...customWidths },
|
|
15043
15070
|
children: [
|
|
15044
15071
|
tabListChildren,
|
|
@@ -15080,14 +15107,14 @@ var TabPanel = ({
|
|
|
15080
15107
|
TabPanel.displayName = "TabPanel";
|
|
15081
15108
|
|
|
15082
15109
|
// src/components/Tabs/TabPanels.tsx
|
|
15083
|
-
var
|
|
15110
|
+
var import_react101 = require("react");
|
|
15084
15111
|
var import_jsx_runtime341 = require("react/jsx-runtime");
|
|
15085
15112
|
var TabPanels = ({ children, ref, ...rest }) => {
|
|
15086
15113
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
15087
15114
|
const combinedRef = useCombinedRef(ref, tabPanelsRef);
|
|
15088
|
-
const panelChildren =
|
|
15115
|
+
const panelChildren = import_react101.Children.map(children, (child, index) => {
|
|
15089
15116
|
const active = index === activeTab;
|
|
15090
|
-
return (0,
|
|
15117
|
+
return (0, import_react101.isValidElement)(child) && (0, import_react101.cloneElement)(child, {
|
|
15091
15118
|
id: `${tabsId}-panel-${index}`,
|
|
15092
15119
|
active,
|
|
15093
15120
|
htmlProps: {
|
|
@@ -15170,7 +15197,7 @@ var Tag = ({
|
|
|
15170
15197
|
Tag.displayName = "Tag";
|
|
15171
15198
|
|
|
15172
15199
|
// src/components/TextInput/TextInput.tsx
|
|
15173
|
-
var
|
|
15200
|
+
var import_react102 = require("react");
|
|
15174
15201
|
|
|
15175
15202
|
// src/components/TextInput/TextInput.module.css
|
|
15176
15203
|
var TextInput_default = {
|
|
@@ -15213,12 +15240,12 @@ var TextInput = ({
|
|
|
15213
15240
|
ref,
|
|
15214
15241
|
...rest
|
|
15215
15242
|
}) => {
|
|
15216
|
-
const [text, setText] = (0,
|
|
15217
|
-
const prefixRef = (0,
|
|
15218
|
-
const suffixRef = (0,
|
|
15219
|
-
const [prefixLength, setPrefixLength] = (0,
|
|
15220
|
-
const [suffixLength, setSuffixLength] = (0,
|
|
15221
|
-
(0,
|
|
15243
|
+
const [text, setText] = (0, import_react102.useState)(getDefaultText(value, defaultValue));
|
|
15244
|
+
const prefixRef = (0, import_react102.useRef)(null);
|
|
15245
|
+
const suffixRef = (0, import_react102.useRef)(null);
|
|
15246
|
+
const [prefixLength, setPrefixLength] = (0, import_react102.useState)(0);
|
|
15247
|
+
const [suffixLength, setSuffixLength] = (0, import_react102.useState)(0);
|
|
15248
|
+
(0, import_react102.useLayoutEffect)(() => {
|
|
15222
15249
|
requestAnimationFrame(() => {
|
|
15223
15250
|
if (prefixRef.current) {
|
|
15224
15251
|
setPrefixLength(prefixRef.current.offsetWidth);
|
|
@@ -15234,7 +15261,7 @@ var TextInput = ({
|
|
|
15234
15261
|
onChange(event);
|
|
15235
15262
|
}
|
|
15236
15263
|
};
|
|
15237
|
-
const generatedId = (0,
|
|
15264
|
+
const generatedId = (0, import_react102.useId)();
|
|
15238
15265
|
const uniqueId = id != null ? id : `${generatedId}-textInput`;
|
|
15239
15266
|
const hasErrorMessage = !!errorMessage;
|
|
15240
15267
|
const hasTip = !!tip;
|
|
@@ -15414,24 +15441,15 @@ var TextInput = ({
|
|
|
15414
15441
|
TextInput.displayName = "TextInput";
|
|
15415
15442
|
|
|
15416
15443
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
15417
|
-
var
|
|
15444
|
+
var import_react104 = require("react");
|
|
15418
15445
|
|
|
15419
15446
|
// src/components/ToggleBar/ToggleBar.context.tsx
|
|
15420
|
-
var
|
|
15421
|
-
var ToggleBarContext = (0,
|
|
15447
|
+
var import_react103 = require("react");
|
|
15448
|
+
var ToggleBarContext = (0, import_react103.createContext)({
|
|
15422
15449
|
size: "medium",
|
|
15423
15450
|
purpose: "primary"
|
|
15424
15451
|
});
|
|
15425
|
-
var useToggleBarContext = () => (0,
|
|
15426
|
-
|
|
15427
|
-
// src/components/ToggleBar/ToggleBar.module.css
|
|
15428
|
-
var ToggleBar_default = {
|
|
15429
|
-
bar: "ToggleBar_bar",
|
|
15430
|
-
content: "ToggleBar_content",
|
|
15431
|
-
label: "ToggleBar_label",
|
|
15432
|
-
"label--primary": "ToggleBar_label--primary",
|
|
15433
|
-
"label--secondary": "ToggleBar_label--secondary"
|
|
15434
|
-
};
|
|
15452
|
+
var useToggleBarContext = () => (0, import_react103.useContext)(ToggleBarContext);
|
|
15435
15453
|
|
|
15436
15454
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
15437
15455
|
var import_jsx_runtime344 = require("react/jsx-runtime");
|
|
@@ -15451,9 +15469,9 @@ var ToggleBar = (props) => {
|
|
|
15451
15469
|
id,
|
|
15452
15470
|
...rest
|
|
15453
15471
|
} = props;
|
|
15454
|
-
const generatedId = (0,
|
|
15472
|
+
const generatedId = (0, import_react104.useId)();
|
|
15455
15473
|
const uniqueId = id != null ? id : `${generatedId}-ToggleBar`;
|
|
15456
|
-
const [groupValue, setGroupValue] = (0,
|
|
15474
|
+
const [groupValue, setGroupValue] = (0, import_react104.useState)(value);
|
|
15457
15475
|
const handleChange = combineHandlers(
|
|
15458
15476
|
(e) => setGroupValue(e.target.value),
|
|
15459
15477
|
(e) => onChange && onChange(e, e.target.value)
|
|
@@ -15479,7 +15497,15 @@ var ToggleBar = (props) => {
|
|
|
15479
15497
|
"aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
|
|
15480
15498
|
children: [
|
|
15481
15499
|
label && /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(Typography, { id: labelId, as: "span", typographyType: "labelMedium", children: label }),
|
|
15482
|
-
/* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
|
|
15500
|
+
/* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
|
|
15501
|
+
Grid,
|
|
15502
|
+
{
|
|
15503
|
+
defaultPageLayout: false,
|
|
15504
|
+
gridAutoFlow: "column",
|
|
15505
|
+
gridAutoColumns: "1fr",
|
|
15506
|
+
children
|
|
15507
|
+
}
|
|
15508
|
+
)
|
|
15483
15509
|
]
|
|
15484
15510
|
}
|
|
15485
15511
|
)
|
|
@@ -15489,7 +15515,17 @@ var ToggleBar = (props) => {
|
|
|
15489
15515
|
ToggleBar.displayName = "ToggleBar";
|
|
15490
15516
|
|
|
15491
15517
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
15492
|
-
var
|
|
15518
|
+
var import_react105 = require("react");
|
|
15519
|
+
|
|
15520
|
+
// src/components/ToggleBar/ToggleBar.module.css
|
|
15521
|
+
var ToggleBar_default = {
|
|
15522
|
+
content: "ToggleBar_content",
|
|
15523
|
+
label: "ToggleBar_label",
|
|
15524
|
+
"label--primary": "ToggleBar_label--primary",
|
|
15525
|
+
"label--secondary": "ToggleBar_label--secondary"
|
|
15526
|
+
};
|
|
15527
|
+
|
|
15528
|
+
// src/components/ToggleBar/ToggleRadio.tsx
|
|
15493
15529
|
var import_jsx_runtime345 = require("react/jsx-runtime");
|
|
15494
15530
|
var calculateChecked = (value, group, checked) => {
|
|
15495
15531
|
if (typeof checked !== "undefined") return checked;
|
|
@@ -15516,7 +15552,7 @@ var ToggleRadio = ({
|
|
|
15516
15552
|
id,
|
|
15517
15553
|
...rest
|
|
15518
15554
|
}) => {
|
|
15519
|
-
const generatedId = (0,
|
|
15555
|
+
const generatedId = (0, import_react105.useId)();
|
|
15520
15556
|
const uniqueId = id != null ? id : `${generatedId}-ToggleRadio`;
|
|
15521
15557
|
const group = useToggleBarContext();
|
|
15522
15558
|
const handleChange = (event) => {
|
|
@@ -15579,7 +15615,7 @@ var ToggleRadio = ({
|
|
|
15579
15615
|
ToggleRadio.displayName = "ToggleRadio";
|
|
15580
15616
|
|
|
15581
15617
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
15582
|
-
var
|
|
15618
|
+
var import_react106 = require("react");
|
|
15583
15619
|
|
|
15584
15620
|
// src/components/ToggleButton/ToggleButton.module.css
|
|
15585
15621
|
var ToggleButton_default = {
|
|
@@ -15598,7 +15634,7 @@ var ToggleButton = ({
|
|
|
15598
15634
|
htmlProps,
|
|
15599
15635
|
...rest
|
|
15600
15636
|
}) => {
|
|
15601
|
-
const generatedId = (0,
|
|
15637
|
+
const generatedId = (0, import_react106.useId)();
|
|
15602
15638
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
15603
15639
|
const hasIcon = !!icon;
|
|
15604
15640
|
return /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)(Box, { as: "label", htmlFor: uniqueId, width: "fit-content", children: [
|
|
@@ -15647,7 +15683,7 @@ var ToggleButton = ({
|
|
|
15647
15683
|
ToggleButton.displayName = "ToggleButton";
|
|
15648
15684
|
|
|
15649
15685
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
15650
|
-
var
|
|
15686
|
+
var import_react107 = require("react");
|
|
15651
15687
|
var import_jsx_runtime347 = require("react/jsx-runtime");
|
|
15652
15688
|
var ToggleButtonGroup = (props) => {
|
|
15653
15689
|
const {
|
|
@@ -15661,7 +15697,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
15661
15697
|
htmlProps,
|
|
15662
15698
|
...rest
|
|
15663
15699
|
} = props;
|
|
15664
|
-
const generatedId = (0,
|
|
15700
|
+
const generatedId = (0, import_react107.useId)();
|
|
15665
15701
|
const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
|
|
15666
15702
|
return /* @__PURE__ */ (0, import_jsx_runtime347.jsxs)(
|
|
15667
15703
|
"div",
|
|
@@ -16016,7 +16052,6 @@ ToggleButtonGroup.displayName = "ToggleButtonGroup";
|
|
|
16016
16052
|
ZoomOutIcon,
|
|
16017
16053
|
calendarDateToNativeDate,
|
|
16018
16054
|
cn,
|
|
16019
|
-
countryOptions,
|
|
16020
16055
|
createPurposes,
|
|
16021
16056
|
createSelectOptions,
|
|
16022
16057
|
createSizes,
|
|
@@ -16027,7 +16062,6 @@ ToggleButtonGroup.displayName = "ToggleButtonGroup";
|
|
|
16027
16062
|
getBaseHTMLProps,
|
|
16028
16063
|
getColorCn,
|
|
16029
16064
|
getElementType,
|
|
16030
|
-
getLiteralScreenSize,
|
|
16031
16065
|
getTypographyCn,
|
|
16032
16066
|
handleElementWithBackdropMount,
|
|
16033
16067
|
handleElementWithBackdropUnmount,
|