@norges-domstoler/dds-components 21.6.0 → 21.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -212,8 +212,8 @@ var getTextColor = (color) => {
212
212
  // src/utils/combineHandlers.tsx
213
213
  var combineHandlers = (handler1, handler2) => {
214
214
  const callback = (event) => {
215
- handler1 && handler1(event);
216
- handler2 && handler2(event);
215
+ handler1 == null ? void 0 : handler1(event);
216
+ handler2 == null ? void 0 : handler2(event);
217
217
  };
218
218
  return callback;
219
219
  };
@@ -261,7 +261,7 @@ var readOnlyMouseDownHandler = (readOnly, onMouseDown) => {
261
261
  if (readOnly) {
262
262
  evt.preventDefault();
263
263
  evt.target.focus();
264
- } else onMouseDown && onMouseDown(evt);
264
+ } else onMouseDown == null ? void 0 : onMouseDown(evt);
265
265
  };
266
266
  };
267
267
  var readOnlyKeyDownHandler = (type, readOnly, onKeyDown) => {
@@ -274,7 +274,7 @@ var readOnlyKeyDownHandler = (type, readOnly, onKeyDown) => {
274
274
  } else if (type === "selectionControl" && evt.key === " ") {
275
275
  evt.preventDefault();
276
276
  }
277
- } else onKeyDown && onKeyDown(evt);
277
+ } else onKeyDown == null ? void 0 : onKeyDown(evt);
278
278
  };
279
279
  };
280
280
  var readOnlyChangeHandler = (readOnly, onChange) => {
@@ -282,7 +282,7 @@ var readOnlyChangeHandler = (readOnly, onChange) => {
282
282
  if (readOnly) {
283
283
  return;
284
284
  }
285
- onChange && onChange(evt);
285
+ onChange == null ? void 0 : onChange(evt);
286
286
  };
287
287
  };
288
288
  var readOnlyClickHandler = (readOnly, onClick) => {
@@ -291,7 +291,7 @@ var readOnlyClickHandler = (readOnly, onClick) => {
291
291
  evt.preventDefault();
292
292
  return;
293
293
  }
294
- onClick && onClick(evt);
294
+ onClick == null ? void 0 : onClick(evt);
295
295
  };
296
296
  };
297
297
 
@@ -436,8 +436,8 @@ function useTranslation() {
436
436
  const t = (text) => text[lang];
437
437
  return { t, lang };
438
438
  }
