@norges-domstoler/dds-components 0.0.0-dev-20261023131717 → 0.0.0-dev-20261026090253
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.cjs +196 -106
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +8 -0
- package/dist/index.d.cts +30 -2
- package/dist/index.d.mts +30 -2
- package/dist/index.mjs +194 -107
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2245,6 +2245,20 @@ function ArrowDownIcon(props) {
|
|
|
2245
2245
|
});
|
|
2246
2246
|
}
|
|
2247
2247
|
//#endregion
|
|
2248
|
+
//#region src/components/Icon/icons/arrowDownUp.tsx
|
|
2249
|
+
/** Arrows and chevron. Search terms: pil, arrow, ned, down. */
|
|
2250
|
+
function ArrowDownUpIcon(props) {
|
|
2251
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgWrapper, {
|
|
2252
|
+
...props,
|
|
2253
|
+
children: [
|
|
2254
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M10.4697 15.4697C10.7626 15.1768 11.2374 15.1768 11.5303 15.4697C11.8232 15.7626 11.8232 16.2374 11.5303 16.5303L7.53028 20.5303C7.23738 20.8232 6.76262 20.8232 6.46973 20.5303L2.46973 16.5303C2.17684 16.2374 2.17684 15.7626 2.46973 15.4697C2.76262 15.1768 3.23738 15.1768 3.53028 15.4697L7 18.9394L10.4697 15.4697Z" }),
|
|
2255
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M6.25 20V3.99999C6.25 3.58578 6.58579 3.24999 7 3.24999C7.41422 3.24999 7.75 3.58578 7.75 3.99999V20C7.75 20.4142 7.41422 20.75 7 20.75C6.58579 20.75 6.25 20.4142 6.25 20Z" }),
|
|
2256
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M16.5264 3.41796C16.821 3.17765 17.2557 3.19512 17.5303 3.46972L21.5303 7.46972C21.8232 7.76261 21.8232 8.23737 21.5303 8.53027C21.2374 8.82316 20.7626 8.82316 20.4697 8.53027L17 5.06054L13.5303 8.53027C13.2374 8.82316 12.7626 8.82316 12.4697 8.53027C12.1768 8.23737 12.1768 7.76261 12.4697 7.46972L16.4697 3.46972L16.5264 3.41796Z" }),
|
|
2257
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M16.25 20V3.99999C16.25 3.58578 16.5858 3.24999 17 3.24999C17.4142 3.24999 17.75 3.58578 17.75 3.99999V20C17.75 20.4142 17.4142 20.75 17 20.75C16.5858 20.75 16.25 20.4142 16.25 20Z" })
|
|
2258
|
+
]
|
|
2259
|
+
});
|
|
2260
|
+
}
|
|
2261
|
+
//#endregion
|
|
2248
2262
|
//#region src/components/Icon/icons/arrowLeft.tsx
|
|
2249
2263
|
/** Arrows and chevron. Search terms: pil, arrow, venstre, left, tilbake, back. */
|
|
2250
2264
|
function ArrowLeftIcon(props) {
|
|
@@ -2272,6 +2286,20 @@ function ArrowUpIcon(props) {
|
|
|
2272
2286
|
});
|
|
2273
2287
|
}
|
|
2274
2288
|
//#endregion
|
|
2289
|
+
//#region src/components/Icon/icons/arrowUpDown.tsx
|
|
2290
|
+
/** Arrows and chevron. Search terms: pil, arrow, ned, down. */
|
|
2291
|
+
function ArrowUpDownIcon(props) {
|
|
2292
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgWrapper, {
|
|
2293
|
+
...props,
|
|
2294
|
+
children: [
|
|
2295
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M20.4697 15.4697C20.7626 15.1768 21.2374 15.1768 21.5303 15.4697C21.8232 15.7626 21.8232 16.2374 21.5303 16.5303L17.5303 20.5303C17.2374 20.8232 16.7626 20.8232 16.4697 20.5303L12.4697 16.5303C12.1768 16.2374 12.1768 15.7626 12.4697 15.4697C12.7626 15.1768 13.2374 15.1768 13.5303 15.4697L17 18.9394L20.4697 15.4697Z" }),
|
|
2296
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M16.25 20V3.99999C16.25 3.58578 16.5858 3.24999 17 3.24999C17.4142 3.24999 17.75 3.58578 17.75 3.99999V20C17.75 20.4142 17.4142 20.75 17 20.75C16.5858 20.75 16.25 20.4142 16.25 20Z" }),
|
|
2297
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M6.52637 3.41796C6.82095 3.17765 7.25567 3.19512 7.53028 3.46972L11.5303 7.46972C11.8232 7.76261 11.8232 8.23737 11.5303 8.53027C11.2374 8.82316 10.7626 8.82316 10.4697 8.53027L7 5.06054L3.53028 8.53027C3.23738 8.82316 2.76262 8.82316 2.46973 8.53027C2.17684 8.23737 2.17684 7.76261 2.46973 7.46972L6.46973 3.46972L6.52637 3.41796Z" }),
|
|
2298
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M6.25 20V3.99999C6.25 3.58578 6.58579 3.24999 7 3.24999C7.41422 3.24999 7.75 3.58578 7.75 3.99999V20C7.75 20.4142 7.41422 20.75 7 20.75C6.58579 20.75 6.25 20.4142 6.25 20Z" })
|
|
2299
|
+
]
|
|
2300
|
+
});
|
|
2301
|
+
}
|
|
2302
|
+
//#endregion
|
|
2275
2303
|
//#region src/components/Icon/icons/arrowUpRight.tsx
|
|
2276
2304
|
/** Arrows and chevron. Search terms: pil, arrow, opp, up, høyre, right. */
|
|
2277
2305
|
function ArrowUpRightIcon(props) {
|
|
@@ -4159,8 +4187,10 @@ var icons_exports = /* @__PURE__ */ __exportAll({
|
|
|
4159
4187
|
AppsIcon: () => AppsIcon,
|
|
4160
4188
|
ArchiveIcon: () => ArchiveIcon,
|
|
4161
4189
|
ArrowDownIcon: () => ArrowDownIcon,
|
|
4190
|
+
ArrowDownUpIcon: () => ArrowDownUpIcon,
|
|
4162
4191
|
ArrowLeftIcon: () => ArrowLeftIcon,
|
|
4163
4192
|
ArrowRightIcon: () => ArrowRightIcon,
|
|
4193
|
+
ArrowUpDownIcon: () => ArrowUpDownIcon,
|
|
4164
4194
|
ArrowUpIcon: () => ArrowUpIcon,
|
|
4165
4195
|
ArrowUpRightIcon: () => ArrowUpRightIcon,
|
|
4166
4196
|
AttachmentIcon: () => AttachmentIcon,
|
|
@@ -4464,7 +4494,7 @@ const BackLink = ({ label, ref, as = "a", ...rest }) => {
|
|
|
4464
4494
|
const { t } = useTranslation();
|
|
4465
4495
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
4466
4496
|
ref,
|
|
4467
|
-
"aria-label": t(texts$
|
|
4497
|
+
"aria-label": t(texts$30.goBack),
|
|
4468
4498
|
className: typographyStyles_module_default["body-short-medium"],
|
|
4469
4499
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
4470
4500
|
as,
|
|
@@ -4480,7 +4510,7 @@ const BackLink = ({ label, ref, as = "a", ...rest }) => {
|
|
|
4480
4510
|
});
|
|
4481
4511
|
};
|
|
4482
4512
|
BackLink.displayName = "BackLink";
|
|
4483
|
-
const texts$
|
|
4513
|
+
const texts$30 = createTexts({ goBack: {
|
|
4484
4514
|
nb: "Gå tilbake",
|
|
4485
4515
|
no: "Gå tilbake",
|
|
4486
4516
|
nn: "Gå tilbake",
|
|
@@ -4811,7 +4841,7 @@ var common_module_default = {
|
|
|
4811
4841
|
const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "medium", iconPosition = "left", loading, loadingTooltip, fullWidth = false, icon, iconState, onClick, onFocus, onBlur, badgeProps, id, ref, className, style, htmlProps, ...props }) => {
|
|
4812
4842
|
const { purpose: groupPurpose, size: groupSize } = useButtonGroupContext();
|
|
4813
4843
|
const { t } = useTranslation();
|
|
4814
|
-
const spinnerTooltip = loadingTooltip ?? t(texts$
|
|
4844
|
+
const spinnerTooltip = loadingTooltip ?? t(texts$29.saving);
|
|
4815
4845
|
const hasLabel = !!children;
|
|
4816
4846
|
const hasIcon = !!icon;
|
|
4817
4847
|
const hasLabelAndIcon = hasIcon && hasLabel;
|
|
@@ -4868,7 +4898,7 @@ const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "m
|
|
|
4868
4898
|
});
|
|
4869
4899
|
};
|
|
4870
4900
|
Button.displayName = "Button";
|
|
4871
|
-
const texts$
|
|
4901
|
+
const texts$29 = createTexts({ saving: {
|
|
4872
4902
|
no: "Lagring pågår",
|
|
4873
4903
|
nb: "Lagring pågår",
|
|
4874
4904
|
nn: "Lagring pågår",
|
|
@@ -5265,7 +5295,7 @@ const Breadcrumbs = ({ children, smallScreenBreakpoint, id, className, style, ht
|
|
|
5265
5295
|
size: "xsmall",
|
|
5266
5296
|
icon: MoreHorizontalIcon,
|
|
5267
5297
|
purpose: "tertiary",
|
|
5268
|
-
"aria-label": bChildrenTruncated.length > 1 ? t(texts$
|
|
5298
|
+
"aria-label": bChildrenTruncated.length > 1 ? t(texts$28.showHiddenTo(bChildren.length - 1)) : t(texts$28.showHidden)
|
|
5269
5299
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverflowMenu, {
|
|
5270
5300
|
portal: false,
|
|
5271
5301
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverflowMenuList, { children: bChildrenTruncated })
|
|
@@ -5285,7 +5315,7 @@ const Breadcrumbs = ({ children, smallScreenBreakpoint, id, className, style, ht
|
|
|
5285
5315
|
};
|
|
5286
5316
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("nav", {
|
|
5287
5317
|
...getBaseHTMLProps(id, cn(className, typographyStyles_module_default["body-short-medium"]), style, htmlProps, rest),
|
|
5288
|
-
"aria-label": t(texts$
|
|
5318
|
+
"aria-label": t(texts$28.breadcrumbs),
|
|
5289
5319
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
|
|
5290
5320
|
...responsiveListProps,
|
|
5291
5321
|
hideBelow: hasSmallScreenBreakpoint ? smallScreenBreakpoint : void 0,
|
|
@@ -5298,7 +5328,7 @@ const Breadcrumbs = ({ children, smallScreenBreakpoint, id, className, style, ht
|
|
|
5298
5328
|
});
|
|
5299
5329
|
};
|
|
5300
5330
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
5301
|
-
const texts$
|
|
5331
|
+
const texts$28 = createTexts({
|
|
5302
5332
|
breadcrumbs: {
|
|
5303
5333
|
nb: "Brødsmulesti",
|
|
5304
5334
|
no: "Brødsmulesti",
|
|
@@ -6037,7 +6067,7 @@ const ChipRemovable = ({ htmlProps = {}, onClose, size = "medium", id, className
|
|
|
6037
6067
|
icon: CloseIcon,
|
|
6038
6068
|
color: "icon-default",
|
|
6039
6069
|
onClick,
|
|
6040
|
-
"aria-label": ariaLabel ?? t(texts$
|
|
6070
|
+
"aria-label": ariaLabel ?? t(texts$27.removeChip) + (children ? ` ${children}` : "")
|
|
6041
6071
|
})]
|
|
6042
6072
|
}) : null;
|
|
6043
6073
|
};
|
|
@@ -6045,7 +6075,7 @@ ChipRemovable.displayName = "ChipRemovable";
|
|
|
6045
6075
|
ChipRadio.displayName = "ChipRadio";
|
|
6046
6076
|
ChipCheckbox.displayName = "ChipCheckbox";
|
|
6047
6077
|
ChipButton.displayName = "ChipButton";
|
|
6048
|
-
const texts$
|
|
6078
|
+
const texts$27 = createTexts({ removeChip: {
|
|
6049
6079
|
nb: "Fjern merkelapp",
|
|
6050
6080
|
no: "Fjern merkelapp",
|
|
6051
6081
|
nn: "Fjern merkelapp",
|
|
@@ -6158,7 +6188,7 @@ function CookieBanner({ headerText, description, buttons, checkboxes, id, classN
|
|
|
6158
6188
|
children: [heading, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, {
|
|
6159
6189
|
as: Button,
|
|
6160
6190
|
showBelow: collapsedBreakpoint,
|
|
6161
|
-
"aria-label": t(texts$
|
|
6191
|
+
"aria-label": t(texts$26.expandConsent),
|
|
6162
6192
|
purpose: "tertiary",
|
|
6163
6193
|
icon: ExpandIcon,
|
|
6164
6194
|
onClick: () => setIsCollapsedOnBreakpoint(false),
|
|
@@ -6194,7 +6224,7 @@ function CookieBanner({ headerText, description, buttons, checkboxes, id, classN
|
|
|
6194
6224
|
});
|
|
6195
6225
|
}
|
|
6196
6226
|
CookieBanner.displayName = "CookieBanner";
|
|
6197
|
-
const texts$
|
|
6227
|
+
const texts$26 = createTexts({ expandConsent: {
|
|
6198
6228
|
nb: "Utvid samtykke for bruk av informasjonskapsler",
|
|
6199
6229
|
no: "Utvid samtykke for bruk av informasjonskapsler",
|
|
6200
6230
|
nn: "Utvid samtykke for bruk av informasjonskapslar",
|
|
@@ -6427,32 +6457,32 @@ function CalendarGrid({ state, ...props }) {
|
|
|
6427
6457
|
const weeksInMonth = (0, _internationalized_date.getWeeksInMonth)(state.visibleRange.start, locale);
|
|
6428
6458
|
const weekDays = [
|
|
6429
6459
|
{
|
|
6430
|
-
short: t(texts$
|
|
6431
|
-
full: t(texts$
|
|
6460
|
+
short: t(texts$25.mo),
|
|
6461
|
+
full: t(texts$25.monday)
|
|
6432
6462
|
},
|
|
6433
6463
|
{
|
|
6434
|
-
short: t(texts$
|
|
6435
|
-
full: t(texts$
|
|
6464
|
+
short: t(texts$25.tu),
|
|
6465
|
+
full: t(texts$25.tuesday)
|
|
6436
6466
|
},
|
|
6437
6467
|
{
|
|
6438
|
-
short: t(texts$
|
|
6439
|
-
full: t(texts$
|
|
6468
|
+
short: t(texts$25.we),
|
|
6469
|
+
full: t(texts$25.wednesday)
|
|
6440
6470
|
},
|
|
6441
6471
|
{
|
|
6442
|
-
short: t(texts$
|
|
6443
|
-
full: t(texts$
|
|
6472
|
+
short: t(texts$25.th),
|
|
6473
|
+
full: t(texts$25.thursday)
|
|
6444
6474
|
},
|
|
6445
6475
|
{
|
|
6446
|
-
short: t(texts$
|
|
6447
|
-
full: t(texts$
|
|
6476
|
+
short: t(texts$25.fr),
|
|
6477
|
+
full: t(texts$25.friday)
|
|
6448
6478
|
},
|
|
6449
6479
|
{
|
|
6450
|
-
short: t(texts$
|
|
6451
|
-
full: t(texts$
|
|
6480
|
+
short: t(texts$25.sa),
|
|
6481
|
+
full: t(texts$25.saturday)
|
|
6452
6482
|
},
|
|
6453
6483
|
{
|
|
6454
|
-
short: t(texts$
|
|
6455
|
-
full: t(texts$
|
|
6484
|
+
short: t(texts$25.su),
|
|
6485
|
+
full: t(texts$25.sunday)
|
|
6456
6486
|
}
|
|
6457
6487
|
];
|
|
6458
6488
|
const { showWeekNumbers, onClose } = (0, react.useContext)(CalendarPopoverContext);
|
|
@@ -6471,7 +6501,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
6471
6501
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6472
6502
|
"aria-hidden": true,
|
|
6473
6503
|
children: "#"
|
|
6474
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$
|
|
6504
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$25.weekNumber) })]
|
|
6475
6505
|
}), weekDays.map((day, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CalendarCell, {
|
|
6476
6506
|
as: "th",
|
|
6477
6507
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -6495,7 +6525,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
6495
6525
|
});
|
|
6496
6526
|
}
|
|
6497
6527
|
CalendarGrid.displayName = "CalendarGrid";
|
|
6498
|
-
const texts$
|
|
6528
|
+
const texts$25 = createTexts({
|
|
6499
6529
|
weekNumber: {
|
|
6500
6530
|
nb: "Ukenummer",
|
|
6501
6531
|
no: "Ukenummer",
|
|
@@ -6638,7 +6668,7 @@ function Calendar(props) {
|
|
|
6638
6668
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
6639
6669
|
"aria-hidden": optAttr(isPrevDisabled),
|
|
6640
6670
|
type: "button",
|
|
6641
|
-
"aria-label": t(texts$
|
|
6671
|
+
"aria-label": t(texts$24.previousMonth),
|
|
6642
6672
|
onClick: (e) => onPrev?.(e),
|
|
6643
6673
|
size: "small",
|
|
6644
6674
|
purpose: "tertiary",
|
|
@@ -6655,7 +6685,7 @@ function Calendar(props) {
|
|
|
6655
6685
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
6656
6686
|
type: "button",
|
|
6657
6687
|
"aria-hidden": optAttr(isNextDisabled),
|
|
6658
|
-
"aria-label": t(texts$
|
|
6688
|
+
"aria-label": t(texts$24.nextMonth),
|
|
6659
6689
|
onClick: (e) => onNext?.(e),
|
|
6660
6690
|
size: "small",
|
|
6661
6691
|
purpose: "tertiary",
|
|
@@ -6667,7 +6697,7 @@ function Calendar(props) {
|
|
|
6667
6697
|
});
|
|
6668
6698
|
}
|
|
6669
6699
|
Calendar.displayName = "Calendar";
|
|
6670
|
-
const texts$
|
|
6700
|
+
const texts$24 = createTexts({
|
|
6671
6701
|
nextMonth: {
|
|
6672
6702
|
nb: "Neste måned",
|
|
6673
6703
|
no: "Neste måned",
|
|
@@ -6711,16 +6741,16 @@ function formatDateFieldSegments(segments) {
|
|
|
6711
6741
|
const formattedDaySegment = {
|
|
6712
6742
|
...daySegment,
|
|
6713
6743
|
text: daySegment.text.padStart(2, "0"),
|
|
6714
|
-
placeholder: t(texts$
|
|
6744
|
+
placeholder: t(texts$23.dayPlaceholder)
|
|
6715
6745
|
};
|
|
6716
6746
|
const formattedMonthSegment = {
|
|
6717
6747
|
...monthSegment,
|
|
6718
6748
|
text: monthSegment.text.padStart(2, "0"),
|
|
6719
|
-
placeholder: t(texts$
|
|
6749
|
+
placeholder: t(texts$23.monthPlaceholder)
|
|
6720
6750
|
};
|
|
6721
6751
|
const formattedYearSegment = {
|
|
6722
6752
|
...yearSegment,
|
|
6723
|
-
placeholder: t(texts$
|
|
6753
|
+
placeholder: t(texts$23.yearPlaceholder)
|
|
6724
6754
|
};
|
|
6725
6755
|
const formattedSeparatorSegment = {
|
|
6726
6756
|
...separatorSegment,
|
|
@@ -6734,7 +6764,7 @@ function formatDateFieldSegments(segments) {
|
|
|
6734
6764
|
formattedYearSegment
|
|
6735
6765
|
];
|
|
6736
6766
|
}
|
|
6737
|
-
const texts$
|
|
6767
|
+
const texts$23 = createTexts({
|
|
6738
6768
|
dayPlaceholder: {
|
|
6739
6769
|
nb: "dd",
|
|
6740
6770
|
no: "dd",
|
|
@@ -6914,7 +6944,7 @@ function DateField({ componentSize = "medium", buttonProps, groupProps, ref, cle
|
|
|
6914
6944
|
}),
|
|
6915
6945
|
suffix: showClearButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClearButton, {
|
|
6916
6946
|
absolute: true,
|
|
6917
|
-
"aria-label": t(texts$
|
|
6947
|
+
"aria-label": t(texts$22.clearDate),
|
|
6918
6948
|
"aria-hidden": !hasValue,
|
|
6919
6949
|
className: cn(!hasValue && utilStyles_module_default.invisible),
|
|
6920
6950
|
size: componentSize,
|
|
@@ -6933,7 +6963,7 @@ function DateField({ componentSize = "medium", buttonProps, groupProps, ref, cle
|
|
|
6933
6963
|
});
|
|
6934
6964
|
}
|
|
6935
6965
|
DateField.displayName = "DateField";
|
|
6936
|
-
const texts$
|
|
6966
|
+
const texts$22 = createTexts({ clearDate: {
|
|
6937
6967
|
en: "Clear date",
|
|
6938
6968
|
nb: "Tøm dato",
|
|
6939
6969
|
no: "Tøm dato",
|
|
@@ -7217,7 +7247,8 @@ var Table_module_default = {
|
|
|
7217
7247
|
"cell--right": "dds-Table-module__cell--right",
|
|
7218
7248
|
"cell--center": "dds-Table-module__cell--center",
|
|
7219
7249
|
"cell__inner": "dds-Table-module__cell__inner",
|
|
7220
|
-
"sort-button": "dds-Table-module__sort-button"
|
|
7250
|
+
"sort-button": "dds-Table-module__sort-button",
|
|
7251
|
+
"filter-cell": "dds-Table-module__filter-cell"
|
|
7221
7252
|
};
|
|
7222
7253
|
//#endregion
|
|
7223
7254
|
//#region src/components/DetailList/DetailList.tsx
|
|
@@ -7489,7 +7520,7 @@ const ErrorSummary = ({ heading: pHeading, className, style, children, id, htmlP
|
|
|
7489
7520
|
}) : pHeading ? pHeading : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Heading, {
|
|
7490
7521
|
level: 2,
|
|
7491
7522
|
typographyType: "heading-small",
|
|
7492
|
-
children: t(texts$
|
|
7523
|
+
children: t(texts$21.toProceedCorrectErrors)
|
|
7493
7524
|
});
|
|
7494
7525
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Paper, {
|
|
7495
7526
|
...getBaseHTMLProps(id, cn(className, ErrorSummary_module_default.container), style, htmlProps, props),
|
|
@@ -7499,7 +7530,7 @@ const ErrorSummary = ({ heading: pHeading, className, style, children, id, htmlP
|
|
|
7499
7530
|
});
|
|
7500
7531
|
};
|
|
7501
7532
|
ErrorSummary.displayName = "ErrorSummary";
|
|
7502
|
-
const texts$
|
|
7533
|
+
const texts$21 = createTexts({ toProceedCorrectErrors: {
|
|
7503
7534
|
nb: "For å gå videre må du rette opp følgende feil:",
|
|
7504
7535
|
no: "For å gå videre må du rette opp følgende feil:",
|
|
7505
7536
|
nn: "For å gå vidare må du rette opp følgjande feil:",
|
|
@@ -7545,7 +7576,7 @@ const FavStar = ({ id, className, style, onChange, checked: checkedProp, default
|
|
|
7545
7576
|
checked,
|
|
7546
7577
|
onChange: (e) => setChecked(e.target.checked),
|
|
7547
7578
|
type: "checkbox",
|
|
7548
|
-
"aria-label": props["aria-label"] ?? t(texts$
|
|
7579
|
+
"aria-label": props["aria-label"] ?? t(texts$20.favourite)
|
|
7549
7580
|
}),
|
|
7550
7581
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
7551
7582
|
iconSize,
|
|
@@ -7561,7 +7592,7 @@ const FavStar = ({ id, className, style, onChange, checked: checkedProp, default
|
|
|
7561
7592
|
});
|
|
7562
7593
|
};
|
|
7563
7594
|
FavStar.displayName = "FavStar";
|
|
7564
|
-
const texts$
|
|
7595
|
+
const texts$20 = createTexts({ favourite: {
|
|
7565
7596
|
nb: "Stjernemarker",
|
|
7566
7597
|
no: "Stjernemarker",
|
|
7567
7598
|
nn: "Stjernemerk",
|
|
@@ -7603,7 +7634,7 @@ function CharCounter(props) {
|
|
|
7603
7634
|
"/",
|
|
7604
7635
|
max
|
|
7605
7636
|
]
|
|
7606
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$
|
|
7637
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$19.charsWritten(current, max, max - current)) })]
|
|
7607
7638
|
});
|
|
7608
7639
|
}
|
|
7609
7640
|
const renderCharCounter = (id, isShown, textLength, maxLength) => {
|
|
@@ -7613,7 +7644,7 @@ const renderCharCounter = (id, isShown, textLength, maxLength) => {
|
|
|
7613
7644
|
current: textLength
|
|
7614
7645
|
});
|
|
7615
7646
|
};
|
|
7616
|
-
const texts$
|
|
7647
|
+
const texts$19 = createTexts({ charsWritten: (current, max, remain) => ({
|
|
7617
7648
|
nb: `${current} av ${max} tegn skrevet. ${remain} igjen.`,
|
|
7618
7649
|
no: `${current} av ${max} tegn skrevet. ${remain} igjen.`,
|
|
7619
7650
|
nn: `${current} av ${max} teikn skrivne. ${remain} att.`,
|
|
@@ -7715,12 +7746,12 @@ const CommentComponent = ({ rating, feedbackText, positiveFeedbackLabel, negativ
|
|
|
7715
7746
|
size: "small",
|
|
7716
7747
|
onClick: handleSubmit,
|
|
7717
7748
|
loading,
|
|
7718
|
-
children: t(texts$
|
|
7749
|
+
children: t(texts$18.send)
|
|
7719
7750
|
})
|
|
7720
7751
|
]
|
|
7721
7752
|
});
|
|
7722
7753
|
};
|
|
7723
|
-
const texts$
|
|
7754
|
+
const texts$18 = createTexts({ send: {
|
|
7724
7755
|
nb: "Send inn",
|
|
7725
7756
|
no: "Send inn",
|
|
7726
7757
|
nn: "Send inn",
|
|
@@ -7832,7 +7863,7 @@ const RatingComponent = ({ layout, ratingLabel, loading, thumbUpTooltip, thumbDo
|
|
|
7832
7863
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
7833
7864
|
className: typographyStyles_module_default["label-medium"],
|
|
7834
7865
|
children: ratingLabel
|
|
7835
|
-
}), loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, { tooltip: t(texts$
|
|
7866
|
+
}), loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, { tooltip: t(texts$17.uploadingFeedback) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
7836
7867
|
gap: "x0.75",
|
|
7837
7868
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tooltip, {
|
|
7838
7869
|
text: thumbUpTooltip,
|
|
@@ -7856,7 +7887,7 @@ const RatingComponent = ({ layout, ratingLabel, loading, thumbUpTooltip, thumbDo
|
|
|
7856
7887
|
})]
|
|
7857
7888
|
});
|
|
7858
7889
|
};
|
|
7859
|
-
const texts$
|
|
7890
|
+
const texts$17 = createTexts({ uploadingFeedback: {
|
|
7860
7891
|
nb: "Laster opp tilbakemelding...",
|
|
7861
7892
|
no: "Laster opp tilbakemelding...",
|
|
7862
7893
|
nn: "Lastar opp tilbakemelding...",
|
|
@@ -7870,14 +7901,14 @@ const Feedback = ({ layout = "vertical", ratingLabel, positiveFeedbackLabel, neg
|
|
|
7870
7901
|
const [rating, setRating] = (0, react.useState)(null);
|
|
7871
7902
|
const [feedbackText, setFeedbackText] = (0, react.useState)();
|
|
7872
7903
|
const [isFeedbackSubmitted, setIsFeedbackSubmitted] = (0, react.useState)(false);
|
|
7873
|
-
const tRatingLabel = ratingLabel ?? t(texts$
|
|
7874
|
-
const tPositiveFeedbackLabel = positiveFeedbackLabel ?? t(texts$
|
|
7875
|
-
const tNegativeFeedbackLabel = negativeFeedbackLabel ?? t(texts$
|
|
7876
|
-
const tRatingSubmittedTitle = ratingSubmittedTitle ?? t(texts$
|
|
7877
|
-
const tSubmittedTitle = submittedTitle ?? t(texts$
|
|
7878
|
-
const tTextAreaTip = textAreaTip ?? t(texts$
|
|
7879
|
-
const tThumbUpTooltip = thumbUpTooltip ?? t(texts$
|
|
7880
|
-
const tThumbDownTooltip = thumbDownTooltip ?? t(texts$
|
|
7904
|
+
const tRatingLabel = ratingLabel ?? t(texts$16.ratingQuestion);
|
|
7905
|
+
const tPositiveFeedbackLabel = positiveFeedbackLabel ?? t(texts$16.improvalQuestion);
|
|
7906
|
+
const tNegativeFeedbackLabel = negativeFeedbackLabel ?? t(texts$16.improvalQuestion);
|
|
7907
|
+
const tRatingSubmittedTitle = ratingSubmittedTitle ?? t(texts$16.thanks);
|
|
7908
|
+
const tSubmittedTitle = submittedTitle ?? t(texts$16.thanks);
|
|
7909
|
+
const tTextAreaTip = textAreaTip ?? t(texts$16.sensitiveInfo);
|
|
7910
|
+
const tThumbUpTooltip = thumbUpTooltip ?? t(texts$16.good);
|
|
7911
|
+
const tThumbDownTooltip = thumbDownTooltip ?? t(texts$16.bad);
|
|
7881
7912
|
(0, react.useEffect)(() => {
|
|
7882
7913
|
if (ratingProp !== void 0) setRating(ratingProp);
|
|
7883
7914
|
}, [ratingProp]);
|
|
@@ -7921,7 +7952,7 @@ const Feedback = ({ layout = "vertical", ratingLabel, positiveFeedbackLabel, neg
|
|
|
7921
7952
|
});
|
|
7922
7953
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Paragraph, { children: tSubmittedTitle });
|
|
7923
7954
|
};
|
|
7924
|
-
const texts$
|
|
7955
|
+
const texts$16 = createTexts({
|
|
7925
7956
|
ratingQuestion: {
|
|
7926
7957
|
nb: "Hva syns du om tjenesten?",
|
|
7927
7958
|
no: "Hva syns du om tjenesten?",
|
|
@@ -8082,10 +8113,10 @@ const File$1 = (props) => {
|
|
|
8082
8113
|
type: "button",
|
|
8083
8114
|
onClick: removeFile,
|
|
8084
8115
|
icon: CloseIcon,
|
|
8085
|
-
"aria-label": t(texts$
|
|
8116
|
+
"aria-label": t(texts$15.removeFile(stateFile.name)),
|
|
8086
8117
|
htmlProps: {
|
|
8087
8118
|
"aria-invalid": !isValid ? true : void 0,
|
|
8088
|
-
"aria-errormessage": !isValid ? t(texts$
|
|
8119
|
+
"aria-errormessage": !isValid ? t(texts$15.invalidFile) : void 0,
|
|
8089
8120
|
"aria-describedby": spaceSeparatedIdListGenerator(errorsList.map((e) => e.id))
|
|
8090
8121
|
}
|
|
8091
8122
|
})] })]
|
|
@@ -8096,11 +8127,11 @@ const File$1 = (props) => {
|
|
|
8096
8127
|
purpose: "secondary",
|
|
8097
8128
|
onClick: () => onRetry(fileId),
|
|
8098
8129
|
icon: RefreshIcon,
|
|
8099
|
-
children: t(texts$
|
|
8130
|
+
children: t(texts$15.tryAgain)
|
|
8100
8131
|
})]
|
|
8101
8132
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ErrorList, { errors: errorsList })] });
|
|
8102
8133
|
};
|
|
8103
|
-
const texts$
|
|
8134
|
+
const texts$15 = createTexts({
|
|
8104
8135
|
removeFile: (file) => ({
|
|
8105
8136
|
nb: `Fjern fil ${file}`,
|
|
8106
8137
|
no: `Fjern fil ${file}`,
|
|
@@ -8241,7 +8272,7 @@ const useFileUploader = (props) => {
|
|
|
8241
8272
|
isFileDialogActive: false,
|
|
8242
8273
|
isDragActive: false,
|
|
8243
8274
|
dragCounter: 0,
|
|
8244
|
-
rootErrors: calcRootErrors(t(texts$
|
|
8275
|
+
rootErrors: calcRootErrors(t(texts$14.invalidFileAmount), initialFileUploaderFiles, maxFiles, errorMessage)
|
|
8245
8276
|
});
|
|
8246
8277
|
const { files: stateFiles } = state;
|
|
8247
8278
|
(0, react.useEffect)(() => {
|
|
@@ -8252,7 +8283,7 @@ const useFileUploader = (props) => {
|
|
|
8252
8283
|
return {
|
|
8253
8284
|
name: file.name,
|
|
8254
8285
|
file,
|
|
8255
|
-
errors: accepted ? [] : [t(texts$
|
|
8286
|
+
errors: accepted ? [] : [t(texts$14.invalidFileType)]
|
|
8256
8287
|
};
|
|
8257
8288
|
}
|
|
8258
8289
|
return {
|
|
@@ -8275,7 +8306,7 @@ const useFileUploader = (props) => {
|
|
|
8275
8306
|
(0, react.useEffect)(() => {
|
|
8276
8307
|
dispatch({
|
|
8277
8308
|
type: "setRootErrors",
|
|
8278
|
-
payload: calcRootErrors(t(texts$
|
|
8309
|
+
payload: calcRootErrors(t(texts$14.invalidFileAmount), stateFiles, maxFiles, errorMessage)
|
|
8279
8310
|
});
|
|
8280
8311
|
}, [
|
|
8281
8312
|
dispatch,
|
|
@@ -8306,7 +8337,7 @@ const useFileUploader = (props) => {
|
|
|
8306
8337
|
const newFiles = (await (0, file_selector.fromEvent)(evt)).filter((f) => !existingFileNames.includes(f.name)).map((file) => ({
|
|
8307
8338
|
file,
|
|
8308
8339
|
name: file.name,
|
|
8309
|
-
errors: isFileAccepted(file, accept) ? [] : [t(texts$
|
|
8340
|
+
errors: isFileAccepted(file, accept) ? [] : [t(texts$14.invalidFileType)]
|
|
8310
8341
|
})).concat(stateFiles);
|
|
8311
8342
|
const mergedFiles = [...stateFiles.filter((f) => f.url).map((f) => ({
|
|
8312
8343
|
name: f.name,
|
|
@@ -8398,7 +8429,7 @@ const useFileUploader = (props) => {
|
|
|
8398
8429
|
removeFile
|
|
8399
8430
|
};
|
|
8400
8431
|
};
|
|
8401
|
-
const texts$
|
|
8432
|
+
const texts$14 = createTexts({
|
|
8402
8433
|
invalidFileType: {
|
|
8403
8434
|
nb: "Ugyldig filtype",
|
|
8404
8435
|
no: "Ugyldig filtype",
|
|
@@ -8419,8 +8450,8 @@ const texts$13 = createTexts({
|
|
|
8419
8450
|
const FileUploader = (props) => {
|
|
8420
8451
|
const { id, label, dropAreaLabel, btnLabel, tip, required = false, withDragAndDrop = true, initialFiles, value, accept, maxFiles, disabled, readOnly, onChange, onKeyDown, width = "var(--dds-input-default-width)", errorMessage, hideFileList, className, afterLabelContent, fileStatusMap, deriveId, onRetry, ...rest } = props;
|
|
8421
8452
|
const { t } = useTranslation();
|
|
8422
|
-
const tDropAreaLabel = dropAreaLabel ?? t(texts$
|
|
8423
|
-
const tBtnLabel = btnLabel ?? t(texts$
|
|
8453
|
+
const tDropAreaLabel = dropAreaLabel ?? t(texts$13.dragAndDropOr);
|
|
8454
|
+
const tBtnLabel = btnLabel ?? t(texts$13.selectFile);
|
|
8424
8455
|
const generatedId = (0, react.useId)();
|
|
8425
8456
|
const uniqueId = id ?? `${generatedId}-fileUploader`;
|
|
8426
8457
|
const { state: { files: stateFiles, isDragActive, rootErrors }, getRootProps, getInputProps, getButtonProps, removeFile } = useFileUploader({
|
|
@@ -8526,7 +8557,7 @@ const FileUploader = (props) => {
|
|
|
8526
8557
|
children: [
|
|
8527
8558
|
input,
|
|
8528
8559
|
tDropAreaLabel,
|
|
8529
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$
|
|
8560
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$13.uploadFileWithButton) }),
|
|
8530
8561
|
button
|
|
8531
8562
|
]
|
|
8532
8563
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box, {
|
|
@@ -8539,12 +8570,12 @@ const FileUploader = (props) => {
|
|
|
8539
8570
|
className: cn(readOnly && focus_module_default["focus-styled-sibling"], readOnly && FileUploader_module_default["readonly--file-list"]),
|
|
8540
8571
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, {
|
|
8541
8572
|
id: fileListNameId,
|
|
8542
|
-
children: t(texts$
|
|
8573
|
+
children: t(texts$13.uploadedFiles)
|
|
8543
8574
|
}), inactive && fileListElements.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Typography, {
|
|
8544
8575
|
italic: true,
|
|
8545
8576
|
as: "span",
|
|
8546
8577
|
color: disabled ? "text-subtle" : "text-medium",
|
|
8547
|
-
children: t(texts$
|
|
8578
|
+
children: t(texts$13.noFiles)
|
|
8548
8579
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StylelessList, {
|
|
8549
8580
|
"aria-labelledby": fileListNameId,
|
|
8550
8581
|
children: fileListElements
|
|
@@ -8554,7 +8585,7 @@ const FileUploader = (props) => {
|
|
|
8554
8585
|
});
|
|
8555
8586
|
};
|
|
8556
8587
|
FileUploader.displayName = "FileUploader";
|
|
8557
|
-
const texts$
|
|
8588
|
+
const texts$13 = createTexts({
|
|
8558
8589
|
dragAndDropOr: {
|
|
8559
8590
|
nb: "Dra og slipp filer her eller",
|
|
8560
8591
|
no: "Dra og slipp filer her eller",
|
|
@@ -8734,7 +8765,7 @@ function FormSummaryEmptyValue() {
|
|
|
8734
8765
|
" ",
|
|
8735
8766
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VisuallyHidden, { children: [
|
|
8736
8767
|
" ",
|
|
8737
|
-
t(texts$
|
|
8768
|
+
t(texts$12.noValue),
|
|
8738
8769
|
" "
|
|
8739
8770
|
] })
|
|
8740
8771
|
] });
|
|
@@ -8748,7 +8779,7 @@ function FormSummaryError({ ...props }) {
|
|
|
8748
8779
|
})
|
|
8749
8780
|
});
|
|
8750
8781
|
}
|
|
8751
|
-
const texts$
|
|
8782
|
+
const texts$12 = createTexts({ noValue: {
|
|
8752
8783
|
nb: "Ikke fylt ut",
|
|
8753
8784
|
no: "Ikke fylt ut",
|
|
8754
8785
|
nn: "Ikkje fylt ut",
|
|
@@ -8874,13 +8905,13 @@ const inlineEditVisuallyHidden = (id, clearable) => {
|
|
|
8874
8905
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VisuallyHidden, {
|
|
8875
8906
|
id,
|
|
8876
8907
|
children: [
|
|
8877
|
-
t(texts$
|
|
8908
|
+
t(texts$11.inlineEditInfo),
|
|
8878
8909
|
" ",
|
|
8879
|
-
!clearable && t(texts$
|
|
8910
|
+
!clearable && t(texts$11.notClearable)
|
|
8880
8911
|
]
|
|
8881
8912
|
});
|
|
8882
8913
|
};
|
|
8883
|
-
const texts$
|
|
8914
|
+
const texts$11 = createTexts({
|
|
8884
8915
|
inlineEditInfo: {
|
|
8885
8916
|
nb: "Escape, Enter eller Tab for å lagre.",
|
|
8886
8917
|
no: "Escape, Enter eller Tab for å lagre.",
|
|
@@ -9137,7 +9168,7 @@ const InternalHeader = (props) => {
|
|
|
9137
9168
|
const hasSmallScreenBreakpoint = !!smallScreenBreakpoint;
|
|
9138
9169
|
const hasNavInContextMenu = hasSmallScreenBreakpoint && hasNavigationElements;
|
|
9139
9170
|
const navigation = hasNavigationElements ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
9140
|
-
"aria-label": t(texts$
|
|
9171
|
+
"aria-label": t(texts$10.siteNavigation),
|
|
9141
9172
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, {
|
|
9142
9173
|
as: StylelessList,
|
|
9143
9174
|
hideBelow: hasSmallScreenBreakpoint ? smallScreenBreakpoint : void 0,
|
|
@@ -9190,7 +9221,7 @@ const InternalHeader = (props) => {
|
|
|
9190
9221
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(OverflowMenuGroup, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
9191
9222
|
icon: hasNavInContextMenu ? MenuIcon : MoreVerticalIcon,
|
|
9192
9223
|
purpose: "tertiary",
|
|
9193
|
-
"aria-label": t(texts$
|
|
9224
|
+
"aria-label": t(texts$10.openMenu)
|
|
9194
9225
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(OverflowMenu, {
|
|
9195
9226
|
className: InternalHeader_module_default["context-menu"],
|
|
9196
9227
|
children: [
|
|
@@ -9203,7 +9234,7 @@ const InternalHeader = (props) => {
|
|
|
9203
9234
|
}) }),
|
|
9204
9235
|
hasNavInContextMenu && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, {
|
|
9205
9236
|
as: "nav",
|
|
9206
|
-
"aria-label": t(texts$
|
|
9237
|
+
"aria-label": t(texts$10.siteNavigation),
|
|
9207
9238
|
showBelow: smallScreenBreakpoint,
|
|
9208
9239
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverflowMenuList, { children: navItems.map((item, i) => /* @__PURE__ */ (0, react.createElement)(OverflowMenuLink, {
|
|
9209
9240
|
...item,
|
|
@@ -9230,7 +9261,7 @@ const InternalHeader = (props) => {
|
|
|
9230
9261
|
});
|
|
9231
9262
|
};
|
|
9232
9263
|
InternalHeader.displayName = "InternalHeader";
|
|
9233
|
-
const texts$
|
|
9264
|
+
const texts$10 = createTexts({
|
|
9234
9265
|
openMenu: {
|
|
9235
9266
|
nb: "Åpne meny",
|
|
9236
9267
|
no: "Åpne meny",
|
|
@@ -10190,7 +10221,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10190
10221
|
value: 50
|
|
10191
10222
|
},
|
|
10192
10223
|
{
|
|
10193
|
-
label: t(texts$
|
|
10224
|
+
label: t(texts$9.all),
|
|
10194
10225
|
value: itemsAmount
|
|
10195
10226
|
}
|
|
10196
10227
|
];
|
|
@@ -10265,7 +10296,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10265
10296
|
const navigation = withPagination ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box, {
|
|
10266
10297
|
as: "nav",
|
|
10267
10298
|
ref,
|
|
10268
|
-
"aria-label": t(texts$
|
|
10299
|
+
"aria-label": t(texts$9.pagination),
|
|
10269
10300
|
display: "flex",
|
|
10270
10301
|
alignItems: "center",
|
|
10271
10302
|
...!withSelect && !withCounter && { ...baseHTMLProps },
|
|
@@ -10302,7 +10333,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10302
10333
|
onClick: (event) => {
|
|
10303
10334
|
onPageChange(event, 1);
|
|
10304
10335
|
},
|
|
10305
|
-
"aria-label": t(texts$
|
|
10336
|
+
"aria-label": t(texts$9.firstPage)
|
|
10306
10337
|
})
|
|
10307
10338
|
}),
|
|
10308
10339
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
@@ -10338,7 +10369,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10338
10369
|
onClick: (event) => {
|
|
10339
10370
|
onPageChange(event, pagesLength);
|
|
10340
10371
|
},
|
|
10341
|
-
"aria-label": t(texts$
|
|
10372
|
+
"aria-label": t(texts$9.lastPage)
|
|
10342
10373
|
})
|
|
10343
10374
|
})
|
|
10344
10375
|
]
|
|
@@ -10370,16 +10401,16 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10370
10401
|
isClearable: false,
|
|
10371
10402
|
onChange: handleSelectChange,
|
|
10372
10403
|
componentSize: "small",
|
|
10373
|
-
"aria-label": t(texts$
|
|
10404
|
+
"aria-label": t(texts$9.itemsPerPage)
|
|
10374
10405
|
}), withCounter && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Paragraph, {
|
|
10375
10406
|
typographyType: "body-short-medium",
|
|
10376
|
-
children: t(texts$
|
|
10407
|
+
children: t(texts$9.showsAmountOfTotalItems(activePageFirstItem, activePageLastItem, itemsAmount))
|
|
10377
10408
|
})]
|
|
10378
10409
|
}), navigation]
|
|
10379
10410
|
});
|
|
10380
10411
|
};
|
|
10381
10412
|
Pagination.displayName = "Pagination";
|
|
10382
|
-
const texts$
|
|
10413
|
+
const texts$9 = createTexts({
|
|
10383
10414
|
pagination: {
|
|
10384
10415
|
nb: "Paginering",
|
|
10385
10416
|
no: "Paginering",
|
|
@@ -11689,8 +11720,8 @@ const createCountryOptions = (countries) => {
|
|
|
11689
11720
|
const countryOptions = createCountryOptions(COUNTRIES);
|
|
11690
11721
|
const PhoneInput = ({ label, readOnly, errorMessage, tip, required, width, componentSize = "medium", name, className, style, value, selectLabel, selectRef, onChange, defaultValue, "aria-required": ariaRequired, "aria-describedby": ariaDescribedby, groupLabel, afterLabelContent, ref, ...props }) => {
|
|
11691
11722
|
const { t } = useTranslation();
|
|
11692
|
-
const tGroupLabel = groupLabel ?? t(texts$
|
|
11693
|
-
const tSelectLabel = selectLabel ?? t(texts$
|
|
11723
|
+
const tGroupLabel = groupLabel ?? t(texts$8.countryCodeAndPhoneNumber);
|
|
11724
|
+
const tSelectLabel = selectLabel ?? t(texts$8.countryCode);
|
|
11694
11725
|
const generatedId = (0, react.useId)();
|
|
11695
11726
|
const uniqueId = props.id ?? generatedId;
|
|
11696
11727
|
const phoneInputId = `${uniqueId}-phone-input`;
|
|
@@ -11839,7 +11870,7 @@ const PhoneInput = ({ label, readOnly, errorMessage, tip, required, width, compo
|
|
|
11839
11870
|
};
|
|
11840
11871
|
PhoneInput.displayName = "PhoneInput";
|
|
11841
11872
|
const getCallingCode = (s) => s.substring(s.indexOf("+"), s.length) ?? "";
|
|
11842
|
-
const texts$
|
|
11873
|
+
const texts$8 = createTexts({
|
|
11843
11874
|
countryCode: {
|
|
11844
11875
|
nb: "Landskode",
|
|
11845
11876
|
no: "Landskode",
|
|
@@ -11943,6 +11974,7 @@ const Popover = ({ id, header, withCloseButton = true, onBlur, children, placeme
|
|
|
11943
11974
|
}),
|
|
11944
11975
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
11945
11976
|
marginBlock: !hasTitle && withCloseButton ? "x2 0" : "0",
|
|
11977
|
+
height: "100%",
|
|
11946
11978
|
children
|
|
11947
11979
|
}),
|
|
11948
11980
|
withCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
@@ -12111,7 +12143,7 @@ const ProgressTrackerItem = (props) => {
|
|
|
12111
12143
|
color: getTextColor(),
|
|
12112
12144
|
children
|
|
12113
12145
|
})] });
|
|
12114
|
-
const ariaLabel = htmlProps?.["aria-label"] ? htmlProps?.["aria-label"] : `${children}, ${stepNumber}. ${completed ? t(texts$
|
|
12146
|
+
const ariaLabel = htmlProps?.["aria-label"] ? htmlProps?.["aria-label"] : `${children}, ${stepNumber}. ${completed ? t(texts$7.completed) : t(texts$7.uncompleted)}`;
|
|
12115
12147
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
12116
12148
|
as: "li",
|
|
12117
12149
|
display: direction === "row" ? "flex" : void 0,
|
|
@@ -12136,7 +12168,7 @@ const ProgressTrackerItem = (props) => {
|
|
|
12136
12168
|
});
|
|
12137
12169
|
};
|
|
12138
12170
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
12139
|
-
const texts$
|
|
12171
|
+
const texts$7 = createTexts({
|
|
12140
12172
|
uncompleted: {
|
|
12141
12173
|
nb: "trinn ikke ferdig",
|
|
12142
12174
|
no: "trinn ikke ferdig",
|
|
@@ -12177,7 +12209,7 @@ const ProgressTracker = (() => {
|
|
|
12177
12209
|
direction
|
|
12178
12210
|
},
|
|
12179
12211
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
12180
|
-
"aria-label": ariaLabel ?? t(texts$
|
|
12212
|
+
"aria-label": ariaLabel ?? t(texts$6.stepProgression),
|
|
12181
12213
|
...getBaseHTMLProps(id, className, style, htmlProps, rest),
|
|
12182
12214
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
12183
12215
|
as: StylelessOList,
|
|
@@ -12207,7 +12239,7 @@ function passIndexPropToProgressTrackerItem(children) {
|
|
|
12207
12239
|
index
|
|
12208
12240
|
}));
|
|
12209
12241
|
}
|
|
12210
|
-
const texts$
|
|
12242
|
+
const texts$6 = createTexts({ stepProgression: {
|
|
12211
12243
|
nb: "Trinnprogresjon",
|
|
12212
12244
|
no: "Trinnprogresjon",
|
|
12213
12245
|
nn: "Trinnprogresjon",
|
|
@@ -12329,7 +12361,7 @@ const SearchSuggestions = ({ id, searchId, className, style, htmlProps, suggesti
|
|
|
12329
12361
|
marginBlock: "x0.25 0",
|
|
12330
12362
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropdownHeader, {
|
|
12331
12363
|
id: suggestionsHeaderId,
|
|
12332
|
-
children: t(texts$
|
|
12364
|
+
children: t(texts$5.searchSuggestions)
|
|
12333
12365
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StylelessList, {
|
|
12334
12366
|
role: "listbox",
|
|
12335
12367
|
"aria-labelledby": suggestionsHeaderId,
|
|
@@ -12339,7 +12371,7 @@ const SearchSuggestions = ({ id, searchId, className, style, htmlProps, suggesti
|
|
|
12339
12371
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchSuggestionItem, {
|
|
12340
12372
|
index,
|
|
12341
12373
|
focus: focus === index && showSuggestions,
|
|
12342
|
-
"aria-label": t(texts$
|
|
12374
|
+
"aria-label": t(texts$5.search(suggestion)),
|
|
12343
12375
|
onClick: onSuggestionClick,
|
|
12344
12376
|
"aria-setsize": suggestionsToRender.length,
|
|
12345
12377
|
"aria-posinset": index,
|
|
@@ -12351,7 +12383,7 @@ const SearchSuggestions = ({ id, searchId, className, style, htmlProps, suggesti
|
|
|
12351
12383
|
});
|
|
12352
12384
|
};
|
|
12353
12385
|
SearchSuggestions.displayName = "SearchSuggestions";
|
|
12354
|
-
const texts$
|
|
12386
|
+
const texts$5 = createTexts({
|
|
12355
12387
|
search: (suggestion) => ({
|
|
12356
12388
|
no: `${suggestion} søk`,
|
|
12357
12389
|
nb: `${suggestion} søk`,
|
|
@@ -12432,11 +12464,11 @@ const Search$1 = ({ componentSize = "medium", buttonProps, showIcon = true, name
|
|
|
12432
12464
|
showSuggestions: context.showSuggestions
|
|
12433
12465
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, {
|
|
12434
12466
|
id: suggestionsDescriptionId,
|
|
12435
|
-
children: t(texts$
|
|
12467
|
+
children: t(texts$4.useArrowKeys)
|
|
12436
12468
|
})] }),
|
|
12437
12469
|
hasValue && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClearButton, {
|
|
12438
12470
|
size: componentSize,
|
|
12439
|
-
"aria-label": t(texts$
|
|
12471
|
+
"aria-label": t(texts$4.clearSearch),
|
|
12440
12472
|
onClick: clearInput
|
|
12441
12473
|
})
|
|
12442
12474
|
]
|
|
@@ -12455,7 +12487,7 @@ const Search$1 = ({ componentSize = "medium", buttonProps, showIcon = true, name
|
|
|
12455
12487
|
size: componentSize,
|
|
12456
12488
|
onClick,
|
|
12457
12489
|
...otherButtonProps,
|
|
12458
|
-
children: buttonLabel ?? t(texts$
|
|
12490
|
+
children: buttonLabel ?? t(texts$4.search)
|
|
12459
12491
|
})]
|
|
12460
12492
|
}) : inputGroup, renderInputMessage({
|
|
12461
12493
|
tip,
|
|
@@ -12463,7 +12495,7 @@ const Search$1 = ({ componentSize = "medium", buttonProps, showIcon = true, name
|
|
|
12463
12495
|
})] })] });
|
|
12464
12496
|
};
|
|
12465
12497
|
Search$1.displayName = "Search";
|
|
12466
|
-
const texts$
|
|
12498
|
+
const texts$4 = createTexts({
|
|
12467
12499
|
clearSearch: {
|
|
12468
12500
|
nb: "Tøm søk",
|
|
12469
12501
|
no: "Tøm søk",
|
|
@@ -12626,7 +12658,7 @@ const SplitButton = ({ size, primaryAction, secondaryActions, purpose = "primary
|
|
|
12626
12658
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
12627
12659
|
...buttonStyleProps,
|
|
12628
12660
|
icon: isOpen ? ChevronUpIcon : ChevronDownIcon,
|
|
12629
|
-
"aria-label": t(texts$
|
|
12661
|
+
"aria-label": t(texts$3.moreActions),
|
|
12630
12662
|
purpose,
|
|
12631
12663
|
className: cn(SplitButton_module_default.option, purpose === "primary" && SplitButton_module_default["option--primary"]),
|
|
12632
12664
|
type: "button"
|
|
@@ -12641,7 +12673,7 @@ const SplitButton = ({ size, primaryAction, secondaryActions, purpose = "primary
|
|
|
12641
12673
|
});
|
|
12642
12674
|
};
|
|
12643
12675
|
SplitButton.displayName = "SplitButton";
|
|
12644
|
-
const texts$
|
|
12676
|
+
const texts$3 = createTexts({ moreActions: {
|
|
12645
12677
|
nb: "Flere handlinger",
|
|
12646
12678
|
no: "Flere handlinger",
|
|
12647
12679
|
nn: "Fleire handlingar",
|
|
@@ -12699,6 +12731,60 @@ const Cell = ({ children, type: _type, layout = "left", collapseKey, className,
|
|
|
12699
12731
|
};
|
|
12700
12732
|
Cell.displayName = "Table.Cell";
|
|
12701
12733
|
//#endregion
|
|
12734
|
+
//#region src/components/Table/FilterCell.tsx
|
|
12735
|
+
const FilterCell = ({ sortOrder, children, className, badgeCount, popoverProps, popoverChildren, popoverGroupProps, ...rest }) => {
|
|
12736
|
+
const { t } = useTranslation();
|
|
12737
|
+
const SortIcon = !sortOrder ? void 0 : sortOrder === "ascending" ? ArrowDownIcon : ArrowUpIcon;
|
|
12738
|
+
const hasBadgeCount = !!badgeCount;
|
|
12739
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Cell, {
|
|
12740
|
+
type: "head",
|
|
12741
|
+
"aria-sort": sortOrder ? sortOrder : void 0,
|
|
12742
|
+
...rest,
|
|
12743
|
+
className: cn(Table_module_default["filter-cell"], className),
|
|
12744
|
+
children: [
|
|
12745
|
+
children,
|
|
12746
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(PopoverGroup, {
|
|
12747
|
+
...popoverGroupProps,
|
|
12748
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
12749
|
+
type: "button",
|
|
12750
|
+
icon: FilterListIcon,
|
|
12751
|
+
purpose: "secondary",
|
|
12752
|
+
size: "xsmall",
|
|
12753
|
+
"aria-label": `${t(texts$2.openFilterMenu)}${badgeCount ? ` ${badgeCount}` : ""}`,
|
|
12754
|
+
badgeProps: hasBadgeCount ? {
|
|
12755
|
+
children: badgeCount,
|
|
12756
|
+
purpose: "neutral"
|
|
12757
|
+
} : void 0
|
|
12758
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Popover, {
|
|
12759
|
+
...popoverProps,
|
|
12760
|
+
children: popoverChildren
|
|
12761
|
+
})]
|
|
12762
|
+
}),
|
|
12763
|
+
SortIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
12764
|
+
icon: SortIcon,
|
|
12765
|
+
iconSize: "inherit"
|
|
12766
|
+
})
|
|
12767
|
+
]
|
|
12768
|
+
});
|
|
12769
|
+
};
|
|
12770
|
+
FilterCell.displayName = "Table.FilterCell";
|
|
12771
|
+
const texts$2 = createTexts({
|
|
12772
|
+
openFilterMenu: {
|
|
12773
|
+
nb: "Åpne filtreringsmeny",
|
|
12774
|
+
no: "Åpne filtreringsmeny",
|
|
12775
|
+
nn: "Opne filtreringsmeny",
|
|
12776
|
+
en: "Open filter menu",
|
|
12777
|
+
se: "-"
|
|
12778
|
+
},
|
|
12779
|
+
filterMenu: {
|
|
12780
|
+
nb: "Filtreringsmeny",
|
|
12781
|
+
no: "Filtreringsmeny",
|
|
12782
|
+
nn: "Filtreringsmeny",
|
|
12783
|
+
en: "Filter menu",
|
|
12784
|
+
se: "-"
|
|
12785
|
+
}
|
|
12786
|
+
});
|
|
12787
|
+
//#endregion
|
|
12702
12788
|
//#region src/components/Table/Foot.tsx
|
|
12703
12789
|
const Foot = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tfoot", { ...props });
|
|
12704
12790
|
Foot.displayName = "Table.Foot";
|
|
@@ -12810,9 +12896,9 @@ const texts$1 = createTexts({
|
|
|
12810
12896
|
const SortCell = ({ isSorted, sortOrder, onClick, children, ...rest }) => {
|
|
12811
12897
|
const { t } = useTranslation();
|
|
12812
12898
|
const SortIcon = () => {
|
|
12813
|
-
if (!isSorted || !sortOrder) return
|
|
12814
|
-
if (sortOrder === "ascending") return
|
|
12815
|
-
return
|
|
12899
|
+
if (!isSorted || !sortOrder) return ArrowUpDownIcon;
|
|
12900
|
+
if (sortOrder === "ascending") return ArrowUpIcon;
|
|
12901
|
+
return ArrowDownIcon;
|
|
12816
12902
|
};
|
|
12817
12903
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Cell, {
|
|
12818
12904
|
type: "head",
|
|
@@ -12906,6 +12992,7 @@ Table.Head = Head;
|
|
|
12906
12992
|
Table.Body = Body;
|
|
12907
12993
|
Table.Cell = Cell;
|
|
12908
12994
|
Table.SortCell = SortCell;
|
|
12995
|
+
Table.FilterCell = FilterCell;
|
|
12909
12996
|
Table.Row = Row;
|
|
12910
12997
|
Table.Foot = Foot;
|
|
12911
12998
|
//#endregion
|
|
@@ -13513,8 +13600,10 @@ exports.AnimatedChevronUpDownIcon = AnimatedChevronUpDownIcon;
|
|
|
13513
13600
|
exports.AppsIcon = AppsIcon;
|
|
13514
13601
|
exports.ArchiveIcon = ArchiveIcon;
|
|
13515
13602
|
exports.ArrowDownIcon = ArrowDownIcon;
|
|
13603
|
+
exports.ArrowDownUpIcon = ArrowDownUpIcon;
|
|
13516
13604
|
exports.ArrowLeftIcon = ArrowLeftIcon;
|
|
13517
13605
|
exports.ArrowRightIcon = ArrowRightIcon;
|
|
13606
|
+
exports.ArrowUpDownIcon = ArrowUpDownIcon;
|
|
13518
13607
|
exports.ArrowUpIcon = ArrowUpIcon;
|
|
13519
13608
|
exports.ArrowUpRightIcon = ArrowUpRightIcon;
|
|
13520
13609
|
exports.AttachmentIcon = AttachmentIcon;
|
|
@@ -13807,6 +13896,7 @@ exports.TabPanels = TabPanels;
|
|
|
13807
13896
|
exports.Table = Table;
|
|
13808
13897
|
exports.TableBody = Body;
|
|
13809
13898
|
exports.TableCell = Cell;
|
|
13899
|
+
exports.TableFilterCell = FilterCell;
|
|
13810
13900
|
exports.TableFoot = Foot;
|
|
13811
13901
|
exports.TableHead = Head;
|
|
13812
13902
|
exports.TableRow = Row;
|