@norges-domstoler/dds-components 13.10.0 → 13.10.2

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.js CHANGED
@@ -390,7 +390,9 @@ var fontPackage = (small) => {
390
390
  }
391
391
  return navTokens2.logoAndVersion.logo;
392
392
  };
393
- var NavigationLogo = import_styled_components3.default.a`
393
+ var NavigationLogo = import_styled_components3.default.a.withConfig({
394
+ shouldForwardProp: (prop) => prop !== "small"
395
+ })`
394
396
  font-size: ${({ small }) => fontPackage(small).fontSize};
395
397
  font-style: ${({ small }) => fontPackage(small).fontStyle};
396
398
  font-family: ${({ small }) => fontPackage(small).fontFamily};
@@ -756,11 +758,11 @@ var import_dds_core4 = require("@norges-domstoler/dds-core");
756
758
  var import_jsx_runtime5 = require("react/jsx-runtime");
757
759
  var StyledSpinner = import_styled_components4.default.svg`
758
760
  display: block;
759
- width: ${({ size }) => size};
760
- height: ${({ size }) => size};
761
+ width: ${({ $size }) => $size};
762
+ height: ${({ $size }) => $size};
761
763
  stroke-dasharray: 90, 150;
762
764
  animation: rotate 1.5s linear infinite;
763
- animation-delay: ${({ outerAnimationDelay }) => outerAnimationDelay}ms;
765
+ animation-delay: ${({ $outerAnimationDelay }) => $outerAnimationDelay}ms;
764
766
 
765
767
  @media (prefers-reduced-motion: no-preference) {
766
768
  animation: rotate 2s linear infinite;
@@ -773,12 +775,12 @@ var StyledSpinner = import_styled_components4.default.svg`
773
775
  }
774
776
  `;
775
777
  var Circle = import_styled_components4.default.circle`
776
- stroke: ${({ color }) => color && (0, import_dds_core3.getTextColor)(color)};
778
+ stroke: ${({ $color }) => $color && (0, import_dds_core3.getTextColor)($color)};
777
779
  stroke-linecap: round;
778
780
 
779
781
  @media (prefers-reduced-motion: no-preference) {
780
782
  animation: dash 1.5s ease-in-out infinite;
781
- animation-delay: ${({ innerAnimationDelay }) => innerAnimationDelay}ms;
783
+ animation-delay: ${({ $innerAnimationDelay }) => $innerAnimationDelay}ms;
782
784
 
783
785
  @keyframes dash {
784
786
  0% {
@@ -813,12 +815,8 @@ function Spinner(props) {
813
815
  const uniqueId = `${generatedId}-spinnerTitle`;
814
816
  const spinnerProps = {
815
817
  ...(0, import_dds_core4.getBaseHTMLProps)(id, className, htmlProps, rest),
816
- outerAnimationDelay,
817
- size
818
- };
819
- const circleProps = {
820
- innerAnimationDelay,
821
- color
818
+ $outerAnimationDelay: outerAnimationDelay,
819
+ $size: size
822
820
  };
823
821
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
824
822
  StyledSpinner,
@@ -832,7 +830,8 @@ function Spinner(props) {
832
830
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
833
831
  Circle,
834
832
  {
835
- ...circleProps,
833
+ $innerAnimationDelay: innerAnimationDelay,
834
+ $color: color,
836
835
  cx: "25",
837
836
  cy: "25",
838
837
  r: "20",
@@ -902,7 +901,21 @@ var getAppearanceAndPurposeStyling = (appearance, purpose) => {
902
901
  `;
903
902
  }
904
903
  };
905
- var ButtonWrapper = import_styled_components5.default.button`
904
+ var ButtonWrapper = import_styled_components5.default.button.withConfig({
905
+ shouldForwardProp: (prop) => {
906
+ const styleOnlyProps = [
907
+ "appearance",
908
+ "purpose",
909
+ "size",
910
+ "fullWidth",
911
+ "hasIcon",
912
+ "hasLabel",
913
+ "isLoading",
914
+ "iconPosition"
915
+ ];
916
+ return !styleOnlyProps.some((styleProp) => styleProp === prop);
917
+ }
918
+ })`
906
919
  ${import_dds_core5.normalizeButton}
907
920
  border: ${base.border};
908
921
  user-select: text;
@@ -916,17 +929,21 @@ var ButtonWrapper = import_styled_components5.default.button`
916
929
  text-decoration: none;
917
930
 
918
931
  @media (prefers-reduced-motion: no-preference) {
919
- transition: background-color 0.2s, text-decoration-color 0.2s,
920
- box-shadow 0.2s, border-color 0.2s, color 0.2s,
932
+ transition:
933
+ background-color 0.2s,
934
+ text-decoration-color 0.2s,
935
+ box-shadow 0.2s,
936
+ border-color 0.2s,
937
+ color 0.2s,
921
938
  ${import_dds_form.focusVisibleTransitionValue};
922
939
  }
923
940
 
924
941
  ${({ appearance, purpose }) => import_styled_components5.css`
925
- border-radius: ${appearances2[appearance].base.borderRadius};
926
- box-shadow: ${appearances2[appearance].base.boxShadow};
927
- color: ${appearances2[appearance].purpose[purpose].base.color};
928
- ${getAppearanceAndPurposeStyling(appearance, purpose)}
929
- `}
942
+ border-radius: ${appearances2[appearance].base.borderRadius};
943
+ box-shadow: ${appearances2[appearance].base.boxShadow};
944
+ color: ${appearances2[appearance].purpose[purpose].base.color};
945
+ ${getAppearanceAndPurposeStyling(appearance, purpose)}
946
+ `}
930
947
 
931
948
  ${({ hasIcon, hasLabel, appearance, purpose }) => hasIcon && !hasLabel && appearance === "borderless" && import_styled_components5.css`
932
949
  &:hover {
@@ -953,10 +970,10 @@ var ButtonWrapper = import_styled_components5.default.button`
953
970
  ${({ fullWidth, hasIcon, hasLabel, isLoading, iconPosition }) => fullWidth && (!hasIcon || !hasLabel || isLoading ? import_styled_components5.css`
954
971
  justify-content: center;
955
972
  ` : hasIcon && hasLabel && iconPosition === "left" ? import_styled_components5.css`
956
- justify-content: left;
957
- ` : import_styled_components5.css`
958
- justify-content: space-between;
959
- `)}
973
+ justify-content: left;
974
+ ` : import_styled_components5.css`
975
+ justify-content: space-between;
976
+ `)}
960
977
 
961
978
  &:focus-visible, &.focus-visible {
962
979
  ${import_dds_form.focusVisible}
@@ -966,7 +983,18 @@ var ButtonWrapper = import_styled_components5.default.button`
966
983
  ${import_dds_core5.selection}
967
984
  }
968
985
  `;
969
- var StyledIconWrapperSpan = import_styled_components5.default.span`
986
+ var StyledIconWrapperSpan = import_styled_components5.default.span.withConfig({
987
+ shouldForwardProp: (prop) => {
988
+ const styleOnlyProps = [
989
+ "iconPosition",
990
+ "size",
991
+ "absolutePosition",
992
+ "isHidden",
993
+ "justIcon"
994
+ ];
995
+ return !styleOnlyProps.some((styleProp) => styleProp === prop);
996
+ }
997
+ })`
970
998
  display: flex;
971
999
  align-items: center;
972
1000
  justify-content: center;
@@ -981,7 +1009,9 @@ var StyledIconWrapperSpan = import_styled_components5.default.span`
981
1009
  width: ${sizes2[size].justIcon.wrapper.width};
982
1010
  `}
983
1011
  `;
984
- var Label = import_styled_components5.default.span`
1012
+ var Label = import_styled_components5.default.span.withConfig({
1013
+ shouldForwardProp: (prop) => prop !== "isHidden"
1014
+ })`
985
1015
  ${({ isHidden }) => isHidden && import_styled_components5.css`
986
1016
  visibility: hidden;
987
1017
  `}
@@ -1171,7 +1201,7 @@ var Scrollbar = (props) => {
1171
1201
  }
1172
1202
  const handleTrackClick = (0, import_react5.useCallback)(
1173
1203
  (e) => {
1174
- if (contentRef && contentRef.current) {
1204
+ if (contentRef == null ? void 0 : contentRef.current) {
1175
1205
  const { current: trackCurrent } = trackRef;
1176
1206
  const { current: contentCurrent } = contentRef;
1177
1207
  if (trackCurrent && contentCurrent) {
@@ -1204,7 +1234,7 @@ var Scrollbar = (props) => {
1204
1234
  setThumbTop(newTop);
1205
1235
  }, []);
1206
1236
  (0, import_react5.useEffect)(() => {
1207
- if (contentRef && contentRef.current && trackRef.current) {
1237
+ if ((contentRef == null ? void 0 : contentRef.current) && trackRef.current) {
1208
1238
  const ref = contentRef.current;
1209
1239
  const { clientHeight } = trackRef.current;
1210
1240
  observer.current = new ResizeObserver(() => {
@@ -1221,7 +1251,7 @@ var Scrollbar = (props) => {
1221
1251
  }, []);
1222
1252
  const handleThumbMousedown = (0, import_react5.useCallback)((e) => {
1223
1253
  setScrollStartPosition(e.clientY);
1224
- if (contentRef && contentRef.current)
1254
+ if (contentRef == null ? void 0 : contentRef.current)
1225
1255
  setInitialScrollTop(contentRef.current.scrollTop);
1226
1256
  setIsDragging(true);
1227
1257
  }, []);
@@ -1232,7 +1262,7 @@ var Scrollbar = (props) => {
1232
1262
  }, [isDragging]);
1233
1263
  const handleThumbMousemove = (0, import_react5.useCallback)(
1234
1264
  (e) => {
1235
- if (contentRef && contentRef.current) {
1265
+ if (contentRef == null ? void 0 : contentRef.current) {
1236
1266
  if (isDragging) {
1237
1267
  const {
1238
1268
  scrollHeight: contentScrollHeight,
@@ -1297,7 +1327,7 @@ var StyledScrollableContainer = import_styled_components7.default.div`
1297
1327
  padding: ${outerContainer2.padding};
1298
1328
  `;
1299
1329
  var Content = import_styled_components7.default.div`
1300
- height: ${({ height }) => height};
1330
+ height: ${({ $height }) => $height};
1301
1331
  overflow: auto;
1302
1332
  scrollbar-width: none;
1303
1333
  ::-webkit-scrollbar {
@@ -1328,7 +1358,7 @@ var ScrollableContainer = (props) => {
1328
1358
  {
1329
1359
  ...(0, import_dds_core8.getBaseHTMLProps)(id, className, htmlProps, rest),
1330
1360
  children: [
1331
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Content, { height: contentHeight, ref, tabIndex: 0, children }),
1361
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Content, { $height: contentHeight, ref, tabIndex: 0, children }),
1332
1362
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Scrollbar, { contentRef: ref })
1333
1363
  ]
1334
1364
  }
@@ -1568,7 +1598,7 @@ var Container = import_styled_components9.default.div`
1568
1598
  overflow-y: auto;
1569
1599
  min-width: 180px;
1570
1600
  max-width: 300px;
1571
- ${({ isOpen }) => (0, import_dds_core13.visibilityTransition)(isOpen)}
1601
+ ${({ $isOpen }) => (0, import_dds_core13.visibilityTransition)($isOpen)}
1572
1602
  border: ${container2.border};
1573
1603
  background-color: ${container2.backgroundColor};
1574
1604
  border-radius: ${container2.borderRadius};
@@ -1643,17 +1673,14 @@ var OverflowMenu = (0, import_react8.forwardRef)(
1643
1673
  const interactiveItems = [];
1644
1674
  const hasContextItems = !!items && items.length > 0;
1645
1675
  const hasNavItems = !!navItems && navItems.length > 0;
1646
- const { name: username, ...userPropsRest } = userProps || {};
1676
+ const { name: username, ...userPropsRest } = userProps != null ? userProps : {};
1647
1677
  const hasStaticUser = username && userProps && !userProps.href && !userProps.onClick;
1648
1678
  const hasInteractiveUser = username && userProps && (!!userProps.href || !!userProps.onClick);
1649
1679
  hasInteractiveUser && interactiveItems.push({ title: username, ...userPropsRest });
1650
1680
  hasNavItems && interactiveItems.push(...navItems);
1651
1681
  hasContextItems && interactiveItems.push(...items);
1652
1682
  const hasInteractiveItems = interactiveItems.length > 0;
1653
- const [focus, setFocus] = (0, import_dds_core14.useRoveFocus)(
1654
- interactiveItems && interactiveItems.length,
1655
- !isOpen
1656
- );
1683
+ const [focus, setFocus] = (0, import_dds_core14.useRoveFocus)(interactiveItems == null ? void 0 : interactiveItems.length, !isOpen);
1657
1684
  const interactiveItemsList = hasInteractiveItems ? interactiveItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1658
1685
  OverflowMenuItem,
1659
1686
  {
@@ -1695,7 +1722,7 @@ var OverflowMenu = (0, import_react8.forwardRef)(
1695
1722
  ...(0, import_dds_core15.getBaseHTMLProps)(id, className, restHTMLProps, rest),
1696
1723
  ref: combinedRef,
1697
1724
  id: id != null ? id : `${generatedId}-overflowMenu`,
1698
- isOpen,
1725
+ $isOpen: isOpen,
1699
1726
  style: { ...style, ...styles.floating },
1700
1727
  "aria-hidden": !isOpen,
1701
1728
  role: "menu"
@@ -1791,7 +1818,9 @@ var IconButtonText = import_styled_components10.default.span`
1791
1818
  display: none; // Ikke vis tekst på mobil
1792
1819
  width: 0;
1793
1820
  `;
1794
- var Bar = import_styled_components10.default.div`
1821
+ var Bar = import_styled_components10.default.div.withConfig({
1822
+ shouldForwardProp: (prop) => prop !== "environmentBannerActive"
1823
+ })`
1795
1824
  display: flex;
1796
1825
  align-items: center;
1797
1826
  justify-content: space-between;
@@ -1876,7 +1905,9 @@ var TopBar = ({
1876
1905
  var import_development_utils2 = require("@norges-domstoler/development-utils");
1877
1906
  var import_jsx_runtime13 = require("react/jsx-runtime");
1878
1907
  var { navigation: navTokens4 } = appShellTokens;
1879
- var Sidebar = import_styled_components11.default.div`
1908
+ var Sidebar = import_styled_components11.default.div.withConfig({
1909
+ shouldForwardProp: (prop) => prop !== "isOpen" && prop !== "environmentBannerActive"
1910
+ })`
1880
1911
  display: flex;
1881
1912
  flex-direction: column;
1882
1913
  height: calc(100vh - ${navTokens4.topBar.height});
@@ -1893,7 +1924,9 @@ var Sidebar = import_styled_components11.default.div`
1893
1924
  bottom: 0;
1894
1925
  z-index: 100;
1895
1926
 
1896
- transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
1927
+ transition:
1928
+ transform 0.2s ease-in-out,
1929
+ opacity 0.2s ease-in-out;
1897
1930
  transform: translateX(${({ isOpen }) => isOpen ? "0" : "-100%"});
1898
1931
  opacity: ${({ isOpen }) => isOpen ? "1" : "0"};
1899
1932
 
@@ -2017,7 +2050,9 @@ var AppShellContainer = import_styled_components12.default.div`
2017
2050
  flex-direction: row;
2018
2051
  }
2019
2052
  `;
2020
- var MainContent = import_styled_components12.default.main`
2053
+ var MainContent = import_styled_components12.default.main.withConfig({
2054
+ shouldForwardProp: (prop) => prop !== "environmentBannerActive"
2055
+ })`
2021
2056
  min-height: calc(100vh - ${appShellTokens.navigation.topBar.height});
2022
2057
  margin-top: ${({ environmentBannerActive }) => environmentBannerActive ? `calc(${import_development_utils3.ENVIRONMENT_BANNER_HEIGHT} + ${appShellTokens.navigation.topBar.height})` : appShellTokens.navigation.topBar.height};
2023
2058
  @media (min-width: ${appShellTokens.navigation.mobile.breakpoint}) {
@@ -2200,7 +2235,7 @@ var CustomSelectionControl = import_styled_components13.default.span`
2200
2235
  border-radius: ${selectionControl2.base.borderRadius};
2201
2236
  height: ${selectionControl2.base.height};
2202
2237
  width: ${selectionControl2.base.width};
2203
- ${({ controlType }) => controlType === "radio" && import_styled_components13.css`
2238
+ ${({ $controlType }) => $controlType === "radio" && import_styled_components13.css`
2204
2239
  border-radius: 50%;
2205
2240
  `}
2206
2241
  &:after {
@@ -2217,7 +2252,7 @@ var Container2 = import_styled_components13.default.label`
2217
2252
  user-select: none;
2218
2253
  width: fit-content;
2219
2254
  color: ${container4.color};
2220
- ${({ hasLabel }) => hasLabel ? import_styled_components13.css`
2255
+ ${({ $hasLabel }) => $hasLabel ? import_styled_components13.css`
2221
2256
  padding-left: ${container4.withLabel.paddingLeft};
2222
2257
  ` : import_styled_components13.css`
2223
2258
  padding: ${container4.noLabel.padding};
@@ -2225,7 +2260,10 @@ var Container2 = import_styled_components13.default.label`
2225
2260
 
2226
2261
  input ~ ${CustomSelectionControl} {
2227
2262
  @media (prefers-reduced-motion: no-preference) {
2228
- transition: box-shadow 0.2s, background-color 0.2s, border 0.2s;
2263
+ transition:
2264
+ box-shadow 0.2s,
2265
+ background-color 0.2s,
2266
+ border 0.2s;
2229
2267
  }
2230
2268
  }
2231
2269
 
@@ -2260,7 +2298,7 @@ var Container2 = import_styled_components13.default.label`
2260
2298
  border-color: ${selectionControl2.checked.hover.borderColor};
2261
2299
  }
2262
2300
 
2263
- ${({ error }) => error && import_styled_components13.css`
2301
+ ${({ $error }) => $error && import_styled_components13.css`
2264
2302
  &:hover input:enabled ~ ${CustomSelectionControl} {
2265
2303
  background-color: ${selectionControl2.hover.danger.backgroundColor};
2266
2304
  box-shadow: ${selectionControl2.hover.danger.boxShadow};
@@ -2298,7 +2336,7 @@ var Container2 = import_styled_components13.default.label`
2298
2336
  cursor: not-allowed;
2299
2337
  color: ${container4.disabled.color};
2300
2338
  `}
2301
- ${({ controlType }) => controlType === "checkbox" ? import_styled_components13.css`
2339
+ ${({ $controlType }) => $controlType === "checkbox" ? import_styled_components13.css`
2302
2340
  ${CustomSelectionControl}:after {
2303
2341
  border: solid ${checkmark2.checkbox.borderColor};
2304
2342
 
@@ -2335,9 +2373,9 @@ var OuterGroupContainer = import_styled_components13.default.div`
2335
2373
  `;
2336
2374
  var GroupContainer = import_styled_components13.default.div`
2337
2375
  display: flex;
2338
- ${({ direction }) => import_styled_components13.css`
2339
- flex-direction: ${direction};
2340
- gap: ${groupContainer2[direction].gap};
2376
+ ${({ $direction }) => import_styled_components13.css`
2377
+ flex-direction: ${$direction};
2378
+ gap: ${groupContainer2[$direction].gap};
2341
2379
  `}
2342
2380
  `;
2343
2381
 
@@ -2358,13 +2396,13 @@ var RadioButton = (0, import_react12.forwardRef)(
2358
2396
  id,
2359
2397
  name,
2360
2398
  label: label3,
2361
- disabled,
2362
- readOnly,
2363
- error,
2399
+ disabled = false,
2400
+ readOnly = false,
2401
+ error = false,
2364
2402
  checked,
2365
2403
  value,
2366
2404
  children,
2367
- required,
2405
+ required = false,
2368
2406
  onChange,
2369
2407
  "aria-describedby": ariaDescribedby,
2370
2408
  className,
@@ -2393,29 +2431,32 @@ var RadioButton = (0, import_react12.forwardRef)(
2393
2431
  ...(0, import_dds_core16.getBaseHTMLProps)(uniqueId, restHtmlProps, rest),
2394
2432
  type: "radio",
2395
2433
  name: name != null ? name : radioButtonGroup == null ? void 0 : radioButtonGroup.name,
2396
- disabled: disabled || readOnly || (radioButtonGroup == null ? void 0 : radioButtonGroup.disabled) || (radioButtonGroup == null ? void 0 : radioButtonGroup.readOnly),
2397
- required: required || (radioButtonGroup == null ? void 0 : radioButtonGroup.required),
2434
+ disabled: disabled || readOnly || !!(radioButtonGroup == null ? void 0 : radioButtonGroup.disabled) || !!(radioButtonGroup == null ? void 0 : radioButtonGroup.readOnly),
2435
+ required: required || !!(radioButtonGroup == null ? void 0 : radioButtonGroup.required),
2398
2436
  checked: typeof checked !== "undefined" ? checked : isValueEqualToGroupValueOrFalsy(value, radioButtonGroup),
2399
2437
  onChange: handleChange,
2400
2438
  value,
2401
2439
  "aria-describedby": describedByIds.length > 0 ? describedByIds.join(" ") : void 0,
2402
2440
  "aria-invalid": error || (radioButtonGroup == null ? void 0 : radioButtonGroup.error) ? true : void 0
2403
2441
  };
2404
- const containerProps = {
2405
- error: error || (radioButtonGroup == null ? void 0 : radioButtonGroup.error),
2406
- disabled: disabled || (radioButtonGroup == null ? void 0 : radioButtonGroup.disabled),
2407
- readOnly: readOnly || (radioButtonGroup == null ? void 0 : radioButtonGroup.readOnly),
2408
- style,
2409
- className: (0, import_dds_core16.joinClassNames)(className, htmlPropsClassName),
2410
- htmlFor: uniqueId,
2411
- controlType: "radio",
2412
- hasLabel
2413
- };
2414
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Container2, { ...containerProps, htmlFor: uniqueId, controlType: "radio", children: [
2415
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dds_form5.HiddenInput, { ...inputProps, ref }),
2416
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CustomSelectionControl, { controlType: "radio" }),
2417
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dds_typography3.Typography, { as: "span", children: children != null ? children : label3 })
2418
- ] });
2442
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2443
+ Container2,
2444
+ {
2445
+ $error: error || (radioButtonGroup == null ? void 0 : radioButtonGroup.error),
2446
+ disabled: disabled || (radioButtonGroup == null ? void 0 : radioButtonGroup.disabled),
2447
+ $readOnly: readOnly || (radioButtonGroup == null ? void 0 : radioButtonGroup.readOnly),
2448
+ style,
2449
+ className: (0, import_dds_core16.joinClassNames)(className, htmlPropsClassName),
2450
+ $hasLabel: hasLabel,
2451
+ htmlFor: uniqueId,
2452
+ $controlType: "radio",
2453
+ children: [
2454
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dds_form5.HiddenInput, { ...inputProps, ref }),
2455
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CustomSelectionControl, { $controlType: "radio" }),
2456
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dds_typography3.Typography, { as: "span", children: children != null ? children : label3 })
2457
+ ]
2458
+ }
2459
+ );
2419
2460
  }
2420
2461
  );
2421
2462
  RadioButton.displayName = "RadioButton";
@@ -2457,7 +2498,9 @@ var import_react13 = require("react");
2457
2498
  var import_dds_core17 = require("@norges-domstoler/dds-core");
2458
2499
  var import_dds_icons8 = require("@norges-domstoler/dds-icons");
2459
2500
  var import_jsx_runtime16 = require("react/jsx-runtime");
2460
- var InputMessageWrapper = import_styled_components14.default.div`
2501
+ var InputMessageWrapper = import_styled_components14.default.div.withConfig({
2502
+ shouldForwardProp: (prop) => prop !== "messageType"
2503
+ })`
2461
2504
  display: flex;
2462
2505
  width: fit-content;
2463
2506
  word-break: break-word;
@@ -2521,19 +2564,19 @@ var RadioButtonGroupInner = (props, ref) => {
2521
2564
  groupId,
2522
2565
  errorMessage,
2523
2566
  tip,
2524
- disabled,
2525
- readOnly,
2567
+ disabled = false,
2568
+ readOnly = false,
2526
2569
  direction = "row",
2527
2570
  value,
2528
2571
  children,
2529
- required,
2572
+ required = false,
2530
2573
  onChange,
2531
2574
  id,
2532
2575
  className,
2533
2576
  htmlProps = {},
2534
2577
  ...rest
2535
2578
  } = props;
2536
- const { "aria-required": ariaRequired } = htmlProps;
2579
+ const { "aria-required": ariaRequired = false } = htmlProps;
2537
2580
  const [groupValue, setGroupValue] = (0, import_react14.useState)(value);
2538
2581
  const generatedId = (0, import_react14.useId)();
2539
2582
  const uniqueGroupId = groupId != null ? groupId : `${generatedId}-radioButtonGroup`;
@@ -2584,7 +2627,7 @@ var RadioButtonGroupInner = (props, ref) => {
2584
2627
  GroupContainer,
2585
2628
  {
2586
2629
  role: "radiogroup",
2587
- direction,
2630
+ $direction: direction,
2588
2631
  "aria-labelledby": uniqueGroupId,
2589
2632
  "aria-describedby": tipId,
2590
2633
  "aria-errormessage": errorMessageId,
@@ -2620,7 +2663,7 @@ var Checkbox = (0, import_react16.forwardRef)(
2620
2663
  id,
2621
2664
  name,
2622
2665
  label: label3,
2623
- error,
2666
+ error = false,
2624
2667
  disabled,
2625
2668
  readOnly,
2626
2669
  indeterminate,
@@ -2638,43 +2681,42 @@ var Checkbox = (0, import_react16.forwardRef)(
2638
2681
  className: htmlPropsClassName,
2639
2682
  ...restHtmlProps
2640
2683
  } = htmlProps;
2641
- const containerProps = {
2642
- error: error || (checkboxGroup == null ? void 0 : checkboxGroup.error),
2643
- disabled,
2644
- indeterminate,
2645
- htmlFor: uniqueId,
2646
- hasLabel,
2647
- className: (0, import_dds_core19.joinClassNames)(className, htmlPropsClassName),
2648
- style
2649
- };
2650
- const inputProps = {
2651
- ...(0, import_dds_core19.getBaseHTMLProps)(uniqueId, restHtmlProps, rest),
2652
- ref,
2653
- name,
2654
- indeterminate,
2655
- disabled,
2656
- "aria-describedby": (0, import_dds_core19.spaceSeparatedIdListGenerator)([
2657
- checkboxGroup == null ? void 0 : checkboxGroup.tipId,
2658
- checkboxGroup == null ? void 0 : checkboxGroup.errorMessageId,
2659
- ariaDescribedby
2660
- ]),
2661
- "aria-invalid": error || (checkboxGroup == null ? void 0 : checkboxGroup.error) ? true : void 0,
2662
- "aria-labelledby": checkboxGroup == null ? void 0 : checkboxGroup.uniqueGroupId,
2663
- "aria-checked": indeterminate ? "mixed" : void 0,
2664
- "aria-readonly": readOnly
2665
- };
2666
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Container2, { ...containerProps, controlType: "checkbox", children: [
2667
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2668
- import_dds_form6.HiddenInput,
2669
- {
2670
- ...inputProps,
2671
- type: "checkbox",
2672
- "data-indeterminate": indeterminate
2673
- }
2674
- ),
2675
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CustomSelectionControl, { controlType: "checkbox" }),
2676
- hasLabel && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dds_typography6.Typography, { color: "inherit", as: "span", typographyType: "bodySans02", children: label3 })
2677
- ] });
2684
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2685
+ Container2,
2686
+ {
2687
+ $error: error || (checkboxGroup == null ? void 0 : checkboxGroup.error),
2688
+ disabled,
2689
+ htmlFor: uniqueId,
2690
+ $hasLabel: hasLabel,
2691
+ $controlType: "checkbox",
2692
+ className: (0, import_dds_core19.joinClassNames)(className, htmlPropsClassName),
2693
+ style,
2694
+ children: [
2695
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2696
+ import_dds_form6.HiddenInput,
2697
+ {
2698
+ ...(0, import_dds_core19.getBaseHTMLProps)(uniqueId, restHtmlProps, rest),
2699
+ ref,
2700
+ name,
2701
+ disabled,
2702
+ "aria-describedby": (0, import_dds_core19.spaceSeparatedIdListGenerator)([
2703
+ checkboxGroup == null ? void 0 : checkboxGroup.tipId,
2704
+ checkboxGroup == null ? void 0 : checkboxGroup.errorMessageId,
2705
+ ariaDescribedby
2706
+ ]),
2707
+ "aria-invalid": error || (checkboxGroup == null ? void 0 : checkboxGroup.error) ? true : void 0,
2708
+ "aria-labelledby": checkboxGroup == null ? void 0 : checkboxGroup.uniqueGroupId,
2709
+ "aria-checked": indeterminate ? "mixed" : void 0,
2710
+ "aria-readonly": readOnly,
2711
+ type: "checkbox",
2712
+ "data-indeterminate": indeterminate
2713
+ }
2714
+ ),
2715
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CustomSelectionControl, { $controlType: "checkbox" }),
2716
+ hasLabel && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dds_typography6.Typography, { color: "inherit", as: "span", typographyType: "bodySans02", children: label3 })
2717
+ ]
2718
+ }
2719
+ );
2678
2720
  }
