@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.mjs CHANGED
@@ -294,7 +294,9 @@ var fontPackage = (small) => {
294
294
  }
295
295
  return navTokens2.logoAndVersion.logo;
296
296
  };
297
- var NavigationLogo = styled3.a`
297
+ var NavigationLogo = styled3.a.withConfig({
298
+ shouldForwardProp: (prop) => prop !== "small"
299
+ })`
298
300
  font-size: ${({ small }) => fontPackage(small).fontSize};
299
301
  font-style: ${({ small }) => fontPackage(small).fontStyle};
300
302
  font-family: ${({ small }) => fontPackage(small).fontFamily};
@@ -662,11 +664,11 @@ import {
662
664
  import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
663
665
  var StyledSpinner = styled4.svg`
664
666
  display: block;
665
- width: ${({ size }) => size};
666
- height: ${({ size }) => size};
667
+ width: ${({ $size }) => $size};
668
+ height: ${({ $size }) => $size};
667
669
  stroke-dasharray: 90, 150;
668
670
  animation: rotate 1.5s linear infinite;
669
- animation-delay: ${({ outerAnimationDelay }) => outerAnimationDelay}ms;
671
+ animation-delay: ${({ $outerAnimationDelay }) => $outerAnimationDelay}ms;
670
672
 
671
673
  @media (prefers-reduced-motion: no-preference) {
672
674
  animation: rotate 2s linear infinite;
@@ -679,12 +681,12 @@ var StyledSpinner = styled4.svg`
679
681
  }
680
682
  `;
681
683
  var Circle = styled4.circle`
682
- stroke: ${({ color }) => color && getTextColor(color)};
684
+ stroke: ${({ $color }) => $color && getTextColor($color)};
683
685
  stroke-linecap: round;
684
686
 
