@norges-domstoler/dds-components 24.1.1 → 24.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/dist/index.cjs +220 -128
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +80 -69
- package/dist/index.d.cts +30 -12
- package/dist/index.d.mts +30 -12
- package/dist/index.mjs +217 -129
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
package/dist/index.cjs
CHANGED
|
@@ -1127,51 +1127,10 @@ function handleElementWithBackdropUnmount(container) {
|
|
|
1127
1127
|
//#region src/components/helpers/Backdrop/Backdrop.module.css
|
|
1128
1128
|
var Backdrop_module_default = {
|
|
1129
1129
|
"backdrop": "dds-Backdrop-module__backdrop",
|
|
1130
|
-
"drawer": "dds-Backdrop-module__drawer",
|
|
1131
|
-
"modal": "dds-Backdrop-module__modal",
|
|
1132
1130
|
"backdrop--visible": "dds-Backdrop-module__backdrop--visible",
|
|
1133
1131
|
"backdrop--hidden": "dds-Backdrop-module__backdrop--hidden"
|
|
1134
1132
|
};
|
|
1135
1133
|
//#endregion
|
|
1136
|
-
//#region src/components/helpers/Backdrop/Backdrop.tsx
|
|
1137
|
-
/**
|
|
1138
|
-
* Backdrop-komponent, viser et bakgrunnslag for et element som skal låse applikasjonen i bakgrunnen (Modal el.l.).
|
|
1139
|
-
*
|
|
1140
|
-
* @component
|
|
1141
|
-
* @param {Object} props - Props for komponenten.
|
|
1142
|
-
* @param {boolean} [props.isMounted] - Angir om backdropen skal være synlig (`true`) eller skjult (`false`). Standard er `false`.
|
|
1143
|
-
* @param {'drawer' | 'modal'} props.zIndex - Bestemmer hvilken z-index-klasse som skal brukes, avhengig av konteksten (f.eks. drawer eller modal).
|
|
1144
|
-
* @param {React.ReactNode} [props.children] - Eventuelt innhold som skal vises inni backdropen.
|
|
1145
|
-
* @param {React.MouseEventHandler<HTMLDivElement>} [props.onClick] - Klikkhåndterer for backdropen, f.eks. for å lukke en modal.
|
|
1146
|
-
* @param {React.Ref<HTMLDivElement>} [props.ref] - Referanse til DOM-elementet.
|
|
1147
|
-
*
|
|
1148
|
-
* @returns {JSX.Element} Et `<div>`-element med riktige klasser basert på synlighet og z-index.
|
|
1149
|
-
|
|
1150
|
-
* @example
|
|
1151
|
-
* ```tsx
|
|
1152
|
-
* <Backdrop isMounted={true} zIndex="modal" onClick={handleClose}>
|
|
1153
|
-
* <ModalContent />
|
|
1154
|
-
* </Backdrop>
|
|
1155
|
-
* ```
|
|
1156
|
-
*/
|
|
1157
|
-
const Backdrop = ({ isMounted, zIndex, ...props }) => {
|
|
1158
|
-
const isMountedCn = isMounted ? "visible" : "hidden";
|
|
1159
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1160
|
-
className: cn(Backdrop_module_default.backdrop, Backdrop_module_default[zIndex], Backdrop_module_default[`backdrop--${isMountedCn}`]),
|
|
1161
|
-
...props
|
|
1162
|
-
});
|
|
1163
|
-
};
|
|
1164
|
-
Backdrop.displayName = "Backdrop";
|
|
1165
|
-
//#endregion
|
|
1166
|
-
//#region src/components/helpers/Dropdown/DropdownItem.module.css
|
|
1167
|
-
var DropdownItem_module_default = {
|
|
1168
|
-
"item": "dds-DropdownItem-module__item",
|
|
1169
|
-
"default": "dds-DropdownItem-module__default",
|
|
1170
|
-
"danger": "dds-DropdownItem-module__danger",
|
|
1171
|
-
"item--interactive": "dds-DropdownItem-module__item--interactive",
|
|
1172
|
-
"item--loading": "dds-DropdownItem-module__item--loading"
|
|
1173
|
-
};
|
|
1174
|
-
//#endregion
|
|
1175
1134
|
//#region src/types/BaseComponentProps.ts
|
|
1176
1135
|
function pruneUndefined(obj) {
|
|
1177
1136
|
return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== void 0));
|
|
@@ -1294,31 +1253,6 @@ const isElevation = (value) => {
|
|
|
1294
1253
|
return typeof value === "string" && ELEVATIONS.includes(value);
|
|
1295
1254
|
};
|
|
1296
1255
|
//#endregion
|
|
1297
|
-
//#region src/components/Icon/Icon.tsx
|
|
1298
|
-
const getSize = (iconSize) => {
|
|
1299
|
-
switch (iconSize) {
|
|
1300
|
-
case "small": return "var(--dds-size-icon-small)";
|
|
1301
|
-
case "medium": return "var(--dds-size-icon-medium)";
|
|
1302
|
-
case "large": return "var(--dds-size-icon-large)";
|
|
1303
|
-
case "component": return "var(--dds-size-icon-component)";
|
|
1304
|
-
case "inherit": return "1em";
|
|
1305
|
-
default: return "var(--dds-size-icon-medium)";
|
|
1306
|
-
}
|
|
1307
|
-
};
|
|
1308
|
-
function Icon(props) {
|
|
1309
|
-
const { id, iconSize = "medium", color = "currentcolor", icon, className, style, htmlProps, iconState, ...rest } = props;
|
|
1310
|
-
const size = getSize(iconSize);
|
|
1311
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(icon, {
|
|
1312
|
-
...getBaseHTMLProps(id, className, style, htmlProps, rest),
|
|
1313
|
-
height: size,
|
|
1314
|
-
width: size,
|
|
1315
|
-
fill: color,
|
|
1316
|
-
"aria-hidden": htmlProps?.["aria-hidden"] ?? true,
|
|
1317
|
-
...iconState ? { iconState } : {}
|
|
1318
|
-
});
|
|
1319
|
-
}
|
|
1320
|
-
Icon.displayName = "Icon";
|
|
1321
|
-
//#endregion
|
|
1322
1256
|
//#region src/components/layout/common/layout.module.css
|
|
1323
1257
|
var layout_module_default = {
|
|
1324
1258
|
"dds-p": "dds-layout-module__dds-p",
|
|
@@ -1346,6 +1280,8 @@ var layout_module_default = {
|
|
|
1346
1280
|
"dds-display": "dds-layout-module__dds-display",
|
|
1347
1281
|
"dds-text-align": "dds-layout-module__dds-text-align",
|
|
1348
1282
|
"dds-word-break": "dds-layout-module__dds-word-break",
|
|
1283
|
+
"dds-z-index": "dds-layout-module__dds-z-index",
|
|
1284
|
+
"dds-flex": "dds-layout-module__dds-flex",
|
|
1349
1285
|
"dds-flex-dir": "dds-layout-module__dds-flex-dir",
|
|
1350
1286
|
"dds-gap": "dds-layout-module__dds-gap",
|
|
1351
1287
|
"dds-c-gap": "dds-layout-module__dds-c-gap",
|
|
@@ -1383,15 +1319,33 @@ const SPACING_SCALES = [
|
|
|
1383
1319
|
"x6",
|
|
1384
1320
|
"x10"
|
|
1385
1321
|
];
|
|
1322
|
+
const Z_INDEXES = [
|
|
1323
|
+
"skiptocontent",
|
|
1324
|
+
"modal-backdrop",
|
|
1325
|
+
"drawer",
|
|
1326
|
+
"drawer-backdrop",
|
|
1327
|
+
"overflowmenu",
|
|
1328
|
+
"popover",
|
|
1329
|
+
"tooltip",
|
|
1330
|
+
"dropdown",
|
|
1331
|
+
"sticky",
|
|
1332
|
+
"absolute-element"
|
|
1333
|
+
];
|
|
1386
1334
|
//#endregion
|
|
1387
1335
|
//#region src/components/layout/common/utils.tsx
|
|
1388
1336
|
const TOKEN_PREFIX = "dds";
|
|
1337
|
+
const hasValue = (value) => {
|
|
1338
|
+
return value !== void 0 && value !== null;
|
|
1339
|
+
};
|
|
1389
1340
|
function isBreakpointObject(value) {
|
|
1390
1341
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1391
1342
|
}
|
|
1392
1343
|
const isSpacingScale = (value) => {
|
|
1393
1344
|
return typeof value === "string" && SPACING_SCALES.includes(value);
|
|
1394
1345
|
};
|
|
1346
|
+
const isZIndex = (value) => {
|
|
1347
|
+
return typeof value === "string" && Z_INDEXES.includes(value);
|
|
1348
|
+
};
|
|
1395
1349
|
const isRelativeGridColumn = (type) => {
|
|
1396
1350
|
return type === "all" || type === "firstHalf" || type === "secondHalf";
|
|
1397
1351
|
};
|
|
@@ -1403,6 +1357,7 @@ function spacingPropToToken(value) {
|
|
|
1403
1357
|
}
|
|
1404
1358
|
const getSpacingToken = (v) => `var(--${TOKEN_PREFIX}-spacing-${spacingPropToToken(v)})`;
|
|
1405
1359
|
const getColorToken = (v) => `var(--${TOKEN_PREFIX}-color-${v})`;
|
|
1360
|
+
const getZIndexToken = (v) => `var(--${TOKEN_PREFIX}-zindex-${v})`;
|
|
1406
1361
|
const relativeGridColumnToken = (v, bp) => {
|
|
1407
1362
|
if (v === "all") return "1 / -1";
|
|
1408
1363
|
if (!bp) return "";
|
|
@@ -1412,6 +1367,7 @@ const getValue = (v, bp, invert) => {
|
|
|
1412
1367
|
let output;
|
|
1413
1368
|
if (isColor(v)) output = getColorToken(v);
|
|
1414
1369
|
else if (isSpacingScale(v)) output = getSpacingToken(v);
|
|
1370
|
+
else if (isZIndex(v)) output = getZIndexToken(v);
|
|
1415
1371
|
else if (isRelativeGridColumn(v)) output = relativeGridColumnToken(v, bp);
|
|
1416
1372
|
else output = v;
|
|
1417
1373
|
return invert ? invertValue(output) : output;
|
|
@@ -1432,10 +1388,10 @@ function getCSSProperties(property, prefix, suffix, invert) {
|
|
|
1432
1388
|
return properties;
|
|
1433
1389
|
}
|
|
1434
1390
|
function getResponsiveCSSProperties(property, prefix, suffix, invert) {
|
|
1435
|
-
if (
|
|
1391
|
+
if (property === void 0 || property === null) return;
|
|
1436
1392
|
const properties = {};
|
|
1437
1393
|
if (isBreakpointObject(property)) BREAKPOINTS.forEach((bp) => {
|
|
1438
|
-
if (property[bp]) properties[buildCSSKey(prefix, suffix, bp)] = convertMultiValue(property[bp].toString(), bp, invert);
|
|
1394
|
+
if (property[bp] !== void 0 && property[bp] !== null) properties[buildCSSKey(prefix, suffix, bp)] = convertMultiValue(property[bp].toString(), bp, invert);
|
|
1439
1395
|
});
|
|
1440
1396
|
else properties[buildCSSKey(prefix, suffix)] = convertMultiValue(property.toString(), void 0, invert);
|
|
1441
1397
|
return properties;
|
|
@@ -1490,7 +1446,7 @@ const ShowHide = ({ hideBelow, showBelow, className, style, htmlProps, id, as: C
|
|
|
1490
1446
|
ShowHide.displayName = "ShowHide";
|
|
1491
1447
|
//#endregion
|
|
1492
1448
|
//#region src/components/layout/Box/Box.tsx
|
|
1493
|
-
const Box = ({ id, className, style, padding, paddingInline, paddingBlock, margin, marginInline, marginBlock, height, maxHeight, minHeight, width, maxWidth, minWidth, position, left, right, bottom, top, overflow, overflowX, overflowY, display, textAlign, flexDirection, gap, columnGap, rowGap, alignItems, alignContent, justifyItems, placeItems, justifyContent, flexWrap, flexBasis, flexFlow, wordBreak, htmlProps, ...rest }) => {
|
|
1449
|
+
const Box = ({ id, className, style, padding, paddingInline, paddingBlock, margin, marginInline, marginBlock, height, maxHeight, minHeight, width, maxWidth, minWidth, position, left, right, bottom, top, overflow, overflowX, overflowY, display, textAlign, flex, flexDirection, gap, columnGap, rowGap, alignItems, alignContent, justifyItems, placeItems, justifyContent, flexWrap, flexBasis, flexFlow, wordBreak, zIndex, htmlProps, ...rest }) => {
|
|
1494
1450
|
const responsiveStyles = {
|
|
1495
1451
|
...getResponsiveCSSProperties(padding, "r", "p"),
|
|
1496
1452
|
...getResponsiveCSSProperties(paddingInline, "r", "p-i"),
|
|
@@ -1514,6 +1470,7 @@ const Box = ({ id, className, style, padding, paddingInline, paddingBlock, margi
|
|
|
1514
1470
|
...getResponsiveCSSProperties(overflowY, "r", "o-y"),
|
|
1515
1471
|
...getResponsiveCSSProperties(display, "r", "display"),
|
|
1516
1472
|
...getResponsiveCSSProperties(textAlign, "r", "text-align"),
|
|
1473
|
+
...getResponsiveCSSProperties(flex, "r", "flex"),
|
|
1517
1474
|
...getResponsiveCSSProperties(flexDirection, "r", "flex-dir"),
|
|
1518
1475
|
...getResponsiveCSSProperties(gap, "r", "gap"),
|
|
1519
1476
|
...getResponsiveCSSProperties(columnGap, "r", "c-gap"),
|
|
@@ -1526,9 +1483,10 @@ const Box = ({ id, className, style, padding, paddingInline, paddingBlock, margi
|
|
|
1526
1483
|
...getResponsiveCSSProperties(flexWrap, "r", "wrap"),
|
|
1527
1484
|
...getResponsiveCSSProperties(flexBasis, "r", "basis"),
|
|
1528
1485
|
...getResponsiveCSSProperties(flexFlow, "r", "flow"),
|
|
1529
|
-
...getResponsiveCSSProperties(wordBreak, "r", "word-break")
|
|
1486
|
+
...getResponsiveCSSProperties(wordBreak, "r", "word-break"),
|
|
1487
|
+
...getResponsiveCSSProperties(zIndex, "r", "z-index")
|
|
1530
1488
|
};
|
|
1531
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, { ...getBaseHTMLProps(id, cn(className, padding && layout_module_default["dds-p"], paddingInline && layout_module_default["dds-p-i"], paddingBlock && layout_module_default["dds-p-b"], margin && layout_module_default["dds-m"], marginInline && layout_module_default["dds-m-i"], marginBlock && layout_module_default["dds-m-b"], height && layout_module_default["dds-h"], maxHeight && layout_module_default["dds-max-h"], minHeight && layout_module_default["dds-min-h"], width && layout_module_default["dds-w"], maxWidth && layout_module_default["dds-max-w"], minWidth && layout_module_default["dds-min-w"], position && layout_module_default["dds-pos"], left && layout_module_default["dds-l"], right && layout_module_default["dds-r"], top && layout_module_default["dds-t"], bottom && layout_module_default["dds-b"], overflow && layout_module_default["dds-o"], overflowX && layout_module_default["dds-o-x"], overflowY && layout_module_default["dds-o-y"], display && layout_module_default["dds-display"], textAlign && layout_module_default["dds-text-align"], flexDirection && layout_module_default["dds-flex-dir"], gap && layout_module_default["dds-gap"], columnGap && layout_module_default["dds-c-gap"], rowGap && layout_module_default["dds-r-gap"], alignContent && layout_module_default["dds-a-c"], alignItems && layout_module_default["dds-a-i"], justifyContent && layout_module_default["dds-j-c"], justifyItems && layout_module_default["dds-j-i"], placeItems && layout_module_default["dds-pl-i"], flexWrap && layout_module_default["dds-wrap"], flexBasis && layout_module_default["dds-basis"], flexFlow && layout_module_default["dds-flow"], wordBreak && layout_module_default["dds-word-break"]), {
|
|
1489
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, { ...getBaseHTMLProps(id, cn(className, hasValue(padding) && layout_module_default["dds-p"], hasValue(paddingInline) && layout_module_default["dds-p-i"], hasValue(paddingBlock) && layout_module_default["dds-p-b"], hasValue(margin) && layout_module_default["dds-m"], hasValue(marginInline) && layout_module_default["dds-m-i"], hasValue(marginBlock) && layout_module_default["dds-m-b"], hasValue(height) && layout_module_default["dds-h"], hasValue(maxHeight) && layout_module_default["dds-max-h"], hasValue(minHeight) && layout_module_default["dds-min-h"], hasValue(width) && layout_module_default["dds-w"], hasValue(maxWidth) && layout_module_default["dds-max-w"], hasValue(minWidth) && layout_module_default["dds-min-w"], hasValue(position) && layout_module_default["dds-pos"], hasValue(left) && layout_module_default["dds-l"], hasValue(right) && layout_module_default["dds-r"], hasValue(top) && layout_module_default["dds-t"], hasValue(bottom) && layout_module_default["dds-b"], hasValue(overflow) && layout_module_default["dds-o"], hasValue(overflowX) && layout_module_default["dds-o-x"], hasValue(overflowY) && layout_module_default["dds-o-y"], hasValue(display) && layout_module_default["dds-display"], hasValue(textAlign) && layout_module_default["dds-text-align"], hasValue(flex) && layout_module_default["dds-flex"], hasValue(flexDirection) && layout_module_default["dds-flex-dir"], hasValue(gap) && layout_module_default["dds-gap"], hasValue(columnGap) && layout_module_default["dds-c-gap"], hasValue(rowGap) && layout_module_default["dds-r-gap"], hasValue(alignContent) && layout_module_default["dds-a-c"], hasValue(alignItems) && layout_module_default["dds-a-i"], hasValue(justifyContent) && layout_module_default["dds-j-c"], hasValue(justifyItems) && layout_module_default["dds-j-i"], hasValue(placeItems) && layout_module_default["dds-pl-i"], hasValue(flexWrap) && layout_module_default["dds-wrap"], hasValue(flexBasis) && layout_module_default["dds-basis"], hasValue(flexFlow) && layout_module_default["dds-flow"], hasValue(wordBreak) && layout_module_default["dds-word-break"], hasValue(zIndex) && layout_module_default["dds-z-index"]), {
|
|
1532
1490
|
...style,
|
|
1533
1491
|
...responsiveStyles
|
|
1534
1492
|
}, htmlProps, rest) });
|
|
@@ -1546,7 +1504,7 @@ const Bleed = ({ id, className, style, htmlProps, bleedMarginBlock, bleedMarginI
|
|
|
1546
1504
|
...getResponsiveCSSProperties(bleedMarginBlock, "r", "bleed-m-b", true),
|
|
1547
1505
|
...reflStyles
|
|
1548
1506
|
};
|
|
1549
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, { ...getBaseHTMLProps(id, cn(className, bleedMarginInline && layout_module_default["dds-bleed-m-i"], bleedMarginBlock && layout_module_default["dds-bleed-m-b"], bleedMarginInline && reflectivePadding && layout_module_default["dds-p-i"], bleedMarginBlock && reflectivePadding && layout_module_default["dds-p-b"]), {
|
|
1507
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, { ...getBaseHTMLProps(id, cn(className, hasValue(bleedMarginInline) && layout_module_default["dds-bleed-m-i"], hasValue(bleedMarginBlock) && layout_module_default["dds-bleed-m-b"], hasValue(bleedMarginInline) && reflectivePadding && layout_module_default["dds-p-i"], hasValue(bleedMarginBlock) && reflectivePadding && layout_module_default["dds-p-b"]), {
|
|
1550
1508
|
...style,
|
|
1551
1509
|
...responsiveStyles
|
|
1552
1510
|
}, htmlProps, rest) });
|
|
@@ -1622,7 +1580,7 @@ const Grid = ({ id, className, htmlProps, defaultPageLayout = true, display = "g
|
|
|
1622
1580
|
...getResponsiveCSSProperties(gridTemplateAreas, "r", "grid-template-areas")
|
|
1623
1581
|
};
|
|
1624
1582
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
1625
|
-
...getBaseHTMLProps(id, cn(className, resolvedGridTemplateColumns && Grid_module_default["dds-grid-template-columns"], grid && Grid_module_default["dds-grid"], gridAutoColumns && Grid_module_default["dds-grid-auto-columns"], gridAutoFlow && Grid_module_default["dds-grid-auto-flow"], gridAutoRows && Grid_module_default["dds-grid-auto-rows"], gridTemplate && Grid_module_default["dds-grid-template"], gridTemplateRows && Grid_module_default["dds-grid-template-rows"], gridTemplateAreas && Grid_module_default["dds-grid-template-areas"]), {
|
|
1583
|
+
...getBaseHTMLProps(id, cn(className, hasValue(resolvedGridTemplateColumns) && Grid_module_default["dds-grid-template-columns"], hasValue(grid) && Grid_module_default["dds-grid"], hasValue(gridAutoColumns) && Grid_module_default["dds-grid-auto-columns"], hasValue(gridAutoFlow) && Grid_module_default["dds-grid-auto-flow"], hasValue(gridAutoRows) && Grid_module_default["dds-grid-auto-rows"], hasValue(gridTemplate) && Grid_module_default["dds-grid-template"], hasValue(gridTemplateRows) && Grid_module_default["dds-grid-template-rows"], hasValue(gridTemplateAreas) && Grid_module_default["dds-grid-template-areas"]), {
|
|
1626
1584
|
...style,
|
|
1627
1585
|
...styleVariables
|
|
1628
1586
|
}, htmlProps, rest),
|
|
@@ -1642,7 +1600,7 @@ const GridChild = ({ id, className, htmlProps, style, gridRow, gridArea, justify
|
|
|
1642
1600
|
...getResponsiveCSSProperties(justifySelf, "r", "j-self"),
|
|
1643
1601
|
...getResponsiveCSSProperties(columnsOccupied, "r", "grid-column")
|
|
1644
1602
|
};
|
|
1645
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, { ...getBaseHTMLProps(id, cn(className, Grid_module_default["child-col-count"], gridRow && Grid_module_default["dds-grid-row"], gridArea && Grid_module_default["dds-grid-area"], justifySelf && Grid_module_default["dds-j-self"], columnsOccupied && Grid_module_default["dds-grid-column"], columnsOccupied === "firstHalf" && Grid_module_default["child--first-half"], columnsOccupied === "secondHalf" && Grid_module_default["child--second-half"]), {
|
|
1603
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, { ...getBaseHTMLProps(id, cn(className, Grid_module_default["child-col-count"], hasValue(gridRow) && Grid_module_default["dds-grid-row"], hasValue(gridArea) && Grid_module_default["dds-grid-area"], hasValue(justifySelf) && Grid_module_default["dds-j-self"], hasValue(columnsOccupied) && Grid_module_default["dds-grid-column"], columnsOccupied === "firstHalf" && Grid_module_default["child--first-half"], columnsOccupied === "secondHalf" && Grid_module_default["child--second-half"]), {
|
|
1646
1604
|
...style,
|
|
1647
1605
|
...styleVariables
|
|
1648
1606
|
}, htmlProps, rest) });
|
|
@@ -1701,6 +1659,80 @@ const HStack = ({ id, className, style, htmlProps, ...rest }) => {
|
|
|
1701
1659
|
};
|
|
1702
1660
|
HStack.displayName = "HStack";
|
|
1703
1661
|
//#endregion
|
|
1662
|
+
//#region src/components/helpers/Backdrop/Backdrop.tsx
|
|
1663
|
+
/**
|
|
1664
|
+
* Backdrop-komponent, viser et bakgrunnslag for et element som skal låse applikasjonen i bakgrunnen (Modal el.l.).
|
|
1665
|
+
*
|
|
1666
|
+
* @component
|
|
1667
|
+
* @param {Object} props - Props for komponenten.
|
|
1668
|
+
* @param {boolean} [props.isMounted] - Angir om backdropen skal være synlig (`true`) eller skjult (`false`). Standard er `false`.
|
|
1669
|
+
* @param {'drawer' | 'modal'} props.zIndex - Bestemmer hvilken z-index-klasse som skal brukes, avhengig av konteksten (f.eks. drawer eller modal).
|
|
1670
|
+
* @param {React.ReactNode} [props.children] - Eventuelt innhold som skal vises inni backdropen.
|
|
1671
|
+
* @param {React.MouseEventHandler<HTMLDivElement>} [props.onClick] - Klikkhåndterer for backdropen, f.eks. for å lukke en modal.
|
|
1672
|
+
* @param {React.Ref<HTMLDivElement>} [props.ref] - Referanse til DOM-elementet.
|
|
1673
|
+
*
|
|
1674
|
+
* @returns {JSX.Element} Et `<div>`-element med riktige klasser basert på synlighet og z-index.
|
|
1675
|
+
|
|
1676
|
+
* @example
|
|
1677
|
+
* ```tsx
|
|
1678
|
+
* <Backdrop isMounted={true} zIndex="modal" onClick={handleClose}>
|
|
1679
|
+
* <ModalContent />
|
|
1680
|
+
* </Backdrop>
|
|
1681
|
+
* ```
|
|
1682
|
+
*/
|
|
1683
|
+
const Backdrop = ({ isMounted, zIndex, ...props }) => {
|
|
1684
|
+
const isMountedCn = isMounted ? "visible" : "hidden";
|
|
1685
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
1686
|
+
className: cn(Backdrop_module_default.backdrop, Backdrop_module_default[`backdrop--${isMountedCn}`]),
|
|
1687
|
+
position: "fixed",
|
|
1688
|
+
display: "flex",
|
|
1689
|
+
alignItems: "center",
|
|
1690
|
+
justifyContent: "center",
|
|
1691
|
+
top: 0,
|
|
1692
|
+
left: 0,
|
|
1693
|
+
right: 0,
|
|
1694
|
+
bottom: 0,
|
|
1695
|
+
overflowY: "auto",
|
|
1696
|
+
zIndex: `${zIndex}-backdrop`,
|
|
1697
|
+
...props
|
|
1698
|
+
});
|
|
1699
|
+
};
|
|
1700
|
+
Backdrop.displayName = "Backdrop";
|
|
1701
|
+
//#endregion
|
|
1702
|
+
//#region src/components/helpers/Dropdown/DropdownItem.module.css
|
|
1703
|
+
var DropdownItem_module_default = {
|
|
1704
|
+
"item": "dds-DropdownItem-module__item",
|
|
1705
|
+
"default": "dds-DropdownItem-module__default",
|
|
1706
|
+
"danger": "dds-DropdownItem-module__danger",
|
|
1707
|
+
"item--interactive": "dds-DropdownItem-module__item--interactive",
|
|
1708
|
+
"item--loading": "dds-DropdownItem-module__item--loading"
|
|
1709
|
+
};
|
|
1710
|
+
//#endregion
|
|
1711
|
+
//#region src/components/Icon/Icon.tsx
|
|
1712
|
+
const getSize = (iconSize) => {
|
|
1713
|
+
switch (iconSize) {
|
|
1714
|
+
case "small": return "var(--dds-size-icon-small)";
|
|
1715
|
+
case "medium": return "var(--dds-size-icon-medium)";
|
|
1716
|
+
case "large": return "var(--dds-size-icon-large)";
|
|
1717
|
+
case "component": return "var(--dds-size-icon-component)";
|
|
1718
|
+
case "inherit": return "1em";
|
|
1719
|
+
default: return "var(--dds-size-icon-medium)";
|
|
1720
|
+
}
|
|
1721
|
+
};
|
|
1722
|
+
function Icon(props) {
|
|
1723
|
+
const { id, iconSize = "medium", color = "currentcolor", icon, className, style, htmlProps, iconState, ...rest } = props;
|
|
1724
|
+
const size = getSize(iconSize);
|
|
1725
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(icon, {
|
|
1726
|
+
...getBaseHTMLProps(id, className, style, htmlProps, rest),
|
|
1727
|
+
height: size,
|
|
1728
|
+
width: size,
|
|
1729
|
+
fill: color,
|
|
1730
|
+
"aria-hidden": htmlProps?.["aria-hidden"] ?? true,
|
|
1731
|
+
...iconState ? { iconState } : {}
|
|
1732
|
+
});
|
|
1733
|
+
}
|
|
1734
|
+
Icon.displayName = "Icon";
|
|
1735
|
+
//#endregion
|
|
1704
1736
|
//#region src/components/Spinner/Spinner.module.css
|
|
1705
1737
|
var Spinner_module_default = {
|
|
1706
1738
|
"svg": "dds-Spinner-module__svg",
|
|
@@ -2159,6 +2191,14 @@ function ArrowUpIcon(props) {
|
|
|
2159
2191
|
});
|
|
2160
2192
|
}
|
|
2161
2193
|
//#endregion
|
|
2194
|
+
//#region src/components/Icon/icons/arrowUpRight.tsx
|
|
2195
|
+
function ArrowUpRightIcon(props) {
|
|
2196
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgWrapper, {
|
|
2197
|
+
...props,
|
|
2198
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M16.25 17V7.75H7C6.58579 7.75 6.25 7.41421 6.25 7C6.25 6.58579 6.58579 6.25 7 6.25H17C17.4142 6.25 17.75 6.58579 17.75 7V17C17.75 17.4142 17.4142 17.75 17 17.75C16.5858 17.75 16.25 17.4142 16.25 17Z" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M16.4697 6.46973C16.7626 6.17683 17.2374 6.17683 17.5303 6.46973C17.8232 6.76262 17.8232 7.23738 17.5303 7.53027L7.53027 17.5303C7.23738 17.8232 6.76262 17.8232 6.46973 17.5303C6.17683 17.2374 6.17683 16.7626 6.46973 16.4697L16.4697 6.46973Z" })]
|
|
2199
|
+
});
|
|
2200
|
+
}
|
|
2201
|
+
//#endregion
|
|
2162
2202
|
//#region src/components/Icon/icons/attachment.tsx
|
|
2163
2203
|
function AttachmentIcon(props) {
|
|
2164
2204
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SvgWrapper, {
|
|
@@ -2494,6 +2534,31 @@ function DeathsIcon(props) {
|
|
|
2494
2534
|
});
|
|
2495
2535
|
}
|
|
2496
2536
|
//#endregion
|
|
2537
|
+
//#region src/components/Icon/icons/desktop.tsx
|
|
2538
|
+
function DesktopIcon(props) {
|
|
2539
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgWrapper, {
|
|
2540
|
+
...props,
|
|
2541
|
+
children: [
|
|
2542
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M11.25 21V17C11.25 16.5858 11.5858 16.25 12 16.25C12.4142 16.25 12.75 16.5858 12.75 17V21C12.75 21.4142 12.4142 21.75 12 21.75C11.5858 21.75 11.25 21.4142 11.25 21Z" }),
|
|
2543
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M18 20.25C18.4142 20.25 18.75 20.5858 18.75 21C18.75 21.4142 18.4142 21.75 18 21.75L6 21.75C5.58579 21.75 5.25 21.4142 5.25 21C5.25 20.5858 5.58579 20.25 6 20.25L18 20.25Z" }),
|
|
2544
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M21.25 6C21.25 5.30964 20.6904 4.75 20 4.75H4C3.30964 4.75 2.75 5.30964 2.75 6V15C2.75 15.6904 3.30964 16.25 4 16.25H20C20.6904 16.25 21.25 15.6904 21.25 15V6ZM22.75 15C22.75 16.5188 21.5188 17.75 20 17.75H4C2.48122 17.75 1.25 16.5188 1.25 15V6C1.25 4.48122 2.48122 3.25 4 3.25H20C21.5188 3.25 22.75 4.48122 22.75 6V15Z" })
|
|
2545
|
+
]
|
|
2546
|
+
});
|
|
2547
|
+
}
|
|
2548
|
+
//#endregion
|
|
2549
|
+
//#region src/components/Icon/icons/desktopMobile.tsx
|
|
2550
|
+
function DesktopMobileIcon(props) {
|
|
2551
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgWrapper, {
|
|
2552
|
+
...props,
|
|
2553
|
+
children: [
|
|
2554
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M19.25 8.5V6C19.25 5.66848 19.1182 5.35063 18.8838 5.11621C18.6494 4.88179 18.3315 4.75 18 4.75H4C3.66848 4.75 3.35063 4.88179 3.11621 5.11621C2.88179 5.35063 2.75 5.66848 2.75 6V15C2.75 15.3315 2.88179 15.6494 3.11621 15.8838C3.35063 16.1182 3.66848 16.25 4 16.25H12.5C12.9142 16.25 13.25 16.5858 13.25 17C13.25 17.4142 12.9142 17.75 12.5 17.75H4C3.27065 17.75 2.57139 17.4601 2.05566 16.9443C1.53994 16.4286 1.25 15.7293 1.25 15V6C1.25 5.27065 1.53994 4.57139 2.05566 4.05566C2.57139 3.53994 3.27065 3.25 4 3.25H18C18.7293 3.25 19.4286 3.53994 19.9443 4.05566C20.4601 4.57139 20.75 5.27065 20.75 6V8.5C20.75 8.91421 20.4142 9.25 20 9.25C19.5858 9.25 19.25 8.91421 19.25 8.5Z" }),
|
|
2555
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M10.25 21V17C10.25 16.5858 10.5858 16.25 11 16.25C11.4142 16.25 11.75 16.5858 11.75 17V21C11.75 21.4142 11.4142 21.75 11 21.75C10.5858 21.75 10.25 21.4142 10.25 21Z" }),
|
|
2556
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M13 20.25C13.4142 20.25 13.75 20.5858 13.75 21C13.75 21.4142 13.4142 21.75 13 21.75H6C5.58579 21.75 5.25 21.4142 5.25 21C5.25 20.5858 5.58579 20.25 6 20.25H13Z" }),
|
|
2557
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M21.25 14C21.25 13.3096 20.6904 12.75 20 12.75H18C17.3096 12.75 16.75 13.3096 16.75 14V20C16.75 20.6904 17.3096 21.25 18 21.25H20C20.6904 21.25 21.25 20.6904 21.25 20V14ZM22.75 20C22.75 21.5188 21.5188 22.75 20 22.75H18C16.4812 22.75 15.25 21.5188 15.25 20V14C15.25 12.4812 16.4812 11.25 18 11.25H20C21.5188 11.25 22.75 12.4812 22.75 14V20Z" })
|
|
2558
|
+
]
|
|
2559
|
+
});
|
|
2560
|
+
}
|
|
2561
|
+
//#endregion
|
|
2497
2562
|
//#region src/components/Icon/icons/doubleChevronLeft.tsx
|
|
2498
2563
|
function DoubleChevronLeftIcon(props) {
|
|
2499
2564
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgWrapper, {
|
|
@@ -3437,6 +3502,59 @@ function StarHalfFilledIcon(props) {
|
|
|
3437
3502
|
});
|
|
3438
3503
|
}
|
|
3439
3504
|
//#endregion
|
|
3505
|
+
//#region src/components/Icon/icons/stickyNote.tsx
|
|
3506
|
+
function StickyNoteIcon(props) {
|
|
3507
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SvgWrapper, {
|
|
3508
|
+
...props,
|
|
3509
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M2.25 19V5C2.25 4.27066 2.53994 3.57139 3.05566 3.05566C3.57139 2.53994 4.27066 2.25 5 2.25H15V2.25098C15.4151 2.2502 15.8263 2.33056 16.21 2.48926C16.5939 2.64814 16.9429 2.88158 17.2363 3.17578L20.8232 6.7627C21.1179 7.05626 21.3517 7.40573 21.5107 7.79004C21.6694 8.17367 21.7508 8.58486 21.75 9V19C21.75 19.7293 21.4601 20.4286 20.9443 20.9443C20.4286 21.4601 19.7293 21.75 19 21.75H5C4.27065 21.75 3.57139 21.4601 3.05566 20.9443C2.53994 20.4286 2.25 19.7293 2.25 19ZM15.75 8C15.75 8.0663 15.7764 8.12987 15.8232 8.17676C15.8701 8.22364 15.9337 8.25 16 8.25H20.0713C19.9921 8.09336 19.8894 7.94947 19.7646 7.8252L16.1748 4.23535C16.0505 4.11063 15.9066 4.00793 15.75 3.92871V8ZM3.75 19C3.75 19.3315 3.88179 19.6494 4.11621 19.8838C4.35063 20.1182 4.66848 20.25 5 20.25H19C19.3315 20.25 19.6494 20.1182 19.8838 19.8838C20.1182 19.6494 20.25 19.3315 20.25 19V9.75H16C15.5359 9.75 15.0909 9.56549 14.7627 9.2373C14.4345 8.90912 14.25 8.46413 14.25 8V3.75H5C4.66848 3.75 4.35063 3.88179 4.11621 4.11621C3.88179 4.35063 3.75 4.66848 3.75 5V19Z" })
|
|
3510
|
+
});
|
|
3511
|
+
}
|
|
3512
|
+
//#endregion
|
|
3513
|
+
//#region src/components/Icon/icons/support.tsx
|
|
3514
|
+
function SupportIcon(props) {
|
|
3515
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgWrapper, {
|
|
3516
|
+
...props,
|
|
3517
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M7.25 13C7.25 12.6685 7.11821 12.3506 6.88379 12.1162C6.64937 11.8818 6.33152 11.75 6 11.75H3.75V16C3.75 16.3315 3.88179 16.6494 4.11621 16.8838C4.35063 17.1182 4.66848 17.25 5 17.25H6C6.33152 17.25 6.64937 17.1182 6.88379 16.8838C7.0888 16.6788 7.21564 16.41 7.24414 16.124L7.25 16V13ZM8.75 16C8.75 16.7293 8.46006 17.4286 7.94434 17.9443C7.42861 18.4601 6.72935 18.75 6 18.75H5C4.27065 18.75 3.57139 18.4601 3.05566 17.9443C2.53994 17.4286 2.25 16.7293 2.25 16V11C2.25 9.71961 2.5022 8.45148 2.99219 7.26855C3.48217 6.08573 4.20016 5.01078 5.10547 4.10547C6.01078 3.20016 7.08573 2.48217 8.26855 1.99219C9.45148 1.5022 10.7196 1.25 12 1.25C13.2804 1.25 14.5485 1.5022 15.7314 1.99219C16.9143 2.48217 17.9892 3.20016 18.8945 4.10547C19.7998 5.01078 20.5178 6.08573 21.0078 7.26855C21.4978 8.45148 21.75 9.71961 21.75 11V16C21.75 16.7293 21.4601 17.4286 20.9443 17.9443C20.4286 18.4601 19.7293 18.75 19 18.75H18C17.2707 18.75 16.5714 18.4601 16.0557 17.9443C15.6043 17.493 15.3261 16.9011 15.2637 16.2715L15.25 16V13C15.25 12.2707 15.5399 11.5714 16.0557 11.0557C16.5714 10.5399 17.2707 10.25 18 10.25H20.2148C20.1394 9.42375 19.9407 8.61195 19.6221 7.84277C19.2075 6.84186 18.6001 5.93209 17.834 5.16602C17.0679 4.39995 16.1581 3.79253 15.1572 3.37793C14.1563 2.96333 13.0834 2.75 12 2.75C10.9166 2.75 9.84371 2.96333 8.84277 3.37793C7.84186 3.79253 6.93209 4.39995 6.16602 5.16602C5.39995 5.93209 4.79253 6.84186 4.37793 7.84277C4.05933 8.61195 3.86059 9.42375 3.78516 10.25H6C6.72935 10.25 7.42861 10.5399 7.94434 11.0557C8.46006 11.5714 8.75 12.2707 8.75 13V16ZM16.75 16C16.75 16.3315 16.8818 16.6494 17.1162 16.8838C17.3506 17.1182 17.6685 17.25 18 17.25H19C19.3315 17.25 19.6494 17.1182 19.8838 16.8838C20.1182 16.6494 20.25 16.3315 20.25 16V11.75H18C17.6685 11.75 17.3506 11.8818 17.1162 12.1162C16.8818 12.3506 16.75 12.6685 16.75 13V16Z" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M20.25 18V16C20.25 15.5858 20.5858 15.25 21 15.25C21.4142 15.25 21.75 15.5858 21.75 16V18C21.75 19.2598 21.2492 20.4676 20.3584 21.3584C19.4676 22.2492 18.2598 22.75 17 22.75H12C11.5858 22.75 11.25 22.4142 11.25 22C11.25 21.5858 11.5858 21.25 12 21.25H17C17.862 21.25 18.6884 20.9073 19.2979 20.2979C19.9073 19.6884 20.25 18.862 20.25 18Z" })]
|
|
3518
|
+
});
|
|
3519
|
+
}
|
|
3520
|
+
//#endregion
|
|
3521
|
+
//#region src/components/Icon/icons/sun.tsx
|
|
3522
|
+
function SunIcon(props) {
|
|
3523
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgWrapper, {
|
|
3524
|
+
...props,
|
|
3525
|
+
children: [
|
|
3526
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M16.25 12C16.25 9.65279 14.3472 7.75 12 7.75C9.65279 7.75 7.75 9.65279 7.75 12C7.75 14.3472 9.65279 16.25 12 16.25C14.3472 16.25 16.25 14.3472 16.25 12ZM17.75 12C17.75 15.1756 15.1756 17.75 12 17.75C8.82436 17.75 6.25 15.1756 6.25 12C6.25 8.82436 8.82436 6.25 12 6.25C15.1756 6.25 17.75 8.82436 17.75 12Z" }),
|
|
3527
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M11.25 4V2C11.25 1.58579 11.5858 1.25 12 1.25C12.4142 1.25 12.75 1.58579 12.75 2V4C12.75 4.41421 12.4142 4.75 12 4.75C11.5858 4.75 11.25 4.41421 11.25 4Z" }),
|
|
3528
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M11.25 22V20C11.25 19.5858 11.5858 19.25 12 19.25C12.4142 19.25 12.75 19.5858 12.75 20V22C12.75 22.4142 12.4142 22.75 12 22.75C11.5858 22.75 11.25 22.4142 11.25 22Z" }),
|
|
3529
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M4.39972 4.39966C4.69261 4.10677 5.16737 4.10677 5.46027 4.39966L6.87042 5.80981C7.16316 6.10272 7.16326 6.57752 6.87042 6.87036C6.57758 7.1632 6.10278 7.1631 5.80988 6.87036L4.39972 5.46021C4.10683 5.16731 4.10683 4.69255 4.39972 4.39966Z" }),
|
|
3530
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M17.1297 17.1296C17.4226 16.8367 17.8974 16.8367 18.1902 17.1296L19.6004 18.5398C19.8931 18.8327 19.8932 19.3075 19.6004 19.6003C19.3076 19.8932 18.8328 19.8931 18.5399 19.6003L17.1297 18.1902C16.8368 17.8973 16.8368 17.4225 17.1297 17.1296Z" }),
|
|
3531
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M4 11.25C4.41421 11.25 4.75 11.5858 4.75 12C4.75 12.4142 4.41421 12.75 4 12.75H2C1.58579 12.75 1.25 12.4142 1.25 12C1.25 11.5858 1.58579 11.25 2 11.25H4Z" }),
|
|
3532
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M22 11.25C22.4142 11.25 22.75 11.5858 22.75 12C22.75 12.4142 22.4142 12.75 22 12.75H20C19.5858 12.75 19.25 12.4142 19.25 12C19.25 11.5858 19.5858 11.25 20 11.25H22Z" }),
|
|
3533
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M5.80988 17.1296C6.10278 16.8368 6.57756 16.8368 6.87042 17.1296C7.16321 17.4225 7.16321 17.8973 6.87042 18.1902L5.46027 19.6003C5.16739 19.8931 4.69259 19.8931 4.39972 19.6003C4.10685 19.3075 4.1069 18.8327 4.39972 18.5398L5.80988 17.1296Z" }),
|
|
3534
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M18.5399 4.39966C18.8328 4.10684 19.3075 4.10679 19.6004 4.39966C19.8932 4.69253 19.8932 5.16733 19.6004 5.46021L18.1902 6.87036C17.8974 7.16315 17.4226 7.16315 17.1297 6.87036C16.8368 6.57749 16.8369 6.10271 17.1297 5.80981L18.5399 4.39966Z" })
|
|
3535
|
+
]
|
|
3536
|
+
});
|
|
3537
|
+
}
|
|
3538
|
+
//#endregion
|
|
3539
|
+
//#region src/components/Icon/icons/sunHalfFilled.tsx
|
|
3540
|
+
function SunHalfFilledIcon(props) {
|
|
3541
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgWrapper, {
|
|
3542
|
+
...props,
|
|
3543
|
+
children: [
|
|
3544
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M16.25 12C16.25 9.65279 14.3472 7.75 12 7.75C9.65279 7.75 7.75 9.65279 7.75 12C7.75 14.3472 9.65279 16.25 12 16.25C14.3472 16.25 16.25 14.3472 16.25 12ZM17.75 12C17.75 15.1756 15.1756 17.75 12 17.75C8.82436 17.75 6.25 15.1756 6.25 12C6.25 8.82436 8.82436 6.25 12 6.25C15.1756 6.25 17.75 8.82436 17.75 12Z" }),
|
|
3545
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M7 12C7 14.7614 9.23858 17 12 17V7C9.23858 7 7 9.23858 7 12Z" }),
|
|
3546
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M11.25 4V2C11.25 1.58579 11.5858 1.25 12 1.25C12.4142 1.25 12.75 1.58579 12.75 2V4C12.75 4.41421 12.4142 4.75 12 4.75C11.5858 4.75 11.25 4.41421 11.25 4Z" }),
|
|
3547
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M11.25 22V20C11.25 19.5858 11.5858 19.25 12 19.25C12.4142 19.25 12.75 19.5858 12.75 20V22C12.75 22.4142 12.4142 22.75 12 22.75C11.5858 22.75 11.25 22.4142 11.25 22Z" }),
|
|
3548
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M4.39972 4.39966C4.69261 4.10677 5.16737 4.10677 5.46027 4.39966L6.87042 5.80981C7.16316 6.10272 7.16326 6.57752 6.87042 6.87036C6.57758 7.1632 6.10278 7.1631 5.80988 6.87036L4.39972 5.46021C4.10683 5.16731 4.10683 4.69255 4.39972 4.39966Z" }),
|
|
3549
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M17.1297 17.1296C17.4226 16.8367 17.8974 16.8367 18.1902 17.1296L19.6004 18.5398C19.8931 18.8327 19.8932 19.3075 19.6004 19.6003C19.3076 19.8932 18.8328 19.8931 18.5399 19.6003L17.1297 18.1902C16.8368 17.8973 16.8368 17.4225 17.1297 17.1296Z" }),
|
|
3550
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M4 11.25C4.41421 11.25 4.75 11.5858 4.75 12C4.75 12.4142 4.41421 12.75 4 12.75H2C1.58579 12.75 1.25 12.4142 1.25 12C1.25 11.5858 1.58579 11.25 2 11.25H4Z" }),
|
|
3551
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M22 11.25C22.4142 11.25 22.75 11.5858 22.75 12C22.75 12.4142 22.4142 12.75 22 12.75H20C19.5858 12.75 19.25 12.4142 19.25 12C19.25 11.5858 19.5858 11.25 20 11.25H22Z" }),
|
|
3552
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M5.80988 17.1296C6.10278 16.8368 6.57756 16.8368 6.87042 17.1296C7.16321 17.4225 7.16321 17.8973 6.87042 18.1902L5.46027 19.6003C5.16739 19.8931 4.69259 19.8931 4.39972 19.6003C4.10685 19.3075 4.1069 18.8327 4.39972 18.5398L5.80988 17.1296Z" }),
|
|
3553
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M18.5399 4.39966C18.8328 4.10684 19.3075 4.10679 19.6004 4.39966C19.8932 4.69253 19.8932 5.16733 19.6004 5.46021L18.1902 6.87036C17.8974 7.16315 17.4226 7.16315 17.1297 6.87036C16.8368 6.57749 16.8369 6.10271 17.1297 5.80981L18.5399 4.39966Z" })
|
|
3554
|
+
]
|
|
3555
|
+
});
|
|
3556
|
+
}
|
|
3557
|
+
//#endregion
|
|
3440
3558
|
//#region src/components/Icon/icons/sync.tsx
|
|
3441
3559
|
function SyncIcon(props) {
|
|
3442
3560
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SvgWrapper, {
|
|
@@ -3783,40 +3901,6 @@ function NotebookPenIcon(props) {
|
|
|
3783
3901
|
});
|
|
3784
3902
|
}
|
|
3785
3903
|
//#endregion
|
|
3786
|
-
//#region src/components/Icon/icons/stickyNote.tsx
|
|
3787
|
-
function StickyNoteIcon(props) {
|
|
3788
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SvgWrapper, {
|
|
3789
|
-
...props,
|
|
3790
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M2.25 19V5C2.25 4.27066 2.53994 3.57139 3.05566 3.05566C3.57139 2.53994 4.27066 2.25 5 2.25H15V2.25098C15.4151 2.2502 15.8263 2.33056 16.21 2.48926C16.5939 2.64814 16.9429 2.88158 17.2363 3.17578L20.8232 6.7627C21.1179 7.05626 21.3517 7.40573 21.5107 7.79004C21.6694 8.17367 21.7508 8.58486 21.75 9V19C21.75 19.7293 21.4601 20.4286 20.9443 20.9443C20.4286 21.4601 19.7293 21.75 19 21.75H5C4.27065 21.75 3.57139 21.4601 3.05566 20.9443C2.53994 20.4286 2.25 19.7293 2.25 19ZM15.75 8C15.75 8.0663 15.7764 8.12987 15.8232 8.17676C15.8701 8.22364 15.9337 8.25 16 8.25H20.0713C19.9921 8.09336 19.8894 7.94947 19.7646 7.8252L16.1748 4.23535C16.0505 4.11063 15.9066 4.00793 15.75 3.92871V8ZM3.75 19C3.75 19.3315 3.88179 19.6494 4.11621 19.8838C4.35063 20.1182 4.66848 20.25 5 20.25H19C19.3315 20.25 19.6494 20.1182 19.8838 19.8838C20.1182 19.6494 20.25 19.3315 20.25 19V9.75H16C15.5359 9.75 15.0909 9.56549 14.7627 9.2373C14.4345 8.90912 14.25 8.46413 14.25 8V3.75H5C4.66848 3.75 4.35063 3.88179 4.11621 4.11621C3.88179 4.35063 3.75 4.66848 3.75 5V19Z" })
|
|
3791
|
-
});
|
|
3792
|
-
}
|
|
3793
|
-
//#endregion
|
|
3794
|
-
//#region src/components/Icon/icons/sun.tsx
|
|
3795
|
-
function SunIcon(props) {
|
|
3796
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgWrapper, {
|
|
3797
|
-
...props,
|
|
3798
|
-
children: [
|
|
3799
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M16.25 12C16.25 9.65279 14.3472 7.75 12 7.75C9.65279 7.75 7.75 9.65279 7.75 12C7.75 14.3472 9.65279 16.25 12 16.25C14.3472 16.25 16.25 14.3472 16.25 12ZM17.75 12C17.75 15.1756 15.1756 17.75 12 17.75C8.82436 17.75 6.25 15.1756 6.25 12C6.25 8.82436 8.82436 6.25 12 6.25C15.1756 6.25 17.75 8.82436 17.75 12Z" }),
|
|
3800
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M11.25 4V2C11.25 1.58579 11.5858 1.25 12 1.25C12.4142 1.25 12.75 1.58579 12.75 2V4C12.75 4.41421 12.4142 4.75 12 4.75C11.5858 4.75 11.25 4.41421 11.25 4Z" }),
|
|
3801
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M11.25 22V20C11.25 19.5858 11.5858 19.25 12 19.25C12.4142 19.25 12.75 19.5858 12.75 20V22C12.75 22.4142 12.4142 22.75 12 22.75C11.5858 22.75 11.25 22.4142 11.25 22Z" }),
|
|
3802
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M4.39972 4.39966C4.69261 4.10677 5.16737 4.10677 5.46027 4.39966L6.87042 5.80981C7.16316 6.10272 7.16326 6.57752 6.87042 6.87036C6.57758 7.1632 6.10278 7.1631 5.80988 6.87036L4.39972 5.46021C4.10683 5.16731 4.10683 4.69255 4.39972 4.39966Z" }),
|
|
3803
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M17.1297 17.1296C17.4226 16.8367 17.8974 16.8367 18.1902 17.1296L19.6004 18.5398C19.8931 18.8327 19.8932 19.3075 19.6004 19.6003C19.3076 19.8932 18.8328 19.8931 18.5399 19.6003L17.1297 18.1902C16.8368 17.8973 16.8368 17.4225 17.1297 17.1296Z" }),
|
|
3804
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M4 11.25C4.41421 11.25 4.75 11.5858 4.75 12C4.75 12.4142 4.41421 12.75 4 12.75H2C1.58579 12.75 1.25 12.4142 1.25 12C1.25 11.5858 1.58579 11.25 2 11.25H4Z" }),
|
|
3805
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M22 11.25C22.4142 11.25 22.75 11.5858 22.75 12C22.75 12.4142 22.4142 12.75 22 12.75H20C19.5858 12.75 19.25 12.4142 19.25 12C19.25 11.5858 19.5858 11.25 20 11.25H22Z" }),
|
|
3806
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M5.80988 17.1296C6.10278 16.8368 6.57756 16.8368 6.87042 17.1296C7.16321 17.4225 7.16321 17.8973 6.87042 18.1902L5.46027 19.6003C5.16739 19.8931 4.69259 19.8931 4.39972 19.6003C4.10685 19.3075 4.1069 18.8327 4.39972 18.5398L5.80988 17.1296Z" }),
|
|
3807
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M18.5399 4.39966C18.8328 4.10684 19.3075 4.10679 19.6004 4.39966C19.8932 4.69253 19.8932 5.16733 19.6004 5.46021L18.1902 6.87036C17.8974 7.16315 17.4226 7.16315 17.1297 6.87036C16.8368 6.57749 16.8369 6.10271 17.1297 5.80981L18.5399 4.39966Z" })
|
|
3808
|
-
]
|
|
3809
|
-
});
|
|
3810
|
-
}
|
|
3811
|
-
//#endregion
|
|
3812
|
-
//#region src/components/Icon/icons/support.tsx
|
|
3813
|
-
function SupportIcon(props) {
|
|
3814
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgWrapper, {
|
|
3815
|
-
...props,
|
|
3816
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M7.25 13C7.25 12.6685 7.11821 12.3506 6.88379 12.1162C6.64937 11.8818 6.33152 11.75 6 11.75H3.75V16C3.75 16.3315 3.88179 16.6494 4.11621 16.8838C4.35063 17.1182 4.66848 17.25 5 17.25H6C6.33152 17.25 6.64937 17.1182 6.88379 16.8838C7.0888 16.6788 7.21564 16.41 7.24414 16.124L7.25 16V13ZM8.75 16C8.75 16.7293 8.46006 17.4286 7.94434 17.9443C7.42861 18.4601 6.72935 18.75 6 18.75H5C4.27065 18.75 3.57139 18.4601 3.05566 17.9443C2.53994 17.4286 2.25 16.7293 2.25 16V11C2.25 9.71961 2.5022 8.45148 2.99219 7.26855C3.48217 6.08573 4.20016 5.01078 5.10547 4.10547C6.01078 3.20016 7.08573 2.48217 8.26855 1.99219C9.45148 1.5022 10.7196 1.25 12 1.25C13.2804 1.25 14.5485 1.5022 15.7314 1.99219C16.9143 2.48217 17.9892 3.20016 18.8945 4.10547C19.7998 5.01078 20.5178 6.08573 21.0078 7.26855C21.4978 8.45148 21.75 9.71961 21.75 11V16C21.75 16.7293 21.4601 17.4286 20.9443 17.9443C20.4286 18.4601 19.7293 18.75 19 18.75H18C17.2707 18.75 16.5714 18.4601 16.0557 17.9443C15.6043 17.493 15.3261 16.9011 15.2637 16.2715L15.25 16V13C15.25 12.2707 15.5399 11.5714 16.0557 11.0557C16.5714 10.5399 17.2707 10.25 18 10.25H20.2148C20.1394 9.42375 19.9407 8.61195 19.6221 7.84277C19.2075 6.84186 18.6001 5.93209 17.834 5.16602C17.0679 4.39995 16.1581 3.79253 15.1572 3.37793C14.1563 2.96333 13.0834 2.75 12 2.75C10.9166 2.75 9.84371 2.96333 8.84277 3.37793C7.84186 3.79253 6.93209 4.39995 6.16602 5.16602C5.39995 5.93209 4.79253 6.84186 4.37793 7.84277C4.05933 8.61195 3.86059 9.42375 3.78516 10.25H6C6.72935 10.25 7.42861 10.5399 7.94434 11.0557C8.46006 11.5714 8.75 12.2707 8.75 13V16ZM16.75 16C16.75 16.3315 16.8818 16.6494 17.1162 16.8838C17.3506 17.1182 17.6685 17.25 18 17.25H19C19.3315 17.25 19.6494 17.1182 19.8838 16.8838C20.1182 16.6494 20.25 16.3315 20.25 16V11.75H18C17.6685 11.75 17.3506 11.8818 17.1162 12.1162C16.8818 12.3506 16.75 12.6685 16.75 13V16Z" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M20.25 18V16C20.25 15.5858 20.5858 15.25 21 15.25C21.4142 15.25 21.75 15.5858 21.75 16V18C21.75 19.2598 21.2492 20.4676 20.3584 21.3584C19.4676 22.2492 18.2598 22.75 17 22.75H12C11.5858 22.75 11.25 22.4142 11.25 22C11.25 21.5858 11.5858 21.25 12 21.25H17C17.862 21.25 18.6884 20.9073 19.2979 20.2979C19.9073 19.6884 20.25 18.862 20.25 18Z" })]
|
|
3817
|
-
});
|
|
3818
|
-
}
|
|
3819
|
-
//#endregion
|
|
3820
3904
|
//#region src/components/Icon/icons/index.ts
|
|
3821
3905
|
var icons_exports = /* @__PURE__ */ __exportAll({
|
|
3822
3906
|
AddressShieldedIcon: () => AddressShieldedIcon,
|
|
@@ -3828,6 +3912,7 @@ var icons_exports = /* @__PURE__ */ __exportAll({
|
|
|
3828
3912
|
ArrowLeftIcon: () => ArrowLeftIcon,
|
|
3829
3913
|
ArrowRightIcon: () => ArrowRightIcon,
|
|
3830
3914
|
ArrowUpIcon: () => ArrowUpIcon,
|
|
3915
|
+
ArrowUpRightIcon: () => ArrowUpRightIcon,
|
|
3831
3916
|
AttachmentIcon: () => AttachmentIcon,
|
|
3832
3917
|
BarChartBoxedIcon: () => BarChartBoxedIcon,
|
|
3833
3918
|
BarChartIcon: () => BarChartIcon,
|
|
@@ -3865,6 +3950,8 @@ var icons_exports = /* @__PURE__ */ __exportAll({
|
|
|
3865
3950
|
CourtIcon: () => CourtIcon,
|
|
3866
3951
|
DateRangeIcon: () => DateRangeIcon,
|
|
3867
3952
|
DeathsIcon: () => DeathsIcon,
|
|
3953
|
+
DesktopIcon: () => DesktopIcon,
|
|
3954
|
+
DesktopMobileIcon: () => DesktopMobileIcon,
|
|
3868
3955
|
DoubleChevronLeftIcon: () => DoubleChevronLeftIcon,
|
|
3869
3956
|
DoubleChevronRightIcon: () => DoubleChevronRightIcon,
|
|
3870
3957
|
DownloadDoneIcon: () => DownloadDoneIcon,
|
|
@@ -3968,6 +4055,7 @@ var icons_exports = /* @__PURE__ */ __exportAll({
|
|
|
3968
4055
|
StarHalfFilledIcon: () => StarHalfFilledIcon,
|
|
3969
4056
|
StarIcon: () => StarIcon,
|
|
3970
4057
|
StickyNoteIcon: () => StickyNoteIcon,
|
|
4058
|
+
SunHalfFilledIcon: () => SunHalfFilledIcon,
|
|
3971
4059
|
SunIcon: () => SunIcon,
|
|
3972
4060
|
SupportIcon: () => SupportIcon,
|
|
3973
4061
|
SyncIcon: () => SyncIcon,
|
|
@@ -4581,7 +4669,8 @@ const OverflowMenu = ({ placement = "bottom-end", offset = 2, parentElement, por
|
|
|
4581
4669
|
role: "menu",
|
|
4582
4670
|
"aria-hidden": !isOpen,
|
|
4583
4671
|
elevation: "medium",
|
|
4584
|
-
border: "border-default"
|
|
4672
|
+
border: "border-default",
|
|
4673
|
+
zIndex: "overflowmenu"
|
|
4585
4674
|
});
|
|
4586
4675
|
return portal && portalTarget ? (0, react_dom.createPortal)(menu, portalTarget) : menu;
|
|
4587
4676
|
};
|
|
@@ -5915,6 +6004,7 @@ const CalendarPopoverContent = ({ children, className, smallScreenBreakpoint })
|
|
|
5915
6004
|
className: cn(DateInput_module_default.popover, className),
|
|
5916
6005
|
style: floatingStyles.floating,
|
|
5917
6006
|
...paperStyleProps,
|
|
6007
|
+
zIndex: "popover",
|
|
5918
6008
|
children
|
|
5919
6009
|
})] });
|
|
5920
6010
|
};
|
|
@@ -6894,6 +6984,7 @@ const Drawer = ({ children, header, placement = "right", parentElement, size = "
|
|
|
6894
6984
|
justifyContent: "flex-start",
|
|
6895
6985
|
padding: "var(--dds-drawer-container-padding)",
|
|
6896
6986
|
borderRadius: "0",
|
|
6987
|
+
zIndex: "drawer",
|
|
6897
6988
|
...getBaseHTMLProps(drawerId, cn(className, Drawer_module_default.container, Drawer_module_default[`container--${placement}`], Drawer_module_default[`container--${placement}-${isOpenCn}`], focus_module_default["focusable--inset"]), style, htmlProps, rest),
|
|
6898
6989
|
elevation: "large",
|
|
6899
6990
|
"aria-labelledby": headerId,
|
|
@@ -7299,9 +7390,6 @@ const texts$17 = createTexts({ send: {
|
|
|
7299
7390
|
se: "Sádde"
|
|
7300
7391
|
} });
|
|
7301
7392
|
//#endregion
|
|
7302
|
-
//#region src/components/Tooltip/Tooltip.module.css
|
|
7303
|
-
var Tooltip_module_default = { "paper": "dds-Tooltip-module__paper" };
|
|
7304
|
-
//#endregion
|
|
7305
7393
|
//#region src/components/Tooltip/Tooltip.tsx
|
|
7306
7394
|
const Tooltip = ({ text, placement = "bottom", children, tooltipId, delay = 100, style, onMouseLeave, onMouseOver, keepMounted = true, id, ref, className, htmlProps, ...rest }) => {
|
|
7307
7395
|
const generatedId = (0, react.useId)();
|
|
@@ -7386,7 +7474,8 @@ const Tooltip = ({ text, placement = "bottom", children, tooltipId, delay = 100,
|
|
|
7386
7474
|
style: { ...positionStyles.floating },
|
|
7387
7475
|
elevation: "small",
|
|
7388
7476
|
border: "border-subtle",
|
|
7389
|
-
|
|
7477
|
+
zIndex: "tooltip",
|
|
7478
|
+
className: cn(typographyStyles_module_default["body-short-medium"], utilStyles_module_default["visibility-transition"], utilStyles_module_default[`visibility-transition--${openCn}`]),
|
|
7390
7479
|
children: text
|
|
7391
7480
|
}) : null]
|
|
7392
7481
|
});
|
|
@@ -9005,10 +9094,12 @@ var NewsPopover_module_default = {
|
|
|
9005
9094
|
//#region src/components/NewsPopover/NewsPopover.tsx
|
|
9006
9095
|
const NewsPopover = ({ id, className, style, htmlProps, header, news, defaultActiveSlide = 0, activeSlide: activeSlideProp, setActiveSlide: setActiveSlideProp, isOpen: isOpenProp, isInitiallyOpen = true, setIsOpen: setIsOpenProp, smallScreenBreakpoint = "xs", closeOnClickOutside = true, ref, ...rest }) => {
|
|
9007
9096
|
if (news.length === 0) throw new Error("NewsPopover must have at least one item in \"news\" prop");
|
|
9008
|
-
|
|
9097
|
+
const maxHeaderLength = 45;
|
|
9098
|
+
const maxTextLength = 150;
|
|
9099
|
+
if (header.length > maxHeaderLength) console.warn(`[NewsPopover] header exceeds recommended length (about ${maxHeaderLength} characters). This may cause wrapping or layout issues depending on theme.`);
|
|
9009
9100
|
news.forEach((n, i) => {
|
|
9010
|
-
if (n.heading.length >
|
|
9011
|
-
if (n.text.length >
|
|
9101
|
+
if (n.heading.length > maxHeaderLength) console.warn(`[NewsPopover] news[${i}].heading exceeds recommended length (about ${maxHeaderLength} characters). This may cause wrapping or layout issues depending on theme.`);
|
|
9102
|
+
if (n.text.length > maxTextLength) console.warn(`[NewsPopover] news[${i}].text exceeds recommended length (about ${maxTextLength} characters). This may cause wrapping or layout issues depending on theme.`);
|
|
9012
9103
|
});
|
|
9013
9104
|
const { t } = useTranslation();
|
|
9014
9105
|
const [activeSlide, setActiveSlide] = useControllableState({
|
|
@@ -9047,7 +9138,8 @@ const NewsPopover = ({ id, className, style, htmlProps, header, news, defaultAct
|
|
|
9047
9138
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, {
|
|
9048
9139
|
gap: "x0.75",
|
|
9049
9140
|
alignItems: "center",
|
|
9050
|
-
margin: "x0.75 x0.75
|
|
9141
|
+
margin: "x0.75 x0.75 0 x0.75",
|
|
9142
|
+
height: styleUpToBreakpoint("100%", smallScreenBreakpoint, "130px"),
|
|
9051
9143
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Heading, {
|
|
9052
9144
|
level: 3,
|
|
9053
9145
|
children: el.heading
|
|
@@ -9087,8 +9179,7 @@ const NewsPopover = ({ id, className, style, htmlProps, header, news, defaultAct
|
|
|
9087
9179
|
border: "border-subtle",
|
|
9088
9180
|
role: "dialog",
|
|
9089
9181
|
"aria-labelledby": headerId,
|
|
9090
|
-
|
|
9091
|
-
width: styleUpToBreakpoint("100%", smallScreenBreakpoint, "405px"),
|
|
9182
|
+
width: styleUpToBreakpoint("100%", smallScreenBreakpoint, "500px"),
|
|
9092
9183
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
|
|
9093
9184
|
margin: "x0.75 x3 x0.75 x0.75",
|
|
9094
9185
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Heading, {
|
|
@@ -9099,14 +9190,13 @@ const NewsPopover = ({ id, className, style, htmlProps, header, news, defaultAct
|
|
|
9099
9190
|
})
|
|
9100
9191
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, {
|
|
9101
9192
|
alignItems: "center",
|
|
9102
|
-
height: isList ? "299px" : void 0,
|
|
9103
9193
|
"aria-live": "polite",
|
|
9194
|
+
marginBlock: "0 x1.5",
|
|
9104
9195
|
children: [
|
|
9105
9196
|
content,
|
|
9106
9197
|
isList && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
9107
9198
|
alignItems: "center",
|
|
9108
9199
|
gap: "x1",
|
|
9109
|
-
marginBlock: "auto 0",
|
|
9110
9200
|
children: [
|
|
9111
9201
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
9112
9202
|
"aria-label": t(commonTexts.previousPage),
|
|
@@ -11407,9 +11497,6 @@ const texts$7 = createTexts({
|
|
|
11407
11497
|
const PopoverContext = (0, react.createContext)({});
|
|
11408
11498
|
const usePopoverContext = () => (0, react.useContext)(PopoverContext);
|
|
11409
11499
|
//#endregion
|
|
11410
|
-
//#region src/components/Popover/Popover.module.css
|
|
11411
|
-
var Popover_module_default = { "container": "dds-Popover-module__container" };
|
|
11412
|
-
//#endregion
|
|
11413
11500
|
//#region src/components/Popover/Popover.tsx
|
|
11414
11501
|
const Popover = ({ id, header, withCloseButton = true, onBlur, children, placement = "bottom", parentElement, portal = false, offset = 8, sizeProps = {}, returnFocusOnBlur = true, className, htmlProps = {}, anchorRef, isOpen: propIsOpen, onClose: propOnClose, style, ref, ...rest }) => {
|
|
11415
11502
|
const { refs, styles: positionStyles, isPositioned: localIsPositioned } = useFloatPosition(null, {
|
|
@@ -11464,7 +11551,7 @@ const Popover = ({ id, header, withCloseButton = true, onBlur, children, placeme
|
|
|
11464
11551
|
const hasTitle = !!header;
|
|
11465
11552
|
const openCn = hasTransitionedIn && isOpen ? "open" : "closed";
|
|
11466
11553
|
const popover = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Paper, {
|
|
11467
|
-
...getBaseHTMLProps(popoverId, cn(className,
|
|
11554
|
+
...getBaseHTMLProps(popoverId, cn(className, utilStyles_module_default["visibility-transition"], utilStyles_module_default[`visibility-transition--${openCn}`], focus_module_default.focusable), {
|
|
11468
11555
|
...style,
|
|
11469
11556
|
...floatStyling
|
|
11470
11557
|
}, htmlProps, rest),
|
|
@@ -11481,6 +11568,7 @@ const Popover = ({ id, header, withCloseButton = true, onBlur, children, placeme
|
|
|
11481
11568
|
role: "dialog",
|
|
11482
11569
|
elevation: "large",
|
|
11483
11570
|
border: "border-subtle",
|
|
11571
|
+
zIndex: "popover",
|
|
11484
11572
|
children: [
|
|
11485
11573
|
header && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
11486
11574
|
marginInline: "0 x2",
|
|
@@ -11783,7 +11871,7 @@ const ProgressBar = ({ label, tip, errorMessage, size = "medium", "aria-describe
|
|
|
11783
11871
|
* Verdi skal være mindre eller lik max når max finnes; og mindre eller lik 1 hvis ikke.
|
|
11784
11872
|
* Komponenten er "indeterminate" hvis value ikke er gyldig.
|
|
11785
11873
|
*/
|
|
11786
|
-
const hasValidValue =
|
|
11874
|
+
const hasValidValue = value !== null && value !== void 0 && value >= 0 && (max !== void 0 && value <= max || max === void 0 && value <= 1);
|
|
11787
11875
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
11788
11876
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
11789
11877
|
const fillPrecentage = hasValidValue && value / (max ?? 1) * 100 + "%";
|
|
@@ -11816,8 +11904,8 @@ const ProgressBar = ({ label, tip, errorMessage, size = "medium", "aria-describe
|
|
|
11816
11904
|
className: cn(ProgressBar_module_default.progress),
|
|
11817
11905
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
11818
11906
|
height: "100%",
|
|
11819
|
-
width: isIndeterminate ? "25%" : fillPrecentage ? fillPrecentage : 0,
|
|
11820
|
-
className: cn(ProgressBar_module_default.fill, isIndeterminate && ProgressBar_module_default["fill--indeterminate"], fillPrecentage === "100%" && ProgressBar_module_default["fill--done"],
|
|
11907
|
+
width: hasErrorMessage ? "100%" : isIndeterminate ? "25%" : fillPrecentage ? fillPrecentage : 0,
|
|
11908
|
+
className: cn(ProgressBar_module_default.fill, isIndeterminate && ProgressBar_module_default["fill--indeterminate"], fillPrecentage === "100%" && ProgressBar_module_default["fill--done"], hasErrorMessage && ProgressBar_module_default["fill--error"])
|
|
11821
11909
|
})
|
|
11822
11910
|
}),
|
|
11823
11911
|
renderInputMessage({
|
|
@@ -13070,6 +13158,7 @@ exports.ArrowDownIcon = ArrowDownIcon;
|
|
|
13070
13158
|
exports.ArrowLeftIcon = ArrowLeftIcon;
|
|
13071
13159
|
exports.ArrowRightIcon = ArrowRightIcon;
|
|
13072
13160
|
exports.ArrowUpIcon = ArrowUpIcon;
|
|
13161
|
+
exports.ArrowUpRightIcon = ArrowUpRightIcon;
|
|
13073
13162
|
exports.AttachmentIcon = AttachmentIcon;
|
|
13074
13163
|
exports.BORDER_COLORS = BORDER_COLORS;
|
|
13075
13164
|
exports.BORDER_RADII = BORDER_RADII;
|
|
@@ -13139,6 +13228,8 @@ exports.DescriptionList = DescriptionList;
|
|
|
13139
13228
|
exports.DescriptionListDesc = DescriptionListDesc;
|
|
13140
13229
|
exports.DescriptionListGroup = DescriptionListGroup;
|
|
13141
13230
|
exports.DescriptionListTerm = DescriptionListTerm;
|
|
13231
|
+
exports.DesktopIcon = DesktopIcon;
|
|
13232
|
+
exports.DesktopMobileIcon = DesktopMobileIcon;
|
|
13142
13233
|
exports.DetailList = DetailList;
|
|
13143
13234
|
exports.DetailListDesc = DetailListDesc;
|
|
13144
13235
|
exports.DetailListRow = DetailListRow;
|
|
@@ -13337,6 +13428,7 @@ exports.StickyNoteIcon = StickyNoteIcon;
|
|
|
13337
13428
|
exports.StylelessButton = StylelessButton;
|
|
13338
13429
|
exports.StylelessList = StylelessList;
|
|
13339
13430
|
exports.StylelessOList = StylelessOList;
|
|
13431
|
+
exports.SunHalfFilledIcon = SunHalfFilledIcon;
|
|
13340
13432
|
exports.SunIcon = SunIcon;
|
|
13341
13433
|
exports.SupportIcon = SupportIcon;
|
|
13342
13434
|
exports.SyncIcon = SyncIcon;
|