2679
2721
  );
2680
2722
  Checkbox.displayName = "Checkbox";
@@ -2690,7 +2732,7 @@ var CheckboxGroup = (props) => {
2690
2732
  direction = "row",
2691
2733
  errorMessage,
2692
2734
  tip,
2693
- required,
2735
+ required = false,
2694
2736
  groupId,
2695
2737
  children,
2696
2738
  id,
@@ -2741,7 +2783,7 @@ var CheckboxGroup = (props) => {
2741
2783
  role: "group",
2742
2784
  "aria-labelledby": uniqueGroupId,
2743
2785
  "aria-describedby": tip ? tipId : void 0,
2744
- direction,
2786
+ $direction: direction,
2745
2787
  children
2746
2788
  }
2747
2789
  ) }),
@@ -2859,8 +2901,8 @@ var MessageContainer = import_styled_components16.default.div`
2859
2901
  var StyledIcon = (0, import_styled_components16.default)(import_dds_icons9.Icon)`
2860
2902
  position: absolute;
2861
2903
  color: ${icon3.color};
2862
- ${({ size, iconSize }) => import_styled_components16.css`
2863
- left: ${icon3.sizes[size].left};
2904
+ ${({ $size, iconSize }) => import_styled_components16.css`
2905
+ left: ${icon3.sizes[$size].left};
2864
2906
  ${iconSize === "small" ? import_styled_components16.css`
2865
2907
  top: ${`calc(50% - ${iconSizes2.DdsIconsizeSmallNumberPx / 2}px)`};
2866
2908
  ` : import_styled_components16.css`
@@ -2870,7 +2912,7 @@ var StyledIcon = (0, import_styled_components16.default)(import_dds_icons9.Icon)
2870
2912
  z-index: 1;
2871
2913
  `;
2872
2914
  var StyledInput = (0, import_styled_components16.default)(import_dds_form7.StatefulInput)`
2873
- ${({ componentSize, hasIcon }) => hasIcon && componentSize && import_styled_components16.css`
2915
+ ${({ componentSize, $hasIcon }) => $hasIcon && componentSize && import_styled_components16.css`
2874
2916
  padding-left: ${input2.withIcon[componentSize].paddingLeft};
2875
2917
  `}
2876
2918
  `;
@@ -2975,7 +3017,7 @@ var TextInput = (0, import_react19.forwardRef)(
2975
3017
  const hasLabel = !!label3;
2976
3018
  const hasMessage = hasErrorMessage || hasTip || !!maxLength;
2977
3019
  const hasIcon = !!icon12;
2978
- const hasAffix = !!(prefix2 || suffix);
3020
+ const hasAffix = !!(prefix2 != null ? prefix2 : suffix);
2979
3021
  const characterCounterId = (0, import_dds_core22.derivativeIdGenerator)(
2980
3022
  uniqueId,
2981
3023
  "characterCounter"
@@ -2984,7 +3026,6 @@ var TextInput = (0, import_react19.forwardRef)(
2984
3026
  const errorMessageId = (0, import_dds_core22.derivativeIdGenerator)(uniqueId, "errorMessage");
2985
3027
  const generalInputProps = {
2986
3028
  id: uniqueId,
2987
- errorMessage,
2988
3029
  hasErrorMessage,
2989
3030
  required,
2990
3031
  disabled,
@@ -3017,7 +3058,7 @@ var TextInput = (0, import_react19.forwardRef)(
3017
3058
  {
3018
3059
  icon: icon12,
3019
3060
  iconSize: getFormInputIconSize(componentSize),
3020
- size: componentSize
3061
+ $size: componentSize
3021
3062
  }
3022
3063
  ),
3023
3064
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
@@ -3027,7 +3068,7 @@ var TextInput = (0, import_react19.forwardRef)(
3027
3068
  onChange: onChangeHandler,
3028
3069
  type,
3029
3070
  componentSize,
3030
- hasIcon,
3071
+ $hasIcon: hasIcon,
3031
3072
  ...generalInputProps
3032
3073
  }
3033
3074
  )
@@ -3280,30 +3321,30 @@ function getContainerControlPadding(componentSize, isMulti) {
3280
3321
  }
3281
3322
  var Container3 = import_styled_components18.default.div`
3282
3323
  margin: 0;
3283
- width: ${({ width }) => width};
3324
+ width: ${({ $width }) => $width};
3284
3325
  position: relative;
3285
3326
 
3286
3327
  *::selection {
3287
3328
  ${import_dds_core23.selection}
3288
3329
  }
3289
3330
 
3290
- ${({ componentSize, isMulti }) => import_styled_components18.css`
3331
+ ${({ $componentSize, $isMulti }) => import_styled_components18.css`
3291
3332
  .${prefix}__control {
3292
- padding: ${getContainerControlPadding(componentSize, isMulti)};
3293
- ${(0, import_dds_typography10.getFontStyling)(typographyTypes2.control[componentSize], true)}
3333
+ padding: ${getContainerControlPadding($componentSize, $isMulti)};
3334
+ ${(0, import_dds_typography10.getFontStyling)(typographyTypes2.control[$componentSize], true)}
3294
3335
  }
3295
3336
  .${prefix}__option {
3296
- ${(0, import_dds_typography10.getFontStyling)(typographyTypes2.option[componentSize], true)}
3337
+ ${(0, import_dds_typography10.getFontStyling)(typographyTypes2.option[$componentSize], true)}
3297
3338
  }
3298
3339
  .${prefix}__placeholder {
3299
- ${(0, import_dds_typography10.getFontStyling)(typographyTypes2.placeholder[componentSize])}
3340
+ ${(0, import_dds_typography10.getFontStyling)(typographyTypes2.placeholder[$componentSize])}
3300
3341
  }
3301
3342
  .${prefix}__menu-notice--no-options {
3302
- ${(0, import_dds_typography10.getFontStyling)(typographyTypes2.noOptionsMessage[componentSize])}
3343
+ ${(0, import_dds_typography10.getFontStyling)(typographyTypes2.noOptionsMessage[$componentSize])}
3303
3344
  }
3304
3345
  `}
3305
3346
 
3306
- ${({ errorMessage }) => errorMessage && import_styled_components18.css`
3347
+ ${({ $errorMessage }) => $errorMessage && import_styled_components18.css`
3307
3348
  .${prefix}__control {
3308
3349
  ${import_dds_form10.dangerInputfield}
3309
3350
  }
@@ -3322,7 +3363,7 @@ var Container3 = import_styled_components18.default.div`
3322
3363
  color: ${dropdownIndicator2.hover.color};
3323
3364
  }
3324
3365
 
3325
- ${({ isDisabled, readOnly }) => readOnly ? import_styled_components18.css`
3366
+ ${({ $isDisabled, $readOnly }) => $readOnly ? import_styled_components18.css`
3326
3367
  .${prefix}__control {
3327
3368
  border-color: ${control2.readOnly.borderColor};
3328
3369
  background-color: ${control2.readOnly.backgroundColor};
@@ -3332,16 +3373,16 @@ var Container3 = import_styled_components18.default.div`
3332
3373
  .${prefix}__dropdown-indicator {
3333
3374
  color: ${dropdownIndicator2.readOnly.color};
3334
3375
  }
3335
- ` : isDisabled ? import_styled_components18.css`
3336
- cursor: not-allowed;
3337
- .${prefix}__control {
3338
- border-color: ${control2.disabled.borderColor};
3339
- background-color: ${control2.disabled.backgroundColor};
3340
- }
3341
- &:hover .${prefix}__dropdown-indicator {
3342
- color: ${dropdownIndicator2.base.color};
3343
- }
3344
- ` : ""}
3376
+ ` : $isDisabled ? import_styled_components18.css`
3377
+ cursor: not-allowed;
3378
+ .${prefix}__control {
3379
+ border-color: ${control2.disabled.borderColor};
3380
+ background-color: ${control2.disabled.backgroundColor};
3381
+ }
3382
+ &:hover .${prefix}__dropdown-indicator {
3383
+ color: ${dropdownIndicator2.base.color};
3384
+ }
3385
+ ` : ""}
3345
3386
  `;
3346
3387
  var InnerSingleValue = import_styled_components18.default.div`
3347
3388
  overflow: hidden;
@@ -3580,12 +3621,12 @@ var SelectInner = (props, ref) => {
3580
3621
  const tipId = (0, import_dds_core24.derivativeIdGenerator)(uniqueId, "tip");
3581
3622
  const errorMessageId = (0, import_dds_core24.derivativeIdGenerator)(uniqueId, "errorMessage");
3582
3623
  const containerProps = {
3583
- width,
3584
- componentSize,
3585
- errorMessage,
3586
- isDisabled,
3587
- readOnly,
3588
- isMulti,
3624
+ $width: width,
3625
+ $componentSize: componentSize,
3626
+ $errorMessage: errorMessage,
3627
+ $isDisabled: isDisabled,
3628
+ $readOnly: readOnly,
3629
+ $isMulti: isMulti,
3589
3630
  className,
3590
3631
  style
3591
3632
  };
@@ -3593,6 +3634,7 @@ var SelectInner = (props, ref) => {
3593
3634
  options,
3594
3635
  value,
3595
3636
  defaultValue,
3637
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
3596
3638
  isDisabled: isDisabled || readOnly,
3597
3639
  isClearable,
3598
3640
  placeholder: getPlaceholder(placeholder3, isMulti),
@@ -3719,10 +3761,10 @@ var Container4 = import_styled_components19.default.div`
3719
3761
  padding: ${container6.padding};
3720
3762
  border-bottom: ${container6.borderBottom};
3721
3763
  ${(0, import_dds_typography13.getFontStyling)(typographyType2, true)}
3722
- ${({ purpose }) => purpose && import_styled_components19.css`
3723
- border-color: ${container6[purpose].borderColor};
3724
- background-color: ${container6[purpose].backgroundColor};
3725
- `}
3764
+ ${({ $purpose }) => import_styled_components19.css`
3765
+ border-color: ${container6[$purpose].borderColor};
3766
+ background-color: ${container6[$purpose].backgroundColor};
3767
+ `}
3726
3768
  `;
3727
3769
  var MessageIconWrapper = (0, import_styled_components19.default)(import_dds_icons14.Icon)`
3728
3770
  margin-right: ${icon6.marginRight};
@@ -3736,7 +3778,7 @@ var ContentContainer = import_styled_components19.default.div`
3736
3778
  align-items: center;
3737
3779
  padding-top: ${contentContainer2.paddingTop};
3738
3780
  padding-bottom: ${contentContainer2.paddingBottom};
3739
- padding-right: ${({ closable }) => closable ? contentContainer2.withClosable.paddingRight : contentContainer2.paddingRight};
3781
+ padding-right: ${({ $closable }) => $closable ? contentContainer2.withClosable.paddingRight : contentContainer2.paddingRight};
3740
3782
  `;
3741
3783
  var GlobalMessage = (0, import_react21.forwardRef)(
3742
3784
  (props, ref) => {
@@ -3752,37 +3794,40 @@ var GlobalMessage = (0, import_react21.forwardRef)(
3752
3794
  ...rest
3753
3795
  } = props;
3754
3796
  const [isClosed, setClosed] = (0, import_react21.useState)(false);
3755
- const containerProps = {
3756
- ...(0, import_dds_core25.getBaseHTMLProps)(id, className, htmlProps, rest),
3757
- ref,
3758
- purpose
3759
- };
3760
- return !isClosed ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Container4, { ...containerProps, children: [
3761
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(ContentContainer, { closable, children: [
3762
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3763
- MessageIconWrapper,
3764
- {
3765
- icon: purposeVariants[purpose].icon,
3766
- color: icon6[purpose].color
3767
- }
3768
- ),
3769
- children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_dds_typography12.Typography, { as: "span", children: message2 })
3770
- ] }),
3771
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ControlsContainer, { children: closable && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3772
- Button,
3773
- {
3774
- icon: import_dds_icons15.CloseIcon,
3775
- purpose: purposeVariants[purpose].closeButtonPurpose,
3776
- appearance: "borderless",
3777
- onClick: () => {
3778
- setClosed(true);
3779
- onClose && onClose();
3780
- },
3781
- size: "small",
3782
- "aria-label": "Lukk melding"
3783
- }
3784
- ) })
3785
- ] }) : null;
3797
+ return !isClosed ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
3798
+ Container4,
3799
+ {
3800
+ ref,
3801
+ $purpose: purpose,
3802
+ ...(0, import_dds_core25.getBaseHTMLProps)(id, className, htmlProps, rest),
3803
+ children: [
3804
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(ContentContainer, { $closable: closable, children: [
3805
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3806
+ MessageIconWrapper,
3807
+ {
3808
+ icon: purposeVariants[purpose].icon,
3809
+ color: icon6[purpose].color
3810
+ }
3811
+ ),
3812
+ children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_dds_typography12.Typography, { as: "span", children: message2 })
3813
+ ] }),
3814
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ControlsContainer, { children: closable && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3815
+ Button,
3816
+ {
3817
+ icon: import_dds_icons15.CloseIcon,
3818
+ purpose: purposeVariants[purpose].closeButtonPurpose,
3819
+ appearance: "borderless",
3820
+ onClick: () => {
3821
+ setClosed(true);
3822
+ onClose && onClose();
3823
+ },
3824
+ size: "small",
3825
+ "aria-label": "Lukk melding"
3826
+ }
3827
+ ) })
3828
+ ]
3829
+ }
3830
+ ) : null;
3786
3831
  }
