@norges-domstoler/dds-components 21.13.0 → 21.14.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
@@ -312,6 +312,7 @@ var BACKGROUNDS = [
312
312
  "surface-info-strong",
313
313
  "surface-paper-default",
314
314
  "surface-notification",
315
+ "surface-field-disabled",
315
316
  "brand-primary-default",
316
317
  "brand-primary-subtle",
317
318
  "brand-primary-medium",
@@ -379,6 +380,8 @@ var readOnlyKeyDownHandler = (type, readOnly, onKeyDown) => {
379
380
  evt.preventDefault();
380
381
  } else if (type === "selectionControl" && evt.key === " ") {
381
382
  evt.preventDefault();
383
+ } else if (type === "file" && (evt.key === " " || evt.key === "Enter")) {
384
+ evt.preventDefault();
382
385
  }
383
386
  } else onKeyDown == null ? void 0 : onKeyDown(evt);
384
387
  };
@@ -2888,8 +2891,8 @@ function useTranslation() {
2888
2891
  const t = (text) => text[lang];
2889
2892
  return { t, lang };
2890
2893
  }
2891
- function createTexts(texts26) {
2892
- return texts26;
2894
+ function createTexts(texts27) {
2895
+ return texts27;
2893
2896
  }
2894
2897
 
2895
2898
  // src/DdsProvider/DdsProvider.tsx
@@ -5641,7 +5644,12 @@ var DateInput_default = {
5641
5644
  };
5642
5645
 
5643
5646
  // src/components/date-inputs/DatePicker/constants.ts
5644
- var locale = "no-NO";
5647
+ var LOCALE = {
5648
+ nb: "nb-NO",
5649
+ no: "no-NO",
5650
+ nn: "nn-NO",
5651
+ en: "en-GB"
5652
+ };
5645
5653
  var timezone = "Europe/Oslo";
5646
5654
 
5647
5655
  // src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
@@ -5885,12 +5893,12 @@ var CalendarPopoverContent = ({
5885
5893
  import { jsx as jsx226, jsxs as jsxs43 } from "react/jsx-runtime";
5886
5894
  function CalendarGrid({ state, ...props }) {
5887
5895
  const { t } = useTranslation();
5888
- const { locale: locale2 } = useLocale();
5896
+ const { locale } = useLocale();
5889
5897
  const {
5890
5898
  gridProps: { onKeyDown, ...gridProps },
5891
5899
  headerProps
5892
5900
  } = useCalendarGrid(props, state);
5893
- const weeksInMonth = getWeeksInMonth(state.visibleRange.start, locale2);
5901
+ const weeksInMonth = getWeeksInMonth(state.visibleRange.start, locale);
5894
5902
  const weekDays = [
5895
5903
  { short: t(texts5.mo), full: t(texts5.monday) },
5896
5904
  { short: t(texts5.tu), full: t(texts5.tuesday) },
@@ -6072,11 +6080,11 @@ function createCalendar(identifier) {
6072
6080
  }
6073
6081
  function Calendar(props) {
6074
6082
  const { t } = useTranslation();
6075
- const { locale: locale2 } = useLocale2();
6083
+ const { locale } = useLocale2();
6076
6084
  const state = useCalendarState({
6077
6085
  ...props,
6078
6086
  createCalendar,
6079
- locale: locale2
6087
+ locale
6080
6088
  });
6081
6089
  const {
6082
6090
  calendarProps,
@@ -6220,6 +6228,39 @@ function CalendarButton({
6220
6228
  );
6221
6229
  }
6222
6230
 
6231
+ // src/components/date-inputs/DatePicker/DateField/DateField.utils.tsx
6232
+ function formatDateFieldSegments(segments) {
6233
+ const daySegment = segments.find((segment) => segment.type === "day");
6234
+ const monthSegment = segments.find((segment) => segment.type === "month");
6235
+ const yearSegment = segments.find((segment) => segment.type === "year");
6236
+ const separatorSegment = segments.find((segment) => segment.type === "literal");
6237
+ if (!daySegment || !monthSegment || !yearSegment || !separatorSegment) {
6238
+ throw new Error("Invalid date field segments");
6239
+ }
6240
+ const formattedDaySegment = {
6241
+ ...daySegment,
6242
+ text: daySegment.text.padStart(2, "0"),
6243
+ placeholder: "dd"
6244
+ };
6245
+ const formattedMonthSegment = {
6246
+ ...monthSegment,
6247
+ text: monthSegment.text.padStart(2, "0"),
6248
+ placeholder: "mm"
6249
+ };
6250
+ const formattedYearSegment = {
6251
+ ...yearSegment,
6252
+ placeholder: "\xE5\xE5\xE5\xE5"
6253
+ };
6254
+ const formattedSeparatorSegment = { ...separatorSegment, text: "." };
6255
+ return [
6256
+ formattedDaySegment,
6257
+ formattedSeparatorSegment,
6258
+ formattedMonthSegment,
6259
+ formattedSeparatorSegment,
6260
+ formattedYearSegment
6261
+ ];
6262
+ }
6263
+
6223
6264
  // src/components/date-inputs/DatePicker/DateField/DateSegment.tsx
6224
6265
  import { useDateSegment } from "@react-aria/datepicker";
6225
6266
  import { useRef as useRef14 } from "react";
@@ -6234,7 +6275,6 @@ function DateSegment({
6234
6275
  state,
6235
6276
  componentSize
6236
6277
  }) {
6237
- var _a;
6238
6278
  const ref = useRef14(null);
6239
6279
  const { segmentProps } = useDateSegment(segment, state, ref);
6240
6280
  return /* @__PURE__ */ jsxs45(
@@ -6264,7 +6304,7 @@ function DateSegment({
6264
6304
  children: segment.placeholder
6265
6305
  }
6266
6306
  ),
6267
- segment.isPlaceholder ? "" : segment.text.padStart(String((_a = segment.maxValue) != null ? _a : "").length, "0")
6307
+ segment.isPlaceholder ? "" : segment.text
6268
6308
  ]
6269
6309
  }
6270
6310
  );
@@ -6469,11 +6509,11 @@ function DateField({
6469
6509
  clearable,
6470
6510
  ...props
6471
6511
  }) {
6472
- const { locale: locale2 } = useLocale3();
6512
+ const { locale } = useLocale3();
6473
6513
  const { t } = useTranslation();
6474
6514
  const state = useDateFieldState({
6475
6515
  ...props,
6476
- locale: locale2,
6516
+ locale,
6477
6517
  createCalendar: createCalendar2
6478
6518
  });
6479
6519
  const internalRef = useRef15(null);
@@ -6488,6 +6528,7 @@ function DateField({
6488
6528
  const clearDate = () => {
6489
6529
  state.setValue(null);
6490
6530
  };
6531
+ const formattedSegments = formatDateFieldSegments(state.segments);
6491
6532
  return /* @__PURE__ */ jsx235(
6492
6533
  DateInput,
6493
6534
  {
@@ -6526,7 +6567,7 @@ function DateField({
6526
6567
  ),
6527
6568
  labelProps,
6528
6569
  fieldProps,
6529
- children: state.segments.map((segment, i) => /* @__PURE__ */ jsx235(
6570
+ children: formattedSegments.map((segment, i) => /* @__PURE__ */ jsx235(
6530
6571
  DateSegment,
6531
6572
  {
6532
6573
  "aria-readonly": props.isReadOnly,
@@ -6587,6 +6628,10 @@ function DatePicker({
6587
6628
  ref,
6588
6629
  ...props
6589
6630
  }) {
6631
+ const lang = useLanguage();
6632
+ if (!lang) {
6633
+ throw new Error("DatePicker must be used within a DdsProvider");
6634
+ }
6590
6635
  const state = useDatePickerState(props);
6591
6636
  const domRef = useFocusManagerRef(ref && refIsFocusable(ref) ? ref : null);
6592
6637
  const internalRef = useRef17(null);
@@ -6596,7 +6641,7 @@ function DatePicker({
6596
6641
  state,
6597
6642
  internalRef
6598
6643
  );
6599
- return /* @__PURE__ */ jsx236(I18nProvider, { locale, children: /* @__PURE__ */ jsxs47(
6644
+ return /* @__PURE__ */ jsx236(I18nProvider, { locale: LOCALE[lang], children: /* @__PURE__ */ jsxs47(
6600
6645
  CalendarPopover,
6601
6646
  {
6602
6647
  isOpen: state.isOpen,
@@ -6637,10 +6682,14 @@ function TimePicker({
6637
6682
  ref,
6638
6683
  ...props
6639
6684
  }) {
6685
+ const lang = useLanguage();
6686
+ if (!lang) {
6687
+ throw new Error("DatePicker must be used within a DdsProvider");
6688
+ }
6640
6689
  const internalRef = useRef18(null);
6641
6690
  const state = useTimeFieldState({
6642
6691
  ...props,
6643
- locale
6692
+ locale: LOCALE[lang]
6644
6693
  });
6645
6694
  const { labelProps, fieldProps } = useTimeField(
6646
6695
  { ...props, hideTimeZone: true, granularity: "hour" },
@@ -7909,22 +7958,31 @@ var FileUploader_default = {
7909
7958
  "input-container": "FileUploader_input-container",
7910
7959
  "input-container--with-errors": "FileUploader_input-container--with-errors",
7911
7960
  "input-container--drag-active": "FileUploader_input-container--drag-active",
7912
- "input-container--no-drag-zone": "FileUploader_input-container--no-drag-zone",
7913
7961
  "file--invalid": "FileUploader_file--invalid",
7914
7962
  "file__icon--invalid": "FileUploader_file__icon--invalid",
7915
7963
  "file__icon--valid": "FileUploader_file__icon--valid",
7916
- file__name: "FileUploader_file__name"
7964
+ file__name: "FileUploader_file__name",
7965
+ "readonly--file-list": "FileUploader_readonly--file-list"
7917
7966
  };
7918
7967
 
7919
7968
  // src/components/FileUploader/File.tsx
7920
- import { jsx as jsx259, jsxs as jsxs58 } from "react/jsx-runtime";
7969
+ import { Fragment as Fragment6, jsx as jsx259, jsxs as jsxs58 } from "react/jsx-runtime";
7921
7970
  var File = (props) => {
7922
7971
  const { t } = useTranslation();
7923
- const { parentId, index, file: stateFile, removeFile, isValid } = props;
7972
+ const {
7973
+ parentId,
7974
+ index,
7975
+ file: stateFile,
7976
+ removeFile,
7977
+ isValid,
7978
+ disabled,
7979
+ readOnly
7980
+ } = props;
7924
7981
  const errorsList = stateFile.errors.map((e, errorIndex) => ({
7925
7982
  id: derivativeIdGenerator(parentId, `file-${index}-error-${errorIndex}`),
7926
7983
  message: e
7927
7984
  }));
7985
+ const inactive = disabled || readOnly;
7928
7986
  return /* @__PURE__ */ jsxs58("li", { children: [
7929
7987
  /* @__PURE__ */ jsxs58(
7930
7988
  Paper,
@@ -7935,42 +7993,46 @@ var File = (props) => {
7935
7993
  gap: "x0.75",
7936
7994
  marginBlock: "x0.5 0",
7937
7995
  padding: "x0.5 x1",
7938
- border: isValid ? "border-default" : "border-danger",
7939
- background: "surface-subtle",
7996
+ border: disabled ? "border-subtle" : isValid ? "border-default" : "border-danger",
7997
+ background: inactive ? "surface-field-disabled" : "surface-subtle",
7940
7998
  className: cn(!isValid && FileUploader_default["file--invalid"]),
7941
7999
  children: [
7942
8000
  /* @__PURE__ */ jsx259(
7943
- "span",
8001
+ Typography,
7944
8002
  {
7945
- className: cn(FileUploader_default.file__name, typographyStyles_default["body-medium"]),
8003
+ as: "span",
8004
+ color: disabled ? "text-subtle" : readOnly ? "text-medium" : void 0,
8005
+ className: cn(FileUploader_default.file__name),
7946
8006
  children: stateFile.file.name
7947
8007
  }
7948
8008
  ),
7949
- /* @__PURE__ */ jsx259(
7950
- Icon,
7951
- {
7952
- icon: isValid ? CheckCircledIcon : ErrorIcon,
7953
- className: FileUploader_default[`file__icon--${isValid ? "valid" : "invalid"}`]
7954
- }
7955
- ),
7956
- /* @__PURE__ */ jsx259(
7957
- Button,
7958
- {
7959
- size: "small",
7960
- purpose: "tertiary",
7961
- type: "button",
7962
- onClick: removeFile,
7963
- icon: CloseIcon,
7964
- htmlProps: {
7965
- "aria-label": t(texts13.removeFile(stateFile.file.name)),
7966
- "aria-invalid": !isValid ? true : void 0,
7967
- "aria-errormessage": !isValid ? t(texts13.invalidFile) : void 0,
7968
- "aria-describedby": spaceSeparatedIdListGenerator(
7969
- errorsList.map((e) => e.id)
7970
- )
8009
+ !inactive && /* @__PURE__ */ jsxs58(Fragment6, { children: [
8010
+ /* @__PURE__ */ jsx259(
8011
+ Icon,
8012
+ {
8013
+ icon: isValid ? CheckCircledIcon : ErrorIcon,
8014
+ className: FileUploader_default[`file__icon--${isValid ? "valid" : "invalid"}`]
7971
8015
  }
7972
- }
7973
- )
8016
+ ),
8017
+ /* @__PURE__ */ jsx259(
8018
+ Button,
8019
+ {
8020
+ size: "small",
8021
+ purpose: "tertiary",
8022
+ type: "button",
8023
+ onClick: removeFile,
8024
+ icon: CloseIcon,
8025
+ htmlProps: {
8026
+ "aria-label": t(texts13.removeFile(stateFile.file.name)),
8027
+ "aria-invalid": !isValid ? true : void 0,
8028
+ "aria-errormessage": !isValid ? t(texts13.invalidFile) : void 0,
8029
+ "aria-describedby": spaceSeparatedIdListGenerator(
8030
+ errorsList.map((e) => e.id)
8031
+ )
8032
+ }
8033
+ }
8034
+ )
8035
+ ] })
7974
8036
  ]
7975
8037
  }
7976
8038
  ),
@@ -8071,14 +8133,12 @@ var isEventWithFiles = (event) => {
8071
8133
  var isFileAccepted = (file, accept) => {
8072
8134
  return accept !== void 0 ? isAccepted(file, accept) : true;
8073
8135
  };
8074
- var getTooManyFilesErrorMessage = (maxFiles) => `For mange filer, maks ${maxFiles}stk`;
8075
- var getInvalidFileTypeErrorMessage = () => "Ugyldig filtype";
8076
8136
 
8077
8137
  // src/components/FileUploader/useFileUploader.ts
8078
- var calcRootErrors = (files, maxFiles, errorMessage) => {
8138
+ var calcRootErrors = (maxFilesErrorMessage, files, maxFiles, errorMessage) => {
8079
8139
  const errors = [];
8080
8140
  if (maxFiles && maxFiles >= 1 && files.length > maxFiles) {
8081
- errors.push(getTooManyFilesErrorMessage(maxFiles));
8141
+ errors.push(maxFilesErrorMessage + maxFiles);
8082
8142
  }
8083
8143
  if (errorMessage) {
8084
8144
  errors.push(errorMessage);
@@ -8090,11 +8150,14 @@ var useFileUploader = (props) => {
8090
8150
  initialFiles,
8091
8151
  value,
8092
8152
  onChange,
8153
+ onKeyDown,
8093
8154
  accept,
8094
8155
  maxFiles,
8095
8156
  disabled,
8157
+ readOnly,
8096
8158
  errorMessage
8097
8159
  } = props;
8160
+ const { t } = useTranslation();
8098
8161
  const rootRef = useRef23(null);
8099
8162
  const inputRef = useRef23(null);
8100
8163
  const buttonRef = useRef23(null);
@@ -8112,6 +8175,7 @@ var useFileUploader = (props) => {
8112
8175
  isFileDialogActive: false,
8113
8176
  isDragActive: false,
8114
8177
  rootErrors: calcRootErrors(
8178
+ t(texts14.invalidFileAmount),
8115
8179
  initialFileUploaderFiles,
8116
8180
  maxFiles,
8117
8181
  errorMessage
@@ -8124,7 +8188,7 @@ var useFileUploader = (props) => {
8124
8188
  const accepted = isFileAccepted(file, accept);
8125
8189
  return {
8126
8190
  file,
8127
- errors: accepted ? [] : [getInvalidFileTypeErrorMessage()]
8191
+ errors: accepted ? [] : [t(texts14.invalidFileType)]
8128
8192
  };
8129
8193
  });
8130
8194
  dispatch({
@@ -8136,7 +8200,12 @@ var useFileUploader = (props) => {
8136
8200
  useEffect23(() => {
8137
8201
  dispatch({
8138
8202
  type: "setRootErrors",
8139
- payload: calcRootErrors(stateFiles, maxFiles, errorMessage)
8203
+ payload: calcRootErrors(
8204
+ t(texts14.invalidFileAmount),
8205
+ stateFiles,
8206
+ maxFiles,
8207
+ errorMessage
8208
+ )
8140
8209
  });
8141
8210
  }, [dispatch, stateFiles, maxFiles, errorMessage]);
8142
8211
  const onRootFocus = useCallback6(
@@ -8186,7 +8255,7 @@ var useFileUploader = (props) => {
8186
8255
  const accepted = isFileAccepted(file, accept);
8187
8256
  return {
8188
8257
  file,
8189
- errors: accepted ? [] : [getInvalidFileTypeErrorMessage()]
8258
+ errors: accepted ? [] : [t(texts14.invalidFileType)]
8190
8259
  };
8191
8260
  }).concat(stateFiles);
8192
8261
  onChange(newFiles.map((f) => f.file));
@@ -8258,10 +8327,13 @@ var useFileUploader = (props) => {
8258
8327
  const getInputProps = useCallback6(
8259
8328
  () => ({
8260
8329
  type: "file",
8261
- style: { display: "none" },
8262
- tabIndex: -1,
8330
+ tabIndex: readOnly ? void 0 : -1,
8263
8331
  ref: inputRef,
8264
- onChange: setFiles,
8332
+ disabled,
8333
+ "aria-hidden": readOnly ? void 0 : true,
8334
+ onChange: readOnlyChangeHandler(readOnly, setFiles),
8335
+ onKeyDown: readOnlyKeyDownHandler("file", readOnly, onKeyDown),
8336
+ readOnly,
8265
8337
  multiple: !maxFiles || maxFiles > 1,
8266
8338
  ...accept ? { accept: accept.join(",") } : {}
8267
8339
  }),
@@ -8275,6 +8347,20 @@ var useFileUploader = (props) => {
8275
8347
  removeFile
8276
8348
  };
8277
8349
  };
8350
+ var texts14 = createTexts({
8351
+ invalidFileType: {
8352
+ nb: "Ugyldig filtype",
8353
+ no: "Ugyldig filtype",
8354
+ nn: "Ugyldig filtype",
8355
+ en: "Invalid file type"
8356
+ },
8357
+ invalidFileAmount: {
8358
+ nb: "For mange filer. Maksimalt antall er ",
8359
+ no: "For mange filer. Maksimalt antall er ",
8360
+ nn: "For mange filer. Maksimalt antall er ",
8361
+ en: "Too many files. The maximum allowed is "
8362
+ }
8363
+ });
8278
8364
 
8279
8365
  // src/components/FileUploader/FileUploader.tsx
8280
8366
  import { jsx as jsx260, jsxs as jsxs59 } from "react/jsx-runtime";
@@ -8292,7 +8378,9 @@ var FileUploader = (props) => {
8292
8378
  accept,
8293
8379
  maxFiles,
8294
8380
  disabled,
8381
+ readOnly,
8295
8382
  onChange,
8383
+ onKeyDown,
8296
8384
  width = "var(--dds-input-default-width)",
8297
8385
  errorMessage,
8298
8386
  hideFileList,
@@ -8300,7 +8388,7 @@ var FileUploader = (props) => {
8300
8388
  ...rest
8301
8389
  } = props;
8302
8390
  const { t } = useTranslation();
8303
- const tDropAreaLabel = dropAreaLabel != null ? dropAreaLabel : t(texts14.dragAndDropOr);
8391
+ const tDropAreaLabel = dropAreaLabel != null ? dropAreaLabel : t(texts15.dragAndDropOr);
8304
8392
  const generatedId = useId14();
8305
8393
  const uniqueId = id != null ? id : `${generatedId}-fileUploader`;
8306
8394
  const {
@@ -8316,16 +8404,21 @@ var FileUploader = (props) => {
8316
8404
  onChange,
8317
8405
  accept,
8318
8406
  disabled,
8407
+ readOnly,
8319
8408
  maxFiles,
8320
- errorMessage
8409
+ errorMessage,
8410
+ onKeyDown
8321
8411
  });
8322
8412
  const hasLabel = label !== void 0;
8323
8413
  const hasTip = tip !== void 0;
8324
8414
  const hasRootErrors = rootErrors.length > 0;
8415
+ const inactive = disabled || readOnly;
8325
8416
  const labelId = derivativeIdGenerator(uniqueId, "label");
8326
8417
  const tipId = derivativeIdGenerator(uniqueId, "tip");
8327
8418
  const buttonId = derivativeIdGenerator(uniqueId, "button");
8328
8419
  const inputId = derivativeIdGenerator(uniqueId, "input");
8420
+ const fileListId = derivativeIdGenerator(uniqueId, "file-list");
8421
+ const fileListNameId = derivativeIdGenerator(uniqueId, "file-list-name");
8329
8422
  const fileListElements = stateFiles.map((stateFile, index) => /* @__PURE__ */ jsx260(
8330
8423
  File,
8331
8424
  {
@@ -8333,7 +8426,9 @@ var FileUploader = (props) => {
8333
8426
  index,
8334
8427
  file: stateFile,
8335
8428
  isValid: stateFile.errors.length === 0,
8336
- removeFile: () => removeFile(stateFile)
8429
+ removeFile: () => removeFile(stateFile),
8430
+ disabled,
8431
+ readOnly
8337
8432
  },
8338
8433
  stateFile.file.name
8339
8434
  ));
@@ -8361,6 +8456,16 @@ var FileUploader = (props) => {
8361
8456
  children: btnLabel
8362
8457
  }
8363
8458
  );
8459
+ const input = /* @__PURE__ */ jsx260(
8460
+ HiddenInput,
8461
+ {
8462
+ ...getInputProps(),
8463
+ className: cn(readOnly && focus_default["focusable-sibling"]),
8464
+ id: inputId,
8465
+ "data-testid": "file-uploader-input",
8466
+ "aria-describedby": fileListId
8467
+ }
8468
+ );
8364
8469
  return /* @__PURE__ */ jsxs59(
8365
8470
  Box,
8366
8471
  {
@@ -8373,10 +8478,11 @@ var FileUploader = (props) => {
8373
8478
  label,
8374
8479
  id: labelId,
8375
8480
  showRequiredStyling: required,
8376
- htmlFor: inputId
8481
+ htmlFor: inputId,
8482
+ readOnly
8377
8483
  }),
8378
8484
  hasTip && /* @__PURE__ */ jsx260(InputMessage, { id: tipId, message: tip, messageType: "tip" }),
8379
- withDragAndDrop ? /* @__PURE__ */ jsxs59(
8485
+ inactive ? input : withDragAndDrop ? /* @__PURE__ */ jsxs59(
8380
8486
  VStack,
8381
8487
  {
8382
8488
  gap: "x1",
@@ -8388,31 +8494,45 @@ var FileUploader = (props) => {
8388
8494
  isDragActive && FileUploader_default["input-container--drag-active"]
8389
8495
  ),
8390
8496
  children: [
8391
- /* @__PURE__ */ jsx260(
8392
- "input",
8393
- {
8394
- ...getInputProps(),
8395
- id: inputId,
8396
- "data-testid": "file-uploader-input"
8397
- }
8398
- ),
8497
+ input,
8399
8498
  tDropAreaLabel,
8400
- /* @__PURE__ */ jsx260(VisuallyHidden, { children: t(texts14.uploadFileWithButton) }),
8499
+ /* @__PURE__ */ jsx260(VisuallyHidden, { children: t(texts15.uploadFileWithButton) }),
8401
8500
  button
8402
8501
  ]
8403
8502
  }
8404
- ) : /* @__PURE__ */ jsxs59("div", { className: FileUploader_default["input-container--no-drag-zone"], children: [
8405
- /* @__PURE__ */ jsx260("input", { ...getInputProps(), id: inputId }),
8503
+ ) : /* @__PURE__ */ jsxs59(Box, { padding: "x 0", children: [
8504
+ input,
8406
8505
  button
8407
8506
  ] }),
8408
8507
  /* @__PURE__ */ jsx260(ErrorList, { errors: rootErrorsList }),
8409
- !hideFileList && /* @__PURE__ */ jsx260(StylelessList, { children: fileListElements })
8508
+ !hideFileList && /* @__PURE__ */ jsxs59(
8509
+ "div",
8510
+ {
8511
+ id: fileListId,
8512
+ className: cn(
8513
+ readOnly && focus_default["focus-styled-sibling"],
8514
+ readOnly && FileUploader_default["readonly--file-list"]
8515
+ ),
8516
+ children: [
8517
+ /* @__PURE__ */ jsx260(VisuallyHidden, { id: fileListNameId, children: t(texts15.uploadedFiles) }),
8518
+ inactive && fileListElements.length === 0 ? /* @__PURE__ */ jsx260(
8519
+ Typography,
8520
+ {
8521
+ italic: true,
8522
+ as: "span",
8523
+ color: disabled ? "text-subtle" : "text-medium",
8524
+ children: t(texts15.noFiles)
8525
+ }
8526
+ ) : /* @__PURE__ */ jsx260(StylelessList, { "aria-labelledby": fileListNameId, children: fileListElements })
8527
+ ]
8528
+ }
8529
+ )
8410
8530
  ]
8411
8531
  }
8412
8532
  );
8413
8533
  };
8414
8534
  FileUploader.displayName = "FileUploader";
8415
- var texts14 = createTexts({
8535
+ var texts15 = createTexts({
8416
8536
  dragAndDropOr: {
8417
8537
  nb: "Dra og slipp filer her eller",
8418
8538
  no: "Dra og slipp filer her eller",
@@ -8424,6 +8544,18 @@ var texts14 = createTexts({
8424
8544
  no: "last opp en fil med den p\xE5f\xF8lgende knappen",
8425
8545
  nn: "last opp ei fil med den p\xE5f\xF8lgjande knappen",
8426
8546
  en: "upload using the following button"
8547
+ },
8548
+ noFiles: {
8549
+ nb: "Ingen filer.",
8550
+ no: "Ingen filer.",
8551
+ nn: "Ingen filer.",
8552
+ en: "No files."
8553
+ },
8554
+ uploadedFiles: {
8555
+ nb: "Opplastede filer",
8556
+ no: "Opplastede filer",
8557
+ nn: "Opplasta filer",
8558
+ en: "Uploaded files"
8427
8559
  }
8428
8560
  });
8429
8561
 
@@ -8694,11 +8826,11 @@ import { jsxs as jsxs61 } from "react/jsx-runtime";
8694
8826
  var inlineEditVisuallyHidden = (id, clearable) => {
8695
8827
  const { t } = useTranslation();
8696
8828
  return /* @__PURE__ */ jsxs61(VisuallyHidden, { id, children: [
8697
- t(texts15.inlineEditInfo),
8698
- !clearable && t(texts15.notClearable)
8829
+ t(texts16.inlineEditInfo),
8830
+ !clearable && t(texts16.notClearable)
8699
8831
  ] });
8700
8832
  };
8701
- var texts15 = createTexts({
8833
+ var texts16 = createTexts({
8702
8834
  inlineEditInfo: {
8703
8835
  nb: "Escape, Enter eller Tab for \xE5 lagre.",
8704
8836
  no: "Escape, Enter eller Tab for \xE5 lagre.",
@@ -8759,7 +8891,7 @@ function createClearChangeEvent(elementId) {
8759
8891
  }
8760
8892
 
8761
8893
  // src/components/InlineEdit/InlineField.tsx
8762
- import { Fragment as Fragment6, jsx as jsx272, jsxs as jsxs62 } from "react/jsx-runtime";
8894
+ import { Fragment as Fragment7, jsx as jsx272, jsxs as jsxs62 } from "react/jsx-runtime";
8763
8895
  function InlineField(props) {
8764
8896
  const {
8765
8897
  elementType,
@@ -8840,7 +8972,7 @@ function InlineField(props) {
8840
8972
  }
8841
8973
  );
8842
8974
  case "select":
8843
- return /* @__PURE__ */ jsxs62(Fragment6, { children: [
8975
+ return /* @__PURE__ */ jsxs62(Fragment7, { children: [
8844
8976
  /* @__PURE__ */ jsx272(
8845
8977
  "select",
8846
8978
  {
@@ -9027,7 +9159,7 @@ var InternalHeader = (props) => {
9027
9159
  const hasContextMenuElements = !!contextMenuItems && contextMenuItems.length > 0;
9028
9160
  const hasSmallScreenBreakpoint = !!smallScreenBreakpoint;
9029
9161
  const hasNavInContextMenu = hasSmallScreenBreakpoint && hasNavigationElements;
9030
- const navigation = hasNavigationElements ? /* @__PURE__ */ jsx277("nav", { "aria-label": t(texts16.siteNavigation), children: /* @__PURE__ */ jsx277(
9162
+ const navigation = hasNavigationElements ? /* @__PURE__ */ jsx277("nav", { "aria-label": t(texts17.siteNavigation), children: /* @__PURE__ */ jsx277(
9031
9163
  ShowHide,
9032
9164
  {
9033
9165
  as: StylelessList,
@@ -9091,7 +9223,7 @@ var InternalHeader = (props) => {
9091
9223
  {
9092
9224
  icon: hasNavInContextMenu ? MenuIcon : MoreVerticalIcon,
9093
9225
  purpose: "tertiary",
9094
- "aria-label": t(texts16.openMenu)
9226
+ "aria-label": t(texts17.openMenu)
9095
9227
  }
9096
9228
  ),
9097
9229
  /* @__PURE__ */ jsxs63(OverflowMenu, { className: InternalHeader_default["context-menu"], children: [
@@ -9100,7 +9232,7 @@ var InternalHeader = (props) => {
9100
9232
  ShowHide,
9101
9233
  {
9102
9234
  as: "nav",
9103
- "aria-label": t(texts16.siteNavigation),
9235
+ "aria-label": t(texts17.siteNavigation),
9104
9236
  showBelow: smallScreenBreakpoint,
9105
9237
  children: /* @__PURE__ */ jsx277(OverflowMenuList, { children: navItems.map((item, i) => /* @__PURE__ */ createElement2(OverflowMenuLink, { ...item, key: `nav-${i}` })) })
9106
9238
  }
@@ -9136,7 +9268,7 @@ var InternalHeader = (props) => {
9136
9268
  );
9137
9269
  };
9138
9270
  InternalHeader.displayName = "InternalHeader";
9139
- var texts16 = createTexts({
9271
+ var texts17 = createTexts({
9140
9272
  openMenu: {
9141
9273
  nb: "\xC5pne meny",
9142
9274
  no: "\xC5pne meny",
@@ -9214,7 +9346,7 @@ var LocalMessage_default = {
9214
9346
  };
9215
9347
 
9216
9348
  // src/components/LocalMessage/LocalMessage.tsx
9217
- import { Fragment as Fragment7, jsx as jsx280, jsxs as jsxs64 } from "react/jsx-runtime";
9349
+ import { Fragment as Fragment8, jsx as jsx280, jsxs as jsxs64 } from "react/jsx-runtime";
9218
9350
  var icons2 = {
9219
9351
  info: InfoIcon,
9220
9352
  danger: ErrorIcon,
@@ -9238,7 +9370,7 @@ var LocalMessage = ({
9238
9370
  const { t } = useTranslation();
9239
9371
  const [isClosed, setClosed] = useState20(false);
9240
9372
  if (isClosed) {
9241
- return /* @__PURE__ */ jsx280(Fragment7, {});
9373
+ return /* @__PURE__ */ jsx280(Fragment8, {});
9242
9374
  }
9243
9375
  return /* @__PURE__ */ jsxs64(
9244
9376
  Box,
@@ -10301,7 +10433,7 @@ var Pagination = ({
10301
10433
  onClick: (event) => {
10302
10434
  onPageChange(event, item);
10303
10435
  },
10304
- "aria-label": isActive ? t(texts17.currentPage(item)) : t(texts17.page(item)),
10436
+ "aria-label": isActive ? t(texts18.currentPage(item)) : t(texts18.page(item)),
10305
10437
  children: item
10306
10438
  }
10307
10439
  ) : /* @__PURE__ */ jsx287(
@@ -10321,7 +10453,7 @@ var Pagination = ({
10321
10453
  onClick: (event) => {
10322
10454
  onPageChange(event, activePage - 1);
10323
10455
  },
10324
- "aria-label": t(texts17.previousPage)
10456
+ "aria-label": t(texts18.previousPage)
10325
10457
  }
10326
10458
  );
10327
10459
  const nextPageButton = /* @__PURE__ */ jsx287(
@@ -10333,7 +10465,7 @@ var Pagination = ({
10333
10465
  onClick: (event) => {
10334
10466
  onPageChange(event, activePage + 1);
10335
10467
  },
10336
- "aria-label": t(texts17.nextPage)
10468
+ "aria-label": t(texts18.nextPage)
10337
10469
  }
10338
10470
  );
10339
10471
  const isOnFirstPage = activePage === 1;
@@ -10343,7 +10475,7 @@ var Pagination = ({
10343
10475
  {
10344
10476
  as: "nav",
10345
10477
  ref,
10346
- "aria-label": t(texts17.pagination),
10478
+ "aria-label": t(texts18.pagination),
10347
10479
  display: "flex",
10348
10480
  alignItems: "center",
10349
10481
  ...!withSelect && !withCounter && {
@@ -10407,7 +10539,7 @@ var Pagination = ({
10407
10539
  onClick: (event) => {
10408
10540
  onPageChange(event, 1);
10409
10541
  },
10410
- "aria-label": t(texts17.firstPage)
10542
+ "aria-label": t(texts18.firstPage)
10411
10543
  }
10412
10544
  )
10413
10545
  }
@@ -10461,7 +10593,7 @@ var Pagination = ({
10461
10593
  onClick: (event) => {
10462
10594
  onPageChange(event, pagesLength);
10463
10595
  },
10464
- "aria-label": t(texts17.lastPage)
10596
+ "aria-label": t(texts18.lastPage)
10465
10597
  }
10466
10598
  )
10467
10599
  }
@@ -10499,11 +10631,11 @@ var Pagination = ({
10499
10631
  isClearable: false,
10500
10632
  onChange: handleSelectChange,
10501
10633
  componentSize: "small",
10502
- "aria-label": t(texts17.itemsPerPage)
10634
+ "aria-label": t(texts18.itemsPerPage)
10503
10635
  }
10504
10636
  ),
10505
10637
  withCounter && /* @__PURE__ */ jsx287(Paragraph, { children: t(
10506
- texts17.showsAmountOfTotalItems(
10638
+ texts18.showsAmountOfTotalItems(
10507
10639
  activePageFirstItem,
10508
10640
  activePageLastItem,
10509
10641
  itemsAmount
@@ -10516,7 +10648,7 @@ var Pagination = ({
10516
10648
  );
10517
10649
  };
10518
10650
  Pagination.displayName = "Pagination";
10519
- var texts17 = createTexts({
10651
+ var texts18 = createTexts({
10520
10652
  pagination: {
10521
10653
  nb: "Paginering",
10522
10654
  no: "Paginering",
@@ -10660,12 +10792,12 @@ var COUNTRIES = {
10660
10792
  CO: { name: "Colombia", id: "CO", dialCode: "+57" },
10661
10793
  KM: { name: "Komorene (\u202B\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631\u202C\u200E)", id: "KM", dialCode: "+269" },
10662
10794
  CD: {
10663
- name: "Kongo (DR) (Jamhuri ya Kisoemokrasia ya Kongo)",
10795
+ name: "Kongo, den demokratiske republikken (R\xE9publique d\xE9mocratique du Congo)",
10664
10796
  id: "CD",
10665
10797
  dialCode: "+243"
10666
10798
  },
10667
10799
  CG: {
10668
- name: "Kongo (Republikken) (Congo-Brazzaville)",
10800
+ name: "Kongo, republikken (R\xE9publique du Congo)",
10669
10801
  id: "CG",
10670
10802
  dialCode: "+242"
10671
10803
  },
@@ -10743,7 +10875,7 @@ var COUNTRIES = {
10743
10875
  IR: { name: "Iran (\u202B\u0627\u06CC\u0631\u0627\u0646\u202C\u200E)", id: "IR", dialCode: "+98" },
10744
10876
  IQ: { name: "Irak (\u202B\u0627\u0644\u0639\u0631\u0627\u0642\u202C\u200E)", id: "IQ", dialCode: "+964" },
10745
10877
  IE: { name: "Irland (\xC9ire)", id: "IE", dialCode: "+353" },
10746
- IM: { name: "Isle of Man", id: "IM", dialCode: "+44" },
10878
+ IM: { name: "Man (Isle of Man)", id: "IM", dialCode: "+44" },
10747
10879
  IL: { name: "Israel (\u202B\u05D9\u05E9\u05E8\u05D0\u05DC\u202C\u200E)", id: "IL", dialCode: "+972" },
10748
10880
  IT: { name: "Italia", id: "IT", dialCode: "+39" },
10749
10881
  JM: { name: "Jamaica", id: "JM", dialCode: "+1" },
@@ -10767,7 +10899,7 @@ var COUNTRIES = {
10767
10899
  LU: { name: "Luxembourg", id: "LU", dialCode: "+352" },
10768
10900
  MO: { name: "Macao (\u6FB3\u9580)", id: "MO", dialCode: "+853" },
10769
10901
  MK: {
10770
- name: "Nord-Makedonia (FYROM) (\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430)",
10902
+ name: "Nord-Makedonia (\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430)",
10771
10903
  id: "MK",
10772
10904
  dialCode: "+389"
10773
10905
  },
@@ -10856,7 +10988,7 @@ var COUNTRIES = {
10856
10988
  },
10857
10989
  LC: { name: "Saint Lucia", id: "LC", dialCode: "+1758" },
10858
10990
  MF: {
10859
- name: "Saint Martin (Saint-Martin (partie fran\xE7aise))",
10991
+ name: "Saint-Martin (Collectivit\xE9 de Saint-Martin)",
10860
10992
  id: "MF",
10861
10993
  dialCode: "+590"
10862
10994
  },
@@ -11039,8 +11171,8 @@ var PhoneInput = ({
11039
11171
  }) => {
11040
11172
  var _a;
11041
11173
  const { t } = useTranslation();
11042
- const tGroupLabel = groupLabel != null ? groupLabel : t(texts18.countryCodeAndPhoneNumber);
11043
- const tSelectLabel = selectLabel != null ? selectLabel : t(texts18.countryCode);
11174
+ const tGroupLabel = groupLabel != null ? groupLabel : t(texts19.countryCodeAndPhoneNumber);
11175
+ const tSelectLabel = selectLabel != null ? selectLabel : t(texts19.countryCode);
11044
11176
  const generatedId = useId19();
11045
11177
  const uniqueId = (_a = props.id) != null ? _a : generatedId;
11046
11178
  const phoneInputId = `${uniqueId}-phone-input`;
@@ -11213,7 +11345,7 @@ var getCallingCode = (s) => {
11213
11345
  var _a;
11214
11346
  return (_a = s.substring(s.indexOf("+"), s.length)) != null ? _a : "";
11215
11347
  };
11216
- var texts18 = createTexts({
11348
+ var texts19 = createTexts({
11217
11349
  countryCode: {
11218
11350
  nb: "Landskode",
11219
11351
  no: "Landskode",
@@ -11526,7 +11658,7 @@ var ProgressTracker_default = {
11526
11658
 
11527
11659
  // src/components/ProgressTracker/ProgressTrackerItem.tsx
11528
11660
  import { useMemo as useMemo2 } from "react";
11529
- import { Fragment as Fragment8, jsx as jsx291, jsxs as jsxs72 } from "react/jsx-runtime";
11661
+ import { Fragment as Fragment9, jsx as jsx291, jsxs as jsxs72 } from "react/jsx-runtime";
11530
11662
  var toItemState = (active, completed, disabled) => {
11531
11663
  if (disabled) {
11532
11664
  return "disabled";
@@ -11558,6 +11690,7 @@ var ProgressTrackerItem = (props) => {
11558
11690
  ...rest
11559
11691
  } = props;
11560
11692
  const { t } = useTranslation();
11693
+ const stepNumber = index + 1;
11561
11694
  const { activeStep, handleStepChange, direction } = useProgressTrackerContext();
11562
11695
  const active = activeStep === index;
11563
11696
  const itemState = toItemState(active, completed, disabled);
@@ -11574,14 +11707,14 @@ var ProgressTrackerItem = (props) => {
11574
11707
  if (icon !== void 0) {
11575
11708
  return /* @__PURE__ */ jsx291(Icon, { icon, iconSize: "small" });
11576
11709
  }
11577
- return index + 1;
11710
+ return stepNumber;
11578
11711
  }, [completed, icon, index]);
11579
11712
  function getTextColor2() {
11580
11713
  if (disabled) return "text-subtle";
11581
11714
  if (active) return "text-action-resting";
11582
11715
  }
11583
11716
  const isInactiveLink = disabled || active;
11584
- const stepContent = /* @__PURE__ */ jsxs72(Fragment8, { children: [
11717
+ const stepContent = /* @__PURE__ */ jsxs72(Fragment9, { children: [
11585
11718
  /* @__PURE__ */ jsx291(
11586
11719
  Box,
11587
11720
  {
@@ -11597,7 +11730,7 @@ var ProgressTrackerItem = (props) => {
11597
11730
  children: stepNumberContent
11598
11731
  }
11599
11732
  ),
11600
- /* @__PURE__ */ jsxs72(
11733
+ /* @__PURE__ */ jsx291(
11601
11734
  Typography,
11602
11735
  {
11603
11736
  as: "div",
@@ -11607,14 +11740,11 @@ var ProgressTrackerItem = (props) => {
11607
11740
  isInactiveLink && ProgressTracker_default["item-text--inactive-link"]
11608
11741
  ),
11609
11742
  color: getTextColor2(),
11610
- children: [
11611
- /* @__PURE__ */ jsx291(VisuallyHidden, { children: t(texts19.stepTextBefore(index + 1)) }),
11612
- children,
11613
- /* @__PURE__ */ jsx291(VisuallyHidden, { children: completed ? t(texts19.completed) : t(texts19.uncompleted) })
11614
- ]
11743
+ children
11615
11744
  }
11616
11745
  )
11617
11746
  ] });
11747
+ const ariaLabel = props["aria-label"] ? props["aria-label"] : `${children}, ${stepNumber}. ${completed ? t(texts20.completed) : t(texts20.uncompleted)}`;
11618
11748
  return /* @__PURE__ */ jsx291(
11619
11749
  Box,
11620
11750
  {
@@ -11641,6 +11771,7 @@ var ProgressTrackerItem = (props) => {
11641
11771
  htmlProps,
11642
11772
  rest
11643
11773
  ),
11774
+ "aria-label": ariaLabel,
11644
11775
  onClick: () => handleClick(),
11645
11776
  disabled,
11646
11777
  children: stepContent
@@ -11654,6 +11785,7 @@ var ProgressTrackerItem = (props) => {
11654
11785
  htmlProps,
11655
11786
  rest
11656
11787
  ),
11788
+ "aria-label": ariaLabel,
11657
11789
  children: stepContent
11658
11790
  }
11659
11791
  )
@@ -11661,24 +11793,18 @@ var ProgressTrackerItem = (props) => {
11661
11793
  );
11662
11794
  };
11663
11795
  ProgressTrackerItem.displayName = "ProgressTracker.Item";
11664
- var texts19 = createTexts({
11665
- stepTextBefore: (index) => ({
11666
- nb: `${index}. trinn, `,
11667
- no: `${index}. trinn, `,
11668
- nn: `${index}. trinn, `,
11669
- en: `${index}. step, `
11670
- }),
11796
+ var texts20 = createTexts({
11671
11797
  uncompleted: {
11672
- nb: ", ikke ferdig",
11673
- no: ", ikke ferdig",
11674
- nn: ", ikkje ferdig",
11675
- en: "uncompleted"
11798
+ nb: "trinn ikke ferdig",
11799
+ no: "trinn ikke ferdig",
11800
+ nn: "trinn ikkje ferdig",
11801
+ en: "step uncompleted"
11676
11802
  },
11677
11803
  completed: {
11678
- nb: ", ferdig",
11679
- no: ", ferdig",
11680
- nn: ", ferdig",
11681
- en: ", completed"
11804
+ nb: "trinn ferdig",
11805
+ no: "trinn ferdig",
11806
+ nn: "trinn ferdig",
11807
+ en: "step completed"
11682
11808
  }
11683
11809
  });
11684
11810
 
@@ -11724,7 +11850,7 @@ var ProgressTracker = (() => {
11724
11850
  children: /* @__PURE__ */ jsx292(
11725
11851
  "nav",
11726
11852
  {
11727
- "aria-label": ariaLabel != null ? ariaLabel : t(texts20.stepProgression),
11853
+ "aria-label": ariaLabel != null ? ariaLabel : t(texts21.stepProgression),
11728
11854
  ...getBaseHTMLProps(id, className, htmlProps, rest),
11729
11855
  children: /* @__PURE__ */ jsx292(
11730
11856
  Box,
@@ -11762,7 +11888,7 @@ function passIndexPropToProgressTrackerItem(children) {
11762
11888
  })
11763
11889
  );
11764
11890
  }
11765
- var texts20 = createTexts({
11891
+ var texts21 = createTexts({
11766
11892
  stepProgression: {
11767
11893
  nb: "Stegprogresjon",
11768
11894
  no: "Stegprogresjon",
@@ -11983,7 +12109,7 @@ var SearchSuggestions = ({
11983
12109
  {
11984
12110
  index,
11985
12111
  focus: focus === index && showSuggestions,
11986
- "aria-label": t(texts21.search(suggestion)),
12112
+ "aria-label": t(texts22.search(suggestion)),
11987
12113
  onClick: onSuggestionClick,
11988
12114
  "aria-setsize": suggestionsToRender.length,
11989
12115
  "aria-posinset": index,
@@ -11997,7 +12123,7 @@ var SearchSuggestions = ({
11997
12123
  );
11998
12124
  };
11999
12125
  SearchSuggestions.displayName = "SearchSuggestions";
12000
- var texts21 = createTexts({
12126
+ var texts22 = createTexts({
12001
12127
  search: (suggestion) => ({
12002
12128
  no: `${suggestion} s\xF8k`,
12003
12129
  nb: `${suggestion} s\xF8k`,
@@ -12007,7 +12133,7 @@ var texts21 = createTexts({
12007
12133
  });
12008
12134
 
12009
12135
  // src/components/Search/Search.tsx
12010
- import { Fragment as Fragment9, jsx as jsx296, jsxs as jsxs75 } from "react/jsx-runtime";
12136
+ import { Fragment as Fragment10, jsx as jsx296, jsxs as jsxs75 } from "react/jsx-runtime";
12011
12137
  var getIconSize2 = (size2) => {
12012
12138
  switch (size2) {
12013
12139
  case "large":
@@ -12130,7 +12256,7 @@ var Search = ({
12130
12256
  )
12131
12257
  }
12132
12258
  ),
12133
- hasSuggestions && /* @__PURE__ */ jsxs75(Fragment9, { children: [
12259
+ hasSuggestions && /* @__PURE__ */ jsxs75(Fragment10, { children: [
12134
12260
  /* @__PURE__ */ jsx296(
12135
12261
  SearchSuggestions,
12136
12262
  {
@@ -12143,13 +12269,13 @@ var Search = ({
12143
12269
  componentSize
12144
12270
  }
12145
12271
  ),
12146
- /* @__PURE__ */ jsx296(VisuallyHidden, { id: suggestionsDescriptionId, children: t(texts22.useArrowKeys) })
12272
+ /* @__PURE__ */ jsx296(VisuallyHidden, { id: suggestionsDescriptionId, children: t(texts23.useArrowKeys) })
12147
12273
  ] }),
12148
12274
  hasValue && /* @__PURE__ */ jsx296(
12149
12275
  ClearButton,
12150
12276
  {
12151
12277
  size: getIconSize2(componentSize),
12152
- "aria-label": t(texts22.clearSearch),
12278
+ "aria-label": t(texts23.clearSearch),
12153
12279
  onClick: clearInput,
12154
12280
  className: Search_default["clear-button"]
12155
12281
  }
@@ -12178,7 +12304,7 @@ var Search = ({
12178
12304
  size: componentSize,
12179
12305
  onClick,
12180
12306
  ...otherButtonProps,
12181
- children: buttonLabel != null ? buttonLabel : t(texts22.search)
12307
+ children: buttonLabel != null ? buttonLabel : t(texts23.search)
12182
12308
  }
12183
12309
  )
12184
12310
  ]
@@ -12189,7 +12315,7 @@ var Search = ({
12189
12315
  ] });
12190
12316
  };
12191
12317
  Search.displayName = "Search";
12192
- var texts22 = createTexts({
12318
+ var texts23 = createTexts({
12193
12319
  clearSearch: {
12194
12320
  nb: "T\xF8m s\xF8k",
12195
12321
  no: "T\xF8m s\xF8k",
@@ -12402,7 +12528,7 @@ var SplitButton = ({
12402
12528
  {
12403
12529
  ...buttonStyleProps,
12404
12530
  icon: isOpen ? ChevronUpIcon : ChevronDownIcon,
12405
- "aria-label": t(texts23.moreActions),
12531
+ "aria-label": t(texts24.moreActions),
12406
12532
  purpose,
12407
12533
  className: cn(
12408
12534
  SplitButton_default.option,
@@ -12416,7 +12542,7 @@ var SplitButton = ({
12416
12542
  ] });
12417
12543
  };
12418
12544
  SplitButton.displayName = "SplitButton";
12419
- var texts23 = createTexts({
12545
+ var texts24 = createTexts({
12420
12546
  moreActions: {
12421
12547
  nb: "Flere handlinger",
12422
12548
  no: "Flere handlinger",
@@ -12428,7 +12554,7 @@ var texts23 = createTexts({
12428
12554
  // src/components/Table/collapsible/CollapsibleRow.tsx
12429
12555
  import {
12430
12556
  Children as Children4,
12431
- Fragment as Fragment10,
12557
+ Fragment as Fragment11,
12432
12558
  cloneElement as cloneElement6,
12433
12559
  isValidElement as isValidElement6,
12434
12560
  useEffect as useEffect32,
@@ -12581,7 +12707,7 @@ var SortCell = ({
12581
12707
  StylelessButton,
12582
12708
  {
12583
12709
  onClick,
12584
- "aria-description": t(texts24.changeSort),
12710
+ "aria-description": t(texts25.changeSort),
12585
12711
  className: cn(Table_default["sort-button"], focusable),
12586
12712
  children: [
12587
12713
  children,
@@ -12594,7 +12720,7 @@ var SortCell = ({
12594
12720
  );
12595
12721
  };
12596
12722
  SortCell.displayName = "Table.SortCell";
12597
- var texts24 = createTexts({
12723
+ var texts25 = createTexts({
12598
12724
  changeSort: {
12599
12725
  nb: "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
12600
12726
  no: "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
@@ -12688,7 +12814,7 @@ Table2.Row = Row;
12688
12814
  Table2.Foot = Foot;
12689
12815
 
12690
12816
  // src/components/Table/collapsible/CollapsibleRow.tsx
12691
- import { Fragment as Fragment11, jsx as jsx309, jsxs as jsxs78 } from "react/jsx-runtime";
12817
+ import { Fragment as Fragment12, jsx as jsx309, jsxs as jsxs78 } from "react/jsx-runtime";
12692
12818
  var CollapsibleRow = ({
12693
12819
  type: _type,
12694
12820
  className,
@@ -12731,7 +12857,7 @@ var CollapsibleRow = ({
12731
12857
  const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
12732
12858
  const id = derivativeIdGenerator(prefix2, index.toString());
12733
12859
  collapsibleIds.push(id);
12734
- return /* @__PURE__ */ jsxs78(Fragment10, { children: [
12860
+ return /* @__PURE__ */ jsxs78(Fragment11, { children: [
12735
12861
  /* @__PURE__ */ jsx309(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
12736
12862
  isValidElement6(child) && cloneElement6(child, {
12737
12863
  collapsibleProps: { isCollapsibleChild: true }
@@ -12744,11 +12870,11 @@ var CollapsibleRow = ({
12744
12870
  });
12745
12871
  const headerRow = () => {
12746
12872
  if (type !== "head" || !isCollapsed) return null;
12747
- return /* @__PURE__ */ jsx309(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs78(Fragment11, { children: [
12873
+ return /* @__PURE__ */ jsx309(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs78(Fragment12, { children: [
12748
12874
  definingColumnCells,
12749
12875
  /* @__PURE__ */ jsxs78(Table2.Cell, { type: "head", layout: "center", children: [
12750
- t(texts25.expand),
12751
- /* @__PURE__ */ jsx309(VisuallyHidden, { children: t(texts25.row) })
12876
+ t(texts26.expand),
12877
+ /* @__PURE__ */ jsx309(VisuallyHidden, { children: t(texts26.row) })
12752
12878
  ] })
12753
12879
  ] }) });
12754
12880
  };
@@ -12776,16 +12902,16 @@ var CollapsibleRow = ({
12776
12902
  ) })
12777
12903
  ] });
12778
12904
  };
12779
- return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs78(Fragment11, { children: [
12905
+ return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs78(Fragment12, { children: [
12780
12906
  headerRow(),
12781
- type === "body" && /* @__PURE__ */ jsxs78(Fragment11, { children: [
12907
+ type === "body" && /* @__PURE__ */ jsxs78(Fragment12, { children: [
12782
12908
  rowWithChevron(),
12783
12909
  childrenCollapsed ? null : collapsedRows
12784
12910
  ] })
12785
12911
  ] }) : /* @__PURE__ */ jsx309(Row, { ref, ...rowProps(), children });
12786
12912
  };
12787
12913
  CollapsibleRow.displayName = "CollapsibleTable.Row";
12788
- var texts25 = createTexts({
12914
+ var texts26 = createTexts({
12789
12915
  expand: {
12790
12916
  nb: "Utvid",
12791
12917
  no: "Utvid",