439
- function createTexts(texts25) {
440
- return texts25;
439
+ function createTexts(texts26) {
440
+ return texts26;
441
441
  }
442
442
 
443
443
  // src/types/BaseComponentProps.ts
@@ -686,6 +686,7 @@ var focusable = "focus_focusable";
686
686
  var focus_default = {
687
687
  focused: "focus_focused",
688
688
  focusable,
689
+ "focusable-focus": "focus_focusable-focus",
689
690
  "focusable-within": "focus_focusable-within",
690
691
  "has-focusable-input": "focus_has-focusable-input",
691
692
  "focusable-sibling": "focus_focusable-sibling",
@@ -4333,13 +4334,13 @@ var OverflowMenuGroup = ({
4333
4334
  const combinedMenuRef = useCombinedRef(menuRef, floatingRef);
4334
4335
  const handleClose = () => {
4335
4336
  if (isOpen) {
4336
- onClose && onClose();
4337
+ onClose == null ? void 0 : onClose();
4337
4338
  close();
4338
4339
  }
4339
4340
  };
4340
4341
  const handleToggle = () => {
4341
- !isOpen && (onOpen == null ? void 0 : onOpen());
4342
- isOpen && (onClose == null ? void 0 : onClose());
4342
+ if (!isOpen) onOpen == null ? void 0 : onOpen();
4343
+ if (isOpen) onClose == null ? void 0 : onClose();
4343
4344
  toggle();
4344
4345
  };
4345
4346
  useOnClickOutside([menuRef.current, buttonRef.current], () => {
@@ -4348,7 +4349,7 @@ var OverflowMenuGroup = ({
4348
4349
  useOnKeyDown(["Esc", "Escape"], () => {
4349
4350
  var _a;
4350
4351
  if (isOpen) {
4351
- onClose && onClose();
4352
+ onClose == null ? void 0 : onClose();
4352
4353
  close();
4353
4354
  (_a = buttonRef.current) == null ? void 0 : _a.focus();
4354
4355
  }
@@ -5129,7 +5130,7 @@ var RadioButton = ({
5129
5130
  const radioButtonGroup = useRadioButtonGroup();
5130
5131
  const handleChange = (event) => {
5131
5132
  var _a;
5132
- onChange && onChange(event);
5133
+ onChange == null ? void 0 : onChange(event);
5133
5134
  (_a = radioButtonGroup == null ? void 0 : radioButtonGroup.onChange) == null ? void 0 : _a.call(radioButtonGroup, event, event.target.value);
5134
5135
  };
5135
5136
  const describedByIds = [];
@@ -5507,7 +5508,7 @@ var Chip = ({
5507
5508
  const [isOpen, setIsOpen] = useState11(true);
5508
5509
  const onClick = () => {
5509
5510
  setIsOpen(false);
5510
- onClose && onClose();
5511
+ onClose == null ? void 0 : onClose();
5511
5512
  };
5512
5513
  return isOpen ? /* @__PURE__ */ jsxs40(
5513
5514
  "div",
@@ -7265,7 +7266,9 @@ var TextArea = ({
7265
7266
  const [text, setText] = useState14(getDefaultText(value, defaultValue));
7266
7267
  useEffect20(() => {
7267
7268
  if (textAreaRef == null ? void 0 : textAreaRef.current) {
7268
- textAreaRef.current.style.height = `${textAreaRef.current.scrollHeight + 2}px`;
7269
+ const el = textAreaRef.current;
7270
+ el.style.height = "auto";
7271
+ el.style.height = `${el.scrollHeight + 2}px`;
7269
7272
  }
7270
7273
  }, [text]);
7271
7274
  const onChangeHandler = (event) => {
@@ -7351,26 +7354,10 @@ var TextArea = ({
7351
7354
  TextArea.displayName = "TextArea";
7352
7355
 
7353
7356
  // src/components/Feedback/utils.tsx
7354
- import { jsx as jsx249 } from "react/jsx-runtime";
7355
7357
  var getIconSize = (layout) => layout === "vertical" ? "large" : "medium";
7356
- var ThumbIcon = ({ rating, layout, type }) => type === "comment" ? /* @__PURE__ */ jsx249(
7357
- Icon,
7358
- {
7359
- icon: rating === "positive" ? ThumbUpFilledIcon : ThumbDownFilledIcon,
7360
- color: "iconActionResting",
7361
- iconSize: getIconSize(layout)
7362
- }
7363
- ) : /* @__PURE__ */ jsx249(
7364
- Icon,
7365
- {
7366
- icon: rating === "positive" ? ThumbUpIcon : ThumbDownIcon,
7367
- color: "iconMedium",
7368
- iconSize: getIconSize(layout)
7369
- }
7370
- );
7371
7358
 
7372
7359
  // src/components/Feedback/CommentComponent.tsx
7373
- import { jsx as jsx250, jsxs as jsxs55 } from "react/jsx-runtime";
7360
+ import { jsx as jsx249, jsxs as jsxs55 } from "react/jsx-runtime";
7374
7361
  var CommentComponent = ({
7375
7362
  layout,
7376
7363
  rating,
@@ -7386,13 +7373,20 @@ var CommentComponent = ({
7386
7373
  const { t } = useTranslation();
7387
7374
  return /* @__PURE__ */ jsxs55(VStack, { gap: "x1", children: [
7388
7375
  /* @__PURE__ */ jsxs55("span", { className: Feedback_default["rating-submitted-title"], children: [
7389
- ThumbIcon({ rating, layout, type: "comment" }),
7376
+ /* @__PURE__ */ jsx249(
7377
+ Icon,
7378
+ {
7379
+ icon: rating === "positive" ? ThumbUpFilledIcon : ThumbDownFilledIcon,
7380
+ color: "iconActionResting",
7381
+ iconSize: getIconSize(layout)
7382
+ }
7383
+ ),
7390
7384
  /* @__PURE__ */ jsxs55(Paragraph, { children: [
7391
7385
  ratingSubmittedTitle,
7392
7386
  " "
7393
7387
  ] })
7394
7388
  ] }),
7395
- /* @__PURE__ */ jsx250(
7389
+ /* @__PURE__ */ jsx249(
7396
7390
  TextArea,
7397
7391
  {
7398
7392
  value: feedbackText,
@@ -7401,7 +7395,7 @@ var CommentComponent = ({
7401
7395
  tip: textAreaTip
7402
7396
  }
7403
7397
  ),
7404
- /* @__PURE__ */ jsx250(
7398
+ /* @__PURE__ */ jsx249(
7405
7399
  Button,
7406
7400
  {
7407
7401
  purpose: "secondary",
@@ -7422,6 +7416,29 @@ var texts9 = createTexts({
7422
7416
  }
7423
7417
  });
7424
7418
 
7419
+ // src/components/helpers/InlineIconButton/InlineIconButton.module.css
7420
+ var InlineIconButton_default = {
7421
+ button: "InlineIconButton_button"
7422
+ };
7423
+
7424
+ // src/components/helpers/InlineIconButton/InlineIconButton.tsx
7425
+ import { jsx as jsx250 } from "react/jsx-runtime";
7426
+ var InlineIconButton = ({
7427
+ className,
7428
+ size: size2,
7429
+ icon,
7430
+ color,
7431
+ ...rest
7432
+ }) => /* @__PURE__ */ jsx250(
7433
+ StylelessButton,
7434
+ {
7435
+ className: cn(className, InlineIconButton_default.button, focusable),
7436
+ ...rest,
7437
+ children: /* @__PURE__ */ jsx250(Icon, { icon, iconSize: size2, color })
7438
+ }
7439
+ );
7440
+ InlineIconButton.displayName = "InlineIconButton";
7441
+
7425
7442
  // src/components/Tooltip/Tooltip.tsx
7426
7443
  import {
7427
7444
  Children as ReactChildren3,
@@ -7469,7 +7486,9 @@ var Tooltip = ({
7469
7486
  const combinedRef = useCombinedRef(ref, refs.setFloating, tooltipRef);
7470
7487
  const closeWhenNotInView = (entries) => {
7471
7488
  const [entry] = entries;
7472
- entry.isIntersecting ? setInView(true) : setInView(false);
7489
+ if (entry.isIntersecting) {
7490
+ setInView(true);
7491
+ } else setInView(false);
7473
7492
  };
7474
7493
  useEffect21(() => {
7475
7494
  const options = {
@@ -7594,12 +7613,13 @@ var RatingComponent = ({
7594
7613
  }) => {
7595
7614
  const { t } = useTranslation();
7596
7615
  const button = (rating, layout2, tooltip) => /* @__PURE__ */ jsx252(
7597
- StylelessButton,
7616
+ InlineIconButton,
7598
7617
  {
7599
7618
  "aria-label": tooltip,
7600
7619
  onClick: () => handleRatingChange(rating),
7601
- className: cn(Feedback_default.button, Feedback_default[`button--${layout2}`], focusable),
7602
- children: ThumbIcon({ rating, layout: layout2, type: "rating" })
7620
+ size: getIconSize(layout2),
7621
+ icon: rating === "positive" ? ThumbUpIcon : ThumbDownIcon,
7622
+ color: "icon-medium"
7603
7623
  }
7604
7624
  );
7605
7625
  return /* @__PURE__ */ jsxs57(
@@ -7662,26 +7682,26 @@ var Feedback = ({
7662
7682
  const tThumbUpTooltip = thumbUpTooltip != null ? thumbUpTooltip : t(texts11.good);
7663
7683
  const tThumbDownTooltip = thumbDownTooltip != null ? thumbDownTooltip : t(texts11.bad);
7664
7684
  useEffect22(() => {
7665
- ratingProp !== void 0 && setRating(ratingProp);
7685
+ if (ratingProp !== void 0) setRating(ratingProp);
7666
7686
  }, [ratingProp]);
7667
7687
  useEffect22(() => {
7668
- feedbackTextProp !== void 0 && setFeedbackText(feedbackTextProp);
7688
+ if (feedbackTextProp !== void 0) setFeedbackText(feedbackTextProp);
7669
7689
  }, [feedbackTextProp]);
7670
7690
  useEffect22(() => {
7671
- isSubmittedProp !== void 0 && setIsFeedbackSubmitted(isSubmittedProp);
7691
+ if (isSubmittedProp !== void 0) setIsFeedbackSubmitted(isSubmittedProp);
7672
7692
  }, [isSubmittedProp]);
7673
7693
  const handleRatingChange = (newRating) => {
7674
- onRating && onRating(newRating);
7675
- onSubmit && feedbackTextAreaExcluded && onSubmit(newRating, "");
7676
- ratingProp === void 0 && setRating(newRating);
7694
+ onRating == null ? void 0 : onRating(newRating);
7695
+ if (onSubmit && feedbackTextAreaExcluded) onSubmit(newRating, "");
7696
+ if (ratingProp === void 0) setRating(newRating);
7677
7697
  };
7678
7698
  const handleFeedbackTextChange = (newFeedbackText) => {
7679
- onFeedbackTextChange && onFeedbackTextChange(newFeedbackText);
7680
- feedbackTextProp === void 0 && setFeedbackText(newFeedbackText);
7699
+ onFeedbackTextChange == null ? void 0 : onFeedbackTextChange(newFeedbackText);
7700
+ if (feedbackTextProp === void 0) setFeedbackText(newFeedbackText);
7681
7701
  };
7682
7702
  const handleSubmit = () => {
7683
- onSubmit && onSubmit(rating, feedbackText != null ? feedbackText : "");
7684
- isSubmittedProp === void 0 && setIsFeedbackSubmitted(true);
7703
+ onSubmit == null ? void 0 : onSubmit(rating, feedbackText != null ? feedbackText : "");
7704
+ if (isSubmittedProp === void 0) setIsFeedbackSubmitted(true);
7685
7705
  };
7686
7706
  if (rating === null && !isFeedbackSubmitted) {
7687
7707
  return /* @__PURE__ */ jsx253(
@@ -8143,11 +8163,9 @@ var useFileUploader = (props) => {
8143
8163
  () => ({
8144
8164
  onBlur: onRootBlur,
8145
8165
  onFocus: onRootFocus,
8146
- // eslint-disable-next-line @typescript-eslint/no-misused-promises
8147
8166
  onDragEnter: onRootDragEnter,
8148
8167
  onDragOver: onRootDragOver,
8149
8168
  onDragLeave: onRootDragLeave,
8150
- // eslint-disable-next-line @typescript-eslint/no-misused-promises
8151
8169
  onDrop: setFiles,
8152
8170
  ref: rootRef
8153
8171
  }),
@@ -8174,7 +8192,6 @@ var useFileUploader = (props) => {
8174
8192
  style: { display: "none" },
8175
8193
  tabIndex: -1,
8176
8194
  ref: inputRef,
8177
- // eslint-disable-next-line @typescript-eslint/no-misused-promises
8178
8195
  onChange: setFiles,
8179
8196
  multiple: !maxFiles || maxFiles > 1,
8180
8197
  ...accept ? { accept: accept.join(",") } : {}
@@ -8483,7 +8500,7 @@ var GlobalMessage = ({
8483
8500
  purpose: "tertiary",
8484
8501
  onClick: () => {
8485
8502
  setClosed(true);
8486
- onClose && onClose();
8503
+ onClose == null ? void 0 : onClose();
8487
8504
  },
8488
8505
  size: "small",
8489
8506
  "aria-label": t(commonTexts.closeMessage)
@@ -8515,7 +8532,7 @@ var InlineButton = ({ className, ...rest }) => /* @__PURE__ */ jsx268(
8515
8532
  }
8516
8533
  );
8517
8534
 
8518
- // src/components/InlineEdit/InlineEditTextArea.tsx
8535
+ // src/components/InlineEdit/InlineEditTextArea/InlineEditTextArea.tsx
8519
8536
  import { useRef as useRef25 } from "react";
8520
8537
 
8521
8538
  // src/components/InlineEdit/InlineEdit.context.tsx
@@ -8585,15 +8602,20 @@ var InlineEditContextProvider = (props) => {
8585
8602
  };
8586
8603
  InlineEditContextProvider.displayName = "InlineEditContextProvider";
8587
8604
 
8588
- // src/components/InlineEdit/InlineTextArea.tsx
8605
+ // src/components/InlineEdit/InlineField.tsx
8589
8606
  import { useId as useId15, useRef as useRef24 } from "react";
8590
8607
 
8591
8608
  // src/components/InlineEdit/InlineEdit.module.css
8592
8609
  var InlineEdit_default = {
8593
8610
  "inline-input": "InlineEdit_inline-input",
8611
+ "inline-select": "InlineEdit_inline-select",
8612
+ "inline-select--with-clear-button": "InlineEdit_inline-select--with-clear-button",
8613
+ "inline-input--danger": "InlineEdit_inline-input--danger",
8594
8614
  "inline-input--with-icon": "InlineEdit_inline-input--with-icon",
8595
8615
  "inline-textarea": "InlineEdit_inline-textarea",
8596
- "icon-wrapper": "InlineEdit_icon-wrapper"
8616
+ "icon-wrapper": "InlineEdit_icon-wrapper",
8617
+ chevron: "InlineEdit_chevron",
8618
+ "clear-button": "InlineEdit_clear-button"
8597
8619
  };
8598
8620
 
8599
8621
  // src/components/InlineEdit/InlineEdit.utils.tsx
@@ -8619,29 +8641,153 @@ var texts14 = createTexts({
8619
8641
  en: " Input field cannot be cleared."
8620
8642
  }
8621
8643
  });
8644
+ var inlineEditCns = (hasErrorState, showEditingIcon) => [
8645
+ InlineEdit_default["inline-input"],
8646
+ typographyStyles_default["body-medium"],
8647
+ hasErrorState && InlineEdit_default["inline-input--danger"],
8648
+ showEditingIcon && InlineEdit_default["inline-input--with-icon"]
8649
+ ];
8650
+ var inlineInputCns = (hasErrorState, showEditingIcon) => [...inlineEditCns(hasErrorState, showEditingIcon), focusable];
8651
+ var inlineTextareaCns = (hasErrorState, showEditingIcon) => [...inlineInputCns(hasErrorState, showEditingIcon), utilStyles_default.scrollbar];
8652
+ var inlineSelectCns = (hasErrorState, showEditingIcon, hasValue) => [
8653
+ ...inlineEditCns(hasErrorState, showEditingIcon),
8654
+ InlineEdit_default["inline-select"],
8655
+ hasValue && InlineEdit_default["inline-select--with-clear-button"],
8656
+ focus_default["focusable-focus"]
8657
+ ];
8622
8658
 
8623
- // src/components/InlineEdit/InlineTextArea.tsx
8624
- import { jsx as jsx270, jsxs as jsxs62 } from "react/jsx-runtime";
8625
- var InlineTextArea = ({
8626
- id,
8627
- error,
8628
- errorMessage,
8629
- width = "140px",
8630
- "aria-describedby": ariaDescribedby,
8631
- hideIcon,
8632
- ref,
8633
- ...rest
8634
- }) => {
8659
+ // src/utils/createClearChangeEvent.tsx
8660
+ function createClearChangeEvent(elementId) {
8661
+ const element = document.getElementById(elementId);
8662
+ if (!element) {
8663
+ throw new Error(`Element by id '${elementId}' not found.`);
8664
+ }
8665
+ if (element instanceof HTMLInputElement) {
8666
+ element.value = "";
8667
+ } else if (element instanceof HTMLSelectElement) {
8668
+ element.selectedIndex = 0;
8669
+ }
8670
+ const clearChangeEvent = {
8671
+ target: element,
8672
+ currentTarget: element,
8673
+ bubbles: true,
8674
+ cancelable: false,
8675
+ defaultPrevented: false,
8676
+ eventPhase: 0,
8677
+ isTrusted: false,
8678
+ preventDefault: () => null,
8679
+ stopPropagation: () => null,
8680
+ nativeEvent: new Event("input"),
8681
+ persist: () => null,
8682
+ type: "change",
8683
+ timeStamp: Date.now(),
8684
+ isDefaultPrevented: () => false,
8685
+ isPropagationStopped: () => false
8686
+ };
8687
+ return clearChangeEvent;
8688
+ }
8689
+
8690
+ // src/components/InlineEdit/InlineField.tsx
8691
+ import { Fragment as Fragment6, jsx as jsx270, jsxs as jsxs62 } from "react/jsx-runtime";
8692
+ function InlineField(props) {
8693
+ const {
8694
+ elementType,
8695
+ id,
8696
+ error,
8697
+ errorMessage,
8698
+ width = "140px",
8699
+ hideIcon,
8700
+ ref,
8701
+ className,
8702
+ "aria-describedby": ariaDescribedby,
8703
+ ...rest
8704
+ } = props;
8635
8705
  const { onBlur, onChange, onFocus, isEditing, value, emptiable } = useInlineEditContext();
8636
- const genereatedId = useId15();
8637
- const uniqueId = id != null ? id : `${genereatedId}-InlineTextArea`;
8706
+ const { t } = useTranslation();
8707
+ const generatedId = useId15();
8708
+ const uniqueId = id != null ? id : `${generatedId}-InlineEdit`;
8638
8709
  const hasErrorMessage = !!errorMessage;
8710
+ const hasErrorState = !!error || hasErrorMessage;
8639
8711
  const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
8640
- const hasError = !!error;
8641
- const hasErrorState = hasError || hasErrorMessage;
8642
8712
  const descId = derivativeIdGenerator(uniqueId, "desc");
8713
+ const hasValue = !!value;
8643
8714
  const inputRef = useRef24(null);
8644
8715
  const combinedRef = useCombinedRef(ref, inputRef);
8716
+ const clearInput = () => {
8717
+ const clearChangeEvent = createClearChangeEvent(uniqueId);
8718
+ onChange == null ? void 0 : onChange(clearChangeEvent);
8719
+ };
8720
+ const describedBy = spaceSeparatedIdListGenerator([
8721
+ hasErrorMessage ? errorMessageId : void 0,
8722
+ descId,
8723
+ ariaDescribedby
8724
+ ]);
8725
+ const commonProps = {
8726
+ id: uniqueId,
8727
+ "aria-describedby": describedBy,
8728
+ "aria-invalid": hasErrorState,
8729
+ value,
8730
+ onBlur,
8731
+ onChange,
8732
+ onFocus
8733
+ };
8734
+ const cnArgs = [hasErrorState, !isEditing && !hideIcon];
8735
+ const renderElement = () => {
8736
+ switch (elementType) {
8737
+ case "input":
8738
+ return /* @__PURE__ */ jsx270(
8739
+ "input",
8740
+ {
8741
+ ...rest,
8742
+ ref: combinedRef,
8743
+ ...commonProps,
8744
+ className: cn(className, ...inlineInputCns(...cnArgs))
8745
+ }
8746
+ );
8747
+ case "textarea":
8748
+ return /* @__PURE__ */ jsx270(
8749
+ "textarea",
8750
+ {
8751
+ ...rest,
8752
+ ref: combinedRef,
8753
+ ...commonProps,
8754
+ className: cn(className, ...inlineTextareaCns(...cnArgs))
8755
+ }
8756
+ );
8757
+ case "select":
8758
+ return /* @__PURE__ */ jsxs62(Fragment6, { children: [
8759
+ /* @__PURE__ */ jsx270(
8760
+ "select",
8761
+ {
8762
+ ...rest,
8763
+ ref: combinedRef,
8764
+ ...commonProps,
8765
+ className: cn(className, ...inlineSelectCns(...cnArgs, hasValue))
8766
+ }
8767
+ ),
8768
+ hasValue && emptiable && /* @__PURE__ */ jsx270(
8769
+ InlineIconButton,
8770
+ {
8771
+ "aria-label": t(texts15.clearSelect),
8772
+ onClick: clearInput,
8773
+ icon: CloseSmallIcon,
8774
+ size: "small",
8775
+ className: InlineEdit_default["clear-button"]
8776
+ }
8777
+ ),
8778
+ /* @__PURE__ */ jsx270(
8779
+ Icon,
8780
+ {
8781
+ icon: ChevronDownIcon,
8782
+ iconSize: "small",
8783
+ className: InlineEdit_default.chevron
8784
+ }
8785
+ )
8786
+ ] });
8787
+ default:
8788
+ return null;
8789
+ }
8790
+ };
8645
8791
  return /* @__PURE__ */ jsxs62(Box, { position: "relative", width, children: [
8646
8792
  /* @__PURE__ */ jsxs62("div", { className: Input_default["input-group"], children: [
8647
8793
  !isEditing && !hideIcon && /* @__PURE__ */ jsx270(
@@ -8649,47 +8795,28 @@ var InlineTextArea = ({
8649
8795
  {
8650
8796
  onClick: () => {
8651
8797
  var _a;
8652
- (_a = inputRef.current) == null ? void 0 : _a.focus();
8798
+ return (_a = inputRef.current) == null ? void 0 : _a.focus();
8653
8799
  },
8654
8800
  className: InlineEdit_default["icon-wrapper"],
8655
8801
  children: /* @__PURE__ */ jsx270(Icon, { icon: EditIcon, iconSize: "small" })
8656
8802
  }
8657
8803
  ),
8658
- /* @__PURE__ */ jsx270(
8659
- "textarea",
8660
- {
8661
- ...rest,
8662
- value,
8663
- onChange,
8664
- onBlur,
8665
- onFocus,
8666
- id: uniqueId,
8667
- ref: combinedRef,
8668
- "aria-describedby": spaceSeparatedIdListGenerator([
8669
- hasErrorMessage ? errorMessageId : void 0,
8670
- descId,
8671
- ariaDescribedby
8672
- ]),
8673
- className: cn(
8674
- InlineEdit_default["inline-input"],
8675
- !hideIcon && !isEditing && InlineEdit_default["inline-input--with-icon"],
8676
- InlineEdit_default["inline-textarea"],
8677
- Input_default["input--stateful"],
8678
- hasErrorState && Input_default["input--stateful-danger"],
8679
- typographyStyles_default["body-medium"],
8680
- utilStyles_default.scrollbar,
8681
- focusable
8682
- )
8683
- }
8684
- )
8804
+ renderElement()
8685
8805
  ] }),
8686
8806
  inlineEditVisuallyHidden(descId, emptiable),
8687
8807
  renderInputMessage(void 0, void 0, errorMessage, errorMessageId)
8688
8808
  ] });
8689
- };
8690
- InlineTextArea.displayName = "InlineTextArea";
8809
+ }
8810
+ var texts15 = createTexts({
8811
+ clearSelect: {
8812
+ no: "T\xF8m nedtrekksliste",
8813
+ nb: "T\xF8m nedtrekksliste",
8814
+ nn: "T\xF8m nedtrekksliste",
8815
+ en: "Clear selection"
8816
+ }
8817
+ });
8691
8818
 
8692
- // src/components/InlineEdit/InlineEditTextArea.tsx
8819
+ // src/components/InlineEdit/InlineEditTextArea/InlineEditTextArea.tsx
8693
8820
  import { jsx as jsx271 } from "react/jsx-runtime";
8694
8821
  var InlineEditTextArea = ({
8695
8822
  onSetValue,
@@ -8713,85 +8840,45 @@ var InlineEditTextArea = ({
8713
8840
  onFocus,
8714
8841
  onChange,
8715
8842
  onBlur,
8716
- children: /* @__PURE__ */ jsx271(InlineTextArea, { ref: combinedRef, ...rest })
8843
+ children: /* @__PURE__ */ jsx271(InlineField, { elementType: "textarea", ...rest, ref: combinedRef })
8717
8844
  }
8718
8845
  );
8719
8846
  };
8720
8847
 
8721
- // src/components/InlineEdit/InlineEditInput.tsx
8722
- import { useRef as useRef27 } from "react";
8723
-
8724
- // src/components/InlineEdit/InlineInput.tsx
8725
- import { useId as useId16, useRef as useRef26 } from "react";
8726
- import { jsx as jsx272, jsxs as jsxs63 } from "react/jsx-runtime";
8727
- var InlineInput = ({
8728
- id,
8729
- error,
8730
- errorMessage,
8731
- width = "140px",
8732
- "aria-describedby": ariaDescribedby,
8733
- hideIcon,
8848
+ // src/components/InlineEdit/InlineEditInput/InlineEditInput.tsx
8849
+ import { useRef as useRef26 } from "react";
8850
+ import { jsx as jsx272 } from "react/jsx-runtime";
8851
+ var InlineEditInput = ({
8852
+ onSetValue,
8853
+ emptiable,
8854
+ value,
8855
+ onFocus,
8856
+ onChange,
8857
+ onBlur,
8734
8858
  ref,
8735
8859
  ...rest
8736
8860
  }) => {
8737
- const { onBlur, onChange, onFocus, isEditing, value, emptiable } = useInlineEditContext();
8738
- const genereatedId = useId16();
8739
- const uniqueId = id != null ? id : `${genereatedId}-InlineInput`;
8740
- const hasErrorMessage = !!errorMessage;
8741
- const hasError = !!error;
8742
- const hasErrorState = hasError || hasErrorMessage;
8743
- const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
8744
- const descId = derivativeIdGenerator(uniqueId, "desc");
8745
8861
  const inputRef = useRef26(null);
8746
8862
  const combinedRef = useCombinedRef(ref, inputRef);
8747
- return /* @__PURE__ */ jsxs63(Box, { position: "relative", width, children: [
8748
- /* @__PURE__ */ jsxs63("div", { className: Input_default["input-group"], children: [
8749
- !isEditing && !hideIcon && /* @__PURE__ */ jsx272(
8750
- "span",
8751
- {
8752
- onClick: () => {
8753
- var _a;
8754
- (_a = inputRef.current) == null ? void 0 : _a.focus();
8755
- },
8756
- className: InlineEdit_default["icon-wrapper"],
8757
- children: /* @__PURE__ */ jsx272(Icon, { icon: EditIcon, iconSize: "small" })
8758
- }
8759
- ),
8760
- /* @__PURE__ */ jsx272(
8761
- "input",
8762
- {
8763
- ...rest,
8764
- value,
8765
- onChange,
8766
- onBlur,
8767
- onFocus,
8768
- id: uniqueId,
8769
- ref: combinedRef,
8770
- "aria-describedby": spaceSeparatedIdListGenerator([
8771
- hasErrorMessage ? errorMessageId : void 0,
8772
- descId,
8773
- ariaDescribedby
8774
- ]),
8775
- "aria-invalid": hasErrorState,
8776
- className: cn(
8777
- InlineEdit_default["inline-input"],
8778
- !hideIcon && !isEditing && InlineEdit_default["inline-input--with-icon"],
8779
- typographyStyles_default["body-medium"],
8780
- hasErrorState && Input_default["input--stateful-danger"],
8781
- focusable
8782
- )
8783
- }
8784
- )
8785
- ] }),
8786
- inlineEditVisuallyHidden(descId, emptiable),
8787
- renderInputMessage(void 0, void 0, errorMessage, errorMessageId)
8788
- ] });
8863
+ return /* @__PURE__ */ jsx272(
8864
+ InlineEditContextProvider,
8865
+ {
8866
+ onSetValue,
8867
+ emptiable,
8868
+ inputRef,
8869
+ value,
8870
+ onFocus,
8871
+ onChange,
8872
+ onBlur,
8873
+ children: /* @__PURE__ */ jsx272(InlineField, { elementType: "input", ...rest, ref: combinedRef })
8874
+ }
8875
+ );
8789
8876
  };
8790
- InlineInput.displayName = "InlineInput";
8791
8877
 
8792
- // src/components/InlineEdit/InlineEditInput.tsx
8878
+ // src/components/InlineEdit/InlineEditSelect/InlineEditSelect.tsx
8879
+ import { useRef as useRef27 } from "react";
8793
8880
  import { jsx as jsx273 } from "react/jsx-runtime";
8794
- var InlineEditInput = ({
8881
+ var InlineEditSelect = ({
8795
8882
  onSetValue,
8796
8883
  emptiable,
8797
8884
  value,
@@ -8813,7 +8900,7 @@ var InlineEditInput = ({
8813
8900
  onFocus,
8814
8901
  onChange,
8815
8902
  onBlur,
8816
- children: /* @__PURE__ */ jsx273(InlineInput, { ...rest, ref: combinedRef })
8903
+ children: /* @__PURE__ */ jsx273(InlineField, { elementType: "select", ...rest, ref: combinedRef })
8817
8904
  }
8818
8905
  );
8819
8906
  };
@@ -8851,7 +8938,7 @@ var NavigationItem = ({ isCurrent, ...rest }) => /* @__PURE__ */ jsx274(
8851
8938
  );
8852
8939
 
8853
8940
  // src/components/InternalHeader/InternalHeader.tsx
8854
- import { jsx as jsx275, jsxs as jsxs64 } from "react/jsx-runtime";
8941
+ import { jsx as jsx275, jsxs as jsxs63 } from "react/jsx-runtime";
8855
8942
  var InternalHeader = (props) => {
8856
8943
  const {
8857
8944
  applicationDesc,
@@ -8880,7 +8967,7 @@ var InternalHeader = (props) => {
8880
8967
  const hasContextMenuElements = !!contextMenuItems && contextMenuItems.length > 0;
8881
8968
  const hasSmallScreenBreakpoint = !!smallScreenBreakpoint;
8882
8969
  const hasNavInContextMenu = hasSmallScreenBreakpoint && hasNavigationElements;
8883
- const navigation = hasNavigationElements ? /* @__PURE__ */ jsx275("nav", { "aria-label": t(texts15.siteNavigation), children: /* @__PURE__ */ jsx275(
8970
+ const navigation = hasNavigationElements ? /* @__PURE__ */ jsx275("nav", { "aria-label": t(texts16.siteNavigation), children: /* @__PURE__ */ jsx275(
8884
8971
  ShowHide,
8885
8972
  {
8886
8973
  as: StylelessList,
@@ -8903,7 +8990,7 @@ var InternalHeader = (props) => {
8903
8990
  ) }) : null;
8904
8991
  const hasContextMenu = hasContextMenuElements || !!user || hasNavInContextMenu;
8905
8992
  const hasContextMenuLargeScreen = hasContextMenuElements || !!user;
8906
- return /* @__PURE__ */ jsxs64(
8993
+ return /* @__PURE__ */ jsxs63(
8907
8994
  Box,
8908
8995
  {
8909
8996
  display: "flex",
@@ -8938,22 +9025,22 @@ var InternalHeader = (props) => {
8938
9025
  {
8939
9026
  showBelow: !hasContextMenuLargeScreen && hasSmallScreenBreakpoint ? smallScreenBreakpoint : void 0,
8940
9027
  className: cn(InternalHeader_default["context-menu-group"]),
8941
- children: /* @__PURE__ */ jsxs64(OverflowMenuGroup, { children: [
9028
+ children: /* @__PURE__ */ jsxs63(OverflowMenuGroup, { children: [
8942
9029
  /* @__PURE__ */ jsx275(
8943
9030
  Button,
8944
9031
  {
8945
9032
  icon: hasNavInContextMenu ? MenuIcon : MoreVerticalIcon,
8946
9033
  purpose: "tertiary",
8947
- "aria-label": t(texts15.openMenu)
9034
+ "aria-label": t(texts16.openMenu)
8948
9035
  }
8949
9036
  ),
8950
- /* @__PURE__ */ jsxs64(OverflowMenu, { className: InternalHeader_default["context-menu"], children: [
9037
+ /* @__PURE__ */ jsxs63(OverflowMenu, { className: InternalHeader_default["context-menu"], children: [
8951
9038
  user && /* @__PURE__ */ jsx275(OverflowMenuList, { children: user.href ? /* @__PURE__ */ jsx275(OverflowMenuLink, { icon: PersonIcon, ...user }) : /* @__PURE__ */ jsx275(OverflowMenuSpan, { icon: PersonIcon, ...user }) }),
8952
9039
  hasNavInContextMenu && /* @__PURE__ */ jsx275(
8953
9040
  ShowHide,
8954
9041
  {
8955
9042
  as: "nav",
8956
- "aria-label": t(texts15.siteNavigation),
9043
+ "aria-label": t(texts16.siteNavigation),
8957
9044
  showBelow: smallScreenBreakpoint,
8958
9045
  children: /* @__PURE__ */ jsx275(OverflowMenuList, { children: navItems.map((item) => /* @__PURE__ */ jsx275(OverflowMenuLink, { ...item })) })
8959
9046
  }
@@ -8982,7 +9069,7 @@ var InternalHeader = (props) => {
8982
9069
  );
8983
9070
  };
8984
9071
  InternalHeader.displayName = "InternalHeader";
8985
- var texts15 = createTexts({
9072
+ var texts16 = createTexts({
8986
9073
  openMenu: {
8987
9074
  nb: "\xC5pne meny",
8988
9075
  no: "\xC5pne meny",
@@ -9060,7 +9147,7 @@ var LocalMessage_default = {
9060
9147
  };
9061
9148
 
9062
9149
  // src/components/LocalMessage/LocalMessage.tsx
9063
- import { Fragment as Fragment6, jsx as jsx278, jsxs as jsxs65 } from "react/jsx-runtime";
9150
+ import { Fragment as Fragment7, jsx as jsx278, jsxs as jsxs64 } from "react/jsx-runtime";
9064
9151
  var icons2 = {
9065
9152
  info: InfoIcon,
9066
9153
  danger: ErrorIcon,
@@ -9084,9 +9171,9 @@ var LocalMessage = ({
9084
9171
  const { t } = useTranslation();
9085
9172
  const [isClosed, setClosed] = useState20(false);
9086
9173
  if (isClosed) {
9087
- return /* @__PURE__ */ jsx278(Fragment6, {});
9174
+ return /* @__PURE__ */ jsx278(Fragment7, {});
9088
9175
  }
9089
- return /* @__PURE__ */ jsxs65(
9176
+ return /* @__PURE__ */ jsxs64(
9090
9177
  Box,
9091
9178
  {
9092
9179
  ...getBaseHTMLProps(
@@ -9122,7 +9209,7 @@ var LocalMessage = ({
9122
9209
  purpose: "tertiary",
9123
9210
  onClick: () => {
9124
9211
  setClosed(true);
9125
- onClose && onClose();
9212
+ onClose == null ? void 0 : onClose();
9126
9213
  },
9127
9214
  size: "xsmall",
9128
9215
  "aria-label": t(commonTexts.closeMessage),
@@ -9139,7 +9226,7 @@ LocalMessage.displayName = "LocalMessage";
9139
9226
  import {
9140
9227
  useContext as useContext17,
9141
9228
  useEffect as useEffect24,
9142
- useId as useId17,
9229
+ useId as useId16,
9143
9230
  useRef as useRef28
9144
9231
  } from "react";
9145
9232
  import { createPortal as createPortal3 } from "react-dom";
@@ -9155,7 +9242,7 @@ var Modal_default = {
9155
9242
  };
9156
9243
 
9157
9244
  // src/components/Modal/Modal.tsx
9158
- import { jsx as jsx279, jsxs as jsxs66 } from "react/jsx-runtime";
9245
+ import { jsx as jsx279, jsxs as jsxs65 } from "react/jsx-runtime";
9159
9246
  var Modal = ({
9160
9247
  isOpen = false,
9161
9248
  parentElement,
@@ -9171,7 +9258,7 @@ var Modal = ({
9171
9258
  ref,
9172
9259
  ...rest
9173
9260
  }) => {
9174
- const generatedId = useId17();
9261
+ const generatedId = useId16();
9175
9262
  const modalId = id != null ? id : `${generatedId}-modal`;
9176
9263
  const headerId = `${modalId}-header`;
9177
9264
  const modalRef = useFocusTrap(isOpen, initialFocusRef);
@@ -9213,7 +9300,7 @@ var Modal = ({
9213
9300
  isMounted: isOpen && hasTransitionedIn,
9214
9301
  ref: backdropRef,
9215
9302
  onClick: onBackdropClick,
9216
- children: /* @__PURE__ */ jsxs66(
9303
+ children: /* @__PURE__ */ jsxs65(
9217
9304
  Paper,
9218
9305
  {
9219
9306
  display: "flex",
@@ -9240,7 +9327,7 @@ var Modal = ({
9240
9327
  id: modalId,
9241
9328
  elevation: 4,
9242
9329
  children: [
9243
- /* @__PURE__ */ jsxs66(
9330
+ /* @__PURE__ */ jsxs65(
9244
9331
  HStack,
9245
9332
  {
9246
9333
  paddingBlock: "0 x0.75",
@@ -9361,7 +9448,7 @@ function PaginationGenerator(pagesAmount, activePage) {
9361
9448
  // src/components/Select/Select.tsx
9362
9449
  import {
9363
9450
  useContext as useContext18,
9364
- useId as useId18
9451
+ useId as useId17
9365
9452
  } from "react";
9366
9453
  import {
9367
9454
  default as ReactSelect
@@ -9644,10 +9731,11 @@ var getCustomStyles = (size2, hasError, hasIcon, isReadOnly) => ({
9644
9731
  });
9645
9732
 
9646
9733
  // src/components/Select/SelectComponents.tsx
9734
+ import { useMemo as useMemo2 } from "react";
9647
9735
  import {
9648
9736
  components
9649
9737
  } from "react-select";
9650
- import { jsx as jsx282, jsxs as jsxs67 } from "react/jsx-runtime";
9738
+ import { jsx as jsx282, jsxs as jsxs66 } from "react/jsx-runtime";
9651
9739
  var {
9652
9740
  Option,
9653
9741
  NoOptionsMessage,
@@ -9668,7 +9756,7 @@ var getIndicatorIconSize = (componentSize) => {
9668
9756
  return "small";
9669
9757
  }
9670
9758
  };
9671
- var DDSOption = (props, componentSize) => /* @__PURE__ */ jsxs67(Option, { ...props, children: [
9759
+ var DDSOption = (props, componentSize) => /* @__PURE__ */ jsxs66(Option, { ...props, children: [
9672
9760
  props.isSelected && /* @__PURE__ */ jsx282(Icon, { icon: CheckIcon, iconSize: getFormInputIconSize(componentSize) }),
9673
9761
  props.children
9674
9762
  ] });
@@ -9696,38 +9784,48 @@ var DDSInput = (props, ariaInvalid, ariaDescribedby) => /* @__PURE__ */ jsx282(
9696
9784
  "aria-describedby": ariaDescribedby
9697
9785
  }
9698
9786
  );
9699
- var DDSControl = (props, componentSize, readOnly, icon, dataTestId) => {
9700
- const { className, ...rest } = props;
9701
- return /* @__PURE__ */ jsx282("div", { "data-testid": dataTestId ? dataTestId + "-control" : void 0, children: /* @__PURE__ */ jsxs67(
9702
- Control,
9703
- {
9704
- ...rest,
9705
- className: cn(
9706
- className,
9707
- Select_default.control,
9708
- rest.isDisabled && Select_default["control--disabled"],
9709
- readOnly && Select_default["control--readonly"]
9710
- ),
9711
- children: [
9712
- icon && /* @__PURE__ */ jsx282(
9713
- Icon,
9714
- {
9715
- icon,
9716
- iconSize: getFormInputIconSize(componentSize),
9717
- className: cn(
9718
- Input_default["input-group__absolute-element"],
9719
- Select_default[`icon--${componentSize}`]
9720
- )
9721
- }
9787
+ function createDDSControl(componentSize, readOnly, icon, dataTestId) {
9788
+ return function DDSControlWrapper(props) {
9789
+ const { className, children, innerProps, ...rest } = props;
9790
+ return /* @__PURE__ */ jsxs66(
9791
+ Control,
9792
+ {
9793
+ ...rest,
9794
+ innerProps: {
9795
+ ...innerProps,
9796
+ "data-testid": dataTestId ? dataTestId + "-control" : void 0
9797
+ },
9798
+ className: cn(
9799
+ className,
9800
+ Select_default.control,
9801
+ rest.isDisabled && Select_default["control--disabled"],
9802
+ readOnly && Select_default["control--readonly"]
9722
9803
  ),
9723
- props.children
9724
- ]
9725
- }
9726
- ) });
9727
- };
9804
+ children: [
9805
+ icon && /* @__PURE__ */ jsx282(
9806
+ Icon,
9807
+ {
9808
+ icon,
9809
+ iconSize: getFormInputIconSize(componentSize),
9810
+ className: cn(
9811
+ Input_default["input-group__absolute-element"],
9812
+ Select_default[`icon--${componentSize}`]
9813
+ )
9814
+ }
9815
+ ),
9816
+ children
9817
+ ]
9818
+ }
9819
+ );
9820
+ };
9821
+ }
9822
+ var DDSControl = (componentSize, readOnly, icon, dataTestId) => useMemo2(
9823
+ () => createDDSControl(componentSize, readOnly, icon, dataTestId),
9824
+ [componentSize, readOnly, icon, dataTestId]
9825
+ );
9728
9826
 
9729
9827
  // src/components/Select/Select.tsx
9730
- import { jsx as jsx283, jsxs as jsxs68 } from "react/jsx-runtime";
9828
+ import { jsx as jsx283, jsxs as jsxs67 } from "react/jsx-runtime";
9731
9829
  function Select({
9732
9830
  id,
9733
9831
  label,
@@ -9763,7 +9861,7 @@ function Select({
9763
9861
  throw new Error("Select must be used within a ThemeProvider");
9764
9862
  }
9765
9863
  const portalTarget = menuPortalTarget != null ? menuPortalTarget : themeContext == null ? void 0 : themeContext.el;
9766
- const generatedId = useId18();
9864
+ const generatedId = useId17();
9767
9865
  const uniqueId = id != null ? id : `${generatedId}-select`;
9768
9866
  const singleValueId = !isMulti ? `${uniqueId}-singleValue` : void 0;
9769
9867
  const hasLabel = !!label;
@@ -9819,7 +9917,7 @@ function Select({
9819
9917
  ClearIndicator: (props) => DDSClearIndicator(props, componentSize),
9820
9918
  DropdownIndicator: (props) => DDSDropdownIndicator(props, componentSize),
9821
9919
  MultiValueRemove: DDSMultiValueRemove,
9822
- Control: (props) => DDSControl(props, componentSize, readOnly, icon, dataTestId)
9920
+ Control: DDSControl(componentSize, readOnly, icon, dataTestId)
9823
9921
  },
9824
9922
  "aria-invalid": hasErrorMessage ? true : void 0,
9825
9923
  required,
@@ -9827,7 +9925,7 @@ function Select({
9827
9925
  openMenuOnClick: readOnly ? false : openMenuOnClick ? openMenuOnClick : void 0,
9828
9926
  ...rest
9829
9927
  };
9830
- return /* @__PURE__ */ jsxs68(
9928
+ return /* @__PURE__ */ jsxs67(
9831
9929
  Box,
9832
9930
  {
9833
9931
  width: inputWidth,
@@ -9859,7 +9957,7 @@ function Select({
9859
9957
  Select.displayName = "Select";
9860
9958
 
9861
9959
  // src/components/Select/NativeSelect/NativeSelect.tsx
9862
- import { useId as useId19 } from "react";
9960
+ import { useId as useId18 } from "react";
9863
9961
 
9864
9962
  // src/components/Select/NativeSelect/NativeSelect.module.css
9865
9963
  var NativeSelect_default = {
@@ -9873,7 +9971,7 @@ var NativeSelect_default = {
9873
9971
  };
9874
9972
 
9875
9973
  // src/components/Select/NativeSelect/NativeSelect.tsx
9876
- import { jsx as jsx284, jsxs as jsxs69 } from "react/jsx-runtime";
9974
+ import { jsx as jsx284, jsxs as jsxs68 } from "react/jsx-runtime";
9877
9975
  var NativeSelect = ({
9878
9976
  id,
9879
9977
  children,
@@ -9893,7 +9991,7 @@ var NativeSelect = ({
9893
9991
  onMouseDown,
9894
9992
  ...rest
9895
9993
  }) => {
9896
- const generatedId = useId19();
9994
+ const generatedId = useId18();
9897
9995
  const uniqueId = id != null ? id : `${generatedId}-native-select`;
9898
9996
  const hasErrorMessage = !!errorMessage;
9899
9997
  const hasTip = !!tip;
@@ -9905,7 +10003,7 @@ var NativeSelect = ({
9905
10003
  width,
9906
10004
  componentSize === "xsmall" && "var(--dds-input-default-width-xsmall)"
9907
10005
  );
9908
- return /* @__PURE__ */ jsxs69("div", { className, style, children: [
10006
+ return /* @__PURE__ */ jsxs68("div", { className, style, children: [
9909
10007
  hasLabel && /* @__PURE__ */ jsx284(
9910
10008
  Label,
9911
10009
  {
@@ -9916,7 +10014,7 @@ var NativeSelect = ({
9916
10014
  children: label
9917
10015
  }
9918
10016
  ),
9919
- /* @__PURE__ */ jsxs69(Box, { position: "relative", width: inputWidth, children: [
10017
+ /* @__PURE__ */ jsxs68(Box, { position: "relative", width: inputWidth, children: [
9920
10018
  /* @__PURE__ */ jsx284(
9921
10019
  "select",
9922
10020
  {
@@ -9971,7 +10069,7 @@ NativeSelectPlaceholder.displayName = "NativeSelectPlaceholder";
9971
10069
  var createSelectOptions = (...args) => args.map((v) => ({ label: v, value: v }));
9972
10070
 
9973
10071
  // src/components/Pagination/Pagination.tsx
9974
- import { jsx as jsx285, jsxs as jsxs70 } from "react/jsx-runtime";
10072
+ import { jsx as jsx285, jsxs as jsxs69 } from "react/jsx-runtime";
9975
10073
  var Pagination = ({
9976
10074
  itemsAmount,
9977
10075
  defaultItemsPerPage = 10,
@@ -10000,7 +10098,7 @@ var Pagination = ({
10000
10098
  const pagesLength = Math.ceil(itemsAmount / itemsPerPage);
10001
10099
  const items = PaginationGenerator(pagesLength, activePage);
10002
10100
  const onPageChange = (event, page) => {
10003
- page && setActivePage(page);
10101
+ if (page) setActivePage(page);
10004
10102
  if (event && onChange) {
10005
10103
  onChange(event, page);
10006
10104
  }
@@ -10023,7 +10121,7 @@ var Pagination = ({
10023
10121
  onClick: (event) => {
10024
10122
  onPageChange(event, item);
10025
10123
  },
10026
- "aria-label": isActive ? t(texts16.currentPage(item)) : t(texts16.page(item)),
10124
+ "aria-label": isActive ? t(texts17.currentPage(item)) : t(texts17.page(item)),
10027
10125
  children: item
10028
10126
  }
10029
10127
  ) : /* @__PURE__ */ jsx285(
@@ -10043,7 +10141,7 @@ var Pagination = ({
10043
10141
  onClick: (event) => {
10044
10142
  onPageChange(event, activePage - 1);
10045
10143
  },
10046
- "aria-label": t(texts16.previousPage)
10144
+ "aria-label": t(texts17.previousPage)
10047
10145
  }
10048
10146
  );
10049
10147
  const nextPageButton = /* @__PURE__ */ jsx285(
@@ -10055,24 +10153,24 @@ var Pagination = ({
10055
10153
  onClick: (event) => {
10056
10154
  onPageChange(event, activePage + 1);
10057
10155
  },
10058
- "aria-label": t(texts16.nextPage)
10156
+ "aria-label": t(texts17.nextPage)
10059
10157
  }
10060
10158
  );
10061
10159
  const isOnFirstPage = activePage === 1;
10062
10160
  const isOnLastPage = activePage === pagesLength;
10063
- const navigation = withPagination ? /* @__PURE__ */ jsxs70(
10161
+ const navigation = withPagination ? /* @__PURE__ */ jsxs69(
10064
10162
  Box,
10065
10163
  {
10066
10164
  as: "nav",
10067
10165
  ref,
10068
- "aria-label": t(texts16.pagination),
10166
+ "aria-label": t(texts17.pagination),
10069
10167
  display: "flex",
10070
10168
  alignItems: "center",
10071
10169
  ...!withSelect && !withCounter && {
10072
10170
  ...getBaseHTMLProps(id, className, htmlProps, rest)
10073
10171
  },
10074
10172
  children: [
10075
- /* @__PURE__ */ jsxs70(
10173
+ /* @__PURE__ */ jsxs69(
10076
10174
  ShowHide,
10077
10175
  {
10078
10176
  as: "ol",
@@ -10105,7 +10203,7 @@ var Pagination = ({
10105
10203
  ]
10106
10204
  }
10107
10205
  ),
10108
- !!smallScreenBreakpoint && /* @__PURE__ */ jsxs70(
10206
+ !!smallScreenBreakpoint && /* @__PURE__ */ jsxs69(
10109
10207
  ShowHide,
10110
10208
  {
10111
10209
  as: "ol",
@@ -10129,7 +10227,7 @@ var Pagination = ({
10129
10227
  onClick: (event) => {
10130
10228
  onPageChange(event, 1);
10131
10229
  },
10132
- "aria-label": t(texts16.firstPage)
10230
+ "aria-label": t(texts17.firstPage)
10133
10231
  }
10134
10232
  )
10135
10233
  }
@@ -10183,7 +10281,7 @@ var Pagination = ({
10183
10281
  onClick: (event) => {
10184
10282
  onPageChange(event, pagesLength);
10185
10283
  },
10186
- "aria-label": t(texts16.lastPage)
10284
+ "aria-label": t(texts17.lastPage)
10187
10285
  }
10188
10286
  )
10189
10287
  }
@@ -10196,7 +10294,7 @@ var Pagination = ({
10196
10294
  ) : null;
10197
10295
  const activePageFirstItem = activePage === 1 ? 1 : activePage * itemsPerPage - itemsPerPage + 1;
10198
10296
  const activePageLastItem = activePage === pagesLength ? itemsAmount : activePage * itemsPerPage;
10199
- return !withCounter && !withSelect ? navigation : /* @__PURE__ */ jsxs70(
10297
+ return !withCounter && !withSelect ? navigation : /* @__PURE__ */ jsxs69(
10200
10298
  Box,
10201
10299
  {
10202
10300
  display: "flex",
@@ -10207,7 +10305,7 @@ var Pagination = ({
10207
10305
  alignItems: applyResponsiveStyle("center", smallScreenBreakpoint),
10208
10306
  ...getBaseHTMLProps(id, className, htmlProps, rest),
10209
10307
  children: [
10210
- /* @__PURE__ */ jsxs70("div", { className: Pagination_default.indicators, children: [
10308
+ /* @__PURE__ */ jsxs69("div", { className: Pagination_default.indicators, children: [
10211
10309
  withSelect && /* @__PURE__ */ jsx285(
10212
10310
  Select,
10213
10311
  {
@@ -10221,11 +10319,11 @@ var Pagination = ({
10221
10319
  isClearable: false,
10222
10320
  onChange: handleSelectChange,
10223
10321
  componentSize: "small",
10224
- "aria-label": t(texts16.itemsPerPage)
10322
+ "aria-label": t(texts17.itemsPerPage)
10225
10323
  }
10226
10324
  ),
10227
10325
  withCounter && /* @__PURE__ */ jsx285(Paragraph, { children: t(
10228
- texts16.showsAmountOfTotalItems(
10326
+ texts17.showsAmountOfTotalItems(
10229
10327
  activePageFirstItem,
10230
10328
  activePageLastItem,
10231
10329
  itemsAmount
@@ -10238,7 +10336,7 @@ var Pagination = ({
10238
10336
  );
10239
10337
  };
10240
10338
  Pagination.displayName = "Pagination";
10241
- var texts16 = createTexts({
10339
+ var texts17 = createTexts({
10242
10340
  pagination: {
10243
10341
  nb: "Paginering",
10244
10342
  no: "Paginering",
@@ -10298,7 +10396,7 @@ var texts16 = createTexts({
10298
10396
  // src/components/PhoneInput/PhoneInput.tsx
10299
10397
  import {
10300
10398
  useEffect as useEffect25,
10301
- useId as useId20,
10399
+ useId as useId19,
10302
10400
  useLayoutEffect as useLayoutEffect2,
10303
10401
  useRef as useRef29,
10304
10402
  useState as useState22
@@ -10702,7 +10800,7 @@ var PhoneInput_default = {
10702
10800
  };
10703
10801
 
10704
10802
  // src/components/PhoneInput/PhoneInput.tsx
10705
- import { jsx as jsx286, jsxs as jsxs71 } from "react/jsx-runtime";
10803
+ import { jsx as jsx286, jsxs as jsxs70 } from "react/jsx-runtime";
10706
10804
  var prioritizedCountries = [
10707
10805
  COUNTRIES.NO,
10708
10806
  COUNTRIES.SE,
@@ -10761,9 +10859,9 @@ var PhoneInput = ({
10761
10859
  }) => {
10762
10860
  var _a;
10763
10861
  const { t } = useTranslation();
10764
- const tGroupLabel = groupLabel != null ? groupLabel : t(texts17.countryCodeAndPhoneNumber);
10765
- const tSelectLabel = selectLabel != null ? selectLabel : t(texts17.countryCode);
10766
- const generatedId = useId20();
10862
+ const tGroupLabel = groupLabel != null ? groupLabel : t(texts18.countryCodeAndPhoneNumber);
10863
+ const tSelectLabel = selectLabel != null ? selectLabel : t(texts18.countryCode);
10864
+ const generatedId = useId19();
10767
10865
  const uniqueId = (_a = props.id) != null ? _a : generatedId;
10768
10866
  const phoneInputId = `${uniqueId}-phone-input`;
10769
10867
  const phoneNumberId = `${uniqueId}-phone-number`;
@@ -10840,7 +10938,7 @@ var PhoneInput = ({
10840
10938
  const showRequiredStyling = !!(required || ariaRequired);
10841
10939
  const bp = props.smallScreenBreakpoint;
10842
10940
  const widthDefault = componentSize === "xsmall" && "var(--dds-input-default-width-xsmall)";
10843
- return /* @__PURE__ */ jsxs71("div", { className: cn(className, Input_default.container), style, children: [
10941
+ return /* @__PURE__ */ jsxs70("div", { className: cn(className, Input_default.container), style, children: [
10844
10942
  hasLabel && /* @__PURE__ */ jsx286(
10845
10943
  Label,
10846
10944
  {
@@ -10851,7 +10949,7 @@ var PhoneInput = ({
10851
10949
  children: label
10852
10950
  }
10853
10951
  ),
10854
- /* @__PURE__ */ jsxs71(
10952
+ /* @__PURE__ */ jsxs70(
10855
10953
  Box,
10856
10954
  {
10857
10955
  display: "flex",
@@ -10889,7 +10987,7 @@ var PhoneInput = ({
10889
10987
  children: countryOptions.map((item, index) => /* @__PURE__ */ jsx286("option", { value: item.countryCode, children: item.label }, index))
10890
10988
  }
10891
10989
  ),
10892
- /* @__PURE__ */ jsxs71(Box, { width: "100%", className: Input_default["input-group"], children: [
10990
+ /* @__PURE__ */ jsxs70(Box, { width: "100%", className: Input_default["input-group"], children: [
10893
10991
  /* @__PURE__ */ jsx286(
10894
10992
  "span",
10895
10993
  {
@@ -10940,7 +11038,7 @@ var getCallingCode = (s) => {
10940
11038
  var _a;
10941
11039
  return (_a = s.substring(s.indexOf("+"), s.length)) != null ? _a : "";
10942
11040
  };
10943
- var texts17 = createTexts({
11041
+ var texts18 = createTexts({
10944
11042
  countryCode: {
10945
11043
  nb: "Landskode",
10946
11044
  no: "Landskode",
@@ -10959,7 +11057,7 @@ var texts17 = createTexts({
10959
11057
  import {
10960
11058
  useContext as useContext20,
10961
11059
  useEffect as useEffect26,
10962
- useId as useId21
11060
+ useId as useId20
10963
11061
  } from "react";
10964
11062
  import { createPortal as createPortal4 } from "react-dom";
10965
11063
 
@@ -10980,7 +11078,7 @@ var PopoverContext = createContext13({});
10980
11078
  var usePopoverContext = () => useContext19(PopoverContext);
10981
11079
 
10982
11080
  // src/components/Popover/Popover.tsx
10983
- import { jsx as jsx287, jsxs as jsxs72 } from "react/jsx-runtime";
11081
+ import { jsx as jsx287, jsxs as jsxs71 } from "react/jsx-runtime";
10984
11082
  var Popover = ({
10985
11083
  id,
10986
11084
  header,
@@ -11020,7 +11118,7 @@ var Popover = ({
11020
11118
  } = context;
11021
11119
  const { t } = useTranslation();
11022
11120
  const hasContext = !isEmpty(context);
11023
- const generatedId = useId21();
11121
+ const generatedId = useId20();
11024
11122
  const uniquePopoverId = id != null ? id : `${generatedId}-popover`;
11025
11123
  const [
11026
11124
  popoverId,
@@ -11058,7 +11156,7 @@ var Popover = ({
11058
11156
  );
11059
11157
  const multiRef = useCombinedRef(ref, popoverRef, floatingRef);
11060
11158
  useEffect26(() => {
11061
- setFloatOptions && setFloatOptions({ placement, offset });
11159
+ setFloatOptions == null ? void 0 : setFloatOptions({ placement, offset });
11062
11160
  }, [placement, offset]);
11063
11161
  useOnClickOutside([popoverRef.current, anchorEl], () => {
11064
11162
  if (isOpen && !hasContext) onClose == null ? void 0 : onClose();
@@ -11068,7 +11166,7 @@ var Popover = ({
11068
11166
  });
11069
11167
  const hasTitle = !!header;
11070
11168
  const openCn = hasTransitionedIn && isOpen ? "open" : "closed";
11071
- const popover = /* @__PURE__ */ jsxs72(
11169
+ const popover = /* @__PURE__ */ jsxs71(
11072
11170
  Paper,
11073
11171
  {
11074
11172
  ...getBaseHTMLProps(
@@ -11130,7 +11228,7 @@ import {
11130
11228
  Children as ReactChildren4,
11131
11229
  cloneElement as cloneElement4,
11132
11230
  isValidElement as isValidElement4,
11133
- useId as useId22,
11231
+ useId as useId21,
11134
11232
  useRef as useRef30,
11135
11233
  useState as useState23
11136
11234
  } from "react";
@@ -11148,17 +11246,17 @@ var PopoverGroup = ({
11148
11246
  const [internalIsOpen, internalSetIsOpen] = useState23(isInitiallyOpen);
11149
11247
  const open = propIsOpen != null ? propIsOpen : internalIsOpen;
11150
11248
  const setOpen = propSetIsOpen != null ? propSetIsOpen : internalSetIsOpen;
11151
- const generatedId = useId22();
11249
+ const generatedId = useId21();
11152
11250
  const uniquePopoverId = popoverId != null ? popoverId : `${generatedId}-popover`;
11153
11251
  const [floatOptions, setFloatOptions] = useState23();
11154
11252
  const { refs, styles: positionStyles } = useFloatPosition(null, floatOptions);
11155
11253
  const handleClose = () => {
11156
11254
  setOpen(false);
11157
- onClose && onClose();
11255
+ onClose == null ? void 0 : onClose();
11158
11256
  };
11159
11257
  const handleOpen = () => {
11160
11258
  setOpen(true);
11161
- onOpen && onOpen();
11259
+ onOpen == null ? void 0 : onOpen();
11162
11260
  };
11163
11261
  const handleToggle = () => {
11164
11262
  if (open) {
@@ -11219,7 +11317,7 @@ import {
11219
11317
  cloneElement as cloneElement5,
11220
11318
  isValidElement as isValidElement5,
11221
11319
  useEffect as useEffect27,
11222
- useMemo as useMemo3,
11320
+ useMemo as useMemo4,
11223
11321
  useState as useState24
11224
11322
  } from "react";
11225
11323
 
@@ -11256,8 +11354,8 @@ var ProgressTracker_default = {
11256
11354
  };
11257
11355
 
11258
11356
  // src/components/ProgressTracker/ProgressTrackerItem.tsx
11259
- import { useMemo as useMemo2 } from "react";
11260
- import { Fragment as Fragment7, jsx as jsx289, jsxs as jsxs73 } from "react/jsx-runtime";
11357
+ import { useMemo as useMemo3 } from "react";
11358
+ import { Fragment as Fragment8, jsx as jsx289, jsxs as jsxs72 } from "react/jsx-runtime";
11261
11359
  var toItemState = (active, completed, disabled) => {
11262
11360
  if (disabled) {
11263
11361
  return "disabled";
@@ -11294,11 +11392,11 @@ var ProgressTrackerItem = (props) => {
11294
11392
  const itemState = toItemState(active, completed, disabled);
11295
11393
  const handleClick = () => {
11296
11394
  if (!disabled) {
11297
- onClick && onClick(index);
11298
- handleStepChange && handleStepChange(index);
11395
+ onClick == null ? void 0 : onClick(index);
11396
+ handleStepChange == null ? void 0 : handleStepChange(index);
11299
11397
  }
11300
11398
  };
11301
- const stepNumberContent = useMemo2(() => {
11399
+ const stepNumberContent = useMemo3(() => {
11302
11400
  if (completed) {
11303
11401
  return /* @__PURE__ */ jsx289(Icon, { icon: CheckIcon, iconSize: "small" });
11304
11402
  }
@@ -11307,7 +11405,7 @@ var ProgressTrackerItem = (props) => {
11307
11405
  }
11308
11406
  return index + 1;
11309
11407
  }, [completed, icon, index]);
11310
- const stepContent = /* @__PURE__ */ jsxs73(Fragment7, { children: [
11408
+ const stepContent = /* @__PURE__ */ jsxs72(Fragment8, { children: [
11311
11409
  /* @__PURE__ */ jsx289(
11312
11410
  Box,
11313
11411
  {
@@ -11323,7 +11421,7 @@ var ProgressTrackerItem = (props) => {
11323
11421
  children: stepNumberContent
11324
11422
  }
11325
11423
  ),
11326
- /* @__PURE__ */ jsxs73(
11424
+ /* @__PURE__ */ jsxs72(
11327
11425
  "div",
11328
11426
  {
11329
11427
  className: cn(
@@ -11332,9 +11430,9 @@ var ProgressTrackerItem = (props) => {
11332
11430
  typographyStyles_default["body-medium"]
11333
11431
  ),
11334
11432
  children: [
11335
- /* @__PURE__ */ jsx289(VisuallyHidden, { children: t(texts18.stepTextBefore(index + 1)) }),
11433
+ /* @__PURE__ */ jsx289(VisuallyHidden, { children: t(texts19.stepTextBefore(index + 1)) }),
11336
11434
  children,
11337
- /* @__PURE__ */ jsx289(VisuallyHidden, { children: completed ? t(texts18.completed) : t(texts18.uncompleted) })
11435
+ /* @__PURE__ */ jsx289(VisuallyHidden, { children: completed ? t(texts19.completed) : t(texts19.uncompleted) })
11338
11436
  ]
11339
11437
  }
11340
11438
  )
@@ -11375,7 +11473,7 @@ var ProgressTrackerItem = (props) => {
11375
11473
  );
11376
11474
  };
11377
11475
  ProgressTrackerItem.displayName = "ProgressTracker.Item";
11378
- var texts18 = createTexts({
11476
+ var texts19 = createTexts({
11379
11477
  stepTextBefore: (index) => ({
11380
11478
  nb: `${index}. trinn, `,
11381
11479
  no: `${index}. trinn, `,
@@ -11413,14 +11511,14 @@ var ProgressTracker = (() => {
11413
11511
  const [thisActiveStep, setActiveStep] = useState24(activeStep);
11414
11512
  const handleChange = (step) => {
11415
11513
  setActiveStep(step);
11416
- onStepChange && onStepChange(step);
11514
+ onStepChange == null ? void 0 : onStepChange(step);
11417
11515
  };
11418
11516
  useEffect27(() => {
11419
11517
  if (activeStep !== void 0 && activeStep != thisActiveStep) {
11420
11518
  setActiveStep(activeStep);
11421
11519
  }
11422
11520
  }, [activeStep, thisActiveStep]);
11423
- const steps = useMemo3(() => {
11521
+ const steps = useMemo4(() => {
11424
11522
  const validChildren = removeInvalidChildren(children);
11425
11523
  const itemsWithIndex = passIndexPropToProgressTrackerItem(validChildren);
11426
11524
  return itemsWithIndex;
@@ -11438,7 +11536,7 @@ var ProgressTracker = (() => {
11438
11536
  children: /* @__PURE__ */ jsx290(
11439
11537
  "nav",
11440
11538
  {
11441
- "aria-label": ariaLabel != null ? ariaLabel : t(texts19.stepProgression),
11539
+ "aria-label": ariaLabel != null ? ariaLabel : t(texts20.stepProgression),
11442
11540
  ...getBaseHTMLProps(id, className, htmlProps, rest),
11443
11541
  children: /* @__PURE__ */ jsx290(
11444
11542
  Box,
@@ -11476,7 +11574,7 @@ function passIndexPropToProgressTrackerItem(children) {
11476
11574
  })
11477
11575
  );
11478
11576
  }
11479
- var texts19 = createTexts({
11577
+ var texts20 = createTexts({
11480
11578
  stepProgression: {
11481
11579
  nb: "Stegprogresjon",
11482
11580
  no: "Stegprogresjon",
@@ -11486,7 +11584,7 @@ var texts19 = createTexts({
11486
11584
  });
11487
11585
 
11488
11586
  // src/components/ProgressBar/ProgressBar.tsx
11489
- import { useId as useId23 } from "react";
11587
+ import { useId as useId22 } from "react";
11490
11588
 
11491
11589
  // src/components/ProgressBar/ProgressBar.module.css
11492
11590
  var ProgressBar_default = {
@@ -11499,7 +11597,7 @@ var ProgressBar_default = {
11499
11597
  };
11500
11598
 
11501
11599
  // src/components/ProgressBar/ProgressBar.tsx
11502
- import { jsx as jsx291, jsxs as jsxs74 } from "react/jsx-runtime";
11600
+ import { jsx as jsx291, jsxs as jsxs73 } from "react/jsx-runtime";
11503
11601
  var ProgressBar = ({
11504
11602
  label,
11505
11603
  tip,
@@ -11514,7 +11612,7 @@ var ProgressBar = ({
11514
11612
  style,
11515
11613
  ...rest
11516
11614
  }) => {
11517
- const generatedId = useId23();
11615
+ const generatedId = useId22();
11518
11616
  const uniqueId = id != null ? id : `${generatedId}-searchInput`;
11519
11617
  const hasErrorMessage = !!errorMessage;
11520
11618
  const hasTip = !!tip;
@@ -11525,7 +11623,7 @@ var ProgressBar = ({
11525
11623
  const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
11526
11624
  const fillPrecentage = hasValidValue && value / (max != null ? max : 1) * 100 + "%";
11527
11625
  const isIndeterminate = !hasValidValue && !hasErrorMessage;
11528
- return /* @__PURE__ */ jsxs74(Box, { width: "100%", className, style, children: [
11626
+ return /* @__PURE__ */ jsxs73(Box, { width: "100%", className, style, children: [
11529
11627
  hasLabel ? /* @__PURE__ */ jsx291(Label, { htmlFor: uniqueId, children: label }) : void 0,
11530
11628
  /* @__PURE__ */ jsx291(
11531
11629
  "progress",
@@ -11571,7 +11669,7 @@ ProgressBar.displayName = "ProgressBar";
11571
11669
 
11572
11670
  // src/components/Search/Search.tsx
11573
11671
  import {
11574
- useId as useId24,
11672
+ useId as useId23,
11575
11673
  useState as useState25
11576
11674
  } from "react";
11577
11675
 
@@ -11600,30 +11698,6 @@ var typographyTypes2 = {
11600
11698
  medium: "bodyMedium",
11601
11699
  large: "bodyLarge"
11602
11700
  };
11603
- function createEmptyChangeEvent(inputElementId) {
11604
- const inputElement = document.getElementById(
11605
- inputElementId
11606
- );
11607
- inputElement.value = "";
11608
- const emptyChangeEvent = {
11609
- target: inputElement,
11610
- currentTarget: inputElement,
11611
- bubbles: true,
11612
- cancelable: false,
11613
- defaultPrevented: false,
11614
- eventPhase: 0,
11615
- isTrusted: false,
11616
- preventDefault: () => null,
11617
- stopPropagation: () => null,
11618
- nativeEvent: new Event("input"),
11619
- persist: () => null,
11620
- type: "change",
11621
- timeStamp: Date.now(),
11622
- isDefaultPrevented: () => false,
11623
- isPropagationStopped: () => false
11624
- };
11625
- return emptyChangeEvent;
11626
- }
11627
11701
 
11628
11702
  // src/components/Search/SearchSuggestionItem.tsx
11629
11703
  import { useEffect as useEffect28, useRef as useRef31 } from "react";
@@ -11660,7 +11734,7 @@ var SearchSuggestionItem = ({
11660
11734
  SearchSuggestionItem.displayName = "SearchSuggestionItem";
11661
11735
 
11662
11736
  // src/components/Search/SearchSuggestions.tsx
11663
- import { jsx as jsx293, jsxs as jsxs75 } from "react/jsx-runtime";
11737
+ import { jsx as jsx293, jsxs as jsxs74 } from "react/jsx-runtime";
11664
11738
  var SearchSuggestions = ({
11665
11739
  id,
11666
11740
  searchId,
@@ -11680,7 +11754,7 @@ var SearchSuggestions = ({
11680
11754
  const { t } = useTranslation();
11681
11755
  const [focus] = useRoveFocus(suggestions == null ? void 0 : suggestions.length, showSuggestions);
11682
11756
  const suggestionsToRender = maxSuggestions ? suggestions == null ? void 0 : suggestions.slice(maxSuggestions) : suggestions;
11683
- return /* @__PURE__ */ jsxs75(
11757
+ return /* @__PURE__ */ jsxs74(
11684
11758
  Paper,
11685
11759
  {
11686
11760
  ...getBaseHTMLProps(
@@ -11720,7 +11794,7 @@ var SearchSuggestions = ({
11720
11794
  {
11721
11795
  index,
11722
11796
  focus: focus === index && showSuggestions,
11723
- "aria-label": t(texts20.search(suggestion)),
11797
+ "aria-label": t(texts21.search(suggestion)),
11724
11798
  onClick: onSuggestionClick,
11725
11799
  "aria-setsize": suggestionsToRender.length,
11726
11800
  "aria-posinset": index,
@@ -11734,7 +11808,7 @@ var SearchSuggestions = ({
11734
11808
  );
11735
11809
  };
11736
11810
  SearchSuggestions.displayName = "SearchSuggestions";
11737
- var texts20 = createTexts({
11811
+ var texts21 = createTexts({
11738
11812
  search: (suggestion) => ({
11739
11813
  no: `${suggestion} s\xF8k`,
11740
11814
  nb: `${suggestion} s\xF8k`,
@@ -11744,7 +11818,7 @@ var texts20 = createTexts({
11744
11818
  });
11745
11819
 
11746
11820
  // src/components/Search/Search.tsx
11747
- import { Fragment as Fragment8, jsx as jsx294, jsxs as jsxs76 } from "react/jsx-runtime";
11821
+ import { Fragment as Fragment9, jsx as jsx294, jsxs as jsxs75 } from "react/jsx-runtime";
11748
11822
  var getIconSize2 = (size2) => {
11749
11823
  switch (size2) {
11750
11824
  case "large":
@@ -11791,7 +11865,7 @@ var Search = ({
11791
11865
  ...rest
11792
11866
  }) => {
11793
11867
  var _a;
11794
- const generatedId = useId24();
11868
+ const generatedId = useId23();
11795
11869
  const uniqueId = id != null ? id : `${generatedId}-searchInput`;
11796
11870
  const hasLabel = !!label;
11797
11871
  const tipId = derivativeIdGenerator(uniqueId, "tip");
@@ -11805,13 +11879,14 @@ var Search = ({
11805
11879
  const context = useAutocompleteSearch();
11806
11880
  const combinedRef = context.inputRef ? useCombinedRef(context.inputRef, ref) : ref;
11807
11881
  const handleChange = (e) => {
11882
+ var _a2;
11808
11883
  setHasValue(e.target.value !== "");
11809
- context.onValueChange && context.onValueChange(e);
11810
- onChange && onChange(e);
11884
+ (_a2 = context == null ? void 0 : context.onValueChange) == null ? void 0 : _a2.call(context, e);
11885
+ onChange == null ? void 0 : onChange(e);
11811
11886
  };
11812
11887
  const clearInput = () => {
11813
- const emptyChangeEvent = createEmptyChangeEvent(uniqueId);
11814
- handleChange(emptyChangeEvent);
11888
+ const clearChangeEvent = createClearChangeEvent(uniqueId);
11889
+ handleChange(clearChangeEvent);
11815
11890
  };
11816
11891
  const {
11817
11892
  label: buttonLabel,
@@ -11820,7 +11895,7 @@ var Search = ({
11820
11895
  } = buttonProps != null ? buttonProps : {};
11821
11896
  const hasSuggestions = !!context.suggestions;
11822
11897
  const showSearchButton = !!buttonProps && !!onClick;
11823
- const inputGroup = /* @__PURE__ */ jsxs76(
11898
+ const inputGroup = /* @__PURE__ */ jsxs75(
11824
11899
  HStack,
11825
11900
  {
11826
11901
  position: "relative",
@@ -11867,7 +11942,7 @@ var Search = ({
11867
11942
  )
11868
11943
  }
11869
11944
  ),
11870
- hasSuggestions && /* @__PURE__ */ jsxs76(Fragment8, { children: [
11945
+ hasSuggestions && /* @__PURE__ */ jsxs75(Fragment9, { children: [
11871
11946
  /* @__PURE__ */ jsx294(
11872
11947
  SearchSuggestions,
11873
11948
  {
@@ -11880,15 +11955,14 @@ var Search = ({
11880
11955
  componentSize
11881
11956
  }
11882
11957
  ),
11883
- /* @__PURE__ */ jsx294(VisuallyHidden, { id: suggestionsDescriptionId, children: t(texts21.useArrowKeys) })
11958
+ /* @__PURE__ */ jsx294(VisuallyHidden, { id: suggestionsDescriptionId, children: t(texts22.useArrowKeys) })
11884
11959
  ] }),
11885
11960
  hasValue && /* @__PURE__ */ jsx294(
11886
- Button,
11961
+ InlineIconButton,
11887
11962
  {
11888
11963
  icon: CloseSmallIcon,
11889
- size: componentSize === "large" ? "medium" : "small",
11890
- purpose: "tertiary",
11891
- "aria-label": t(texts21.clearSearch),
11964
+ size: componentSize === "small" ? "small" : "medium",
11965
+ "aria-label": t(texts22.clearSearch),
11892
11966
  onClick: clearInput,
11893
11967
  className: Search_default["clear-button"]
11894
11968
  }
@@ -11896,10 +11970,10 @@ var Search = ({
11896
11970
  ]
11897
11971
  }
11898
11972
  );
11899
- return /* @__PURE__ */ jsxs76(VStack, { gap: "x0.125", children: [
11973
+ return /* @__PURE__ */ jsxs75(VStack, { gap: "x0.125", children: [
11900
11974
  hasLabel && /* @__PURE__ */ jsx294(Label, { htmlFor: uniqueId, children: label }),
11901
- /* @__PURE__ */ jsxs76("div", { children: [
11902
- showSearchButton ? /* @__PURE__ */ jsxs76(
11975
+ /* @__PURE__ */ jsxs75("div", { children: [
11976
+ showSearchButton ? /* @__PURE__ */ jsxs75(
11903
11977
  Grid,
11904
11978
  {
11905
11979
  className,
@@ -11928,7 +12002,7 @@ var Search = ({
11928
12002
  ] });
11929
12003
  };
11930
12004
  Search.displayName = "Search";
11931
- var texts21 = createTexts({
12005
+ var texts22 = createTexts({
11932
12006
  clearSearch: {
11933
12007
  nb: "T\xF8m s\xF8k",
11934
12008
  no: "T\xF8m s\xF8k",
@@ -11999,12 +12073,12 @@ var SearchAutocompleteWrapper = (props) => {
11999
12073
  } else {
12000
12074
  setSuggestions([]);
12001
12075
  }
12002
- onChange && onChange(e);
12076
+ onChange == null ? void 0 : onChange(e);
12003
12077
  };
12004
12078
  const handleSuggestionClick = (e) => {
12005
12079
  setSuggestions([]);
12006
12080
  handleSetInputValue(e.target.innerText);
12007
- onSuggestionSelection && onSuggestionSelection();
12081
+ onSuggestionSelection == null ? void 0 : onSuggestionSelection();
12008
12082
  closeSuggestions();
12009
12083
  };
12010
12084
  const handleSetInputValue = (value2) => {
@@ -12104,7 +12178,7 @@ var SplitButton_default = {
12104
12178
  };
12105
12179
 
12106
12180
  // src/components/SplitButton/SplitButton.tsx
12107
- import { jsx as jsx298, jsxs as jsxs77 } from "react/jsx-runtime";
12181
+ import { jsx as jsx298, jsxs as jsxs76 } from "react/jsx-runtime";
12108
12182
  var SplitButton = ({
12109
12183
  size: size2,
12110
12184
  primaryAction,
@@ -12119,7 +12193,7 @@ var SplitButton = ({
12119
12193
  purpose,
12120
12194
  size: size2
12121
12195
  };
12122
- return /* @__PURE__ */ jsxs77("div", { className: cn(className, SplitButton_default.container), ...rest, children: [
12196
+ return /* @__PURE__ */ jsxs76("div", { className: cn(className, SplitButton_default.container), ...rest, children: [
12123
12197
  /* @__PURE__ */ jsx298(
12124
12198
  Button,
12125
12199
  {
@@ -12129,13 +12203,13 @@ var SplitButton = ({
12129
12203
  className: SplitButton_default.main
12130
12204
  }
12131
12205
  ),
12132
- /* @__PURE__ */ jsxs77(OverflowMenuGroup, { isOpen, setIsOpen, children: [
12206
+ /* @__PURE__ */ jsxs76(OverflowMenuGroup, { isOpen, setIsOpen, children: [
12133
12207
  /* @__PURE__ */ jsx298(
12134
12208
  Button,
12135
12209
  {
12136
12210
  ...buttonStyleProps,
12137
12211
  icon: isOpen ? ChevronUpIcon : ChevronDownIcon,
12138
- "aria-label": t(texts22.moreActions),
12212
+ "aria-label": t(texts23.moreActions),
12139
12213
  purpose,
12140
12214
  className: cn(
12141
12215
  SplitButton_default.option,
@@ -12149,7 +12223,7 @@ var SplitButton = ({
12149
12223
  ] });
12150
12224
  };
12151
12225
  SplitButton.displayName = "SplitButton";
12152
- var texts22 = createTexts({
12226
+ var texts23 = createTexts({
12153
12227
  moreActions: {
12154
12228
  nb: "Flere handlinger",
12155
12229
  no: "Flere handlinger",
@@ -12161,7 +12235,7 @@ var texts22 = createTexts({
12161
12235
  // src/components/Table/collapsible/CollapsibleRow.tsx
12162
12236
  import {
12163
12237
  Children as Children4,
12164
- Fragment as Fragment9,
12238
+ Fragment as Fragment10,
12165
12239
  cloneElement as cloneElement6,
12166
12240
  isValidElement as isValidElement6,
12167
12241
  useEffect as useEffect31,
@@ -12289,7 +12363,7 @@ var Row = ({
12289
12363
  Row.displayName = "Table.Row";
12290
12364
 
12291
12365
  // src/components/Table/normal/SortCell.tsx
12292
- import { jsx as jsx304, jsxs as jsxs78 } from "react/jsx-runtime";
12366
+ import { jsx as jsx304, jsxs as jsxs77 } from "react/jsx-runtime";
12293
12367
  var makeSortIcon = (isSorted, sortOrder) => {
12294
12368
  if (!isSorted || !sortOrder) {
12295
12369
  return /* @__PURE__ */ jsx304(Icon, { icon: UnfoldMoreIcon, iconSize: "inherit" });
@@ -12310,11 +12384,11 @@ var SortCell = ({
12310
12384
  type: "head",
12311
12385
  "aria-sort": isSorted && sortOrder ? sortOrder : void 0,
12312
12386
  ...rest,
12313
- children: /* @__PURE__ */ jsxs78(
12387
+ children: /* @__PURE__ */ jsxs77(
12314
12388
  StylelessButton,
12315
12389
  {
12316
12390
  onClick,
12317
- "aria-description": t(texts23.changeSort),
12391
+ "aria-description": t(texts24.changeSort),
12318
12392
  className: cn(Table_default["sort-button"], focusable),
12319
12393
  children: [
12320
12394
  children,
@@ -12327,7 +12401,7 @@ var SortCell = ({
12327
12401
  );
12328
12402
  };
12329
12403
  SortCell.displayName = "Table.SortCell";
12330
- var texts23 = createTexts({
12404
+ var texts24 = createTexts({
12331
12405
  changeSort: {
12332
12406
  nb: "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
12333
12407
  no: "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
@@ -12421,7 +12495,7 @@ Table2.Row = Row;
12421
12495
  Table2.Foot = Foot;
12422
12496
 
12423
12497
  // src/components/Table/collapsible/CollapsibleRow.tsx
12424
- import { Fragment as Fragment10, jsx as jsx307, jsxs as jsxs79 } from "react/jsx-runtime";
12498
+ import { Fragment as Fragment11, jsx as jsx307, jsxs as jsxs78 } from "react/jsx-runtime";
12425
12499
  var CollapsibleRow = ({
12426
12500
  type: _type,
12427
12501
  className,
@@ -12438,7 +12512,7 @@ var CollapsibleRow = ({
12438
12512
  const { isCollapsed, headerValues, definingColumnIndex } = useCollapsibleTableContext();
12439
12513
  const [childrenCollapsed, setChildrenCollapsed] = useState29(true);
12440
12514
  useEffect31(() => {
12441
- !isCollapsed && setChildrenCollapsed(true);
12515
+ if (!isCollapsed) setChildrenCollapsed(true);
12442
12516
  }, [isCollapsed]);
12443
12517
  const rowProps = (isOpenCollapsibleHeader) => {
12444
12518
  return {
@@ -12464,7 +12538,7 @@ var CollapsibleRow = ({
12464
12538
  const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
12465
12539
  const id = derivativeIdGenerator(prefix2, index.toString());
12466
12540
  collapsibleIds.push(id);
12467
- return /* @__PURE__ */ jsxs79(Fragment9, { children: [
12541
+ return /* @__PURE__ */ jsxs78(Fragment10, { children: [
12468
12542
  /* @__PURE__ */ jsx307(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
12469
12543
  isValidElement6(child) && cloneElement6(child, {
12470
12544
  collapsibleProps: { isCollapsibleChild: true }
@@ -12477,18 +12551,18 @@ var CollapsibleRow = ({
12477
12551
  });
12478
12552
  const headerRow = () => {
12479
12553
  if (type !== "head" || !isCollapsed) return null;
12480
- return /* @__PURE__ */ jsx307(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs79(Fragment10, { children: [
12554
+ return /* @__PURE__ */ jsx307(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs78(Fragment11, { children: [
12481
12555
  definingColumnCells,
12482
- /* @__PURE__ */ jsxs79(Table2.Cell, { type: "head", layout: "center", children: [
12483
- t(texts24.expand),
12484
- /* @__PURE__ */ jsx307(VisuallyHidden, { children: t(texts24.row) })
12556
+ /* @__PURE__ */ jsxs78(Table2.Cell, { type: "head", layout: "center", children: [
12557
+ t(texts25.expand),
12558
+ /* @__PURE__ */ jsx307(VisuallyHidden, { children: t(texts25.row) })
12485
12559
  ] })
12486
12560
  ] }) });
12487
12561
  };
12488
12562
  const idList = spaceSeparatedIdListGenerator(collapsibleIds);
12489
12563
  const rowWithChevron = () => {
12490
12564
  if (type !== "body" || !isCollapsed) return null;
12491
- return /* @__PURE__ */ jsxs79(Row, { ref, ...rowProps(!childrenCollapsed && true), children: [
12565
+ return /* @__PURE__ */ jsxs78(Row, { ref, ...rowProps(!childrenCollapsed && true), children: [
12492
12566
  definingColumnCells,
12493
12567
  /* @__PURE__ */ jsx307(Table2.Cell, { children: /* @__PURE__ */ jsx307(
12494
12568
  StylelessButton,
@@ -12509,16 +12583,16 @@ var CollapsibleRow = ({
12509
12583
  ) })
12510
12584
  ] });
12511
12585
  };
12512
- return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs79(Fragment10, { children: [
12586
+ return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs78(Fragment11, { children: [
12513
12587
  headerRow(),
12514
- type === "body" && /* @__PURE__ */ jsxs79(Fragment10, { children: [
12588
+ type === "body" && /* @__PURE__ */ jsxs78(Fragment11, { children: [
12515
12589
  rowWithChevron(),
12516
12590
  childrenCollapsed ? null : collapsedRows
12517
12591
  ] })
12518
12592
  ] }) : /* @__PURE__ */ jsx307(Row, { ref, ...rowProps(), children });
12519
12593
  };
12520
12594
  CollapsibleRow.displayName = "CollapsibleTable.Row";
12521
- var texts24 = createTexts({
12595
+ var texts25 = createTexts({
12522
12596
  expand: {
12523
12597
  nb: "Utvid",
12524
12598
  no: "Utvid",
@@ -12638,7 +12712,7 @@ function useSetTabWidth(index, width) {
12638
12712
  }
12639
12713
 
12640
12714
  // src/components/Tabs/AddTabButton.tsx
12641
- import { jsx as jsx310, jsxs as jsxs80 } from "react/jsx-runtime";
12715
+ import { jsx as jsx310, jsxs as jsxs79 } from "react/jsx-runtime";
12642
12716
  var AddTabButton = ({
12643
12717
  ref,
12644
12718
  children,
@@ -12651,7 +12725,7 @@ var AddTabButton = ({
12651
12725
  const buttonRef = useRef34(null);
12652
12726
  const combinedRef = useCombinedRef(ref, buttonRef);
12653
12727
  const { tabContentDirection, size: size2 } = useTabsContext();
12654
- return /* @__PURE__ */ jsxs80(
12728
+ return /* @__PURE__ */ jsxs79(
12655
12729
  "button",
12656
12730
  {
12657
12731
  ...rest,
@@ -12673,7 +12747,7 @@ var AddTabButton = ({
12673
12747
  AddTabButton.displayName = "AddTabButton";
12674
12748
 
12675
12749
  // src/components/Tabs/Tabs.tsx
12676
- import { useEffect as useEffect32, useId as useId25, useRef as useRef35, useState as useState30 } from "react";
12750
+ import { useEffect as useEffect32, useId as useId24, useRef as useRef35, useState as useState30 } from "react";
12677
12751
  import { jsx as jsx311 } from "react/jsx-runtime";
12678
12752
  var Tabs = ({
12679
12753
  id,
@@ -12688,7 +12762,7 @@ var Tabs = ({
12688
12762
  htmlProps,
12689
12763
  ...rest
12690
12764
  }) => {
12691
- const generatedId = useId25();
12765
+ const generatedId = useId24();
12692
12766
  const uniqueId = id != null ? id : `${generatedId}-tabs`;
12693
12767
  const [thisActiveTab, setActiveTab] = useState30(activeTab != null ? activeTab : 0);
12694
12768
  const [hasTabFocus, setHasTabFocus] = useState30(false);
@@ -12696,7 +12770,7 @@ var Tabs = ({
12696
12770
  const tabPanelsRef = useRef35(null);
12697
12771
  const handleTabChange = (index) => {
12698
12772
  setActiveTab(index);
12699
- onChange && onChange(index);
12773
+ onChange == null ? void 0 : onChange(index);
12700
12774
  };
12701
12775
  useEffect32(() => {
12702
12776
  if (activeTab !== void 0 && activeTab !== thisActiveTab) {
@@ -12742,7 +12816,7 @@ import {
12742
12816
  useEffect as useEffect33,
12743
12817
  useRef as useRef36
12744
12818
  } from "react";
12745
- import { jsx as jsx312, jsxs as jsxs81 } from "react/jsx-runtime";
12819
+ import { jsx as jsx312, jsxs as jsxs80 } from "react/jsx-runtime";
12746
12820
  var Tab = ({
12747
12821
  active = false,
12748
12822
  icon,
@@ -12784,7 +12858,7 @@ var Tab = ({
12784
12858
  handleSelect();
12785
12859
  onKeyDown == null ? void 0 : onKeyDown(e);
12786
12860
  };
12787
- return /* @__PURE__ */ jsxs81(
12861
+ return /* @__PURE__ */ jsxs80(
12788
12862
  "button",
12789
12863
  {
12790
12864
  ...getBaseHTMLProps(
@@ -12823,7 +12897,7 @@ import {
12823
12897
  isValidElement as isValidElement7,
12824
12898
  useState as useState31
12825
12899
  } from "react";
12826
- import { jsx as jsx313, jsxs as jsxs82 } from "react/jsx-runtime";
12900
+ import { jsx as jsx313, jsxs as jsxs81 } from "react/jsx-runtime";
12827
12901
  var TabList = ({
12828
12902
  children,
12829
12903
  id,
@@ -12866,7 +12940,7 @@ var TabList = ({
12866
12940
  const [widths, setWidths] = useState31([]);
12867
12941
  const handleOnFocus = (event) => {
12868
12942
  setHasTabFocus(true);
12869
- onFocus && onFocus(event);
12943
+ onFocus == null ? void 0 : onFocus(event);
12870
12944
  };
12871
12945
  const handleOnBlur = (event) => {
12872
12946
  var _a;
@@ -12881,7 +12955,7 @@ var TabList = ({
12881
12955
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12882
12956
  ["--dds-tab-widths"]: widths.join(" ")
12883
12957
  };
12884
- return /* @__PURE__ */ jsx313(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ jsxs82(
12958
+ return /* @__PURE__ */ jsx313(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ jsxs81(
12885
12959
  "div",
12886
12960
  {
12887
12961
  ...rest,
@@ -12978,7 +13052,7 @@ var Tag_default = {
12978
13052
  };
12979
13053
 
12980
13054
  // src/components/Tag/Tag.tsx
12981
- import { jsx as jsx316, jsxs as jsxs83 } from "react/jsx-runtime";
13055
+ import { jsx as jsx316, jsxs as jsxs82 } from "react/jsx-runtime";
12982
13056
  var icons3 = {
12983
13057
  info: InfoIcon,
12984
13058
  danger: ErrorIcon,
@@ -12998,7 +13072,7 @@ var Tag = ({
12998
13072
  ...rest
12999
13073
  }) => {
13000
13074
  const icon = icons3[purpose];
13001
- return /* @__PURE__ */ jsxs83(
13075
+ return /* @__PURE__ */ jsxs82(
13002
13076
  TextOverflowEllipsisWrapper,
13003
13077
  {
13004
13078
  ...getBaseHTMLProps(
@@ -13023,7 +13097,7 @@ var Tag = ({
13023
13097
  Tag.displayName = "Tag";
13024
13098
 
13025
13099
  // src/components/TextInput/TextInput.tsx
13026
- import { useId as useId26, useLayoutEffect as useLayoutEffect4, useRef as useRef37, useState as useState32 } from "react";
13100
+ import { useId as useId25, useLayoutEffect as useLayoutEffect4, useRef as useRef37, useState as useState32 } from "react";
13027
13101
 
13028
13102
  // src/components/TextInput/TextInput.module.css
13029
13103
  var TextInput_default = {
@@ -13045,7 +13119,7 @@ var TextInput_default = {
13045
13119
  };
13046
13120
 
13047
13121
  // src/components/TextInput/TextInput.tsx
13048
- import { jsx as jsx317, jsxs as jsxs84 } from "react/jsx-runtime";
13122
+ import { jsx as jsx317, jsxs as jsxs83 } from "react/jsx-runtime";
13049
13123
  var TextInput = ({
13050
13124
  label,
13051
13125
  disabled,
@@ -13091,7 +13165,7 @@ var TextInput = ({
13091
13165
  onChange(event);
13092
13166
  }
13093
13167
  };
13094
- const generatedId = useId26();
13168
+ const generatedId = useId25();
13095
13169
  const uniqueId = id != null ? id : `${generatedId}-textInput`;
13096
13170
  const hasErrorMessage = !!errorMessage;
13097
13171
  const hasTip = !!tip;
@@ -13138,7 +13212,7 @@ var TextInput = ({
13138
13212
  const suffixPaddingInlineEnd = suffixLength ? `calc(var(--dds-spacing-x1) + ${suffixLength}px)` : void 0;
13139
13213
  let extendedInput = null;
13140
13214
  if (hasIcon) {
13141
- extendedInput = /* @__PURE__ */ jsxs84(Box, { className: Input_default["input-group"], width: inputWidth, children: [
13215
+ extendedInput = /* @__PURE__ */ jsxs83(Box, { className: Input_default["input-group"], width: inputWidth, children: [
13142
13216
  /* @__PURE__ */ jsx317(
13143
13217
  Icon,
13144
13218
  {
@@ -13163,7 +13237,7 @@ var TextInput = ({
13163
13237
  )
13164
13238
  ] });
13165
13239
  } else if (hasAffix) {
13166
- extendedInput = /* @__PURE__ */ jsxs84(
13240
+ extendedInput = /* @__PURE__ */ jsxs83(
13167
13241
  Box,
13168
13242
  {
13169
13243
  position: "relative",
@@ -13212,7 +13286,7 @@ var TextInput = ({
13212
13286
  }
13213
13287
  );
13214
13288
  }
13215
- return /* @__PURE__ */ jsxs84(
13289
+ return /* @__PURE__ */ jsxs83(
13216
13290
  "div",
13217
13291
  {
13218
13292
  className: cn(
@@ -13236,7 +13310,7 @@ var TextInput = ({
13236
13310
  }
13237
13311
  ),
13238
13312
  extendedInput ? extendedInput : /* @__PURE__ */ jsx317(Box, { as: StatefulInput, width: inputWidth, ...generalInputProps }),
13239
- hasBottomContainer && /* @__PURE__ */ jsxs84(
13313
+ hasBottomContainer && /* @__PURE__ */ jsxs83(
13240
13314
  Box,
13241
13315
  {
13242
13316
  display: "flex",
@@ -13261,7 +13335,7 @@ var TextInput = ({
13261
13335
  TextInput.displayName = "TextInput";
13262
13336
 
13263
13337
  // src/components/Toggle/Toggle.tsx
13264
- import { useId as useId27 } from "react";
13338
+ import { useId as useId26 } from "react";
13265
13339
 
13266
13340
  // src/components/Toggle/Toggle.module.css
13267
13341
  var Toggle_default = {
@@ -13279,7 +13353,7 @@ var Toggle_default = {
13279
13353
  };
13280
13354
 
13281
13355
  // src/components/Toggle/Toggle.tsx
13282
- import { jsx as jsx318, jsxs as jsxs85 } from "react/jsx-runtime";
13356
+ import { jsx as jsx318, jsxs as jsxs84 } from "react/jsx-runtime";
13283
13357
  var Toggle = ({
13284
13358
  id,
13285
13359
  children,
@@ -13295,7 +13369,7 @@ var Toggle = ({
13295
13369
  ...rest
13296
13370
  }) => {
13297
13371
  const { t } = useTranslation();
13298
- const generatedId = useId27();
13372
+ const generatedId = useId26();
13299
13373
  const uniqueId = id != null ? id : `${generatedId}-toggle`;
13300
13374
  const iconSize = size2 === "large" ? "medium" : "small";
13301
13375
  const [checked, setChecked] = useControllableState({
@@ -13303,7 +13377,7 @@ var Toggle = ({
13303
13377
  defaultValue: defaultChecked != null ? defaultChecked : false,
13304
13378
  onChange
13305
13379
  });
13306
- return /* @__PURE__ */ jsxs85(
13380
+ return /* @__PURE__ */ jsxs84(
13307
13381
  "label",
13308
13382
  {
13309
13383
  htmlFor: uniqueId,
@@ -13350,7 +13424,7 @@ var Toggle = ({
13350
13424
  iconSize
13351
13425
  }
13352
13426
  ) }) }),
13353
- /* @__PURE__ */ jsxs85("span", { className: cn(readOnly && Toggle_default["labeltext--readonly"]), children: [
13427
+ /* @__PURE__ */ jsxs84("span", { className: cn(readOnly && Toggle_default["labeltext--readonly"]), children: [
13354
13428
  readOnly && /* @__PURE__ */ jsx318(
13355
13429
  Icon,
13356
13430
  {
@@ -13370,7 +13444,7 @@ var Toggle = ({
13370
13444
  Toggle.displayName = "Toggle";
13371
13445
 
13372
13446
  // src/components/ToggleBar/ToggleBar.tsx
13373
- import { useId as useId28, useState as useState33 } from "react";
13447
+ import { useId as useId27, useState as useState33 } from "react";
13374
13448
 
13375
13449
  // src/components/ToggleBar/ToggleBar.context.tsx
13376
13450
  import { createContext as createContext20, useContext as useContext28 } from "react";
@@ -13395,7 +13469,7 @@ var ToggleBar_default = {
13395
13469
  };
13396
13470
 
13397
13471
  // src/components/ToggleBar/ToggleBar.tsx
13398
- import { jsx as jsx319, jsxs as jsxs86 } from "react/jsx-runtime";
13472
+ import { jsx as jsx319, jsxs as jsxs85 } from "react/jsx-runtime";
13399
13473
  var ToggleBar = (props) => {
13400
13474
  const {
13401
13475
  children,
@@ -13410,7 +13484,7 @@ var ToggleBar = (props) => {
13410
13484
  id,
13411
13485
  ...rest
13412
13486
  } = props;
13413
- const generatedId = useId28();
13487
+ const generatedId = useId27();
13414
13488
  const uniqueId = id != null ? id : `${generatedId}-ToggleBar`;
13415
13489
  const [groupValue, setGroupValue] = useState33(value);
13416
13490
  const handleChange = combineHandlers(
@@ -13427,7 +13501,7 @@ var ToggleBar = (props) => {
13427
13501
  name,
13428
13502
  value: groupValue
13429
13503
  },
13430
- children: /* @__PURE__ */ jsxs86(
13504
+ children: /* @__PURE__ */ jsxs85(
13431
13505
  VStack,
13432
13506
  {
13433
13507
  ...getBaseHTMLProps(id, className, htmlProps, rest),
@@ -13447,8 +13521,8 @@ var ToggleBar = (props) => {
13447
13521
  ToggleBar.displayName = "ToggleBar";
13448
13522
 
13449
13523
  // src/components/ToggleBar/ToggleRadio.tsx
13450
- import { useId as useId29 } from "react";
13451
- import { jsx as jsx320, jsxs as jsxs87 } from "react/jsx-runtime";
13524
+ import { useId as useId28 } from "react";
13525
+ import { jsx as jsx320, jsxs as jsxs86 } from "react/jsx-runtime";
13452
13526
  var typographyTypes3 = {
13453
13527
  large: "bodyLarge",
13454
13528
  medium: "bodyMedium",
@@ -13479,15 +13553,16 @@ var ToggleRadio = ({
13479
13553
  id,
13480
13554
  ...rest
13481
13555
  }) => {
13482
- const generatedId = useId29();
13556
+ const generatedId = useId28();
13483
13557
  const uniqueId = id != null ? id : `${generatedId}-ToggleRadio`;
13484
13558
  const group = useToggleBarContext();
13485
13559
  const handleChange = (event) => {
13486
- onChange && onChange(event);
13487
- (group == null ? void 0 : group.onChange) && group.onChange(event);
13560
+ var _a;
13561
+ onChange == null ? void 0 : onChange(event);
13562
+ (_a = group == null ? void 0 : group.onChange) == null ? void 0 : _a.call(group, event);
13488
13563
  };
13489
13564
  const contentTypeCn = label ? "with-text" : "just-icon";
13490
- return /* @__PURE__ */ jsxs87("label", { htmlFor: uniqueId, className: ToggleBar_default.label, children: [
13565
+ return /* @__PURE__ */ jsxs86("label", { htmlFor: uniqueId, className: ToggleBar_default.label, children: [
13491
13566
  /* @__PURE__ */ jsx320(
13492
13567
  "input",
13493
13568
  {
@@ -13510,7 +13585,7 @@ var ToggleRadio = ({
13510
13585
  "aria-labelledby": ariaLabelledBy
13511
13586
  }
13512
13587
  ),
13513
- /* @__PURE__ */ jsxs87(
13588
+ /* @__PURE__ */ jsxs86(
13514
13589
  Typography,
13515
13590
  {
13516
13591
  as: "span",
@@ -13531,7 +13606,7 @@ var ToggleRadio = ({
13531
13606
  ToggleRadio.displayName = "ToggleRadio";
13532
13607
 
13533
13608
  // src/components/ToggleButton/ToggleButton.tsx
13534
- import { useId as useId30 } from "react";
13609
+ import { useId as useId29 } from "react";
13535
13610
 
13536
13611
  // src/components/ToggleButton/ToggleButton.module.css
13537
13612
  var ToggleButton_default = {
@@ -13542,7 +13617,7 @@ var ToggleButton_default = {
13542
13617
  };
13543
13618
 
13544
13619
  // src/components/ToggleButton/ToggleButton.tsx
13545
- import { jsx as jsx321, jsxs as jsxs88 } from "react/jsx-runtime";
13620
+ import { jsx as jsx321, jsxs as jsxs87 } from "react/jsx-runtime";
13546
13621
  var ToggleButton = ({
13547
13622
  id,
13548
13623
  label,
@@ -13552,10 +13627,10 @@ var ToggleButton = ({
13552
13627
  htmlProps,
13553
13628
  ...rest
13554
13629
  }) => {
13555
- const generatedId = useId30();
13630
+ const generatedId = useId29();
13556
13631
  const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
13557
13632
  const hasIcon = !!icon;
13558
- return /* @__PURE__ */ jsxs88(Box, { as: "label", htmlFor: uniqueId, width: "fit-content", children: [
13633
+ return /* @__PURE__ */ jsxs87(Box, { as: "label", htmlFor: uniqueId, width: "fit-content", children: [
13559
13634
  /* @__PURE__ */ jsx321(
13560
13635
  "input",
13561
13636
  {
@@ -13572,7 +13647,7 @@ var ToggleButton = ({
13572
13647
  type: "checkbox"
13573
13648
  }
13574
13649
  ),
13575
- /* @__PURE__ */ jsxs88(
13650
+ /* @__PURE__ */ jsxs87(
13576
13651
  "span",
13577
13652
  {
13578
13653
  className: cn(
@@ -13594,8 +13669,8 @@ var ToggleButton = ({
13594
13669
  ToggleButton.displayName = "ToggleButton";
13595
13670
 
13596
13671
  // src/components/ToggleButton/ToggleButtonGroup.tsx
13597
- import { useId as useId31 } from "react";
13598
- import { jsx as jsx322, jsxs as jsxs89 } from "react/jsx-runtime";
13672
+ import { useId as useId30 } from "react";
13673
+ import { jsx as jsx322, jsxs as jsxs88 } from "react/jsx-runtime";
13599
13674
  var ToggleButtonGroup = (props) => {
13600
13675
  const {
13601
13676
  children,
@@ -13607,9 +13682,9 @@ var ToggleButtonGroup = (props) => {
13607
13682
  htmlProps,
13608
13683
  ...rest
13609
13684
  } = props;
13610
- const generatedId = useId31();
13685
+ const generatedId = useId30();
13611
13686
  const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
13612
- return /* @__PURE__ */ jsxs89(
13687
+ return /* @__PURE__ */ jsxs88(
13613
13688
  VStack,
13614
13689
  {
13615
13690
  gap: "x0.5",
@@ -13779,6 +13854,7 @@ export {
13779
13854
  InfoIcon,
13780
13855
  InlineButton,
13781
13856
  InlineEditInput,
13857
+ InlineEditSelect,
13782
13858
  InlineEditTextArea,
13783
13859
  Input,
13784
13860
  InputMessage,