3787
3832
  );
3788
3833
  GlobalMessage.displayName = "GlobalMessage";
@@ -3891,7 +3936,17 @@ var import_dds_icons18 = require("@norges-domstoler/dds-icons");
3891
3936
  var import_jsx_runtime25 = require("react/jsx-runtime");
3892
3937
  var defaultWidth3 = "400px";
3893
3938
  var { container: container8, icon: icon8, purposeVariants: purposeVariants3 } = localMessageTokens;
3894
- var Container5 = import_styled_components20.default.div`
3939
+ var Container5 = import_styled_components20.default.div.withConfig({
3940
+ shouldForwardProp: (prop) => {
3941
+ const styleOnlyProps = [
3942
+ "layout",
3943
+ "closable",
3944
+ "purpose",
3945
+ "width"
3946
+ ];
3947
+ return !styleOnlyProps.some((styleProp) => styleProp === prop);
3948
+ }
3949
+ })`
3895
3950
  box-sizing: border-box;
3896
3951
  display: grid;
3897
3952
  grid-template-areas: ${({ layout, closable }) => getGridTemplateAreas(layout, closable)};
@@ -4161,7 +4216,7 @@ var import_dds_core33 = require("@norges-domstoler/dds-core");
4161
4216
  var import_jsx_runtime27 = require("react/jsx-runtime");
4162
4217
  var { suggestionsContainer: suggestionsContainer2, suggestionsHeader: suggestionsHeader2 } = searchTokens;
4163
4218
  var SuggestionsContainer = (0, import_styled_components22.default)(import_dds_core29.Paper)`
4164
- ${({ isHidden }) => (0, import_dds_core32.visibilityTransition)(!isHidden)};
4219
+ ${({ $isHidden }) => (0, import_dds_core32.visibilityTransition)(!$isHidden)};
4165
4220
  position: absolute;
4166
4221
  top: 100%;
4167
4222
  width: 100%;
@@ -4175,7 +4230,7 @@ var SuggestionsContainer = (0, import_styled_components22.default)(import_dds_co
4175
4230
  ${scrollbarStyling.webkit}
4176
4231
  `;
4177
4232
  var MenuItem = (0, import_styled_components22.default)(OverflowMenuItem)`
4178
- ${({ size }) => (0, import_dds_typography16.getFontStyling)(typographyTypes3[size])}
4233
+ ${({ $size }) => $size && (0, import_dds_typography16.getFontStyling)(typographyTypes3[$size])}
4179
4234
  `;
4180
4235
  var SuggestionsList = import_styled_components22.default.ul`
4181
4236
  ${import_dds_core28.removeListStyling}
@@ -4200,10 +4255,7 @@ var SearchSuggestions = (0, import_react24.forwardRef)((props, ref) => {
4200
4255
  searchId,
4201
4256
  "suggestions-header"
4202
4257
  );
4203
- const [focus, setFocus] = (0, import_dds_core31.useRoveFocus)(
4204
- suggestions && suggestions.length,
4205
- !showSuggestions
4206
- );
4258
+ const [focus, setFocus] = (0, import_dds_core31.useRoveFocus)(suggestions == null ? void 0 : suggestions.length, !showSuggestions);
4207
4259
  const suggestionsToRender = maxSuggestions ? suggestions == null ? void 0 : suggestions.slice(maxSuggestions) : suggestions;
4208
4260
  const renderedSuggestions = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SuggestionsList, { role: "listbox", "aria-labelledby": suggestionsHeaderId, children: suggestionsToRender.map((suggestion, index) => {
4209
4261
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("li", { role: "option", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
@@ -4217,7 +4269,7 @@ var SearchSuggestions = (0, import_react24.forwardRef)((props, ref) => {
4217
4269
  title: suggestion,
4218
4270
  "aria-setsize": suggestionsToRender.length,
4219
4271
  "aria-posinset": index,
4220
- size: componentSize
4272
+ $size: componentSize
4221
4273
  }
4222
4274
  ) }, index);
4223
4275
  }) });
@@ -4227,7 +4279,7 @@ var SearchSuggestions = (0, import_react24.forwardRef)((props, ref) => {
4227
4279
  {
4228
4280
  ...(0, import_dds_core30.getBaseHTMLProps)(id, className, htmlProps, rest),
4229
4281
  ref,
4230
- isHidden,
4282
+ $isHidden: isHidden,
4231
4283
  "aria-hidden": isHidden,
4232
4284
  children: [
4233
4285
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
@@ -4268,19 +4320,19 @@ var Input2 = (0, import_styled_components23.default)(import_dds_form11.Input)`
4268
4320
  }
4269
4321
  padding-right: ${input4.base.paddingRight};
4270
4322
 
4271
- ${({ componentSize }) => import_styled_components23.css`
4272
- padding-top: ${input4.sizes[componentSize].paddingTop};
4273
- padding-bottom: ${input4.sizes[componentSize].paddingBottom};
4274
- padding-left: ${input4.sizes[componentSize].paddingLeft};
4275
- ${(0, import_dds_typography17.getFontStyling)(typographyTypes3[componentSize])}
4276
- `}
4323
+ ${({ $componentSize }) => import_styled_components23.css`
4324
+ padding-top: ${input4.sizes[$componentSize].paddingTop};
4325
+ padding-bottom: ${input4.sizes[$componentSize].paddingBottom};
4326
+ padding-left: ${input4.sizes[$componentSize].paddingLeft};
4327
+ ${(0, import_dds_typography17.getFontStyling)(typographyTypes3[$componentSize])}
4328
+ `}
4277
4329
  `;
4278
4330
  var StyledSearchIcon = (0, import_styled_components23.default)(import_dds_icons19.Icon)`
4279
4331
  position: absolute;
4280
4332
  left: ${searchIcon2.base.left};
4281
4333
  color: ${searchIcon2.base.color};
