@norges-domstoler/dds-components 0.0.0-dev-20260902084938 → 0.0.0-dev-20260902102701

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.mjs CHANGED
@@ -1094,51 +1094,10 @@ function handleElementWithBackdropUnmount(container) {
1094
1094
  //#region src/components/helpers/Backdrop/Backdrop.module.css
1095
1095
  var Backdrop_module_default = {
1096
1096
  "backdrop": "dds-Backdrop-module__backdrop",
1097
- "drawer": "dds-Backdrop-module__drawer",
1098
- "modal": "dds-Backdrop-module__modal",
1099
1097
  "backdrop--visible": "dds-Backdrop-module__backdrop--visible",
1100
1098
  "backdrop--hidden": "dds-Backdrop-module__backdrop--hidden"
1101
1099
  };
1102
1100
  //#endregion
1103
- //#region src/components/helpers/Backdrop/Backdrop.tsx
1104
- /**
1105
- * Backdrop-komponent, viser et bakgrunnslag for et element som skal låse applikasjonen i bakgrunnen (Modal el.l.).
1106
- *
1107
- * @component
1108
- * @param {Object} props - Props for komponenten.
1109
- * @param {boolean} [props.isMounted] - Angir om backdropen skal være synlig (`true`) eller skjult (`false`). Standard er `false`.
1110
- * @param {'drawer' | 'modal'} props.zIndex - Bestemmer hvilken z-index-klasse som skal brukes, avhengig av konteksten (f.eks. drawer eller modal).
1111
- * @param {React.ReactNode} [props.children] - Eventuelt innhold som skal vises inni backdropen.
1112
- * @param {React.MouseEventHandler<HTMLDivElement>} [props.onClick] - Klikkhåndterer for backdropen, f.eks. for å lukke en modal.
1113
- * @param {React.Ref<HTMLDivElement>} [props.ref] - Referanse til DOM-elementet.
1114
- *
1115
- * @returns {JSX.Element} Et `<div>`-element med riktige klasser basert på synlighet og z-index.
1116
-
1117
- * @example
1118
- * ```tsx
1119
- * <Backdrop isMounted={true} zIndex="modal" onClick={handleClose}>
1120
- * <ModalContent />
1121
- * </Backdrop>
1122
- * ```
1123
- */
1124
- const Backdrop = ({ isMounted, zIndex, ...props }) => {
1125
- const isMountedCn = isMounted ? "visible" : "hidden";
1126
- return /* @__PURE__ */ jsx("div", {
1127
- className: cn(Backdrop_module_default.backdrop, Backdrop_module_default[zIndex], Backdrop_module_default[`backdrop--${isMountedCn}`]),
1128
- ...props
1129
- });
1130
- };
1131
- Backdrop.displayName = "Backdrop";
1132
- //#endregion
1133
- //#region src/components/helpers/Dropdown/DropdownItem.module.css
1134
- var DropdownItem_module_default = {
1135
- "item": "dds-DropdownItem-module__item",
1136
- "default": "dds-DropdownItem-module__default",
1137
- "danger": "dds-DropdownItem-module__danger",
1138
- "item--interactive": "dds-DropdownItem-module__item--interactive",
1139
- "item--loading": "dds-DropdownItem-module__item--loading"
1140
- };
1141
- //#endregion
1142
1101
  //#region src/types/BaseComponentProps.ts
1143
1102
  function pruneUndefined(obj) {
1144
1103
  return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== void 0));
@@ -1261,31 +1220,6 @@ const isElevation = (value) => {
1261
1220
  return typeof value === "string" && ELEVATIONS.includes(value);
1262
1221
  };
1263
1222
  //#endregion
