@norges-domstoler/dds-components 21.13.0 → 21.15.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.js CHANGED
@@ -706,6 +706,7 @@ var BACKGROUNDS = [
706
706
  "surface-info-strong",
707
707
  "surface-paper-default",
708
708
  "surface-notification",
709
+ "surface-field-disabled",
709
710
  "brand-primary-default",
710
711
  "brand-primary-subtle",
711
712
  "brand-primary-medium",
@@ -773,6 +774,8 @@ var readOnlyKeyDownHandler = (type, readOnly, onKeyDown) => {
773
774
  evt.preventDefault();
774
775
  } else if (type === "selectionControl" && evt.key === " ") {
775
776
  evt.preventDefault();
777
+ } else if (type === "file" && (evt.key === " " || evt.key === "Enter")) {
778
+ evt.preventDefault();
776
779
  }
777
780
  } else onKeyDown == null ? void 0 : onKeyDown(evt);
778
781
  };
@@ -3263,8 +3266,8 @@ function useTranslation() {
3263
3266
  const t = (text) => text[lang];
3264
3267
  return { t, lang };
3265
3268
  }
3266
- function createTexts(texts26) {
3267
- return texts26;
3269
+ function createTexts(texts27) {
3270
+ return texts27;
3268
3271
  }
3269
3272
 
3270
3273
  // src/DdsProvider/DdsProvider.tsx
@@ -5986,7 +5989,12 @@ var DateInput_default = {
5986
5989
  };
5987
5990
 
5988
5991
  // src/components/date-inputs/DatePicker/constants.ts
5989
- var locale = "no-NO";
5992
+ var LOCALE = {
5993
+ nb: "nb-NO",
5994
+ no: "no-NO",
5995
+ nn: "nn-NO",
5996
+ en: "en-GB"
5997
+ };
5990
5998
  var timezone = "Europe/Oslo";
5991
5999
 
5992
6000
  // src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
@@ -6221,12 +6229,12 @@ var CalendarPopoverContent = ({
6221
6229
  var import_jsx_runtime226 = require("react/jsx-runtime");
6222
6230
  function CalendarGrid({ state, ...props }) {
6223
6231
  const { t } = useTranslation();
6224
- const { locale: locale2 } = (0, import_i18n8.useLocale)();
6232
+ const { locale } = (0, import_i18n8.useLocale)();
6225
6233
  const {
6226
6234
  gridProps: { onKeyDown, ...gridProps },
6227
6235
  headerProps
6228
6236
  } = (0, import_calendar2.useCalendarGrid)(props, state);
6229
- const weeksInMonth = (0, import_date3.getWeeksInMonth)(state.visibleRange.start, locale2);
6237
+ const weeksInMonth = (0, import_date3.getWeeksInMonth)(state.visibleRange.start, locale);
6230
6238
  const weekDays = [
6231
6239
  { short: t(texts5.mo), full: t(texts5.monday) },
6232
6240
  { short: t(texts5.tu), full: t(texts5.tuesday) },
@@ -6408,11 +6416,11 @@ function createCalendar(identifier) {
6408
6416
  }
6409
6417
  function Calendar(props) {
6410
6418
  const { t } = useTranslation();
6411
- const { locale: locale2 } = (0, import_i18n10.useLocale)();
6419
+ const { locale } = (0, import_i18n10.useLocale)();
6412
6420
  const state = (0, import_calendar4.useCalendarState)({
6413
6421
  ...props,
6414
6422
  createCalendar,
6415
- locale: locale2
6423
+ locale
6416
6424
  });
6417
6425
  const {
6418
6426
  calendarProps,
@@ -6552,6 +6560,39 @@ function CalendarButton({
6552
6560
  );
6553
6561
  }
6554
6562
 
6563
+ // src/components/date-inputs/DatePicker/DateField/DateField.utils.tsx
6564
+ function formatDateFieldSegments(segments) {
6565
+ const daySegment = segments.find((segment) => segment.type === "day");
6566
+ const monthSegment = segments.find((segment) => segment.type === "month");
6567
+ const yearSegment = segments.find((segment) => segment.type === "year");
6568
+ const separatorSegment = segments.find((segment) => segment.type === "literal");
6569
+ if (!daySegment || !monthSegment || !yearSegment || !separatorSegment) {
6570
+ throw new Error("Invalid date field segments");
6571
+ }
6572
+ const formattedDaySegment = {
6573
+ ...daySegment,
6574
+ text: daySegment.text.padStart(2, "0"),
6575
+ placeholder: "dd"
6576
+ };
6577
+ const formattedMonthSegment = {
6578
+ ...monthSegment,
6579
+ text: monthSegment.text.padStart(2, "0"),
6580
+ placeholder: "mm"
6581
+ };
6582
+ const formattedYearSegment = {
6583
+ ...yearSegment,
6584
+ placeholder: "\xE5\xE5\xE5\xE5"
6585
+ };
6586
+ const formattedSeparatorSegment = { ...separatorSegment, text: "." };
6587
+ return [
6588
+ formattedDaySegment,
6589
+ formattedSeparatorSegment,
6590
+ formattedMonthSegment,
6591
+ formattedSeparatorSegment,
6592
+ formattedYearSegment
6593
+ ];
6594
+ }
6595
+
6555
6596
  // src/components/date-inputs/DatePicker/DateField/DateSegment.tsx
6556
6597
  var import_datepicker = require("@react-aria/datepicker");
6557
6598
  var import_react43 = require("react");
@@ -6566,7 +6607,6 @@ function DateSegment({
6566
6607
  state,
6567
6608
  componentSize
6568
6609
  }) {
6569
- var _a;
6570
6610
  const ref = (0, import_react43.useRef)(null);
6571
6611
  const { segmentProps } = (0, import_datepicker.useDateSegment)(segment, state, ref);
6572
6612
  return /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(
@@ -6596,7 +6636,7 @@ function DateSegment({
6596
6636
  children: segment.placeholder
6597
6637
  }
6598
6638
  ),
6599
- segment.isPlaceholder ? "" : segment.text.padStart(String((_a = segment.maxValue) != null ? _a : "").length, "0")
6639
+ segment.isPlaceholder ? "" : segment.text
6600
6640
  ]
6601
6641
  }
6602
6642
  );
@@ -6801,11 +6841,11 @@ function DateField({
6801
6841
  clearable,
6802
6842
  ...props
6803
6843
  }) {
6804
- const { locale: locale2 } = (0, import_i18n12.useLocale)();
6844
+ const { locale } = (0, import_i18n12.useLocale)();
6805
6845
  const { t } = useTranslation();
6806
6846
  const state = (0, import_datepicker3.useDateFieldState)({
6807
6847
  ...props,
6808
- locale: locale2,
6848
+ locale,
6809
6849
  createCalendar: import_date5.createCalendar
6810
6850
  });
6811
6851
  const internalRef = (0, import_react45.useRef)(null);
@@ -6820,6 +6860,7 @@ function DateField({
6820
6860
  const clearDate = () => {
6821
6861
  state.setValue(null);
6822
6862
  };
6863
+ const formattedSegments = formatDateFieldSegments(state.segments);
6823
6864
  return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
6824
6865
  DateInput,
6825
6866
  {
@@ -6858,7 +6899,7 @@ function DateField({
6858
6899
  ),
6859
6900
  labelProps,
6860
6901
  fieldProps,
6861
- children: state.segments.map((segment, i) => /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
6902
+ children: formattedSegments.map((segment, i) => /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
6862
6903
  DateSegment,
6863
6904
  {
6864
6905
  "aria-readonly": props.isReadOnly,
@@ -6919,6 +6960,10 @@ function DatePicker({
6919
6960
  ref,
6920
6961
  ...props
6921
6962
  }) {
6963
+ const lang = useLanguage();
6964
+ if (!lang) {
6965
+ throw new Error("DatePicker must be used within a DdsProvider");
6966
+ }
6922
6967
  const state = (0, import_datepicker5.useDatePickerState)(props);
6923
6968
  const domRef = useFocusManagerRef(ref && refIsFocusable(ref) ? ref : null);
6924
6969
  const internalRef = (0, import_react47.useRef)(null);
@@ -6928,7 +6973,7 @@ function DatePicker({
6928
6973
  state,
6929
6974
  internalRef
6930
6975
  );
6931
- return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(import_i18n14.I18nProvider, { locale, children: /* @__PURE__ */ (0, import_jsx_runtime236.jsxs)(
6976
+ return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(import_i18n14.I18nProvider, { locale: LOCALE[lang], children: /* @__PURE__ */ (0, import_jsx_runtime236.jsxs)(
6932
6977
  CalendarPopover,
6933
6978
  {
6934
6979
  isOpen: state.isOpen,
@@ -6969,10 +7014,14 @@ function TimePicker({
6969
7014
  ref,
6970
7015
  ...props
6971
7016
  }) {
7017
+ const lang = useLanguage();
7018
+ if (!lang) {
7019
+ throw new Error("DatePicker must be used within a DdsProvider");
7020
+ }
6972
7021
  const internalRef = (0, import_react48.useRef)(null);
6973
7022
  const state = (0, import_datepicker7.useTimeFieldState)({
6974
7023
  ...props,
6975
- locale
7024
+ locale: LOCALE[lang]
6976
7025
  });
6977
7026
  const { labelProps, fieldProps } = (0, import_datepicker6.useTimeField)(
6978
7027
  { ...props, hideTimeZone: true, granularity: "hour" },
@@ -8214,22 +8263,31 @@ var FileUploader_default = {
8214
8263
  "input-container": "FileUploader_input-container",
8215
8264
  "input-container--with-errors": "FileUploader_input-container--with-errors",
8216
8265
  "input-container--drag-active": "FileUploader_input-container--drag-active",
8217
- "input-container--no-drag-zone": "FileUploader_input-container--no-drag-zone",
8218
8266
  "file--invalid": "FileUploader_file--invalid",
8219
8267
  "file__icon--invalid": "FileUploader_file__icon--invalid",
8220
8268
  "file__icon--valid": "FileUploader_file__icon--valid",
8221
- file__name: "FileUploader_file__name"
8269
+ file__name: "FileUploader_file__name",
8270
+ "readonly--file-list": "FileUploader_readonly--file-list"
8222
8271
  };
8223
8272
 
8224
8273
  // src/components/FileUploader/File.tsx
8225
8274
  var import_jsx_runtime259 = require("react/jsx-runtime");
8226
8275
  var File = (props) => {
8227
8276
  const { t } = useTranslation();
8228
- const { parentId, index, file: stateFile, removeFile, isValid } = props;
8277
+ const {
8278
+ parentId,
8279
+ index,
8280
+ file: stateFile,
8281
+ removeFile,
8282
+ isValid,
8283
+ disabled,
8284
+ readOnly
8285
+ } = props;
8229
8286
  const errorsList = stateFile.errors.map((e, errorIndex) => ({
8230
8287
  id: derivativeIdGenerator(parentId, `file-${index}-error-${errorIndex}`),
8231
8288
  message: e
8232
8289
  }));
8290
+ const inactive = disabled || readOnly;
8233
8291
  return /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)("li", { children: [
8234
8292
  /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(
8235
8293
  Paper,
@@ -8240,42 +8298,46 @@ var File = (props) => {
8240
8298
  gap: "x0.75",
8241
8299
  marginBlock: "x0.5 0",
8242
8300
  padding: "x0.5 x1",
8243
- border: isValid ? "border-default" : "border-danger",
8244
- background: "surface-subtle",
8301
+ border: disabled ? "border-subtle" : isValid ? "border-default" : "border-danger",
8302
+ background: inactive ? "surface-field-disabled" : "surface-subtle",
8245
8303
  className: cn(!isValid && FileUploader_default["file--invalid"]),
8246
8304
  children: [
8247
8305
  /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
8248
- "span",
8306
+ Typography,
8249
8307
  {
8250
- className: cn(FileUploader_default.file__name, typographyStyles_default["body-medium"]),
8308
+ as: "span",
8309
+ color: disabled ? "text-subtle" : readOnly ? "text-medium" : void 0,
8310
+ className: cn(FileUploader_default.file__name),
8251
8311
  children: stateFile.file.name
8252
8312
  }
8253
8313
  ),
8254
- /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
8255
- Icon,
8256
- {
8257
- icon: isValid ? CheckCircledIcon : ErrorIcon,
8258
- className: FileUploader_default[`file__icon--${isValid ? "valid" : "invalid"}`]
8259
- }
8260
- ),
8261
- /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
8262
- Button,
8263
- {
8264
- size: "small",
8265
- purpose: "tertiary",
8266
- type: "button",
8267
- onClick: removeFile,
8268
- icon: CloseIcon,
8269
- htmlProps: {
8270
- "aria-label": t(texts13.removeFile(stateFile.file.name)),
8271
- "aria-invalid": !isValid ? true : void 0,
8272
- "aria-errormessage": !isValid ? t(texts13.invalidFile) : void 0,
8273
- "aria-describedby": spaceSeparatedIdListGenerator(
8274
- errorsList.map((e) => e.id)
8275
- )
8314
+ !inactive && /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(import_jsx_runtime259.Fragment, { children: [
8315
+ /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
8316
+ Icon,
8317
+ {
8318
+ icon: isValid ? CheckCircledIcon : ErrorIcon,
8319
+ className: FileUploader_default[`file__icon--${isValid ? "valid" : "invalid"}`]
8276
8320
  }
8277
- }
8278
- )
8321
+ ),
8322
+ /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
8323
+ Button,
8324
+ {
8325
+ size: "small",
8326
+ purpose: "tertiary",
8327
+ type: "button",
8328
+ onClick: removeFile,
8329
+ icon: CloseIcon,
8330
+ htmlProps: {
8331
+ "aria-label": t(texts13.removeFile(stateFile.file.name)),
8332
+ "aria-invalid": !isValid ? true : void 0,
8333
+ "aria-errormessage": !isValid ? t(texts13.invalidFile) : void 0,
8334
+ "aria-describedby": spaceSeparatedIdListGenerator(
8335
+ errorsList.map((e) => e.id)
8336
+ )
8337
+ }
8338
+ }
8339
+ )
8340
+ ] })
8279
8341
  ]
8280
8342
  }
8281
8343
  ),
@@ -8374,14 +8436,12 @@ var isEventWithFiles = (event) => {
8374
8436
  var isFileAccepted = (file, accept) => {
8375
8437
  return accept !== void 0 ? isAccepted(file, accept) : true;
8376
8438
  };
8377
- var getTooManyFilesErrorMessage = (maxFiles) => `For mange filer, maks ${maxFiles}stk`;
8378
- var getInvalidFileTypeErrorMessage = () => "Ugyldig filtype";
8379
8439
 
8380
8440
  // src/components/FileUploader/useFileUploader.ts
8381
- var calcRootErrors = (files, maxFiles, errorMessage) => {
8441
+ var calcRootErrors = (maxFilesErrorMessage, files, maxFiles, errorMessage) => {
8382
8442
  const errors = [];
8383
8443
  if (maxFiles && maxFiles >= 1 && files.length > maxFiles) {
8384
- errors.push(getTooManyFilesErrorMessage(maxFiles));
8444
+ errors.push(maxFilesErrorMessage + maxFiles);
8385
8445
  }
8386
8446
  if (errorMessage) {
8387
8447
  errors.push(errorMessage);
@@ -8393,11 +8453,14 @@ var useFileUploader = (props) => {
8393
8453
  initialFiles,
8394
8454
  value,
8395
8455
  onChange,
8456
+ onKeyDown,
8396
8457
  accept,
8397
8458
  maxFiles,
8398
8459
  disabled,
8460
+ readOnly,
8399
8461
  errorMessage
8400
8462
  } = props;
8463
+ const { t } = useTranslation();
8401
8464
  const rootRef = (0, import_react58.useRef)(null);
8402
8465
  const inputRef = (0, import_react58.useRef)(null);
8403
8466
  const buttonRef = (0, import_react58.useRef)(null);
@@ -8415,6 +8478,7 @@ var useFileUploader = (props) => {
8415
8478
  isFileDialogActive: false,
8416
8479
  isDragActive: false,
8417
8480
  rootErrors: calcRootErrors(
8481
+ t(texts14.invalidFileAmount),
8418
8482
  initialFileUploaderFiles,
8419
8483
  maxFiles,
8420
8484
  errorMessage
@@ -8427,7 +8491,7 @@ var useFileUploader = (props) => {
8427
8491
  const accepted = isFileAccepted(file, accept);
8428
8492
  return {
8429
8493
  file,
8430
- errors: accepted ? [] : [getInvalidFileTypeErrorMessage()]
8494
+ errors: accepted ? [] : [t(texts14.invalidFileType)]
8431
8495
  };
8432
8496
  });
8433
8497
  dispatch({
@@ -8439,7 +8503,12 @@ var useFileUploader = (props) => {
8439
8503
  (0, import_react58.useEffect)(() => {
8440
8504
  dispatch({
8441
8505
  type: "setRootErrors",
8442
- payload: calcRootErrors(stateFiles, maxFiles, errorMessage)
8506
+ payload: calcRootErrors(
8507
+ t(texts14.invalidFileAmount),
8508
+ stateFiles,
8509
+ maxFiles,
8510
+ errorMessage
8511
+ )
8443
8512
  });
8444
8513
  }, [dispatch, stateFiles, maxFiles, errorMessage]);
8445
8514
  const onRootFocus = (0, import_react58.useCallback)(
@@ -8489,7 +8558,7 @@ var useFileUploader = (props) => {
8489
8558
  const accepted = isFileAccepted(file, accept);
8490
8559
  return {
8491
8560
  file,
8492
- errors: accepted ? [] : [getInvalidFileTypeErrorMessage()]
8561
+ errors: accepted ? [] : [t(texts14.invalidFileType)]
8493
8562
  };
8494
8563
  }).concat(stateFiles);
8495
8564
  onChange(newFiles.map((f) => f.file));
@@ -8561,10 +8630,13 @@ var useFileUploader = (props) => {
8561
8630
  const getInputProps = (0, import_react58.useCallback)(
8562
8631
  () => ({
8563
8632
  type: "file",
8564
- style: { display: "none" },
8565
- tabIndex: -1,
8633
+ tabIndex: readOnly ? void 0 : -1,
8566
8634
  ref: inputRef,
8567
- onChange: setFiles,
8635
+ disabled,
8636
+ "aria-hidden": readOnly ? void 0 : true,
8637
+ onChange: readOnlyChangeHandler(readOnly, setFiles),
8638
+ onKeyDown: readOnlyKeyDownHandler("file", readOnly, onKeyDown),
8639
+ readOnly,
8568
8640
  multiple: !maxFiles || maxFiles > 1,
8569
8641
  ...accept ? { accept: accept.join(",") } : {}
8570
8642
  }),
@@ -8578,6 +8650,20 @@ var useFileUploader = (props) => {
8578
8650
  removeFile
8579
8651
  };
8580
8652
  };
8653
+ var texts14 = createTexts({
8654
+ invalidFileType: {
8655
+ nb: "Ugyldig filtype",
8656
+ no: "Ugyldig filtype",
8657
+ nn: "Ugyldig filtype",
8658
+ en: "Invalid file type"
8659
+ },
8660
+ invalidFileAmount: {
8661
+ nb: "For mange filer. Maksimalt antall er ",
8662
+ no: "For mange filer. Maksimalt antall er ",
8663
+ nn: "For mange filer. Maksimalt antall er ",
8664
+ en: "Too many files. The maximum allowed is "
8665
+ }
8666
+ });
8581
8667
 
8582
8668
  // src/components/FileUploader/FileUploader.tsx
8583
8669
  var import_jsx_runtime260 = require("react/jsx-runtime");
@@ -8595,7 +8681,9 @@ var FileUploader = (props) => {
8595
8681
  accept,
8596
8682
  maxFiles,
8597
8683
  disabled,
8684
+ readOnly,
8598
8685
  onChange,
8686
+ onKeyDown,
8599
8687
  width = "var(--dds-input-default-width)",
8600
8688
  errorMessage,
8601
8689
  hideFileList,
@@ -8603,7 +8691,7 @@ var FileUploader = (props) => {
8603
8691
  ...rest
8604
8692
  } = props;
8605
8693
  const { t } = useTranslation();
8606
- const tDropAreaLabel = dropAreaLabel != null ? dropAreaLabel : t(texts14.dragAndDropOr);
8694
+ const tDropAreaLabel = dropAreaLabel != null ? dropAreaLabel : t(texts15.dragAndDropOr);
8607
8695
  const generatedId = (0, import_react59.useId)();
8608
8696
  const uniqueId = id != null ? id : `${generatedId}-fileUploader`;
8609
8697
  const {
@@ -8619,16 +8707,21 @@ var FileUploader = (props) => {
8619
8707
  onChange,
8620
8708
  accept,
8621
8709
  disabled,
8710
+ readOnly,
8622
8711
  maxFiles,
8623
- errorMessage
8712
+ errorMessage,
8713
+ onKeyDown
8624
8714
  });
8625
8715
  const hasLabel = label !== void 0;
8626
8716
  const hasTip = tip !== void 0;
8627
8717
  const hasRootErrors = rootErrors.length > 0;
8718
+ const inactive = disabled || readOnly;
8628
8719
  const labelId = derivativeIdGenerator(uniqueId, "label");
8629
8720
  const tipId = derivativeIdGenerator(uniqueId, "tip");
8630
8721
  const buttonId = derivativeIdGenerator(uniqueId, "button");
8631
8722
  const inputId = derivativeIdGenerator(uniqueId, "input");
8723
+ const fileListId = derivativeIdGenerator(uniqueId, "file-list");
8724
+ const fileListNameId = derivativeIdGenerator(uniqueId, "file-list-name");
8632
8725
  const fileListElements = stateFiles.map((stateFile, index) => /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
8633
8726
  File,
8634
8727
  {
@@ -8636,7 +8729,9 @@ var FileUploader = (props) => {
8636
8729
  index,
8637
8730
  file: stateFile,
8638
8731
  isValid: stateFile.errors.length === 0,
8639
- removeFile: () => removeFile(stateFile)
8732
+ removeFile: () => removeFile(stateFile),
8733
+ disabled,
8734
+ readOnly
8640
8735
  },
8641
8736
  stateFile.file.name
8642
8737
  ));
@@ -8664,6 +8759,16 @@ var FileUploader = (props) => {
8664
8759
  children: btnLabel
8665
8760
  }
8666
8761
  );
8762
+ const input = /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
8763
+ HiddenInput,
8764
+ {
8765
+ ...getInputProps(),
8766
+ className: cn(readOnly && focus_default["focusable-sibling"]),
8767
+ id: inputId,
8768
+ "data-testid": "file-uploader-input",
8769
+ "aria-describedby": fileListId
8770
+ }
8771
+ );
8667
8772
  return /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)(
8668
8773
  Box,
8669
8774
  {
@@ -8676,10 +8781,11 @@ var FileUploader = (props) => {
8676
8781
  label,
8677
8782
  id: labelId,
8678
8783
  showRequiredStyling: required,
8679
- htmlFor: inputId
8784
+ htmlFor: inputId,
8785
+ readOnly
8680
8786
  }),
8681
8787
  hasTip && /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(InputMessage, { id: tipId, message: tip, messageType: "tip" }),
8682
- withDragAndDrop ? /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)(
8788
+ inactive ? input : withDragAndDrop ? /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)(
8683
8789
  VStack,
8684
8790
  {
8685
8791
  gap: "x1",
@@ -8691,31 +8797,45 @@ var FileUploader = (props) => {
8691
8797
  isDragActive && FileUploader_default["input-container--drag-active"]
8692
8798
  ),
8693
8799
  children: [
8694
- /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
8695
- "input",
8696
- {
8697
- ...getInputProps(),
8698
- id: inputId,
8699
- "data-testid": "file-uploader-input"
8700
- }
8701
- ),
8800
+ input,
8702
8801
  tDropAreaLabel,
8703
- /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(VisuallyHidden, { children: t(texts14.uploadFileWithButton) }),
8802
+ /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(VisuallyHidden, { children: t(texts15.uploadFileWithButton) }),
8704
8803
  button
8705
8804
  ]
8706
8805
  }
8707
- ) : /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)("div", { className: FileUploader_default["input-container--no-drag-zone"], children: [
8708
- /* @__PURE__ */ (0, import_jsx_runtime260.jsx)("input", { ...getInputProps(), id: inputId }),
8806
+ ) : /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)(Box, { padding: "x 0", children: [
8807
+ input,
8709
8808
  button
8710
8809
  ] }),
8711
8810
  /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(ErrorList, { errors: rootErrorsList }),
8712
- !hideFileList && /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(StylelessList, { children: fileListElements })
8811
+ !hideFileList && /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)(
8812
+ "div",
8813
+ {
8814
+ id: fileListId,
8815
+ className: cn(
8816
+ readOnly && focus_default["focus-styled-sibling"],
8817
+ readOnly && FileUploader_default["readonly--file-list"]
8818
+ ),
8819
+ children: [
8820
+ /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(VisuallyHidden, { id: fileListNameId, children: t(texts15.uploadedFiles) }),
8821
+ inactive && fileListElements.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
8822
+ Typography,
8823
+ {
8824
+ italic: true,
8825
+ as: "span",
8826
+ color: disabled ? "text-subtle" : "text-medium",
8827
+ children: t(texts15.noFiles)
8828
+ }
8829
+ ) : /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(StylelessList, { "aria-labelledby": fileListNameId, children: fileListElements })
8830
+ ]
8831
+ }
8832
+ )
8713
8833
  ]
8714
8834
  }
8715
8835
  );
8716
8836
  };
8717
8837
  FileUploader.displayName = "FileUploader";
8718
- var texts14 = createTexts({
8838
+ var texts15 = createTexts({
8719
8839
  dragAndDropOr: {
8720
8840
  nb: "Dra og slipp filer her eller",
8721
8841
  no: "Dra og slipp filer her eller",
@@ -8727,6 +8847,18 @@ var texts14 = createTexts({
8727
8847
  no: "last opp en fil med den p\xE5f\xF8lgende knappen",
8728
8848
  nn: "last opp ei fil med den p\xE5f\xF8lgjande knappen",
8729
8849
  en: "upload using the following button"
8850
+ },
8851
+ noFiles: {
8852
+ nb: "Ingen filer.",
8853
+ no: "Ingen filer.",
8854
+ nn: "Ingen filer.",
8855
+ en: "No files."
8856
+ },
8857
+ uploadedFiles: {
8858
+ nb: "Opplastede filer",
8859
+ no: "Opplastede filer",
8860
+ nn: "Opplasta filer",
8861
+ en: "Uploaded files"
8730
8862
  }
8731
8863
  });
8732
8864
 
@@ -8993,11 +9125,11 @@ var import_jsx_runtime272 = require("react/jsx-runtime");
8993
9125
  var inlineEditVisuallyHidden = (id, clearable) => {
8994
9126
  const { t } = useTranslation();
8995
9127
  return /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(VisuallyHidden, { id, children: [
8996
- t(texts15.inlineEditInfo),
8997
- !clearable && t(texts15.notClearable)
9128
+ t(texts16.inlineEditInfo),
9129
+ !clearable && t(texts16.notClearable)
8998
9130
  ] });
8999
9131
  };
9000
- var texts15 = createTexts({
9132
+ var texts16 = createTexts({
9001
9133
  inlineEditInfo: {
9002
9134
  nb: "Escape, Enter eller Tab for \xE5 lagre.",
9003
9135
  no: "Escape, Enter eller Tab for \xE5 lagre.",
@@ -9326,7 +9458,7 @@ var InternalHeader = (props) => {
9326
9458
  const hasContextMenuElements = !!contextMenuItems && contextMenuItems.length > 0;
9327
9459
  const hasSmallScreenBreakpoint = !!smallScreenBreakpoint;
9328
9460
  const hasNavInContextMenu = hasSmallScreenBreakpoint && hasNavigationElements;
9329
- const navigation = hasNavigationElements ? /* @__PURE__ */ (0, import_jsx_runtime278.jsx)("nav", { "aria-label": t(texts16.siteNavigation), children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
9461
+ const navigation = hasNavigationElements ? /* @__PURE__ */ (0, import_jsx_runtime278.jsx)("nav", { "aria-label": t(texts17.siteNavigation), children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
9330
9462
  ShowHide,
9331
9463
  {
9332
9464
  as: StylelessList,
@@ -9390,7 +9522,7 @@ var InternalHeader = (props) => {
9390
9522
  {
9391
9523
  icon: hasNavInContextMenu ? MenuIcon : MoreVerticalIcon,
9392
9524
  purpose: "tertiary",
9393
- "aria-label": t(texts16.openMenu)
9525
+ "aria-label": t(texts17.openMenu)
9394
9526
  }
9395
9527
  ),
9396
9528
  /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(OverflowMenu, { className: InternalHeader_default["context-menu"], children: [
@@ -9399,7 +9531,7 @@ var InternalHeader = (props) => {
9399
9531
  ShowHide,
9400
9532
  {
9401
9533
  as: "nav",
9402
- "aria-label": t(texts16.siteNavigation),
9534
+ "aria-label": t(texts17.siteNavigation),
9403
9535
  showBelow: smallScreenBreakpoint,
9404
9536
  children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(OverflowMenuList, { children: navItems.map((item, i) => /* @__PURE__ */ (0, import_react67.createElement)(OverflowMenuLink, { ...item, key: `nav-${i}` })) })
9405
9537
  }
@@ -9435,7 +9567,7 @@ var InternalHeader = (props) => {
9435
9567
  );
9436
9568
  };
9437
9569
  InternalHeader.displayName = "InternalHeader";
9438
- var texts16 = createTexts({
9570
+ var texts17 = createTexts({
9439
9571
  openMenu: {
9440
9572
  nb: "\xC5pne meny",
9441
9573
  no: "\xC5pne meny",
@@ -10045,7 +10177,7 @@ var getCustomStyles = (size2, hasError, hasIcon, isReadOnly) => ({
10045
10177
  cursor: "pointer",
10046
10178
  display: "flex",
10047
10179
  alignItems: "center",
10048
- gap: "var(--dds-spacing-x0-5)",
10180
+ gap: "var(--dds-spacing-x0-25)",
10049
10181
  padding: "var(--dds-spacing-x0-75)",
10050
10182
  backgroundColor: "var(--dds-color-surface-default)",
10051
10183
  ...typography.option[size2],
@@ -10111,10 +10243,9 @@ var getIndicatorIconSize = (componentSize) => {
10111
10243
  }
10112
10244
  };
10113
10245
  var DDSOption = ({
10114
- componentSize,
10115
10246
  ...props
10116
10247
  }) => /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(Option, { ...props, children: [
10117
- props.isSelected && /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(Icon, { icon: CheckIcon, iconSize: getFormInputIconSize(componentSize) }),
10248
+ props.isSelected && /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(Icon, { icon: CheckIcon, iconSize: "small" }),
10118
10249
  props.children
10119
10250
  ] });
10120
10251
  var CustomOption = (props) => /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(Option, { ...props, children: import_react70.default.createElement(props.customElement, props) });
@@ -10305,7 +10436,7 @@ function Select({
10305
10436
  if (customOptionElement) {
10306
10437
  return /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(CustomOption, { ...props, customElement: customOptionElement });
10307
10438
  } else {
10308
- return /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(DDSOption, { ...props, componentSize });
10439
+ return /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(DDSOption, { ...props });
10309
10440
  }
10310
10441
  },
10311
10442
  [customOptionElement, componentSize]
@@ -10540,6 +10671,7 @@ var Pagination = ({
10540
10671
  itemsAmount,
10541
10672
  defaultItemsPerPage = 10,
10542
10673
  defaultActivePage = 1,
10674
+ activePage: activePageProp,
10543
10675
  withPagination = true,
10544
10676
  withCounter,
10545
10677
  withSelect,
@@ -10559,7 +10691,15 @@ var Pagination = ({
10559
10691
  ...rest
10560
10692
  }) => {
10561
10693
  const { t } = useTranslation();
10562
- const [activePage, setActivePage] = (0, import_react73.useState)(defaultActivePage);
10694
+ if (withSelect && !selectOptions.some((o) => o.value === defaultItemsPerPage)) {
10695
+ console.warn(
10696
+ `[Pagination] defaultItemsPerPage prop value (${defaultItemsPerPage}) is not included in customOptions prop. Please add it to ensure it appears in the dropdown.`
10697
+ );
10698
+ }
10699
+ const [activePage, setActivePage] = useControllableState({
10700
+ value: activePageProp,
10701
+ defaultValue: defaultActivePage
10702
+ });
10563
10703
  const [itemsPerPage, setItemsPerPage] = (0, import_react73.useState)(defaultItemsPerPage);
10564
10704
  const pagesLength = Math.ceil(itemsAmount / itemsPerPage);
10565
10705
  const items = PaginationGenerator(pagesLength, activePage);
@@ -10587,7 +10727,7 @@ var Pagination = ({
10587
10727
  onClick: (event) => {
10588
10728
  onPageChange(event, item);
10589
10729
  },
10590
- "aria-label": isActive ? t(texts17.currentPage(item)) : t(texts17.page(item)),
10730
+ "aria-label": isActive ? t(texts18.currentPage(item)) : t(texts18.page(item)),
10591
10731
  children: item
10592
10732
  }
10593
10733
  ) : /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
@@ -10607,7 +10747,7 @@ var Pagination = ({
10607
10747
  onClick: (event) => {
10608
10748
  onPageChange(event, activePage - 1);
10609
10749
  },
10610
- "aria-label": t(texts17.previousPage)
10750
+ "aria-label": t(texts18.previousPage)
10611
10751
  }
10612
10752
  );
10613
10753
  const nextPageButton = /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
@@ -10619,7 +10759,7 @@ var Pagination = ({
10619
10759
  onClick: (event) => {
10620
10760
  onPageChange(event, activePage + 1);
10621
10761
  },
10622
- "aria-label": t(texts17.nextPage)
10762
+ "aria-label": t(texts18.nextPage)
10623
10763
  }
10624
10764
  );
10625
10765
  const isOnFirstPage = activePage === 1;
@@ -10629,7 +10769,7 @@ var Pagination = ({
10629
10769
  {
10630
10770
  as: "nav",
10631
10771
  ref,
10632
- "aria-label": t(texts17.pagination),
10772
+ "aria-label": t(texts18.pagination),
10633
10773
  display: "flex",
10634
10774
  alignItems: "center",
10635
10775
  ...!withSelect && !withCounter && {
@@ -10693,7 +10833,7 @@ var Pagination = ({
10693
10833
  onClick: (event) => {
10694
10834
  onPageChange(event, 1);
10695
10835
  },
10696
- "aria-label": t(texts17.firstPage)
10836
+ "aria-label": t(texts18.firstPage)
10697
10837
  }
10698
10838
  )
10699
10839
  }
@@ -10747,7 +10887,7 @@ var Pagination = ({
10747
10887
  onClick: (event) => {
10748
10888
  onPageChange(event, pagesLength);
10749
10889
  },
10750
- "aria-label": t(texts17.lastPage)
10890
+ "aria-label": t(texts18.lastPage)
10751
10891
  }
10752
10892
  )
10753
10893
  }
@@ -10777,7 +10917,7 @@ var Pagination = ({
10777
10917
  {
10778
10918
  options: selectOptions,
10779
10919
  isSearchable: false,
10780
- width: "74px",
10920
+ width: "90px",
10781
10921
  defaultValue: {
10782
10922
  label: itemsPerPage.toString(),
10783
10923
  value: itemsPerPage
@@ -10785,11 +10925,11 @@ var Pagination = ({
10785
10925
  isClearable: false,
10786
10926
  onChange: handleSelectChange,
10787
10927
  componentSize: "small",
10788
- "aria-label": t(texts17.itemsPerPage)
10928
+ "aria-label": t(texts18.itemsPerPage)
10789
10929
  }
10790
10930
  ),
10791
10931
  withCounter && /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Paragraph, { children: t(
10792
- texts17.showsAmountOfTotalItems(
10932
+ texts18.showsAmountOfTotalItems(
10793
10933
  activePageFirstItem,
10794
10934
  activePageLastItem,
10795
10935
  itemsAmount
@@ -10802,7 +10942,7 @@ var Pagination = ({
10802
10942
  );
10803
10943
  };
10804
10944
  Pagination.displayName = "Pagination";
10805
- var texts17 = createTexts({
10945
+ var texts18 = createTexts({
10806
10946
  pagination: {
10807
10947
  nb: "Paginering",
10808
10948
  no: "Paginering",
@@ -10940,12 +11080,12 @@ var COUNTRIES = {
10940
11080
  CO: { name: "Colombia", id: "CO", dialCode: "+57" },
10941
11081
  KM: { name: "Komorene (\u202B\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631\u202C\u200E)", id: "KM", dialCode: "+269" },
10942
11082
  CD: {
10943
- name: "Kongo (DR) (Jamhuri ya Kisoemokrasia ya Kongo)",
11083
+ name: "Kongo, den demokratiske republikken (R\xE9publique d\xE9mocratique du Congo)",
10944
11084
  id: "CD",
10945
11085
  dialCode: "+243"
10946
11086
  },
10947
11087
  CG: {
10948
- name: "Kongo (Republikken) (Congo-Brazzaville)",
11088
+ name: "Kongo, republikken (R\xE9publique du Congo)",
10949
11089
  id: "CG",
10950
11090
  dialCode: "+242"
10951
11091
  },
@@ -11023,7 +11163,7 @@ var COUNTRIES = {
11023
11163
  IR: { name: "Iran (\u202B\u0627\u06CC\u0631\u0627\u0646\u202C\u200E)", id: "IR", dialCode: "+98" },
11024
11164
  IQ: { name: "Irak (\u202B\u0627\u0644\u0639\u0631\u0627\u0642\u202C\u200E)", id: "IQ", dialCode: "+964" },
11025
11165
  IE: { name: "Irland (\xC9ire)", id: "IE", dialCode: "+353" },
11026
- IM: { name: "Isle of Man", id: "IM", dialCode: "+44" },
11166
+ IM: { name: "Man (Isle of Man)", id: "IM", dialCode: "+44" },
11027
11167
  IL: { name: "Israel (\u202B\u05D9\u05E9\u05E8\u05D0\u05DC\u202C\u200E)", id: "IL", dialCode: "+972" },
11028
11168
  IT: { name: "Italia", id: "IT", dialCode: "+39" },
11029
11169
  JM: { name: "Jamaica", id: "JM", dialCode: "+1" },
@@ -11047,7 +11187,7 @@ var COUNTRIES = {
11047
11187
  LU: { name: "Luxembourg", id: "LU", dialCode: "+352" },
11048
11188
  MO: { name: "Macao (\u6FB3\u9580)", id: "MO", dialCode: "+853" },
11049
11189
  MK: {
11050
- name: "Nord-Makedonia (FYROM) (\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430)",
11190
+ name: "Nord-Makedonia (\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430)",
11051
11191
  id: "MK",
11052
11192
  dialCode: "+389"
11053
11193
  },
@@ -11136,7 +11276,7 @@ var COUNTRIES = {
11136
11276
  },
11137
11277
  LC: { name: "Saint Lucia", id: "LC", dialCode: "+1758" },
11138
11278
  MF: {
11139
- name: "Saint Martin (Saint-Martin (partie fran\xE7aise))",
11279
+ name: "Saint-Martin (Collectivit\xE9 de Saint-Martin)",
11140
11280
  id: "MF",
11141
11281
  dialCode: "+590"
11142
11282
  },
@@ -11319,8 +11459,8 @@ var PhoneInput = ({
11319
11459
  }) => {
11320
11460
  var _a;
11321
11461
  const { t } = useTranslation();
11322
- const tGroupLabel = groupLabel != null ? groupLabel : t(texts18.countryCodeAndPhoneNumber);
11323
- const tSelectLabel = selectLabel != null ? selectLabel : t(texts18.countryCode);
11462
+ const tGroupLabel = groupLabel != null ? groupLabel : t(texts19.countryCodeAndPhoneNumber);
11463
+ const tSelectLabel = selectLabel != null ? selectLabel : t(texts19.countryCode);
11324
11464
  const generatedId = (0, import_react74.useId)();
11325
11465
  const uniqueId = (_a = props.id) != null ? _a : generatedId;
11326
11466
  const phoneInputId = `${uniqueId}-phone-input`;
@@ -11493,7 +11633,7 @@ var getCallingCode = (s) => {
11493
11633
  var _a;
11494
11634
  return (_a = s.substring(s.indexOf("+"), s.length)) != null ? _a : "";
11495
11635
  };
11496
- var texts18 = createTexts({
11636
+ var texts19 = createTexts({
11497
11637
  countryCode: {
11498
11638
  nb: "Landskode",
11499
11639
  no: "Landskode",
@@ -11817,6 +11957,7 @@ var ProgressTrackerItem = (props) => {
11817
11957
  ...rest
11818
11958
  } = props;
11819
11959
  const { t } = useTranslation();
11960
+ const stepNumber = index + 1;
11820
11961
  const { activeStep, handleStepChange, direction } = useProgressTrackerContext();
11821
11962
  const active = activeStep === index;
11822
11963
  const itemState = toItemState(active, completed, disabled);
@@ -11833,7 +11974,7 @@ var ProgressTrackerItem = (props) => {
11833
11974
  if (icon !== void 0) {
11834
11975
  return /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(Icon, { icon, iconSize: "small" });
11835
11976
  }
11836
- return index + 1;
11977
+ return stepNumber;
11837
11978
  }, [completed, icon, index]);
11838
11979
  function getTextColor2() {
11839
11980
  if (disabled) return "text-subtle";
@@ -11856,7 +11997,7 @@ var ProgressTrackerItem = (props) => {
11856
11997
  children: stepNumberContent
11857
11998
  }
11858
11999
  ),
11859
- /* @__PURE__ */ (0, import_jsx_runtime292.jsxs)(
12000
+ /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
11860
12001
  Typography,
11861
12002
  {
11862
12003
  as: "div",
@@ -11866,14 +12007,11 @@ var ProgressTrackerItem = (props) => {
11866
12007
  isInactiveLink && ProgressTracker_default["item-text--inactive-link"]
11867
12008
  ),
11868
12009
  color: getTextColor2(),
11869
- children: [
11870
- /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(VisuallyHidden, { children: t(texts19.stepTextBefore(index + 1)) }),
11871
- children,
11872
- /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(VisuallyHidden, { children: completed ? t(texts19.completed) : t(texts19.uncompleted) })
11873
- ]
12010
+ children
11874
12011
  }
11875
12012
  )
11876
12013
  ] });
12014
+ const ariaLabel = props["aria-label"] ? props["aria-label"] : `${children}, ${stepNumber}. ${completed ? t(texts20.completed) : t(texts20.uncompleted)}`;
11877
12015
  return /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
11878
12016
  Box,
11879
12017
  {
@@ -11900,6 +12038,7 @@ var ProgressTrackerItem = (props) => {
11900
12038
  htmlProps,
11901
12039
  rest
11902
12040
  ),
12041
+ "aria-label": ariaLabel,
11903
12042
  onClick: () => handleClick(),
11904
12043
  disabled,
11905
12044
  children: stepContent
@@ -11913,6 +12052,7 @@ var ProgressTrackerItem = (props) => {
11913
12052
  htmlProps,
11914
12053
  rest
11915
12054
  ),
12055
+ "aria-label": ariaLabel,
11916
12056
  children: stepContent
11917
12057
  }
11918
12058
  )
@@ -11920,24 +12060,18 @@ var ProgressTrackerItem = (props) => {
11920
12060
  );
11921
12061
  };
11922
12062
  ProgressTrackerItem.displayName = "ProgressTracker.Item";
11923
- var texts19 = createTexts({
11924
- stepTextBefore: (index) => ({
11925
- nb: `${index}. trinn, `,
11926
- no: `${index}. trinn, `,
11927
- nn: `${index}. trinn, `,
11928
- en: `${index}. step, `
11929
- }),
12063
+ var texts20 = createTexts({
11930
12064
  uncompleted: {
11931
- nb: ", ikke ferdig",
11932
- no: ", ikke ferdig",
11933
- nn: ", ikkje ferdig",
11934
- en: "uncompleted"
12065
+ nb: "trinn ikke ferdig",
12066
+ no: "trinn ikke ferdig",
12067
+ nn: "trinn ikkje ferdig",
12068
+ en: "step uncompleted"
11935
12069
  },
11936
12070
  completed: {
11937
- nb: ", ferdig",
11938
- no: ", ferdig",
11939
- nn: ", ferdig",
11940
- en: ", completed"
12071
+ nb: "trinn ferdig",
12072
+ no: "trinn ferdig",
12073
+ nn: "trinn ferdig",
12074
+ en: "step completed"
11941
12075
  }
11942
12076
  });
11943
12077
 
@@ -11983,7 +12117,7 @@ var ProgressTracker = (() => {
11983
12117
  children: /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
11984
12118
  "nav",
11985
12119
  {
11986
- "aria-label": ariaLabel != null ? ariaLabel : t(texts20.stepProgression),
12120
+ "aria-label": ariaLabel != null ? ariaLabel : t(texts21.stepProgression),
11987
12121
  ...getBaseHTMLProps(id, className, htmlProps, rest),
11988
12122
  children: /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
11989
12123
  Box,
@@ -12021,7 +12155,7 @@ function passIndexPropToProgressTrackerItem(children) {
12021
12155
  })
12022
12156
  );
12023
12157
  }
12024
- var texts20 = createTexts({
12158
+ var texts21 = createTexts({
12025
12159
  stepProgression: {
12026
12160
  nb: "Stegprogresjon",
12027
12161
  no: "Stegprogresjon",
@@ -12236,7 +12370,7 @@ var SearchSuggestions = ({
12236
12370
  {
12237
12371
  index,
12238
12372
  focus: focus === index && showSuggestions,
12239
- "aria-label": t(texts21.search(suggestion)),
12373
+ "aria-label": t(texts22.search(suggestion)),
12240
12374
  onClick: onSuggestionClick,
12241
12375
  "aria-setsize": suggestionsToRender.length,
12242
12376
  "aria-posinset": index,
@@ -12250,7 +12384,7 @@ var SearchSuggestions = ({
12250
12384
  );
12251
12385
  };
12252
12386
  SearchSuggestions.displayName = "SearchSuggestions";
12253
- var texts21 = createTexts({
12387
+ var texts22 = createTexts({
12254
12388
  search: (suggestion) => ({
12255
12389
  no: `${suggestion} s\xF8k`,
12256
12390
  nb: `${suggestion} s\xF8k`,
@@ -12396,13 +12530,13 @@ var Search = ({
12396
12530
  componentSize
12397
12531
  }
12398
12532
  ),
12399
- /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(VisuallyHidden, { id: suggestionsDescriptionId, children: t(texts22.useArrowKeys) })
12533
+ /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(VisuallyHidden, { id: suggestionsDescriptionId, children: t(texts23.useArrowKeys) })
12400
12534
  ] }),
12401
12535
  hasValue && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
12402
12536
  ClearButton,
12403
12537
  {
12404
12538
  size: getIconSize2(componentSize),
12405
- "aria-label": t(texts22.clearSearch),
12539
+ "aria-label": t(texts23.clearSearch),
12406
12540
  onClick: clearInput,
12407
12541
  className: Search_default["clear-button"]
12408
12542
  }
@@ -12431,7 +12565,7 @@ var Search = ({
12431
12565
  size: componentSize,
12432
12566
  onClick,
12433
12567
  ...otherButtonProps,
12434
- children: buttonLabel != null ? buttonLabel : t(texts22.search)
12568
+ children: buttonLabel != null ? buttonLabel : t(texts23.search)
12435
12569
  }
12436
12570
  )
12437
12571
  ]
@@ -12442,7 +12576,7 @@ var Search = ({
12442
12576
  ] });
12443
12577
  };
12444
12578
  Search.displayName = "Search";
12445
- var texts22 = createTexts({
12579
+ var texts23 = createTexts({
12446
12580
  clearSearch: {
12447
12581
  nb: "T\xF8m s\xF8k",
12448
12582
  no: "T\xF8m s\xF8k",
@@ -12651,7 +12785,7 @@ var SplitButton = ({
12651
12785
  {
12652
12786
  ...buttonStyleProps,
12653
12787
  icon: isOpen ? ChevronUpIcon : ChevronDownIcon,
12654
- "aria-label": t(texts23.moreActions),
12788
+ "aria-label": t(texts24.moreActions),
12655
12789
  purpose,
12656
12790
  className: cn(
12657
12791
  SplitButton_default.option,
@@ -12665,7 +12799,7 @@ var SplitButton = ({
12665
12799
  ] });
12666
12800
  };
12667
12801
  SplitButton.displayName = "SplitButton";
12668
- var texts23 = createTexts({
12802
+ var texts24 = createTexts({
12669
12803
  moreActions: {
12670
12804
  nb: "Flere handlinger",
12671
12805
  no: "Flere handlinger",
@@ -12823,7 +12957,7 @@ var SortCell = ({
12823
12957
  StylelessButton,
12824
12958
  {
12825
12959
  onClick,
12826
- "aria-description": t(texts24.changeSort),
12960
+ "aria-description": t(texts25.changeSort),
12827
12961
  className: cn(Table_default["sort-button"], focusable),
12828
12962
  children: [
12829
12963
  children,
@@ -12836,7 +12970,7 @@ var SortCell = ({
12836
12970
  );
12837
12971
  };
12838
12972
  SortCell.displayName = "Table.SortCell";
12839
- var texts24 = createTexts({
12973
+ var texts25 = createTexts({
12840
12974
  changeSort: {
12841
12975
  nb: "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
12842
12976
  no: "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
@@ -12984,8 +13118,8 @@ var CollapsibleRow = ({
12984
13118
  return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(Row, { ref, ...rowProps(), children: /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(import_jsx_runtime310.Fragment, { children: [
12985
13119
  definingColumnCells,
12986
13120
  /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(Table2.Cell, { type: "head", layout: "center", children: [
12987
- t(texts25.expand),
12988
- /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(VisuallyHidden, { children: t(texts25.row) })
13121
+ t(texts26.expand),
13122
+ /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(VisuallyHidden, { children: t(texts26.row) })
12989
13123
  ] })
12990
13124
  ] }) });
12991
13125
  };
@@ -13022,7 +13156,7 @@ var CollapsibleRow = ({
13022
13156
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(Row, { ref, ...rowProps(), children });
13023
13157
  };
13024
13158
  CollapsibleRow.displayName = "CollapsibleTable.Row";
13025
- var texts25 = createTexts({
13159
+ var texts26 = createTexts({
13026
13160
  expand: {
13027
13161
  nb: "Utvid",
13028
13162
  no: "Utvid",