4282
- ${({ size }) => import_styled_components23.css`
4283
- top: ${searchTokens.searchIcon[size].top};
4334
+ ${({ $size }) => import_styled_components23.css`
4335
+ top: ${searchTokens.searchIcon[$size].top};
4284
4336
  `}
4285
4337
  z-index: 1;
4286
4338
  `;
@@ -4296,7 +4348,7 @@ var OuterContainer = import_styled_components23.default.div`
4296
4348
  gap: ${outerContainer4.gap};
4297
4349
  `;
4298
4350
  var HorisontalContainer = import_styled_components23.default.div`
4299
- ${(props) => props.hasSearchButton && import_styled_components23.css`
4351
+ ${(props) => props.$hasSearchButton && import_styled_components23.css`
4300
4352
  display: grid;
4301
4353
  grid-template-columns: 1fr auto;
4302
4354
  gap: ${horisontalContainer2.gap};
@@ -4321,6 +4373,7 @@ var Search = (0, import_react25.forwardRef)(
4321
4373
  "aria-describedby": ariaDescribedby,
4322
4374
  ...rest
4323
4375
  }, ref) => {
4376
+ var _a;
4324
4377
  const generatedId = (0, import_react25.useId)();
4325
4378
  const uniqueId = id != null ? id : `${generatedId}-searchInput`;
4326
4379
  const hasLabel = !!label3;
@@ -4342,31 +4395,11 @@ var Search = (0, import_react25.forwardRef)(
4342
4395
  const emptyChangeEvent = createEmptyChangeEvent(uniqueId);
4343
4396
  handleChange(emptyChangeEvent);
4344
4397
  };
4345
- const containerProps = {
4346
- className,
4347
- style
4348
- };
4349
- const inputProps = {
4350
- ...rest,
4351
- ref: combinedRef,
4352
- componentSize,
4353
- name,
4354
- type: "search",
4355
- id: uniqueId,
4356
- "aria-describedby": (0, import_dds_core34.spaceSeparatedIdListGenerator)([
4357
- tip ? tipId : void 0,
4358
- context.suggestions ? suggestionsDescriptionId : void 0,
4359
- ariaDescribedby
4360
- ]),
4361
- value: context.inputValue !== void 0 ? context.inputValue : value,
4362
- onChange: handleChange,
4363
- autoComplete: "off"
4364
- };
4365
4398
  const {
4366
4399
  label: buttonLabel,
4367
4400
  onClick,
4368
4401
  ...otherButtonProps
4369
- } = buttonProps || {};
4402
+ } = buttonProps != null ? buttonProps : {};
4370
4403
  const hasSuggestions = !!context.suggestions;
4371
4404
  const showSearchButton = !!buttonProps && !!onClick;
4372
4405
  return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(OuterContainer, { children: [
@@ -4375,22 +4408,36 @@ var Search = (0, import_react25.forwardRef)(
4375
4408
  /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4376
4409
  HorisontalContainer,
4377
4410
  {
4378
- hasSearchButton: showSearchButton,
4379
- ...containerProps,
4411
+ $hasSearchButton: showSearchButton,
4412
+ className,
4413
+ style,
4380
4414
  children: [
4381
4415
  /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(InputContainer2, { children: [
4382
4416
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4383
4417
  StyledSearchIcon,
4384
4418
  {
4385
4419
  icon: import_dds_icons19.SearchIcon,
4386
- size: componentSize,
4420
+ $size: componentSize,
4387
4421
  iconSize: getIconSize(componentSize)
4388
4422
  }
4389
4423
  ),
4390
4424
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4391
4425
  Input2,
4392
4426
  {
4393
- ...inputProps,
4427
+ ...rest,
4428
+ ref: combinedRef,
4429
+ $componentSize: componentSize,
4430
+ name,
4431
+ type: "search",
4432
+ id: uniqueId,
4433
+ "aria-describedby": (0, import_dds_core34.spaceSeparatedIdListGenerator)([
4434
+ tip ? tipId : void 0,
4435
+ context.suggestions ? suggestionsDescriptionId : void 0,
4436
+ ariaDescribedby
4437
+ ]),
4438
+ value: (_a = context.inputValue) != null ? _a : value,
4439
+ onChange: handleChange,
4440
+ autoComplete: "off",
4394
4441
  "aria-autocomplete": hasSuggestions ? "list" : void 0,
4395
4442
  "aria-controls": hasSuggestions ? suggestionsId : void 0,
4396
4443
  "aria-expanded": context.showSuggestions,
@@ -4430,7 +4477,7 @@ var Search = (0, import_react25.forwardRef)(
4430
4477
  size: componentSize,
4431
4478
  onClick,
4432
4479
  ...otherButtonProps,
4433
- children: buttonLabel || "S\xF8k"
4480
+ children: buttonLabel != null ? buttonLabel : "S\xF8k"
4434
4481
  }
4435
4482
  )
4436
4483
  ]
@@ -4458,7 +4505,7 @@ var SearchAutocompleteWrapper = (props) => {
4458
4505
  onSuggestionSelection,
4459
4506
  children
4460
4507
  } = props;
4461
- const [inputValue, setInputValue] = (0, import_react26.useState)(value || "");
4508
+ const [inputValue, setInputValue] = (0, import_react26.useState)(value != null ? value : "");
4462
4509
  const [suggestions, setSuggestions] = (0, import_react26.useState)([]);
4463
4510
  const [showSuggestions, setShowSuggestions] = (0, import_react26.useState)(false);
4464
4511
  const closeSuggestions = () => showSuggestions === true && setShowSuggestions(false);
@@ -4506,7 +4553,7 @@ var SearchAutocompleteWrapper = (props) => {
4506
4553
  closeSuggestions();
4507
4554
  };
4508
4555
  const handleSetInputValue = (value2) => {
4509
- setInputValue(value2 || "");
4556
+ setInputValue(value2 != null ? value2 : "");
4510
4557
  };
4511
4558
  const inputRef = (0, import_react26.useRef)(null);
4512
4559
  const suggestionsRef = (0, import_react26.useRef)(null);
@@ -4620,13 +4667,13 @@ var StyledTable = import_styled_components24.default.table`
4620
4667
  }
4621
4668
  ${scrollbarStyling.webkit}
4622
4669
  ${scrollbarStyling.firefox}
4623
- ${({ density }) => import_styled_components24.css`
4624
- td,
4625
- th {
4626
- padding: ${cell2.density[density].padding};
4627
- }
4628
- `}
4629
- ${({ density }) => density === "extraCompact" && import_styled_components24.css`
4670
+ ${({ $density }) => import_styled_components24.css`
4671
+ td,
4672
+ th {
4673
+ padding: ${cell2.density[$density].padding};
4674
+ }
4675
+ `}
4676
+ ${({ $density }) => $density === "extraCompact" && import_styled_components24.css`
4630
4677
  th {
4631
4678
  background-color: ${row2.head.extraCompact.backgroundColor};
4632
4679
  font-size: ${row2.head.extraCompact.fontSize};
@@ -4640,7 +4687,7 @@ var StyledTable = import_styled_components24.default.table`
4640
4687
  }
4641
4688
  }
4642
4689
  `}
4643
- ${({ stickyHeader }) => stickyHeader && import_styled_components24.css`
4690
+ ${({ $stickyHeader }) => $stickyHeader && import_styled_components24.css`
4644
4691
  tr[type='head'] {
4645
4692
  th[type='head'] {
4646
4693
  position: sticky;
@@ -4649,20 +4696,25 @@ var StyledTable = import_styled_components24.default.table`
4649
4696
  }
4650
4697
  }
4651
4698
  `}
4652
- ${({ withDividers }) => withDividers && import_styled_components24.css`
4699
+ ${({ $withDividers }) => $withDividers && import_styled_components24.css`
4653
4700
  tr[type='body'] {
4654
4701
  border-bottom: ${row2.body.withDividers.borderBottom};
4655
4702
  }
4656
4703
  `}
4657
4704
  `;
4658
4705
  var Table = (0, import_react27.forwardRef)(
4659
- ({ density = "normal", children, ...rest }, ref) => {
4660
- const tableProps = {
4661
- ref,
4662
- density,
4663
- ...rest
4664
- };
4665
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(StyledTable, { ...tableProps, children });
4706
+ ({ density = "normal", stickyHeader, withDividers, children, ...rest }, ref) => {
4707
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4708
+ StyledTable,
4709
+ {
4710
+ ...rest,
4711
+ ref,
4712
+ $density: density,
4713
+ $stickyHeader: stickyHeader,
4714
+ $withDividers: withDividers,
4715
+ children
4716
+ }
4717
+ );
4666
4718
  }
4667
4719
  );
4668
4720
  Table.displayName = "Table";
@@ -4698,12 +4750,6 @@ var CollapsibleTable = (0, import_react29.forwardRef)((props, ref) => {
4698
4750
  definingColumnIndex = [0],
4699
4751
  ...rest
4700
4752
  } = props;
4701
- const tableProps = {
4702
- ref,
4703
- density,
4704
- isCollapsed,
4705
- ...rest
4706
- };
4707
4753
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4708
4754
  CollapsibleTableContext.Provider,
4709
4755
  {
@@ -4712,7 +4758,7 @@ var CollapsibleTable = (0, import_react29.forwardRef)((props, ref) => {
4712
4758
  headerValues,
4713
4759
  definingColumnIndex
4714
4760
  },
4715
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StyledTable2, { ...tableProps, children })
4761
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StyledTable2, { ref, density, ...rest, children })
4716
4762
  }
4717
4763
  );
4718
4764
  });
@@ -4725,10 +4771,7 @@ var import_jsx_runtime32 = require("react/jsx-runtime");
4725
4771
  var StyledHead = import_styled_components26.default.thead``;
4726
4772
  var Head = (0, import_react30.forwardRef)(
4727
4773
  ({ children, ...rest }, ref) => {
4728
- const headProps = {
4729
- ...rest
4730
- };
4731
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StyledHead, { ref, ...headProps, children });
4774
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StyledHead, { ref, ...rest, children });
4732
4775
  }
4733
4776
  );
4734
4777
  Head.displayName = "Table.Head";
@@ -4755,10 +4798,7 @@ var import_jsx_runtime34 = require("react/jsx-runtime");
4755
4798
  var StyledFoot = import_styled_components28.default.tfoot``;
4756
4799
  var Foot = (0, import_react32.forwardRef)(
4757
4800
  ({ children, ...rest }, ref) => {
4758
- const footProps = {
4759
- ...rest
4760
- };
4761
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(StyledFoot, { ref, ...footProps, children });
4801
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(StyledFoot, { ref, ...rest, children });
4762
4802
  }
4763
4803
  );
4764
4804
  Foot.displayName = "Table.Foot";
@@ -4786,7 +4826,10 @@ var bodyRowStyles = (mode, selected) => {
4786
4826
  };
4787
4827
  var StyledRow = import_styled_components29.default.tr`
4788
4828
  @media (prefers-reduced-motion: no-preference) {
4789
- transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
4829
+ transition:
4830
+ background-color 0.2s,
4831
+ border-color 0.2s,
4832
+ box-shadow 0.2s;
4790
4833
  }
4791
4834
 
4792
4835
  ${(0, import_dds_typography18.getFontStyling)(import_dds_typography18.defaultTypographyType, true)}
@@ -4795,7 +4838,7 @@ var StyledRow = import_styled_components29.default.tr`
4795
4838
  font-weight: 600;
4796
4839
  text-align: left;
4797
4840
  `}
4798
- ${({ type, mode, selected, hoverable }) => type === "body" && import_styled_components29.css`
4841
+ ${({ type, $mode: mode, $selected: selected, $hoverable: hoverable }) => type === "body" && import_styled_components29.css`
4799
4842
  &:nth-of-type(even) {
4800
4843
  background-color: ${row3.body.even.backgroundColor};
4801
4844
  ${bodyRowStyles(mode, selected)}
@@ -4820,13 +4863,19 @@ var StyledRow = import_styled_components29.default.tr`
4820
4863
  // src/components/Table/Row.tsx
4821
4864
  var import_jsx_runtime35 = require("react/jsx-runtime");
4822
4865
  var Row = (0, import_react33.forwardRef)(
4823
- ({ type = "body", mode = "normal", children, ...rest }, ref) => {
4824
- const rowProps = {
4825
- type,
4826
- mode,
4827
- ...rest
4828
- };
4829
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledRow, { ref, ...rowProps, children });
4866
+ ({ type = "body", mode = "normal", hoverable, selected, children, ...rest }, ref) => {
4867
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4868
+ StyledRow,
4869
+ {
4870
+ type,
4871
+ $mode: mode,
4872
+ $hoverable: hoverable,
4873
+ $selected: selected,
4874
+ ref,
4875
+ ...rest,
4876
+ children
4877
+ }
4878
+ );
4830
4879
  }
4831
4880
  );
4832
4881
  Row.displayName = "Table.Row";
@@ -4890,7 +4939,9 @@ var descriptionListTokens = {
4890
4939
  // src/components/DescriptionList/DescriptionList.tsx
4891
4940
  var import_jsx_runtime36 = require("react/jsx-runtime");
4892
4941
  var { term: term2, desc: desc2, list: list2 } = descriptionListTokens;
4893
- var DList = import_styled_components30.default.dl`
4942
+ var DList = import_styled_components30.default.dl.withConfig({
4943
+ shouldForwardProp: (prop) => prop !== "appearance" && prop !== "direction"
4944
+ })`
4894
4945
  margin: 0;
4895
4946
  *::selection {
4896
4947
  ${import_dds_core38.selection}
@@ -5041,14 +5092,14 @@ var getLayoutStyle = (layout) => {
5041
5092
  }
5042
5093
  };
5043
5094
  var StyledCell = import_styled_components34.default.td`
5044
- ${({ type }) => type === "head" && import_styled_components34.css`
5095
+ ${({ $type: type }) => type === "head" && import_styled_components34.css`
5045
5096
  background-color: ${cell3.head.backgroundColor};
5046
5097
  `}
5047
5098
  `;
5048
5099
  var InnerCell = import_styled_components34.default.div`
5049
5100
  display: flex;
5050
5101
  align-items: center;
5051
- ${({ layout }) => getLayoutStyle(layout)}
5102
+ ${({ $layout: layout }) => getLayoutStyle(layout)}
5052
5103
  `;
5053
5104
  var getTableCellType = (type) => {
5054
5105
  switch (type) {
@@ -5062,16 +5113,8 @@ var getTableCellType = (type) => {
5062
5113
  var Cell = (0, import_react38.forwardRef)(
5063
5114
  ({ children, type = "data", layout = "left", collapsibleProps, ...rest }, ref) => {
5064
5115
  const as = getTableCellType(type);
5065
- const { isCollapsibleChild } = collapsibleProps || {};
5066
- const cellProps = {
5067
- as,
5068
- type,
5069
- ...rest
5070
- };
5071
- const innerCellProps = {
5072
- layout
5073
- };
5074
- return isCollapsibleChild ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DescriptionListDesc, { children }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(StyledCell, { ref, ...cellProps, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(InnerCell, { ...innerCellProps, children }) });
5116
+ const { isCollapsibleChild } = collapsibleProps != null ? collapsibleProps : {};
5117
+ return isCollapsibleChild ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DescriptionListDesc, { children }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(StyledCell, { as, ref, $type: type, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(InnerCell, { $layout: layout, children }) });
5075
5118
  }
5076
5119
  );
5077
5120
  Cell.displayName = "Table.Cell";
@@ -5100,10 +5143,12 @@ var DescriptionListCell = (0, import_styled_components35.default)(Cell)`
5100
5143
  }
5101
5144
  `;
5102
5145
  var CollapsibleRow = (0, import_react39.forwardRef)(
5103
- ({ type = "body", mode = "normal", children, ...rest }, ref) => {
5146
+ ({ type = "body", mode = "normal", selected, hoverable, children, ...rest }, ref) => {
5104
5147
  const rowProps = {
5105
- type,
5106
- mode,
5148
+ $type: type,
5149
+ $mode: mode,
5150
+ $selected: selected,
5151
+ $hoverable: hoverable,
5107
5152
  ...rest
5108
5153
  };
5109
5154
  const { isCollapsed, headerValues, definingColumnIndex } = useCollapsibleTableContext();
@@ -5130,14 +5175,14 @@ var CollapsibleRow = (0, import_react39.forwardRef)(
5130
5175
  })
5131
5176
  ] }, `DL-${index}`);
5132
5177
  }) : null;
5133
- const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(StyledRow, { type: "body", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DescriptionListCell, { colSpan: definingColumnIndex.length + 1, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DescriptionList, { children: collapsedRenderedChildren }) }) }) : null;
5178
+ const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(StyledRow, { type, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DescriptionListCell, { colSpan: definingColumnIndex.length + 1, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DescriptionList, { children: collapsedRenderedChildren }) }) }) : null;
5134
5179
  const definingColumnCells = childrenArray.slice().filter((column, index) => definingColumnIndex.indexOf(index) > -1).sort((a, b) => {
5135
5180
  return definingColumnIndex.indexOf(childrenArray.indexOf(a)) - definingColumnIndex.indexOf(childrenArray.indexOf(b));
5136
5181
  });
5137
5182
  const headerRow = () => {
5138
5183
  if (type !== "head" || !isCollapsed)
5139
5184
  return null;
5140
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(StyledRow, { ref, ...rowProps, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
5185
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(StyledRow, { ref, type, ...rowProps, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
5141
5186
  definingColumnCells,
5142
5187
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Table2.Cell, { type: "head", layout: "center", children: [
5143
5188
  "Utvid",
@@ -5153,6 +5198,7 @@ var CollapsibleRow = (0, import_react39.forwardRef)(
5153
5198
  StyledRow,
5154
5199
  {
5155
5200
  ref,
5201
+ type,
5156
5202
  ...rowProps,
5157
5203
  "data-isopencollapsibleheader": !childrenCollapsed && true,
5158
5204
  children: [
@@ -5183,7 +5229,7 @@ var CollapsibleRow = (0, import_react39.forwardRef)(
5183
5229
  rowWithChevron(),
5184
5230
  childrenCollapsed ? null : collapsedRows
5185
5231
  ] })
5186
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(StyledRow, { ref, ...rowProps, children });
5232
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(StyledRow, { ref, type, ...rowProps, children });
5187
5233
  }
5188
5234
  );
5189
5235
  CollapsibleRow.displayName = "CollapsibleTable.Row";
@@ -5244,7 +5290,7 @@ var import_react41 = require("react");
5244
5290
  var import_styled_components37 = __toESM(require("styled-components"));
5245
5291
  var import_jsx_runtime43 = require("react/jsx-runtime");
5246
5292
  var Wrapper3 = import_styled_components37.default.div`