1264
- //#region src/components/Icon/Icon.tsx
1265
- const getSize = (iconSize) => {
1266
- switch (iconSize) {
1267
- case "small": return "var(--dds-size-icon-small)";
1268
- case "medium": return "var(--dds-size-icon-medium)";
1269
- case "large": return "var(--dds-size-icon-large)";
1270
- case "component": return "var(--dds-size-icon-component)";
1271
- case "inherit": return "1em";
1272
- default: return "var(--dds-size-icon-medium)";
1273
- }
1274
- };
1275
- function Icon(props) {
1276
- const { id, iconSize = "medium", color = "currentcolor", icon, className, style, htmlProps, iconState, ...rest } = props;
1277
- const size = getSize(iconSize);
1278
- return /* @__PURE__ */ jsx(icon, {
1279
- ...getBaseHTMLProps(id, className, style, htmlProps, rest),
1280
- height: size,
1281
- width: size,
1282
- fill: color,
1283
- "aria-hidden": htmlProps?.["aria-hidden"] ?? true,
1284
- ...iconState ? { iconState } : {}
1285
- });
1286
- }
1287
- Icon.displayName = "Icon";
1288
- //#endregion
1289
1223
  //#region src/components/layout/common/layout.module.css
1290
1224
  var layout_module_default = {
1291
1225
  "dds-p": "dds-layout-module__dds-p",
@@ -1313,6 +1247,8 @@ var layout_module_default = {
1313
1247
  "dds-display": "dds-layout-module__dds-display",
1314
1248
  "dds-text-align": "dds-layout-module__dds-text-align",
1315
1249
  "dds-word-break": "dds-layout-module__dds-word-break",
1250
+ "dds-z-index": "dds-layout-module__dds-z-index",
1251
+ "dds-flex": "dds-layout-module__dds-flex",
1316
1252
  "dds-flex-dir": "dds-layout-module__dds-flex-dir",
1317
1253
  "dds-gap": "dds-layout-module__dds-gap",
1318
1254
  "dds-c-gap": "dds-layout-module__dds-c-gap",
@@ -1350,15 +1286,33 @@ const SPACING_SCALES = [
1350
1286
  "x6",
1351
1287
  "x10"
1352
1288
  ];
1289
+ const Z_INDEXES = [
1290
+ "skiptocontent",
1291
+ "modal-backdrop",
1292
+ "drawer",
1293
+ "drawer-backdrop",
1294
+ "overflowmenu",
1295
+ "popover",
1296
+ "tooltip",
1297
+ "dropdown",
1298
+ "sticky",
1299
+ "absolute-element"
1300
+ ];
1353
1301
  //#endregion
1354
1302
  //#region src/components/layout/common/utils.tsx
1355
1303
  const TOKEN_PREFIX = "dds";
1304
+ const hasValue = (value) => {
1305
+ return value !== void 0 && value !== null;
1306
+ };
1356
1307
  function isBreakpointObject(value) {
1357
1308
  return typeof value === "object" && value !== null && !Array.isArray(value);
1358
1309
  }
1359
1310
  const isSpacingScale = (value) => {
1360
1311
  return typeof value === "string" && SPACING_SCALES.includes(value);
1361
1312
  };
1313
+ const isZIndex = (value) => {
1314
+ return typeof value === "string" && Z_INDEXES.includes(value);
1315
+ };
1362
1316
  const isRelativeGridColumn = (type) => {
1363
1317
  return type === "all" || type === "firstHalf" || type === "secondHalf";
1364
1318
  };
@@ -1370,6 +1324,7 @@ function spacingPropToToken(value) {
1370
1324
  }
1371
1325
  const getSpacingToken = (v) => `var(--${TOKEN_PREFIX}-spacing-${spacingPropToToken(v)})`;
1372
1326
  const getColorToken = (v) => `var(--${TOKEN_PREFIX}-color-${v})`;
1327
+ const getZIndexToken = (v) => `var(--${TOKEN_PREFIX}-zindex-${v})`;
1373
1328
  const relativeGridColumnToken = (v, bp) => {
1374
1329
  if (v === "all") return "1 / -1";
1375
1330
  if (!bp) return "";
@@ -1379,6 +1334,7 @@ const getValue = (v, bp, invert) => {
1379
1334
  let output;
1380
1335
  if (isColor(v)) output = getColorToken(v);
1381
1336
  else if (isSpacingScale(v)) output = getSpacingToken(v);
1337
+ else if (isZIndex(v)) output = getZIndexToken(v);
1382
1338
  else if (isRelativeGridColumn(v)) output = relativeGridColumnToken(v, bp);
1383
1339
  else output = v;
1384
1340
  return invert ? invertValue(output) : output;
@@ -1399,10 +1355,10 @@ function getCSSProperties(property, prefix, suffix, invert) {
1399
1355
  return properties;
1400
1356
  }
1401
1357
  function getResponsiveCSSProperties(property, prefix, suffix, invert) {
1402
- if (!property) return;
1358
+ if (property === void 0 || property === null) return;
1403
1359
  const properties = {};
1404
1360
  if (isBreakpointObject(property)) BREAKPOINTS.forEach((bp) => {
1405
- if (property[bp]) properties[buildCSSKey(prefix, suffix, bp)] = convertMultiValue(property[bp].toString(), bp, invert);
1361
+ if (property[bp] !== void 0 && property[bp] !== null) properties[buildCSSKey(prefix, suffix, bp)] = convertMultiValue(property[bp].toString(), bp, invert);
1406
1362
  });
1407
1363
  else properties[buildCSSKey(prefix, suffix)] = convertMultiValue(property.toString(), void 0, invert);
1408
1364
  return properties;
@@ -1457,7 +1413,7 @@ const ShowHide = ({ hideBelow, showBelow, className, style, htmlProps, id, as: C
1457
1413
  ShowHide.displayName = "ShowHide";
1458
1414
  //#endregion
1459
1415
  //#region src/components/layout/Box/Box.tsx
1460
- 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 }) => {
1416
+ 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 }) => {
1461
1417
  const responsiveStyles = {
1462
1418
  ...getResponsiveCSSProperties(padding, "r", "p"),
1463
1419
  ...getResponsiveCSSProperties(paddingInline, "r", "p-i"),
@@ -1481,6 +1437,7 @@ const Box = ({ id, className, style, padding, paddingInline, paddingBlock, margi
1481
1437
  ...getResponsiveCSSProperties(overflowY, "r", "o-y"),
1482
1438
  ...getResponsiveCSSProperties(display, "r", "display"),
1483
1439
  ...getResponsiveCSSProperties(textAlign, "r", "text-align"),
1440
+ ...getResponsiveCSSProperties(flex, "r", "flex"),
1484
1441
  ...getResponsiveCSSProperties(flexDirection, "r", "flex-dir"),
1485
1442
  ...getResponsiveCSSProperties(gap, "r", "gap"),
1486
1443
  ...getResponsiveCSSProperties(columnGap, "r", "c-gap"),
@@ -1493,9 +1450,10 @@ const Box = ({ id, className, style, padding, paddingInline, paddingBlock, margi
1493
1450
  ...getResponsiveCSSProperties(flexWrap, "r", "wrap"),
1494
1451
  ...getResponsiveCSSProperties(flexBasis, "r", "basis"),
1495
1452
  ...getResponsiveCSSProperties(flexFlow, "r", "flow"),
1496
- ...getResponsiveCSSProperties(wordBreak, "r", "word-break")
1453
+ ...getResponsiveCSSProperties(wordBreak, "r", "word-break"),
1454
+ ...getResponsiveCSSProperties(zIndex, "r", "z-index")
1497
1455
  };
1498
- return /* @__PURE__ */ 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"]), {
1456
+ return /* @__PURE__ */ 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"]), {
1499
1457
  ...style,
1500
1458
  ...responsiveStyles
1501
1459
  }, htmlProps, rest) });
@@ -1513,7 +1471,7 @@ const Bleed = ({ id, className, style, htmlProps, bleedMarginBlock, bleedMarginI
1513
1471
  ...getResponsiveCSSProperties(bleedMarginBlock, "r", "bleed-m-b", true),
1514
1472
  ...reflStyles
1515
1473
  };
1516
- return /* @__PURE__ */ 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"]), {
1474
+ return /* @__PURE__ */ 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"]), {
1517
1475
  ...style,
1518
1476
  ...responsiveStyles
1519
1477
  }, htmlProps, rest) });
@@ -1589,7 +1547,7 @@ const Grid = ({ id, className, htmlProps, defaultPageLayout = true, display = "g
1589
1547
  ...getResponsiveCSSProperties(gridTemplateAreas, "r", "grid-template-areas")
1590
1548
  };
1591
1549
  return /* @__PURE__ */ jsx(Box, {
1592
- ...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"]), {
1550
+ ...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"]), {
1593
1551
  ...style,
1594
1552
  ...styleVariables
1595
1553
  }, htmlProps, rest),
@@ -1609,7 +1567,7 @@ const GridChild = ({ id, className, htmlProps, style, gridRow, gridArea, justify
1609
1567
  ...getResponsiveCSSProperties(justifySelf, "r", "j-self"),
1610
1568
  ...getResponsiveCSSProperties(columnsOccupied, "r", "grid-column")
1611
1569
  };
1612
- return /* @__PURE__ */ 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"]), {
1570
+ return /* @__PURE__ */ 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"]), {
1613
1571
  ...style,
1614
1572
  ...styleVariables
1615
1573
  }, htmlProps, rest) });
