@norges-domstoler/dds-components 13.11.2 → 13.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5967,12 +5967,34 @@ var Card = (props) => {
5967
5967
  Card.displayName = "Card";
5968
5968
 
5969
5969
  // src/components/Card/CardAccordion/CardAccordion.tsx
5970
- var import_react47 = require("react");
5970
+ var import_react48 = require("react");
5971
5971
  var import_styled_components43 = __toESM(require("styled-components"));
5972
5972
  var import_dds_core47 = require("@norges-domstoler/dds-core");
5973
+
5974
+ // src/components/Card/CardAccordion/CardAccordionContext.tsx
5975
+ var import_react47 = require("react");
5973
5976
  var import_jsx_runtime50 = require("react/jsx-runtime");
5977
+ var CardAccordionContext = (0, import_react47.createContext)({});
5978
+ var CardAccordionContextProvider = ({
5979
+ children,
5980
+ ...values
5981
+ }) => {
5982
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CardAccordionContext.Provider, { value: values, children });
5983
+ };
5984
+ var useCardAccordionContext = () => {
5985
+ const context = (0, import_react47.useContext)(CardAccordionContext);
5986
+ if (!context) {
5987
+ throw new Error(
5988
+ "useCardAccordionContext must be used within a CardAccordionContextProvider. Have you wrapped <CardAccordionHeader> and <CardAccordionBody> inside a <CardAccordion>?"
5989
+ );
5990
+ }
5991
+ return context;
5992
+ };
5993
+
5994
+ // src/components/Card/CardAccordion/CardAccordion.tsx
5995
+ var import_jsx_runtime51 = require("react/jsx-runtime");
5974
5996
  var Wrapper4 = import_styled_components43.default.div``;