5247
- ${({ overflowX }) => overflowX && import_styled_components37.css`
5293
+ ${({ $overflowX }) => $overflowX && import_styled_components37.css`
5248
5294
  overflow-x: auto;
5249
5295
  `}
5250
5296
  ${scrollbarStyling.webkit}
@@ -5258,7 +5304,7 @@ var TableWrapper = ({ children, ...rest }) => {
5258
5304
  }
5259
5305
  const wrapperRef = (0, import_react41.useRef)(null);
5260
5306
  (0, import_react41.useEffect)(() => {
5261
- if (wrapperRef && wrapperRef.current && isOverflowingX(wrapperRef.current)) {
5307
+ if ((wrapperRef == null ? void 0 : wrapperRef.current) && isOverflowingX(wrapperRef.current)) {
5262
5308
  setOverflowX(true);
5263
5309
  return;
5264
5310
  }
@@ -5271,12 +5317,7 @@ var TableWrapper = ({ children, ...rest }) => {
5271
5317
  window.addEventListener("resize", handleResize);
5272
5318
  return () => window.removeEventListener("resize", handleResize);
5273
5319
  });
5274
- const wrapperProps = {
5275
- ref: wrapperRef,
5276
- overflowX,
5277
- ...rest
5278
- };
5279
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Wrapper3, { ...wrapperProps, children });
5320
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Wrapper3, { $overflowX: overflowX, ref: wrapperRef, ...rest, children });
5280
5321
  };
5281
5322
  TableWrapper.displayName = "Table.Wrapper";
5282
5323
 
@@ -5462,14 +5503,14 @@ var List2 = import_styled_components39.default.ol`
5462
5503
  var ListItem2 = import_styled_components39.default.li`
5463
5504
  display: inline-grid;
5464
5505
  align-content: center;
5465
- ${({ isHidden }) => isHidden && import_styled_components39.css`
5506
+ ${({ $isHidden }) => $isHidden && import_styled_components39.css`
5466
5507
  visibility: hidden;
5467
5508
  `}
5468
5509
  `;
5469
5510
  var OuterContainer2 = import_styled_components39.default.div`
5470
5511
  display: flex;
5471
5512
  gap: ${outerContainer6.gap};
5472
- ${({ smallScreen }) => smallScreen ? import_styled_components39.css`
5513
+ ${({ $smallScreen }) => $smallScreen ? import_styled_components39.css`
5473
5514
  flex-direction: column;
5474
5515
  align-items: center;
5475
5516
  ` : import_styled_components39.css`
@@ -5517,7 +5558,9 @@ var Pagination = (0, import_react44.forwardRef)(
5517
5558
  }
5518
5559
  };
5519
5560
  const handleSelectChange = (option3) => {
5520
- setItemsPerPage(option3 == null ? void 0 : option3.value);
5561
+ if (option3 !== null) {
5562
+ setItemsPerPage(option3.value);
5563
+ }
5521
5564
  if (onSelectOptionChange) {
5522
5565
  onSelectOptionChange(option3);
5523
5566
  }
@@ -5575,17 +5618,17 @@ var Pagination = (0, import_react44.forwardRef)(
5575
5618
  };
5576
5619
  const containerProps = {
5577
5620
  ...(0, import_dds_core44.getBaseHTMLProps)(id, className, htmlProps, rest),
5578
- smallScreen
5621
+ $smallScreen: smallScreen
5579
5622
  };
5580
5623
  const isOnFirstPage = activePage === 1;
5581
5624
  const isOnLastPage = activePage === pagesLength;
5582
5625
  const navigation4 = withPagination ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Nav, { ref, "aria-label": "paginering", ...navProps, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(List2, { children: [
5583
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ListItem2, { isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: previousPageButton }),
5626
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ListItem2, { $isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: previousPageButton }),
5584
5627
  listItems,
5585
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ListItem2, { isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton })
5628
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ListItem2, { $isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton })
5586
5629
  ] }) }) : null;
5587
5630
  const smallScreenNavigation = withPagination ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Nav, { ref, "aria-label": "paginering", ...navProps, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(List2, { children: [
5588
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ListItem2, { isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5631
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ListItem2, { $isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5589
5632
  Button,
5590
5633
  {
5591
5634
  purpose: "secondary",
@@ -5598,7 +5641,7 @@ var Pagination = (0, import_react44.forwardRef)(
5598
5641
  "aria-label": "G\xE5 til f\xF8rste siden"
5599
5642
  }
5600
5643
  ) }),
5601
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ListItem2, { isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: previousPageButton }),
5644
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ListItem2, { $isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: previousPageButton }),
5602
5645
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ListItem2, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5603
5646
  Button,
5604
5647
  {
@@ -5609,8 +5652,8 @@ var Pagination = (0, import_react44.forwardRef)(
5609
5652
  children: activePage
5610
5653
  }
5611
5654
  ) }),
5612
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ListItem2, { isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton }),
5613
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ListItem2, { isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5655
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ListItem2, { $isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton }),
5656
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ListItem2, { $isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5614
5657
  Button,
5615
5658
  {
5616
5659
  purpose: "secondary",
@@ -5724,13 +5767,13 @@ var StyledList = import_styled_components40.default.ul`
5724
5767
  ${import_dds_core45.selection}
5725
5768
  }
5726
5769
 
5727
- ${({ typographyType: typographyType7 }) => typographyType7 === "inherit" ? import_styled_components40.css`
5770
+ ${({ $typographyType }) => $typographyType === "inherit" ? import_styled_components40.css`
5728
5771
  font: inherit;
5729
5772
  ` : import_styled_components40.css`
5730
- ${(0, import_dds_typography22.getFontStyling)(typographyType7)}
5773
+ ${(0, import_dds_typography22.getFontStyling)($typographyType)}
5731
5774
  `}
5732
5775
 
5733
- ${({ listType }) => listType === "unordered" ? import_styled_components40.css`
5776
+ ${({ $listType }) => $listType === "unordered" ? import_styled_components40.css`
5734
5777
  padding-left: ${list8.ul.paddingLeft};
5735
5778
  list-style: none;
5736
5779
  li {
@@ -5777,14 +5820,17 @@ var List3 = (0, import_react45.forwardRef)(
5777
5820
  ...rest
5778
5821
  } = props;
5779
5822
  const as = listType === "ordered" ? "ol" : "ul";
5780
- const listProps = {
5781
- ...(0, import_dds_core45.getBaseHTMLProps)(id, className, htmlProps, rest),
5782
- listType,
5783
- typographyType: typographyType7,
5784
- as,
5785
- ref
5786
- };
5787
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(StyledList, { ...listProps, children });
5823
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5824
+ StyledList,
5825
+ {
5826
+ ...(0, import_dds_core45.getBaseHTMLProps)(id, className, htmlProps, rest),
5827
+ as,
5828
+ ref,
5829
+ $listType: listType,
5830
+ $typographyType: typographyType7,
5831
+ children
5832
+ }
5833
+ );
5788
5834
  }
5789
5835
  );
5790
5836
  List3.displayName = "List";
@@ -5845,7 +5891,9 @@ var import_dds_core46 = require("@norges-domstoler/dds-core");
5845
5891
  var import_dds_typography23 = require("@norges-domstoler/dds-typography");
5846
5892
  var import_dds_form15 = require("@norges-domstoler/dds-form");
5847
5893
  var import_jsx_runtime49 = require("react/jsx-runtime");
5848
- var Container6 = import_styled_components42.default.div`
5894
+ var Container6 = import_styled_components42.default.div.withConfig({
5895
+ shouldForwardProp: (prop) => prop !== "color" && prop !== "cardType"
5896
+ })`
5849
5897
  border: ${cardTokens.base.border};
5850
5898
  ${(0, import_dds_typography23.getFontStyling)(import_dds_typography23.defaultTypographyType)};
5851
5899
  &::selection,
@@ -5853,7 +5901,9 @@ var Container6 = import_styled_components42.default.div`
5853
5901
  ${import_dds_core46.selection}
5854
5902
  }
5855
5903
  @media (prefers-reduced-motion: no-preference) {
5856
- transition: box-shadow 0.2s, border-color 0.2s;
5904
+ transition:
5905
+ box-shadow 0.2s,
5906
+ border-color 0.2s;
5857
5907
  }
5858
5908
  ${({ color }) => color && import_styled_components42.css`
5859
5909
  color: ${cardTokens.colors[color].color};
@@ -5869,12 +5919,12 @@ var Container6 = import_styled_components42.default.div`
5869
5919
  ${import_dds_form15.focusVisibleWithBorder}
5870
5920
  }
5871
5921
  ` : cardType === "expandable" ? import_styled_components42.css`
5872
- width: 100%;
5873
- box-sizing: border-box;
5874
- &:not(:first-of-type) {
5875
- border-top: none;
5876
- }
5877
- ` : ""}
5922
+ width: 100%;
5923
+ box-sizing: border-box;
5924
+ &:not(:first-of-type) {
5925
+ border-top: none;
5926
+ }
5927
+ ` : ""}
5878
5928
  `;