@@ -1668,6 +1626,80 @@ const HStack = ({ id, className, style, htmlProps, ...rest }) => {
1668
1626
  };
1669
1627
  HStack.displayName = "HStack";
1670
1628
  //#endregion
1629
+ //#region src/components/helpers/Backdrop/Backdrop.tsx
1630
+ /**
1631
+ * Backdrop-komponent, viser et bakgrunnslag for et element som skal låse applikasjonen i bakgrunnen (Modal el.l.).
1632
+ *
1633
+ * @component
1634
+ * @param {Object} props - Props for komponenten.
1635
+ * @param {boolean} [props.isMounted] - Angir om backdropen skal være synlig (`true`) eller skjult (`false`). Standard er `false`.
1636
+ * @param {'drawer' | 'modal'} props.zIndex - Bestemmer hvilken z-index-klasse som skal brukes, avhengig av konteksten (f.eks. drawer eller modal).
1637
+ * @param {React.ReactNode} [props.children] - Eventuelt innhold som skal vises inni backdropen.
1638
+ * @param {React.MouseEventHandler<HTMLDivElement>} [props.onClick] - Klikkhåndterer for backdropen, f.eks. for å lukke en modal.
1639
+ * @param {React.Ref<HTMLDivElement>} [props.ref] - Referanse til DOM-elementet.
1640
+ *
1641
+ * @returns {JSX.Element} Et `<div>`-element med riktige klasser basert på synlighet og z-index.
1642
+
1643
+ * @example
1644
+ * ```tsx
1645
+ * <Backdrop isMounted={true} zIndex="modal" onClick={handleClose}>
1646
+ * <ModalContent />
1647
+ * </Backdrop>
1648
+ * ```
1649
+ */
1650
+ const Backdrop = ({ isMounted, zIndex, ...props }) => {
1651
+ const isMountedCn = isMounted ? "visible" : "hidden";
1652
+ return /* @__PURE__ */ jsx(Box, {
1653
+ className: cn(Backdrop_module_default.backdrop, Backdrop_module_default[`backdrop--${isMountedCn}`]),
1654
+ position: "fixed",
1655
+ display: "flex",
1656
+ alignItems: "center",
1657
+ justifyContent: "center",
1658
+ top: 0,
1659
+ left: 0,
1660
+ right: 0,
1661
+ bottom: 0,
1662
+ overflowY: "auto",
1663
+ zIndex: `${zIndex}-backdrop`,
1664
+ ...props
1665
+ });
1666
+ };
1667
+ Backdrop.displayName = "Backdrop";
1668
+ //#endregion
1669
+ //#region src/components/helpers/Dropdown/DropdownItem.module.css
1670
+ var DropdownItem_module_default = {
1671
+ "item": "dds-DropdownItem-module__item",
1672
+ "default": "dds-DropdownItem-module__default",
1673
+ "danger": "dds-DropdownItem-module__danger",
1674
+ "item--interactive": "dds-DropdownItem-module__item--interactive",
1675
+ "item--loading": "dds-DropdownItem-module__item--loading"
1676
+ };
1677
+ //#endregion
1678
+ //#region src/components/Icon/Icon.tsx
1679
+ const getSize = (iconSize) => {
1680
+ switch (iconSize) {
1681
+ case "small": return "var(--dds-size-icon-small)";
1682
+ case "medium": return "var(--dds-size-icon-medium)";
1683
+ case "large": return "var(--dds-size-icon-large)";
1684
+ case "component": return "var(--dds-size-icon-component)";
1685
+ case "inherit": return "1em";
1686
+ default: return "var(--dds-size-icon-medium)";
1687
+ }
1688
+ };
1689
+ function Icon(props) {
1690
+ const { id, iconSize = "medium", color = "currentcolor", icon, className, style, htmlProps, iconState, ...rest } = props;
1691
+ const size = getSize(iconSize);
1692
+ return /* @__PURE__ */ jsx(icon, {
1693
+ ...getBaseHTMLProps(id, className, style, htmlProps, rest),
1694
+ height: size,
1695
+ width: size,
1696
+ fill: color,
1697
+ "aria-hidden": htmlProps?.["aria-hidden"] ?? true,
1698
+ ...iconState ? { iconState } : {}
1699
+ });
1700
+ }
1701
+ Icon.displayName = "Icon";
1702
+ //#endregion
1671
1703
  //#region src/components/Spinner/Spinner.module.css