685
687
  @media (prefers-reduced-motion: no-preference) {
686
688
  animation: dash 1.5s ease-in-out infinite;
687
- animation-delay: ${({ innerAnimationDelay }) => innerAnimationDelay}ms;
689
+ animation-delay: ${({ $innerAnimationDelay }) => $innerAnimationDelay}ms;
688
690
 
689
691
  @keyframes dash {
690
692
  0% {
@@ -719,12 +721,8 @@ function Spinner(props) {
719
721
  const uniqueId = `${generatedId}-spinnerTitle`;
720
722
  const spinnerProps = {
721
723
  ...getBaseHTMLProps2(id, className, htmlProps, rest),
722
- outerAnimationDelay,
723
- size
724
- };
725
- const circleProps = {
726
- innerAnimationDelay,
727
- color
724
+ $outerAnimationDelay: outerAnimationDelay,
725
+ $size: size
728
726
  };
729
727
  return /* @__PURE__ */ jsxs2(
730
728
  StyledSpinner,
@@ -738,7 +736,8 @@ function Spinner(props) {
738
736
  /* @__PURE__ */ jsx5(
739
737
  Circle,
740
738
  {
741
- ...circleProps,
739
+ $innerAnimationDelay: innerAnimationDelay,
740
+ $color: color,
742
741
  cx: "25",
743
742
  cy: "25",
744
743
  r: "20",
@@ -811,7 +810,21 @@ var getAppearanceAndPurposeStyling = (appearance, purpose) => {
811
810
  `;
812
811
  }
813
812
  };
814
- var ButtonWrapper = styled5.button`
813
+ var ButtonWrapper = styled5.button.withConfig({
814
+ shouldForwardProp: (prop) => {
815
+ const styleOnlyProps = [
816
+ "appearance",
817
+ "purpose",
818
+ "size",
819
+ "fullWidth",
820
+ "hasIcon",
821
+ "hasLabel",
822
+ "isLoading",
823
+ "iconPosition"
824
+ ];
825
+ return !styleOnlyProps.some((styleProp) => styleProp === prop);
826
+ }
827
+ })`
815
828
  ${normalizeButton}
816
829
  border: ${base.border};
817
830
  user-select: text;
@@ -825,17 +838,21 @@ var ButtonWrapper = styled5.button`
825
838
  text-decoration: none;
826
839
 
827
840
  @media (prefers-reduced-motion: no-preference) {
828
- transition: background-color 0.2s, text-decoration-color 0.2s,
829
- box-shadow 0.2s, border-color 0.2s, color 0.2s,
841
+ transition:
842
+ background-color 0.2s,
843
+ text-decoration-color 0.2s,
844
+ box-shadow 0.2s,
845
+ border-color 0.2s,
846
+ color 0.2s,
830
847
  ${focusVisibleTransitionValue};
831
848
  }
832
849
 
833
850
  ${({ appearance, purpose }) => css2`
834
- border-radius: ${appearances2[appearance].base.borderRadius};
835
- box-shadow: ${appearances2[appearance].base.boxShadow};
836
- color: ${appearances2[appearance].purpose[purpose].base.color};
837
- ${getAppearanceAndPurposeStyling(appearance, purpose)}
838
- `}
851
+ border-radius: ${appearances2[appearance].base.borderRadius};
852
+ box-shadow: ${appearances2[appearance].base.boxShadow};
853
+ color: ${appearances2[appearance].purpose[purpose].base.color};
854
+ ${getAppearanceAndPurposeStyling(appearance, purpose)}
855
+ `}
839
856
 
840
857
  ${({ hasIcon, hasLabel, appearance, purpose }) => hasIcon && !hasLabel && appearance === "borderless" && css2`
841
858
  &:hover {
@@ -862,10 +879,10 @@ var ButtonWrapper = styled5.button`
862
879
  ${({ fullWidth, hasIcon, hasLabel, isLoading, iconPosition }) => fullWidth && (!hasIcon || !hasLabel || isLoading ? css2`
863
880
  justify-content: center;
864
881
  ` : hasIcon && hasLabel && iconPosition === "left" ? css2`
865
- justify-content: left;
866
- ` : css2`
867
- justify-content: space-between;
868
- `)}
882
+ justify-content: left;
883
+ ` : css2`
884
+ justify-content: space-between;
885
+ `)}
869
886
 
870
887
  &:focus-visible, &.focus-visible {
871
888
  ${focusVisible}
@@ -875,7 +892,18 @@ var ButtonWrapper = styled5.button`
875
892
  ${selection}
876
893
  }
877
894
  `;
878
- var StyledIconWrapperSpan = styled5.span`
895
+ var StyledIconWrapperSpan = styled5.span.withConfig({
896
+ shouldForwardProp: (prop) => {
897
+ const styleOnlyProps = [
898
+ "iconPosition",
899
+ "size",
900
+ "absolutePosition",
901
+ "isHidden",
902
+ "justIcon"
903
+ ];
904
+ return !styleOnlyProps.some((styleProp) => styleProp === prop);
905
+ }
906
+ })`
879
907
  display: flex;
880
908
  align-items: center;
881
909
  justify-content: center;
@@ -890,7 +918,9 @@ var StyledIconWrapperSpan = styled5.span`
890
918
  width: ${sizes2[size].justIcon.wrapper.width};
891
919
  `}
892
920
  `;
893
- var Label = styled5.span`
921
+ var Label = styled5.span.withConfig({
922
+ shouldForwardProp: (prop) => prop !== "isHidden"
923
+ })`
894
924
  ${({ isHidden }) => isHidden && css2`
895
925
  visibility: hidden;
896
926
  `}
@@ -1087,7 +1117,7 @@ var Scrollbar = (props) => {
1087
1117
  }
1088
1118
  const handleTrackClick = useCallback(
1089
1119
  (e) => {
1090
- if (contentRef && contentRef.current) {
1120
+ if (contentRef == null ? void 0 : contentRef.current) {
1091
1121
  const { current: trackCurrent } = trackRef;
1092
1122
  const { current: contentCurrent } = contentRef;
1093
1123
  if (trackCurrent && contentCurrent) {
@@ -1120,7 +1150,7 @@ var Scrollbar = (props) => {
1120
1150
  setThumbTop(newTop);
1121
1151
  }, []);
1122
1152
  useEffect(() => {
1123
- if (contentRef && contentRef.current && trackRef.current) {
1153
+ if ((contentRef == null ? void 0 : contentRef.current) && trackRef.current) {
1124
1154
  const ref = contentRef.current;
1125
1155
  const { clientHeight } = trackRef.current;
1126
1156
  observer.current = new ResizeObserver(() => {
@@ -1137,7 +1167,7 @@ var Scrollbar = (props) => {
1137
1167
  }, []);
1138
1168
  const handleThumbMousedown = useCallback((e) => {
1139
1169
  setScrollStartPosition(e.clientY);
1140
- if (contentRef && contentRef.current)
1170
+ if (contentRef == null ? void 0 : contentRef.current)
1141
1171
  setInitialScrollTop(contentRef.current.scrollTop);
1142
1172
  setIsDragging(true);
1143
1173
  }, []);
@@ -1148,7 +1178,7 @@ var Scrollbar = (props) => {
1148
1178
  }, [isDragging]);
1149
1179
  const handleThumbMousemove = useCallback(
1150
1180
  (e) => {
1151
- if (contentRef && contentRef.current) {
1181
+ if (contentRef == null ? void 0 : contentRef.current) {
1152
1182
  if (isDragging) {
1153
1183
  const {
1154
1184
  scrollHeight: contentScrollHeight,
@@ -1218,7 +1248,7 @@ var StyledScrollableContainer = styled7.div`
1218
1248
  padding: ${outerContainer2.padding};
1219
1249
  `;
1220
1250
  var Content = styled7.div`
1221
- height: ${({ height }) => height};
1251
+ height: ${({ $height }) => $height};
1222
1252
  overflow: auto;
1223
1253
  scrollbar-width: none;
1224
1254
  ::-webkit-scrollbar {
@@ -1249,7 +1279,7 @@ var ScrollableContainer = (props) => {
1249
1279
  {
1250
1280
  ...getBaseHTMLProps5(id, className, htmlProps, rest),
1251
1281
  children: [
1252
- /* @__PURE__ */ jsx8(Content, { height: contentHeight, ref, tabIndex: 0, children }),
1282
+ /* @__PURE__ */ jsx8(Content, { $height: contentHeight, ref, tabIndex: 0, children }),
1253
1283
  /* @__PURE__ */ jsx8(Scrollbar, { contentRef: ref })
1254
1284
  ]
1255
1285
  }
@@ -1505,7 +1535,7 @@ var Container = styled9.div`
1505
1535
  overflow-y: auto;
1506
1536
  min-width: 180px;
1507
1537
  max-width: 300px;
1508
- ${({ isOpen }) => visibilityTransition(isOpen)}
1538
+ ${({ $isOpen }) => visibilityTransition($isOpen)}
1509
1539
  border: ${container2.border};
1510
1540
  background-color: ${container2.backgroundColor};
1511
1541
  border-radius: ${container2.borderRadius};
@@ -1580,17 +1610,14 @@ var OverflowMenu = forwardRef4(
1580
1610
  const interactiveItems = [];
1581
1611
  const hasContextItems = !!items && items.length > 0;
1582
1612
  const hasNavItems = !!navItems && navItems.length > 0;
1583
- const { name: username, ...userPropsRest } = userProps || {};
1613
+ const { name: username, ...userPropsRest } = userProps != null ? userProps : {};
1584
1614
  const hasStaticUser = username && userProps && !userProps.href && !userProps.onClick;
1585
1615
  const hasInteractiveUser = username && userProps && (!!userProps.href || !!userProps.onClick);
1586
1616
  hasInteractiveUser && interactiveItems.push({ title: username, ...userPropsRest });
1587
1617
  hasNavItems && interactiveItems.push(...navItems);
1588
1618
  hasContextItems && interactiveItems.push(...items);
1589
1619
  const hasInteractiveItems = interactiveItems.length > 0;
1590
- const [focus, setFocus] = useRoveFocus(
1591
- interactiveItems && interactiveItems.length,
1592
- !isOpen
1593
- );
1620
+ const [focus, setFocus] = useRoveFocus(interactiveItems == null ? void 0 : interactiveItems.length, !isOpen);
1594
1621
  const interactiveItemsList = hasInteractiveItems ? interactiveItems.map((item, index) => /* @__PURE__ */ jsx10("li", { children: /* @__PURE__ */ jsx10(
1595
1622
  OverflowMenuItem,
1596
1623
  {
@@ -1632,7 +1659,7 @@ var OverflowMenu = forwardRef4(
1632
1659
  ...getBaseHTMLProps7(id, className, restHTMLProps, rest),
1633
1660
  ref: combinedRef,
1634
1661
  id: id != null ? id : `${generatedId}-overflowMenu`,
1635
- isOpen,
1662
+ $isOpen: isOpen,
1636
1663
  style: { ...style, ...styles.floating },
1637
1664
  "aria-hidden": !isOpen,
1638
1665
  role: "menu"
@@ -1735,7 +1762,9 @@ var IconButtonText = styled10.span`
1735
1762
  display: none; // Ikke vis tekst på mobil
1736
1763
  width: 0;
1737
1764
  `;
1738
- var Bar = styled10.div`
1765
+ var Bar = styled10.div.withConfig({
1766
+ shouldForwardProp: (prop) => prop !== "environmentBannerActive"
1767
+ })`
1739
1768
  display: flex;
1740
1769
  align-items: center;
1741
1770
  justify-content: space-between;
@@ -1820,7 +1849,9 @@ var TopBar = ({
1820
1849
  import { ENVIRONMENT_BANNER_HEIGHT as ENVIRONMENT_BANNER_HEIGHT2 } from "@norges-domstoler/development-utils";
1821
1850
  import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
1822
1851
  var { navigation: navTokens4 } = appShellTokens;
1823
- var Sidebar = styled11.div`
1852
+ var Sidebar = styled11.div.withConfig({
1853
+ shouldForwardProp: (prop) => prop !== "isOpen" && prop !== "environmentBannerActive"
1854
+ })`
1824
1855
  display: flex;
1825
1856
  flex-direction: column;
1826
1857
  height: calc(100vh - ${navTokens4.topBar.height});
@@ -1837,7 +1868,9 @@ var Sidebar = styled11.div`
1837
1868
  bottom: 0;
1838
1869
  z-index: 100;
1839
1870
 
1840
- transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
1871
+ transition:
1872
+ transform 0.2s ease-in-out,
1873
+ opacity 0.2s ease-in-out;
1841
1874
  transform: translateX(${({ isOpen }) => isOpen ? "0" : "-100%"});
1842
1875
  opacity: ${({ isOpen }) => isOpen ? "1" : "0"};
1843
1876
 
@@ -1964,7 +1997,9 @@ var AppShellContainer = styled12.div`
1964
1997
  flex-direction: row;
1965
1998
  }
1966
1999
  `;
1967
- var MainContent = styled12.main`
2000
+ var MainContent = styled12.main.withConfig({
2001
+ shouldForwardProp: (prop) => prop !== "environmentBannerActive"
2002
+ })`
1968
2003
  min-height: calc(100vh - ${appShellTokens.navigation.topBar.height});
1969
2004
  margin-top: ${({ environmentBannerActive }) => environmentBannerActive ? `calc(${ENVIRONMENT_BANNER_HEIGHT3} + ${appShellTokens.navigation.topBar.height})` : appShellTokens.navigation.topBar.height};
1970
2005
  @media (min-width: ${appShellTokens.navigation.mobile.breakpoint}) {
@@ -2153,7 +2188,7 @@ var CustomSelectionControl = styled13.span`
2153
2188
  border-radius: ${selectionControl2.base.borderRadius};
2154
2189
  height: ${selectionControl2.base.height};
2155
2190
  width: ${selectionControl2.base.width};
2156
- ${({ controlType }) => controlType === "radio" && css4`
2191
+ ${({ $controlType }) => $controlType === "radio" && css4`
2157
2192
  border-radius: 50%;
2158
2193
  `}
2159
2194
  &:after {
@@ -2170,7 +2205,7 @@ var Container2 = styled13.label`
2170
2205
  user-select: none;
2171
2206
  width: fit-content;
2172
2207
  color: ${container4.color};
2173
- ${({ hasLabel }) => hasLabel ? css4`
2208
+ ${({ $hasLabel }) => $hasLabel ? css4`
2174
2209
  padding-left: ${container4.withLabel.paddingLeft};
2175
2210
  ` : css4`
2176
2211
  padding: ${container4.noLabel.padding};
@@ -2178,7 +2213,10 @@ var Container2 = styled13.label`
2178
2213
 
2179
2214
  input ~ ${CustomSelectionControl} {
2180
2215
  @media (prefers-reduced-motion: no-preference) {
2181
- transition: box-shadow 0.2s, background-color 0.2s, border 0.2s;
2216
+ transition:
2217
+ box-shadow 0.2s,
2218
+ background-color 0.2s,
2219
+ border 0.2s;
2182
2220
  }
2183
2221
  }
2184
2222
 
@@ -2213,7 +2251,7 @@ var Container2 = styled13.label`
2213
2251
  border-color: ${selectionControl2.checked.hover.borderColor};
2214
2252
  }
2215
2253
 
2216
- ${({ error }) => error && css4`
2254
+ ${({ $error }) => $error && css4`
2217
2255
  &:hover input:enabled ~ ${CustomSelectionControl} {
2218
2256
  background-color: ${selectionControl2.hover.danger.backgroundColor};
2219
2257
  box-shadow: ${selectionControl2.hover.danger.boxShadow};
@@ -2251,7 +2289,7 @@ var Container2 = styled13.label`
2251
2289
  cursor: not-allowed;
2252
2290
  color: ${container4.disabled.color};
2253
2291
  `}
2254
- ${({ controlType }) => controlType === "checkbox" ? css4`
2292
+ ${({ $controlType }) => $controlType === "checkbox" ? css4`
2255
2293
  ${CustomSelectionControl}:after {
2256
2294
  border: solid ${checkmark2.checkbox.borderColor};
2257
2295
 
@@ -2288,9 +2326,9 @@ var OuterGroupContainer = styled13.div`
2288
2326
  `;
2289
2327
  var GroupContainer = styled13.div`
2290
2328
  display: flex;
2291
- ${({ direction }) => css4`
2292
- flex-direction: ${direction};
2293
- gap: ${groupContainer2[direction].gap};
2329
+ ${({ $direction }) => css4`
2330
+ flex-direction: ${$direction};
2331
+ gap: ${groupContainer2[$direction].gap};
2294
2332
  `}
2295
2333
  `;
2296
2334
 
@@ -2311,13 +2349,13 @@ var RadioButton = forwardRef5(
2311
2349
  id,
2312
2350
  name,
2313
2351
  label: label3,
2314
- disabled,
2315
- readOnly,
2316
- error,
2352
+ disabled = false,
2353
+ readOnly = false,
2354
+ error = false,
2317
2355
  checked,
2318
2356
  value,
2319
2357
  children,
2320
- required,
2358
+ required = false,
2321
2359
  onChange,
2322
2360
  "aria-describedby": ariaDescribedby,
2323
2361
  className,
@@ -2346,29 +2384,32 @@ var RadioButton = forwardRef5(
2346
2384
  ...getBaseHTMLProps8(uniqueId, restHtmlProps, rest),
2347
2385
  type: "radio",
2348
2386
  name: name != null ? name : radioButtonGroup == null ? void 0 : radioButtonGroup.name,
2349
- disabled: disabled || readOnly || (radioButtonGroup == null ? void 0 : radioButtonGroup.disabled) || (radioButtonGroup == null ? void 0 : radioButtonGroup.readOnly),
2350
- required: required || (radioButtonGroup == null ? void 0 : radioButtonGroup.required),
2387
+ disabled: disabled || readOnly || !!(radioButtonGroup == null ? void 0 : radioButtonGroup.disabled) || !!(radioButtonGroup == null ? void 0 : radioButtonGroup.readOnly),
2388
+ required: required || !!(radioButtonGroup == null ? void 0 : radioButtonGroup.required),
2351
2389
  checked: typeof checked !== "undefined" ? checked : isValueEqualToGroupValueOrFalsy(value, radioButtonGroup),
2352
2390
  onChange: handleChange,
2353
2391
  value,
2354
2392
  "aria-describedby": describedByIds.length > 0 ? describedByIds.join(" ") : void 0,
2355
2393
  "aria-invalid": error || (radioButtonGroup == null ? void 0 : radioButtonGroup.error) ? true : void 0
2356
2394
  };
2357
- const containerProps = {
2358
- error: error || (radioButtonGroup == null ? void 0 : radioButtonGroup.error),
2359
- disabled: disabled || (radioButtonGroup == null ? void 0 : radioButtonGroup.disabled),
2360
- readOnly: readOnly || (radioButtonGroup == null ? void 0 : radioButtonGroup.readOnly),
2361
- style,
2362
- className: joinClassNames(className, htmlPropsClassName),
2363
- htmlFor: uniqueId,
2364
- controlType: "radio",
2365
- hasLabel
2366
- };
2367
- return /* @__PURE__ */ jsxs11(Container2, { ...containerProps, htmlFor: uniqueId, controlType: "radio", children: [
2368
- /* @__PURE__ */ jsx15(HiddenInput, { ...inputProps, ref }),
2369
- /* @__PURE__ */ jsx15(CustomSelectionControl, { controlType: "radio" }),
2370
- /* @__PURE__ */ jsx15(Typography, { as: "span", children: children != null ? children : label3 })
2371
- ] });
2395
+ return /* @__PURE__ */ jsxs11(
2396
+ Container2,
2397
+ {
2398
+ $error: error || (radioButtonGroup == null ? void 0 : radioButtonGroup.error),
2399
+ disabled: disabled || (radioButtonGroup == null ? void 0 : radioButtonGroup.disabled),
2400
+ $readOnly: readOnly || (radioButtonGroup == null ? void 0 : radioButtonGroup.readOnly),
2401
+ style,
2402
+ className: joinClassNames(className, htmlPropsClassName),
2403
+ $hasLabel: hasLabel,
2404
+ htmlFor: uniqueId,
2405
+ $controlType: "radio",
2406
+ children: [
2407
+ /* @__PURE__ */ jsx15(HiddenInput, { ...inputProps, ref }),
2408
+ /* @__PURE__ */ jsx15(CustomSelectionControl, { $controlType: "radio" }),
2409
+ /* @__PURE__ */ jsx15(Typography, { as: "span", children: children != null ? children : label3 })
2410
+ ]
2411
+ }
2412
+ );
2372
2413
  }
2373
2414
  );
2374
2415
  RadioButton.displayName = "RadioButton";
@@ -2420,7 +2461,9 @@ import {
2420
2461
  } from "@norges-domstoler/dds-core";
2421
2462
  import { ErrorIcon } from "@norges-domstoler/dds-icons";
2422
2463
  import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
2423
- var InputMessageWrapper = styled14.div`
2464
+ var InputMessageWrapper = styled14.div.withConfig({
2465
+ shouldForwardProp: (prop) => prop !== "messageType"
2466
+ })`
2424
2467
  display: flex;
2425
2468
  width: fit-content;
2426
2469
  word-break: break-word;
@@ -2484,19 +2527,19 @@ var RadioButtonGroupInner = (props, ref) => {
2484
2527
  groupId,
2485
2528
  errorMessage,
2486
2529
  tip,
2487
- disabled,
2488
- readOnly,
2530
+ disabled = false,
2531
+ readOnly = false,
2489
2532
  direction = "row",
2490
2533
  value,
2491
2534
  children,
2492
- required,
2535
+ required = false,
2493
2536
  onChange,
2494
2537
  id,
2495
2538
  className,
2496
2539
  htmlProps = {},
2497
2540
  ...rest
2498
2541
  } = props;
2499
- const { "aria-required": ariaRequired } = htmlProps;
2542
+ const { "aria-required": ariaRequired = false } = htmlProps;
2500
2543
  const [groupValue, setGroupValue] = useState4(value);
2501
2544
  const generatedId = useId5();
2502
2545
  const uniqueGroupId = groupId != null ? groupId : `${generatedId}-radioButtonGroup`;
@@ -2547,7 +2590,7 @@ var RadioButtonGroupInner = (props, ref) => {
2547
2590
  GroupContainer,
2548
2591
  {
2549
2592
  role: "radiogroup",
2550
- direction,
2593
+ $direction: direction,
2551
2594
  "aria-labelledby": uniqueGroupId,
2552
2595
  "aria-describedby": tipId,
2553
2596
  "aria-errormessage": errorMessageId,
@@ -2587,7 +2630,7 @@ var Checkbox = forwardRef8(
2587
2630
  id,
2588
2631
  name,
2589
2632
  label: label3,
2590
- error,
2633
+ error = false,
2591
2634
  disabled,
2592
2635
  readOnly,
2593
2636
  indeterminate,
@@ -2605,43 +2648,42 @@ var Checkbox = forwardRef8(
2605
2648
  className: htmlPropsClassName,
2606
2649
  ...restHtmlProps
2607
2650
  } = htmlProps;
2608
- const containerProps = {
2609
- error: error || (checkboxGroup == null ? void 0 : checkboxGroup.error),
2610
- disabled,
2611
- indeterminate,
2612
- htmlFor: uniqueId,
2613
- hasLabel,
2614
- className: joinClassNames2(className, htmlPropsClassName),
2615
- style
2616
- };
2617
- const inputProps = {
2618
- ...getBaseHTMLProps11(uniqueId, restHtmlProps, rest),
2619
- ref,
2620
- name,
2621
- indeterminate,
2622
- disabled,
2623
- "aria-describedby": spaceSeparatedIdListGenerator([
2624
- checkboxGroup == null ? void 0 : checkboxGroup.tipId,
2625
- checkboxGroup == null ? void 0 : checkboxGroup.errorMessageId,
2626
- ariaDescribedby
2627
- ]),
2628
- "aria-invalid": error || (checkboxGroup == null ? void 0 : checkboxGroup.error) ? true : void 0,
2629
- "aria-labelledby": checkboxGroup == null ? void 0 : checkboxGroup.uniqueGroupId,
2630
- "aria-checked": indeterminate ? "mixed" : void 0,
2631
- "aria-readonly": readOnly
2632
- };
2633
- return /* @__PURE__ */ jsxs15(Container2, { ...containerProps, controlType: "checkbox", children: [
2634
- /* @__PURE__ */ jsx19(
2635
- HiddenInput2,
2636
- {
2637
- ...inputProps,
2638
- type: "checkbox",
2639
- "data-indeterminate": indeterminate
2640
- }
2641
- ),
2642
- /* @__PURE__ */ jsx19(CustomSelectionControl, { controlType: "checkbox" }),
2643
- hasLabel && /* @__PURE__ */ jsx19(Typography4, { color: "inherit", as: "span", typographyType: "bodySans02", children: label3 })
2644
- ] });
2651
+ return /* @__PURE__ */ jsxs15(
2652
+ Container2,
2653
+ {
2654
+ $error: error || (checkboxGroup == null ? void 0 : checkboxGroup.error),
2655
+ disabled,
2656
+ htmlFor: uniqueId,
2657
+ $hasLabel: hasLabel,
2658
+ $controlType: "checkbox",
2659
+ className: joinClassNames2(className, htmlPropsClassName),
2660
+ style,
2661
+ children: [
2662
+ /* @__PURE__ */ jsx19(
2663
+ HiddenInput2,
2664
+ {
2665
+ ...getBaseHTMLProps11(uniqueId, restHtmlProps, rest),
2666
+ ref,
2667
+ name,
2668
+ disabled,
2669
+ "aria-describedby": spaceSeparatedIdListGenerator([
2670
+ checkboxGroup == null ? void 0 : checkboxGroup.tipId,
2671
+ checkboxGroup == null ? void 0 : checkboxGroup.errorMessageId,
2672
+ ariaDescribedby
2673
+ ]),
2674
+ "aria-invalid": error || (checkboxGroup == null ? void 0 : checkboxGroup.error) ? true : void 0,
2675
+ "aria-labelledby": checkboxGroup == null ? void 0 : checkboxGroup.uniqueGroupId,
2676
+ "aria-checked": indeterminate ? "mixed" : void 0,
2677
+ "aria-readonly": readOnly,
2678
+ type: "checkbox",
2679
+ "data-indeterminate": indeterminate
2680
+ }
2681
+ ),
2682
+ /* @__PURE__ */ jsx19(CustomSelectionControl, { $controlType: "checkbox" }),
2683
+ hasLabel && /* @__PURE__ */ jsx19(Typography4, { color: "inherit", as: "span", typographyType: "bodySans02", children: label3 })
2684
+ ]
2685
+ }
2686
+ );
2645
2687
  }
2646
2688
  );
2647
2689
  Checkbox.displayName = "Checkbox";
@@ -2661,7 +2703,7 @@ var CheckboxGroup = (props) => {
2661
2703
  direction = "row",
2662
2704
  errorMessage,
2663
2705
  tip,
2664
- required,
2706
+ required = false,
2665
2707
  groupId,
2666
2708
  children,
2667
2709
  id,
@@ -2712,7 +2754,7 @@ var CheckboxGroup = (props) => {
2712
2754
  role: "group",
2713
2755
  "aria-labelledby": uniqueGroupId,
2714
2756
  "aria-describedby": tip ? tipId : void 0,
2715
- direction,
2757
+ $direction: direction,
2716
2758
  children
2717
2759
  }
2718
2760
  ) }),
@@ -2849,8 +2891,8 @@ var MessageContainer = styled16.div`
2849
2891
  var StyledIcon = styled16(Icon5)`
2850
2892
  position: absolute;
2851
2893
  color: ${icon3.color};
2852
- ${({ size, iconSize }) => css6`
2853
- left: ${icon3.sizes[size].left};
2894
+ ${({ $size, iconSize }) => css6`
2895
+ left: ${icon3.sizes[$size].left};
2854
2896
  ${iconSize === "small" ? css6`
2855
2897
  top: ${`calc(50% - ${iconSizes2.DdsIconsizeSmallNumberPx / 2}px)`};
2856
2898
  ` : css6`
@@ -2860,7 +2902,7 @@ var StyledIcon = styled16(Icon5)`
2860
2902
  z-index: 1;
2861
2903
  `;
2862
2904
  var StyledInput = styled16(StatefulInput)`
2863
- ${({ componentSize, hasIcon }) => hasIcon && componentSize && css6`
2905
+ ${({ componentSize, $hasIcon }) => $hasIcon && componentSize && css6`
2864
2906
  padding-left: ${input2.withIcon[componentSize].paddingLeft};
2865
2907
  `}
2866
2908
  `;
@@ -2965,7 +3007,7 @@ var TextInput = forwardRef9(
2965
3007
  const hasLabel = !!label3;
2966
3008
  const hasMessage = hasErrorMessage || hasTip || !!maxLength;
2967
3009
  const hasIcon = !!icon12;
2968
- const hasAffix = !!(prefix2 || suffix);
3010
+ const hasAffix = !!(prefix2 != null ? prefix2 : suffix);
2969
3011
  const characterCounterId = derivativeIdGenerator2(
2970
3012
  uniqueId,
2971
3013
  "characterCounter"
@@ -2974,7 +3016,6 @@ var TextInput = forwardRef9(
2974
3016
  const errorMessageId = derivativeIdGenerator2(uniqueId, "errorMessage");
2975
3017
  const generalInputProps = {
2976
3018
  id: uniqueId,
2977
- errorMessage,
2978
3019
  hasErrorMessage,
2979
3020
  required,
2980
3021
  disabled,
@@ -3007,7 +3048,7 @@ var TextInput = forwardRef9(
3007
3048
  {
3008
3049
  icon: icon12,
3009
3050
  iconSize: getFormInputIconSize(componentSize),
3010
- size: componentSize
3051
+ $size: componentSize
3011
3052
  }
3012
3053
  ),
3013
3054
  /* @__PURE__ */ jsx21(
@@ -3017,7 +3058,7 @@ var TextInput = forwardRef9(
3017
3058
  onChange: onChangeHandler,
3018
3059
  type,
3019
3060
  componentSize,
3020
- hasIcon,
3061
+ $hasIcon: hasIcon,
3021
3062
  ...generalInputProps
3022
3063
  }
3023
3064
  )
@@ -3291,30 +3332,30 @@ function getContainerControlPadding(componentSize, isMulti) {
3291
3332
  }
3292
3333
  var Container3 = styled18.div`
3293
3334
  margin: 0;
3294
- width: ${({ width }) => width};
3335
+ width: ${({ $width }) => $width};
3295
3336
  position: relative;
3296
3337
 
3297
3338
  *::selection {
3298
3339
  ${selection3}
3299
3340
  }
3300
3341
 
3301
- ${({ componentSize, isMulti }) => css8`
3342
+ ${({ $componentSize, $isMulti }) => css8`
3302
3343
  .${prefix}__control {
3303
- padding: ${getContainerControlPadding(componentSize, isMulti)};
3304
- ${getFontStyling3(typographyTypes2.control[componentSize], true)}
3344
+ padding: ${getContainerControlPadding($componentSize, $isMulti)};
3345
+ ${getFontStyling3(typographyTypes2.control[$componentSize], true)}
3305
3346
  }
3306
3347
  .${prefix}__option {
3307
- ${getFontStyling3(typographyTypes2.option[componentSize], true)}
3348
+ ${getFontStyling3(typographyTypes2.option[$componentSize], true)}
3308
3349
  }
3309
3350
  .${prefix}__placeholder {
3310
- ${getFontStyling3(typographyTypes2.placeholder[componentSize])}
3351
+ ${getFontStyling3(typographyTypes2.placeholder[$componentSize])}
3311
3352
  }
3312
3353
  .${prefix}__menu-notice--no-options {
3313
- ${getFontStyling3(typographyTypes2.noOptionsMessage[componentSize])}
3354
+ ${getFontStyling3(typographyTypes2.noOptionsMessage[$componentSize])}
3314
3355
  }
3315
3356
  `}
3316
3357
 
3317
- ${({ errorMessage }) => errorMessage && css8`
3358
+ ${({ $errorMessage }) => $errorMessage && css8`
3318
3359
  .${prefix}__control {
3319
3360
  ${dangerInputfield2}
3320
3361
  }
@@ -3333,7 +3374,7 @@ var Container3 = styled18.div`
3333
3374
  color: ${dropdownIndicator2.hover.color};
3334
3375
  }
3335
3376
 
3336
- ${({ isDisabled, readOnly }) => readOnly ? css8`
3377
+ ${({ $isDisabled, $readOnly }) => $readOnly ? css8`
3337
3378
  .${prefix}__control {
3338
3379
  border-color: ${control2.readOnly.borderColor};
3339
3380
  background-color: ${control2.readOnly.backgroundColor};
@@ -3343,16 +3384,16 @@ var Container3 = styled18.div`
3343
3384
  .${prefix}__dropdown-indicator {
3344
3385
  color: ${dropdownIndicator2.readOnly.color};
3345
3386
  }
3346
- ` : isDisabled ? css8`
3347
- cursor: not-allowed;
3348
- .${prefix}__control {
3349
- border-color: ${control2.disabled.borderColor};
3350
- background-color: ${control2.disabled.backgroundColor};
3351
- }
3352
- &:hover .${prefix}__dropdown-indicator {
3353
- color: ${dropdownIndicator2.base.color};
3354
- }
3355
- ` : ""}
3387
+ ` : $isDisabled ? css8`
3388
+ cursor: not-allowed;
3389
+ .${prefix}__control {
3390
+ border-color: ${control2.disabled.borderColor};
3391
+ background-color: ${control2.disabled.backgroundColor};
3392
+ }
3393
+ &:hover .${prefix}__dropdown-indicator {
3394
+ color: ${dropdownIndicator2.base.color};
3395
+ }
3396
+ ` : ""}
3356
3397
  `;
3357
3398
  var InnerSingleValue = styled18.div`
3358
3399
  overflow: hidden;
@@ -3591,12 +3632,12 @@ var SelectInner = (props, ref) => {
3591
3632
  const tipId = derivativeIdGenerator3(uniqueId, "tip");
3592
3633
  const errorMessageId = derivativeIdGenerator3(uniqueId, "errorMessage");
3593
3634
  const containerProps = {
3594
- width,
3595
- componentSize,
3596
- errorMessage,
3597
- isDisabled,
3598
- readOnly,
3599
- isMulti,
3635
+ $width: width,
3636
+ $componentSize: componentSize,
3637
+ $errorMessage: errorMessage,
3638
+ $isDisabled: isDisabled,
3639
+ $readOnly: readOnly,
3640
+ $isMulti: isMulti,
3600
3641
  className,
3601
3642
  style
3602
3643
  };
@@ -3604,6 +3645,7 @@ var SelectInner = (props, ref) => {
3604
3645
  options,
3605
3646
  value,
3606
3647
  defaultValue,
3648
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
3607
3649
  isDisabled: isDisabled || readOnly,
3608
3650
  isClearable,
3609
3651
  placeholder: getPlaceholder(placeholder3, isMulti),
@@ -3732,10 +3774,10 @@ var Container4 = styled19.div`
3732
3774
  padding: ${container6.padding};
3733
3775
  border-bottom: ${container6.borderBottom};
3734
3776
  ${getFontStyling4(typographyType2, true)}
3735
- ${({ purpose }) => purpose && css9`
3736
- border-color: ${container6[purpose].borderColor};
3737
- background-color: ${container6[purpose].backgroundColor};
3738
- `}
3777
+ ${({ $purpose }) => css9`
3778
+ border-color: ${container6[$purpose].borderColor};
3779
+ background-color: ${container6[$purpose].backgroundColor};
3780
+ `}
3739
3781
  `;
3740
3782
  var MessageIconWrapper = styled19(Icon8)`
3741
3783
  margin-right: ${icon6.marginRight};
@@ -3749,7 +3791,7 @@ var ContentContainer = styled19.div`
3749
3791
  align-items: center;
3750
3792
  padding-top: ${contentContainer2.paddingTop};
3751
3793
  padding-bottom: ${contentContainer2.paddingBottom};
3752
- padding-right: ${({ closable }) => closable ? contentContainer2.withClosable.paddingRight : contentContainer2.paddingRight};
3794
+ padding-right: ${({ $closable }) => $closable ? contentContainer2.withClosable.paddingRight : contentContainer2.paddingRight};
3753
3795
  `;
3754
3796
  var GlobalMessage = forwardRef10(
3755
3797
  (props, ref) => {
@@ -3765,37 +3807,40 @@ var GlobalMessage = forwardRef10(
3765
3807
  ...rest
3766
3808
  } = props;
3767
3809
  const [isClosed, setClosed] = useState6(false);
3768
- const containerProps = {
3769
- ...getBaseHTMLProps14(id, className, htmlProps, rest),
3770
- ref,
3771
- purpose
3772
- };
3773
- return !isClosed ? /* @__PURE__ */ jsxs20(Container4, { ...containerProps, children: [
3774
- /* @__PURE__ */ jsxs20(ContentContainer, { closable, children: [
3775
- /* @__PURE__ */ jsx23(
3776
- MessageIconWrapper,
3777
- {
3778
- icon: purposeVariants[purpose].icon,
3779
- color: icon6[purpose].color
3780
- }
3781
- ),
3782
- children != null ? children : /* @__PURE__ */ jsx23(Typography7, { as: "span", children: message2 })
3783
- ] }),
3784
- /* @__PURE__ */ jsx23(ControlsContainer, { children: closable && /* @__PURE__ */ jsx23(
3785
- Button,
3786
- {
3787
- icon: CloseIcon2,
3788
- purpose: purposeVariants[purpose].closeButtonPurpose,
3789
- appearance: "borderless",
3790
- onClick: () => {
3791
- setClosed(true);
3792
- onClose && onClose();
3793
- },
3794
- size: "small",
3795
- "aria-label": "Lukk melding"
3796
- }
3797
- ) })
3798
- ] }) : null;
3810
+ return !isClosed ? /* @__PURE__ */ jsxs20(
3811
+ Container4,
3812
+ {
3813
+ ref,
3814
+ $purpose: purpose,
3815
+ ...getBaseHTMLProps14(id, className, htmlProps, rest),
3816
+ children: [
3817
+ /* @__PURE__ */ jsxs20(ContentContainer, { $closable: closable, children: [
3818
+ /* @__PURE__ */ jsx23(
3819
+ MessageIconWrapper,
3820
+ {
3821
+ icon: purposeVariants[purpose].icon,
3822
+ color: icon6[purpose].color
3823
+ }
3824
+ ),
3825
+ children != null ? children : /* @__PURE__ */ jsx23(Typography7, { as: "span", children: message2 })
3826
+ ] }),
3827
+ /* @__PURE__ */ jsx23(ControlsContainer, { children: closable && /* @__PURE__ */ jsx23(
3828
+ Button,
3829
+ {
3830
+ icon: CloseIcon2,
3831
+ purpose: purposeVariants[purpose].closeButtonPurpose,
3832
+ appearance: "borderless",
3833
+ onClick: () => {
3834
+ setClosed(true);
3835
+ onClose && onClose();
3836
+ },
3837
+ size: "small",
3838
+ "aria-label": "Lukk melding"
3839
+ }
3840
+ ) })
3841
+ ]
3842
+ }
3843
+ ) : null;
3799
3844
  }
3800
3845
  );
3801
3846
  GlobalMessage.displayName = "GlobalMessage";
@@ -3917,7 +3962,17 @@ import { CloseIcon as CloseIcon3 } from "@norges-domstoler/dds-icons";
3917
3962
  import { Fragment as Fragment5, jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
3918
3963
  var defaultWidth3 = "400px";
3919
3964
  var { container: container8, icon: icon8, purposeVariants: purposeVariants3 } = localMessageTokens;
3920
- var Container5 = styled20.div`
3965
+ var Container5 = styled20.div.withConfig({
3966
+ shouldForwardProp: (prop) => {
3967
+ const styleOnlyProps = [
3968
+ "layout",
3969
+ "closable",
3970
+ "purpose",
3971
+ "width"
3972
+ ];
3973
+ return !styleOnlyProps.some((styleProp) => styleProp === prop);
3974
+ }
3975
+ })`
3921
3976
  box-sizing: border-box;
3922
3977
  display: grid;
3923
3978
  grid-template-areas: ${({ layout, closable }) => getGridTemplateAreas(layout, closable)};
@@ -4211,7 +4266,7 @@ import { derivativeIdGenerator as derivativeIdGenerator4 } from "@norges-domstol
4211
4266
  import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
4212
4267
  var { suggestionsContainer: suggestionsContainer2, suggestionsHeader: suggestionsHeader2 } = searchTokens;
4213
4268
  var SuggestionsContainer = styled22(Paper)`
4214
- ${({ isHidden }) => visibilityTransition2(!isHidden)};
4269
+ ${({ $isHidden }) => visibilityTransition2(!$isHidden)};
4215
4270
  position: absolute;
4216
4271
  top: 100%;
4217
4272
  width: 100%;
@@ -4225,7 +4280,7 @@ var SuggestionsContainer = styled22(Paper)`
4225
4280
  ${scrollbarStyling.webkit}
4226
4281
  `;
4227
4282
  var MenuItem = styled22(OverflowMenuItem)`
4228
- ${({ size }) => getFontStyling6(typographyTypes3[size])}
4283
+ ${({ $size }) => $size && getFontStyling6(typographyTypes3[$size])}
4229
4284
  `;
4230
4285
  var SuggestionsList = styled22.ul`
4231
4286
  ${removeListStyling}
@@ -4250,10 +4305,7 @@ var SearchSuggestions = forwardRef12((props, ref) => {
4250
4305
  searchId,
4251
4306
  "suggestions-header"
4252
4307
  );
4253
- const [focus, setFocus] = useRoveFocus2(
4254
- suggestions && suggestions.length,
4255
- !showSuggestions
4256
- );
4308
+ const [focus, setFocus] = useRoveFocus2(suggestions == null ? void 0 : suggestions.length, !showSuggestions);
4257
4309
  const suggestionsToRender = maxSuggestions ? suggestions == null ? void 0 : suggestions.slice(maxSuggestions) : suggestions;
4258
4310
  const renderedSuggestions = /* @__PURE__ */ jsx26(SuggestionsList, { role: "listbox", "aria-labelledby": suggestionsHeaderId, children: suggestionsToRender.map((suggestion, index) => {
4259
4311
  return /* @__PURE__ */ jsx26("li", { role: "option", children: /* @__PURE__ */ jsx26(
@@ -4267,7 +4319,7 @@ var SearchSuggestions = forwardRef12((props, ref) => {
4267
4319
  title: suggestion,
4268
4320
  "aria-setsize": suggestionsToRender.length,
4269
4321
  "aria-posinset": index,
4270
- size: componentSize
4322
+ $size: componentSize
4271
4323
  }
4272
4324
  ) }, index);
4273
4325
  }) });
@@ -4277,7 +4329,7 @@ var SearchSuggestions = forwardRef12((props, ref) => {
4277
4329
  {
4278
4330
  ...getBaseHTMLProps17(id, className, htmlProps, rest),
4279
4331
  ref,
4280
- isHidden,
4332
+ $isHidden: isHidden,
4281
4333
  "aria-hidden": isHidden,
4282
4334
  children: [
4283
4335
  /* @__PURE__ */ jsx26(
@@ -4318,19 +4370,19 @@ var Input2 = styled23(BaseInput)`
4318
4370
  }
4319
4371
  padding-right: ${input4.base.paddingRight};
4320
4372
 
4321
- ${({ componentSize }) => css11`
4322
- padding-top: ${input4.sizes[componentSize].paddingTop};
4323
- padding-bottom: ${input4.sizes[componentSize].paddingBottom};
4324
- padding-left: ${input4.sizes[componentSize].paddingLeft};
4325
- ${getFontStyling7(typographyTypes3[componentSize])}
4326
- `}
4373
+ ${({ $componentSize }) => css11`
4374
+ padding-top: ${input4.sizes[$componentSize].paddingTop};
4375
+ padding-bottom: ${input4.sizes[$componentSize].paddingBottom};
4376
+ padding-left: ${input4.sizes[$componentSize].paddingLeft};
4377
+ ${getFontStyling7(typographyTypes3[$componentSize])}
4378
+ `}
4327
4379
  `;
4328
4380
  var StyledSearchIcon = styled23(Icon10)`
4329
4381
  position: absolute;
4330
4382
  left: ${searchIcon2.base.left};
4331
4383
  color: ${searchIcon2.base.color};
4332
- ${({ size }) => css11`
4333
- top: ${searchTokens.searchIcon[size].top};
4384
+ ${({ $size }) => css11`
4385
+ top: ${searchTokens.searchIcon[$size].top};
4334
4386
  `}
4335
4387
  z-index: 1;
4336
4388
  `;
@@ -4346,7 +4398,7 @@ var OuterContainer = styled23.div`
4346
4398
  gap: ${outerContainer4.gap};
4347
4399
  `;
4348
4400
  var HorisontalContainer = styled23.div`
4349
- ${(props) => props.hasSearchButton && css11`
4401
+ ${(props) => props.$hasSearchButton && css11`
4350
4402
  display: grid;
4351
4403
  grid-template-columns: 1fr auto;
4352
4404
  gap: ${horisontalContainer2.gap};
@@ -4371,6 +4423,7 @@ var Search = forwardRef13(
4371
4423
  "aria-describedby": ariaDescribedby,
4372
4424
  ...rest
4373
4425
  }, ref) => {
4426
+ var _a;
4374
4427
  const generatedId = useId11();
4375
4428
  const uniqueId = id != null ? id : `${generatedId}-searchInput`;
4376
4429
  const hasLabel = !!label3;
@@ -4392,31 +4445,11 @@ var Search = forwardRef13(
4392
4445
  const emptyChangeEvent = createEmptyChangeEvent(uniqueId);
4393
4446
  handleChange(emptyChangeEvent);
4394
4447
  };
4395
- const containerProps = {
4396
- className,
4397
- style
4398
- };
4399
- const inputProps = {
4400
- ...rest,
4401
- ref: combinedRef,
4402
- componentSize,
4403
- name,
4404
- type: "search",
4405
- id: uniqueId,
4406
- "aria-describedby": spaceSeparatedIdListGenerator4([
4407
- tip ? tipId : void 0,
4408
- context.suggestions ? suggestionsDescriptionId : void 0,
4409
- ariaDescribedby
4410
- ]),
4411
- value: context.inputValue !== void 0 ? context.inputValue : value,
4412
- onChange: handleChange,
4413
- autoComplete: "off"
4414
- };
4415
4448
  const {
4416
4449
  label: buttonLabel,
4417
4450
  onClick,
4418
4451
  ...otherButtonProps
4419
- } = buttonProps || {};
4452
+ } = buttonProps != null ? buttonProps : {};
4420
4453
  const hasSuggestions = !!context.suggestions;
4421
4454
  const showSearchButton = !!buttonProps && !!onClick;
4422
4455
  return /* @__PURE__ */ jsxs23(OuterContainer, { children: [
@@ -4425,22 +4458,36 @@ var Search = forwardRef13(
4425
4458
  /* @__PURE__ */ jsxs23(
4426
4459
  HorisontalContainer,
4427
4460
  {
4428
- hasSearchButton: showSearchButton,
4429
- ...containerProps,
4461
+ $hasSearchButton: showSearchButton,
4462
+ className,
4463
+ style,
4430
4464
  children: [
4431
4465
  /* @__PURE__ */ jsxs23(InputContainer2, { children: [
4432
4466
  /* @__PURE__ */ jsx27(
4433
4467
  StyledSearchIcon,
4434
4468
  {
4435
4469
  icon: SearchIcon,
4436
- size: componentSize,
4470
+ $size: componentSize,
4437
4471
  iconSize: getIconSize(componentSize)
4438
4472
  }
4439
4473
  ),
4440
4474
  /* @__PURE__ */ jsx27(
4441
4475
  Input2,
4442
4476
  {
4443
- ...inputProps,
4477
+ ...rest,
4478
+ ref: combinedRef,
4479
+ $componentSize: componentSize,
4480
+ name,
4481
+ type: "search",
4482
+ id: uniqueId,
4483
+ "aria-describedby": spaceSeparatedIdListGenerator4([
4484
+ tip ? tipId : void 0,
4485
+ context.suggestions ? suggestionsDescriptionId : void 0,
4486
+ ariaDescribedby
4487
+ ]),
4488
+ value: (_a = context.inputValue) != null ? _a : value,
4489
+ onChange: handleChange,
4490
+ autoComplete: "off",
4444
4491
  "aria-autocomplete": hasSuggestions ? "list" : void 0,
4445
4492
  "aria-controls": hasSuggestions ? suggestionsId : void 0,
4446
4493
  "aria-expanded": context.showSuggestions,
@@ -4480,7 +4527,7 @@ var Search = forwardRef13(
4480
4527
  size: componentSize,
4481
4528
  onClick,
4482
4529
  ...otherButtonProps,
4483
- children: buttonLabel || "S\xF8k"
4530
+ children: buttonLabel != null ? buttonLabel : "S\xF8k"
4484
4531
  }
4485
4532
  )
4486
4533
  ]
@@ -4512,7 +4559,7 @@ var SearchAutocompleteWrapper = (props) => {
4512
4559
  onSuggestionSelection,
4513
4560
  children
4514
4561
  } = props;
4515
- const [inputValue, setInputValue] = useState9(value || "");
4562
+ const [inputValue, setInputValue] = useState9(value != null ? value : "");
4516
4563
  const [suggestions, setSuggestions] = useState9([]);
4517
4564
  const [showSuggestions, setShowSuggestions] = useState9(false);
4518
4565
  const closeSuggestions = () => showSuggestions === true && setShowSuggestions(false);
@@ -4560,7 +4607,7 @@ var SearchAutocompleteWrapper = (props) => {
4560
4607
  closeSuggestions();
4561
4608
  };
4562
4609
  const handleSetInputValue = (value2) => {
4563
- setInputValue(value2 || "");
4610
+ setInputValue(value2 != null ? value2 : "");
4564
4611
  };
4565
4612
  const inputRef = useRef6(null);
4566
4613
  const suggestionsRef = useRef6(null);
@@ -4674,13 +4721,13 @@ var StyledTable = styled24.table`
4674
4721
  }
4675
4722
  ${scrollbarStyling.webkit}
4676
4723
  ${scrollbarStyling.firefox}
4677
- ${({ density }) => css12`
4678
- td,
4679
- th {
4680
- padding: ${cell2.density[density].padding};
4681
- }
4682
- `}
4683
- ${({ density }) => density === "extraCompact" && css12`
4724
+ ${({ $density }) => css12`
4725
+ td,
4726
+ th {
4727
+ padding: ${cell2.density[$density].padding};
4728
+ }
4729
+ `}
4730
+ ${({ $density }) => $density === "extraCompact" && css12`
4684
4731
  th {
4685
4732
  background-color: ${row2.head.extraCompact.backgroundColor};
4686
4733
  font-size: ${row2.head.extraCompact.fontSize};
@@ -4694,7 +4741,7 @@ var StyledTable = styled24.table`
4694
4741
  }
4695
4742
  }
4696
4743
  `}
4697
- ${({ stickyHeader }) => stickyHeader && css12`
4744
+ ${({ $stickyHeader }) => $stickyHeader && css12`
4698
4745
  tr[type='head'] {
4699
4746
  th[type='head'] {
4700
4747
  position: sticky;
@@ -4703,20 +4750,25 @@ var StyledTable = styled24.table`
4703
4750
  }
4704
4751
  }
4705
4752
  `}
4706
- ${({ withDividers }) => withDividers && css12`
4753
+ ${({ $withDividers }) => $withDividers && css12`
4707
4754
  tr[type='body'] {
4708
4755
  border-bottom: ${row2.body.withDividers.borderBottom};
4709
4756
  }
4710
4757
  `}
4711
4758
  `;
4712
4759
  var Table = forwardRef14(
4713
- ({ density = "normal", children, ...rest }, ref) => {
4714
- const tableProps = {
4715
- ref,
4716
- density,
4717
- ...rest
4718
- };
4719
- return /* @__PURE__ */ jsx29(StyledTable, { ...tableProps, children });
4760
+ ({ density = "normal", stickyHeader, withDividers, children, ...rest }, ref) => {
4761
+ return /* @__PURE__ */ jsx29(
4762
+ StyledTable,
4763
+ {
4764
+ ...rest,
4765
+ ref,
4766
+ $density: density,
4767
+ $stickyHeader: stickyHeader,
4768
+ $withDividers: withDividers,
4769
+ children
4770
+ }
4771
+ );
4720
4772
  }
4721
4773
  );
4722
4774
  Table.displayName = "Table";
@@ -4752,12 +4804,6 @@ var CollapsibleTable = forwardRef15((props, ref) => {
4752
4804
  definingColumnIndex = [0],
4753
4805
  ...rest
4754
4806
  } = props;
4755
- const tableProps = {
4756
- ref,
4757
- density,
4758
- isCollapsed,
4759
- ...rest
4760
- };
4761
4807
  return /* @__PURE__ */ jsx30(
4762
4808
  CollapsibleTableContext.Provider,
4763
4809
  {
@@ -4766,7 +4812,7 @@ var CollapsibleTable = forwardRef15((props, ref) => {
4766
4812
  headerValues,
4767
4813
  definingColumnIndex
4768
4814
  },
4769
- children: /* @__PURE__ */ jsx30(StyledTable2, { ...tableProps, children })
4815
+ children: /* @__PURE__ */ jsx30(StyledTable2, { ref, density, ...rest, children })
4770
4816
  }
4771
4817
  );
4772
4818
  });
@@ -4779,10 +4825,7 @@ import { jsx as jsx31 } from "react/jsx-runtime";
4779
4825
  var StyledHead = styled26.thead``;
4780
4826
  var Head = forwardRef16(
4781
4827
  ({ children, ...rest }, ref) => {
4782
- const headProps = {
4783
- ...rest
4784
- };
4785
- return /* @__PURE__ */ jsx31(StyledHead, { ref, ...headProps, children });
4828
+ return /* @__PURE__ */ jsx31(StyledHead, { ref, ...rest, children });
4786
4829
  }
4787
4830
  );
4788
4831
  Head.displayName = "Table.Head";
@@ -4809,10 +4852,7 @@ import { jsx as jsx33 } from "react/jsx-runtime";
4809
4852
  var StyledFoot = styled28.tfoot``;
4810
4853
  var Foot = forwardRef18(
4811
4854
  ({ children, ...rest }, ref) => {
4812
- const footProps = {
4813
- ...rest
4814
- };
4815
- return /* @__PURE__ */ jsx33(StyledFoot, { ref, ...footProps, children });
4855
+ return /* @__PURE__ */ jsx33(StyledFoot, { ref, ...rest, children });
4816
4856
  }
4817
4857
  );
4818
4858
  Foot.displayName = "Table.Foot";
@@ -4843,7 +4883,10 @@ var bodyRowStyles = (mode, selected) => {
4843
4883
  };
4844
4884
  var StyledRow = styled29.tr`
4845
4885
  @media (prefers-reduced-motion: no-preference) {
4846
- transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
4886
+ transition:
4887
+ background-color 0.2s,
4888
+ border-color 0.2s,
4889
+ box-shadow 0.2s;
4847
4890
  }
4848
4891
 
4849
4892
  ${getFontStyling8(defaultTypographyType2, true)}
@@ -4852,7 +4895,7 @@ var StyledRow = styled29.tr`
4852
4895
  font-weight: 600;
4853
4896
  text-align: left;
4854
4897
  `}
4855
- ${({ type, mode, selected, hoverable }) => type === "body" && css14`
4898
+ ${({ type, $mode: mode, $selected: selected, $hoverable: hoverable }) => type === "body" && css14`
4856
4899
  &:nth-of-type(even) {
4857
4900
  background-color: ${row3.body.even.backgroundColor};
4858
4901
  ${bodyRowStyles(mode, selected)}
@@ -4877,13 +4920,19 @@ var StyledRow = styled29.tr`
4877
4920
  // src/components/Table/Row.tsx
4878
4921
  import { jsx as jsx34 } from "react/jsx-runtime";
4879
4922
  var Row = forwardRef19(
4880
- ({ type = "body", mode = "normal", children, ...rest }, ref) => {
4881
- const rowProps = {
4882
- type,
4883
- mode,
4884
- ...rest
4885
- };
4886
- return /* @__PURE__ */ jsx34(StyledRow, { ref, ...rowProps, children });
4923
+ ({ type = "body", mode = "normal", hoverable, selected, children, ...rest }, ref) => {
4924
+ return /* @__PURE__ */ jsx34(
4925
+ StyledRow,
4926
+ {
4927
+ type,
4928
+ $mode: mode,
4929
+ $hoverable: hoverable,
4930
+ $selected: selected,
4931
+ ref,
4932
+ ...rest,
4933
+ children
4934
+ }
4935
+ );
4887
4936
  }
4888
4937
  );
4889
4938
  Row.displayName = "Table.Row";
@@ -4966,7 +5015,9 @@ var descriptionListTokens = {
4966
5015
  // src/components/DescriptionList/DescriptionList.tsx
4967
5016
  import { jsx as jsx35 } from "react/jsx-runtime";
4968
5017
  var { term: term2, desc: desc2, list: list2 } = descriptionListTokens;
4969
- var DList = styled30.dl`
5018
+ var DList = styled30.dl.withConfig({
5019
+ shouldForwardProp: (prop) => prop !== "appearance" && prop !== "direction"
5020
+ })`
4970
5021
  margin: 0;
4971
5022
  *::selection {
4972
5023
  ${selection6}
@@ -5123,14 +5174,14 @@ var getLayoutStyle = (layout) => {
5123
5174
  }
5124
5175
  };
5125
5176
  var StyledCell = styled34.td`
5126
- ${({ type }) => type === "head" && css16`
5177
+ ${({ $type: type }) => type === "head" && css16`
5127
5178
  background-color: ${cell3.head.backgroundColor};
5128
5179
  `}
5129
5180
  `;
5130
5181
  var InnerCell = styled34.div`
5131
5182
  display: flex;
5132
5183
  align-items: center;
5133
- ${({ layout }) => getLayoutStyle(layout)}
5184
+ ${({ $layout: layout }) => getLayoutStyle(layout)}
5134
5185
  `;
5135
5186
  var getTableCellType = (type) => {
5136
5187
  switch (type) {
@@ -5144,16 +5195,8 @@ var getTableCellType = (type) => {
5144
5195
  var Cell = forwardRef24(
5145
5196
  ({ children, type = "data", layout = "left", collapsibleProps, ...rest }, ref) => {
5146
5197
  const as = getTableCellType(type);
5147
- const { isCollapsibleChild } = collapsibleProps || {};
5148
- const cellProps = {
5149
- as,
5150
- type,
5151
- ...rest
5152
- };
5153
- const innerCellProps = {
5154
- layout
5155
- };
5156
- return isCollapsibleChild ? /* @__PURE__ */ jsx39(DescriptionListDesc, { children }) : /* @__PURE__ */ jsx39(StyledCell, { ref, ...cellProps, children: /* @__PURE__ */ jsx39(InnerCell, { ...innerCellProps, children }) });
5198
+ const { isCollapsibleChild } = collapsibleProps != null ? collapsibleProps : {};
5199
+ return isCollapsibleChild ? /* @__PURE__ */ jsx39(DescriptionListDesc, { children }) : /* @__PURE__ */ jsx39(StyledCell, { as, ref, $type: type, ...rest, children: /* @__PURE__ */ jsx39(InnerCell, { $layout: layout, children }) });
5157
5200
  }
5158
5201
  );
5159
5202
  Cell.displayName = "Table.Cell";
@@ -5182,10 +5225,12 @@ var DescriptionListCell = styled35(Cell)`
5182
5225
  }
5183
5226
  `;
5184
5227
  var CollapsibleRow = forwardRef25(
5185
- ({ type = "body", mode = "normal", children, ...rest }, ref) => {
5228
+ ({ type = "body", mode = "normal", selected, hoverable, children, ...rest }, ref) => {
5186
5229
  const rowProps = {
5187
- type,
5188
- mode,
5230
+ $type: type,
5231
+ $mode: mode,
5232
+ $selected: selected,
5233
+ $hoverable: hoverable,
5189
5234
  ...rest
5190
5235
  };
5191
5236
  const { isCollapsed, headerValues, definingColumnIndex } = useCollapsibleTableContext();
@@ -5212,14 +5257,14 @@ var CollapsibleRow = forwardRef25(
5212
5257
  })
5213
5258
  ] }, `DL-${index}`);
5214
5259
  }) : null;
5215
- const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsx40(StyledRow, { type: "body", children: /* @__PURE__ */ jsx40(DescriptionListCell, { colSpan: definingColumnIndex.length + 1, children: /* @__PURE__ */ jsx40(DescriptionList, { children: collapsedRenderedChildren }) }) }) : null;
5260
+ const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsx40(StyledRow, { type, children: /* @__PURE__ */ jsx40(DescriptionListCell, { colSpan: definingColumnIndex.length + 1, children: /* @__PURE__ */ jsx40(DescriptionList, { children: collapsedRenderedChildren }) }) }) : null;
5216
5261
  const definingColumnCells = childrenArray.slice().filter((column, index) => definingColumnIndex.indexOf(index) > -1).sort((a, b) => {
5217
5262
  return definingColumnIndex.indexOf(childrenArray.indexOf(a)) - definingColumnIndex.indexOf(childrenArray.indexOf(b));
5218
5263
  });
5219
5264
  const headerRow = () => {
5220
5265
  if (type !== "head" || !isCollapsed)
5221
5266
  return null;
5222
- return /* @__PURE__ */ jsx40(StyledRow, { ref, ...rowProps, children: /* @__PURE__ */ jsxs25(Fragment8, { children: [
5267
+ return /* @__PURE__ */ jsx40(StyledRow, { ref, type, ...rowProps, children: /* @__PURE__ */ jsxs25(Fragment8, { children: [
5223
5268
  definingColumnCells,
5224
5269
  /* @__PURE__ */ jsxs25(Table2.Cell, { type: "head", layout: "center", children: [
5225
5270
  "Utvid",
@@ -5235,6 +5280,7 @@ var CollapsibleRow = forwardRef25(
5235
5280
  StyledRow,
5236
5281
  {
5237
5282
  ref,
5283
+ type,
5238
5284
  ...rowProps,
5239
5285
  "data-isopencollapsibleheader": !childrenCollapsed && true,
5240
5286
  children: [
@@ -5265,7 +5311,7 @@ var CollapsibleRow = forwardRef25(
5265
5311
  rowWithChevron(),
5266
5312
  childrenCollapsed ? null : collapsedRows
5267
5313
  ] })
5268
- ] }) : /* @__PURE__ */ jsx40(StyledRow, { ref, ...rowProps, children });
5314
+ ] }) : /* @__PURE__ */ jsx40(StyledRow, { ref, type, ...rowProps, children });
5269
5315
  }
5270
5316
  );
5271
5317
  CollapsibleRow.displayName = "CollapsibleTable.Row";
@@ -5333,7 +5379,7 @@ import { useEffect as useEffect7, useRef as useRef7, useState as useState11 } fr
5333
5379
  import styled37, { css as css17 } from "styled-components";
5334
5380
  import { jsx as jsx42 } from "react/jsx-runtime";
5335
5381
  var Wrapper3 = styled37.div`
5336
- ${({ overflowX }) => overflowX && css17`
5382
+ ${({ $overflowX }) => $overflowX && css17`
5337
5383
  overflow-x: auto;
5338
5384
  `}
5339
5385
  ${scrollbarStyling.webkit}
@@ -5347,7 +5393,7 @@ var TableWrapper = ({ children, ...rest }) => {
5347
5393
  }
5348
5394
  const wrapperRef = useRef7(null);
5349
5395
  useEffect7(() => {
5350
- if (wrapperRef && wrapperRef.current && isOverflowingX(wrapperRef.current)) {
5396
+ if ((wrapperRef == null ? void 0 : wrapperRef.current) && isOverflowingX(wrapperRef.current)) {
5351
5397
  setOverflowX(true);
5352
5398
  return;
5353
5399
  }
@@ -5360,12 +5406,7 @@ var TableWrapper = ({ children, ...rest }) => {
5360
5406
  window.addEventListener("resize", handleResize);
5361
5407
  return () => window.removeEventListener("resize", handleResize);
5362
5408
  });
5363
- const wrapperProps = {
5364
- ref: wrapperRef,
5365
- overflowX,
5366
- ...rest
5367
- };
5368
- return /* @__PURE__ */ jsx42(Wrapper3, { ...wrapperProps, children });
5409
+ return /* @__PURE__ */ jsx42(Wrapper3, { $overflowX: overflowX, ref: wrapperRef, ...rest, children });
5369
5410
  };
5370
5411
  TableWrapper.displayName = "Table.Wrapper";
5371
5412
 
@@ -5562,14 +5603,14 @@ var List2 = styled39.ol`
5562
5603
  var ListItem2 = styled39.li`
5563
5604
  display: inline-grid;
5564
5605
  align-content: center;
5565
- ${({ isHidden }) => isHidden && css18`
5606
+ ${({ $isHidden }) => $isHidden && css18`
5566
5607
  visibility: hidden;
5567
5608
  `}
5568
5609
  `;
5569
5610
  var OuterContainer2 = styled39.div`
5570
5611
  display: flex;
5571
5612
  gap: ${outerContainer6.gap};
5572
- ${({ smallScreen }) => smallScreen ? css18`
5613
+ ${({ $smallScreen }) => $smallScreen ? css18`
5573
5614
  flex-direction: column;
5574
5615
  align-items: center;
5575
5616
  ` : css18`
@@ -5617,7 +5658,9 @@ var Pagination = forwardRef29(
5617
5658
  }
5618
5659
  };
5619
5660
  const handleSelectChange = (option3) => {
5620
- setItemsPerPage(option3 == null ? void 0 : option3.value);
5661
+ if (option3 !== null) {
5662
+ setItemsPerPage(option3.value);
5663
+ }
5621
5664
  if (onSelectOptionChange) {
5622
5665
  onSelectOptionChange(option3);
5623
5666
  }
@@ -5675,17 +5718,17 @@ var Pagination = forwardRef29(
5675
5718
  };
5676
5719
  const containerProps = {
5677
5720
  ...getBaseHTMLProps22(id, className, htmlProps, rest),
5678
- smallScreen
5721
+ $smallScreen: smallScreen
5679
5722
  };
5680
5723
  const isOnFirstPage = activePage === 1;
5681
5724
  const isOnLastPage = activePage === pagesLength;
5682
5725
  const navigation4 = withPagination ? /* @__PURE__ */ jsx45(Nav, { ref, "aria-label": "paginering", ...navProps, children: /* @__PURE__ */ jsxs28(List2, { children: [
5683
- /* @__PURE__ */ jsx45(ListItem2, { isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: previousPageButton }),
5726
+ /* @__PURE__ */ jsx45(ListItem2, { $isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: previousPageButton }),
5684
5727
  listItems,
5685
- /* @__PURE__ */ jsx45(ListItem2, { isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton })
5728
+ /* @__PURE__ */ jsx45(ListItem2, { $isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton })
5686
5729
  ] }) }) : null;
5687
5730
  const smallScreenNavigation = withPagination ? /* @__PURE__ */ jsx45(Nav, { ref, "aria-label": "paginering", ...navProps, children: /* @__PURE__ */ jsxs28(List2, { children: [
5688
- /* @__PURE__ */ jsx45(ListItem2, { isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: /* @__PURE__ */ jsx45(
5731
+ /* @__PURE__ */ jsx45(ListItem2, { $isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: /* @__PURE__ */ jsx45(
5689
5732
  Button,
5690
5733
  {
5691
5734
  purpose: "secondary",
@@ -5698,7 +5741,7 @@ var Pagination = forwardRef29(
5698
5741
  "aria-label": "G\xE5 til f\xF8rste siden"
5699
5742
  }
5700
5743
  ) }),
5701
- /* @__PURE__ */ jsx45(ListItem2, { isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: previousPageButton }),
5744
+ /* @__PURE__ */ jsx45(ListItem2, { $isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: previousPageButton }),
5702
5745
  /* @__PURE__ */ jsx45(ListItem2, { children: /* @__PURE__ */ jsx45(
5703
5746
  Button,
5704
5747
  {
@@ -5709,8 +5752,8 @@ var Pagination = forwardRef29(
5709
5752
  children: activePage
5710
5753
  }
5711
5754
  ) }),
5712
- /* @__PURE__ */ jsx45(ListItem2, { isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton }),
5713
- /* @__PURE__ */ jsx45(ListItem2, { isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: /* @__PURE__ */ jsx45(
5755
+ /* @__PURE__ */ jsx45(ListItem2, { $isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton }),
5756
+ /* @__PURE__ */ jsx45(ListItem2, { $isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: /* @__PURE__ */ jsx45(
5714
5757
  Button,
5715
5758
  {
5716
5759
  purpose: "secondary",
@@ -5832,13 +5875,13 @@ var StyledList = styled40.ul`
5832
5875
  ${selection7}
5833
5876
  }
5834
5877
 
5835
- ${({ typographyType: typographyType7 }) => typographyType7 === "inherit" ? css19`
5878
+ ${({ $typographyType }) => $typographyType === "inherit" ? css19`
5836
5879
  font: inherit;
5837
5880
  ` : css19`
5838
- ${getFontStyling10(typographyType7)}
5881
+ ${getFontStyling10($typographyType)}
5839
5882
  `}
5840
5883
 
5841
- ${({ listType }) => listType === "unordered" ? css19`
5884
+ ${({ $listType }) => $listType === "unordered" ? css19`
5842
5885
  padding-left: ${list8.ul.paddingLeft};
5843
5886
  list-style: none;
5844
5887
  li {
@@ -5885,14 +5928,17 @@ var List3 = forwardRef30(
5885
5928
  ...rest
5886
5929
  } = props;
5887
5930
  const as = listType === "ordered" ? "ol" : "ul";
5888
- const listProps = {
5889
- ...getBaseHTMLProps23(id, className, htmlProps, rest),
5890
- listType,
5891
- typographyType: typographyType7,
5892
- as,
5893
- ref
5894
- };
5895
- return /* @__PURE__ */ jsx46(StyledList, { ...listProps, children });
5931
+ return /* @__PURE__ */ jsx46(
5932
+ StyledList,
5933
+ {
5934
+ ...getBaseHTMLProps23(id, className, htmlProps, rest),
5935
+ as,
5936
+ ref,
5937
+ $listType: listType,
5938
+ $typographyType: typographyType7,
5939
+ children
5940
+ }
5941
+ );
5896
5942
  }
5897
5943
  );
5898
5944
  List3.displayName = "List";
@@ -5965,7 +6011,9 @@ import {
5965
6011
  focusVisibleWithBorder
5966
6012
  } from "@norges-domstoler/dds-form";
5967
6013
  import { jsx as jsx48 } from "react/jsx-runtime";
5968
- var Container6 = styled42.div`
6014
+ var Container6 = styled42.div.withConfig({
6015
+ shouldForwardProp: (prop) => prop !== "color" && prop !== "cardType"
6016
+ })`
5969
6017
  border: ${cardTokens.base.border};
5970
6018
  ${getFontStyling11(defaultTypographyType3)};
5971
6019
  &::selection,
@@ -5973,7 +6021,9 @@ var Container6 = styled42.div`
5973
6021
  ${selection8}
5974
6022
  }
5975
6023
  @media (prefers-reduced-motion: no-preference) {
5976
- transition: box-shadow 0.2s, border-color 0.2s;
6024
+ transition:
6025
+ box-shadow 0.2s,
6026
+ border-color 0.2s;
5977
6027
  }
5978
6028
  ${({ color }) => color && css20`
5979
6029
  color: ${cardTokens.colors[color].color};
@@ -5989,12 +6039,12 @@ var Container6 = styled42.div`
5989
6039
  ${focusVisibleWithBorder}
5990
6040
  }
5991
6041
  ` : cardType === "expandable" ? css20`
5992
- width: 100%;
5993
- box-sizing: border-box;
5994
- &:not(:first-of-type) {
5995
- border-top: none;
5996
- }
5997
- ` : ""}
6042
+ width: 100%;
6043
+ box-sizing: border-box;
6044
+ &:not(:first-of-type) {
6045
+ border-top: none;
6046
+ }
6047
+ ` : ""}
5998
6048
  `;
5999
6049
  var Card = (props) => {
6000
6050
  const {
@@ -6156,9 +6206,11 @@ var ContentWrapper = styled44.div`
6156
6206
  `;
6157
6207
  function getTypographyType(props) {
6158
6208
  const { typographyType: typographyType7 } = props;
6159
- return typographyType7 || typographyTypes4.header;
6209
+ return typographyType7 != null ? typographyType7 : typographyTypes4.header;
6160
6210
  }
6161
- var HeaderContainer = styled44.div`
6211
+ var HeaderContainer = styled44.div.withConfig({
6212
+ shouldForwardProp: (prop) => prop !== "padding" && prop !== "typographyType" && prop !== "bold"
6213
+ })`
6162
6214
  display: flex;
6163
6215
  justify-content: space-between;
6164
6216
  align-items: center;
@@ -6286,9 +6338,13 @@ var expandingAnimation = css22`
6286
6338
  `;
6287
6339
  function getPadding(props) {
6288
6340
  const { padding } = props;
6289
- return padding || cardAccordionTokens.body.padding;
6341
+ return padding != null ? padding : cardAccordionTokens.body.padding;
6290
6342
  }
6291
- var Body2 = styled45.div`
6343
+ var Body2 = styled45.div.withConfig({
6344
+ shouldForwardProp: (prop) => {
6345
+ return prop !== "animate" && prop !== "height" && prop !== "isExpanded";
6346
+ }
6347
+ })`
6292
6348
  @media (prefers-reduced-motion: no-preference) {
6293
6349
  ${({ animate }) => animate && expandingAnimation}
6294
6350
  }
@@ -6296,7 +6352,18 @@ var Body2 = styled45.div`
6296
6352
  height: ${({ height, isExpanded }) => isExpanded ? height : 0}px;
6297
6353
  overflow: hidden;
6298
6354
  `;
6299
- var BodyContainer = styled45.div`
6355
+ var BodyContainer = styled45.div.withConfig({
6356
+ shouldForwardProp: (prop) => {
6357
+ const styleOnlyProps = [
6358
+ "isExpanded",
6359
+ "maxHeight",
6360
+ "animate",
6361
+ "paddingTop",
6362
+ "padding"
6363
+ ];
6364
+ return !styleOnlyProps.some((styleProp) => styleProp === prop);
6365
+ }
6366
+ })`
6300
6367
  padding: ${getPadding};
6301
6368
 
6302
6369
  ${({ paddingTop }) => paddingTop && css22`
@@ -6304,6 +6371,7 @@ var BodyContainer = styled45.div`
6304
6371
  `}
6305
6372
  `;
6306
6373
  var CardAccordionBody = forwardRef34((props, ref) => {
6374
+ var _a;
6307
6375
  const {
6308
6376
  children,
6309
6377
  isExpanded,
@@ -6335,7 +6403,7 @@ var CardAccordionBody = forwardRef34((props, ref) => {
6335
6403
  ref,
6336
6404
  isExpanded,
6337
6405
  role: "region",
6338
- height: height || initialExpandedHeight || 0
6406
+ height: (_a = height != null ? height : initialExpandedHeight) != null ? _a : 0
6339
6407
  };
6340
6408
  const bodyContainerProps = {
6341
6409
  ref: bodyRef,
@@ -6444,7 +6512,7 @@ var BannerWrapper = styled46.div`
6444
6512
  align-items: center;
6445
6513
  border-bottom: ${banner2.borderBottom};
6446
6514
  padding-right: ${banner2.paddingRight};
6447
- ${({ hasContextMenu }) => hasContextMenu && css23`
6515
+ ${({ $hasContextMenu }) => $hasContextMenu && css23`
6448
6516
  padding-right: ${banner2.hasContextMenu.paddingRight};
6449
6517
  `}
6450
6518
  `;
@@ -6489,7 +6557,9 @@ import { getFontStyling as getFontStyling14 } from "@norges-domstoler/dds-typogr
6489
6557
  import { focusVisible as focusVisible6 } from "@norges-domstoler/dds-form";
6490
6558
  import { jsx as jsx52 } from "react/jsx-runtime";
6491
6559
  var { navLink: navLink2 } = internalHeaderTokens;
6492
- var Link2 = styled47.a`
6560
+ var Link2 = styled47.a.withConfig({
6561
+ shouldForwardProp: (prop) => prop !== "isCurrent"
6562
+ })`
6493
6563
  display: flex;
6494
6564
  align-items: center;
6495
6565
  height: 100%;
@@ -6594,7 +6664,7 @@ var InternalHeader = (props) => {
6594
6664
  }) }) }) : null;
6595
6665
  const hasContextMenu = hasContextMenuElements || !!userProps || hasNavInContextMenu;
6596
6666
  return /* @__PURE__ */ jsxs30(OuterContainer3, { ...getBaseHTMLProps28(id, className, htmlProps, rest), children: [
6597
- /* @__PURE__ */ jsx54(BannerWrapper, { hasContextMenu, children: /* @__PURE__ */ jsxs30(BannerLeftWrapper, { children: [
6667
+ /* @__PURE__ */ jsx54(BannerWrapper, { $hasContextMenu: hasContextMenu, children: /* @__PURE__ */ jsxs30(BannerLeftWrapper, { children: [
6598
6668
  /* @__PURE__ */ jsx54(LovisaWrapper, { children: /* @__PURE__ */ jsx54(Typography12, { typographyType: "bodySans02", bold: true, as: "span", children: applicationName }) }),
6599
6669
  /* @__PURE__ */ jsx54(ApplicationNameWrapper, { children: /* @__PURE__ */ jsx54(Typography12, { typographyType: "bodySans02", as: "span", children: applicationDesc }) })
6600
6670
  ] }) }),
@@ -6733,9 +6803,9 @@ var Datepicker = forwardRef37(
6733
6803
  ({
6734
6804
  id,
6735
6805
  type = "date",
6736
- required,
6737
- readOnly,
6738
- disabled,
6806
+ required = false,
6807
+ readOnly = false,
6808
+ disabled = false,
6739
6809
  label: label3,
6740
6810
  width,
6741
6811
  errorMessage,
@@ -6744,7 +6814,7 @@ var Datepicker = forwardRef37(
6744
6814
  className,
6745
6815
  componentSize = "medium",
6746
6816
  max,
6747
- "aria-required": ariaRequired,
6817
+ "aria-required": ariaRequired = false,
6748
6818
  "aria-describedby": ariaDescribedby,
6749
6819
  ...rest
6750
6820
  }, ref) => {
@@ -6753,7 +6823,7 @@ var Datepicker = forwardRef37(
6753
6823
  const componentWidth = width ? width : getWidth2(type, componentSize);
6754
6824
  const hasLabel = !!label3;
6755
6825
  const hasErrorMessage = !!errorMessage;
6756
- const showRequiredStyling = !!(required || ariaRequired);
6826
+ const showRequiredStyling = required || ariaRequired;
6757
6827
  const errorMessageId = derivativeIdGenerator7(uniqueId, "errorMessage");
6758
6828
  const tipId = derivativeIdGenerator7(uniqueId, "tip");
6759
6829
  const inputProps = {
@@ -6782,7 +6852,7 @@ var Datepicker = forwardRef37(
6782
6852
  className
6783
6853
  };
6784
6854
  return /* @__PURE__ */ jsxs31(OuterInputContainer2, { ...outerinputContainerProps, children: [
6785
- hasLabel && /* @__PURE__ */ jsx55(Label5, { htmlFor: uniqueId, showRequiredStyling, children: label3 }),
6855
+ hasLabel && /* @__PURE__ */ jsx55(Label5, { htmlFor: uniqueId, showRequiredStyling: !!showRequiredStyling, children: label3 }),
6786
6856
  /* @__PURE__ */ jsx55(StyledInput2, { ...inputProps }),
6787
6857
  renderInputMessage(tip, tipId, errorMessage, errorMessageId)
6788
6858
  ] });
@@ -6856,7 +6926,7 @@ var { wrapper: wrapper2, link: link4 } = skipToContentTokens;
6856
6926
  var Wrapper5 = styled50.div`
6857
6927
  box-sizing: border-box;
6858
6928
  position: absolute;
6859
- top: ${({ top }) => top};
6929
+ top: ${({ $top: top }) => top};
6860
6930
  text-align: center;
6861
6931
  overflow: hidden;
6862
6932
  clip: rect(1px, 1px, 1px, 1px);
@@ -6910,12 +6980,15 @@ var SkipToContent = forwardRef38(
6910
6980
  style,
6911
6981
  ...restHtmlProps
6912
6982
  } = htmlProps;
6913
- const wrapperProps = {
6914
- top,
6915
- className: joinClassNames3(className, htmlPropsClassName),
6916
- style
6917
- };
6918
- return /* @__PURE__ */ jsx56(Wrapper5, { ...wrapperProps, children: /* @__PURE__ */ jsx56(Link3, { ...getBaseHTMLProps29(id, restHtmlProps, rest), ref, children: text }) });
6983
+ return /* @__PURE__ */ jsx56(
6984
+ Wrapper5,
6985
+ {
6986
+ $top: top,
6987
+ className: joinClassNames3(className, htmlPropsClassName),
6988
+ style,
6989
+ children: /* @__PURE__ */ jsx56(Link3, { ...getBaseHTMLProps29(id, restHtmlProps, rest), ref, children: text })
6990
+ }
6991
+ );
6919
6992
  }
6920
6993
  );
6921
6994
  SkipToContent.displayName = "SkipToContent";
@@ -7167,7 +7240,9 @@ import { focusVisible as focusVisible7 } from "@norges-domstoler/dds-form";
7167
7240
  import styled52 from "styled-components";
7168
7241
  import { ddsBaseTokens as ddsBaseTokens27 } from "@norges-domstoler/dds-design-tokens";
7169
7242
  import { changeRGBAAlpha } from "@norges-domstoler/dds-core";
7170
- var Backdrop = styled52.div`
7243
+ var Backdrop = styled52.div.withConfig({
7244
+ shouldForwardProp: (prop) => prop !== "isOpen"
7245
+ })`
7171
7246
  position: fixed;
7172
7247
  display: flex;
7173
7248
  align-items: center;
@@ -7199,10 +7274,13 @@ function handleElementWithBackdropMount(container16) {
7199
7274
  }
7200
7275
  }
7201
7276
  function handleElementWithBackdropUnmount(container16) {
7202
- const scrollY = parseInt(document.body.style.top) || 0;
7277
+ const scrollY = parseInt(document.body.style.top);
7203
7278
  container16.style.removeProperty("overflow-y");
7204
7279
  container16.style.removeProperty("position");
7205
7280
  container16.style.removeProperty("top");
7281
+ if (isNaN(scrollY)) {
7282
+ return;
7283
+ }
7206
7284
  window.scrollTo(0, scrollY * -1);
7207
7285
  }
7208
7286
 
@@ -7268,40 +7346,38 @@ var Modal = forwardRef40((props, ref) => {
7268
7346
  useOnClickOutside3(modalRef.current, () => handleClose());
7269
7347
  useOnKeyDown4(["Escape", "Esc"], () => handleClose());
7270
7348
  const hasTransitionedIn = useMountTransition(isOpen, 200);
7271
- const backdropProps = {
7272
- isOpen: hasTransitionedIn && isOpen
7273
- };
7274
- const containerProps = {
7275
- ...getBaseHTMLProps31(id, className, htmlProps, rest),
7276
- ref: combinedRef,
7277
- role: "dialog",
7278
- "aria-modal": true,
7279
- "aria-hidden": !isOpen,
7280
- tabIndex: -1,
7281
- "aria-labelledby": headerId,
7282
- id: modalId
7283
- };
7284
- const headerContainerProps = {
7285
- id: headerId
7286
- };
7287
7349
  return isOpen || hasTransitionedIn ? createPortal(
7288
- /* @__PURE__ */ jsx58(Backdrop, { ...backdropProps, children: /* @__PURE__ */ jsxs33(Container8, { ...containerProps, elevation: 4, children: [
7289
- /* @__PURE__ */ jsxs33(ContentContainer2, { children: [
7290
- header3 && /* @__PURE__ */ jsx58(HeaderContainer2, { ...headerContainerProps, children: typeof header3 === "string" ? /* @__PURE__ */ jsx58(Typography13, { typographyType: "headingSans03", children: header3 }) : header3 }),
7291
- children
7292
- ] }),
7293
- onClose && /* @__PURE__ */ jsx58(
7294
- StyledButton2,
7295
- {
7296
- size: "small",
7297
- appearance: "borderless",
7298
- purpose: "secondary",
7299
- icon: CloseIcon4,
7300
- onClick: handleClose,
7301
- "aria-label": "Lukk dialog"
7302
- }
7303
- )
7304
- ] }) }),
7350
+ /* @__PURE__ */ jsx58(Backdrop, { isOpen: hasTransitionedIn && isOpen, children: /* @__PURE__ */ jsxs33(
7351
+ Container8,
7352
+ {
7353
+ ...getBaseHTMLProps31(id, className, htmlProps, rest),
7354
+ ref: combinedRef,
7355
+ role: "dialog",
7356
+ "aria-modal": true,
7357
+ "aria-hidden": !isOpen,
7358
+ tabIndex: -1,
7359
+ "aria-labelledby": headerId,
7360
+ id: modalId,
7361
+ elevation: 4,
7362
+ children: [
7363
+ /* @__PURE__ */ jsxs33(ContentContainer2, { children: [
7364
+ header3 && /* @__PURE__ */ jsx58(HeaderContainer2, { id: headerId, children: typeof header3 === "string" ? /* @__PURE__ */ jsx58(Typography13, { typographyType: "headingSans03", children: header3 }) : header3 }),
7365
+ children
7366
+ ] }),
7367
+ onClose && /* @__PURE__ */ jsx58(
7368
+ StyledButton2,
7369
+ {
7370
+ size: "small",
7371
+ appearance: "borderless",
7372
+ purpose: "secondary",
7373
+ icon: CloseIcon4,
7374
+ onClick: handleClose,
7375
+ "aria-label": "Lukk dialog"
7376
+ }
7377
+ )
7378
+ ]
7379
+ }
7380
+ ) }),
7305
7381
  parentElement
7306
7382
  ) : null;
7307
7383
  });
@@ -7392,7 +7468,17 @@ var getMaxWidth = (size) => {
7392
7468
  else
7393
7469
  return "400px";
7394
7470
  };
7395
- var Container11 = styled56(Paper4)`
7471
+ var Container11 = styled56(Paper4).withConfig({
7472
+ shouldForwardProp: (prop) => {
7473
+ const styleOnlyProps = [
7474
+ "placement",
7475
+ "isOpen",
7476
+ "widthProps",
7477
+ "size"
7478
+ ];
7479
+ return !styleOnlyProps.some((styleProp) => styleProp === prop);
7480
+ }
7481
+ })`
7396
7482
  position: fixed;
7397
7483
  top: 0;
7398
7484
  height: 100%;
@@ -7408,16 +7494,18 @@ var Container11 = styled56(Paper4)`
7408
7494
  `}
7409
7495
 
7410
7496
  ${({ widthProps }) => widthProps && css26`
7411
- ${widthProps}
7497
+ min-width: ${widthProps.minWidth};
7498
+ max-width: ${widthProps.maxWidth};
7499
+ width: ${widthProps.width};
7412
7500
  `}
7413
7501
 
7414
7502
  ${({ placement, isOpen }) => placement === "left" ? css26`
7415
7503
  left: 0;
7416
7504
  transform: ${isOpen ? "translate(0px)" : "translateX(-100%)"};
7417
7505
  ` : placement === "right" ? css26`
7418
- right: 0;
7419
- transform: ${isOpen ? "translate(0px)" : "translateX(100%)"};
7420
- ` : ""}
7506
+ right: 0;
7507
+ transform: ${isOpen ? "translate(0px)" : "translateX(100%)"};
7508
+ ` : ""}
7421
7509
 
7422
7510
  @media (prefers-reduced-motion: no-preference) {
7423
7511
  transition: transform 0.5s;
@@ -7611,7 +7699,7 @@ var { spacing: Spacing } = ddsBaseTokens30;
7611
7699
  var { wrapper: wrapper6, content: content4, closeButton: closeButton2, title: title2 } = popoverTokens;
7612
7700
  var Wrapper6 = styled57(Paper5)`
7613
7701
  opacity: 0;
7614
- ${({ hasTransitionedIn, isOpen }) => hasTransitionedIn && visibilityTransition4(hasTransitionedIn && isOpen)}
7702
+ ${({ $hasTransitionedIn, $isOpen }) => $hasTransitionedIn && visibilityTransition4($hasTransitionedIn && $isOpen)}
7615
7703
  position: absolute;
7616
7704
  width: fit-content;
7617
7705
  z-index: 100;
@@ -7620,15 +7708,20 @@ var Wrapper6 = styled57(Paper5)`
7620
7708
  &:focus-visible {
7621
7709
  ${focusVisible9}
7622
7710
  }
7623
- ${({ sizeProps }) => sizeProps && css27`
7624
- ${sizeProps}
7711
+ ${({ $sizeProps }) => $sizeProps && css27`
7712
+ width: ${$sizeProps.width};
7713
+ height: ${$sizeProps.height};
7714
+ min-width: ${$sizeProps.minWidth};
7715
+ min-height: ${$sizeProps.minHeight};
7716
+ max-width: ${$sizeProps.maxWidth};
7717
+ max-height: ${$sizeProps.maxHeight};
7625
7718
  `}
7626
7719
  `;
7627
7720
  var TitleContainer = styled57.div`
7628
7721
  margin-right: ${title2.marginRight};
7629
7722
  `;
7630
7723
  var ContentContainer4 = styled57.div`
7631
- ${({ withCloseButton, hasTitle }) => withCloseButton && !hasTitle && css27`
7724
+ ${({ $withCloseButton, $hasTitle }) => $withCloseButton && !$hasTitle && css27`
7632
7725
  margin-top: ${content4.noTitle.marginTop};
7633
7726
  `}
7634
7727
  `;
@@ -7671,9 +7764,7 @@ var Popover = forwardRef44(
7671
7764
  useEffect13(() => {
7672
7765
  anchorElement ? refs.setReference(anchorElement) : refs.setReference(null);
7673
7766
  }, [anchorElement]);
7674
- const elements = [
7675
- popoverRef.current
7676
- ];
7767
+ const elements = [popoverRef.current];
7677
7768
  if (anchorElement)
7678
7769
  elements.push(anchorElement);
7679
7770
  useOnClickOutside5(elements, () => {
@@ -7681,30 +7772,42 @@ var Popover = forwardRef44(
7681
7772
  onClose && onClose();
7682
7773
  });
7683
7774
  const hasTransitionedIn = useMountTransition3(isOpen, 400);
7684
- const wrapperProps = {
7685
- ...getBaseHTMLProps34(id, className, htmlProps, rest),
7686
- ref: multiRef,
7687
- isOpen,
7688
- hasTransitionedIn,
7689
- tabIndex: -1,
7690
- style: { ...htmlProps.style, ...styles.floating },
7691
- role: "dialog"
7692
- };
7693
- return isOpen || hasTransitionedIn ? /* @__PURE__ */ jsxs36(Wrapper6, { ...wrapperProps, elevation: 3, border: "light", children: [
7694
- title3 && /* @__PURE__ */ jsx62(TitleContainer, { children: typeof title3 === "string" ? /* @__PURE__ */ jsx62(Typography15, { typographyType: "headingSans02", children: title3 }) : title3 }),
7695
- /* @__PURE__ */ jsx62(ContentContainer4, { hasTitle: !!title3, withCloseButton, children }),
7696
- withCloseButton && /* @__PURE__ */ jsx62(
7697
- StyledButton4,
7698
- {
7699
- icon: CloseIcon6,
7700
- appearance: "borderless",
7701
- purpose: "secondary",
7702
- size: "small",
7703
- onClick: onCloseButtonClick,
7704
- "aria-label": "Lukk"
7705
- }
7706
- )
7707
- ] }) : null;
7775
+ return isOpen || hasTransitionedIn ? /* @__PURE__ */ jsxs36(
7776
+ Wrapper6,
7777
+ {
7778
+ ...getBaseHTMLProps34(id, className, htmlProps, rest),
7779
+ ref: multiRef,
7780
+ $isOpen: isOpen,
7781
+ $hasTransitionedIn: hasTransitionedIn,
7782
+ tabIndex: -1,
7783
+ style: { ...htmlProps.style, ...styles.floating },
7784
+ role: "dialog",
7785
+ elevation: 3,
7786
+ border: "light",
7787
+ children: [
7788
+ title3 && /* @__PURE__ */ jsx62(TitleContainer, { children: typeof title3 === "string" ? /* @__PURE__ */ jsx62(Typography15, { typographyType: "headingSans02", children: title3 }) : title3 }),
7789
+ /* @__PURE__ */ jsx62(
7790
+ ContentContainer4,
7791
+ {
7792
+ $hasTitle: !!title3,
7793
+ $withCloseButton: withCloseButton,
7794
+ children
7795
+ }
7796
+ ),
7797
+ withCloseButton && /* @__PURE__ */ jsx62(
7798
+ StyledButton4,
7799
+ {
7800
+ icon: CloseIcon6,
7801
+ appearance: "borderless",
7802
+ purpose: "secondary",
7803
+ size: "small",
7804
+ onClick: onCloseButtonClick,
7805
+ "aria-label": "Lukk"
7806
+ }
7807
+ )
7808
+ ]
7809
+ }
7810
+ ) : null;
7708
7811
  }
7709
7812
  );
7710
7813
  Popover.displayName = "Popover";
@@ -7831,11 +7934,14 @@ var Content2 = styled58.span`
7831
7934
  padding: ${toggleButton2.padding};
7832
7935
  ${getFontStyling17(typographyType4)}
7833
7936
  @media (prefers-reduced-motion: no-preference) {
7834
- transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s,
7937
+ transition:
7938
+ border-color 0.2s,
7939
+ background-color 0.2s,
7940
+ box-shadow 0.2s,
7835
7941
  ${focusVisibleTransitionValue6};
7836
7942
  }
7837
7943
 
7838
- ${({ hasIcon }) => hasIcon && css28`
7944
+ ${({ $hasIcon }) => $hasIcon && css28`
7839
7945
  gap: ${toggleButton2.gap};
7840
7946
  `}
7841
7947
 
@@ -7869,17 +7975,16 @@ var ToggleButton = forwardRef45(
7869
7975
  ({ id, label: label3, icon: icon12, className, htmlProps, ...rest }, ref) => {
7870
7976
  const generatedId = useId19();
7871
7977
  const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
7872
- const inputProps = {
7873
- ...getBaseHTMLProps35(uniqueId, className, htmlProps, rest),
7874
- ref,
7875
- type: "checkbox"
7876
- };
7877
- const containerProps = {
7878
- htmlFor: uniqueId
7879
- };
7880
- return /* @__PURE__ */ jsxs37(Container12, { ...containerProps, children: [
7881
- /* @__PURE__ */ jsx64(HiddenInput3, { ...inputProps }),
7882
- /* @__PURE__ */ jsxs37(Content2, { hasIcon: !!icon12, children: [
7978
+ return /* @__PURE__ */ jsxs37(Container12, { htmlFor: uniqueId, children: [
7979
+ /* @__PURE__ */ jsx64(
7980
+ HiddenInput3,
7981
+ {
7982
+ ...getBaseHTMLProps35(uniqueId, className, htmlProps, rest),
7983
+ ref,
7984
+ type: "checkbox"
7985
+ }
7986
+ ),
7987
+ /* @__PURE__ */ jsxs37(Content2, { $hasIcon: !!icon12, children: [
7883
7988
  icon12 && /* @__PURE__ */ jsx64(Icon15, { icon: icon12, iconSize: "inherit" }),
7884
7989
  " ",
7885
7990
  label3
@@ -7902,8 +8007,8 @@ var Group = styled59.div`
7902
8007
  display: flex;
7903
8008
  flex-wrap: wrap;
7904
8009
  ${({ direction }) => css29`
7905
- flex-direction: ${direction};
7906
- `}
8010
+ flex-direction: ${direction};
8011
+ `}
7907
8012
  `;
7908
8013
  var Container13 = styled59.div`
7909
8014
  display: flex;
@@ -7976,8 +8081,8 @@ var useTabsContext = () => useContext6(TabsContext);
7976
8081
  // src/components/Tabs/Tabs.tsx
7977
8082
  import { jsx as jsx66 } from "react/jsx-runtime";
7978
8083
  var Container14 = styled60.div`
7979
- ${({ width }) => width && css30`
7980
- width: ${width};
8084
+ ${({ $width }) => $width && css30`
8085
+ width: ${$width};
7981
8086
  `};
7982
8087
  `;
7983
8088
  var Tabs = forwardRef46((props, ref) => {
@@ -7994,7 +8099,7 @@ var Tabs = forwardRef46((props, ref) => {
7994
8099
  } = props;
7995
8100
  const generatedId = useId21();
7996
8101
  const uniqueId = id != null ? id : `${generatedId}-tabs`;
7997
- const [thisActiveTab, setActiveTab] = useState20(activeTab || 0);
8102
+ const [thisActiveTab, setActiveTab] = useState20(activeTab != null ? activeTab : 0);
7998
8103
  const [hasTabFocus, setHasTabFocus] = useState20(false);
7999
8104
  const tabListRef = useRef13(null);
8000
8105
  const tabPanelsRef = useRef13(null);
@@ -8024,7 +8129,7 @@ var Tabs = forwardRef46((props, ref) => {
8024
8129
  setHasTabFocus,
8025
8130
  tabContentDirection
8026
8131
  },
8027
- children: /* @__PURE__ */ jsx66(Container14, { ...containerProps, width, children })
8132
+ children: /* @__PURE__ */ jsx66(Container14, { ...containerProps, $width: width, children })
8028
8133
  }
8029
8134
  );
8030
8135
  });
@@ -8110,16 +8215,19 @@ var Button2 = styled61.button`
8110
8215
  ${getFontStyling18(defaultTypographyType6)}
8111
8216
 
8112
8217
  @media (prefers-reduced-motion: no-preference) {
8113
- transition: box-shadow 0.2s, border-bottom 0.2s, color 0.2s,
8218
+ transition:
8219
+ box-shadow 0.2s,
8220
+ border-bottom 0.2s,
8221
+ color 0.2s,
8114
8222
  ${focusVisibleTransitionValue7};
8115
8223
  }
8116
8224
 
8117
- ${({ direction }) => css31`
8118
- flex-direction: ${direction};
8119
- gap: ${tab2[direction].gap};
8225
+ ${({ $direction }) => css31`
8226
+ flex-direction: ${$direction};
8227
+ gap: ${tab2[$direction].gap};
8120
8228
  `};
8121
8229
 
8122
- ${({ active }) => active && css31`
8230
+ ${({ $active }) => $active && css31`
8123
8231
  background-color: ${tab2.active.backgroundColor};
8124
8232
  border-color: ${tab2.active.borderColor};
8125
8233
  color: ${tab2.active.color};
@@ -8180,21 +8288,24 @@ var Tab = forwardRef47((props, ref) => {
8180
8288
  handleSelect();
8181
8289
  onKeyDown && onKeyDown(e);
8182
8290
  };
8183
- const buttonProps = {
8184
- ...getBaseHTMLProps38(id, className, htmlProps, rest),
8185
- ref: combinedRef,
8186
- "aria-selected": active,
8187
- role: "tab",
8188
- active,
8189
- direction: tabContentDirection,
8190
- onClick: handleOnClick,
8191
- onKeyDown: handleOnKeyDown,
8192
- tabIndex: focus ? 0 : -1
8193
- };
8194
- return /* @__PURE__ */ jsxs39(Button2, { ...buttonProps, children: [
8195
- icon12 && /* @__PURE__ */ jsx67(Icon16, { icon: icon12, iconSize: "inherit" }),
8196
- /* @__PURE__ */ jsx67("span", { children })
8197
- ] });
8291
+ return /* @__PURE__ */ jsxs39(
8292
+ Button2,
8293
+ {
8294
+ ...getBaseHTMLProps38(id, className, htmlProps, rest),
8295
+ ref: combinedRef,
8296
+ "aria-selected": active,
8297
+ role: "tab",
8298
+ $active: active,
8299
+ $direction: tabContentDirection,
8300
+ onClick: handleOnClick,
8301
+ onKeyDown: handleOnKeyDown,
8302
+ tabIndex: focus ? 0 : -1,
8303
+ children: [
8304
+ icon12 && /* @__PURE__ */ jsx67(Icon16, { icon: icon12, iconSize: "inherit" }),
8305
+ /* @__PURE__ */ jsx67("span", { children })
8306
+ ]
8307
+ }
8308
+ );
8198
8309
  });
8199
8310
  Tab.displayName = "Tab";
8200
8311
 
@@ -8308,7 +8419,7 @@ var Panel = styled63.div`
8308
8419
  transition: ${focusVisibleTransitionValue9};
8309
8420
  }
8310
8421
 
8311
- ${({ active }) => !active && css32`
8422
+ ${({ $active }) => !$active && css32`
8312
8423
  display: none;
8313
8424
  `}
8314
8425
  &:focus-visible {
@@ -8317,14 +8428,17 @@ var Panel = styled63.div`
8317
8428
  `;
8318
8429
  var TabPanel = forwardRef49(
8319
8430
  ({ active = false, children, id, className, htmlProps, ...rest }, ref) => {
8320
- const panelProps = {
8321
- ...getBaseHTMLProps39(id, className, htmlProps, rest),
8322
- ref,
8323
- tabIndex: 0,
8324
- role: "tabpanel",
8325
- active
8326
- };
8327
- return /* @__PURE__ */ jsx69(Panel, { ...panelProps, children });
8431
+ return /* @__PURE__ */ jsx69(
8432
+ Panel,
8433
+ {
8434
+ ...getBaseHTMLProps39(id, className, htmlProps, rest),
8435
+ ref,
8436
+ tabIndex: 0,
8437
+ role: "tabpanel",
8438
+ $active: active,
8439
+ children
8440
+ }
8441
+ );
8328
8442
  }
8329
8443
  );
8330
8444
  TabPanel.displayName = "TabPanel";
@@ -8401,9 +8515,9 @@ var Wrapper7 = styled64(TextOverflowEllipsisWrapper)`
8401
8515
  border-radius: ${wrapper8.borderRadius};
8402
8516
  padding: ${wrapper8.padding};
8403
8517
  ${getFontStyling19(typographyType5)}
8404
- ${({ purpose }) => css33`
8405
- background-color: ${wrapper8.purpose[purpose].backgroundColor};
8406
- border-color: ${wrapper8.purpose[purpose].borderColor};
8518
+ ${({ $purpose }) => css33`
8519
+ background-color: ${wrapper8.purpose[$purpose].backgroundColor};
8520
+ border-color: ${wrapper8.purpose[$purpose].borderColor};
8407
8521
  `}
8408
8522
  `;
8409
8523
  var Tag = forwardRef51((props, ref) => {
@@ -8420,7 +8534,7 @@ var Tag = forwardRef51((props, ref) => {
8420
8534
  {
8421
8535
  ...getBaseHTMLProps40(id, className, htmlProps, rest),
8422
8536
  ref,
8423
- purpose,
8537
+ $purpose: purpose,
8424
8538
  children: /* @__PURE__ */ jsx71(TextOverflowEllipsisInner, { children: text })
8425
8539
  }
8426
8540
  );
@@ -8497,7 +8611,7 @@ var Chip = forwardRef52((props, ref) => {
8497
8611
  appearance: "borderless",
8498
8612
  purpose: "secondary",
8499
8613
  onClick,
8500
- "aria-label": ariaLabel || `Fjern ${text ? `chip ${text}` : "chip"}`
8614
+ "aria-label": ariaLabel != null ? ariaLabel : `Fjern ${text ? `chip ${text}` : "chip"}`
8501
8615
  }
8502
8616
  )
8503
8617
  ]
@@ -8657,8 +8771,8 @@ var OuterContainer4 = styled67.div`
8657
8771
  *::selection {
8658
8772
  ${selection13}
8659
8773
  }
8660
- ${({ width }) => width && css34`
8661
- width: ${width};
8774
+ ${({ $width }) => $width && css34`
8775
+ width: ${$width};
8662
8776
  `}
8663
8777
  `;
8664
8778
  var Bar2 = styled67.div`
@@ -8703,7 +8817,7 @@ var ToggleBar = (props) => {
8703
8817
  ...getBaseHTMLProps42(id, className, htmlProps, rest),
8704
8818
  role: "radiogroup",
8705
8819
  "aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
8706
- width,
8820
+ $width: width,
8707
8821
  children: [
8708
8822
  label3 && /* @__PURE__ */ jsx74(Typography17, { typographyType: "supportingStyleLabel01", id: labelId, children: label3 }),
8709
8823
  /* @__PURE__ */ jsx74(Bar2, { children })
@@ -8740,19 +8854,23 @@ var Content3 = styled68.span`
8740
8854
  box-sizing: border-box;
8741
8855
  cursor: pointer;
8742
8856
  @media (prefers-reduced-motion: no-preference) {
8743
- transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s,
8744
- color 0.2s, ${focusVisibleTransitionValue10};
8857
+ transition:
8858
+ border-color 0.2s,
8859
+ background-color 0.2s,
8860
+ box-shadow 0.2s,
8861
+ color 0.2s,
8862
+ ${focusVisibleTransitionValue10};
8745
8863
  }
8746
8864
  background-color: ${content6.base.backgroundColor};
8747
8865
 
8748
- ${({ size, justIcon }) => css35`
8749
- ${justIcon ? css35`
8750
- font-size: ${content6.size[size].justIcon.fontSize};
8751
- padding: ${content6.size[size].justIcon.padding};
8866
+ ${({ $size, $justIcon }) => css35`
8867
+ ${$justIcon ? css35`
8868
+ font-size: ${content6.size[$size].justIcon.fontSize};
8869
+ padding: ${content6.size[$size].justIcon.padding};
8752
8870
  ` : css35`
8753
- gap: ${content6.size[size].withText.gap};
8754
- padding: ${content6.size[size].withText.padding};
8755
- ${getFontStyling21(typographyTypes6[size])}
8871
+ gap: ${content6.size[$size].withText.gap};
8872
+ padding: ${content6.size[$size].withText.padding};
8873
+ ${getFontStyling21(typographyTypes6[$size])}
8756
8874
  `}
8757
8875
  `}
8758
8876
  `;
@@ -8826,7 +8944,7 @@ var ToggleRadio = forwardRef54(
8826
8944
  const group4 = useToggleBarContext();
8827
8945
  const handleChange = (event) => {
8828
8946
  onChange && onChange(event);
8829
- group4 && group4.onChange && group4.onChange(event);
8947
+ (group4 == null ? void 0 : group4.onChange) && group4.onChange(event);
8830
8948
  };
8831
8949
  return /* @__PURE__ */ jsxs42(Label6, { size: group4.size, htmlFor: uniqueId, children: [
8832
8950
  /* @__PURE__ */ jsx75(
@@ -8841,7 +8959,7 @@ var ToggleRadio = forwardRef54(
8841
8959
  checked: calculateChecked(value, group4, checked)
8842
8960
  }
8843
8961
  ),
8844
- /* @__PURE__ */ jsxs42(Content3, { size: group4.size, justIcon: !!icon12 && !!!label3, children: [
8962
+ /* @__PURE__ */ jsxs42(Content3, { $size: group4.size, $justIcon: !!icon12 && !label3, children: [
8845
8963
  icon12 && /* @__PURE__ */ jsx75(Icon17, { icon: icon12, iconSize: "inherit" }),
8846
8964
  label3 && /* @__PURE__ */ jsx75("span", { children: label3 })
8847
8965
  ] })
@@ -8978,11 +9096,20 @@ var getHooksGridStyling = (screenSize, maxWidth, rowGap) => {
8978
9096
  maxWidth: maxWidth && maxWidth[getLiteralScreenSize(screenSize)] && maxWidth[getLiteralScreenSize(screenSize)]
8979
9097
  };
8980
9098
  };
8981
- var StyledGrid = styled69.div`
9099
+ var StyledGrid = styled69.div.withConfig({
9100
+ shouldForwardProp: (prop) => {
9101
+ const styleOnlyProps = [
9102
+ "maxWidth",
9103
+ "rowGap",
9104
+ "screenSize"
9105
+ ];
9106
+ return !styleOnlyProps.some((styleProp) => styleProp === prop);
9107
+ }
9108
+ })`
8982
9109
  display: grid;
8983
9110
  ${({ maxWidth }) => css36`
8984
- max-width: ${maxWidth};
8985
- `}
9111
+ max-width: ${maxWidth};
9112
+ `}
8986
9113
  ${({ screenSize, maxWidth, rowGap }) => getHooksGridStyling(screenSize, maxWidth, rowGap)}
8987
9114
  `;
8988
9115
  var Grid = (props) => {
@@ -9022,7 +9149,17 @@ var isRelativeGridColumn = (type) => {
9022
9149
  var isGridColumn = (type) => {
9023
9150
  return type.xs !== void 0 || type.sm !== void 0 || type.md !== void 0 || type.lg !== void 0 || type.xl !== void 0;
9024
9151
  };
9025
- var StyledGridChild = styled70.div`
9152
+ var StyledGridChild = styled70.div.withConfig({
9153
+ shouldForwardProp: (prop) => {
9154
+ const styleOnlyProps = [
9155
+ "columnsOccupied",
9156
+ "justifySelf",
9157
+ "gridRow",
9158
+ "screenSize"
9159
+ ];
9160
+ return !styleOnlyProps.some((styleProp) => styleProp === prop);
9161
+ }
9162
+ })`
9026
9163
  grid-column: ${({ screenSize, columnsOccupied }) => columnsOccupied === "all" ? "1 / -1" : isGridColumn(columnsOccupied) ? columnsOccupied[getLiteralScreenSize2(screenSize)] : isRelativeGridColumn(columnsOccupied) ? gridTokens[screenSize].columns[columnsOccupied].gridColumn : ""};
9027
9164
 
9028
9165
  justify-self: ${({ justifySelf }) => justifySelf && justifySelf};
@@ -9175,7 +9312,10 @@ var ItemWrapper = styled71.li`
9175
9312
  justify-content: center;
9176
9313
  `;
9177
9314
  var ItemNumber = styled71.div`
9178
- transition: background-color 0.2s, border-color 0.2s, color 0.2s;
9315
+ transition:
9316
+ background-color 0.2s,
9317
+ border-color 0.2s,
9318
+ color 0.2s;
9179
9319
  border-radius: 50%;
9180
9320
  border: ${itemNumber2.borderWidth} solid;
9181
9321
  width: ${itemNumber2.size};
@@ -9187,7 +9327,7 @@ var ItemNumber = styled71.div`
9187
9327
  ${getFontStyling22(typographyTypes7.number)}
9188
9328
  font-weight: 600;
9189
9329
 
9190
- ${({ state }) => {
9330
+ ${({ $state: state }) => {
9191
9331
  switch (state) {
9192
9332
  case "activeIncomplete":
9193
9333
  return css37`
@@ -9228,7 +9368,7 @@ var ItemText = styled71.div`
9228
9368
  text-decoration: ${itemText2.textDecoration};
9229
9369
  transition: text-decoration-color 0.2s;
9230
9370
 
9231
- ${({ state }) => {
9371
+ ${({ $state: state }) => {
9232
9372
  switch (state) {
9233
9373
  case "activeCompleted":
9234
9374
  case "activeIncomplete":
@@ -9267,7 +9407,7 @@ var ItemContentWrapper = styled71.button`
9267
9407
  ${focusVisible15}
9268
9408
  }
9269
9409
 
9270
- ${({ state }) => state !== "disabled" && css37`
9410
+ ${({ $state: state }) => state !== "disabled" && css37`
9271
9411
  cursor: pointer;
9272
9412
  `}
9273
9413
  `;
@@ -9283,7 +9423,7 @@ var ProgressTrackerItem = (props) => {
9283
9423
  const { activeStep, handleStepChange } = useProgressTrackerContext();
9284
9424
  const active = activeStep === index;
9285
9425
  const styleProps = {
9286
- state: toItemState(active, completed, disabled)
9426
+ $state: toItemState(active, completed, disabled)
9287
9427
  };
9288
9428
  const stepNumberContent = useMemo(() => {
9289
9429
  if (completed) {
@@ -9378,14 +9518,18 @@ var ProgressTracker = (() => {
9378
9518
  Res.displayName = "ProgressTracker";
9379
9519
  return Res;
9380
9520
  })();
9381
- var removeInvalidChildren = (children) => Children7.toArray(children).filter(isValidElement9);
9382
- var passIndexPropToProgressTrackerItem = (children) => Children7.map(
9383
- children,
9384
- (item, index) => cloneElement9(item, {
9385
- ...item.props,
9386
- index
9387
- })
9388
- );
9521
+ function removeInvalidChildren(children) {
9522
+ return Children7.toArray(children).filter(isValidElement9);
9523
+ }
9524
+ function passIndexPropToProgressTrackerItem(children) {
9525
+ return Children7.map(
9526
+ children,
9527
+ (item, index) => cloneElement9(item, {
9528
+ ...item.props,
9529
+ index
9530
+ })
9531
+ );
9532
+ }
9389
9533
  var intersperseItemsWithConnector = (children) => Children7.map(children, (child, index) => {
9390
9534
  if (index === 0) {
9391
9535
  return child;
@@ -9419,7 +9563,7 @@ var InlineEdit = (props) => {
9419
9563
  inputRef,
9420
9564
  children
9421
9565
  } = props;
9422
- const [editingValue, setEditingValue] = useState24(value || "");
9566
+ const [editingValue, setEditingValue] = useState24(value != null ? value : "");
9423
9567
  const [isEditing, setIsEditing] = useState24(false);
9424
9568
  const onChangeHandler = (e) => {
9425
9569
  setEditingValue(e.target.value);
@@ -9506,7 +9650,9 @@ var inlineEditTokens = {
9506
9650
  import { StatefulInput as StatefulInput4 } from "@norges-domstoler/dds-form";
9507
9651
  var { inlineEdit: inlineEdit2, iconWrapper: iconWrapper2 } = inlineEditTokens;
9508
9652
  var defaultWidth4 = "140px";
9509
- var StyledInlineInput = styled73(StatefulInput4)`
9653
+ var StyledInlineInput = styled73(StatefulInput4).withConfig({
9654
+ shouldForwardProp: (prop) => prop !== "isEditing" && prop !== "hideIcon"
9655
+ })`
9510
9656
  border-color: transparent;
9511
9657
  background-color: ${inlineEdit2.backgroundColor};
9512
9658
  padding: ${inlineEdit2.padding};
@@ -9777,11 +9923,11 @@ var TextArea = forwardRef60(
9777
9923
  defaultValue,
9778
9924
  onChange,
9779
9925
  errorMessage,
9780
- required,
9926
+ required = false,
9781
9927
  disabled,
9782
9928
  tip,
9783
9929
  label: label3,
9784
- "aria-required": ariaRequired,
9930
+ "aria-required": ariaRequired = false,
9785
9931
  "aria-describedby": ariaDescribedby,
9786
9932
  className,
9787
9933
  style,
@@ -9796,7 +9942,7 @@ var TextArea = forwardRef60(
9796
9942
  getDefaultText2(value, defaultValue)
9797
9943
  );
9798
9944
  useEffect17(() => {
9799
- if (textAreaRef && textAreaRef.current) {
9945
+ if (textAreaRef == null ? void 0 : textAreaRef.current) {
9800
9946
  textAreaRef.current.style.height = `${textAreaRef.current.scrollHeight + 2}px`;
9801
9947
  }
9802
9948
  }, [text]);
@@ -9965,7 +10111,18 @@ import {
9965
10111
  getBaseHTMLProps as getBaseHTMLProps47
9966
10112
  } from "@norges-domstoler/dds-core";
9967
10113
  import { jsx as jsx87 } from "react/jsx-runtime";
9968
- var Stack = styled76.div`
10114
+ var Stack = styled76.div.withConfig({
10115
+ shouldForwardProp: (prop) => {
10116
+ const styleOnlyProps = [
10117
+ "align",
10118
+ "direction",
10119
+ "gap",
10120
+ "justify",
10121
+ "padding"
10122
+ ];
10123
+ return !styleOnlyProps.some((p) => p === prop);
10124
+ }
10125
+ })`
9969
10126
  display: flex;
9970
10127
  flex-direction: ${({ direction }) => direction === "horizontal" ? "row" : "column"};
9971
10128
  align-items: ${(props) => props.align};
@@ -10360,9 +10517,11 @@ var useFileUploader = (props) => {
10360
10517
  () => ({
10361
10518
  onBlur: onRootBlur,
10362
10519
  onFocus: onRootFocus,
10520
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
10363
10521
  onDragEnter: onRootDragEnter,
10364
10522
  onDragOver: onRootDragOver,
10365
10523
  onDragLeave: onRootDragLeave,
10524
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
10366
10525
  onDrop: setFiles,
10367
10526
  ref: rootRef
10368
10527
  }),
@@ -10389,6 +10548,7 @@ var useFileUploader = (props) => {
10389
10548
  style: { display: "none" },
10390
10549
  tabIndex: -1,
10391
10550
  ref: inputRef,
10551
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
10392
10552
  onChange: setFiles,
10393
10553
  multiple: !maxFiles || maxFiles > 1,
10394
10554
  ...accept ? { accept: accept.join(",") } : {}
@@ -10412,14 +10572,14 @@ var Wrapper8 = styled79.div`
10412
10572
  `;
10413
10573
  var Root = styled79.div`
10414
10574
  box-sizing: border-box;
10415
- border-width: ${({ hasRootErrors }) => hasRootErrors ? "2px" : "1px"};
10575
+ border-width: ${({ $hasRootErrors: hasRootErrors }) => hasRootErrors ? "2px" : "1px"};
10416
10576
  border-style: dashed;
10417
- border-color: ${({ isDragActive, hasRootErrors }) => isDragActive ? rootTokens.dragActive.borderColor : hasRootErrors ? rootTokens.borderColorError : rootTokens.borderColor};
10418
- padding: ${({ hasRootErrors }) => hasRootErrors ? `calc(${rootTokens.paddingLeftRightTop} - 1px) calc(${rootTokens.paddingLeftRightTop} - 1px) ${rootTokens.paddingBottom}` : `${rootTokens.paddingLeftRightTop} ${rootTokens.paddingLeftRightTop} ${rootTokens.paddingBottom}`};
10577
+ border-color: ${({ $isDragActive, $hasRootErrors }) => $isDragActive ? rootTokens.dragActive.borderColor : $hasRootErrors ? rootTokens.borderColorError : rootTokens.borderColor};
10578
+ padding: ${({ $hasRootErrors }) => $hasRootErrors ? `calc(${rootTokens.paddingLeftRightTop} - 1px) calc(${rootTokens.paddingLeftRightTop} - 1px) ${rootTokens.paddingBottom}` : `${rootTokens.paddingLeftRightTop} ${rootTokens.paddingLeftRightTop} ${rootTokens.paddingBottom}`};
10419
10579
  display: flex;
10420
10580
  flex-direction: column;
10421
10581
  gap: ${rootTokens.gap};
10422
- background-color: ${({ isDragActive }) => isDragActive ? rootTokens.dragActive.backgroundColor : rootTokens.backgroundColor};
10582
+ background-color: ${({ $isDragActive }) => $isDragActive ? rootTokens.dragActive.backgroundColor : rootTokens.backgroundColor};
10423
10583
  `;
10424
10584
  var FileUploaderInput = styled79.input``;
10425
10585
  var FileListElement = styled79.ul`
@@ -10487,8 +10647,8 @@ var FileUploader = (props) => {
10487
10647
  Root,
10488
10648
  {
10489
10649
  ...getRootProps(),
10490
- isDragActive,
10491
- hasRootErrors,
10650
+ $isDragActive: isDragActive,
10651
+ $hasRootErrors: hasRootErrors,
10492
10652
  children: [
10493
10653
  /* @__PURE__ */ jsx90(FileUploaderInput, { ...getInputProps() }),
10494
10654
  "Dra og slipp filer her eller",
@@ -10597,35 +10757,22 @@ import { useEffect as useEffect19, useState as useState27 } from "react";
10597
10757
  import { Paragraph as Paragraph2 } from "@norges-domstoler/dds-typography";
10598
10758
 
10599
10759
  // src/components/Feedback/RatingComponent.tsx
10600
- import styled83, { css as css41 } from "styled-components";
10601
- import { ddsBaseTokens as ddsBaseTokens46 } from "@norges-domstoler/dds-design-tokens";
10602
- import { Thumbup, Thumbdown } from "@norges-domstoler/dds-icons";
10603
- import { Label as Label9 } from "@norges-domstoler/dds-typography";
10604
-
10605
- // src/components/Feedback/FlexContainer.tsx
10606
10760
  import styled82, { css as css40 } from "styled-components";
10607
10761
  import { ddsBaseTokens as ddsBaseTokens45 } from "@norges-domstoler/dds-design-tokens";
10608
- var FlexContainer = styled82.div`
10609
- display: flex;
10610
- ${({ flexDirection }) => css40`
10611
- flex-direction: ${flexDirection};
10612
- gap: ${ddsBaseTokens45.spacing.SizesDdsSpacingLocalX1};
10613
- `};
10614
- `;
10615
-
10616
- // src/components/Feedback/RatingComponent.tsx
10762
+ import { Thumbup, Thumbdown } from "@norges-domstoler/dds-icons";
10763
+ import { Label as Label9 } from "@norges-domstoler/dds-typography";
10617
10764
  import { jsx as jsx93, jsxs as jsxs54 } from "react/jsx-runtime";
10618
- var RatingContainer = styled83.div`
10765
+ var RatingContainer = styled82.div`
10619
10766
  display: flex;
10620
- gap: ${ddsBaseTokens46.spacing.SizesDdsSpacingLocalX1};
10621
- ${({ layout }) => css41`
10622
- flex-direction: ${layout === "horizontal" ? "row" : "column"};
10623
- align-items: ${layout === "horizontal" ? "center" : "start"};
10767
+ gap: ${ddsBaseTokens45.spacing.SizesDdsSpacingLocalX1};
10768
+ ${({ $layout }) => css40`
10769
+ flex-direction: ${$layout === "horizontal" ? "row" : "column"};
10770
+ align-items: ${$layout === "horizontal" ? "center" : "start"};
10624
10771
  `}
10625
10772
  `;
10626
- var RatingButton = styled83(Button)`
10773
+ var RatingButton = styled82(Button)`
10627
10774
  padding: 0px;
10628
- color: ${ddsBaseTokens46.colors.DdsColorNeutralsGray7};
10775
+ color: ${ddsBaseTokens45.colors.DdsColorNeutralsGray7};
10629
10776
  `;
10630
10777
  var RatingComponent = ({
10631
10778
  layout,
@@ -10635,9 +10782,9 @@ var RatingComponent = ({
10635
10782
  thumbDownTooltip,
10636
10783
  handleRatingChange
10637
10784
  }) => {
10638
- return /* @__PURE__ */ jsxs54(RatingContainer, { layout, children: [
10785
+ return /* @__PURE__ */ jsxs54(RatingContainer, { $layout: layout, children: [
10639
10786
  /* @__PURE__ */ jsx93(Label9, { children: ratingLabel }),
10640
- loading ? /* @__PURE__ */ jsx93(Spinner, { tooltip: "Laster opp tilbakemelding ..." }) : /* @__PURE__ */ jsxs54(FlexContainer, { flexDirection: "row", children: [
10787
+ loading ? /* @__PURE__ */ jsx93(Spinner, { tooltip: "Laster opp tilbakemelding ..." }) : /* @__PURE__ */ jsxs54(HStack, { gap: "layout-x1", children: [
10641
10788
  /* @__PURE__ */ jsx93(Tooltip, { text: thumbUpTooltip, children: /* @__PURE__ */ jsx93(
10642
10789
  RatingButton,
10643
10790
  {
@@ -10663,8 +10810,8 @@ var RatingComponent = ({
10663
10810
  };
10664
10811
 
10665
10812
  // src/components/Feedback/CommentComponent.tsx
10666
- import styled84 from "styled-components";
10667
- import { ddsBaseTokens as ddsBaseTokens47 } from "@norges-domstoler/dds-design-tokens";
10813
+ import styled83 from "styled-components";
10814
+ import { ddsBaseTokens as ddsBaseTokens46 } from "@norges-domstoler/dds-design-tokens";
10668
10815
  import {
10669
10816
  ThumbupFilled,
10670
10817
  ThumbdownFilled,
@@ -10672,10 +10819,10 @@ import {
10672
10819
  } from "@norges-domstoler/dds-icons";
10673
10820
  import { Paragraph } from "@norges-domstoler/dds-typography";
10674
10821
  import { jsx as jsx94, jsxs as jsxs55 } from "react/jsx-runtime";
10675
- var IconLabelSpan = styled84.span`
10822
+ var IconLabelSpan = styled83.span`
10676
10823
  display: inline-flex;
10677
10824
  align-items: center;
10678
- gap: ${ddsBaseTokens47.spacing.SizesDdsSpacingLocalX05};
10825
+ gap: ${ddsBaseTokens46.spacing.SizesDdsSpacingLocalX05};
10679
10826
  `;
10680
10827
  var CommentComponent = ({
10681
10828
  rating,
@@ -10687,13 +10834,13 @@ var CommentComponent = ({
10687
10834
  handleSubmit,
10688
10835
  handleFeedbackTextChange
10689
10836
  }) => {
10690
- return /* @__PURE__ */ jsxs55(FlexContainer, { flexDirection: "column", children: [
10837
+ return /* @__PURE__ */ jsxs55(VStack, { gap: "layout-x1", children: [
10691
10838
  /* @__PURE__ */ jsxs55(IconLabelSpan, { children: [
10692
10839
  /* @__PURE__ */ jsx94(
10693
10840
  Icon22,
10694
10841
  {
10695
10842
  icon: rating === "positive" ? ThumbupFilled : ThumbdownFilled,
10696
- color: ddsBaseTokens47.colors.DdsColorInteractiveBase
10843
+ color: ddsBaseTokens46.colors.DdsColorInteractiveBase
10697
10844
  }
10698
10845
  ),
10699
10846
  /* @__PURE__ */ jsxs55(Paragraph, { children: [