5879
5929
  var Card = (props) => {
5880
5930
  const {
@@ -6018,9 +6068,11 @@ var ContentWrapper = import_styled_components44.default.div`
6018
6068
  `;
6019
6069
  function getTypographyType(props) {
6020
6070
  const { typographyType: typographyType7 } = props;
6021
- return typographyType7 || typographyTypes4.header;
6071
+ return typographyType7 != null ? typographyType7 : typographyTypes4.header;
6022
6072
  }
6023
- var HeaderContainer = import_styled_components44.default.div`
6073
+ var HeaderContainer = import_styled_components44.default.div.withConfig({
6074
+ shouldForwardProp: (prop) => prop !== "padding" && prop !== "typographyType" && prop !== "bold"
6075
+ })`
6024
6076
  display: flex;
6025
6077
  justify-content: space-between;
6026
6078
  align-items: center;
@@ -6139,9 +6191,13 @@ var expandingAnimation = import_styled_components45.css`
6139
6191
  `;
6140
6192
  function getPadding(props) {
6141
6193
  const { padding } = props;
6142
- return padding || cardAccordionTokens.body.padding;
6194
+ return padding != null ? padding : cardAccordionTokens.body.padding;
6143
6195
  }
6144
- var Body2 = import_styled_components45.default.div`
6196
+ var Body2 = import_styled_components45.default.div.withConfig({
6197
+ shouldForwardProp: (prop) => {
6198
+ return prop !== "animate" && prop !== "height" && prop !== "isExpanded";
6199
+ }
6200
+ })`
6145
6201
  @media (prefers-reduced-motion: no-preference) {
6146
6202
  ${({ animate }) => animate && expandingAnimation}
6147
6203
  }
@@ -6149,7 +6205,18 @@ var Body2 = import_styled_components45.default.div`
6149
6205
  height: ${({ height, isExpanded }) => isExpanded ? height : 0}px;
6150
6206
  overflow: hidden;
6151
6207
  `;
6152
- var BodyContainer = import_styled_components45.default.div`
6208
+ var BodyContainer = import_styled_components45.default.div.withConfig({
6209
+ shouldForwardProp: (prop) => {
6210
+ const styleOnlyProps = [
6211
+ "isExpanded",
6212
+ "maxHeight",
6213
+ "animate",
6214
+ "paddingTop",
6215
+ "padding"
6216
+ ];
6217
+ return !styleOnlyProps.some((styleProp) => styleProp === prop);
6218
+ }
6219
+ })`
6153
6220
  padding: ${getPadding};
6154
6221
 
6155
6222
  ${({ paddingTop }) => paddingTop && import_styled_components45.css`
@@ -6157,6 +6224,7 @@ var BodyContainer = import_styled_components45.default.div`
6157
6224
  `}
6158
6225
  `;
6159
6226
  var CardAccordionBody = (0, import_react50.forwardRef)((props, ref) => {
6227
+ var _a;
6160
6228
  const {
6161
6229
  children,
6162
6230
  isExpanded,
@@ -6188,7 +6256,7 @@ var CardAccordionBody = (0, import_react50.forwardRef)((props, ref) => {
6188
6256
  ref,
6189
6257
  isExpanded,
6190
6258
  role: "region",
6191
- height: height || initialExpandedHeight || 0
6259
+ height: (_a = height != null ? height : initialExpandedHeight) != null ? _a : 0
6192
6260
  };
6193
6261
  const bodyContainerProps = {
6194
6262
  ref: bodyRef,
@@ -6297,7 +6365,7 @@ var BannerWrapper = import_styled_components46.default.div`
6297
6365
  align-items: center;
6298
6366
  border-bottom: ${banner2.borderBottom};
6299
6367
  padding-right: ${banner2.paddingRight};
6300
- ${({ hasContextMenu }) => hasContextMenu && import_styled_components46.css`
6368
+ ${({ $hasContextMenu }) => $hasContextMenu && import_styled_components46.css`
6301
6369
  padding-right: ${banner2.hasContextMenu.paddingRight};
6302
6370
  `}
6303
6371
  `;
@@ -6342,7 +6410,9 @@ var import_dds_typography26 = require("@norges-domstoler/dds-typography");
6342
6410
  var import_dds_form16 = require("@norges-domstoler/dds-form");
6343
6411
  var import_jsx_runtime53 = require("react/jsx-runtime");
6344
6412
  var { navLink: navLink2 } = internalHeaderTokens;
6345
- var Link2 = import_styled_components47.default.a`
6413
+ var Link2 = import_styled_components47.default.a.withConfig({
6414
+ shouldForwardProp: (prop) => prop !== "isCurrent"
6415
+ })`
6346
6416
  display: flex;
6347
6417
  align-items: center;
6348
6418
  height: 100%;
@@ -6447,7 +6517,7 @@ var InternalHeader = (props) => {
6447
6517
  }) }) }) : null;
6448
6518
  const hasContextMenu = hasContextMenuElements || !!userProps || hasNavInContextMenu;
6449
6519
  return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(OuterContainer3, { ...(0, import_dds_core51.getBaseHTMLProps)(id, className, htmlProps, rest), children: [
6450
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(BannerWrapper, { hasContextMenu, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(BannerLeftWrapper, { children: [
6520
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(BannerWrapper, { $hasContextMenu: hasContextMenu, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(BannerLeftWrapper, { children: [
6451
6521
  /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(LovisaWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dds_typography27.Typography, { typographyType: "bodySans02", bold: true, as: "span", children: applicationName }) }),
6452
6522
  /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ApplicationNameWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dds_typography27.Typography, { typographyType: "bodySans02", as: "span", children: applicationDesc }) })
6453
6523
  ] }) }),
@@ -6579,9 +6649,9 @@ var Datepicker = (0, import_react54.forwardRef)(
6579
6649
  ({
6580
6650
  id,
6581
6651
  type = "date",
6582
- required,
6583
- readOnly,
6584
- disabled,
6652
+ required = false,
6653
+ readOnly = false,
6654
+ disabled = false,
6585
6655
  label: label3,
6586
6656
  width,
6587
6657
  errorMessage,
@@ -6590,7 +6660,7 @@ var Datepicker = (0, import_react54.forwardRef)(
6590
6660
  className,
6591
6661
  componentSize = "medium",
6592
6662
  max,
6593
- "aria-required": ariaRequired,
6663
+ "aria-required": ariaRequired = false,
6594
6664
  "aria-describedby": ariaDescribedby,
6595
6665
  ...rest
6596
6666
  }, ref) => {
@@ -6599,7 +6669,7 @@ var Datepicker = (0, import_react54.forwardRef)(
6599
6669
  const componentWidth = width ? width : getWidth2(type, componentSize);
6600
6670
  const hasLabel = !!label3;
6601
6671
  const hasErrorMessage = !!errorMessage;
6602
- const showRequiredStyling = !!(required || ariaRequired);
6672
+ const showRequiredStyling = required || ariaRequired;
6603
6673
  const errorMessageId = (0, import_dds_core52.derivativeIdGenerator)(uniqueId, "errorMessage");
6604
6674
  const tipId = (0, import_dds_core52.derivativeIdGenerator)(uniqueId, "tip");
6605
6675
  const inputProps = {
@@ -6628,7 +6698,7 @@ var Datepicker = (0, import_react54.forwardRef)(
6628
6698
  className
6629
6699
  };
6630
6700
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_dds_form17.OuterInputContainer, { ...outerinputContainerProps, children: [
6631
- hasLabel && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_dds_typography28.Label, { htmlFor: uniqueId, showRequiredStyling, children: label3 }),
6701
+ hasLabel && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_dds_typography28.Label, { htmlFor: uniqueId, showRequiredStyling: !!showRequiredStyling, children: label3 }),
6632
6702
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(StyledInput2, { ...inputProps }),
6633
6703
  renderInputMessage(tip, tipId, errorMessage, errorMessageId)
6634
6704
  ] });
@@ -6693,7 +6763,7 @@ var { wrapper: wrapper2, link: link4 } = skipToContentTokens;
6693
6763
  var Wrapper5 = import_styled_components50.default.div`
6694
6764
  box-sizing: border-box;
6695
6765
  position: absolute;
6696
- top: ${({ top }) => top};
6766
+ top: ${({ $top: top }) => top};
6697
6767
  text-align: center;
6698
6768
  overflow: hidden;
6699
6769
  clip: rect(1px, 1px, 1px, 1px);
@@ -6747,12 +6817,15 @@ var SkipToContent = (0, import_react55.forwardRef)(
6747
6817
  style,
6748
6818
  ...restHtmlProps
6749
6819
  } = htmlProps;
6750
- const wrapperProps = {
6751
- top,
6752
- className: (0, import_dds_core53.joinClassNames)(className, htmlPropsClassName),
6753
- style
6754
- };
6755
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Wrapper5, { ...wrapperProps, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Link3, { ...(0, import_dds_core53.getBaseHTMLProps)(id, restHtmlProps, rest), ref, children: text }) });
6820
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
6821
+ Wrapper5,
6822
+ {
6823
+ $top: top,
6824
+ className: (0, import_dds_core53.joinClassNames)(className, htmlPropsClassName),
6825
+ style,
6826
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Link3, { ...(0, import_dds_core53.getBaseHTMLProps)(id, restHtmlProps, rest), ref, children: text })
6827
+ }
6828
+ );
6756
6829
  }
6757
6830
  );
6758
6831
  SkipToContent.displayName = "SkipToContent";
@@ -6977,7 +7050,9 @@ var import_dds_form19 = require("@norges-domstoler/dds-form");
6977
7050
  var import_styled_components52 = __toESM(require("styled-components"));
6978
7051
  var import_dds_design_tokens27 = require("@norges-domstoler/dds-design-tokens");
6979
7052
  var import_dds_core59 = require("@norges-domstoler/dds-core");
6980
- var Backdrop = import_styled_components52.default.div`
7053
+ var Backdrop = import_styled_components52.default.div.withConfig({
7054
+ shouldForwardProp: (prop) => prop !== "isOpen"
7055
+ })`
6981
7056
  position: fixed;
6982
7057
  display: flex;
6983
7058
  align-items: center;
@@ -7009,10 +7084,13 @@ function handleElementWithBackdropMount(container16) {
7009
7084
  }
7010
7085
  }
7011
7086
  function handleElementWithBackdropUnmount(container16) {
7012
- const scrollY = parseInt(document.body.style.top) || 0;
7087
+ const scrollY = parseInt(document.body.style.top);
7013
7088
  container16.style.removeProperty("overflow-y");
7014
7089
  container16.style.removeProperty("position");
7015
7090
  container16.style.removeProperty("top");
7091
+ if (isNaN(scrollY)) {
7092
+ return;
7093
+ }
7016
7094
  window.scrollTo(0, scrollY * -1);
7017
7095
  }
7018
7096
 
@@ -7078,40 +7156,38 @@ var Modal = (0, import_react57.forwardRef)((props, ref) => {
7078
7156
  (0, import_dds_core60.useOnClickOutside)(modalRef.current, () => handleClose());
7079
7157
  (0, import_dds_core60.useOnKeyDown)(["Escape", "Esc"], () => handleClose());
7080
7158
  const hasTransitionedIn = (0, import_dds_core60.useMountTransition)(isOpen, 200);
7081
- const backdropProps = {
7082
- isOpen: hasTransitionedIn && isOpen
7083
- };
7084
- const containerProps = {
7085
- ...(0, import_dds_core60.getBaseHTMLProps)(id, className, htmlProps, rest),
7086
- ref: combinedRef,
7087
- role: "dialog",
7088
- "aria-modal": true,
7089
- "aria-hidden": !isOpen,
7090
- tabIndex: -1,
7091
- "aria-labelledby": headerId,
7092
- id: modalId
7093
- };
7094
- const headerContainerProps = {
7095
- id: headerId
7096
- };
7097
7159
  return isOpen || hasTransitionedIn ? (0, import_react_dom.createPortal)(
7098
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Backdrop, { ...backdropProps, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Container8, { ...containerProps, elevation: 4, children: [
7099
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(ContentContainer2, { children: [
7100
- header3 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(HeaderContainer2, { ...headerContainerProps, children: typeof header3 === "string" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_dds_typography31.Typography, { typographyType: "headingSans03", children: header3 }) : header3 }),
7101
- children
7102
- ] }),
7103
- onClose && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
7104
- StyledButton2,
7105
- {
7106
- size: "small",
7107
- appearance: "borderless",
7108
- purpose: "secondary",
7109
- icon: import_dds_icons27.CloseIcon,
7110
- onClick: handleClose,
7111
- "aria-label": "Lukk dialog"
7112
- }
7113
- )
7114
- ] }) }),
7160
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Backdrop, { isOpen: hasTransitionedIn && isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
7161
+ Container8,
7162
+ {
7163
+ ...(0, import_dds_core60.getBaseHTMLProps)(id, className, htmlProps, rest),
7164
+ ref: combinedRef,
7165
+ role: "dialog",
7166
+ "aria-modal": true,
7167
+ "aria-hidden": !isOpen,
7168
+ tabIndex: -1,
7169
+ "aria-labelledby": headerId,
7170
+ id: modalId,
7171
+ elevation: 4,
7172
+ children: [
7173
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(ContentContainer2, { children: [
7174
+ header3 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(HeaderContainer2, { id: headerId, children: typeof header3 === "string" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_dds_typography31.Typography, { typographyType: "headingSans03", children: header3 }) : header3 }),
7175
+ children
7176
+ ] }),
7177
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
7178
+ StyledButton2,
7179
+ {
7180
+ size: "small",
7181
+ appearance: "borderless",
7182
+ purpose: "secondary",
7183
+ icon: import_dds_icons27.CloseIcon,
7184
+ onClick: handleClose,
7185
+ "aria-label": "Lukk dialog"
7186
+ }
7187
+ )
7188
+ ]
7189
+ }
7190
+ ) }),
7115
7191
  parentElement
7116
7192
  ) : null;
7117
7193
  });
@@ -7192,7 +7268,17 @@ var getMaxWidth = (size) => {
7192
7268
  else
7193
7269
  return "400px";
7194
7270
  };
7195
- var Container11 = (0, import_styled_components56.default)(import_dds_core62.Paper)`
7271
+ var Container11 = (0, import_styled_components56.default)(import_dds_core62.Paper).withConfig({
7272
+ shouldForwardProp: (prop) => {
7273
+ const styleOnlyProps = [
7274
+ "placement",
7275
+ "isOpen",
7276
+ "widthProps",
7277
+ "size"
7278
+ ];
7279
+ return !styleOnlyProps.some((styleProp) => styleProp === prop);
7280
+ }
7281
+ })`
7196
7282
  position: fixed;
7197
7283
  top: 0;
7198
7284
  height: 100%;
@@ -7208,16 +7294,18 @@ var Container11 = (0, import_styled_components56.default)(import_dds_core62.Pape
7208
7294
  `}
7209
7295
 
7210
7296
  ${({ widthProps }) => widthProps && import_styled_components56.css`
7211
- ${widthProps}
7297
+ min-width: ${widthProps.minWidth};
7298
+ max-width: ${widthProps.maxWidth};
7299
+ width: ${widthProps.width};
7212
7300
  `}
7213
7301
 
7214
7302
  ${({ placement, isOpen }) => placement === "left" ? import_styled_components56.css`
7215
7303
  left: 0;
7216
7304
  transform: ${isOpen ? "translate(0px)" : "translateX(-100%)"};
7217
7305
  ` : placement === "right" ? import_styled_components56.css`
7218
- right: 0;
7219
- transform: ${isOpen ? "translate(0px)" : "translateX(100%)"};
7220
- ` : ""}
7306
+ right: 0;
7307
+ transform: ${isOpen ? "translate(0px)" : "translateX(100%)"};
7308
+ ` : ""}
7221
7309
 
7222
7310
  @media (prefers-reduced-motion: no-preference) {
7223
7311
  transition: transform 0.5s;
@@ -7396,7 +7484,7 @@ var { spacing: Spacing } = import_dds_design_tokens30.ddsBaseTokens;
7396
7484
  var { wrapper: wrapper6, content: content4, closeButton: closeButton2, title: title2 } = popoverTokens;
7397
7485
  var Wrapper6 = (0, import_styled_components57.default)(import_dds_core66.Paper)`
7398
7486
  opacity: 0;
7399
- ${({ hasTransitionedIn, isOpen }) => hasTransitionedIn && (0, import_dds_core63.visibilityTransition)(hasTransitionedIn && isOpen)}
7487
+ ${({ $hasTransitionedIn, $isOpen }) => $hasTransitionedIn && (0, import_dds_core63.visibilityTransition)($hasTransitionedIn && $isOpen)}
7400
7488
  position: absolute;
7401
7489
  width: fit-content;
7402
7490
  z-index: 100;
@@ -7405,15 +7493,20 @@ var Wrapper6 = (0, import_styled_components57.default)(import_dds_core66.Paper)`
7405
7493
  &:focus-visible {
7406
7494
  ${import_dds_form21.focusVisible}
7407
7495
  }
7408
- ${({ sizeProps }) => sizeProps && import_styled_components57.css`
7409
- ${sizeProps}
7496
+ ${({ $sizeProps }) => $sizeProps && import_styled_components57.css`
7497
+ width: ${$sizeProps.width};
7498
+ height: ${$sizeProps.height};
7499
+ min-width: ${$sizeProps.minWidth};
7500
+ min-height: ${$sizeProps.minHeight};
7501
+ max-width: ${$sizeProps.maxWidth};
7502
+ max-height: ${$sizeProps.maxHeight};
7410
7503
  `}
7411
7504
  `;
7412
7505
  var TitleContainer = import_styled_components57.default.div`
7413
7506
  margin-right: ${title2.marginRight};
7414
7507
  `;
7415
7508
  var ContentContainer4 = import_styled_components57.default.div`
7416
- ${({ withCloseButton, hasTitle }) => withCloseButton && !hasTitle && import_styled_components57.css`
7509
+ ${({ $withCloseButton, $hasTitle }) => $withCloseButton && !$hasTitle && import_styled_components57.css`
7417
7510
  margin-top: ${content4.noTitle.marginTop};
7418
7511
  `}
7419
7512
  `;
@@ -7456,9 +7549,7 @@ var Popover = (0, import_react62.forwardRef)(
7456
7549
  (0, import_react62.useEffect)(() => {
7457
7550
  anchorElement ? refs.setReference(anchorElement) : refs.setReference(null);
7458
7551
  }, [anchorElement]);
7459
- const elements = [
7460
- popoverRef.current
7461
- ];
7552
+ const elements = [popoverRef.current];
7462
7553
  if (anchorElement)
7463
7554
  elements.push(anchorElement);
7464
7555
  (0, import_dds_core64.useOnClickOutside)(elements, () => {
@@ -7466,30 +7557,42 @@ var Popover = (0, import_react62.forwardRef)(
7466
7557
  onClose && onClose();
7467
7558
  });
7468
7559
  const hasTransitionedIn = (0, import_dds_core64.useMountTransition)(isOpen, 400);
7469
- const wrapperProps = {
7470
- ...(0, import_dds_core65.getBaseHTMLProps)(id, className, htmlProps, rest),
7471
- ref: multiRef,
7472
- isOpen,
7473
- hasTransitionedIn,
7474
- tabIndex: -1,
7475
- style: { ...htmlProps.style, ...styles.floating },
7476
- role: "dialog"
7477
- };
7478
- return isOpen || hasTransitionedIn ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Wrapper6, { ...wrapperProps, elevation: 3, border: "light", children: [
7479
- title3 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(TitleContainer, { children: typeof title3 === "string" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_dds_typography33.Typography, { typographyType: "headingSans02", children: title3 }) : title3 }),
7480
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ContentContainer4, { hasTitle: !!title3, withCloseButton, children }),
7481
- withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
7482
- StyledButton4,
7483
- {
7484
- icon: import_dds_icons29.CloseIcon,
7485
- appearance: "borderless",
7486
- purpose: "secondary",
7487
- size: "small",
7488
- onClick: onCloseButtonClick,
7489
- "aria-label": "Lukk"
7490
- }
7491
- )
7492
- ] }) : null;
7560
+ return isOpen || hasTransitionedIn ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
7561
+ Wrapper6,
7562
+ {
7563
+ ...(0, import_dds_core65.getBaseHTMLProps)(id, className, htmlProps, rest),
7564
+ ref: multiRef,
7565
+ $isOpen: isOpen,
7566
+ $hasTransitionedIn: hasTransitionedIn,
7567
+ tabIndex: -1,
7568
+ style: { ...htmlProps.style, ...styles.floating },
7569
+ role: "dialog",
7570
+ elevation: 3,
7571
+ border: "light",
7572
+ children: [
7573
+ title3 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(TitleContainer, { children: typeof title3 === "string" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_dds_typography33.Typography, { typographyType: "headingSans02", children: title3 }) : title3 }),
7574
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
7575
+ ContentContainer4,
7576
+ {
7577
+ $hasTitle: !!title3,
7578
+ $withCloseButton: withCloseButton,
7579
+ children
7580
+ }
7581
+ ),
7582
+ withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
7583
+ StyledButton4,
7584
+ {
7585
+ icon: import_dds_icons29.CloseIcon,
7586
+ appearance: "borderless",
7587
+ purpose: "secondary",
7588
+ size: "small",
7589
+ onClick: onCloseButtonClick,
7590
+ "aria-label": "Lukk"
7591
+ }
7592
+ )
7593
+ ]
7594
+ }
7595
+ ) : null;
7493
7596
  }
7494
7597
  );
7495
7598
  Popover.displayName = "Popover";
@@ -7605,11 +7708,14 @@ var Content2 = import_styled_components58.default.span`
7605
7708
  padding: ${toggleButton2.padding};
7606
7709
  ${(0, import_dds_typography34.getFontStyling)(typographyType4)}
7607
7710
  @media (prefers-reduced-motion: no-preference) {
7608
- transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s,
7711
+ transition:
7712
+ border-color 0.2s,
7713
+ background-color 0.2s,
7714
+ box-shadow 0.2s,
7609
7715
  ${import_dds_form22.focusVisibleTransitionValue};
7610
7716
  }
7611
7717
 
7612
- ${({ hasIcon }) => hasIcon && import_styled_components58.css`
7718
+ ${({ $hasIcon }) => $hasIcon && import_styled_components58.css`
7613
7719
  gap: ${toggleButton2.gap};
7614
7720
  `}
7615
7721
 
@@ -7643,17 +7749,16 @@ var ToggleButton = (0, import_react64.forwardRef)(
7643
7749
  ({ id, label: label3, icon: icon12, className, htmlProps, ...rest }, ref) => {
7644
7750
  const generatedId = (0, import_react64.useId)();
7645
7751
  const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
7646
- const inputProps = {
7647
- ...(0, import_dds_core68.getBaseHTMLProps)(uniqueId, className, htmlProps, rest),
7648
- ref,
7649
- type: "checkbox"
7650
- };
7651
- const containerProps = {
7652
- htmlFor: uniqueId
7653
- };
7654
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Container12, { ...containerProps, children: [
7655
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_dds_form22.HiddenInput, { ...inputProps }),
7656
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Content2, { hasIcon: !!icon12, children: [
7752
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Container12, { htmlFor: uniqueId, children: [
7753
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
7754
+ import_dds_form22.HiddenInput,
7755
+ {
7756
+ ...(0, import_dds_core68.getBaseHTMLProps)(uniqueId, className, htmlProps, rest),
7757
+ ref,
7758
+ type: "checkbox"
7759
+ }
7760
+ ),
7761
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Content2, { $hasIcon: !!icon12, children: [
7657
7762
  icon12 && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_dds_icons30.Icon, { icon: icon12, iconSize: "inherit" }),
7658
7763
  " ",
7659
7764
  label3
@@ -7674,8 +7779,8 @@ var Group = import_styled_components59.default.div`
7674
7779
  display: flex;
7675
7780
  flex-wrap: wrap;
7676
7781
  ${({ direction }) => import_styled_components59.css`
7677
- flex-direction: ${direction};
7678
- `}
7782
+ flex-direction: ${direction};
7783
+ `}
7679
7784
  `;
7680
7785
  var Container13 = import_styled_components59.default.div`
7681
7786
  display: flex;
@@ -7740,8 +7845,8 @@ var useTabsContext = () => (0, import_react66.useContext)(TabsContext);
7740
7845
  // src/components/Tabs/Tabs.tsx
7741
7846
  var import_jsx_runtime68 = require("react/jsx-runtime");
7742
7847
  var Container14 = import_styled_components60.default.div`
7743
- ${({ width }) => width && import_styled_components60.css`
7744
- width: ${width};
7848
+ ${({ $width }) => $width && import_styled_components60.css`
7849
+ width: ${$width};
7745
7850
  `};
7746
7851
  `;
7747
7852
  var Tabs = (0, import_react67.forwardRef)((props, ref) => {
@@ -7758,7 +7863,7 @@ var Tabs = (0, import_react67.forwardRef)((props, ref) => {
7758
7863
  } = props;
7759
7864
  const generatedId = (0, import_react67.useId)();
7760
7865
  const uniqueId = id != null ? id : `${generatedId}-tabs`;
7761
- const [thisActiveTab, setActiveTab] = (0, import_react67.useState)(activeTab || 0);
7866
+ const [thisActiveTab, setActiveTab] = (0, import_react67.useState)(activeTab != null ? activeTab : 0);
7762
7867
  const [hasTabFocus, setHasTabFocus] = (0, import_react67.useState)(false);
7763
7868
  const tabListRef = (0, import_react67.useRef)(null);
7764
7869
  const tabPanelsRef = (0, import_react67.useRef)(null);
@@ -7788,7 +7893,7 @@ var Tabs = (0, import_react67.forwardRef)((props, ref) => {
7788
7893
  setHasTabFocus,
7789
7894
  tabContentDirection
7790
7895
  },
7791
- children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Container14, { ...containerProps, width, children })
7896
+ children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Container14, { ...containerProps, $width: width, children })
7792
7897
  }
7793
7898
  );
7794
7899
  });
@@ -7857,16 +7962,19 @@ var Button2 = import_styled_components61.default.button`
7857
7962
  ${(0, import_dds_typography36.getFontStyling)(import_dds_typography36.defaultTypographyType)}
7858
7963
 
7859
7964
  @media (prefers-reduced-motion: no-preference) {
7860
- transition: box-shadow 0.2s, border-bottom 0.2s, color 0.2s,
7965
+ transition:
7966
+ box-shadow 0.2s,
7967
+ border-bottom 0.2s,
7968
+ color 0.2s,
7861
7969
  ${import_dds_form23.focusVisibleTransitionValue};
7862
7970
  }
7863
7971
 
7864
- ${({ direction }) => import_styled_components61.css`
7865
- flex-direction: ${direction};
7866
- gap: ${tab2[direction].gap};
7972
+ ${({ $direction }) => import_styled_components61.css`
7973
+ flex-direction: ${$direction};
7974
+ gap: ${tab2[$direction].gap};
7867
7975
  `};
7868
7976
 
7869
- ${({ active }) => active && import_styled_components61.css`
7977
+ ${({ $active }) => $active && import_styled_components61.css`
7870
7978
  background-color: ${tab2.active.backgroundColor};
7871
7979
  border-color: ${tab2.active.borderColor};
7872
7980
  color: ${tab2.active.color};
@@ -7927,21 +8035,24 @@ var Tab = (0, import_react68.forwardRef)((props, ref) => {
7927
8035
  handleSelect();
7928
8036
  onKeyDown && onKeyDown(e);
7929
8037
  };
7930
- const buttonProps = {
7931
- ...(0, import_dds_core71.getBaseHTMLProps)(id, className, htmlProps, rest),
7932
- ref: combinedRef,
7933
- "aria-selected": active,
7934
- role: "tab",
7935
- active,
7936
- direction: tabContentDirection,
7937
- onClick: handleOnClick,
7938
- onKeyDown: handleOnKeyDown,
7939
- tabIndex: focus ? 0 : -1
7940
- };
7941
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Button2, { ...buttonProps, children: [
7942
- icon12 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_dds_icons31.Icon, { icon: icon12, iconSize: "inherit" }),
7943
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children })
7944
- ] });
8038
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
8039
+ Button2,
8040
+ {
8041
+ ...(0, import_dds_core71.getBaseHTMLProps)(id, className, htmlProps, rest),
8042
+ ref: combinedRef,
8043
+ "aria-selected": active,
8044
+ role: "tab",
8045
+ $active: active,
8046
+ $direction: tabContentDirection,
8047
+ onClick: handleOnClick,
8048
+ onKeyDown: handleOnKeyDown,
8049
+ tabIndex: focus ? 0 : -1,
8050
+ children: [
8051
+ icon12 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_dds_icons31.Icon, { icon: icon12, iconSize: "inherit" }),
8052
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children })
8053
+ ]
8054
+ }
8055
+ );
7945
8056
  });