1672
1704
  var Spinner_module_default = {
1673
1705
  "svg": "dds-Spinner-module__svg",
@@ -4557,7 +4589,8 @@ const OverflowMenu = ({ placement = "bottom-end", offset = 2, parentElement, por
4557
4589
  role: "menu",
4558
4590
  "aria-hidden": !isOpen,
4559
4591
  elevation: "medium",
4560
- border: "border-default"
4592
+ border: "border-default",
4593
+ zIndex: "overflowmenu"
4561
4594
  });
4562
4595
  return portal && portalTarget ? createPortal(menu, portalTarget) : menu;
4563
4596
  };
@@ -5891,6 +5924,7 @@ const CalendarPopoverContent = ({ children, className, smallScreenBreakpoint })
5891
5924
  className: cn(DateInput_module_default.popover, className),
5892
5925
  style: floatingStyles.floating,
5893
5926
  ...paperStyleProps,
5927
+ zIndex: "popover",
5894
5928
  children
5895
5929
  })] });
5896
5930
  };
@@ -6870,6 +6904,7 @@ const Drawer = ({ children, header, placement = "right", parentElement, size = "
6870
6904
  justifyContent: "flex-start",
6871
6905
  padding: "var(--dds-drawer-container-padding)",
6872
6906
  borderRadius: "0",
6907
+ zIndex: "drawer",
6873
6908
  ...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),
6874
6909
  elevation: "large",
6875
6910
  "aria-labelledby": headerId,
@@ -7275,9 +7310,6 @@ const texts$17 = createTexts({ send: {
7275
7310
  se: "Sádde"
7276
7311
  } });
7277
7312
  //#endregion
7278
- //#region src/components/Tooltip/Tooltip.module.css
7279
- var Tooltip_module_default = { "paper": "dds-Tooltip-module__paper" };
7280
- //#endregion
7281
7313
  //#region src/components/Tooltip/Tooltip.tsx
7282
7314
  const Tooltip = ({ text, placement = "bottom", children, tooltipId, delay = 100, style, onMouseLeave, onMouseOver, keepMounted = true, id, ref, className, htmlProps, ...rest }) => {
7283
7315
  const generatedId = useId();
@@ -7362,7 +7394,8 @@ const Tooltip = ({ text, placement = "bottom", children, tooltipId, delay = 100,
7362
7394
  style: { ...positionStyles.floating },
7363
7395
  elevation: "small",
7364
7396
  border: "border-subtle",
7365
- className: cn(Tooltip_module_default.paper, typographyStyles_module_default["body-short-medium"], utilStyles_module_default["visibility-transition"], utilStyles_module_default[`visibility-transition--${openCn}`]),
7397
+ zIndex: "tooltip",
7398
+ className: cn(typographyStyles_module_default["body-short-medium"], utilStyles_module_default["visibility-transition"], utilStyles_module_default[`visibility-transition--${openCn}`]),
7366
7399
  children: text
7367
7400
  }) : null]
7368
7401
  });
