@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.css +5 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +9 -11
- package/dist/index.d.ts +9 -11
- package/dist/index.js +260 -134
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +275 -149
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
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(
|
|
3267
|
-
return
|
|
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
|
|
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
|
|
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,
|
|
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
|
|
6419
|
+
const { locale } = (0, import_i18n10.useLocale)();
|
|
6412
6420
|
const state = (0, import_calendar4.useCalendarState)({
|
|
6413
6421
|
...props,
|
|
6414
6422
|
createCalendar,
|
|
6415
|
-
locale
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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 {
|
|
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
|
-
|
|
8306
|
+
Typography,
|
|
8249
8307
|
{
|
|
8250
|
-
|
|
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.
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
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(
|
|
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 ? [] : [
|
|
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(
|
|
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 ? [] : [
|
|
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
|
-
|
|
8565
|
-
tabIndex: -1,
|
|
8633
|
+
tabIndex: readOnly ? void 0 : -1,
|
|
8566
8634
|
ref: inputRef,
|
|
8567
|
-
|
|
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(
|
|
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
|
-
|
|
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(
|
|
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)(
|
|
8708
|
-
|
|
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.
|
|
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
|
|
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(
|
|
8997
|
-
!clearable && t(
|
|
9128
|
+
t(texts16.inlineEditInfo),
|
|
9129
|
+
!clearable && t(texts16.notClearable)
|
|
8998
9130
|
] });
|
|
8999
9131
|
};
|
|
9000
|
-
var
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
|
9570
|
+
var texts17 = createTexts({
|
|
9439
9571
|
openMenu: {
|
|
9440
9572
|
nb: "\xC5pne meny",
|
|
9441
9573
|
no: "\xC5pne meny",
|
|
@@ -10587,7 +10719,7 @@ var Pagination = ({
|
|
|
10587
10719
|
onClick: (event) => {
|
|
10588
10720
|
onPageChange(event, item);
|
|
10589
10721
|
},
|
|
10590
|
-
"aria-label": isActive ? t(
|
|
10722
|
+
"aria-label": isActive ? t(texts18.currentPage(item)) : t(texts18.page(item)),
|
|
10591
10723
|
children: item
|
|
10592
10724
|
}
|
|
10593
10725
|
) : /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
|
|
@@ -10607,7 +10739,7 @@ var Pagination = ({
|
|
|
10607
10739
|
onClick: (event) => {
|
|
10608
10740
|
onPageChange(event, activePage - 1);
|
|
10609
10741
|
},
|
|
10610
|
-
"aria-label": t(
|
|
10742
|
+
"aria-label": t(texts18.previousPage)
|
|
10611
10743
|
}
|
|
10612
10744
|
);
|
|
10613
10745
|
const nextPageButton = /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
|
|
@@ -10619,7 +10751,7 @@ var Pagination = ({
|
|
|
10619
10751
|
onClick: (event) => {
|
|
10620
10752
|
onPageChange(event, activePage + 1);
|
|
10621
10753
|
},
|
|
10622
|
-
"aria-label": t(
|
|
10754
|
+
"aria-label": t(texts18.nextPage)
|
|
10623
10755
|
}
|
|
10624
10756
|
);
|
|
10625
10757
|
const isOnFirstPage = activePage === 1;
|
|
@@ -10629,7 +10761,7 @@ var Pagination = ({
|
|
|
10629
10761
|
{
|
|
10630
10762
|
as: "nav",
|
|
10631
10763
|
ref,
|
|
10632
|
-
"aria-label": t(
|
|
10764
|
+
"aria-label": t(texts18.pagination),
|
|
10633
10765
|
display: "flex",
|
|
10634
10766
|
alignItems: "center",
|
|
10635
10767
|
...!withSelect && !withCounter && {
|
|
@@ -10693,7 +10825,7 @@ var Pagination = ({
|
|
|
10693
10825
|
onClick: (event) => {
|
|
10694
10826
|
onPageChange(event, 1);
|
|
10695
10827
|
},
|
|
10696
|
-
"aria-label": t(
|
|
10828
|
+
"aria-label": t(texts18.firstPage)
|
|
10697
10829
|
}
|
|
10698
10830
|
)
|
|
10699
10831
|
}
|
|
@@ -10747,7 +10879,7 @@ var Pagination = ({
|
|
|
10747
10879
|
onClick: (event) => {
|
|
10748
10880
|
onPageChange(event, pagesLength);
|
|
10749
10881
|
},
|
|
10750
|
-
"aria-label": t(
|
|
10882
|
+
"aria-label": t(texts18.lastPage)
|
|
10751
10883
|
}
|
|
10752
10884
|
)
|
|
10753
10885
|
}
|
|
@@ -10785,11 +10917,11 @@ var Pagination = ({
|
|
|
10785
10917
|
isClearable: false,
|
|
10786
10918
|
onChange: handleSelectChange,
|
|
10787
10919
|
componentSize: "small",
|
|
10788
|
-
"aria-label": t(
|
|
10920
|
+
"aria-label": t(texts18.itemsPerPage)
|
|
10789
10921
|
}
|
|
10790
10922
|
),
|
|
10791
10923
|
withCounter && /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Paragraph, { children: t(
|
|
10792
|
-
|
|
10924
|
+
texts18.showsAmountOfTotalItems(
|
|
10793
10925
|
activePageFirstItem,
|
|
10794
10926
|
activePageLastItem,
|
|
10795
10927
|
itemsAmount
|
|
@@ -10802,7 +10934,7 @@ var Pagination = ({
|
|
|
10802
10934
|
);
|
|
10803
10935
|
};
|
|
10804
10936
|
Pagination.displayName = "Pagination";
|
|
10805
|
-
var
|
|
10937
|
+
var texts18 = createTexts({
|
|
10806
10938
|
pagination: {
|
|
10807
10939
|
nb: "Paginering",
|
|
10808
10940
|
no: "Paginering",
|
|
@@ -10940,12 +11072,12 @@ var COUNTRIES = {
|
|
|
10940
11072
|
CO: { name: "Colombia", id: "CO", dialCode: "+57" },
|
|
10941
11073
|
KM: { name: "Komorene (\u202B\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631\u202C\u200E)", id: "KM", dialCode: "+269" },
|
|
10942
11074
|
CD: {
|
|
10943
|
-
name: "Kongo
|
|
11075
|
+
name: "Kongo, den demokratiske republikken (R\xE9publique d\xE9mocratique du Congo)",
|
|
10944
11076
|
id: "CD",
|
|
10945
11077
|
dialCode: "+243"
|
|
10946
11078
|
},
|
|
10947
11079
|
CG: {
|
|
10948
|
-
name: "Kongo (
|
|
11080
|
+
name: "Kongo, republikken (R\xE9publique du Congo)",
|
|
10949
11081
|
id: "CG",
|
|
10950
11082
|
dialCode: "+242"
|
|
10951
11083
|
},
|
|
@@ -11023,7 +11155,7 @@ var COUNTRIES = {
|
|
|
11023
11155
|
IR: { name: "Iran (\u202B\u0627\u06CC\u0631\u0627\u0646\u202C\u200E)", id: "IR", dialCode: "+98" },
|
|
11024
11156
|
IQ: { name: "Irak (\u202B\u0627\u0644\u0639\u0631\u0627\u0642\u202C\u200E)", id: "IQ", dialCode: "+964" },
|
|
11025
11157
|
IE: { name: "Irland (\xC9ire)", id: "IE", dialCode: "+353" },
|
|
11026
|
-
IM: { name: "Isle of Man", id: "IM", dialCode: "+44" },
|
|
11158
|
+
IM: { name: "Man (Isle of Man)", id: "IM", dialCode: "+44" },
|
|
11027
11159
|
IL: { name: "Israel (\u202B\u05D9\u05E9\u05E8\u05D0\u05DC\u202C\u200E)", id: "IL", dialCode: "+972" },
|
|
11028
11160
|
IT: { name: "Italia", id: "IT", dialCode: "+39" },
|
|
11029
11161
|
JM: { name: "Jamaica", id: "JM", dialCode: "+1" },
|
|
@@ -11047,7 +11179,7 @@ var COUNTRIES = {
|
|
|
11047
11179
|
LU: { name: "Luxembourg", id: "LU", dialCode: "+352" },
|
|
11048
11180
|
MO: { name: "Macao (\u6FB3\u9580)", id: "MO", dialCode: "+853" },
|
|
11049
11181
|
MK: {
|
|
11050
|
-
name: "Nord-Makedonia (
|
|
11182
|
+
name: "Nord-Makedonia (\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430)",
|
|
11051
11183
|
id: "MK",
|
|
11052
11184
|
dialCode: "+389"
|
|
11053
11185
|
},
|
|
@@ -11136,7 +11268,7 @@ var COUNTRIES = {
|
|
|
11136
11268
|
},
|
|
11137
11269
|
LC: { name: "Saint Lucia", id: "LC", dialCode: "+1758" },
|
|
11138
11270
|
MF: {
|
|
11139
|
-
name: "Saint
|
|
11271
|
+
name: "Saint-Martin (Collectivit\xE9 de Saint-Martin)",
|
|
11140
11272
|
id: "MF",
|
|
11141
11273
|
dialCode: "+590"
|
|
11142
11274
|
},
|
|
@@ -11319,8 +11451,8 @@ var PhoneInput = ({
|
|
|
11319
11451
|
}) => {
|
|
11320
11452
|
var _a;
|
|
11321
11453
|
const { t } = useTranslation();
|
|
11322
|
-
const tGroupLabel = groupLabel != null ? groupLabel : t(
|
|
11323
|
-
const tSelectLabel = selectLabel != null ? selectLabel : t(
|
|
11454
|
+
const tGroupLabel = groupLabel != null ? groupLabel : t(texts19.countryCodeAndPhoneNumber);
|
|
11455
|
+
const tSelectLabel = selectLabel != null ? selectLabel : t(texts19.countryCode);
|
|
11324
11456
|
const generatedId = (0, import_react74.useId)();
|
|
11325
11457
|
const uniqueId = (_a = props.id) != null ? _a : generatedId;
|
|
11326
11458
|
const phoneInputId = `${uniqueId}-phone-input`;
|
|
@@ -11493,7 +11625,7 @@ var getCallingCode = (s) => {
|
|
|
11493
11625
|
var _a;
|
|
11494
11626
|
return (_a = s.substring(s.indexOf("+"), s.length)) != null ? _a : "";
|
|
11495
11627
|
};
|
|
11496
|
-
var
|
|
11628
|
+
var texts19 = createTexts({
|
|
11497
11629
|
countryCode: {
|
|
11498
11630
|
nb: "Landskode",
|
|
11499
11631
|
no: "Landskode",
|
|
@@ -11817,6 +11949,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11817
11949
|
...rest
|
|
11818
11950
|
} = props;
|
|
11819
11951
|
const { t } = useTranslation();
|
|
11952
|
+
const stepNumber = index + 1;
|
|
11820
11953
|
const { activeStep, handleStepChange, direction } = useProgressTrackerContext();
|
|
11821
11954
|
const active = activeStep === index;
|
|
11822
11955
|
const itemState = toItemState(active, completed, disabled);
|
|
@@ -11833,7 +11966,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11833
11966
|
if (icon !== void 0) {
|
|
11834
11967
|
return /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(Icon, { icon, iconSize: "small" });
|
|
11835
11968
|
}
|
|
11836
|
-
return
|
|
11969
|
+
return stepNumber;
|
|
11837
11970
|
}, [completed, icon, index]);
|
|
11838
11971
|
function getTextColor2() {
|
|
11839
11972
|
if (disabled) return "text-subtle";
|
|
@@ -11856,7 +11989,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11856
11989
|
children: stepNumberContent
|
|
11857
11990
|
}
|
|
11858
11991
|
),
|
|
11859
|
-
/* @__PURE__ */ (0, import_jsx_runtime292.
|
|
11992
|
+
/* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
|
|
11860
11993
|
Typography,
|
|
11861
11994
|
{
|
|
11862
11995
|
as: "div",
|
|
@@ -11866,14 +11999,11 @@ var ProgressTrackerItem = (props) => {
|
|
|
11866
11999
|
isInactiveLink && ProgressTracker_default["item-text--inactive-link"]
|
|
11867
12000
|
),
|
|
11868
12001
|
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
|
-
]
|
|
12002
|
+
children
|
|
11874
12003
|
}
|
|
11875
12004
|
)
|
|
11876
12005
|
] });
|
|
12006
|
+
const ariaLabel = props["aria-label"] ? props["aria-label"] : `${children}, ${stepNumber}. ${completed ? t(texts20.completed) : t(texts20.uncompleted)}`;
|
|
11877
12007
|
return /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
|
|
11878
12008
|
Box,
|
|
11879
12009
|
{
|
|
@@ -11900,6 +12030,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11900
12030
|
htmlProps,
|
|
11901
12031
|
rest
|
|
11902
12032
|
),
|
|
12033
|
+
"aria-label": ariaLabel,
|
|
11903
12034
|
onClick: () => handleClick(),
|
|
11904
12035
|
disabled,
|
|
11905
12036
|
children: stepContent
|
|
@@ -11913,6 +12044,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11913
12044
|
htmlProps,
|
|
11914
12045
|
rest
|
|
11915
12046
|
),
|
|
12047
|
+
"aria-label": ariaLabel,
|
|
11916
12048
|
children: stepContent
|
|
11917
12049
|
}
|
|
11918
12050
|
)
|
|
@@ -11920,24 +12052,18 @@ var ProgressTrackerItem = (props) => {
|
|
|
11920
12052
|
);
|
|
11921
12053
|
};
|
|
11922
12054
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
11923
|
-
var
|
|
11924
|
-
stepTextBefore: (index) => ({
|
|
11925
|
-
nb: `${index}. trinn, `,
|
|
11926
|
-
no: `${index}. trinn, `,
|
|
11927
|
-
nn: `${index}. trinn, `,
|
|
11928
|
-
en: `${index}. step, `
|
|
11929
|
-
}),
|
|
12055
|
+
var texts20 = createTexts({
|
|
11930
12056
|
uncompleted: {
|
|
11931
|
-
nb: "
|
|
11932
|
-
no: "
|
|
11933
|
-
nn: "
|
|
11934
|
-
en: "uncompleted"
|
|
12057
|
+
nb: "trinn ikke ferdig",
|
|
12058
|
+
no: "trinn ikke ferdig",
|
|
12059
|
+
nn: "trinn ikkje ferdig",
|
|
12060
|
+
en: "step uncompleted"
|
|
11935
12061
|
},
|
|
11936
12062
|
completed: {
|
|
11937
|
-
nb: "
|
|
11938
|
-
no: "
|
|
11939
|
-
nn: "
|
|
11940
|
-
en: "
|
|
12063
|
+
nb: "trinn ferdig",
|
|
12064
|
+
no: "trinn ferdig",
|
|
12065
|
+
nn: "trinn ferdig",
|
|
12066
|
+
en: "step completed"
|
|
11941
12067
|
}
|
|
11942
12068
|
});
|
|
11943
12069
|
|
|
@@ -11983,7 +12109,7 @@ var ProgressTracker = (() => {
|
|
|
11983
12109
|
children: /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
|
|
11984
12110
|
"nav",
|
|
11985
12111
|
{
|
|
11986
|
-
"aria-label": ariaLabel != null ? ariaLabel : t(
|
|
12112
|
+
"aria-label": ariaLabel != null ? ariaLabel : t(texts21.stepProgression),
|
|
11987
12113
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
11988
12114
|
children: /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
|
|
11989
12115
|
Box,
|
|
@@ -12021,7 +12147,7 @@ function passIndexPropToProgressTrackerItem(children) {
|
|
|
12021
12147
|
})
|
|
12022
12148
|
);
|
|
12023
12149
|
}
|
|
12024
|
-
var
|
|
12150
|
+
var texts21 = createTexts({
|
|
12025
12151
|
stepProgression: {
|
|
12026
12152
|
nb: "Stegprogresjon",
|
|
12027
12153
|
no: "Stegprogresjon",
|
|
@@ -12236,7 +12362,7 @@ var SearchSuggestions = ({
|
|
|
12236
12362
|
{
|
|
12237
12363
|
index,
|
|
12238
12364
|
focus: focus === index && showSuggestions,
|
|
12239
|
-
"aria-label": t(
|
|
12365
|
+
"aria-label": t(texts22.search(suggestion)),
|
|
12240
12366
|
onClick: onSuggestionClick,
|
|
12241
12367
|
"aria-setsize": suggestionsToRender.length,
|
|
12242
12368
|
"aria-posinset": index,
|
|
@@ -12250,7 +12376,7 @@ var SearchSuggestions = ({
|
|
|
12250
12376
|
);
|
|
12251
12377
|
};
|
|
12252
12378
|
SearchSuggestions.displayName = "SearchSuggestions";
|
|
12253
|
-
var
|
|
12379
|
+
var texts22 = createTexts({
|
|
12254
12380
|
search: (suggestion) => ({
|
|
12255
12381
|
no: `${suggestion} s\xF8k`,
|
|
12256
12382
|
nb: `${suggestion} s\xF8k`,
|
|
@@ -12396,13 +12522,13 @@ var Search = ({
|
|
|
12396
12522
|
componentSize
|
|
12397
12523
|
}
|
|
12398
12524
|
),
|
|
12399
|
-
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(VisuallyHidden, { id: suggestionsDescriptionId, children: t(
|
|
12525
|
+
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(VisuallyHidden, { id: suggestionsDescriptionId, children: t(texts23.useArrowKeys) })
|
|
12400
12526
|
] }),
|
|
12401
12527
|
hasValue && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
12402
12528
|
ClearButton,
|
|
12403
12529
|
{
|
|
12404
12530
|
size: getIconSize2(componentSize),
|
|
12405
|
-
"aria-label": t(
|
|
12531
|
+
"aria-label": t(texts23.clearSearch),
|
|
12406
12532
|
onClick: clearInput,
|
|
12407
12533
|
className: Search_default["clear-button"]
|
|
12408
12534
|
}
|
|
@@ -12431,7 +12557,7 @@ var Search = ({
|
|
|
12431
12557
|
size: componentSize,
|
|
12432
12558
|
onClick,
|
|
12433
12559
|
...otherButtonProps,
|
|
12434
|
-
children: buttonLabel != null ? buttonLabel : t(
|
|
12560
|
+
children: buttonLabel != null ? buttonLabel : t(texts23.search)
|
|
12435
12561
|
}
|
|
12436
12562
|
)
|
|
12437
12563
|
]
|
|
@@ -12442,7 +12568,7 @@ var Search = ({
|
|
|
12442
12568
|
] });
|
|
12443
12569
|
};
|
|
12444
12570
|
Search.displayName = "Search";
|
|
12445
|
-
var
|
|
12571
|
+
var texts23 = createTexts({
|
|
12446
12572
|
clearSearch: {
|
|
12447
12573
|
nb: "T\xF8m s\xF8k",
|
|
12448
12574
|
no: "T\xF8m s\xF8k",
|
|
@@ -12651,7 +12777,7 @@ var SplitButton = ({
|
|
|
12651
12777
|
{
|
|
12652
12778
|
...buttonStyleProps,
|
|
12653
12779
|
icon: isOpen ? ChevronUpIcon : ChevronDownIcon,
|
|
12654
|
-
"aria-label": t(
|
|
12780
|
+
"aria-label": t(texts24.moreActions),
|
|
12655
12781
|
purpose,
|
|
12656
12782
|
className: cn(
|
|
12657
12783
|
SplitButton_default.option,
|
|
@@ -12665,7 +12791,7 @@ var SplitButton = ({
|
|
|
12665
12791
|
] });
|
|
12666
12792
|
};
|
|
12667
12793
|
SplitButton.displayName = "SplitButton";
|
|
12668
|
-
var
|
|
12794
|
+
var texts24 = createTexts({
|
|
12669
12795
|
moreActions: {
|
|
12670
12796
|
nb: "Flere handlinger",
|
|
12671
12797
|
no: "Flere handlinger",
|
|
@@ -12823,7 +12949,7 @@ var SortCell = ({
|
|
|
12823
12949
|
StylelessButton,
|
|
12824
12950
|
{
|
|
12825
12951
|
onClick,
|
|
12826
|
-
"aria-description": t(
|
|
12952
|
+
"aria-description": t(texts25.changeSort),
|
|
12827
12953
|
className: cn(Table_default["sort-button"], focusable),
|
|
12828
12954
|
children: [
|
|
12829
12955
|
children,
|
|
@@ -12836,7 +12962,7 @@ var SortCell = ({
|
|
|
12836
12962
|
);
|
|
12837
12963
|
};
|
|
12838
12964
|
SortCell.displayName = "Table.SortCell";
|
|
12839
|
-
var
|
|
12965
|
+
var texts25 = createTexts({
|
|
12840
12966
|
changeSort: {
|
|
12841
12967
|
nb: "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
|
|
12842
12968
|
no: "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
|
|
@@ -12984,8 +13110,8 @@ var CollapsibleRow = ({
|
|
|
12984
13110
|
return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(Row, { ref, ...rowProps(), children: /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(import_jsx_runtime310.Fragment, { children: [
|
|
12985
13111
|
definingColumnCells,
|
|
12986
13112
|
/* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(Table2.Cell, { type: "head", layout: "center", children: [
|
|
12987
|
-
t(
|
|
12988
|
-
/* @__PURE__ */ (0, import_jsx_runtime310.jsx)(VisuallyHidden, { children: t(
|
|
13113
|
+
t(texts26.expand),
|
|
13114
|
+
/* @__PURE__ */ (0, import_jsx_runtime310.jsx)(VisuallyHidden, { children: t(texts26.row) })
|
|
12989
13115
|
] })
|
|
12990
13116
|
] }) });
|
|
12991
13117
|
};
|
|
@@ -13022,7 +13148,7 @@ var CollapsibleRow = ({
|
|
|
13022
13148
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(Row, { ref, ...rowProps(), children });
|
|
13023
13149
|
};
|
|
13024
13150
|
CollapsibleRow.displayName = "CollapsibleTable.Row";
|
|
13025
|
-
var
|
|
13151
|
+
var texts26 = createTexts({
|
|
13026
13152
|
expand: {
|
|
13027
13153
|
nb: "Utvid",
|
|
13028
13154
|
no: "Utvid",
|