7946
8057
  Tab.displayName = "Tab";
7947
8058
 
@@ -8037,7 +8148,7 @@ var Panel = import_styled_components63.default.div`
8037
8148
  transition: ${import_dds_form25.focusVisibleTransitionValue};
8038
8149
  }
8039
8150
 
8040
- ${({ active }) => !active && import_styled_components63.css`
8151
+ ${({ $active }) => !$active && import_styled_components63.css`
8041
8152
  display: none;
8042
8153
  `}
8043
8154
  &:focus-visible {
@@ -8046,14 +8157,17 @@ var Panel = import_styled_components63.default.div`
8046
8157
  `;
8047
8158
  var TabPanel = (0, import_react70.forwardRef)(
8048
8159
  ({ active = false, children, id, className, htmlProps, ...rest }, ref) => {
8049
- const panelProps = {
8050
- ...(0, import_dds_core73.getBaseHTMLProps)(id, className, htmlProps, rest),
8051
- ref,
8052
- tabIndex: 0,
8053
- role: "tabpanel",
8054
- active
8055
- };
8056
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Panel, { ...panelProps, children });
8160
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
8161
+ Panel,
8162
+ {
8163
+ ...(0, import_dds_core73.getBaseHTMLProps)(id, className, htmlProps, rest),
8164
+ ref,
8165
+ tabIndex: 0,
8166
+ role: "tabpanel",
8167
+ $active: active,
8168
+ children
8169
+ }
8170
+ );
8057
8171
  }
8058
8172
  );
8059
8173
  TabPanel.displayName = "TabPanel";