5975
- var CardAccordion = (0, import_react47.forwardRef)(
5997
+ var CardAccordion = (0, import_react48.forwardRef)(
5976
5998
  (props, ref) => {
5977
5999
  const {
5978
6000
  isExpanded = false,
@@ -5983,47 +6005,40 @@ var CardAccordion = (0, import_react47.forwardRef)(
5983
6005
  htmlProps,
5984
6006
  ...rest
5985
6007
  } = props;
5986
- const [expanded, setExpanded] = (0, import_react47.useState)(isExpanded);
5987
- const generatedId = (0, import_react47.useId)();
6008
+ const [expanded, setExpanded] = (0, import_react48.useState)(isExpanded);
6009
+ const generatedId = (0, import_react48.useId)();
5988
6010
  const accordionId = id != null ? id : `${generatedId}-cardAccordion`;
5989
- (0, import_react47.useEffect)(() => {
6011
+ (0, import_react48.useEffect)(() => {
5990
6012
  setExpanded(isExpanded);
5991
6013
  }, [isExpanded]);
5992
- const toggleExpanded = (0, import_react47.useCallback)(() => {
5993
- const newExpanded = !expanded;
5994
- setExpanded(newExpanded);
5995
- if (onChange) {
5996
- onChange(newExpanded);
5997
- }
5998
- }, [expanded, onChange]);
5999
- const Children9 = import_react47.Children.map(children, (child, childIndex) => {
6000
- const headerId = `${accordionId}-header`;
6001
- const bodyId = `${accordionId}-body`;
6002
- return (0, import_react47.isValidElement)(child) && (childIndex === 0 ? (0, import_react47.cloneElement)(child, {
6014
+ const toggleExpanded = (0, import_react48.useCallback)(() => {
6015
+ setExpanded((prevExpanded) => {
6016
+ const newExpanded = !prevExpanded;
6017
+ if (onChange) {
6018
+ onChange(newExpanded);
6019
+ }
6020
+ return newExpanded;
6021
+ });
6022
+ }, [onChange]);
6023
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Wrapper4, { ...(0, import_dds_core47.getBaseHTMLProps)(id, className, htmlProps, rest), ref, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6024
+ CardAccordionContextProvider,
6025
+ {
6026
+ headerId: `${accordionId}-header`,
6027
+ bodyId: `${accordionId}-body`,
6003
6028
  isExpanded: expanded,
6004
6029
  toggleExpanded,
6005
- id: headerId,
6006
- bodyId
6007
- }) : (0, import_react47.cloneElement)(child, {
6008
- isExpanded: expanded,
6009
- id: bodyId,
6010
- headerId
6011
- }));
6012
- });
6013
- const wrapperProps = {
6014
- ...(0, import_dds_core47.getBaseHTMLProps)(id, className, htmlProps, rest),
6015
- ref
6016
- };
6017
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Wrapper4, { ...wrapperProps, children: Children9 });
6030
+ children
6031
+ }
6032
+ ) });
6018
6033
  }
6019
6034
  );
6020
6035
  CardAccordion.displayName = "CardAccordion";
6021
6036
 
6022
6037
  // src/components/Card/CardAccordion/CardAccordionHeader.tsx
6023
- var import_react48 = require("react");
6038
+ var import_react49 = require("react");
6024
6039
  var import_styled_components44 = __toESM(require("styled-components"));
6025
6040
 
6026
- // src/components/Card/CardAccordion/CardAccordion.tokens.tsx
6041
+ // src/components/Card/CardAccordion/CardAccordion.tokens.ts
6027
6042
  var import_dds_design_tokens21 = require("@norges-domstoler/dds-design-tokens");
6028
6043
  var { spacing: spacing18, border: border8, iconSizes: iconSizes5 } = import_dds_design_tokens21.ddsBaseTokens;
6029
6044
  var typographyTypes4 = {
@@ -6060,7 +6075,7 @@ var cardAccordionTokens = {
6060
6075
  // src/components/Card/CardAccordion/CardAccordionHeader.tsx
6061
6076
  var import_dds_core48 = require("@norges-domstoler/dds-core");
6062
6077
  var import_dds_typography24 = require("@norges-domstoler/dds-typography");
6063
- var import_jsx_runtime51 = require("react/jsx-runtime");
6078
+ var import_jsx_runtime52 = require("react/jsx-runtime");
6064
6079
  var { header: header2, chevronWrapper: chevronWrapper2 } = cardAccordionTokens;
6065
6080
  var ContentWrapper = import_styled_components44.default.div`
6066
6081
  text-align: left;
@@ -6113,13 +6128,9 @@ var ChevronWrapper = import_styled_components44.default.span`
6113
6128
  height: ${chevronWrapper2.height};
6114
6129
  margin-left: ${chevronWrapper2.marginLeft};
6115
6130
  `;
6116
- var CardAccordionHeader = (0, import_react48.forwardRef)((props, ref) => {
6131
+ var CardAccordionHeader = (0, import_react49.forwardRef)((props, ref) => {
6117
6132
  const {
6118
6133
  children,
6119
- isExpanded = false,
6120
- toggleExpanded,
6121
- bodyId,
6122
- id,
6123
6134
  className,
6124
6135
  htmlProps,
6125
6136
  padding,
@@ -6127,32 +6138,33 @@ var CardAccordionHeader = (0, import_react48.forwardRef)((props, ref) => {
6127
6138
  bold,
6128
6139
  ...rest
6129
6140
  } = props;
6130
- const handleClick = () => {
6131
- if (toggleExpanded) {
6132
- toggleExpanded();
6133
- }
6134
- };
6141
+ const {
6142
+ headerId: id,
6143
+ bodyId,
6144
+ toggleExpanded,
6145
+ isExpanded
6146
+ } = useCardAccordionContext();
6135
6147
  const headerWrapperProps = {
6136
6148
  ...(0, import_dds_core48.getBaseHTMLProps)(id, className, htmlProps, rest),
6137
6149
  "aria-expanded": isExpanded,
6138
6150
  "aria-controls": bodyId,
6139
6151
  ref,
6140
- onClick: handleClick
6152
+ onClick: toggleExpanded
6141
6153
  };
6142
6154
  const chevronProps = {
6143
6155
  isUp: isExpanded,
6144
6156
  width: cardAccordionTokens.chevron.width,
6145
6157
  height: cardAccordionTokens.chevron.height
6146
6158
  };
6147
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(HeaderWrapperButton, { ...headerWrapperProps, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
6159
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(HeaderWrapperButton, { ...headerWrapperProps, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
6148
6160
  HeaderContainer,
6149
6161
  {
6150
6162
  typographyType: typographyType7,
6151
6163
  padding,
6152
6164
  bold,
6153
6165
  children: [
6154
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ContentWrapper, { children }),
6155
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChevronWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_dds_core48.AnimatedChevronUpDown, { ...chevronProps }) })
6166
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ContentWrapper, { children }),
6167
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ChevronWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dds_core48.AnimatedChevronUpDown, { ...chevronProps }) })
6156
6168
  ]
6157
6169
  }
6158
6170
  ) });
@@ -6160,16 +6172,16 @@ var CardAccordionHeader = (0, import_react48.forwardRef)((props, ref) => {
6160
6172
  CardAccordionHeader.displayName = "CardAccordionHeader";
6161
6173
 
6162
6174
  // src/components/Card/CardAccordion/CardAccordionBody.tsx
6163
- var import_react50 = require("react");
6175
+ var import_react51 = require("react");
6164
6176
  var import_styled_components45 = __toESM(require("styled-components"));
6165
6177
  var import_dds_core49 = require("@norges-domstoler/dds-core");
6166
6178
  var import_dds_typography25 = require("@norges-domstoler/dds-typography");
6167
6179
 
6168
6180
  // src/components/Card/CardAccordion/useElementHeight.ts
6169
- var import_react49 = require("react");
6181
+ var import_react50 = require("react");
6170
6182
  function useElementHeight(element3) {
6171
- const [height, setHeight] = (0, import_react49.useState)(null);
6172
- (0, import_react49.useEffect)(() => {
6183
+ const [height, setHeight] = (0, import_react50.useState)(null);
6184
+ (0, import_react50.useEffect)(() => {
6173
6185
  if (!element3)
6174
6186
  return;
6175
6187
  const resizeObserver = new ResizeObserver(() => {
@@ -6182,7 +6194,7 @@ function useElementHeight(element3) {
6182
6194
  }
6183
6195
 
6184
6196
  // src/components/Card/CardAccordion/CardAccordionBody.tsx
6185
- var import_jsx_runtime52 = require("react/jsx-runtime");
6197
+ var import_jsx_runtime53 = require("react/jsx-runtime");
6186
6198
  var expandingAnimation = import_styled_components45.css`
6187
6199
  @media (prefers-reduced-motion: no-preference) {
6188
6200
  transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
@@ -6197,6 +6209,9 @@ var Body2 = import_styled_components45.default.div.withConfig({
6197
6209
  return prop !== "animate" && prop !== "height" && prop !== "isExpanded";
6198
6210
  }
6199
6211
  })`
6212
+ ${({ isExpanded }) => !isExpanded && import_styled_components45.css`
6213
+ display: none;
6214
+ `}
6200
6215
  @media (prefers-reduced-motion: no-preference) {
6201
6216
  ${({ animate }) => animate && expandingAnimation}
6202
6217
  }
@@ -6222,62 +6237,54 @@ var BodyContainer = import_styled_components45.default.div.withConfig({
6222
6237
  padding-top: ${paddingTop};
6223
6238
  `}
6224
6239
  `;
6225
- var CardAccordionBody = (0, import_react50.forwardRef)((props, ref) => {
6240
+ var CardAccordionBody = (0, import_react51.forwardRef)((props, ref) => {
6226
6241
  var _a;
6227
- const {
6228
- children,
6229
- isExpanded,
6230
- headerId,
6231
- id,
6232
- className,
6233
- htmlProps,
6234
- padding,
6235
- paddingTop,
6236
- ...rest
6237
- } = props;
6238
- const bodyRef = (0, import_react50.useRef)(null);
6239
- const [animate, setAnimate] = (0, import_react50.useState)(false);
6242
+ const { children, className, htmlProps, padding, paddingTop, ...rest } = props;
6243
+ const { headerId, isExpanded, bodyId: id } = useCardAccordionContext();
6244
+ const bodyRef = (0, import_react51.useRef)(null);
6245
+ const [animate, setAnimate] = (0, import_react51.useState)(false);
6240
6246
  const isMounted = (0, import_dds_core49.useIsMounted)();
6241
6247
  const height = useElementHeight(bodyRef.current);
6242
- const [initialExpandedHeight, setIntialExpandedHeight] = (0, import_react50.useState)(null);
6243
- (0, import_react50.useLayoutEffect)(() => {
6248
+ const [initialExpandedHeight, setIntialExpandedHeight] = (0, import_react51.useState)(null);
6249
+ (0, import_react51.useLayoutEffect)(() => {
6244
6250
  if (bodyRef.current && isExpanded) {
6245
6251
  setIntialExpandedHeight(bodyRef.current.scrollHeight);
6246
6252
  }
6247
6253
  }, []);
6248
- (0, import_react50.useEffect)(() => {
6254
+ (0, import_react51.useEffect)(() => {
6249
6255
  if (isMounted()) {
6250
6256
  setAnimate(true);
6251
6257
  }
6252
6258
  }, [isMounted]);
6253
- const bodyProps = {
6254
- ...(0, import_dds_core49.getBaseHTMLProps)(id, className, htmlProps, rest),
6255
- ref,
6256
- isExpanded,
6257
- role: "region",
6258
- height: (_a = height != null ? height : initialExpandedHeight) != null ? _a : 0
6259
- };
6260
- const bodyContainerProps = {
6261
- ref: bodyRef,
6262
- isExpanded,
6263
- padding,
6264
- paddingTop
6265
- };
6266
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
6259
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
6267
6260
  Body2,
6268
6261
  {
6269
- ...bodyProps,
6262
+ ...(0, import_dds_core49.getBaseHTMLProps)(id, className, htmlProps, rest),
6263
+ ref,
6264
+ isExpanded,
6265
+ role: "region",
6266
+ height: (_a = height != null ? height : initialExpandedHeight) != null ? _a : 0,
6270
6267
  animate,
6271
6268
  "aria-labelledby": headerId,
6272
6269
  "aria-hidden": !isExpanded,
6273
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(BodyContainer, { ...bodyContainerProps, animate, children })
6270
+ children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
6271
+ BodyContainer,
6272
+ {
6273
+ ref: bodyRef,
6274
+ isExpanded,
6275
+ padding,
6276
+ paddingTop,
6277
+ animate,
6278
+ children
6279
+ }
6280
+ )
6274
6281
  }
6275
6282
  );
6276
6283
  });
6277
6284
  CardAccordionBody.displayName = "CardAccordionBody";
6278
6285
 
6279
6286
  // src/components/InternalHeader/InternalHeader.tsx
6280
- var import_react53 = require("react");
6287
+ var import_react54 = require("react");
6281
6288
  var import_dds_typography27 = require("@norges-domstoler/dds-typography");
6282
6289
 
6283
6290
  // src/components/InternalHeader/InternalHeader.styles.tsx
@@ -6403,11 +6410,11 @@ var StyledOverflowMenu = (0, import_styled_components46.default)(OverflowMenu)`
6403
6410
  `;
6404
6411
 
6405
6412
  // src/components/InternalHeader/NavigationItem.tsx
6406
- var import_react51 = require("react");
6413
+ var import_react52 = require("react");
6407
6414
  var import_styled_components47 = __toESM(require("styled-components"));
6408
6415
  var import_dds_typography26 = require("@norges-domstoler/dds-typography");
6409
6416
  var import_dds_form16 = require("@norges-domstoler/dds-form");
6410
- var import_jsx_runtime53 = require("react/jsx-runtime");
6417
+ var import_jsx_runtime54 = require("react/jsx-runtime");
6411
6418
  var { navLink: navLink2 } = internalHeaderTokens;
6412
6419
  var Link2 = import_styled_components47.default.a.withConfig({
6413
6420
  shouldForwardProp: (prop) => prop !== "isCurrent"
@@ -6442,34 +6449,34 @@ var Link2 = import_styled_components47.default.a.withConfig({
6442
6449
  }
6443
6450
  `}
6444
6451
  `;
6445
- var NavigationItem2 = (0, import_react51.forwardRef)(({ title: title3, isCurrent, ...rest }, ref) => {
6452
+ var NavigationItem2 = (0, import_react52.forwardRef)(({ title: title3, isCurrent, ...rest }, ref) => {
6446
6453
  const linkProps = {
6447
6454
  ref,
6448
6455
  isCurrent,
6449
6456
  ...rest
6450
6457
  };
6451
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Link2, { ...linkProps, "aria-current": isCurrent ? "page" : void 0, children: title3 });
6458
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Link2, { ...linkProps, "aria-current": isCurrent ? "page" : void 0, children: title3 });
6452
6459
  });
6453
6460
 
6454
6461
  // src/components/InternalHeader/InternalHeaderListItem.tsx
6455
- var import_react52 = require("react");
6462
+ var import_react53 = require("react");
6456
6463
  var import_styled_components48 = __toESM(require("styled-components"));
6457
- var import_jsx_runtime54 = require("react/jsx-runtime");
6464
+ var import_jsx_runtime55 = require("react/jsx-runtime");
6458
6465
  var Li = import_styled_components48.default.li`
6459
6466
  box-sizing: border-box;
6460
6467
  `;
6461
- var InternalHeaderListItem = (0, import_react52.forwardRef)(({ children, ...rest }, ref) => {
6468
+ var InternalHeaderListItem = (0, import_react53.forwardRef)(({ children, ...rest }, ref) => {
6462
6469
  const props = {
6463
6470
  ref,
6464
6471
  ...rest
6465
6472
  };
6466
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Li, { ...props, children });
6473
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Li, { ...props, children });
6467
6474
  });
6468
6475
 
6469
6476
  // src/components/InternalHeader/InternalHeader.tsx
6470
6477
  var import_dds_core51 = require("@norges-domstoler/dds-core");
6471
6478
  var import_dds_icons26 = require("@norges-domstoler/dds-icons");
6472
- var import_jsx_runtime55 = require("react/jsx-runtime");
6479
+ var import_jsx_runtime56 = require("react/jsx-runtime");
6473
6480
  var InternalHeader = (props) => {
6474
6481
  const {
6475
6482
  applicationDesc,
@@ -6485,11 +6492,11 @@ var InternalHeader = (props) => {
6485
6492
  htmlProps,
6486
6493
  ...rest
6487
6494
  } = props;
6488
- const [contextMenuIsClosed, setContextMenuIsClosed] = (0, import_react53.useState)(true);
6489
- const [currentPage, setCurrentPage] = (0, import_react53.useState)(
6495
+ const [contextMenuIsClosed, setContextMenuIsClosed] = (0, import_react54.useState)(true);
6496
+ const [currentPage, setCurrentPage] = (0, import_react54.useState)(
6490
6497
  currentPageHref
6491
6498
  );
6492
- const buttonRef = (0, import_react53.useRef)(null);
6499
+ const buttonRef = (0, import_react54.useRef)(null);
6493
6500
  const handleCurrentPageChange = (href) => {
6494
6501
  setCurrentPage(href);
6495
6502
  onCurrentPageChange && onCurrentPageChange();
@@ -6501,10 +6508,10 @@ var InternalHeader = (props) => {
6501
6508
  const hasNavigationElements = !!navigationElements && navigationElements.length > 0;
6502
6509
  const hasContextMenuElements = !!contextMenuElements && contextMenuElements.length > 0;
6503
6510
  const hasNavInContextMenu = smallScreen && hasNavigationElements;
6504
- const navigation4 = hasNavigationElements && !smallScreen ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Navigation2, { "aria-label": "sidenavigasjon", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NavigationList, { children: navigationElements.map((item, index) => {
6511
+ const navigation4 = hasNavigationElements && !smallScreen ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Navigation2, { "aria-label": "sidenavigasjon", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(NavigationList, { children: navigationElements.map((item, index) => {
6505
6512
  const { href, ...rest2 } = item;
6506
6513
  const isCurrent = href === currentPage;
6507
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(InternalHeaderListItem, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6514
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(InternalHeaderListItem, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
6508
6515
  NavigationItem2,
6509
6516
  {
6510
6517
  href,
@@ -6515,14 +6522,14 @@ var InternalHeader = (props) => {
6515
6522
  ) }, index);
6516
6523
  }) }) }) : null;
6517
6524
  const hasContextMenu = hasContextMenuElements || !!userProps || hasNavInContextMenu;
6518
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(OuterContainer3, { ...(0, import_dds_core51.getBaseHTMLProps)(id, className, htmlProps, rest), children: [
6519
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(BannerWrapper, { $hasContextMenu: hasContextMenu, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(BannerLeftWrapper, { children: [
6520
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(LovisaWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dds_typography27.Typography, { typographyType: "bodySans02", bold: true, as: "span", children: applicationName }) }),
6521
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ApplicationNameWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dds_typography27.Typography, { typographyType: "bodySans02", as: "span", children: applicationDesc }) })
6525
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(OuterContainer3, { ...(0, import_dds_core51.getBaseHTMLProps)(id, className, htmlProps, rest), children: [
6526
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(BannerWrapper, { $hasContextMenu: hasContextMenu, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(BannerLeftWrapper, { children: [
6527
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(LovisaWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_dds_typography27.Typography, { typographyType: "bodySans02", bold: true, as: "span", children: applicationName }) }),
6528
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ApplicationNameWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_dds_typography27.Typography, { typographyType: "bodySans02", as: "span", children: applicationDesc }) })
6522
6529
  ] }) }),
6523
6530
  navigation4,
6524
- hasContextMenu && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(ContextMenuGroup, { children: [
6525
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6531
+ hasContextMenu && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(ContextMenuGroup, { children: [
6532
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
6526
6533
  Button,
6527
6534
  {
6528
6535
  ref: buttonRef,
@@ -6535,7 +6542,7 @@ var InternalHeader = (props) => {
6535
6542
  "aria-label": "\xE5pne meny"
6536
6543
  }
6537
6544
  ),
6538
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6545
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
6539
6546
  StyledOverflowMenu,
6540
6547
  {
6541
6548
  isOpen: !contextMenuIsClosed,
@@ -6552,7 +6559,7 @@ var InternalHeader = (props) => {
6552
6559
  InternalHeader.displayName = "InternalHeader";
6553
6560
 
6554
6561
  // src/components/Datepicker/Datepicker.tsx
6555
- var import_react54 = require("react");
6562
+ var import_react55 = require("react");
6556
6563
  var import_dds_core52 = require("@norges-domstoler/dds-core");
6557
6564
  var import_dds_typography28 = require("@norges-domstoler/dds-typography");
6558
6565
  var import_styled_components49 = __toESM(require("styled-components"));
@@ -6596,7 +6603,7 @@ var datepickerTokens = {
6596
6603
  };
6597
6604
 
6598
6605
  // src/components/Datepicker/Datepicker.tsx
6599
- var import_jsx_runtime56 = require("react/jsx-runtime");
6606
+ var import_jsx_runtime57 = require("react/jsx-runtime");
6600
6607
  var StyledInput2 = (0, import_styled_components49.default)(import_dds_form17.StatefulInput)`
6601
6608
  &::-webkit-calendar-picker-indicator {
6602
6609
  background-image: ${`url('${calendar_today_default}')`};
@@ -6644,7 +6651,7 @@ var StyledInput2 = (0, import_styled_components49.default)(import_dds_form17.Sta
6644
6651
  ${import_dds_core52.selection}
6645
6652
  }
6646
6653
  `;
6647
- var Datepicker = (0, import_react54.forwardRef)(
6654
+ var Datepicker = (0, import_react55.forwardRef)(
6648
6655
  ({
6649
6656
  id,
6650
6657
  type = "date",
@@ -6663,7 +6670,7 @@ var Datepicker = (0, import_react54.forwardRef)(
6663
6670
  "aria-describedby": ariaDescribedby,
6664
6671
  ...rest
6665
6672
  }, ref) => {
6666
- const generatedId = (0, import_react54.useId)();
6673
+ const generatedId = (0, import_react55.useId)();
6667
6674
  const uniqueId = id != null ? id : `${generatedId}-datepickerInput`;
6668
6675
  const componentWidth = width ? width : getWidth2(type, componentSize);
6669
6676
  const hasLabel = !!label3;
@@ -6696,9 +6703,9 @@ var Datepicker = (0, import_react54.forwardRef)(
6696
6703
  style,
6697
6704
  className
6698
6705
  };
6699
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_dds_form17.OuterInputContainer, { ...outerinputContainerProps, children: [
6700
- hasLabel && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_dds_typography28.Label, { htmlFor: uniqueId, showRequiredStyling: !!showRequiredStyling, children: label3 }),
6701
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(StyledInput2, { ...inputProps }),
6706
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_dds_form17.OuterInputContainer, { ...outerinputContainerProps, children: [
6707
+ hasLabel && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_dds_typography28.Label, { htmlFor: uniqueId, showRequiredStyling: !!showRequiredStyling, children: label3 }),
6708
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(StyledInput2, { ...inputProps }),
6702
6709
  renderInputMessage(tip, tipId, errorMessage, errorMessageId)
6703
6710
  ] });
6704
6711
  }
@@ -6730,7 +6737,7 @@ var getMax = (type, max) => {
6730
6737
  };
6731
6738
 
6732
6739
  // src/components/SkipToContent/SkipToContent.tsx
6733
- var import_react55 = require("react");
6740
+ var import_react56 = require("react");
6734
6741
  var import_styled_components50 = __toESM(require("styled-components"));
6735
6742
  var import_dds_core53 = require("@norges-domstoler/dds-core");
6736
6743
  var import_dds_typography29 = require("@norges-domstoler/dds-typography");
@@ -6757,7 +6764,7 @@ var skipToContentTokens = {
6757
6764
  };
6758
6765
 
6759
6766
  // src/components/SkipToContent/SkipToContent.tsx
6760
- var import_jsx_runtime57 = require("react/jsx-runtime");
6767
+ var import_jsx_runtime58 = require("react/jsx-runtime");
6761
6768
  var { wrapper: wrapper2, link: link4 } = skipToContentTokens;
6762
6769
  var Wrapper5 = import_styled_components50.default.div`
6763
6770
  box-sizing: border-box;
@@ -6801,7 +6808,7 @@ var Link3 = import_styled_components50.default.a`
6801
6808
  color: ${link4.base.color};
6802
6809
  }
6803
6810
  `;
6804
- var SkipToContent = (0, import_react55.forwardRef)(
6811
+ var SkipToContent = (0, import_react56.forwardRef)(
6805
6812
  (props, ref) => {
6806
6813
  const {
6807
6814
  text = "Til hovedinnhold",
@@ -6816,13 +6823,13 @@ var SkipToContent = (0, import_react55.forwardRef)(
6816
6823
  style,
6817
6824
  ...restHtmlProps
6818
6825
  } = htmlProps;
6819
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
6826
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6820
6827
  Wrapper5,
6821
6828
  {
6822
6829
  $top: top,
6823
6830
  className: (0, import_dds_core53.cn)(className, htmlPropsClassName),
6824
6831
  style,
6825
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Link3, { ...(0, import_dds_core53.getBaseHTMLProps)(id, restHtmlProps, rest), ref, children: text })
6832
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Link3, { ...(0, import_dds_core53.getBaseHTMLProps)(id, restHtmlProps, rest), ref, children: text })
6826
6833
  }
6827
6834
  );
6828
6835
  }
@@ -6830,7 +6837,7 @@ var SkipToContent = (0, import_react55.forwardRef)(
6830
6837
  SkipToContent.displayName = "SkipToContent";
6831
6838
 
6832
6839
  // src/components/Tooltip/Tooltip.tsx
6833
- var import_react56 = require("react");
6840
+ var import_react57 = require("react");
6834
6841
  var import_dds_core56 = require("@norges-domstoler/dds-core");
6835
6842
  var import_dds_core57 = require("@norges-domstoler/dds-core");
6836
6843
  var import_dds_core58 = require("@norges-domstoler/dds-core");
@@ -6881,9 +6888,9 @@ var TooltipWrapper = (0, import_styled_components51.default)(import_dds_core54.P
6881
6888
  `;
6882
6889
 
6883
6890
  // src/components/Tooltip/Tooltip.tsx
6884
- var import_jsx_runtime58 = require("react/jsx-runtime");
6891
+ var import_jsx_runtime59 = require("react/jsx-runtime");
6885
6892
  var { svgArrow: svgArrow2 } = tooltipTokens;
6886
- var Tooltip = (0, import_react56.forwardRef)(
6893
+ var Tooltip = (0, import_react57.forwardRef)(
6887
6894
  (props, ref) => {
6888
6895
  const {
6889
6896
  text,
@@ -6899,21 +6906,21 @@ var Tooltip = (0, import_react56.forwardRef)(
6899
6906
  htmlProps,
6900
6907
  ...rest
6901
6908
  } = props;
6902
- const generatedId = (0, import_react56.useId)();
6909
+ const generatedId = (0, import_react57.useId)();
6903
6910
  const uniqueTooltipId = tooltipId != null ? tooltipId : `${generatedId}-tooltip`;
6904
- const [open, setOpen] = (0, import_react56.useState)(false);
6905
- const [inView, setInView] = (0, import_react56.useState)(false);
6906
- const [arrowElement, setArrowElement] = (0, import_react56.useState)(null);
6911
+ const [open, setOpen] = (0, import_react57.useState)(false);
6912
+ const [inView, setInView] = (0, import_react57.useState)(false);
6913
+ const [arrowElement, setArrowElement] = (0, import_react57.useState)(null);
6907
6914
  const { refs, styles } = (0, import_dds_core56.useFloatPosition)(arrowElement, {
6908
6915
  placement
6909
6916
  });
6910
- const tooltipRef = (0, import_react56.useRef)(null);
6917
+ const tooltipRef = (0, import_react57.useRef)(null);
6911
6918
  const combinedRef = (0, import_dds_core56.useCombinedRef)(ref, refs.setFloating, tooltipRef);
6912
6919
  const closeWhenNotInView = (entries) => {
6913
6920
  const [entry] = entries;
6914
6921
  entry.isIntersecting ? setInView(true) : setInView(false);
6915
6922
  };
6916
- (0, import_react56.useEffect)(() => {
6923
+ (0, import_react57.useEffect)(() => {
6917
6924
  const options = {
6918
6925
  root: null,
6919
6926
  rootMargin: "0px"
@@ -6927,7 +6934,7 @@ var Tooltip = (0, import_react56.forwardRef)(
6927
6934
  observer.unobserve(ref2);
6928
6935
  };
6929
6936
  }, [tooltipRef]);
6930
- (0, import_react56.useEffect)(() => {
6937
+ (0, import_react57.useEffect)(() => {
6931
6938
  if (tooltipRef.current) {
6932
6939
  window.addEventListener("scroll", () => {
6933
6940
  closeTooltip();
@@ -6941,7 +6948,7 @@ var Tooltip = (0, import_react56.forwardRef)(
6941
6948
  };
6942
6949
  }, []);
6943
6950
  let timer;
6944
- (0, import_react56.useEffect)(() => {
6951
+ (0, import_react57.useEffect)(() => {
6945
6952
  return () => {
6946
6953
  clearTimeout(timer);
6947
6954
  };
@@ -6961,8 +6968,8 @@ var Tooltip = (0, import_react56.forwardRef)(
6961
6968
  }
6962
6969
  };
6963
6970
  const anchorProps = children.props;
6964
- const anchorElement = import_react56.Children.only(
6965
- (0, import_react56.isValidElement)(children) && (0, import_react56.cloneElement)(children, {
6971
+ const anchorElement = import_react57.Children.only(
6972
+ (0, import_react57.isValidElement)(children) && (0, import_react57.cloneElement)(children, {
6966
6973
  ref: refs.setReference,
6967
6974
  onFocus: (0, import_dds_core58.combineHandlers)(openTooltip, anchorProps.onFocus),
6968
6975
  onBlur: (0, import_dds_core58.combineHandlers)(closeTooltip, anchorProps.onBlur),
@@ -6987,19 +6994,19 @@ var Tooltip = (0, import_react56.forwardRef)(
6987
6994
  ref: setArrowElement,
6988
6995
  style: styles.arrow
6989
6996
  };
6990
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Container7, { ...containerProps, children: [
6997
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Container7, { ...containerProps, children: [
6991
6998
  anchorElement,
6992
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(TooltipWrapper, { ...wrapperProps, elevation: 1, border: "light", children: [
6999
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(TooltipWrapper, { ...wrapperProps, elevation: 1, border: "light", children: [
6993
7000
  text,
6994
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ArrowWrapper, { ...arrowWrapperProps, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(SvgArrow, { children: [
6995
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
7001
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ArrowWrapper, { ...arrowWrapperProps, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(SvgArrow, { children: [
7002
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6996
7003
  "path",
6997
7004
  {
6998
7005
  d: "M16.586 6.586L10 0h16.154a.373.373 0 00-.263.11l-6.477 6.476a2 2 0 01-2.828 0z",
6999
7006
  fill: svgArrow2.background.fill
7000
7007
  }
7001
7008
  ),
7002
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
7009
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
7003
7010
  "path",
7004
7011
  {
7005
7012
  fillRule: "evenodd",
@@ -7016,7 +7023,7 @@ var Tooltip = (0, import_react56.forwardRef)(
7016
7023
  Tooltip.displayName = "Tooltip";
7017
7024
 
7018
7025
  // src/components/Modal/Modal.tsx
7019
- var import_react57 = require("react");
7026
+ var import_react58 = require("react");
7020
7027
  var import_styled_components53 = __toESM(require("styled-components"));
7021
7028
 
7022
7029
  // src/components/Modal/Modal.tokens.tsx
@@ -7094,7 +7101,7 @@ function handleElementWithBackdropUnmount(container16) {
7094
7101
  }
7095
7102
 
7096
7103
  // src/components/Modal/Modal.tsx
7097
- var import_jsx_runtime59 = require("react/jsx-runtime");
7104
+ var import_jsx_runtime60 = require("react/jsx-runtime");
7098
7105
  var { container: container10, contentContainer: contentContainer4 } = modalTokens;
7099
7106
  var Container8 = (0, import_styled_components53.default)(import_dds_core60.Paper)`
7100
7107
  display: flex;
@@ -7119,7 +7126,7 @@ var HeaderContainer2 = import_styled_components53.default.div``;
7119
7126
  var StyledButton2 = (0, import_styled_components53.default)(Button)`
7120
7127
  align-self: flex-end;
7121
7128
  `;
7122
- var Modal = (0, import_react57.forwardRef)((props, ref) => {
7129
+ var Modal = (0, import_react58.forwardRef)((props, ref) => {
7123
7130
  const {
7124
7131
  isOpen = false,
7125
7132
  parentElement = document.body,
@@ -7133,7 +7140,7 @@ var Modal = (0, import_react57.forwardRef)((props, ref) => {
7133
7140
  htmlProps,
7134
7141
  ...rest
7135
7142
  } = props;
7136
- const generatedId = (0, import_react57.useId)();
7143
+ const generatedId = (0, import_react58.useId)();
7137
7144
  const modalId = id != null ? id : `${generatedId}-modal`;
7138
7145
  const headerId = `${modalId}-header`;
7139
7146
  const modalRef = (0, import_dds_core60.useFocusTrap)(isOpen, initialFocusRef);
@@ -7145,7 +7152,7 @@ var Modal = (0, import_react57.forwardRef)((props, ref) => {
7145
7152
  onClose();
7146
7153
  }
7147
7154
  };
7148
- (0, import_react57.useEffect)(() => {
7155
+ (0, import_react58.useEffect)(() => {
7149
7156
  if (isOpen) {
7150
7157
  handleElementWithBackdropMount(document.body);
7151
7158
  } else {
@@ -7157,7 +7164,7 @@ var Modal = (0, import_react57.forwardRef)((props, ref) => {
7157
7164
  (0, import_dds_core60.useOnKeyDown)(["Escape", "Esc"], () => handleClose());
7158
7165
  const hasTransitionedIn = (0, import_dds_core60.useMountTransition)(isOpen, 200);
7159
7166
  return isOpen || hasTransitionedIn ? (0, import_react_dom.createPortal)(
7160
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Backdrop, { isOpen: hasTransitionedIn && isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
7167
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Backdrop, { isOpen: hasTransitionedIn && isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
7161
7168
  Container8,
7162
7169
  {
7163
7170
  ...(0, import_dds_core60.getBaseHTMLProps)(id, className, htmlProps, rest),
@@ -7170,11 +7177,11 @@ var Modal = (0, import_react57.forwardRef)((props, ref) => {
7170
7177
  id: modalId,
7171
7178
  elevation: 4,
7172
7179
  children: [
7173
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(ContentContainer2, { children: [
7174
- header3 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(HeaderContainer2, { id: headerId, children: typeof header3 === "string" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_dds_typography31.Typography, { typographyType: "headingSans03", children: header3 }) : header3 }),
7180
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(ContentContainer2, { children: [
7181
+ header3 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HeaderContainer2, { id: headerId, children: typeof header3 === "string" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_dds_typography31.Typography, { typographyType: "headingSans03", children: header3 }) : header3 }),
7175
7182
  children
7176
7183
  ] }),
7177
- onClose && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
7184
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
7178
7185
  StyledButton2,
7179
7186
  {
7180
7187
  size: "small",
@@ -7194,45 +7201,45 @@ var Modal = (0, import_react57.forwardRef)((props, ref) => {
7194
7201
  Modal.displayName = "Modal";
7195
7202
 
7196
7203
  // src/components/Modal/ModalBody.tsx
7197
- var import_react58 = require("react");
7204
+ var import_react59 = require("react");
7198
7205
  var import_styled_components54 = __toESM(require("styled-components"));
7199
7206
  var import_dds_core61 = require("@norges-domstoler/dds-core");
7200
- var import_jsx_runtime60 = require("react/jsx-runtime");
7207
+ var import_jsx_runtime61 = require("react/jsx-runtime");
7201
7208
  var Container9 = import_styled_components54.default.div``;
7202
- var ModalBody = (0, import_react58.forwardRef)(
7209
+ var ModalBody = (0, import_react59.forwardRef)(
7203
7210
  (props, ref) => {
7204
7211
  const { children, scrollable, id, className, htmlProps, height, ...rest } = props;
7205
7212
  const containerProps = {
7206
7213
  ...(0, import_dds_core61.getBaseHTMLProps)(id, className, htmlProps, rest),
7207
7214
  ref
7208
7215
  };
7209
- return scrollable ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Container9, { ...containerProps, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ScrollableContainer, { contentHeight: height, children }) }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Container9, { ...containerProps, children });
7216
+ return scrollable ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Container9, { ...containerProps, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ScrollableContainer, { contentHeight: height, children }) }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Container9, { ...containerProps, children });
7210
7217
  }
7211
7218
  );
7212
7219
  ModalBody.displayName = "ModalBody";
7213
7220
 
7214
7221
  // src/components/Modal/ModalActions.tsx
7215
- var import_react59 = require("react");
7222
+ var import_react60 = require("react");
7216
7223
  var import_styled_components55 = __toESM(require("styled-components"));
7217
- var import_jsx_runtime61 = require("react/jsx-runtime");
7224
+ var import_jsx_runtime62 = require("react/jsx-runtime");
7218
7225
  var Container10 = import_styled_components55.default.div`
7219
7226
  display: flex;
7220
7227
  flex-wrap: wrap;
7221
7228
  gap: ${modalTokens.actionsContainer.gap};
7222
7229
  `;
7223
- var ModalActions = (0, import_react59.forwardRef)(
7230
+ var ModalActions = (0, import_react60.forwardRef)(
7224
7231
  ({ children, ...rest }, ref) => {
7225
7232
  const containerProps = {
7226
7233
  ref,
7227
7234
  ...rest
7228
7235
  };
7229
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Container10, { ...containerProps, children });
7236
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Container10, { ...containerProps, children });
7230
7237
  }
7231
7238
  );
7232
7239
  ModalActions.displayName = "ModalActions";
7233
7240
 
7234
7241
  // src/components/Drawer/Drawer.tsx
7235
- var import_react60 = require("react");
7242
+ var import_react61 = require("react");
7236
7243
  var import_react_dom2 = require("react-dom");
7237
7244
  var import_styled_components56 = __toESM(require("styled-components"));
7238
7245
  var import_dds_typography32 = require("@norges-domstoler/dds-typography");
@@ -7258,7 +7265,7 @@ var drawerTokens = {
7258
7265
 
7259
7266
  // src/components/Drawer/Drawer.tsx
7260
7267
  var import_dds_form20 = require("@norges-domstoler/dds-form");
7261
- var import_jsx_runtime62 = require("react/jsx-runtime");
7268
+ var import_jsx_runtime63 = require("react/jsx-runtime");
7262
7269
  var { container: container12, contentContainer: contentContainer6 } = drawerTokens;
7263
7270
  var getMaxWidth = (size) => {
7264
7271
  if (size === "large")
@@ -7326,7 +7333,7 @@ var HeaderContainer3 = import_styled_components56.default.div``;
7326
7333
  var StyledButton3 = (0, import_styled_components56.default)(Button)`
7327
7334
  align-self: flex-end;
7328
7335
  `;
7329
- var Drawer = (0, import_react60.forwardRef)((props, ref) => {
7336
+ var Drawer = (0, import_react61.forwardRef)((props, ref) => {
7330
7337
  const {
7331
7338
  children,
7332
7339
  onClose,
@@ -7341,7 +7348,7 @@ var Drawer = (0, import_react60.forwardRef)((props, ref) => {
7341
7348
  htmlProps,
7342
7349
  ...rest
7343
7350
  } = props;
7344
- const generatedId = (0, import_react60.useId)();
7351
+ const generatedId = (0, import_react61.useId)();
7345
7352
  const uniqueId = id != null ? id : `${generatedId}-drawer`;
7346
7353
  const hasHeader = !!header3;
7347
7354
  const headerId = hasHeader ? `${uniqueId}-header` : void 0;
@@ -7377,12 +7384,12 @@ var Drawer = (0, import_react60.forwardRef)((props, ref) => {
7377
7384
  id: headerId
7378
7385
  };
7379
7386
  return isOpen || hasTransitionedIn ? (0, import_react_dom2.createPortal)(
7380
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(Container11, { ...containerProps, elevation: 4, children: [
7381
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ScrollableContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(ContentContainer3, { children: [
7382
- hasHeader && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderContainer3, { ...headerContainerProps, children: typeof header3 === "string" ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_dds_typography32.Typography, { typographyType: "headingSans03", children: header3 }) : header3 }),
7387
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(Container11, { ...containerProps, elevation: 4, children: [
7388
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ScrollableContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(ContentContainer3, { children: [
7389
+ hasHeader && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(HeaderContainer3, { ...headerContainerProps, children: typeof header3 === "string" ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_dds_typography32.Typography, { typographyType: "headingSans03", children: header3 }) : header3 }),
7383
7390
  children
7384
7391
  ] }) }),
7385
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
7392
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
7386
7393
  StyledButton3,
7387
7394
  {
7388
7395
  "data-testid": "drawer-close-btn",
@@ -7401,18 +7408,18 @@ var Drawer = (0, import_react60.forwardRef)((props, ref) => {
7401
7408
  Drawer.displayName = "Drawer";
7402
7409
 
7403
7410
  // src/components/Drawer/DrawerGroup.tsx
7404
- var import_react61 = require("react");
7405
- var import_jsx_runtime63 = require("react/jsx-runtime");
7411
+ var import_react62 = require("react");
7412
+ var import_jsx_runtime64 = require("react/jsx-runtime");
7406
7413
  var DrawerGroup = ({
7407
7414
  children,
7408
7415
  drawerId,
7409
7416
  onOpen,
7410
7417
  onClose
7411
7418
  }) => {
7412
- const generatedId = (0, import_react61.useId)();
7419
+ const generatedId = (0, import_react62.useId)();
7413
7420
  const uniqueDrawerId = drawerId != null ? drawerId : `${generatedId}-drawer`;
7414
- const buttonRef = (0, import_react61.useRef)(null);
7415
- const [closed, setClosed] = (0, import_react61.useState)(true);
7421
+ const buttonRef = (0, import_react62.useRef)(null);
7422
+ const [closed, setClosed] = (0, import_react62.useState)(true);
7416
7423
  const open = () => setClosed(false);
7417
7424
  const close = () => setClosed(true);
7418
7425
  const handleOpen = () => {
@@ -7423,21 +7430,21 @@ var DrawerGroup = ({
7423
7430
  close();
7424
7431
  onClose && onClose();
7425
7432
  };
7426
- const Children9 = import_react61.Children.map(children, (child, childIndex) => {
7427
- return (0, import_react61.isValidElement)(child) && (childIndex === 0 ? (0, import_react61.cloneElement)(child, {
7433
+ const Children9 = import_react62.Children.map(children, (child, childIndex) => {
7434
+ return (0, import_react62.isValidElement)(child) && (childIndex === 0 ? (0, import_react62.cloneElement)(child, {
7428
7435
  "aria-haspopup": "dialog",
7429
7436
  "aria-controls": uniqueDrawerId,
7430
7437
  "aria-expanded": !closed,
7431
7438
  ref: buttonRef,
7432
7439
  onClick: handleOpen
7433
- }) : (0, import_react61.cloneElement)(child, {
7440
+ }) : (0, import_react62.cloneElement)(child, {
7434
7441
  id: uniqueDrawerId,
7435
7442
  triggerRef: buttonRef,
7436
7443
  isOpen: !closed,
7437
7444
  onClose: handleClose
7438
7445
  }));
7439
7446
  });
7440
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
7447
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
7441
7448
  " ",
7442
7449
  Children9,
7443
7450
  " "
@@ -7447,7 +7454,7 @@ DrawerGroup.displayName = "DrawerGroup";
7447
7454
 
7448
7455
  // src/components/Popover/Popover.tsx
7449
7456
  var import_dds_design_tokens30 = require("@norges-domstoler/dds-design-tokens");
7450
- var import_react62 = require("react");
7457
+ var import_react63 = require("react");
7451
7458
  var import_styled_components57 = __toESM(require("styled-components"));
7452
7459
  var import_dds_core63 = require("@norges-domstoler/dds-core");
7453
7460
  var import_dds_core64 = require("@norges-domstoler/dds-core");
@@ -7483,7 +7490,7 @@ var popoverTokens = {
7483
7490
  var import_dds_icons29 = require("@norges-domstoler/dds-icons");
7484
7491
  var import_dds_core66 = require("@norges-domstoler/dds-core");
7485
7492
  var import_dds_form21 = require("@norges-domstoler/dds-form");
7486
- var import_jsx_runtime64 = require("react/jsx-runtime");
7493
+ var import_jsx_runtime65 = require("react/jsx-runtime");
7487
7494
  var { spacing: Spacing } = import_dds_design_tokens30.ddsBaseTokens;
7488
7495
  var { wrapper: wrapper6, content: content4, closeButton: closeButton2, title: title2 } = popoverTokens;
7489
7496
  var Wrapper6 = (0, import_styled_components57.default)(import_dds_core66.Paper)`
@@ -7519,7 +7526,7 @@ var StyledButton4 = (0, import_styled_components57.default)(Button)`
7519
7526
  top: ${closeButton2.top};
7520
7527
  right: ${closeButton2.right};
7521
7528
  `;
7522
- var Popover = (0, import_react62.forwardRef)(
7529
+ var Popover = (0, import_react63.forwardRef)(
7523
7530
  (props, ref) => {
7524
7531
  const {
7525
7532
  title: title3,
@@ -7559,7 +7566,7 @@ var Popover = (0, import_react62.forwardRef)(
7559
7566
  if (isOpen)
7560
7567
  onClose && onClose();
7561
7568
  });
7562
- return isOpen || hasTransitionedIn ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
7569
+ return isOpen || hasTransitionedIn ? /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
7563
7570
  Wrapper6,
7564
7571
  {
7565
7572
  ...(0, import_dds_core65.getBaseHTMLProps)(id, className, htmlProps, rest),
@@ -7572,8 +7579,8 @@ var Popover = (0, import_react62.forwardRef)(
7572
7579
  elevation: 3,
7573
7580
  border: "light",
7574
7581
  children: [
7575
- title3 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(TitleContainer, { children: typeof title3 === "string" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_dds_typography33.Typography, { typographyType: "headingSans02", children: title3 }) : title3 }),
7576
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
7582
+ title3 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(TitleContainer, { children: typeof title3 === "string" ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_dds_typography33.Typography, { typographyType: "headingSans02", children: title3 }) : title3 }),
7583
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
7577
7584
  ContentContainer4,
7578
7585
  {
7579
7586
  $hasTitle: !!title3,
@@ -7581,7 +7588,7 @@ var Popover = (0, import_react62.forwardRef)(
7581
7588
  children
7582
7589
  }
7583
7590
  ),
7584
- withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
7591
+ withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
7585
7592
  StyledButton4,
7586
7593
  {
7587
7594
  icon: import_dds_icons29.CloseIcon,
@@ -7600,9 +7607,9 @@ var Popover = (0, import_react62.forwardRef)(
7600
7607
  Popover.displayName = "Popover";
7601
7608
 
7602
7609
  // src/components/Popover/PopoverGroup.tsx
7603
- var import_react63 = require("react");
7610
+ var import_react64 = require("react");
7604
7611
  var import_dds_core67 = require("@norges-domstoler/dds-core");
7605
- var import_jsx_runtime65 = require("react/jsx-runtime");
7612
+ var import_jsx_runtime66 = require("react/jsx-runtime");
7606
7613
  var PopoverGroup = ({
7607
7614
  isOpen = false,
7608
7615
  onCloseButtonClick,
@@ -7610,8 +7617,8 @@ var PopoverGroup = ({
7610
7617
  children,
7611
7618
  popoverId
7612
7619
  }) => {
7613
- const [open, setOpen] = (0, import_react63.useState)(isOpen);
7614
- const generatedId = (0, import_react63.useId)();
7620
+ const [open, setOpen] = (0, import_react64.useState)(isOpen);
7621
+ const generatedId = (0, import_react64.useId)();
7615
7622
  const uniquePopoverId = popoverId != null ? popoverId : `${generatedId}-popover`;
7616
7623
  const handleOnCloseButtonClick = () => {
7617
7624
  setOpen(false);
@@ -7621,8 +7628,8 @@ var PopoverGroup = ({
7621
7628
  setOpen(!open);
7622
7629
  onTriggerClick && onTriggerClick();
7623
7630
  };
7624
- const buttonRef = (0, import_react63.useRef)(null);
7625
- const popoverRef = (0, import_react63.useRef)(null);
7631
+ const buttonRef = (0, import_react64.useRef)(null);
7632
+ const popoverRef = (0, import_react64.useRef)(null);
7626
7633
  (0, import_dds_core67.useOnKeyDown)(["Esc", "Escape"], () => {
7627
7634
  var _a;
7628
7635
  if (open) {
@@ -7631,14 +7638,14 @@ var PopoverGroup = ({
7631
7638
  }
7632
7639
  });
7633
7640
  const handleClose = () => setOpen(false);
7634
- const Children9 = import_react63.Children.map(children, (child, childIndex) => {
7635
- return (0, import_react63.isValidElement)(child) && (childIndex === 0 ? (0, import_react63.cloneElement)(child, {
7641
+ const Children9 = import_react64.Children.map(children, (child, childIndex) => {
7642
+ return (0, import_react64.isValidElement)(child) && (childIndex === 0 ? (0, import_react64.cloneElement)(child, {
7636
7643
  "aria-haspopup": "dialog",
7637
7644
  "aria-controls": uniquePopoverId,
7638
7645
  "aria-expanded": open,
7639
7646
  onClick: handleOnTriggerClick,
7640
7647
  ref: buttonRef
7641
- }) : (0, import_react63.cloneElement)(child, {
7648
+ }) : (0, import_react64.cloneElement)(child, {
7642
7649
  isOpen: open,
7643
7650
  "aria-hidden": !open,
7644
7651
  id: uniquePopoverId,
@@ -7648,12 +7655,12 @@ var PopoverGroup = ({
7648
7655
  onClose: handleClose
7649
7656
  }));
7650
7657
  });
7651
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_jsx_runtime65.Fragment, { children: Children9 });
7658
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: Children9 });
7652
7659
  };
7653
7660
  PopoverGroup.displayName = "PopoverGroup";
7654
7661
 
7655
7662
  // src/components/ToggleButton/ToggleButton.tsx
7656
- var import_react64 = require("react");
7663
+ var import_react65 = require("react");
7657
7664
  var import_styled_components58 = __toESM(require("styled-components"));
7658
7665
  var import_dds_icons30 = require("@norges-domstoler/dds-icons");
7659
7666
  var import_dds_core68 = require("@norges-domstoler/dds-core");
@@ -7693,7 +7700,7 @@ var toggleButtonTokens = {
7693
7700
  };
7694
7701
 
7695
7702
  // src/components/ToggleButton/ToggleButton.tsx
7696
- var import_jsx_runtime66 = require("react/jsx-runtime");
7703
+ var import_jsx_runtime67 = require("react/jsx-runtime");
7697
7704
  var { toggleButton: toggleButton2 } = toggleButtonTokens;
7698
7705
  var Content2 = import_styled_components58.default.span`
7699
7706
  display: flex;
@@ -7747,12 +7754,12 @@ var Container12 = import_styled_components58.default.label`
7747
7754
  ${import_dds_form22.focusVisible}
7748
7755
  }
7749
7756
  `;
7750
- var ToggleButton = (0, import_react64.forwardRef)(
7757
+ var ToggleButton = (0, import_react65.forwardRef)(
7751
7758
  ({ id, label: label3, icon: icon12, className, htmlProps, ...rest }, ref) => {
7752
- const generatedId = (0, import_react64.useId)();
7759
+ const generatedId = (0, import_react65.useId)();
7753
7760
  const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
7754
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Container12, { htmlFor: uniqueId, children: [
7755
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
7761
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Container12, { htmlFor: uniqueId, children: [
7762
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
7756
7763
  import_dds_form22.HiddenInput,
7757
7764
  {
7758
7765
  ...(0, import_dds_core68.getBaseHTMLProps)(uniqueId, className, htmlProps, rest),
@@ -7760,8 +7767,8 @@ var ToggleButton = (0, import_react64.forwardRef)(
7760
7767
  type: "checkbox"
7761
7768
  }
7762
7769
  ),
7763
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Content2, { $hasIcon: !!icon12, children: [
7764
- icon12 && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_dds_icons30.Icon, { icon: icon12, iconSize: "inherit" }),
7770
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Content2, { $hasIcon: !!icon12, children: [
7771
+ icon12 && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_dds_icons30.Icon, { icon: icon12, iconSize: "inherit" }),
7765
7772
  " ",
7766
7773
  label3
7767
7774
  ] })
@@ -7771,11 +7778,11 @@ var ToggleButton = (0, import_react64.forwardRef)(
7771
7778
  ToggleButton.displayName = "ToggleButton";
7772
7779
 
7773
7780
  // src/components/ToggleButton/ToggleButtonGroup.tsx
7774
- var import_react65 = require("react");
7781
+ var import_react66 = require("react");
7775
7782
  var import_styled_components59 = __toESM(require("styled-components"));
7776
7783
  var import_dds_core69 = require("@norges-domstoler/dds-core");
7777
7784
  var import_dds_typography35 = require("@norges-domstoler/dds-typography");
7778
- var import_jsx_runtime67 = require("react/jsx-runtime");
7785
+ var import_jsx_runtime68 = require("react/jsx-runtime");
7779
7786
  var Group = import_styled_components59.default.div`
7780
7787
  gap: ${toggleButtonTokens.group.gap};
7781
7788
  display: flex;
@@ -7800,7 +7807,7 @@ var ToggleButtonGroup = (props) => {
7800
7807
  htmlProps,
7801
7808
  ...rest
7802
7809
  } = props;
7803
- const generatedId = (0, import_react65.useId)();
7810
+ const generatedId = (0, import_react66.useId)();
7804
7811
  const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
7805
7812
  const groupProps = {
7806
7813
  direction
@@ -7810,8 +7817,8 @@ var ToggleButtonGroup = (props) => {
7810
7817
  role: "group",
7811
7818
  "aria-labelledby": label3 ? uniqueLabelId : void 0
7812
7819
  };
7813
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Container13, { ...containerProps, children: [
7814
- !!label3 && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
7820
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(Container13, { ...containerProps, children: [
7821
+ !!label3 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
7815
7822
  import_dds_typography35.Typography,
7816
7823
  {
7817
7824
  as: "span",
@@ -7820,19 +7827,19 @@ var ToggleButtonGroup = (props) => {
7820
7827
  children: label3
7821
7828
  }
7822
7829
  ),
7823
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Group, { ...groupProps, children })
7830
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Group, { ...groupProps, children })
7824
7831
  ] });
7825
7832
  };
7826
7833
  ToggleButtonGroup.displayName = "ToggleButtonGroup";
7827
7834
 
7828
7835
  // src/components/Tabs/Tabs.tsx
7829
7836
  var import_styled_components60 = __toESM(require("styled-components"));
7830
- var import_react67 = require("react");
7837
+ var import_react68 = require("react");
7831
7838
  var import_dds_core70 = require("@norges-domstoler/dds-core");
7832
7839
 
7833
7840
  // src/components/Tabs/Tabs.context.tsx
7834
- var import_react66 = require("react");
7835
- var TabsContext = (0, import_react66.createContext)({
7841
+ var import_react67 = require("react");
7842
+ var TabsContext = (0, import_react67.createContext)({
7836
7843
  activeTab: 0,
7837
7844
  tabsId: "",
7838
7845
  handleTabChange: () => null,
@@ -7842,16 +7849,16 @@ var TabsContext = (0, import_react66.createContext)({
7842
7849
  setHasTabFocus: () => null,
7843
7850
  tabContentDirection: "row"
7844
7851
  });
7845
- var useTabsContext = () => (0, import_react66.useContext)(TabsContext);
7852
+ var useTabsContext = () => (0, import_react67.useContext)(TabsContext);
7846
7853
 
7847
7854
  // src/components/Tabs/Tabs.tsx
7848
- var import_jsx_runtime68 = require("react/jsx-runtime");
7855
+ var import_jsx_runtime69 = require("react/jsx-runtime");
7849
7856
  var Container14 = import_styled_components60.default.div`
7850
7857
  ${({ $width }) => $width && import_styled_components60.css`
7851
7858
  width: ${$width};
7852
7859
  `};
7853
7860
  `;
7854
- var Tabs = (0, import_react67.forwardRef)((props, ref) => {
7861
+ var Tabs = (0, import_react68.forwardRef)((props, ref) => {
7855
7862
  const {
7856
7863
  id,
7857
7864
  activeTab,
@@ -7863,17 +7870,17 @@ var Tabs = (0, import_react67.forwardRef)((props, ref) => {
7863
7870
  htmlProps,
7864
7871
  ...rest
7865
7872
  } = props;
7866
- const generatedId = (0, import_react67.useId)();
7873
+ const generatedId = (0, import_react68.useId)();
7867
7874
  const uniqueId = id != null ? id : `${generatedId}-tabs`;
7868
- const [thisActiveTab, setActiveTab] = (0, import_react67.useState)(activeTab != null ? activeTab : 0);
7869
- const [hasTabFocus, setHasTabFocus] = (0, import_react67.useState)(false);
7870
- const tabListRef = (0, import_react67.useRef)(null);
7871
- const tabPanelsRef = (0, import_react67.useRef)(null);
7875
+ const [thisActiveTab, setActiveTab] = (0, import_react68.useState)(activeTab != null ? activeTab : 0);
7876
+ const [hasTabFocus, setHasTabFocus] = (0, import_react68.useState)(false);
7877
+ const tabListRef = (0, import_react68.useRef)(null);
7878
+ const tabPanelsRef = (0, import_react68.useRef)(null);
7872
7879
  const handleTabChange = (index) => {
7873
7880
  setActiveTab(index);
7874
7881
  onChange && onChange(index);
7875
7882
  };
7876
- (0, import_react67.useEffect)(() => {
7883
+ (0, import_react68.useEffect)(() => {
7877
7884
  if (activeTab !== void 0 && activeTab !== thisActiveTab) {
7878
7885
  setActiveTab(activeTab);
7879
7886
  }
@@ -7882,7 +7889,7 @@ var Tabs = (0, import_react67.forwardRef)((props, ref) => {
7882
7889
  ...(0, import_dds_core70.getBaseHTMLProps)(uniqueId, className, htmlProps, rest),
7883
7890
  ref
7884
7891
  };
7885
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
7892
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
7886
7893
  TabsContext.Provider,
7887
7894
  {
7888
7895
  value: {
@@ -7895,14 +7902,14 @@ var Tabs = (0, import_react67.forwardRef)((props, ref) => {
7895
7902
  setHasTabFocus,
7896
7903
  tabContentDirection
7897
7904
  },
7898
- children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Container14, { ...containerProps, $width: width, children })
7905
+ children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Container14, { ...containerProps, $width: width, children })
7899
7906
  }
7900
7907
  );
7901
7908
  });
7902
7909
  Tabs.displayName = "Tabs";
7903
7910
 
7904
7911
  // src/components/Tabs/Tab.tsx
7905
- var import_react68 = require("react");
7912
+ var import_react69 = require("react");
7906
7913
  var import_styled_components61 = __toESM(require("styled-components"));
7907
7914
  var import_dds_core71 = require("@norges-domstoler/dds-core");
7908
7915
  var import_dds_icons31 = require("@norges-domstoler/dds-icons");
@@ -7949,7 +7956,7 @@ var tabsTokens = {
7949
7956
  };
7950
7957
 
7951
7958
  // src/components/Tabs/Tab.tsx
7952
- var import_jsx_runtime69 = require("react/jsx-runtime");
7959
+ var import_jsx_runtime70 = require("react/jsx-runtime");
7953
7960
  var { tab: tab2 } = tabsTokens;
7954
7961
  var Button2 = import_styled_components61.default.button`
7955
7962
  ${import_dds_core71.normalizeButton}
@@ -7994,7 +8001,7 @@ var Button2 = import_styled_components61.default.button`
7994
8001
  box-shadow: ${tab2.hover.boxShadow};
7995
8002
  }
7996
8003
  `;
7997
- var Tab = (0, import_react68.forwardRef)((props, ref) => {
8004
+ var Tab = (0, import_react69.forwardRef)((props, ref) => {
7998
8005
  const {
7999
8006
  active = false,
8000
8007
  icon: icon12,
@@ -8009,10 +8016,10 @@ var Tab = (0, import_react68.forwardRef)((props, ref) => {
8009
8016
  htmlProps,
8010
8017
  ...rest
8011
8018
  } = props;
8012
- const itemRef = (0, import_react68.useRef)(null);
8019
+ const itemRef = (0, import_react69.useRef)(null);
8013
8020
  const combinedRef = (0, import_dds_core71.useCombinedRef)(ref, itemRef);
8014
8021
  const { tabPanelsRef, setHasTabFocus, tabContentDirection } = useTabsContext();
8015
- (0, import_react68.useEffect)(() => {
8022
+ (0, import_react69.useEffect)(() => {
8016
8023
  var _a;
8017
8024
  if (focus) {
8018
8025
  (_a = itemRef.current) == null ? void 0 : _a.focus();
@@ -8024,7 +8031,7 @@ var Tab = (0, import_react68.forwardRef)((props, ref) => {
8024
8031
  setHasTabFocus(false);
8025
8032
  (_a = tabPanelsRef == null ? void 0 : tabPanelsRef.current) == null ? void 0 : _a.focus();
8026
8033
  });
8027
- const handleSelect = (0, import_react68.useCallback)(() => {
8034
+ const handleSelect = (0, import_react69.useCallback)(() => {
8028
8035
  if (setFocus && index) {
8029
8036
  setFocus(index);
8030
8037
  }
@@ -8037,7 +8044,7 @@ var Tab = (0, import_react68.forwardRef)((props, ref) => {
8037
8044
  handleSelect();
8038
8045
  onKeyDown && onKeyDown(e);
8039
8046
  };
8040
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
8047
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
8041
8048
  Button2,
8042
8049
  {
8043
8050
  ...(0, import_dds_core71.getBaseHTMLProps)(id, className, htmlProps, rest),
@@ -8050,8 +8057,8 @@ var Tab = (0, import_react68.forwardRef)((props, ref) => {
8050
8057
  onKeyDown: handleOnKeyDown,
8051
8058
  tabIndex: focus ? 0 : -1,
8052
8059
  children: [
8053
- icon12 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_dds_icons31.Icon, { icon: icon12, iconSize: "inherit" }),
8054
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children })
8060
+ icon12 && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_dds_icons31.Icon, { icon: icon12, iconSize: "inherit" }),
8061
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { children })
8055
8062
  ]
8056
8063
  }
8057
8064
  );
@@ -8059,11 +8066,11 @@ var Tab = (0, import_react68.forwardRef)((props, ref) => {
8059
8066
  Tab.displayName = "Tab";
8060
8067
 
8061
8068
  // src/components/Tabs/TabList.tsx
8062
- var import_react69 = require("react");
8069
+ var import_react70 = require("react");
8063
8070
  var import_styled_components62 = __toESM(require("styled-components"));
8064
8071
  var import_dds_core72 = require("@norges-domstoler/dds-core");
8065
8072
  var import_dds_form24 = require("@norges-domstoler/dds-form");
8066
- var import_jsx_runtime70 = require("react/jsx-runtime");
8073
+ var import_jsx_runtime71 = require("react/jsx-runtime");
8067
8074
  var { tabList: tabList2 } = tabsTokens;
8068
8075
  var TabRow = import_styled_components62.default.div`
8069
8076
  border-bottom: ${tabList2.borderBottom};
@@ -8085,7 +8092,7 @@ var TabRow = import_styled_components62.default.div`
8085
8092
  outline: none;
8086
8093
  }
8087
8094
  `;
8088
- var TabList = (0, import_react69.forwardRef)(
8095
+ var TabList = (0, import_react70.forwardRef)(
8089
8096
  ({ children, id, onFocus, ...rest }, ref) => {
8090
8097
  const {
8091
8098
  activeTab,
@@ -8097,11 +8104,11 @@ var TabList = (0, import_react69.forwardRef)(
8097
8104
  setHasTabFocus
8098
8105
  } = useTabsContext();
8099
8106
  const uniqueId = id != null ? id : `${tabsId}-tablist`;
8100
- const childrenArray = import_react69.Children.toArray(children).length;
8107
+ const childrenArray = import_react70.Children.toArray(children).length;
8101
8108
  const [focus, setFocus] = (0, import_dds_core72.useRoveFocus)(childrenArray, !hasTabFocus, "row");
8102
8109
  const combinedRef = (0, import_dds_core72.useCombinedRef)(ref, tabListRef);
8103
- const tabListChildren = import_react69.Children.map(children, (child, index) => {
8104
- return (0, import_react69.isValidElement)(child) && (0, import_react69.cloneElement)(child, {
8110
+ const tabListChildren = import_react70.Children.map(children, (child, index) => {
8111
+ return (0, import_react70.isValidElement)(child) && (0, import_react70.cloneElement)(child, {
8105
8112
  id: `${tabsId}-tab-${index}`,
8106
8113
  "aria-controls": `${tabsId}-panel-${index}`,
8107
8114
  active: activeTab === index,
@@ -8132,17 +8139,17 @@ var TabList = (0, import_react69.forwardRef)(
8132
8139
  tabIndex: 0,
8133
8140
  onFocus: handleOnFocus
8134
8141
  };
8135
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TabRow, { ...tabListProps, children: tabListChildren });
8142
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TabRow, { ...tabListProps, children: tabListChildren });
8136
8143
  }
8137
8144
  );
8138
8145
  TabList.displayName = "TabList";
8139
8146
 
8140
8147
  // src/components/Tabs/TabPanel.tsx
8141
- var import_react70 = require("react");
8148
+ var import_react71 = require("react");
8142
8149
  var import_styled_components63 = __toESM(require("styled-components"));
8143
8150
  var import_dds_core73 = require("@norges-domstoler/dds-core");
8144
8151
  var import_dds_form25 = require("@norges-domstoler/dds-form");
8145
- var import_jsx_runtime71 = require("react/jsx-runtime");
8152
+ var import_jsx_runtime72 = require("react/jsx-runtime");
8146
8153
  var { panel: panel2 } = tabsTokens;
8147
8154
  var Panel = import_styled_components63.default.div`
8148
8155
  padding: ${panel2.padding};
@@ -8157,9 +8164,9 @@ var Panel = import_styled_components63.default.div`
8157
8164
  ${import_dds_form25.focusVisible}
8158
8165
  }
8159
8166
  `;
8160
- var TabPanel = (0, import_react70.forwardRef)(
8167
+ var TabPanel = (0, import_react71.forwardRef)(
8161
8168
  ({ active = false, children, id, className, htmlProps, ...rest }, ref) => {
8162
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
8169
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
8163
8170
  Panel,
8164
8171
  {
8165
8172
  ...(0, import_dds_core73.getBaseHTMLProps)(id, className, htmlProps, rest),
@@ -8175,29 +8182,29 @@ var TabPanel = (0, import_react70.forwardRef)(
8175
8182
  TabPanel.displayName = "TabPanel";
8176
8183
 
8177
8184
  // src/components/Tabs/TabPanels.tsx
8178
- var import_react71 = require("react");
8185
+ var import_react72 = require("react");
8179
8186
  var import_dds_core74 = require("@norges-domstoler/dds-core");
8180
- var import_jsx_runtime72 = require("react/jsx-runtime");
8181
- var TabPanels = (0, import_react71.forwardRef)(
8187
+ var import_jsx_runtime73 = require("react/jsx-runtime");
8188
+ var TabPanels = (0, import_react72.forwardRef)(
8182
8189
  ({ children, ...rest }, ref) => {
8183
8190
  const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
8184
8191
  const combinedRef = (0, import_dds_core74.useCombinedRef)(ref, tabPanelsRef);
8185
- const panelChildren = import_react71.Children.map(children, (child, index) => {
8192
+ const panelChildren = import_react72.Children.map(children, (child, index) => {
8186
8193
  const active = index === activeTab;
8187
- return (0, import_react71.isValidElement)(child) && (0, import_react71.cloneElement)(child, {
8194
+ return (0, import_react72.isValidElement)(child) && (0, import_react72.cloneElement)(child, {
8188
8195
  id: `${tabsId}-panel-${index}`,
8189
8196
  "aria-labelledby": `${tabsId}-tab-${index}`,
8190
8197
  active,
8191
8198
  "aria-expanded": active
8192
8199
  });
8193
8200
  });
8194
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { ref: combinedRef, ...rest, children: panelChildren });
8201
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { ref: combinedRef, ...rest, children: panelChildren });
8195
8202
  }
8196
8203
  );
8197
8204
  TabPanels.displayName = "TabPanels";
8198
8205
 
8199
8206
  // src/components/Tag/Tag.tsx
8200
- var import_react72 = require("react");
8207
+ var import_react73 = require("react");
8201
8208
  var import_styled_components64 = __toESM(require("styled-components"));
8202
8209
  var import_dds_core75 = require("@norges-domstoler/dds-core");
8203
8210
  var import_dds_typography37 = require("@norges-domstoler/dds-typography");
@@ -8226,7 +8233,7 @@ var tagTokens = {
8226
8233
  };
8227
8234
 
8228
8235
  // src/components/Tag/Tag.tsx
8229
- var import_jsx_runtime73 = require("react/jsx-runtime");
8236
+ var import_jsx_runtime74 = require("react/jsx-runtime");
8230
8237
  var { wrapper: wrapper8 } = tagTokens;
8231
8238
  var Wrapper7 = (0, import_styled_components64.default)(import_dds_typography37.TextOverflowEllipsisWrapper)`
8232
8239
  display: inline-flex;
@@ -8240,7 +8247,7 @@ var Wrapper7 = (0, import_styled_components64.default)(import_dds_typography37.T
8240
8247
  border-color: ${wrapper8.purpose[$purpose].borderColor};
8241
8248
  `}
8242
8249
  `;
8243
- var Tag = (0, import_react72.forwardRef)((props, ref) => {
8250
+ var Tag = (0, import_react73.forwardRef)((props, ref) => {
8244
8251
  const {
8245
8252
  text,
8246
8253
  purpose = "default",
@@ -8249,20 +8256,20 @@ var Tag = (0, import_react72.forwardRef)((props, ref) => {
8249
8256
  htmlProps,
8250
8257
  ...rest
8251
8258
  } = props;
8252
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
8259
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
8253
8260
  Wrapper7,
8254
8261
  {
8255
8262
  ...(0, import_dds_core75.getBaseHTMLProps)(id, className, htmlProps, rest),
8256
8263
  ref,
8257
8264
  $purpose: purpose,
8258
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_dds_typography37.TextOverflowEllipsisInner, { children: text })
8265
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_dds_typography37.TextOverflowEllipsisInner, { children: text })
8259
8266
  }
8260
8267
  );
8261
8268
  });
8262
8269
  Tag.displayName = "Tag";
8263
8270
 
8264
8271
  // src/components/Chip/Chip.tsx
8265
- var import_react73 = require("react");
8272
+ var import_react74 = require("react");
8266
8273
  var import_styled_components65 = __toESM(require("styled-components"));
8267
8274
  var import_dds_core76 = require("@norges-domstoler/dds-core");
8268
8275
  var import_dds_icons32 = require("@norges-domstoler/dds-icons");
@@ -8288,7 +8295,7 @@ var chipTokens = {
8288
8295
  };
8289
8296
 
8290
8297
  // src/components/Chip/Chip.tsx
8291
- var import_jsx_runtime74 = require("react/jsx-runtime");
8298
+ var import_jsx_runtime75 = require("react/jsx-runtime");
8292
8299
  var { container: container15 } = chipTokens;
8293
8300
  var Container15 = (0, import_styled_components65.default)(import_dds_typography38.TextOverflowEllipsisWrapper)`
8294
8301
  display: flex;
@@ -8301,23 +8308,23 @@ var Container15 = (0, import_styled_components65.default)(import_dds_typography3
8301
8308
  background-color: ${container15.backgroundColor};
8302
8309
  ${(0, import_dds_typography38.getFontStyling)(typographyType6, true)};
8303
8310
  `;
8304
- var Chip = (0, import_react73.forwardRef)((props, ref) => {
8311
+ var Chip = (0, import_react74.forwardRef)((props, ref) => {
8305
8312
  const { text, onClose, id, className, htmlProps = {}, ...rest } = props;
8306
8313
  const { "aria-label": ariaLabel, ...restHTMLprops } = htmlProps;
8307
- const [isOpen, setIsOpen] = (0, import_react73.useState)(true);
8314
+ const [isOpen, setIsOpen] = (0, import_react74.useState)(true);
8308
8315
  const onClick = () => {
8309
8316
  setIsOpen(false);
8310
8317
  onClose && onClose();
8311
8318
  };
8312
- return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
8319
+ return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
8313
8320
  Container15,
8314
8321
  {
8315
8322
  ...(0, import_dds_core76.getBaseHTMLProps)(id, className, restHTMLprops, rest),
8316
8323
  ref,
8317
8324
  as: "div",
8318
8325
  children: [
8319
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_dds_typography38.TextOverflowEllipsisInner, { children: text }),
8320
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
8326
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_dds_typography38.TextOverflowEllipsisInner, { children: text }),
8327
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
8321
8328
  Button,
8322
8329
  {
8323
8330
  size: "tiny",
@@ -8335,26 +8342,26 @@ var Chip = (0, import_react73.forwardRef)((props, ref) => {
8335
8342
  Chip.displayName = "Chip";
8336
8343
 
8337
8344
  // src/components/Chip/ChipGroup.tsx
8338
- var import_react74 = require("react");
8345
+ var import_react75 = require("react");
8339
8346
  var import_styled_components66 = __toESM(require("styled-components"));
8340
8347
  var import_dds_core77 = require("@norges-domstoler/dds-core");
8341
- var import_jsx_runtime75 = require("react/jsx-runtime");
8348
+ var import_jsx_runtime76 = require("react/jsx-runtime");
8342
8349
  var Group2 = import_styled_components66.default.ul`
8343
8350
  ${import_dds_core77.removeListStyling}
8344
8351
  display: flex;
8345
8352
  gap: ${chipTokens.group.gap};
8346
8353
  `;
8347
- var ChipGroup = (0, import_react74.forwardRef)(
8354
+ var ChipGroup = (0, import_react75.forwardRef)(
8348
8355
  ({ children, ...rest }, ref) => {
8349
- const childrenArray = import_react74.Children.toArray(children);
8350
- const groupChildren = childrenArray.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("li", { children: item }, `chip-${index}`));
8351
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Group2, { ...rest, ref, children: groupChildren });
8356
+ const childrenArray = import_react75.Children.toArray(children);
8357
+ const groupChildren = childrenArray.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("li", { children: item }, `chip-${index}`));
8358
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Group2, { ...rest, ref, children: groupChildren });
8352
8359
  }
8353
8360
  );
8354
8361
  ChipGroup.displayName = "ChipGroup";
8355
8362
 
8356
8363
  // src/components/ToggleBar/ToggleBar.tsx
8357
- var import_react76 = require("react");
8364
+ var import_react77 = require("react");
8358
8365
  var import_styled_components67 = __toESM(require("styled-components"));
8359
8366
  var import_dds_core79 = require("@norges-domstoler/dds-core");
8360
8367
  var import_dds_core80 = require("@norges-domstoler/dds-core");
@@ -8362,11 +8369,11 @@ var import_dds_core81 = require("@norges-domstoler/dds-core");
8362
8369
  var import_dds_typography39 = require("@norges-domstoler/dds-typography");
8363
8370
 
8364
8371
  // src/components/ToggleBar/ToggleBar.context.tsx
8365
- var import_react75 = require("react");
8366
- var ToggleBarContext = (0, import_react75.createContext)({
8372
+ var import_react76 = require("react");
8373
+ var ToggleBarContext = (0, import_react76.createContext)({
8367
8374
  size: "medium"
8368
8375
  });
8369
- var useToggleBarContext = () => (0, import_react75.useContext)(ToggleBarContext);
8376
+ var useToggleBarContext = () => (0, import_react76.useContext)(ToggleBarContext);
8370
8377
 
8371
8378
  // src/components/ToggleBar/ToggleBar.tokens.tsx
8372
8379
  var import_dds_design_tokens35 = require("@norges-domstoler/dds-design-tokens");
@@ -8476,7 +8483,7 @@ var toggleBarTokens = {
8476
8483
  };
8477
8484
 
8478
8485
  // src/components/ToggleBar/ToggleBar.tsx
8479
- var import_jsx_runtime76 = require("react/jsx-runtime");
8486
+ var import_jsx_runtime77 = require("react/jsx-runtime");
8480
8487
  var OuterContainer4 = import_styled_components67.default.div`
8481
8488
  display: flex;
8482
8489
  flex-direction: column;
@@ -8508,15 +8515,15 @@ var ToggleBar = (props) => {
8508
8515
  id,
8509
8516
  ...rest
8510
8517
  } = props;
8511
- const generatedId = (0, import_react76.useId)();
8518
+ const generatedId = (0, import_react77.useId)();
8512
8519
  const uniqueId = id != null ? id : `${generatedId}-ToggleBar`;
8513
- const [groupValue, setGroupValue] = (0, import_react76.useState)(value);
8520
+ const [groupValue, setGroupValue] = (0, import_react77.useState)(value);
8514
8521
  const handleChange = (0, import_dds_core81.combineHandlers)(
8515
8522
  (e) => setGroupValue(e.target.value),
8516
8523
  (e) => onChange && onChange(e, e.target.value)
8517
8524
  );
8518
8525
  const labelId = label3 && `${uniqueId}-label`;
8519
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
8526
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
8520
8527
  ToggleBarContext.Provider,
8521
8528
  {
8522
8529
  value: {
@@ -8525,7 +8532,7 @@ var ToggleBar = (props) => {
8525
8532
  name,
8526
8533
  value: groupValue
8527
8534
  },
8528
- children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
8535
+ children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
8529
8536
  OuterContainer4,
8530
8537
  {
8531
8538
  ...(0, import_dds_core80.getBaseHTMLProps)(id, className, htmlProps, rest),
@@ -8533,8 +8540,8 @@ var ToggleBar = (props) => {
8533
8540
  "aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
8534
8541
  $width: width,
8535
8542
  children: [
8536
- label3 && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_dds_typography39.Typography, { typographyType: "supportingStyleLabel01", id: labelId, children: label3 }),
8537
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Bar2, { children })
8543
+ label3 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_dds_typography39.Typography, { typographyType: "supportingStyleLabel01", id: labelId, children: label3 }),
8544
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Bar2, { children })
8538
8545
  ]
8539
8546
  }
8540
8547
  )
@@ -8544,7 +8551,7 @@ var ToggleBar = (props) => {
8544
8551
  ToggleBar.displayName = "ToggleBar";
8545
8552
 
8546
8553
  // src/components/ToggleBar/ToggleRadio.tsx
8547
- var import_react77 = require("react");
8554
+ var import_react78 = require("react");
8548
8555
  var import_dds_core82 = require("@norges-domstoler/dds-core");
8549
8556
  var import_dds_icons33 = require("@norges-domstoler/dds-icons");
8550
8557
 
@@ -8621,7 +8628,7 @@ var Label6 = import_styled_components68.default.label`
8621
8628
 
8622
8629
  // src/components/ToggleBar/ToggleRadio.tsx
8623
8630
  var import_dds_form27 = require("@norges-domstoler/dds-form");
8624
- var import_jsx_runtime77 = require("react/jsx-runtime");
8631
+ var import_jsx_runtime78 = require("react/jsx-runtime");
8625
8632
  var calculateChecked = (value, group4, checked) => {
8626
8633
  if (typeof checked !== "undefined")
8627
8634
  return checked;
@@ -8633,7 +8640,7 @@ var calculateChecked = (value, group4, checked) => {
8633
8640
  }
8634
8641
  return !!value;
8635
8642
  };
8636
- var ToggleRadio = (0, import_react77.forwardRef)(
8643
+ var ToggleRadio = (0, import_react78.forwardRef)(
8637
8644
  (props, ref) => {
8638
8645
  const {
8639
8646
  value,
@@ -8647,15 +8654,15 @@ var ToggleRadio = (0, import_react77.forwardRef)(
8647
8654
  id,
8648
8655
  ...rest
8649
8656
  } = props;
8650
- const generatedId = (0, import_react77.useId)();
8657
+ const generatedId = (0, import_react78.useId)();
8651
8658
  const uniqueId = id != null ? id : `${generatedId}-ToggleRadio`;
8652
8659
  const group4 = useToggleBarContext();
8653
8660
  const handleChange = (event) => {
8654
8661
  onChange && onChange(event);
8655
8662
  (group4 == null ? void 0 : group4.onChange) && group4.onChange(event);
8656
8663
  };
8657
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Label6, { size: group4.size, htmlFor: uniqueId, children: [
8658
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
8664
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(Label6, { size: group4.size, htmlFor: uniqueId, children: [
8665
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
8659
8666
  import_dds_form27.HiddenInput,
8660
8667
  {
8661
8668
  ...(0, import_dds_core82.getBaseHTMLProps)(uniqueId, className, htmlProps, rest),
@@ -8667,9 +8674,9 @@ var ToggleRadio = (0, import_react77.forwardRef)(
8667
8674
  checked: calculateChecked(value, group4, checked)
8668
8675
  }
8669
8676
  ),
8670
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Content3, { $size: group4.size, $justIcon: !!icon12 && !label3, children: [
8671
- icon12 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_dds_icons33.Icon, { icon: icon12, iconSize: "inherit" }),
8672
- label3 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { children: label3 })
8677
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(Content3, { $size: group4.size, $justIcon: !!icon12 && !label3, children: [
8678
+ icon12 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_dds_icons33.Icon, { icon: icon12, iconSize: "inherit" }),
8679
+ label3 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: label3 })
8673
8680
  ] })
8674
8681
  ] });
8675
8682
  }
@@ -8777,18 +8784,18 @@ var gridTokens = {
8777
8784
  };
8778
8785
 
8779
8786
  // src/components/Grid/Grid.context.tsx
8780
- var import_react78 = require("react");
8787
+ var import_react79 = require("react");
8781
8788
  var import_dds_core84 = require("@norges-domstoler/dds-core");
8782
- var GridContext = (0, import_react78.createContext)({
8789
+ var GridContext = (0, import_react79.createContext)({
8783
8790
  screenSize: import_dds_core84.ScreenSize.Large
8784
8791
  });
8785
8792
  var useGridContext = () => {
8786
- return (0, import_react78.useContext)(GridContext);
8793
+ return (0, import_react79.useContext)(GridContext);
8787
8794
  };
8788
8795
 
8789
8796
  // src/components/Grid/Grid.tsx
8790
8797
  var import_dds_core87 = require("@norges-domstoler/dds-core");
8791
- var import_jsx_runtime78 = require("react/jsx-runtime");
8798
+ var import_jsx_runtime79 = require("react/jsx-runtime");
8792
8799
  var getHooksGridStyling = (screenSize, maxWidth, rowGap) => {
8793
8800
  const tokens2 = gridTokens[screenSize].grid;
8794
8801
  return {
@@ -8819,14 +8826,14 @@ var StyledGrid = import_styled_components69.default.div.withConfig({
8819
8826
  var Grid = (props) => {
8820
8827
  const { id, className, children, htmlProps, as, ...rest } = props;
8821
8828
  const screenSize = (0, import_dds_core85.useScreenSize)();
8822
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(GridContext.Provider, { value: { screenSize }, children: as === "div" ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
8829
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(GridContext.Provider, { value: { screenSize }, children: as === "div" ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
8823
8830
  StyledGrid,
8824
8831
  {
8825
8832
  ...(0, import_dds_core86.getBaseHTMLProps)(id, className, htmlProps, rest),
8826
8833
  screenSize,
8827
8834
  children
8828
8835
  }
8829
- ) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
8836
+ ) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
8830
8837
  StyledGrid,
8831
8838
  {
8832
8839
  ...(0, import_dds_core86.getBaseHTMLProps)(id, className, htmlProps, rest),
@@ -8842,7 +8849,7 @@ Grid.displayName = "Grid";
8842
8849
  var import_styled_components70 = __toESM(require("styled-components"));
8843
8850
  var import_dds_core88 = require("@norges-domstoler/dds-core");
8844
8851
  var import_dds_core89 = require("@norges-domstoler/dds-core");
8845
- var import_jsx_runtime79 = require("react/jsx-runtime");
8852
+ var import_jsx_runtime80 = require("react/jsx-runtime");
8846
8853
  var isRelativeGridColumn = (type) => {
8847
8854
  return type === "all" || type === "firstHalf" || type === "secondHalf";
8848
8855
  };
@@ -8868,7 +8875,7 @@ var StyledGridChild = import_styled_components70.default.div.withConfig({
8868
8875
  var GridChild = (props) => {
8869
8876
  const { id, className, htmlProps, children, ...rest } = props;
8870
8877
  const { screenSize } = useGridContext();
8871
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
8878
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
8872
8879
  StyledGridChild,
8873
8880
  {
8874
8881
  ...(0, import_dds_core88.getBaseHTMLProps)(id, className, htmlProps, rest),
@@ -8880,18 +8887,18 @@ var GridChild = (props) => {
8880
8887
  GridChild.displayName = "GridChild";
8881
8888
 
8882
8889
  // src/components/ProgressTracker/ProgressTracker.tsx
8883
- var import_react81 = require("react");
8890
+ var import_react82 = require("react");
8884
8891
  var import_styled_components72 = __toESM(require("styled-components"));
8885
8892
  var import_dds_core90 = require("@norges-domstoler/dds-core");
8886
8893
 
8887
8894
  // src/components/ProgressTracker/ProgressTracker.context.tsx
8888
- var import_react79 = require("react");
8889
- var ProgressTrackerContext = (0, import_react79.createContext)(
8895
+ var import_react80 = require("react");
8896
+ var ProgressTrackerContext = (0, import_react80.createContext)(
8890
8897
  {
8891
8898
  activeStep: 0
8892
8899
  }
8893
8900
  );
8894
- var useProgressTrackerContext = () => (0, import_react79.useContext)(ProgressTrackerContext);
8901
+ var useProgressTrackerContext = () => (0, import_react80.useContext)(ProgressTrackerContext);
8895
8902
 
8896
8903
  // src/components/ProgressTracker/ProgressTracker.tokens.tsx
8897
8904
  var import_dds_design_tokens37 = require("@norges-domstoler/dds-design-tokens");
@@ -8912,7 +8919,7 @@ var connector = {
8912
8919
  width: "1px"
8913
8920
  };
8914
8921
  var itemNumber = {
8915
- size: "28px",
8922
+ size: "1.75rem",
8916
8923
  borderWidth: "2px",
8917
8924
  iconSize: "small",
8918
8925
  active: {
@@ -8973,13 +8980,13 @@ var progressTrackerTokens = {
8973
8980
  };
8974
8981
 
8975
8982
  // src/components/ProgressTracker/ProgressTrackerItem.tsx
8976
- var import_react80 = require("react");
8983
+ var import_react81 = require("react");
8977
8984
  var import_styled_components71 = __toESM(require("styled-components"));
8978
8985
  var import_dds_icons34 = require("@norges-domstoler/dds-icons");
8979
8986
  var import_dds_icons35 = require("@norges-domstoler/dds-icons");
8980
8987
  var import_dds_typography41 = require("@norges-domstoler/dds-typography");
8981
8988
  var import_dds_form28 = require("@norges-domstoler/dds-form");
8982
- var import_jsx_runtime80 = require("react/jsx-runtime");
8989
+ var import_jsx_runtime81 = require("react/jsx-runtime");
8983
8990
  var toItemState = (active, completed, disabled) => {
8984
8991
  if (disabled) {
8985
8992
  return "disabled";
@@ -9111,16 +9118,16 @@ var ProgressTrackerItem = (props) => {
9111
9118
  const styleProps = {
9112
9119
  $state: toItemState(active, completed, disabled)
9113
9120
  };
9114
- const stepNumberContent = (0, import_react80.useMemo)(() => {
9121
+ const stepNumberContent = (0, import_react81.useMemo)(() => {
9115
9122
  if (completed) {
9116
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_dds_icons35.Icon, { icon: import_dds_icons34.CheckIcon, iconSize: itemNumber2.iconSize });
9123
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_dds_icons35.Icon, { icon: import_dds_icons34.CheckIcon, iconSize: itemNumber2.iconSize });
9117
9124
  }
9118
9125
  if (icon12 !== void 0) {
9119
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_dds_icons35.Icon, { icon: icon12, iconSize: itemNumber2.iconSize });
9126
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_dds_icons35.Icon, { icon: icon12, iconSize: itemNumber2.iconSize });
9120
9127
  }
9121
9128
  return index + 1;
9122
9129
  }, [completed, icon12, index]);
9123
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ItemWrapper, { "aria-current": active ? "step" : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
9130
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ItemWrapper, { "aria-current": active ? "step" : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
9124
9131
  ItemContentWrapper,
9125
9132
  {
9126
9133
  ...styleProps,
@@ -9128,9 +9135,9 @@ var ProgressTrackerItem = (props) => {
9128
9135
  onClick: !disabled && handleStepChange ? () => handleStepChange(index) : void 0,
9129
9136
  disabled,
9130
9137
  children: [
9131
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ItemNumber, { ...styleProps, "aria-hidden": true, children: stepNumberContent }),
9132
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(ItemText, { ...styleProps, children: [
9133
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(VisuallyHidden, { as: "span", children: getVisuallyHiddenText(active, completed, index) }),
9138
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ItemNumber, { ...styleProps, "aria-hidden": true, children: stepNumberContent }),
9139
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(ItemText, { ...styleProps, children: [
9140
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(VisuallyHidden, { as: "span", children: getVisuallyHiddenText(active, completed, index) }),
9134
9141
  children
9135
9142
  ] })
9136
9143
  ]
@@ -9140,7 +9147,7 @@ var ProgressTrackerItem = (props) => {
9140
9147
  ProgressTrackerItem.displayName = "ProgressTracker.Item";
9141
9148
 
9142
9149
  // src/components/ProgressTracker/ProgressTracker.tsx
9143
- var import_jsx_runtime81 = require("react/jsx-runtime");
9150
+ var import_jsx_runtime82 = require("react/jsx-runtime");
9144
9151
  var ItemsWrapper = import_styled_components72.default.ol`
9145
9152
  display: flex;
9146
9153
  flex-direction: column;
@@ -9159,7 +9166,7 @@ var ProgressTrackerConnector = import_styled_components72.default.div`
9159
9166
  ${progressTrackerTokens.connector.color};
9160
9167
  `;
9161
9168
  var ProgressTracker = (() => {
9162
- const Res = (0, import_react81.forwardRef)((props, ref) => {
9169
+ const Res = (0, import_react82.forwardRef)((props, ref) => {
9163
9170
  const {
9164
9171
  id,
9165
9172
  activeStep = 0,
@@ -9169,12 +9176,12 @@ var ProgressTracker = (() => {
9169
9176
  htmlProps,
9170
9177
  ...rest
9171
9178
  } = props;
9172
- const [thisActiveStep, setActiveStep] = (0, import_react81.useState)(activeStep);
9179
+ const [thisActiveStep, setActiveStep] = (0, import_react82.useState)(activeStep);
9173
9180
  const handleChange = (step) => {
9174
9181
  setActiveStep(step);
9175
9182
  onStepChange && onStepChange(step);
9176
9183
  };
9177
- (0, import_react81.useEffect)(() => {
9184
+ (0, import_react82.useEffect)(() => {
9178
9185
  if (activeStep !== void 0 && activeStep != thisActiveStep) {
9179
9186
  setActiveStep(activeStep);
9180
9187
  }
@@ -9183,20 +9190,20 @@ var ProgressTracker = (() => {
9183
9190
  ...(0, import_dds_core90.getBaseHTMLProps)(id, className, htmlProps, rest),
9184
9191
  ref
9185
9192
  };
9186
- const steps = (0, import_react81.useMemo)(() => {
9193
+ const steps = (0, import_react82.useMemo)(() => {
9187
9194
  const validChildren = removeInvalidChildren(children);
9188
9195
  const itemsWithIndex = passIndexPropToProgressTrackerItem(validChildren);
9189
9196
  const itemsWithConnectorsBetween = intersperseItemsWithConnector(itemsWithIndex);
9190
9197
  return itemsWithConnectorsBetween;
9191
9198
  }, [children]);
9192
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
9199
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
9193
9200
  ProgressTrackerContext.Provider,
9194
9201
  {
9195
9202
  value: {
9196
9203
  activeStep: thisActiveStep,
9197
9204
  handleStepChange: handleChange
9198
9205
  },
9199
- children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { role: "group", "aria-label": "progress", ...containerProps, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ItemsWrapper, { children: steps }) })
9206
+ children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { role: "group", "aria-label": "progress", ...containerProps, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ItemsWrapper, { children: steps }) })
9200
9207
  }
9201
9208
  );
9202
9209
  });
@@ -9205,34 +9212,34 @@ var ProgressTracker = (() => {
9205
9212
  return Res;
9206
9213
  })();
9207
9214
  function removeInvalidChildren(children) {
9208
- return import_react81.Children.toArray(children).filter(import_react81.isValidElement);
9215
+ return import_react82.Children.toArray(children).filter(import_react82.isValidElement);
9209
9216
  }
9210
9217
  function passIndexPropToProgressTrackerItem(children) {
9211
- return import_react81.Children.map(
9218
+ return import_react82.Children.map(
9212
9219
  children,
9213
- (item, index) => (0, import_react81.cloneElement)(item, {
9220
+ (item, index) => (0, import_react82.cloneElement)(item, {
9214
9221
  ...item.props,
9215
9222
  index
9216
9223
  })
9217
9224
  );
9218
9225
  }
9219
- var intersperseItemsWithConnector = (children) => import_react81.Children.map(children, (child, index) => {
9226
+ var intersperseItemsWithConnector = (children) => import_react82.Children.map(children, (child, index) => {
9220
9227
  if (index === 0) {
9221
9228
  return child;
9222
9229
  }
9223
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_react81.Fragment, { children: [
9224
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ProgressTrackerConnector, { "aria-hidden": true }),
9230
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_react82.Fragment, { children: [
9231
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ProgressTrackerConnector, { "aria-hidden": true }),
9225
9232
  child
9226
9233
  ] }, index);
9227
9234
  });
9228
9235
 
9229
9236
  // src/components/InlineEdit/InlineEditTextArea.tsx
9230
- var import_react84 = require("react");
9237
+ var import_react85 = require("react");
9231
9238
 
9232
9239
  // src/components/InlineEdit/InlineEdit.tsx
9233
- var import_react82 = require("react");
9240
+ var import_react83 = require("react");
9234
9241
  var import_dds_core91 = require("@norges-domstoler/dds-core");
9235
- var import_jsx_runtime82 = require("react/jsx-runtime");
9242
+ var import_jsx_runtime83 = require("react/jsx-runtime");
9236
9243
  var InlineEdit = (props) => {
9237
9244
  const {
9238
9245
  emptiable,
@@ -9244,8 +9251,8 @@ var InlineEdit = (props) => {
9244
9251
  inputRef,
9245
9252
  children
9246
9253
  } = props;
9247
- const [editingValue, setEditingValue] = (0, import_react82.useState)(value != null ? value : "");
9248
- const [isEditing, setIsEditing] = (0, import_react82.useState)(false);
9254
+ const [editingValue, setEditingValue] = (0, import_react83.useState)(value != null ? value : "");
9255
+ const [isEditing, setIsEditing] = (0, import_react83.useState)(false);
9249
9256
  const onChangeHandler = (e) => {
9250
9257
  setEditingValue(e.target.value);
9251
9258
  onChange && onChange();
@@ -9272,8 +9279,8 @@ var InlineEdit = (props) => {
9272
9279
  (0, import_dds_core91.useOnKeyDown)(["Enter"], () => onExitHandler());
9273
9280
  (0, import_dds_core91.useOnKeyDown)(["Escape"], () => onExitHandler());
9274
9281
  (0, import_dds_core91.useOnClickOutside)(inputRef.current, () => onExitHandler());
9275
- const inputChild = import_react82.Children.only(
9276
- (0, import_react82.isValidElement)(children) && (0, import_react82.cloneElement)(children, {
9282
+ const inputChild = import_react83.Children.only(
9283
+ (0, import_react83.isValidElement)(children) && (0, import_react83.cloneElement)(children, {
9277
9284
  onChange: onChangeHandler,
9278
9285
  onBlur: onBlurHandler,
9279
9286
  onFocus: onFocusHandler,
@@ -9282,7 +9289,7 @@ var InlineEdit = (props) => {
9282
9289
  emptiable
9283
9290
  })
9284
9291
  );
9285
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_jsx_runtime82.Fragment, { children: inputChild });
9292
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_jsx_runtime83.Fragment, { children: inputChild });
9286
9293
  };
9287
9294
  InlineEdit.displayName = "InlineEdit";
9288
9295
 
@@ -9290,7 +9297,7 @@ InlineEdit.displayName = "InlineEdit";
9290
9297
  var import_dds_core94 = require("@norges-domstoler/dds-core");
9291
9298
 
9292
9299
  // src/components/InlineEdit/InlineTextArea.tsx
9293
- var import_react83 = require("react");
9300
+ var import_react84 = require("react");
9294
9301
  var import_dds_icons36 = require("@norges-domstoler/dds-icons");
9295
9302
  var import_dds_icons37 = require("@norges-domstoler/dds-icons");
9296
9303
  var import_dds_core92 = require("@norges-domstoler/dds-core");
@@ -9366,8 +9373,8 @@ var IconWrapper2 = import_styled_components73.default.span`
9366
9373
  `;
9367
9374
 
9368
9375
  // src/components/InlineEdit/InlineEdit.utils.tsx
9369
- var import_jsx_runtime83 = require("react/jsx-runtime");
9370
- var inlineEditVisuallyHidden = (id, emptiable) => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(VisuallyHidden, { id, as: "span", children: [
9376
+ var import_jsx_runtime84 = require("react/jsx-runtime");
9377
+ var inlineEditVisuallyHidden = (id, emptiable) => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(VisuallyHidden, { id, as: "span", children: [
9371
9378
  "Escape, Enter eller Tab for \xE5 lagre.",
9372
9379
  " ",
9373
9380
  !emptiable && "Inputfeltet er ikke t\xF8mmbar."
@@ -9376,8 +9383,8 @@ var inlineEditVisuallyHidden = (id, emptiable) => /* @__PURE__ */ (0, import_jsx
9376
9383
  // src/components/InlineEdit/InlineTextArea.tsx
9377
9384
  var import_dds_core93 = require("@norges-domstoler/dds-core");
9378
9385
  var import_dds_form30 = require("@norges-domstoler/dds-form");
9379
- var import_jsx_runtime84 = require("react/jsx-runtime");
9380
- var InlineTextArea = (0, import_react83.forwardRef)((props, ref) => {
9386
+ var import_jsx_runtime85 = require("react/jsx-runtime");
9387
+ var InlineTextArea = (0, import_react84.forwardRef)((props, ref) => {
9381
9388
  const {
9382
9389
  id,
9383
9390
  error,
@@ -9389,26 +9396,26 @@ var InlineTextArea = (0, import_react83.forwardRef)((props, ref) => {
9389
9396
  hideIcon,
9390
9397
  ...rest
9391
9398
  } = props;
9392
- const genereatedId = (0, import_react83.useId)();
9399
+ const genereatedId = (0, import_react84.useId)();
9393
9400
  const uniqueId = id != null ? id : `${genereatedId}-InlineTextArea`;
9394
9401
  const hasErrorMessage = !!errorMessage;
9395
9402
  const errorMessageId = (0, import_dds_core92.derivativeIdGenerator)(uniqueId, "errorMessage");
9396
9403
  const descId = (0, import_dds_core92.derivativeIdGenerator)(uniqueId, "desc");
9397
- const inputRef = (0, import_react83.useRef)(null);
9404
+ const inputRef = (0, import_react84.useRef)(null);
9398
9405
  const combinedRef = (0, import_dds_core93.useCombinedRef)(ref, inputRef);
9399
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_dds_form30.OuterInputContainer, { width, children: [
9400
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_dds_form30.InputContainer, { children: [
9401
- !isEditing && !hideIcon && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
9406
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_dds_form30.OuterInputContainer, { width, children: [
9407
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_dds_form30.InputContainer, { children: [
9408
+ !isEditing && !hideIcon && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9402
9409
  IconWrapper2,
9403
9410
  {
9404
9411
  onClick: () => {
9405
9412
  var _a;
9406
9413
  (_a = inputRef.current) == null ? void 0 : _a.focus();
9407
9414
  },
9408
- children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_dds_icons37.Icon, { icon: import_dds_icons36.EditIcon, iconSize: "small" })
9415
+ children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_dds_icons37.Icon, { icon: import_dds_icons36.EditIcon, iconSize: "small" })
9409
9416
  }
9410
9417
  ),
9411
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
9418
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9412
9419
  StyledInlineTextArea,
9413
9420
  {
9414
9421
  ...rest,
@@ -9432,12 +9439,12 @@ var InlineTextArea = (0, import_react83.forwardRef)((props, ref) => {
9432
9439
  InlineTextArea.displayName = "InlineTextArea";
9433
9440
 
9434
9441
  // src/components/InlineEdit/InlineEditTextArea.tsx
9435
- var import_jsx_runtime85 = require("react/jsx-runtime");
9436
- var InlineEditTextArea = (0, import_react84.forwardRef)((props, ref) => {
9442
+ var import_jsx_runtime86 = require("react/jsx-runtime");
9443
+ var InlineEditTextArea = (0, import_react85.forwardRef)((props, ref) => {
9437
9444
  const { onSetValue, emptiable, value, onFocus, onChange, onBlur, ...rest } = props;
9438
- const textareaRef = (0, import_react84.useRef)(null);
9445
+ const textareaRef = (0, import_react85.useRef)(null);
9439
9446
  const combinedRef = (0, import_dds_core94.useCombinedRef)(ref, textareaRef);
9440
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9447
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9441
9448
  InlineEdit,
9442
9449
  {
9443
9450
  onSetValue,
@@ -9447,24 +9454,24 @@ var InlineEditTextArea = (0, import_react84.forwardRef)((props, ref) => {
9447
9454
  onFocus,
9448
9455
  onChange,
9449
9456
  onBlur,
9450
- children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(InlineTextArea, { ref: combinedRef, ...rest })
9457
+ children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(InlineTextArea, { ref: combinedRef, ...rest })
9451
9458
  }
9452
9459
  );
9453
9460
  });
9454
9461
 
9455
9462
  // src/components/InlineEdit/InlineEditInput.tsx
9456
- var import_react86 = require("react");
9463
+ var import_react87 = require("react");
9457
9464
  var import_dds_core97 = require("@norges-domstoler/dds-core");
9458
9465
 
9459
9466
  // src/components/InlineEdit/InlineInput.tsx
9460
- var import_react85 = require("react");
9467
+ var import_react86 = require("react");
9461
9468
  var import_dds_icons38 = require("@norges-domstoler/dds-icons");
9462
9469
  var import_dds_icons39 = require("@norges-domstoler/dds-icons");
9463
9470
  var import_dds_core95 = require("@norges-domstoler/dds-core");
9464
9471
  var import_dds_core96 = require("@norges-domstoler/dds-core");
9465
9472
  var import_dds_form31 = require("@norges-domstoler/dds-form");
9466
- var import_jsx_runtime86 = require("react/jsx-runtime");
9467
- var InlineInput = (0, import_react85.forwardRef)(
9473
+ var import_jsx_runtime87 = require("react/jsx-runtime");
9474
+ var InlineInput = (0, import_react86.forwardRef)(
9468
9475
  (props, ref) => {
9469
9476
  const {
9470
9477
  id,
@@ -9477,28 +9484,28 @@ var InlineInput = (0, import_react85.forwardRef)(
9477
9484
  hideIcon,
9478
9485
  ...rest
9479
9486
  } = props;
9480
- const genereatedId = (0, import_react85.useId)();
9487
+ const genereatedId = (0, import_react86.useId)();
9481
9488
  const uniqueId = id != null ? id : `${genereatedId}-InlineInput`;
9482
9489
  const hasErrorMessage = !!errorMessage;
9483
9490
  const hasError = !!error;
9484
9491
  const hasErrorState = hasError || hasErrorMessage;
9485
9492
  const errorMessageId = (0, import_dds_core95.derivativeIdGenerator)(uniqueId, "errorMessage");
9486
9493
  const descId = (0, import_dds_core95.derivativeIdGenerator)(uniqueId, "desc");
9487
- const inputRef = (0, import_react85.useRef)(null);
9494
+ const inputRef = (0, import_react86.useRef)(null);
9488
9495
  const combinedRef = (0, import_dds_core96.useCombinedRef)(ref, inputRef);
9489
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_dds_form31.OuterInputContainer, { width, children: [
9490
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_dds_form31.InputContainer, { children: [
9491
- !isEditing && !hideIcon && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9496
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_dds_form31.OuterInputContainer, { width, children: [
9497
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_dds_form31.InputContainer, { children: [
9498
+ !isEditing && !hideIcon && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9492
9499
  IconWrapper2,
9493
9500
  {
9494
9501
  onClick: () => {
9495
9502
  var _a;
9496
9503
  (_a = inputRef.current) == null ? void 0 : _a.focus();
9497
9504
  },
9498
- children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_dds_icons39.Icon, { icon: import_dds_icons38.EditIcon, iconSize: "small" })
9505
+ children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_dds_icons39.Icon, { icon: import_dds_icons38.EditIcon, iconSize: "small" })
9499
9506
  }
9500
9507
  ),
9501
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9508
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9502
9509
  StyledInlineInput,
9503
9510
  {
9504
9511
  ...rest,
@@ -9524,12 +9531,12 @@ var InlineInput = (0, import_react85.forwardRef)(
9524
9531
  InlineInput.displayName = "InlineInput";
9525
9532
 
9526
9533
  // src/components/InlineEdit/InlineEditInput.tsx
9527
- var import_jsx_runtime87 = require("react/jsx-runtime");
9528
- var InlineEditInput = (0, import_react86.forwardRef)((props, ref) => {
9534
+ var import_jsx_runtime88 = require("react/jsx-runtime");
9535
+ var InlineEditInput = (0, import_react87.forwardRef)((props, ref) => {
9529
9536
  const { onSetValue, emptiable, value, onFocus, onChange, onBlur, ...rest } = props;
9530
- const inputRef = (0, import_react86.useRef)(null);
9537
+ const inputRef = (0, import_react87.useRef)(null);
9531
9538
  const combinedRef = (0, import_dds_core97.useCombinedRef)(ref, inputRef);
9532
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9539
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9533
9540
  InlineEdit,
9534
9541
  {
9535
9542
  onSetValue,
@@ -9539,13 +9546,13 @@ var InlineEditInput = (0, import_react86.forwardRef)((props, ref) => {
9539
9546
  onFocus,
9540
9547
  onChange,
9541
9548
  onBlur,
9542
- children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(InlineInput, { ...rest, ref: combinedRef })
9549
+ children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(InlineInput, { ...rest, ref: combinedRef })
9543
9550
  }
9544
9551
  );
9545
9552
  });
9546
9553
 
9547
9554
  // src/components/TextArea/TextArea.tsx
9548
- var import_react87 = require("react");
9555
+ var import_react88 = require("react");
9549
9556
  var import_styled_components74 = __toESM(require("styled-components"));
9550
9557
  var import_dds_core98 = require("@norges-domstoler/dds-core");
9551
9558
  var import_dds_typography42 = require("@norges-domstoler/dds-typography");
@@ -9563,7 +9570,7 @@ var textAreaTokens = {
9563
9570
  };
9564
9571
 
9565
9572
  // src/components/TextArea/TextArea.tsx
9566
- var import_jsx_runtime88 = require("react/jsx-runtime");
9573
+ var import_jsx_runtime89 = require("react/jsx-runtime");
9567
9574
  var defaultWidth5 = "320px";
9568
9575
  var { textarea: textarea2 } = textAreaTokens;
9569
9576
  var StyledTextArea = (0, import_styled_components74.default)(import_dds_form32.StatefulInput)`
@@ -9575,7 +9582,7 @@ var StyledTextArea = (0, import_styled_components74.default)(import_dds_form32.S
9575
9582
  padding-bottom: ${textarea2.paddingBottom};
9576
9583
  ${(0, import_dds_typography43.getFontStyling)(import_dds_form32.inputTypographyTypes.medium)}
9577
9584
  `;
9578
- var TextArea = (0, import_react87.forwardRef)(
9585
+ var TextArea = (0, import_react88.forwardRef)(
9579
9586
  (props, ref) => {
9580
9587
  const {
9581
9588
  id,
@@ -9594,14 +9601,14 @@ var TextArea = (0, import_react87.forwardRef)(
9594
9601
  width = defaultWidth5,
9595
9602
  ...rest
9596
9603
  } = props;
9597
- const generatedId = (0, import_react87.useId)();
9604
+ const generatedId = (0, import_react88.useId)();
9598
9605
  const uniqueId = id != null ? id : `${generatedId}-textArea`;
9599
- const textAreaRef = (0, import_react87.useRef)(null);
9606
+ const textAreaRef = (0, import_react88.useRef)(null);
9600
9607
  const multiRef = (0, import_dds_core98.useCombinedRef)(ref, textAreaRef);
9601
- const [text, setText] = (0, import_react87.useState)(
9608
+ const [text, setText] = (0, import_react88.useState)(
9602
9609
  (0, import_dds_form32.getDefaultText)(value, defaultValue)
9603
9610
  );
9604
- (0, import_react87.useEffect)(() => {
9611
+ (0, import_react88.useEffect)(() => {
9605
9612
  if (textAreaRef == null ? void 0 : textAreaRef.current) {
9606
9613
  textAreaRef.current.style.height = `${textAreaRef.current.scrollHeight + 2}px`;
9607
9614
  }
@@ -9640,9 +9647,9 @@ var TextArea = (0, import_react87.forwardRef)(
9640
9647
  "aria-invalid": hasErrorMessage ? true : void 0,
9641
9648
  ...rest
9642
9649
  };
9643
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_dds_form32.OuterInputContainer, { ...containerProps, children: [
9644
- hasLabel && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_dds_typography42.Label, { showRequiredStyling, htmlFor: uniqueId, children: label3 }),
9645
- /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(StyledTextArea, { ...textAreaProps, as: "textarea" }),
9650
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_dds_form32.OuterInputContainer, { ...containerProps, children: [
9651
+ hasLabel && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_dds_typography42.Label, { showRequiredStyling, htmlFor: uniqueId, children: label3 }),
9652
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(StyledTextArea, { ...textAreaProps, as: "textarea" }),
9646
9653
  renderInputMessage(tip, tipId, errorMessage, errorMessageId)
9647
9654
  ] });
9648
9655
  }
@@ -9650,7 +9657,7 @@ var TextArea = (0, import_react87.forwardRef)(
9650
9657
  TextArea.displayName = "TextArea";
9651
9658
 
9652
9659
  // src/components/SplitButton/SplitButton.tsx
9653
- var import_react88 = require("react");
9660
+ var import_react89 = require("react");
9654
9661
  var import_styled_components75 = __toESM(require("styled-components"));
9655
9662
  var import_dds_icons40 = require("@norges-domstoler/dds-icons");
9656
9663
 
@@ -9666,7 +9673,7 @@ var tokens = {
9666
9673
  };
9667
9674
 
9668
9675
  // src/components/SplitButton/SplitButton.tsx
9669
- var import_jsx_runtime89 = require("react/jsx-runtime");
9676
+ var import_jsx_runtime90 = require("react/jsx-runtime");
9670
9677
  var Container16 = import_styled_components75.default.div`
9671
9678
  display: flex;
9672
9679
  `;
@@ -9697,7 +9704,7 @@ var OptionButton = (0, import_styled_components75.default)(Button)`
9697
9704
  ${(props) => props.purpose === "primary" && `border-left: ${tokens.mainButton.primary.borderLeft}`};
9698
9705
  }
9699
9706
  `;
9700
- var SplitButton = (0, import_react88.forwardRef)(
9707
+ var SplitButton = (0, import_react89.forwardRef)(
9701
9708
  (props, ref) => {
9702
9709
  const {
9703
9710
  size,
@@ -9705,14 +9712,14 @@ var SplitButton = (0, import_react88.forwardRef)(
9705
9712
  secondaryActions,
9706
9713
  purpose = "primary"
9707
9714
  } = props;
9708
- const [isOpen, setIsOpen] = (0, import_react88.useState)(false);
9715
+ const [isOpen, setIsOpen] = (0, import_react89.useState)(false);
9709
9716
  const buttonStyleProps = {
9710
9717
  appearance: "filled",
9711
9718
  purpose,
9712
9719
  size
9713
9720
  };
9714
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Container16, { ref, children: [
9715
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9721
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(Container16, { ref, children: [
9722
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9716
9723
  MainButton,
9717
9724
  {
9718
9725
  ...buttonStyleProps,
@@ -9720,8 +9727,8 @@ var SplitButton = (0, import_react88.forwardRef)(
9720
9727
  iconPosition: "left"
9721
9728
  }
9722
9729
  ),
9723
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(OverflowMenuGroup, { onToggle: () => setIsOpen(!isOpen), children: [
9724
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9730
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(OverflowMenuGroup, { onToggle: () => setIsOpen(!isOpen), children: [
9731
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9725
9732
  OptionButton,
9726
9733
  {
9727
9734
  ...buttonStyleProps,
@@ -9730,7 +9737,7 @@ var SplitButton = (0, import_react88.forwardRef)(
9730
9737
  purpose
9731
9738
  }
9732
9739
  ),
9733
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(OverflowMenu, { items: secondaryActions, placement: "bottom-end" })
9740
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(OverflowMenu, { items: secondaryActions, placement: "bottom-end" })
9734
9741
  ] })
9735
9742
  ] });
9736
9743
  }
@@ -9738,7 +9745,7 @@ var SplitButton = (0, import_react88.forwardRef)(
9738
9745
  SplitButton.displayName = "SplitButton";
9739
9746
 
9740
9747
  // src/components/Stack/Stack.tsx
9741
- var import_react89 = require("react");
9748
+ var import_react90 = require("react");
9742
9749
  var import_styled_components76 = __toESM(require("styled-components"));
9743
9750
 
9744
9751
  // src/components/Stack/Stack.tokens.tsx
@@ -9768,7 +9775,7 @@ var stackTokens = {
9768
9775
 
9769
9776
  // src/components/Stack/Stack.tsx
9770
9777
  var import_dds_core99 = require("@norges-domstoler/dds-core");
9771
- var import_jsx_runtime90 = require("react/jsx-runtime");
9778
+ var import_jsx_runtime91 = require("react/jsx-runtime");
9772
9779
  var Stack = import_styled_components76.default.div.withConfig({
9773
9780
  shouldForwardProp: (prop) => {
9774
9781
  const styleOnlyProps = [
@@ -9798,8 +9805,8 @@ Stack.defaultProps = {
9798
9805
  align: "center",
9799
9806
  justify: "flex-start"
9800
9807
  };
9801
- var HStack = (0, import_react89.forwardRef)(
9802
- ({ id, className, htmlProps, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9808
+ var HStack = (0, import_react90.forwardRef)(
9809
+ ({ id, className, htmlProps, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
9803
9810
  Stack,
9804
9811
  {
9805
9812
  direction: "horizontal",
@@ -9809,8 +9816,8 @@ var HStack = (0, import_react89.forwardRef)(
9809
9816
  )
9810
9817
  );
9811
9818
  HStack.displayName = "HStack";
9812
- var VStack = (0, import_react89.forwardRef)(
9813
- ({ id, className, htmlProps, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9819
+ var VStack = (0, import_react90.forwardRef)(
9820
+ ({ id, className, htmlProps, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
9814
9821
  Stack,
9815
9822
  {
9816
9823
  direction: "vertical",
@@ -9822,7 +9829,7 @@ var VStack = (0, import_react89.forwardRef)(
9822
9829
  VStack.displayName = "VStack";
9823
9830
 
9824
9831
  // src/components/FileUploader/FileUploader.tsx
9825
- var import_react91 = require("react");
9832
+ var import_react92 = require("react");
9826
9833
  var import_styled_components79 = __toESM(require("styled-components"));
9827
9834
  var import_dds_icons42 = require("@norges-domstoler/dds-icons");
9828
9835
  var import_dds_core101 = require("@norges-domstoler/dds-core");
@@ -9861,7 +9868,7 @@ var errorsTokens = {
9861
9868
  };
9862
9869
 
9863
9870
  // src/components/FileUploader/ErrorList.tsx
9864
- var import_jsx_runtime91 = require("react/jsx-runtime");
9871
+ var import_jsx_runtime92 = require("react/jsx-runtime");
9865
9872
  var MessageContainer2 = import_styled_components77.default.div`
9866
9873
  display: flex;
9867
9874
  flex-direction: column;
@@ -9872,8 +9879,8 @@ var ErrorList = (props) => {
9872
9879
  if (errors.length < 1) {
9873
9880
  return null;
9874
9881
  }
9875
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(MessageContainer2, { children: errors.map(({ id, message: message2 }) => {
9876
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
9882
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(MessageContainer2, { children: errors.map(({ id, message: message2 }) => {
9883
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
9877
9884
  InputMessage,
9878
9885
  {
9879
9886
  id,
@@ -9889,7 +9896,7 @@ var ErrorList = (props) => {
9889
9896
  var import_styled_components78 = __toESM(require("styled-components"));
9890
9897
  var import_dds_icons41 = require("@norges-domstoler/dds-icons");
9891
9898
  var import_dds_core100 = require("@norges-domstoler/dds-core");
9892
- var import_jsx_runtime92 = require("react/jsx-runtime");
9899
+ var import_jsx_runtime93 = require("react/jsx-runtime");
9893
9900
  var FileWrapper = import_styled_components78.default.li``;
9894
9901
  var FileNameWrapper = import_styled_components78.default.span`
9895
9902
  word-break: break-all;
@@ -9915,10 +9922,10 @@ var File = (props) => {
9915
9922
  id: (0, import_dds_core100.derivativeIdGenerator)(parentId, `file-${index}-error-${errorIndex}`),
9916
9923
  message: e
9917
9924
  }));
9918
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(FileWrapper, { children: [
9919
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(FileElement, { ...props, children: [
9920
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(FileNameWrapper, { children: stateFile.file.name }),
9921
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
9925
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(FileWrapper, { children: [
9926
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(FileElement, { ...props, children: [
9927
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(FileNameWrapper, { children: stateFile.file.name }),
9928
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
9922
9929
  RemoveFileButton,
9923
9930
  {
9924
9931
  size: "small",
@@ -9938,12 +9945,12 @@ var File = (props) => {
9938
9945
  }
9939
9946
  )
9940
9947
  ] }),
9941
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ErrorList, { errors: errorsList })
9948
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ErrorList, { errors: errorsList })
9942
9949
  ] }, stateFile.file.name);
9943
9950
  };
9944
9951
 
9945
9952
  // src/components/FileUploader/useFileUploader.ts
9946
- var import_react90 = require("react");
9953
+ var import_react91 = require("react");
9947
9954
 
9948
9955
  // src/components/FileUploader/fileUploaderReducer.ts
9949
9956
  var fileUploaderReducer = (state, action) => {
@@ -10026,18 +10033,18 @@ var useFileUploader = (props) => {
10026
10033
  disabled,
10027
10034
  errorMessage
10028
10035
  } = props;
10029
- const rootRef = (0, import_react90.useRef)(null);
10030
- const inputRef = (0, import_react90.useRef)(null);
10031
- const buttonRef = (0, import_react90.useRef)(null);
10036
+ const rootRef = (0, import_react91.useRef)(null);
10037
+ const inputRef = (0, import_react91.useRef)(null);
10038
+ const buttonRef = (0, import_react91.useRef)(null);
10032
10039
  const isControlled = !!value;
10033
- const initialFileUploaderFiles = (0, import_react90.useMemo)(
10040
+ const initialFileUploaderFiles = (0, import_react91.useMemo)(
10034
10041
  () => (initialFiles != null ? initialFiles : []).map((f) => ({
10035
10042
  file: f,
10036
10043
  errors: []
10037
10044
  })),
10038
10045
  [initialFiles]
10039
10046
  );
10040
- const [state, dispatch] = (0, import_react90.useReducer)(fileUploaderReducer, {
10047
+ const [state, dispatch] = (0, import_react91.useReducer)(fileUploaderReducer, {
10041
10048
  files: initialFileUploaderFiles,
10042
10049
  isFocused: false,
10043
10050
  isFileDialogActive: false,
@@ -10049,7 +10056,7 @@ var useFileUploader = (props) => {
10049
10056
  )
10050
10057
  });
10051
10058
  const { files: stateFiles } = state;
10052
- (0, import_react90.useEffect)(() => {
10059
+ (0, import_react91.useEffect)(() => {
10053
10060
  if (isControlled) {
10054
10061
  const files = value.map((file) => {
10055
10062
  const accepted2 = isFileAccepted(file, accept);
@@ -10064,18 +10071,18 @@ var useFileUploader = (props) => {
10064
10071
  });
10065
10072
  }
10066
10073
  }, [value, isControlled, accept, dispatch]);
10067
- (0, import_react90.useEffect)(() => {
10074
+ (0, import_react91.useEffect)(() => {
10068
10075
  dispatch({
10069
10076
  type: "setRootErrors",
10070
10077
  payload: calcRootErrors(stateFiles, maxFiles, errorMessage)
10071
10078
  });
10072
10079
  }, [dispatch, stateFiles, maxFiles, errorMessage]);
10073
- const onRootFocus = (0, import_react90.useCallback)(
10080
+ const onRootFocus = (0, import_react91.useCallback)(
10074
10081
  () => dispatch({ type: "focus" }),
10075
10082
  [dispatch]
10076
10083
  );
10077
- const onRootBlur = (0, import_react90.useCallback)(() => dispatch({ type: "blur" }), [dispatch]);
10078
- const onRootDragEnter = (0, import_react90.useCallback)(
10084
+ const onRootBlur = (0, import_react91.useCallback)(() => dispatch({ type: "blur" }), [dispatch]);
10085
+ const onRootDragEnter = (0, import_react91.useCallback)(
10079
10086
  async (evt) => {
10080
10087
  preventDefaults(evt);
10081
10088
  if (isEventWithFiles(evt)) {
@@ -10088,7 +10095,7 @@ var useFileUploader = (props) => {
10088
10095
  },
10089
10096
  [dispatch, accept, maxFiles]
10090
10097
  );
10091
- const onRootDragOver = (0, import_react90.useCallback)((evt) => {
10098
+ const onRootDragOver = (0, import_react91.useCallback)((evt) => {
10092
10099
  preventDefaults(evt);
10093
10100
  const hasFiles = isEventWithFiles(evt);
10094
10101
  if (hasFiles && evt.dataTransfer) {
@@ -10098,7 +10105,7 @@ var useFileUploader = (props) => {
10098
10105
  }
10099
10106
  }
10100
10107
  }, []);
10101
- const onRootDragLeave = (0, import_react90.useCallback)(
10108
+ const onRootDragLeave = (0, import_react91.useCallback)(
10102
10109
  (evt) => {
10103
10110
  preventDefaults(evt);
10104
10111
  if (evt.currentTarget.contains(evt.relatedTarget))
@@ -10107,7 +10114,7 @@ var useFileUploader = (props) => {
10107
10114
  },
10108
10115
  [dispatch]
10109
10116
  );
10110
- const setFiles = (0, import_react90.useCallback)(
10117
+ const setFiles = (0, import_react91.useCallback)(
10111
10118
  async (evt) => {
10112
10119
  evt.preventDefault();
10113
10120
  if (isEventWithFiles(evt)) {
@@ -10139,13 +10146,13 @@ var useFileUploader = (props) => {
10139
10146
  dispatch
10140
10147
  ]
10141
10148
  );
10142
- const openFileDialog = (0, import_react90.useCallback)(() => {
10149
+ const openFileDialog = (0, import_react91.useCallback)(() => {
10143
10150
  if (inputRef.current) {
10144
10151
  inputRef.current.value = "";
10145
10152
  inputRef.current.click();
10146
10153
  }
10147
10154
  }, [inputRef]);
10148
- const removeFile = (0, import_react90.useCallback)(
10155
+ const removeFile = (0, import_react91.useCallback)(
10149
10156
  (file) => {
10150
10157
  const newFiles = [...stateFiles];
10151
10158
  newFiles.splice(stateFiles.indexOf(file), 1);
@@ -10159,7 +10166,7 @@ var useFileUploader = (props) => {
10159
10166
  },
10160
10167
  [stateFiles, isControlled, maxFiles, errorMessage, onChange, dispatch]
10161
10168
  );
10162
- const getRootProps = (0, import_react90.useCallback)(
10169
+ const getRootProps = (0, import_react91.useCallback)(
10163
10170
  () => ({
10164
10171
  onBlur: onRootBlur,
10165
10172
  onFocus: onRootFocus,
@@ -10181,14 +10188,14 @@ var useFileUploader = (props) => {
10181
10188
  disabled
10182
10189
  ]
10183
10190
  );
10184
- const getButtonProps = (0, import_react90.useCallback)(
10191
+ const getButtonProps = (0, import_react91.useCallback)(
10185
10192
  () => ({
10186
10193
  onClick: openFileDialog,
10187
10194
  ref: buttonRef
10188
10195
  }),
10189
10196
  [openFileDialog, buttonRef]
10190
10197
  );
10191
- const getInputProps = (0, import_react90.useCallback)(
10198
+ const getInputProps = (0, import_react91.useCallback)(
10192
10199
  () => ({
10193
10200
  type: "file",
10194
10201
  style: { display: "none" },
@@ -10211,7 +10218,7 @@ var useFileUploader = (props) => {
10211
10218
  };
10212
10219
 
10213
10220
  // src/components/FileUploader/FileUploader.tsx
10214
- var import_jsx_runtime93 = require("react/jsx-runtime");
10221
+ var import_jsx_runtime94 = require("react/jsx-runtime");
10215
10222
  var defaultWidth6 = "320px";
10216
10223
  var Wrapper8 = import_styled_components79.default.div`
10217
10224
  width: ${({ width }) => width ? width : defaultWidth6};
@@ -10248,7 +10255,7 @@ var FileUploader = (props) => {
10248
10255
  width,
10249
10256
  errorMessage
10250
10257
  } = props;
10251
- const generatedId = (0, import_react91.useId)();
10258
+ const generatedId = (0, import_react92.useId)();
10252
10259
  const uniqueId = id != null ? id : `${generatedId}-fileUploader`;
10253
10260
  const {
10254
10261
  state: { files: stateFiles, isDragActive, rootErrors },
@@ -10271,7 +10278,7 @@ var FileUploader = (props) => {
10271
10278
  const hasRootErrors = rootErrors.length > 0;
10272
10279
  const showRequiredMarker = required;
10273
10280
  const tipId = (0, import_dds_core101.derivativeIdGenerator)(uniqueId, "tip");
10274
- const fileListElements = stateFiles.map((stateFile, index) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
10281
+ const fileListElements = stateFiles.map((stateFile, index) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
10275
10282
  File,
10276
10283
  {
10277
10284
  parentId: uniqueId,
@@ -10286,21 +10293,21 @@ var FileUploader = (props) => {
10286
10293
  id: (0, import_dds_core101.derivativeIdGenerator)(uniqueId, `error-${index}`),
10287
10294
  message: e
10288
10295
  }));
10289
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Wrapper8, { width, children: [
10290
- hasLabel && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_dds_typography44.Label, { showRequiredStyling: showRequiredMarker, htmlFor: uniqueId, children: label3 }),
10291
- hasTip && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(InputMessage, { id: tipId, message: tip, messageType: "tip" }),
10292
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
10296
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Wrapper8, { width, children: [
10297
+ hasLabel && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_dds_typography44.Label, { showRequiredStyling: showRequiredMarker, htmlFor: uniqueId, children: label3 }),
10298
+ hasTip && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(InputMessage, { id: tipId, message: tip, messageType: "tip" }),
10299
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
10293
10300
  Root,
10294
10301
  {
10295
10302
  ...getRootProps(),
10296
10303
  $isDragActive: isDragActive,
10297
10304
  $hasRootErrors: hasRootErrors,
10298
10305
  children: [
10299
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(FileUploaderInput, { ...getInputProps() }),
10306
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(FileUploaderInput, { ...getInputProps() }),
10300
10307
  "Dra og slipp filer her eller",
10301
10308
  " ",
10302
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(VisuallyHidden, { as: "span", children: "velg fil med p\xE5f\xF8lgende knapp" }),
10303
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
10309
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(VisuallyHidden, { as: "span", children: "velg fil med p\xE5f\xF8lgende knapp" }),
10310
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
10304
10311
  Button,
10305
10312
  {
10306
10313
  ...getButtonProps(),
@@ -10323,8 +10330,8 @@ var FileUploader = (props) => {
10323
10330
  ]
10324
10331
  }
10325
10332
  ),
10326
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ErrorList, { errors: rootErrorsList }),
10327
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(FileListElement, { children: fileListElements })
10333
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ErrorList, { errors: rootErrorsList }),
10334
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(FileListElement, { children: fileListElements })
10328
10335
  ] });
10329
10336
  };
10330
10337
  FileUploader.displayName = "FileUploader";
@@ -10333,7 +10340,7 @@ FileUploader.displayName = "FileUploader";
10333
10340
  var import_dds_design_tokens43 = require("@norges-domstoler/dds-design-tokens");
10334
10341
  var import_styled_components80 = __toESM(require("styled-components"));
10335
10342
  var import_dds_typography45 = require("@norges-domstoler/dds-typography");
10336
- var import_jsx_runtime94 = require("react/jsx-runtime");
10343
+ var import_jsx_runtime95 = require("react/jsx-runtime");
10337
10344
  var { colors: colors28, spacing: spacing37 } = import_dds_design_tokens43.ddsBaseTokens;
10338
10345
  var StyledEmptyContent = import_styled_components80.default.div`
10339
10346
  display: flex;
@@ -10353,15 +10360,15 @@ var StyledEmptyContentText = import_styled_components80.default.div`
10353
10360
  gap: ${spacing37.SizesDdsSpacingLayoutX1};
10354
10361
  `;
10355
10362
  function EmptyContent({ title: title3, message: message2, ...rest }) {
10356
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(StyledEmptyContent, { ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(StyledEmptyContentText, { children: [
10357
- title3 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_dds_typography45.Typography, { typographyType: "headingSans02", children: title3 }),
10358
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_dds_typography45.Typography, { typographyType: "bodySans02", children: message2 })
10363
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(StyledEmptyContent, { ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(StyledEmptyContentText, { children: [
10364
+ title3 && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_dds_typography45.Typography, { typographyType: "headingSans02", children: title3 }),
10365
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_dds_typography45.Typography, { typographyType: "bodySans02", children: message2 })
10359
10366
  ] }) });
10360
10367
  }
10361
10368
  EmptyContent.displayName = "EmptyContent";
10362
10369
 
10363
10370
  // src/components/BackLink/BackLink.tsx
10364
- var import_react92 = require("react");
10371
+ var import_react93 = require("react");
10365
10372
  var import_styled_components81 = __toESM(require("styled-components"));
10366
10373
  var import_dds_icons43 = require("@norges-domstoler/dds-icons");
10367
10374
  var import_dds_typography46 = require("@norges-domstoler/dds-typography");
@@ -10381,7 +10388,7 @@ var backLinkTokens = {
10381
10388
  };
10382
10389
 
10383
10390
  // src/components/BackLink/BackLink.tsx
10384
- var import_jsx_runtime95 = require("react/jsx-runtime");
10391
+ var import_jsx_runtime96 = require("react/jsx-runtime");
10385
10392
  var Nav2 = (0, import_styled_components81.default)("nav")`
10386
10393
  align-items: center;
10387
10394
  display: flex;
@@ -10390,16 +10397,16 @@ var Nav2 = (0, import_styled_components81.default)("nav")`
10390
10397
  var StyledIcon4 = (0, import_styled_components81.default)(import_dds_icons43.Icon)`
10391
10398
  color: ${backLinkTokens.icon.color};
10392
10399
  `;
10393
- var BackLink = (0, import_react92.forwardRef)((props, ref) => {
10394
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(Nav2, { ref, children: [
10395
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(StyledIcon4, { icon: import_dds_icons43.icons.ArrowLeftIcon, iconSize: "small" }),
10396
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_dds_typography46.Typography, { typographyType: "a", href: props.href, children: props.label })
10400
+ var BackLink = (0, import_react93.forwardRef)((props, ref) => {
10401
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(Nav2, { ref, children: [
10402
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(StyledIcon4, { icon: import_dds_icons43.icons.ArrowLeftIcon, iconSize: "small" }),
10403
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_dds_typography46.Typography, { typographyType: "a", href: props.href, children: props.label })
10397
10404
  ] });
10398
10405
  });
10399
10406
  BackLink.displayName = "BackLink";
10400
10407
 
10401
10408
  // src/components/Feedback/Feedback.tsx
10402
- var import_react93 = require("react");
10409
+ var import_react94 = require("react");
10403
10410
  var import_dds_typography49 = require("@norges-domstoler/dds-typography");
10404
10411
 
10405
10412
  // src/components/Feedback/RatingComponent.tsx
@@ -10407,7 +10414,7 @@ var import_styled_components82 = __toESM(require("styled-components"));
10407
10414
  var import_dds_design_tokens45 = require("@norges-domstoler/dds-design-tokens");
10408
10415
  var import_dds_icons44 = require("@norges-domstoler/dds-icons");
10409
10416
  var import_dds_typography47 = require("@norges-domstoler/dds-typography");
10410
- var import_jsx_runtime96 = require("react/jsx-runtime");
10417
+ var import_jsx_runtime97 = require("react/jsx-runtime");
10411
10418
  var RatingContainer = import_styled_components82.default.div`
10412
10419
  display: flex;
10413
10420
  gap: ${import_dds_design_tokens45.ddsBaseTokens.spacing.SizesDdsSpacingLocalX1};
@@ -10428,10 +10435,10 @@ var RatingComponent = ({
10428
10435
  thumbDownTooltip,
10429
10436
  handleRatingChange
10430
10437
  }) => {
10431
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(RatingContainer, { $layout: layout, children: [
10432
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_dds_typography47.Label, { children: ratingLabel }),
10433
- loading ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Spinner, { tooltip: "Laster opp tilbakemelding ..." }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(HStack, { gap: "layout-x1", children: [
10434
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Tooltip, { text: thumbUpTooltip, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10438
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(RatingContainer, { $layout: layout, children: [
10439
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_dds_typography47.Label, { children: ratingLabel }),
10440
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Spinner, { tooltip: "Laster opp tilbakemelding ..." }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(HStack, { gap: "layout-x1", children: [
10441
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Tooltip, { text: thumbUpTooltip, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
10435
10442
  RatingButton,
10436
10443
  {
10437
10444
  htmlProps: { "aria-label": thumbUpTooltip },
@@ -10441,7 +10448,7 @@ var RatingComponent = ({
10441
10448
  size: "large"
10442
10449
  }
10443
10450
  ) }),
10444
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Tooltip, { text: thumbDownTooltip, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10451
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Tooltip, { text: thumbDownTooltip, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
10445
10452
  RatingButton,
10446
10453
  {
10447
10454
  htmlProps: { "aria-label": thumbDownTooltip },
@@ -10460,7 +10467,7 @@ var import_styled_components83 = __toESM(require("styled-components"));
10460
10467
  var import_dds_design_tokens46 = require("@norges-domstoler/dds-design-tokens");
10461
10468
  var import_dds_icons45 = require("@norges-domstoler/dds-icons");
10462
10469
  var import_dds_typography48 = require("@norges-domstoler/dds-typography");
10463
- var import_jsx_runtime97 = require("react/jsx-runtime");
10470
+ var import_jsx_runtime98 = require("react/jsx-runtime");
10464
10471
  var IconLabelSpan = import_styled_components83.default.span`
10465
10472
  display: inline-flex;
10466
10473
  align-items: center;
@@ -10476,21 +10483,21 @@ var CommentComponent = ({
10476
10483
  handleSubmit,
10477
10484
  handleFeedbackTextChange
10478
10485
  }) => {
10479
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(VStack, { gap: "layout-x1", children: [
10480
- /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(IconLabelSpan, { children: [
10481
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
10486
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(VStack, { gap: "layout-x1", children: [
10487
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(IconLabelSpan, { children: [
10488
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
10482
10489
  import_dds_icons45.Icon,
10483
10490
  {
10484
10491
  icon: rating === "positive" ? import_dds_icons45.ThumbupFilled : import_dds_icons45.ThumbdownFilled,
10485
10492
  color: import_dds_design_tokens46.ddsBaseTokens.colors.DdsColorInteractiveBase
10486
10493
  }
10487
10494
  ),
10488
- /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_dds_typography48.Paragraph, { children: [
10495
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_dds_typography48.Paragraph, { children: [
10489
10496
  ratingSubmittedTitle,
10490
10497
  " "
10491
10498
  ] })
10492
10499
  ] }),
10493
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
10500
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
10494
10501
  TextArea,
10495
10502
  {
10496
10503
  value: feedbackText,
@@ -10499,7 +10506,7 @@ var CommentComponent = ({
10499
10506
  tip: "Ikke send inn personopplysninger eller annen sensitiv informasjon"
10500
10507
  }
10501
10508
  ),
10502
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
10509
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
10503
10510
  Button,
10504
10511
  {
10505
10512
  purpose: "secondary",
@@ -10513,7 +10520,7 @@ var CommentComponent = ({
10513
10520
  };
10514
10521
 
10515
10522
  // src/components/Feedback/Feedback.tsx
10516
- var import_jsx_runtime98 = require("react/jsx-runtime");
10523
+ var import_jsx_runtime99 = require("react/jsx-runtime");
10517
10524
  var Feedback = ({
10518
10525
  layout = "vertical",
10519
10526
  ratingLabel = "Hva syns du om tjenesten?",
@@ -10532,16 +10539,16 @@ var Feedback = ({
10532
10539
  onFeedbackTextChange,
10533
10540
  onSubmit
10534
10541
  }) => {
10535
- const [rating, setRating] = (0, import_react93.useState)(null);
10536
- const [feedbackText, setFeedbackText] = (0, import_react93.useState)();
10537
- const [isFeedbackSubmitted, setIsFeedbackSubmitted] = (0, import_react93.useState)(false);
10538
- (0, import_react93.useEffect)(() => {
10542
+ const [rating, setRating] = (0, import_react94.useState)(null);
10543
+ const [feedbackText, setFeedbackText] = (0, import_react94.useState)();
10544
+ const [isFeedbackSubmitted, setIsFeedbackSubmitted] = (0, import_react94.useState)(false);
10545
+ (0, import_react94.useEffect)(() => {
10539
10546
  ratingProp !== void 0 && setRating(ratingProp);
10540
10547
  }, [ratingProp]);
10541
- (0, import_react93.useEffect)(() => {
10548
+ (0, import_react94.useEffect)(() => {
10542
10549
  feedbackTextProp !== void 0 && setFeedbackText(feedbackTextProp);
10543
10550
  }, [feedbackTextProp]);
10544
- (0, import_react93.useEffect)(() => {
10551
+ (0, import_react94.useEffect)(() => {
10545
10552
  isSubmittedProp !== void 0 && setIsFeedbackSubmitted(isSubmittedProp);
10546
10553
  }, [isSubmittedProp]);
10547
10554
  const handleRatingChange = (newRating) => {
@@ -10558,7 +10565,7 @@ var Feedback = ({
10558
10565
  isSubmittedProp === void 0 && setIsFeedbackSubmitted(true);
10559
10566
  };
10560
10567
  if (rating === null && !isFeedbackSubmitted) {
10561
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
10568
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
10562
10569
  RatingComponent,
10563
10570
  {
10564
10571
  layout,
@@ -10571,7 +10578,7 @@ var Feedback = ({
10571
10578
  );
10572
10579
  }
10573
10580
  if (!feedbackTextAreaExcluded && !isFeedbackSubmitted) {
10574
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
10581
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
10575
10582
  CommentComponent,
10576
10583
  {
10577
10584
  rating,
@@ -10585,7 +10592,7 @@ var Feedback = ({
10585
10592
  }
10586
10593
  );
10587
10594
  }
10588
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_dds_typography49.Paragraph, { children: submittedTitle });
10595
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_dds_typography49.Paragraph, { children: submittedTitle });
10589
10596
  };
10590
10597
  // Annotate the CommonJS export names for ESM import in node:
10591
10598
  0 && (module.exports = {