@@ -11383,9 +11416,6 @@ const texts$7 = createTexts({
11383
11416
  const PopoverContext = createContext({});
11384
11417
  const usePopoverContext = () => useContext(PopoverContext);
11385
11418
  //#endregion
11386
- //#region src/components/Popover/Popover.module.css
11387
- var Popover_module_default = { "container": "dds-Popover-module__container" };
11388
- //#endregion
11389
11419
  //#region src/components/Popover/Popover.tsx
11390
11420
  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 }) => {
11391
11421
  const { refs, styles: positionStyles, isPositioned: localIsPositioned } = useFloatPosition(null, {
@@ -11440,7 +11470,7 @@ const Popover = ({ id, header, withCloseButton = true, onBlur, children, placeme
11440
11470
  const hasTitle = !!header;
11441
11471
  const openCn = hasTransitionedIn && isOpen ? "open" : "closed";
11442
11472
  const popover = /* @__PURE__ */ jsxs(Paper, {
11443
- ...getBaseHTMLProps(popoverId, cn(className, Popover_module_default.container, utilStyles_module_default["visibility-transition"], utilStyles_module_default[`visibility-transition--${openCn}`], focus_module_default.focusable), {
11473
+ ...getBaseHTMLProps(popoverId, cn(className, utilStyles_module_default["visibility-transition"], utilStyles_module_default[`visibility-transition--${openCn}`], focus_module_default.focusable), {
11444
11474
  ...style,
11445
11475
  ...floatStyling
11446
11476
  }, htmlProps, rest),
@@ -11457,6 +11487,7 @@ const Popover = ({ id, header, withCloseButton = true, onBlur, children, placeme
11457
11487
  role: "dialog",
11458
11488
  elevation: "large",
11459
11489
  border: "border-subtle",
11490
+ zIndex: "popover",
11460
11491
  children: [
11461
11492
  header && /* @__PURE__ */ jsx(Box, {
11462
11493
  marginInline: "0 x2",
@@ -11759,7 +11790,7 @@ const ProgressBar = ({ label, tip, errorMessage, size = "medium", "aria-describe
11759
11790
  * Verdi skal være mindre eller lik max når max finnes; og mindre eller lik 1 hvis ikke.
11760
11791
  * Komponenten er "indeterminate" hvis value ikke er gyldig.
11761
11792
  */
11762
- const hasValidValue = !!value && value > 0 && (max !== void 0 && value <= max || max === void 0 && value <= 1);
11793
+ const hasValidValue = value !== null && value !== void 0 && value >= 0 && (max !== void 0 && value <= max || max === void 0 && value <= 1);
11763
11794
  const tipId = derivativeIdGenerator(uniqueId, "tip");
11764
11795
  const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
11765
11796
  const fillPrecentage = hasValidValue && value / (max ?? 1) * 100 + "%";
@@ -11792,8 +11823,8 @@ const ProgressBar = ({ label, tip, errorMessage, size = "medium", "aria-describe
11792
11823
  className: cn(ProgressBar_module_default.progress),
11793
11824
  children: /* @__PURE__ */ jsx(Box, {
11794
11825
  height: "100%",
11795
- width: isIndeterminate ? "25%" : fillPrecentage ? fillPrecentage : 0,
11796
- className: cn(ProgressBar_module_default.fill, isIndeterminate && ProgressBar_module_default["fill--indeterminate"], fillPrecentage === "100%" && ProgressBar_module_default["fill--done"], errorMessage && ProgressBar_module_default["fill--error"])
11826
+ width: hasErrorMessage ? "100%" : isIndeterminate ? "25%" : fillPrecentage ? fillPrecentage : 0,
11827
+ 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"])
11797
11828
  })
11798
11829
  }),
11799
11830
  renderInputMessage({