@@ -8119,9 +8233,9 @@ var Wrapper7 = (0, import_styled_components64.default)(import_dds_typography37.T
8119
8233
  border-radius: ${wrapper8.borderRadius};
8120
8234
  padding: ${wrapper8.padding};
8121
8235
  ${(0, import_dds_typography37.getFontStyling)(typographyType5)}
8122
- ${({ purpose }) => import_styled_components64.css`
8123
- background-color: ${wrapper8.purpose[purpose].backgroundColor};
8124
- border-color: ${wrapper8.purpose[purpose].borderColor};
8236
+ ${({ $purpose }) => import_styled_components64.css`
8237
+ background-color: ${wrapper8.purpose[$purpose].backgroundColor};
8238
+ border-color: ${wrapper8.purpose[$purpose].borderColor};
8125
8239
  `}
8126
8240
  `;
8127
8241
  var Tag = (0, import_react72.forwardRef)((props, ref) => {
@@ -8138,7 +8252,7 @@ var Tag = (0, import_react72.forwardRef)((props, ref) => {
8138
8252
  {
8139
8253
  ...(0, import_dds_core75.getBaseHTMLProps)(id, className, htmlProps, rest),
8140
8254
  ref,
8141
- purpose,
8255
+ $purpose: purpose,
8142
8256
  children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_dds_typography37.TextOverflowEllipsisInner, { children: text })
8143
8257
  }
8144
8258
  );
@@ -8209,7 +8323,7 @@ var Chip = (0, import_react73.forwardRef)((props, ref) => {
8209
8323
  appearance: "borderless",
8210
8324
  purpose: "secondary",
8211
8325
  onClick,
8212
- "aria-label": ariaLabel || `Fjern ${text ? `chip ${text}` : "chip"}`
8326
+ "aria-label": ariaLabel != null ? ariaLabel : `Fjern ${text ? `chip ${text}` : "chip"}`
8213
8327
  }
8214
8328
  )
8215
8329
  ]
@@ -8369,8 +8483,8 @@ var OuterContainer4 = import_styled_components67.default.div`
8369
8483
  *::selection {
8370
8484
  ${import_dds_core79.selection}
8371
8485
  }
8372
- ${({ width }) => width && import_styled_components67.css`
8373
- width: ${width};
8486
+ ${({ $width }) => $width && import_styled_components67.css`
8487
+ width: ${$width};
8374
8488
  `}
8375
8489
  `;
8376
8490
  var Bar2 = import_styled_components67.default.div`
@@ -8415,7 +8529,7 @@ var ToggleBar = (props) => {
8415
8529
  ...(0, import_dds_core80.getBaseHTMLProps)(id, className, htmlProps, rest),
8416
8530
  role: "radiogroup",
8417
8531
  "aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
8418
- width,
8532
+ $width: width,
8419
8533
  children: [
8420
8534
  label3 && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_dds_typography39.Typography, { typographyType: "supportingStyleLabel01", id: labelId, children: label3 }),
8421
8535
  /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Bar2, { children })
@@ -8446,19 +8560,23 @@ var Content3 = import_styled_components68.default.span`
8446
8560
  box-sizing: border-box;
8447
8561
  cursor: pointer;
8448
8562
  @media (prefers-reduced-motion: no-preference) {
8449
- transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s,
8450
- color 0.2s, ${import_dds_form26.focusVisibleTransitionValue};
8563
+ transition:
8564
+ border-color 0.2s,
8565
+ background-color 0.2s,
8566
+ box-shadow 0.2s,
8567
+ color 0.2s,
8568
+ ${import_dds_form26.focusVisibleTransitionValue};
8451
8569
  }
8452
8570
  background-color: ${content6.base.backgroundColor};
8453
8571
 
8454
- ${({ size, justIcon }) => import_styled_components68.css`
8455
- ${justIcon ? import_styled_components68.css`
8456
- font-size: ${content6.size[size].justIcon.fontSize};
8457
- padding: ${content6.size[size].justIcon.padding};
8572
+ ${({ $size, $justIcon }) => import_styled_components68.css`
8573
+ ${$justIcon ? import_styled_components68.css`
8574
+ font-size: ${content6.size[$size].justIcon.fontSize};
8575
+ padding: ${content6.size[$size].justIcon.padding};
8458
8576
  ` : import_styled_components68.css`
8459
- gap: ${content6.size[size].withText.gap};
8460
- padding: ${content6.size[size].withText.padding};
8461
- ${(0, import_dds_typography40.getFontStyling)(typographyTypes6[size])}
8577
+ gap: ${content6.size[$size].withText.gap};
8578
+ padding: ${content6.size[$size].withText.padding};
8579
+ ${(0, import_dds_typography40.getFontStyling)(typographyTypes6[$size])}
8462
8580
  `}
8463
8581
  `}
8464
8582
  `;
@@ -8532,7 +8650,7 @@ var ToggleRadio = (0, import_react77.forwardRef)(
8532
8650
  const group4 = useToggleBarContext();
8533
8651
  const handleChange = (event) => {
8534
8652
  onChange && onChange(event);
8535
- group4 && group4.onChange && group4.onChange(event);
8653
+ (group4 == null ? void 0 : group4.onChange) && group4.onChange(event);
8536
8654
  };
8537
8655
  return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Label6, { size: group4.size, htmlFor: uniqueId, children: [
8538
8656
  /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
@@ -8547,7 +8665,7 @@ var ToggleRadio = (0, import_react77.forwardRef)(
8547
8665
  checked: calculateChecked(value, group4, checked)
8548
8666
  }
8549
8667
  ),
8550
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Content3, { size: group4.size, justIcon: !!icon12 && !!!label3, children: [
8668
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Content3, { $size: group4.size, $justIcon: !!icon12 && !label3, children: [
8551
8669
  icon12 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_dds_icons33.Icon, { icon: icon12, iconSize: "inherit" }),
8552
8670
  label3 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { children: label3 })
8553
8671
  ] })
@@ -8680,11 +8798,20 @@ var getHooksGridStyling = (screenSize, maxWidth, rowGap) => {
8680
8798
  maxWidth: maxWidth && maxWidth[(0, import_dds_core87.getLiteralScreenSize)(screenSize)] && maxWidth[(0, import_dds_core87.getLiteralScreenSize)(screenSize)]
8681
8799
  };
8682
8800
  };
8683
- var StyledGrid = import_styled_components69.default.div`
8801
+ var StyledGrid = import_styled_components69.default.div.withConfig({
8802
+ shouldForwardProp: (prop) => {
8803
+ const styleOnlyProps = [
8804
+ "maxWidth",
8805
+ "rowGap",
8806
+ "screenSize"
8807
+ ];
8808
+ return !styleOnlyProps.some((styleProp) => styleProp === prop);
8809
+ }
8810
+ })`
8684
8811
  display: grid;
8685
8812
  ${({ maxWidth }) => import_styled_components69.css`
8686
- max-width: ${maxWidth};
8687
- `}
8813
+ max-width: ${maxWidth};
8814
+ `}
8688
8815
  ${({ screenSize, maxWidth, rowGap }) => getHooksGridStyling(screenSize, maxWidth, rowGap)}
8689
8816
  `;
8690
8817
  var Grid = (props) => {
@@ -8720,7 +8847,17 @@ var isRelativeGridColumn = (type) => {
8720
8847
  var isGridColumn = (type) => {
8721
8848
  return type.xs !== void 0 || type.sm !== void 0 || type.md !== void 0 || type.lg !== void 0 || type.xl !== void 0;
8722
8849
  };
8723
- var StyledGridChild = import_styled_components70.default.div`
8850
+ var StyledGridChild = import_styled_components70.default.div.withConfig({
8851
+ shouldForwardProp: (prop) => {
8852
+ const styleOnlyProps = [
8853
+ "columnsOccupied",
8854
+ "justifySelf",
8855
+ "gridRow",
8856
+ "screenSize"
8857
+ ];
8858
+ return !styleOnlyProps.some((styleProp) => styleProp === prop);
8859
+ }
8860
+ })`
8724
8861
  grid-column: ${({ screenSize, columnsOccupied }) => columnsOccupied === "all" ? "1 / -1" : isGridColumn(columnsOccupied) ? columnsOccupied[(0, import_dds_core89.getLiteralScreenSize)(screenSize)] : isRelativeGridColumn(columnsOccupied) ? gridTokens[screenSize].columns[columnsOccupied].gridColumn : ""};
8725
8862
 
8726
8863
  justify-self: ${({ justifySelf }) => justifySelf && justifySelf};
@@ -8859,7 +8996,10 @@ var ItemWrapper = import_styled_components71.default.li`
8859
8996
  justify-content: center;
8860
8997
  `;
8861
8998
  var ItemNumber = import_styled_components71.default.div`
8862
- transition: background-color 0.2s, border-color 0.2s, color 0.2s;
8999
+ transition:
9000
+ background-color 0.2s,
9001
+ border-color 0.2s,
9002
+ color 0.2s;
8863
9003
  border-radius: 50%;
8864
9004
  border: ${itemNumber2.borderWidth} solid;
8865
9005
  width: ${itemNumber2.size};
@@ -8871,7 +9011,7 @@ var ItemNumber = import_styled_components71.default.div`
8871
9011
  ${(0, import_dds_typography41.getFontStyling)(typographyTypes7.number)}
8872
9012
  font-weight: 600;
8873
9013
 
8874
- ${({ state }) => {
9014
+ ${({ $state: state }) => {
8875
9015
  switch (state) {
8876
9016
  case "activeIncomplete":
8877
9017
  return import_styled_components71.css`
@@ -8912,7 +9052,7 @@ var ItemText = import_styled_components71.default.div`
8912
9052
  text-decoration: ${itemText2.textDecoration};
8913
9053
  transition: text-decoration-color 0.2s;
8914
9054
 
8915
- ${({ state }) => {
9055
+ ${({ $state: state }) => {
8916
9056
  switch (state) {
8917
9057
  case "activeCompleted":
8918
9058
  case "activeIncomplete":
@@ -8951,7 +9091,7 @@ var ItemContentWrapper = import_styled_components71.default.button`
8951
9091
  ${import_dds_form28.focusVisible}
8952
9092
  }
8953
9093
 
8954
- ${({ state }) => state !== "disabled" && import_styled_components71.css`
9094
+ ${({ $state: state }) => state !== "disabled" && import_styled_components71.css`
8955
9095
  cursor: pointer;
8956
9096
  `}
8957
9097
  `;
@@ -8967,7 +9107,7 @@ var ProgressTrackerItem = (props) => {
8967
9107
  const { activeStep, handleStepChange } = useProgressTrackerContext();
8968
9108
  const active = activeStep === index;
8969
9109
  const styleProps = {
8970
- state: toItemState(active, completed, disabled)
9110
+ $state: toItemState(active, completed, disabled)
8971
9111
  };
8972
9112
  const stepNumberContent = (0, import_react80.useMemo)(() => {
8973
9113
  if (completed) {
@@ -9062,14 +9202,18 @@ var ProgressTracker = (() => {
9062
9202
  Res.displayName = "ProgressTracker";
9063
9203
  return Res;
9064
9204
  })();
9065
- var removeInvalidChildren = (children) => import_react81.Children.toArray(children).filter(import_react81.isValidElement);
9066
- var passIndexPropToProgressTrackerItem = (children) => import_react81.Children.map(
9067
- children,
9068
- (item, index) => (0, import_react81.cloneElement)(item, {
9069
- ...item.props,
9070
- index
9071
- })
9072
- );
9205
+ function removeInvalidChildren(children) {
9206
+ return import_react81.Children.toArray(children).filter(import_react81.isValidElement);
9207
+ }
9208
+ function passIndexPropToProgressTrackerItem(children) {
9209
+ return import_react81.Children.map(
9210
+ children,
9211
+ (item, index) => (0, import_react81.cloneElement)(item, {
9212
+ ...item.props,
9213
+ index
9214
+ })
9215
+ );
9216
+ }
9073
9217
  var intersperseItemsWithConnector = (children) => import_react81.Children.map(children, (child, index) => {
9074
9218
  if (index === 0) {
9075
9219
  return child;
@@ -9098,7 +9242,7 @@ var InlineEdit = (props) => {
9098
9242
  inputRef,
9099
9243
  children
9100
9244
  } = props;
9101
- const [editingValue, setEditingValue] = (0, import_react82.useState)(value || "");
9245
+ const [editingValue, setEditingValue] = (0, import_react82.useState)(value != null ? value : "");
9102
9246
  const [isEditing, setIsEditing] = (0, import_react82.useState)(false);
9103
9247
  const onChangeHandler = (e) => {
9104
9248
  setEditingValue(e.target.value);
@@ -9182,7 +9326,9 @@ var inlineEditTokens = {
9182
9326
  var import_dds_form29 = require("@norges-domstoler/dds-form");
9183
9327
  var { inlineEdit: inlineEdit2, iconWrapper: iconWrapper2 } = inlineEditTokens;
9184
9328
  var defaultWidth4 = "140px";
9185
- var StyledInlineInput = (0, import_styled_components73.default)(import_dds_form29.StatefulInput)`
9329
+ var StyledInlineInput = (0, import_styled_components73.default)(import_dds_form29.StatefulInput).withConfig({
9330
+ shouldForwardProp: (prop) => prop !== "isEditing" && prop !== "hideIcon"
9331
+ })`
9186
9332
  border-color: transparent;
9187
9333
  background-color: ${inlineEdit2.backgroundColor};
9188
9334
  padding: ${inlineEdit2.padding};
@@ -9435,11 +9581,11 @@ var TextArea = (0, import_react87.forwardRef)(
9435
9581
  defaultValue,
9436
9582
  onChange,
9437
9583
  errorMessage,
9438
- required,
9584
+ required = false,
9439
9585
  disabled,
9440
9586
  tip,
9441
9587
  label: label3,
9442
- "aria-required": ariaRequired,
9588
+ "aria-required": ariaRequired = false,
9443
9589
  "aria-describedby": ariaDescribedby,
9444
9590
  className,
9445
9591
  style,
@@ -9454,7 +9600,7 @@ var TextArea = (0, import_react87.forwardRef)(
9454
9600
  (0, import_dds_form32.getDefaultText)(value, defaultValue)
9455
9601
  );
9456
9602
  (0, import_react87.useEffect)(() => {
9457
- if (textAreaRef && textAreaRef.current) {
9603
+ if (textAreaRef == null ? void 0 : textAreaRef.current) {
9458
9604
  textAreaRef.current.style.height = `${textAreaRef.current.scrollHeight + 2}px`;
9459
9605
  }
9460
9606
  }, [text]);
@@ -9621,7 +9767,18 @@ var stackTokens = {
9621
9767
  // src/components/Stack/Stack.tsx
9622
9768
  var import_dds_core99 = require("@norges-domstoler/dds-core");
9623
9769
  var import_jsx_runtime90 = require("react/jsx-runtime");
9624
- var Stack = import_styled_components76.default.div`
9770
+ var Stack = import_styled_components76.default.div.withConfig({
9771
+ shouldForwardProp: (prop) => {
9772
+ const styleOnlyProps = [
9773
+ "align",
9774
+ "direction",
9775
+ "gap",
9776
+ "justify",
9777
+ "padding"
9778
+ ];
9779
+ return !styleOnlyProps.some((p) => p === prop);
9780
+ }
9781
+ })`
9625
9782
  display: flex;
9626
9783
  flex-direction: ${({ direction }) => direction === "horizontal" ? "row" : "column"};
9627
9784
  align-items: ${(props) => props.align};
@@ -10004,9 +10161,11 @@ var useFileUploader = (props) => {
10004
10161
  () => ({
10005
10162
  onBlur: onRootBlur,
10006
10163
  onFocus: onRootFocus,
10164
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
10007
10165
  onDragEnter: onRootDragEnter,
10008
10166
  onDragOver: onRootDragOver,
10009
10167
  onDragLeave: onRootDragLeave,
10168
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
10010
10169
  onDrop: setFiles,
10011
10170
  ref: rootRef
10012
10171
  }),
@@ -10033,6 +10192,7 @@ var useFileUploader = (props) => {
10033
10192
  style: { display: "none" },
10034
10193
  tabIndex: -1,
10035
10194
  ref: inputRef,
10195
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
10036
10196
  onChange: setFiles,
10037
10197
  multiple: !maxFiles || maxFiles > 1,
10038
10198
  ...accept ? { accept: accept.join(",") } : {}
@@ -10056,14 +10216,14 @@ var Wrapper8 = import_styled_components79.default.div`
10056
10216
  `;
10057
10217
  var Root = import_styled_components79.default.div`
10058
10218
  box-sizing: border-box;
10059
- border-width: ${({ hasRootErrors }) => hasRootErrors ? "2px" : "1px"};
10219
+ border-width: ${({ $hasRootErrors: hasRootErrors }) => hasRootErrors ? "2px" : "1px"};
10060
10220
  border-style: dashed;
10061
- border-color: ${({ isDragActive, hasRootErrors }) => isDragActive ? rootTokens.dragActive.borderColor : hasRootErrors ? rootTokens.borderColorError : rootTokens.borderColor};
10062
- padding: ${({ hasRootErrors }) => hasRootErrors ? `calc(${rootTokens.paddingLeftRightTop} - 1px) calc(${rootTokens.paddingLeftRightTop} - 1px) ${rootTokens.paddingBottom}` : `${rootTokens.paddingLeftRightTop} ${rootTokens.paddingLeftRightTop} ${rootTokens.paddingBottom}`};
10221
+ border-color: ${({ $isDragActive, $hasRootErrors }) => $isDragActive ? rootTokens.dragActive.borderColor : $hasRootErrors ? rootTokens.borderColorError : rootTokens.borderColor};
10222
+ padding: ${({ $hasRootErrors }) => $hasRootErrors ? `calc(${rootTokens.paddingLeftRightTop} - 1px) calc(${rootTokens.paddingLeftRightTop} - 1px) ${rootTokens.paddingBottom}` : `${rootTokens.paddingLeftRightTop} ${rootTokens.paddingLeftRightTop} ${rootTokens.paddingBottom}`};
10063
10223
  display: flex;
10064
10224
  flex-direction: column;
10065
10225
  gap: ${rootTokens.gap};
10066
- background-color: ${({ isDragActive }) => isDragActive ? rootTokens.dragActive.backgroundColor : rootTokens.backgroundColor};
10226
+ background-color: ${({ $isDragActive }) => $isDragActive ? rootTokens.dragActive.backgroundColor : rootTokens.backgroundColor};
10067
10227
  `;
10068
10228
  var FileUploaderInput = import_styled_components79.default.input``;
10069
10229
  var FileListElement = import_styled_components79.default.ul`
@@ -10131,8 +10291,8 @@ var FileUploader = (props) => {
10131
10291
  Root,
10132
10292
  {
10133
10293
  ...getRootProps(),
10134
- isDragActive,
10135
- hasRootErrors,
10294
+ $isDragActive: isDragActive,
10295
+ $hasRootErrors: hasRootErrors,
10136
10296
  children: [
10137
10297
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(FileUploaderInput, { ...getInputProps() }),
10138
10298
  "Dra og slipp filer her eller",
@@ -10241,35 +10401,22 @@ var import_react93 = require("react");
10241
10401
  var import_dds_typography49 = require("@norges-domstoler/dds-typography");
10242
10402
 
10243
10403
  // src/components/Feedback/RatingComponent.tsx
10244
- var import_styled_components83 = __toESM(require("styled-components"));
10245
- var import_dds_design_tokens46 = require("@norges-domstoler/dds-design-tokens");
10246
- var import_dds_icons44 = require("@norges-domstoler/dds-icons");
10247
- var import_dds_typography47 = require("@norges-domstoler/dds-typography");
10248
-
10249
- // src/components/Feedback/FlexContainer.tsx
10250
10404
  var import_styled_components82 = __toESM(require("styled-components"));
10251
10405
  var import_dds_design_tokens45 = require("@norges-domstoler/dds-design-tokens");
10252
- var FlexContainer = import_styled_components82.default.div`
10253
- display: flex;
10254
- ${({ flexDirection }) => import_styled_components82.css`
10255
- flex-direction: ${flexDirection};
10256
- gap: ${import_dds_design_tokens45.ddsBaseTokens.spacing.SizesDdsSpacingLocalX1};
10257
- `};
10258
- `;
10259
-
10260
- // src/components/Feedback/RatingComponent.tsx
10406
+ var import_dds_icons44 = require("@norges-domstoler/dds-icons");
10407
+ var import_dds_typography47 = require("@norges-domstoler/dds-typography");
10261
10408
  var import_jsx_runtime96 = require("react/jsx-runtime");
10262
- var RatingContainer = import_styled_components83.default.div`
10409
+ var RatingContainer = import_styled_components82.default.div`
10263
10410
  display: flex;
10264
- gap: ${import_dds_design_tokens46.ddsBaseTokens.spacing.SizesDdsSpacingLocalX1};
10265
- ${({ layout }) => import_styled_components83.css`
10266
- flex-direction: ${layout === "horizontal" ? "row" : "column"};
10267
- align-items: ${layout === "horizontal" ? "center" : "start"};
10411
+ gap: ${import_dds_design_tokens45.ddsBaseTokens.spacing.SizesDdsSpacingLocalX1};
10412
+ ${({ $layout }) => import_styled_components82.css`
10413
+ flex-direction: ${$layout === "horizontal" ? "row" : "column"};
10414
+ align-items: ${$layout === "horizontal" ? "center" : "start"};
10268
10415
  `}
10269
10416
  `;
10270
- var RatingButton = (0, import_styled_components83.default)(Button)`
10417
+ var RatingButton = (0, import_styled_components82.default)(Button)`
10271
10418
  padding: 0px;
10272
- color: ${import_dds_design_tokens46.ddsBaseTokens.colors.DdsColorNeutralsGray7};
10419
+ color: ${import_dds_design_tokens45.ddsBaseTokens.colors.DdsColorNeutralsGray7};
10273
10420
  `;
10274
10421
  var RatingComponent = ({
10275
10422
  layout,
@@ -10279,9 +10426,9 @@ var RatingComponent = ({
10279
10426
  thumbDownTooltip,
10280
10427
  handleRatingChange
10281
10428
  }) => {
10282
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(RatingContainer, { layout, children: [
10429
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(RatingContainer, { $layout: layout, children: [
10283
10430
  /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_dds_typography47.Label, { children: ratingLabel }),
10284
- loading ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Spinner, { tooltip: "Laster opp tilbakemelding ..." }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(FlexContainer, { flexDirection: "row", children: [
10431
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Spinner, { tooltip: "Laster opp tilbakemelding ..." }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(HStack, { gap: "layout-x1", children: [
10285
10432
  /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Tooltip, { text: thumbUpTooltip, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10286
10433
  RatingButton,
10287
10434
  {
@@ -10307,15 +10454,15 @@ var RatingComponent = ({
10307
10454
  };
10308
10455
 
10309
10456
  // src/components/Feedback/CommentComponent.tsx
10310
- var import_styled_components84 = __toESM(require("styled-components"));
10311
- var import_dds_design_tokens47 = require("@norges-domstoler/dds-design-tokens");
10457
+ var import_styled_components83 = __toESM(require("styled-components"));
10458
+ var import_dds_design_tokens46 = require("@norges-domstoler/dds-design-tokens");
10312
10459
  var import_dds_icons45 = require("@norges-domstoler/dds-icons");
10313
10460
  var import_dds_typography48 = require("@norges-domstoler/dds-typography");
10314
10461
  var import_jsx_runtime97 = require("react/jsx-runtime");
10315
- var IconLabelSpan = import_styled_components84.default.span`
10462
+ var IconLabelSpan = import_styled_components83.default.span`
10316
10463
  display: inline-flex;
10317
10464
  align-items: center;
10318
- gap: ${import_dds_design_tokens47.ddsBaseTokens.spacing.SizesDdsSpacingLocalX05};
10465
+ gap: ${import_dds_design_tokens46.ddsBaseTokens.spacing.SizesDdsSpacingLocalX05};
10319
10466
  `;
10320
10467
  var CommentComponent = ({
10321
10468
  rating,
@@ -10327,13 +10474,13 @@ var CommentComponent = ({
10327
10474
  handleSubmit,
10328
10475
  handleFeedbackTextChange
10329
10476
  }) => {
10330
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(FlexContainer, { flexDirection: "column", children: [
10477
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(VStack, { gap: "layout-x1", children: [
10331
10478
  /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(IconLabelSpan, { children: [
10332
10479
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
10333
10480
  import_dds_icons45.Icon,
10334
10481
  {
10335
10482
  icon: rating === "positive" ? import_dds_icons45.ThumbupFilled : import_dds_icons45.ThumbdownFilled,
10336
- color: import_dds_design_tokens47.ddsBaseTokens.colors.DdsColorInteractiveBase
10483
+ color: import_dds_design_tokens46.ddsBaseTokens.colors.DdsColorInteractiveBase
10337
10484
  }
10338
10485
  ),
10339
10486
  /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_dds_typography48.Paragraph, { children: [