@norges-domstoler/dds-components 0.0.0-dev-20261026080512 → 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 +161 -103
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +8 -0
- package/dist/index.d.cts +21 -1
- package/dist/index.d.mts +21 -1
- package/dist/index.mjs +161 -104
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -4494,7 +4494,7 @@ const BackLink = ({ label, ref, as = "a", ...rest }) => {
|
|
|
4494
4494
|
const { t } = useTranslation();
|
|
4495
4495
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
4496
4496
|
ref,
|
|
4497
|
-
"aria-label": t(texts$
|
|
4497
|
+
"aria-label": t(texts$30.goBack),
|
|
4498
4498
|
className: typographyStyles_module_default["body-short-medium"],
|
|
4499
4499
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
4500
4500
|
as,
|
|
@@ -4510,7 +4510,7 @@ const BackLink = ({ label, ref, as = "a", ...rest }) => {
|
|
|
4510
4510
|
});
|
|
4511
4511
|
};
|
|
4512
4512
|
BackLink.displayName = "BackLink";
|
|
4513
|
-
const texts$
|
|
4513
|
+
const texts$30 = createTexts({ goBack: {
|
|
4514
4514
|
nb: "Gå tilbake",
|
|
4515
4515
|
no: "Gå tilbake",
|
|
4516
4516
|
nn: "Gå tilbake",
|
|
@@ -4841,7 +4841,7 @@ var common_module_default = {
|
|
|
4841
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 }) => {
|
|
4842
4842
|
const { purpose: groupPurpose, size: groupSize } = useButtonGroupContext();
|
|
4843
4843
|
const { t } = useTranslation();
|
|
4844
|
-
const spinnerTooltip = loadingTooltip ?? t(texts$
|
|
4844
|
+
const spinnerTooltip = loadingTooltip ?? t(texts$29.saving);
|
|
4845
4845
|
const hasLabel = !!children;
|
|
4846
4846
|
const hasIcon = !!icon;
|
|
4847
4847
|
const hasLabelAndIcon = hasIcon && hasLabel;
|
|
@@ -4898,7 +4898,7 @@ const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "m
|
|
|
4898
4898
|
});
|
|
4899
4899
|
};
|
|
4900
4900
|
Button.displayName = "Button";
|
|
4901
|
-
const texts$
|
|
4901
|
+
const texts$29 = createTexts({ saving: {
|
|
4902
4902
|
no: "Lagring pågår",
|
|
4903
4903
|
nb: "Lagring pågår",
|
|
4904
4904
|
nn: "Lagring pågår",
|
|
@@ -5295,7 +5295,7 @@ const Breadcrumbs = ({ children, smallScreenBreakpoint, id, className, style, ht
|
|
|
5295
5295
|
size: "xsmall",
|
|
5296
5296
|
icon: MoreHorizontalIcon,
|
|
5297
5297
|
purpose: "tertiary",
|
|
5298
|
-
"aria-label": bChildrenTruncated.length > 1 ? t(texts$
|
|
5298
|
+
"aria-label": bChildrenTruncated.length > 1 ? t(texts$28.showHiddenTo(bChildren.length - 1)) : t(texts$28.showHidden)
|
|
5299
5299
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverflowMenu, {
|
|
5300
5300
|
portal: false,
|
|
5301
5301
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverflowMenuList, { children: bChildrenTruncated })
|
|
@@ -5315,7 +5315,7 @@ const Breadcrumbs = ({ children, smallScreenBreakpoint, id, className, style, ht
|
|
|
5315
5315
|
};
|
|
5316
5316
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("nav", {
|
|
5317
5317
|
...getBaseHTMLProps(id, cn(className, typographyStyles_module_default["body-short-medium"]), style, htmlProps, rest),
|
|
5318
|
-
"aria-label": t(texts$
|
|
5318
|
+
"aria-label": t(texts$28.breadcrumbs),
|
|
5319
5319
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
|
|
5320
5320
|
...responsiveListProps,
|
|
5321
5321
|
hideBelow: hasSmallScreenBreakpoint ? smallScreenBreakpoint : void 0,
|
|
@@ -5328,7 +5328,7 @@ const Breadcrumbs = ({ children, smallScreenBreakpoint, id, className, style, ht
|
|
|
5328
5328
|
});
|
|
5329
5329
|
};
|
|
5330
5330
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
5331
|
-
const texts$
|
|
5331
|
+
const texts$28 = createTexts({
|
|
5332
5332
|
breadcrumbs: {
|
|
5333
5333
|
nb: "Brødsmulesti",
|
|
5334
5334
|
no: "Brødsmulesti",
|
|
@@ -6067,7 +6067,7 @@ const ChipRemovable = ({ htmlProps = {}, onClose, size = "medium", id, className
|
|
|
6067
6067
|
icon: CloseIcon,
|
|
6068
6068
|
color: "icon-default",
|
|
6069
6069
|
onClick,
|
|
6070
|
-
"aria-label": ariaLabel ?? t(texts$
|
|
6070
|
+
"aria-label": ariaLabel ?? t(texts$27.removeChip) + (children ? ` ${children}` : "")
|
|
6071
6071
|
})]
|
|
6072
6072
|
}) : null;
|
|
6073
6073
|
};
|
|
@@ -6075,7 +6075,7 @@ ChipRemovable.displayName = "ChipRemovable";
|
|
|
6075
6075
|
ChipRadio.displayName = "ChipRadio";
|
|
6076
6076
|
ChipCheckbox.displayName = "ChipCheckbox";
|
|
6077
6077
|
ChipButton.displayName = "ChipButton";
|
|
6078
|
-
const texts$
|
|
6078
|
+
const texts$27 = createTexts({ removeChip: {
|
|
6079
6079
|
nb: "Fjern merkelapp",
|
|
6080
6080
|
no: "Fjern merkelapp",
|
|
6081
6081
|
nn: "Fjern merkelapp",
|
|
@@ -6188,7 +6188,7 @@ function CookieBanner({ headerText, description, buttons, checkboxes, id, classN
|
|
|
6188
6188
|
children: [heading, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, {
|
|
6189
6189
|
as: Button,
|
|
6190
6190
|
showBelow: collapsedBreakpoint,
|
|
6191
|
-
"aria-label": t(texts$
|
|
6191
|
+
"aria-label": t(texts$26.expandConsent),
|
|
6192
6192
|
purpose: "tertiary",
|
|
6193
6193
|
icon: ExpandIcon,
|
|
6194
6194
|
onClick: () => setIsCollapsedOnBreakpoint(false),
|
|
@@ -6224,7 +6224,7 @@ function CookieBanner({ headerText, description, buttons, checkboxes, id, classN
|
|
|
6224
6224
|
});
|
|
6225
6225
|
}
|
|
6226
6226
|
CookieBanner.displayName = "CookieBanner";
|
|
6227
|
-
const texts$
|
|
6227
|
+
const texts$26 = createTexts({ expandConsent: {
|
|
6228
6228
|
nb: "Utvid samtykke for bruk av informasjonskapsler",
|
|
6229
6229
|
no: "Utvid samtykke for bruk av informasjonskapsler",
|
|
6230
6230
|
nn: "Utvid samtykke for bruk av informasjonskapslar",
|
|
@@ -6457,32 +6457,32 @@ function CalendarGrid({ state, ...props }) {
|
|
|
6457
6457
|
const weeksInMonth = (0, _internationalized_date.getWeeksInMonth)(state.visibleRange.start, locale);
|
|
6458
6458
|
const weekDays = [
|
|
6459
6459
|
{
|
|
6460
|
-
short: t(texts$
|
|
6461
|
-
full: t(texts$
|
|
6460
|
+
short: t(texts$25.mo),
|
|
6461
|
+
full: t(texts$25.monday)
|
|
6462
6462
|
},
|
|
6463
6463
|
{
|
|
6464
|
-
short: t(texts$
|
|
6465
|
-
full: t(texts$
|
|
6464
|
+
short: t(texts$25.tu),
|
|
6465
|
+
full: t(texts$25.tuesday)
|
|
6466
6466
|
},
|
|
6467
6467
|
{
|
|
6468
|
-
short: t(texts$
|
|
6469
|
-
full: t(texts$
|
|
6468
|
+
short: t(texts$25.we),
|
|
6469
|
+
full: t(texts$25.wednesday)
|
|
6470
6470
|
},
|
|
6471
6471
|
{
|
|
6472
|
-
short: t(texts$
|
|
6473
|
-
full: t(texts$
|
|
6472
|
+
short: t(texts$25.th),
|
|
6473
|
+
full: t(texts$25.thursday)
|
|
6474
6474
|
},
|
|
6475
6475
|
{
|
|
6476
|
-
short: t(texts$
|
|
6477
|
-
full: t(texts$
|
|
6476
|
+
short: t(texts$25.fr),
|
|
6477
|
+
full: t(texts$25.friday)
|
|
6478
6478
|
},
|
|
6479
6479
|
{
|
|
6480
|
-
short: t(texts$
|
|
6481
|
-
full: t(texts$
|
|
6480
|
+
short: t(texts$25.sa),
|
|
6481
|
+
full: t(texts$25.saturday)
|
|
6482
6482
|
},
|
|
6483
6483
|
{
|
|
6484
|
-
short: t(texts$
|
|
6485
|
-
full: t(texts$
|
|
6484
|
+
short: t(texts$25.su),
|
|
6485
|
+
full: t(texts$25.sunday)
|
|
6486
6486
|
}
|
|
6487
6487
|
];
|
|
6488
6488
|
const { showWeekNumbers, onClose } = (0, react.useContext)(CalendarPopoverContext);
|
|
@@ -6501,7 +6501,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
6501
6501
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6502
6502
|
"aria-hidden": true,
|
|
6503
6503
|
children: "#"
|
|
6504
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$
|
|
6504
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$25.weekNumber) })]
|
|
6505
6505
|
}), weekDays.map((day, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CalendarCell, {
|
|
6506
6506
|
as: "th",
|
|
6507
6507
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -6525,7 +6525,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
6525
6525
|
});
|
|
6526
6526
|
}
|
|
6527
6527
|
CalendarGrid.displayName = "CalendarGrid";
|
|
6528
|
-
const texts$
|
|
6528
|
+
const texts$25 = createTexts({
|
|
6529
6529
|
weekNumber: {
|
|
6530
6530
|
nb: "Ukenummer",
|
|
6531
6531
|
no: "Ukenummer",
|
|
@@ -6668,7 +6668,7 @@ function Calendar(props) {
|
|
|
6668
6668
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
6669
6669
|
"aria-hidden": optAttr(isPrevDisabled),
|
|
6670
6670
|
type: "button",
|
|
6671
|
-
"aria-label": t(texts$
|
|
6671
|
+
"aria-label": t(texts$24.previousMonth),
|
|
6672
6672
|
onClick: (e) => onPrev?.(e),
|
|
6673
6673
|
size: "small",
|
|
6674
6674
|
purpose: "tertiary",
|
|
@@ -6685,7 +6685,7 @@ function Calendar(props) {
|
|
|
6685
6685
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
6686
6686
|
type: "button",
|
|
6687
6687
|
"aria-hidden": optAttr(isNextDisabled),
|
|
6688
|
-
"aria-label": t(texts$
|
|
6688
|
+
"aria-label": t(texts$24.nextMonth),
|
|
6689
6689
|
onClick: (e) => onNext?.(e),
|
|
6690
6690
|
size: "small",
|
|
6691
6691
|
purpose: "tertiary",
|
|
@@ -6697,7 +6697,7 @@ function Calendar(props) {
|
|
|
6697
6697
|
});
|
|
6698
6698
|
}
|
|
6699
6699
|
Calendar.displayName = "Calendar";
|
|
6700
|
-
const texts$
|
|
6700
|
+
const texts$24 = createTexts({
|
|
6701
6701
|
nextMonth: {
|
|
6702
6702
|
nb: "Neste måned",
|
|
6703
6703
|
no: "Neste måned",
|
|
@@ -6741,16 +6741,16 @@ function formatDateFieldSegments(segments) {
|
|
|
6741
6741
|
const formattedDaySegment = {
|
|
6742
6742
|
...daySegment,
|
|
6743
6743
|
text: daySegment.text.padStart(2, "0"),
|
|
6744
|
-
placeholder: t(texts$
|
|
6744
|
+
placeholder: t(texts$23.dayPlaceholder)
|
|
6745
6745
|
};
|
|
6746
6746
|
const formattedMonthSegment = {
|
|
6747
6747
|
...monthSegment,
|
|
6748
6748
|
text: monthSegment.text.padStart(2, "0"),
|
|
6749
|
-
placeholder: t(texts$
|
|
6749
|
+
placeholder: t(texts$23.monthPlaceholder)
|
|
6750
6750
|
};
|
|
6751
6751
|
const formattedYearSegment = {
|
|
6752
6752
|
...yearSegment,
|
|
6753
|
-
placeholder: t(texts$
|
|
6753
|
+
placeholder: t(texts$23.yearPlaceholder)
|
|
6754
6754
|
};
|
|
6755
6755
|
const formattedSeparatorSegment = {
|
|
6756
6756
|
...separatorSegment,
|
|
@@ -6764,7 +6764,7 @@ function formatDateFieldSegments(segments) {
|
|
|
6764
6764
|
formattedYearSegment
|
|
6765
6765
|
];
|
|
6766
6766
|
}
|
|
6767
|
-
const texts$
|
|
6767
|
+
const texts$23 = createTexts({
|
|
6768
6768
|
dayPlaceholder: {
|
|
6769
6769
|
nb: "dd",
|
|
6770
6770
|
no: "dd",
|
|
@@ -6944,7 +6944,7 @@ function DateField({ componentSize = "medium", buttonProps, groupProps, ref, cle
|
|
|
6944
6944
|
}),
|
|
6945
6945
|
suffix: showClearButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClearButton, {
|
|
6946
6946
|
absolute: true,
|
|
6947
|
-
"aria-label": t(texts$
|
|
6947
|
+
"aria-label": t(texts$22.clearDate),
|
|
6948
6948
|
"aria-hidden": !hasValue,
|
|
6949
6949
|
className: cn(!hasValue && utilStyles_module_default.invisible),
|
|
6950
6950
|
size: componentSize,
|
|
@@ -6963,7 +6963,7 @@ function DateField({ componentSize = "medium", buttonProps, groupProps, ref, cle
|
|
|
6963
6963
|
});
|
|
6964
6964
|
}
|
|
6965
6965
|
DateField.displayName = "DateField";
|
|
6966
|
-
const texts$
|
|
6966
|
+
const texts$22 = createTexts({ clearDate: {
|
|
6967
6967
|
en: "Clear date",
|
|
6968
6968
|
nb: "Tøm dato",
|
|
6969
6969
|
no: "Tøm dato",
|
|
@@ -7247,7 +7247,8 @@ var Table_module_default = {
|
|
|
7247
7247
|
"cell--right": "dds-Table-module__cell--right",
|
|
7248
7248
|
"cell--center": "dds-Table-module__cell--center",
|
|
7249
7249
|
"cell__inner": "dds-Table-module__cell__inner",
|
|
7250
|
-
"sort-button": "dds-Table-module__sort-button"
|
|
7250
|
+
"sort-button": "dds-Table-module__sort-button",
|
|
7251
|
+
"filter-cell": "dds-Table-module__filter-cell"
|
|
7251
7252
|
};
|
|
7252
7253
|
//#endregion
|
|
7253
7254
|
//#region src/components/DetailList/DetailList.tsx
|
|
@@ -7519,7 +7520,7 @@ const ErrorSummary = ({ heading: pHeading, className, style, children, id, htmlP
|
|
|
7519
7520
|
}) : pHeading ? pHeading : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Heading, {
|
|
7520
7521
|
level: 2,
|
|
7521
7522
|
typographyType: "heading-small",
|
|
7522
|
-
children: t(texts$
|
|
7523
|
+
children: t(texts$21.toProceedCorrectErrors)
|
|
7523
7524
|
});
|
|
7524
7525
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Paper, {
|
|
7525
7526
|
...getBaseHTMLProps(id, cn(className, ErrorSummary_module_default.container), style, htmlProps, props),
|
|
@@ -7529,7 +7530,7 @@ const ErrorSummary = ({ heading: pHeading, className, style, children, id, htmlP
|
|
|
7529
7530
|
});
|
|
7530
7531
|
};
|
|
7531
7532
|
ErrorSummary.displayName = "ErrorSummary";
|
|
7532
|
-
const texts$
|
|
7533
|
+
const texts$21 = createTexts({ toProceedCorrectErrors: {
|
|
7533
7534
|
nb: "For å gå videre må du rette opp følgende feil:",
|
|
7534
7535
|
no: "For å gå videre må du rette opp følgende feil:",
|
|
7535
7536
|
nn: "For å gå vidare må du rette opp følgjande feil:",
|
|
@@ -7575,7 +7576,7 @@ const FavStar = ({ id, className, style, onChange, checked: checkedProp, default
|
|
|
7575
7576
|
checked,
|
|
7576
7577
|
onChange: (e) => setChecked(e.target.checked),
|
|
7577
7578
|
type: "checkbox",
|
|
7578
|
-
"aria-label": props["aria-label"] ?? t(texts$
|
|
7579
|
+
"aria-label": props["aria-label"] ?? t(texts$20.favourite)
|
|
7579
7580
|
}),
|
|
7580
7581
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
7581
7582
|
iconSize,
|
|
@@ -7591,7 +7592,7 @@ const FavStar = ({ id, className, style, onChange, checked: checkedProp, default
|
|
|
7591
7592
|
});
|
|
7592
7593
|
};
|
|
7593
7594
|
FavStar.displayName = "FavStar";
|
|
7594
|
-
const texts$
|
|
7595
|
+
const texts$20 = createTexts({ favourite: {
|
|
7595
7596
|
nb: "Stjernemarker",
|
|
7596
7597
|
no: "Stjernemarker",
|
|
7597
7598
|
nn: "Stjernemerk",
|
|
@@ -7633,7 +7634,7 @@ function CharCounter(props) {
|
|
|
7633
7634
|
"/",
|
|
7634
7635
|
max
|
|
7635
7636
|
]
|
|
7636
|
-
}), /* @__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)) })]
|
|
7637
7638
|
});
|
|
7638
7639
|
}
|
|
7639
7640
|
const renderCharCounter = (id, isShown, textLength, maxLength) => {
|
|
@@ -7643,7 +7644,7 @@ const renderCharCounter = (id, isShown, textLength, maxLength) => {
|
|
|
7643
7644
|
current: textLength
|
|
7644
7645
|
});
|
|
7645
7646
|
};
|
|
7646
|
-
const texts$
|
|
7647
|
+
const texts$19 = createTexts({ charsWritten: (current, max, remain) => ({
|
|
7647
7648
|
nb: `${current} av ${max} tegn skrevet. ${remain} igjen.`,
|
|
7648
7649
|
no: `${current} av ${max} tegn skrevet. ${remain} igjen.`,
|
|
7649
7650
|
nn: `${current} av ${max} teikn skrivne. ${remain} att.`,
|
|
@@ -7745,12 +7746,12 @@ const CommentComponent = ({ rating, feedbackText, positiveFeedbackLabel, negativ
|
|
|
7745
7746
|
size: "small",
|
|
7746
7747
|
onClick: handleSubmit,
|
|
7747
7748
|
loading,
|
|
7748
|
-
children: t(texts$
|
|
7749
|
+
children: t(texts$18.send)
|
|
7749
7750
|
})
|
|
7750
7751
|
]
|
|
7751
7752
|
});
|
|
7752
7753
|
};
|
|
7753
|
-
const texts$
|
|
7754
|
+
const texts$18 = createTexts({ send: {
|
|
7754
7755
|
nb: "Send inn",
|
|
7755
7756
|
no: "Send inn",
|
|
7756
7757
|
nn: "Send inn",
|
|
@@ -7862,7 +7863,7 @@ const RatingComponent = ({ layout, ratingLabel, loading, thumbUpTooltip, thumbDo
|
|
|
7862
7863
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
7863
7864
|
className: typographyStyles_module_default["label-medium"],
|
|
7864
7865
|
children: ratingLabel
|
|
7865
|
-
}), 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, {
|
|
7866
7867
|
gap: "x0.75",
|
|
7867
7868
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tooltip, {
|
|
7868
7869
|
text: thumbUpTooltip,
|
|
@@ -7886,7 +7887,7 @@ const RatingComponent = ({ layout, ratingLabel, loading, thumbUpTooltip, thumbDo
|
|
|
7886
7887
|
})]
|
|
7887
7888
|
});
|
|
7888
7889
|
};
|
|
7889
|
-
const texts$
|
|
7890
|
+
const texts$17 = createTexts({ uploadingFeedback: {
|
|
7890
7891
|
nb: "Laster opp tilbakemelding...",
|
|
7891
7892
|
no: "Laster opp tilbakemelding...",
|
|
7892
7893
|
nn: "Lastar opp tilbakemelding...",
|
|
@@ -7900,14 +7901,14 @@ const Feedback = ({ layout = "vertical", ratingLabel, positiveFeedbackLabel, neg
|
|
|
7900
7901
|
const [rating, setRating] = (0, react.useState)(null);
|
|
7901
7902
|
const [feedbackText, setFeedbackText] = (0, react.useState)();
|
|
7902
7903
|
const [isFeedbackSubmitted, setIsFeedbackSubmitted] = (0, react.useState)(false);
|
|
7903
|
-
const tRatingLabel = ratingLabel ?? t(texts$
|
|
7904
|
-
const tPositiveFeedbackLabel = positiveFeedbackLabel ?? t(texts$
|
|
7905
|
-
const tNegativeFeedbackLabel = negativeFeedbackLabel ?? t(texts$
|
|
7906
|
-
const tRatingSubmittedTitle = ratingSubmittedTitle ?? t(texts$
|
|
7907
|
-
const tSubmittedTitle = submittedTitle ?? t(texts$
|
|
7908
|
-
const tTextAreaTip = textAreaTip ?? t(texts$
|
|
7909
|
-
const tThumbUpTooltip = thumbUpTooltip ?? t(texts$
|
|
7910
|
-
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);
|
|
7911
7912
|
(0, react.useEffect)(() => {
|
|
7912
7913
|
if (ratingProp !== void 0) setRating(ratingProp);
|
|
7913
7914
|
}, [ratingProp]);
|
|
@@ -7951,7 +7952,7 @@ const Feedback = ({ layout = "vertical", ratingLabel, positiveFeedbackLabel, neg
|
|
|
7951
7952
|
});
|
|
7952
7953
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Paragraph, { children: tSubmittedTitle });
|
|
7953
7954
|
};
|
|
7954
|
-
const texts$
|
|
7955
|
+
const texts$16 = createTexts({
|
|
7955
7956
|
ratingQuestion: {
|
|
7956
7957
|
nb: "Hva syns du om tjenesten?",
|
|
7957
7958
|
no: "Hva syns du om tjenesten?",
|
|
@@ -8112,10 +8113,10 @@ const File$1 = (props) => {
|
|
|
8112
8113
|
type: "button",
|
|
8113
8114
|
onClick: removeFile,
|
|
8114
8115
|
icon: CloseIcon,
|
|
8115
|
-
"aria-label": t(texts$
|
|
8116
|
+
"aria-label": t(texts$15.removeFile(stateFile.name)),
|
|
8116
8117
|
htmlProps: {
|
|
8117
8118
|
"aria-invalid": !isValid ? true : void 0,
|
|
8118
|
-
"aria-errormessage": !isValid ? t(texts$
|
|
8119
|
+
"aria-errormessage": !isValid ? t(texts$15.invalidFile) : void 0,
|
|
8119
8120
|
"aria-describedby": spaceSeparatedIdListGenerator(errorsList.map((e) => e.id))
|
|
8120
8121
|
}
|
|
8121
8122
|
})] })]
|
|
@@ -8126,11 +8127,11 @@ const File$1 = (props) => {
|
|
|
8126
8127
|
purpose: "secondary",
|
|
8127
8128
|
onClick: () => onRetry(fileId),
|
|
8128
8129
|
icon: RefreshIcon,
|
|
8129
|
-
children: t(texts$
|
|
8130
|
+
children: t(texts$15.tryAgain)
|
|
8130
8131
|
})]
|
|
8131
8132
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ErrorList, { errors: errorsList })] });
|
|
8132
8133
|
};
|
|
8133
|
-
const texts$
|
|
8134
|
+
const texts$15 = createTexts({
|
|
8134
8135
|
removeFile: (file) => ({
|
|
8135
8136
|
nb: `Fjern fil ${file}`,
|
|
8136
8137
|
no: `Fjern fil ${file}`,
|
|
@@ -8271,7 +8272,7 @@ const useFileUploader = (props) => {
|
|
|
8271
8272
|
isFileDialogActive: false,
|
|
8272
8273
|
isDragActive: false,
|
|
8273
8274
|
dragCounter: 0,
|
|
8274
|
-
rootErrors: calcRootErrors(t(texts$
|
|
8275
|
+
rootErrors: calcRootErrors(t(texts$14.invalidFileAmount), initialFileUploaderFiles, maxFiles, errorMessage)
|
|
8275
8276
|
});
|
|
8276
8277
|
const { files: stateFiles } = state;
|
|
8277
8278
|
(0, react.useEffect)(() => {
|
|
@@ -8282,7 +8283,7 @@ const useFileUploader = (props) => {
|
|
|
8282
8283
|
return {
|
|
8283
8284
|
name: file.name,
|
|
8284
8285
|
file,
|
|
8285
|
-
errors: accepted ? [] : [t(texts$
|
|
8286
|
+
errors: accepted ? [] : [t(texts$14.invalidFileType)]
|
|
8286
8287
|
};
|
|
8287
8288
|
}
|
|
8288
8289
|
return {
|
|
@@ -8305,7 +8306,7 @@ const useFileUploader = (props) => {
|
|
|
8305
8306
|
(0, react.useEffect)(() => {
|
|
8306
8307
|
dispatch({
|
|
8307
8308
|
type: "setRootErrors",
|
|
8308
|
-
payload: calcRootErrors(t(texts$
|
|
8309
|
+
payload: calcRootErrors(t(texts$14.invalidFileAmount), stateFiles, maxFiles, errorMessage)
|
|
8309
8310
|
});
|
|
8310
8311
|
}, [
|
|
8311
8312
|
dispatch,
|
|
@@ -8336,7 +8337,7 @@ const useFileUploader = (props) => {
|
|
|
8336
8337
|
const newFiles = (await (0, file_selector.fromEvent)(evt)).filter((f) => !existingFileNames.includes(f.name)).map((file) => ({
|
|
8337
8338
|
file,
|
|
8338
8339
|
name: file.name,
|
|
8339
|
-
errors: isFileAccepted(file, accept) ? [] : [t(texts$
|
|
8340
|
+
errors: isFileAccepted(file, accept) ? [] : [t(texts$14.invalidFileType)]
|
|
8340
8341
|
})).concat(stateFiles);
|
|
8341
8342
|
const mergedFiles = [...stateFiles.filter((f) => f.url).map((f) => ({
|
|
8342
8343
|
name: f.name,
|
|
@@ -8428,7 +8429,7 @@ const useFileUploader = (props) => {
|
|
|
8428
8429
|
removeFile
|
|
8429
8430
|
};
|
|
8430
8431
|
};
|
|
8431
|
-
const texts$
|
|
8432
|
+
const texts$14 = createTexts({
|
|
8432
8433
|
invalidFileType: {
|
|
8433
8434
|
nb: "Ugyldig filtype",
|
|
8434
8435
|
no: "Ugyldig filtype",
|
|
@@ -8449,8 +8450,8 @@ const texts$13 = createTexts({
|
|
|
8449
8450
|
const FileUploader = (props) => {
|
|
8450
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;
|
|
8451
8452
|
const { t } = useTranslation();
|
|
8452
|
-
const tDropAreaLabel = dropAreaLabel ?? t(texts$
|
|
8453
|
-
const tBtnLabel = btnLabel ?? t(texts$
|
|
8453
|
+
const tDropAreaLabel = dropAreaLabel ?? t(texts$13.dragAndDropOr);
|
|
8454
|
+
const tBtnLabel = btnLabel ?? t(texts$13.selectFile);
|
|
8454
8455
|
const generatedId = (0, react.useId)();
|
|
8455
8456
|
const uniqueId = id ?? `${generatedId}-fileUploader`;
|
|
8456
8457
|
const { state: { files: stateFiles, isDragActive, rootErrors }, getRootProps, getInputProps, getButtonProps, removeFile } = useFileUploader({
|
|
@@ -8556,7 +8557,7 @@ const FileUploader = (props) => {
|
|
|
8556
8557
|
children: [
|
|
8557
8558
|
input,
|
|
8558
8559
|
tDropAreaLabel,
|
|
8559
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$
|
|
8560
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$13.uploadFileWithButton) }),
|
|
8560
8561
|
button
|
|
8561
8562
|
]
|
|
8562
8563
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box, {
|
|
@@ -8569,12 +8570,12 @@ const FileUploader = (props) => {
|
|
|
8569
8570
|
className: cn(readOnly && focus_module_default["focus-styled-sibling"], readOnly && FileUploader_module_default["readonly--file-list"]),
|
|
8570
8571
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, {
|
|
8571
8572
|
id: fileListNameId,
|
|
8572
|
-
children: t(texts$
|
|
8573
|
+
children: t(texts$13.uploadedFiles)
|
|
8573
8574
|
}), inactive && fileListElements.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Typography, {
|
|
8574
8575
|
italic: true,
|
|
8575
8576
|
as: "span",
|
|
8576
8577
|
color: disabled ? "text-subtle" : "text-medium",
|
|
8577
|
-
children: t(texts$
|
|
8578
|
+
children: t(texts$13.noFiles)
|
|
8578
8579
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StylelessList, {
|
|
8579
8580
|
"aria-labelledby": fileListNameId,
|
|
8580
8581
|
children: fileListElements
|
|
@@ -8584,7 +8585,7 @@ const FileUploader = (props) => {
|
|
|
8584
8585
|
});
|
|
8585
8586
|
};
|
|
8586
8587
|
FileUploader.displayName = "FileUploader";
|
|
8587
|
-
const texts$
|
|
8588
|
+
const texts$13 = createTexts({
|
|
8588
8589
|
dragAndDropOr: {
|
|
8589
8590
|
nb: "Dra og slipp filer her eller",
|
|
8590
8591
|
no: "Dra og slipp filer her eller",
|
|
@@ -8764,7 +8765,7 @@ function FormSummaryEmptyValue() {
|
|
|
8764
8765
|
" ",
|
|
8765
8766
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VisuallyHidden, { children: [
|
|
8766
8767
|
" ",
|
|
8767
|
-
t(texts$
|
|
8768
|
+
t(texts$12.noValue),
|
|
8768
8769
|
" "
|
|
8769
8770
|
] })
|
|
8770
8771
|
] });
|
|
@@ -8778,7 +8779,7 @@ function FormSummaryError({ ...props }) {
|
|
|
8778
8779
|
})
|
|
8779
8780
|
});
|
|
8780
8781
|
}
|
|
8781
|
-
const texts$
|
|
8782
|
+
const texts$12 = createTexts({ noValue: {
|
|
8782
8783
|
nb: "Ikke fylt ut",
|
|
8783
8784
|
no: "Ikke fylt ut",
|
|
8784
8785
|
nn: "Ikkje fylt ut",
|
|
@@ -8904,13 +8905,13 @@ const inlineEditVisuallyHidden = (id, clearable) => {
|
|
|
8904
8905
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VisuallyHidden, {
|
|
8905
8906
|
id,
|
|
8906
8907
|
children: [
|
|
8907
|
-
t(texts$
|
|
8908
|
+
t(texts$11.inlineEditInfo),
|
|
8908
8909
|
" ",
|
|
8909
|
-
!clearable && t(texts$
|
|
8910
|
+
!clearable && t(texts$11.notClearable)
|
|
8910
8911
|
]
|
|
8911
8912
|
});
|
|
8912
8913
|
};
|
|
8913
|
-
const texts$
|
|
8914
|
+
const texts$11 = createTexts({
|
|
8914
8915
|
inlineEditInfo: {
|
|
8915
8916
|
nb: "Escape, Enter eller Tab for å lagre.",
|
|
8916
8917
|
no: "Escape, Enter eller Tab for å lagre.",
|
|
@@ -9167,7 +9168,7 @@ const InternalHeader = (props) => {
|
|
|
9167
9168
|
const hasSmallScreenBreakpoint = !!smallScreenBreakpoint;
|
|
9168
9169
|
const hasNavInContextMenu = hasSmallScreenBreakpoint && hasNavigationElements;
|
|
9169
9170
|
const navigation = hasNavigationElements ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
9170
|
-
"aria-label": t(texts$
|
|
9171
|
+
"aria-label": t(texts$10.siteNavigation),
|
|
9171
9172
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, {
|
|
9172
9173
|
as: StylelessList,
|
|
9173
9174
|
hideBelow: hasSmallScreenBreakpoint ? smallScreenBreakpoint : void 0,
|
|
@@ -9220,7 +9221,7 @@ const InternalHeader = (props) => {
|
|
|
9220
9221
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(OverflowMenuGroup, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
9221
9222
|
icon: hasNavInContextMenu ? MenuIcon : MoreVerticalIcon,
|
|
9222
9223
|
purpose: "tertiary",
|
|
9223
|
-
"aria-label": t(texts$
|
|
9224
|
+
"aria-label": t(texts$10.openMenu)
|
|
9224
9225
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(OverflowMenu, {
|
|
9225
9226
|
className: InternalHeader_module_default["context-menu"],
|
|
9226
9227
|
children: [
|
|
@@ -9233,7 +9234,7 @@ const InternalHeader = (props) => {
|
|
|
9233
9234
|
}) }),
|
|
9234
9235
|
hasNavInContextMenu && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, {
|
|
9235
9236
|
as: "nav",
|
|
9236
|
-
"aria-label": t(texts$
|
|
9237
|
+
"aria-label": t(texts$10.siteNavigation),
|
|
9237
9238
|
showBelow: smallScreenBreakpoint,
|
|
9238
9239
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverflowMenuList, { children: navItems.map((item, i) => /* @__PURE__ */ (0, react.createElement)(OverflowMenuLink, {
|
|
9239
9240
|
...item,
|
|
@@ -9260,7 +9261,7 @@ const InternalHeader = (props) => {
|
|
|
9260
9261
|
});
|
|
9261
9262
|
};
|
|
9262
9263
|
InternalHeader.displayName = "InternalHeader";
|
|
9263
|
-
const texts$
|
|
9264
|
+
const texts$10 = createTexts({
|
|
9264
9265
|
openMenu: {
|
|
9265
9266
|
nb: "Åpne meny",
|
|
9266
9267
|
no: "Åpne meny",
|
|
@@ -10220,7 +10221,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10220
10221
|
value: 50
|
|
10221
10222
|
},
|
|
10222
10223
|
{
|
|
10223
|
-
label: t(texts$
|
|
10224
|
+
label: t(texts$9.all),
|
|
10224
10225
|
value: itemsAmount
|
|
10225
10226
|
}
|
|
10226
10227
|
];
|
|
@@ -10295,7 +10296,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10295
10296
|
const navigation = withPagination ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box, {
|
|
10296
10297
|
as: "nav",
|
|
10297
10298
|
ref,
|
|
10298
|
-
"aria-label": t(texts$
|
|
10299
|
+
"aria-label": t(texts$9.pagination),
|
|
10299
10300
|
display: "flex",
|
|
10300
10301
|
alignItems: "center",
|
|
10301
10302
|
...!withSelect && !withCounter && { ...baseHTMLProps },
|
|
@@ -10332,7 +10333,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10332
10333
|
onClick: (event) => {
|
|
10333
10334
|
onPageChange(event, 1);
|
|
10334
10335
|
},
|
|
10335
|
-
"aria-label": t(texts$
|
|
10336
|
+
"aria-label": t(texts$9.firstPage)
|
|
10336
10337
|
})
|
|
10337
10338
|
}),
|
|
10338
10339
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
@@ -10368,7 +10369,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10368
10369
|
onClick: (event) => {
|
|
10369
10370
|
onPageChange(event, pagesLength);
|
|
10370
10371
|
},
|
|
10371
|
-
"aria-label": t(texts$
|
|
10372
|
+
"aria-label": t(texts$9.lastPage)
|
|
10372
10373
|
})
|
|
10373
10374
|
})
|
|
10374
10375
|
]
|
|
@@ -10400,16 +10401,16 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10400
10401
|
isClearable: false,
|
|
10401
10402
|
onChange: handleSelectChange,
|
|
10402
10403
|
componentSize: "small",
|
|
10403
|
-
"aria-label": t(texts$
|
|
10404
|
+
"aria-label": t(texts$9.itemsPerPage)
|
|
10404
10405
|
}), withCounter && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Paragraph, {
|
|
10405
10406
|
typographyType: "body-short-medium",
|
|
10406
|
-
children: t(texts$
|
|
10407
|
+
children: t(texts$9.showsAmountOfTotalItems(activePageFirstItem, activePageLastItem, itemsAmount))
|
|
10407
10408
|
})]
|
|
10408
10409
|
}), navigation]
|
|
10409
10410
|
});
|
|
10410
10411
|
};
|
|
10411
10412
|
Pagination.displayName = "Pagination";
|
|
10412
|
-
const texts$
|
|
10413
|
+
const texts$9 = createTexts({
|
|
10413
10414
|
pagination: {
|
|
10414
10415
|
nb: "Paginering",
|
|
10415
10416
|
no: "Paginering",
|
|
@@ -11719,8 +11720,8 @@ const createCountryOptions = (countries) => {
|
|
|
11719
11720
|
const countryOptions = createCountryOptions(COUNTRIES);
|
|
11720
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 }) => {
|
|
11721
11722
|
const { t } = useTranslation();
|
|
11722
|
-
const tGroupLabel = groupLabel ?? t(texts$
|
|
11723
|
-
const tSelectLabel = selectLabel ?? t(texts$
|
|
11723
|
+
const tGroupLabel = groupLabel ?? t(texts$8.countryCodeAndPhoneNumber);
|
|
11724
|
+
const tSelectLabel = selectLabel ?? t(texts$8.countryCode);
|
|
11724
11725
|
const generatedId = (0, react.useId)();
|
|
11725
11726
|
const uniqueId = props.id ?? generatedId;
|
|
11726
11727
|
const phoneInputId = `${uniqueId}-phone-input`;
|
|
@@ -11869,7 +11870,7 @@ const PhoneInput = ({ label, readOnly, errorMessage, tip, required, width, compo
|
|
|
11869
11870
|
};
|
|
11870
11871
|
PhoneInput.displayName = "PhoneInput";
|
|
11871
11872
|
const getCallingCode = (s) => s.substring(s.indexOf("+"), s.length) ?? "";
|
|
11872
|
-
const texts$
|
|
11873
|
+
const texts$8 = createTexts({
|
|
11873
11874
|
countryCode: {
|
|
11874
11875
|
nb: "Landskode",
|
|
11875
11876
|
no: "Landskode",
|
|
@@ -11973,6 +11974,7 @@ const Popover = ({ id, header, withCloseButton = true, onBlur, children, placeme
|
|
|
11973
11974
|
}),
|
|
11974
11975
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
11975
11976
|
marginBlock: !hasTitle && withCloseButton ? "x2 0" : "0",
|
|
11977
|
+
height: "100%",
|
|
11976
11978
|
children
|
|
11977
11979
|
}),
|
|
11978
11980
|
withCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
@@ -12141,7 +12143,7 @@ const ProgressTrackerItem = (props) => {
|
|
|
12141
12143
|
color: getTextColor(),
|
|
12142
12144
|
children
|
|
12143
12145
|
})] });
|
|
12144
|
-
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)}`;
|
|
12145
12147
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
12146
12148
|
as: "li",
|
|
12147
12149
|
display: direction === "row" ? "flex" : void 0,
|
|
@@ -12166,7 +12168,7 @@ const ProgressTrackerItem = (props) => {
|
|
|
12166
12168
|
});
|
|
12167
12169
|
};
|
|
12168
12170
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
12169
|
-
const texts$
|
|
12171
|
+
const texts$7 = createTexts({
|
|
12170
12172
|
uncompleted: {
|
|
12171
12173
|
nb: "trinn ikke ferdig",
|
|
12172
12174
|
no: "trinn ikke ferdig",
|
|
@@ -12207,7 +12209,7 @@ const ProgressTracker = (() => {
|
|
|
12207
12209
|
direction
|
|
12208
12210
|
},
|
|
12209
12211
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
12210
|
-
"aria-label": ariaLabel ?? t(texts$
|
|
12212
|
+
"aria-label": ariaLabel ?? t(texts$6.stepProgression),
|
|
12211
12213
|
...getBaseHTMLProps(id, className, style, htmlProps, rest),
|
|
12212
12214
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
12213
12215
|
as: StylelessOList,
|
|
@@ -12237,7 +12239,7 @@ function passIndexPropToProgressTrackerItem(children) {
|
|
|
12237
12239
|
index
|
|
12238
12240
|
}));
|
|
12239
12241
|
}
|
|
12240
|
-
const texts$
|
|
12242
|
+
const texts$6 = createTexts({ stepProgression: {
|
|
12241
12243
|
nb: "Trinnprogresjon",
|
|
12242
12244
|
no: "Trinnprogresjon",
|
|
12243
12245
|
nn: "Trinnprogresjon",
|
|
@@ -12359,7 +12361,7 @@ const SearchSuggestions = ({ id, searchId, className, style, htmlProps, suggesti
|
|
|
12359
12361
|
marginBlock: "x0.25 0",
|
|
12360
12362
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropdownHeader, {
|
|
12361
12363
|
id: suggestionsHeaderId,
|
|
12362
|
-
children: t(texts$
|
|
12364
|
+
children: t(texts$5.searchSuggestions)
|
|
12363
12365
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StylelessList, {
|
|
12364
12366
|
role: "listbox",
|
|
12365
12367
|
"aria-labelledby": suggestionsHeaderId,
|
|
@@ -12369,7 +12371,7 @@ const SearchSuggestions = ({ id, searchId, className, style, htmlProps, suggesti
|
|
|
12369
12371
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchSuggestionItem, {
|
|
12370
12372
|
index,
|
|
12371
12373
|
focus: focus === index && showSuggestions,
|
|
12372
|
-
"aria-label": t(texts$
|
|
12374
|
+
"aria-label": t(texts$5.search(suggestion)),
|
|
12373
12375
|
onClick: onSuggestionClick,
|
|
12374
12376
|
"aria-setsize": suggestionsToRender.length,
|
|
12375
12377
|
"aria-posinset": index,
|
|
@@ -12381,7 +12383,7 @@ const SearchSuggestions = ({ id, searchId, className, style, htmlProps, suggesti
|
|
|
12381
12383
|
});
|
|
12382
12384
|
};
|
|
12383
12385
|
SearchSuggestions.displayName = "SearchSuggestions";
|
|
12384
|
-
const texts$
|
|
12386
|
+
const texts$5 = createTexts({
|
|
12385
12387
|
search: (suggestion) => ({
|
|
12386
12388
|
no: `${suggestion} søk`,
|
|
12387
12389
|
nb: `${suggestion} søk`,
|
|
@@ -12462,11 +12464,11 @@ const Search$1 = ({ componentSize = "medium", buttonProps, showIcon = true, name
|
|
|
12462
12464
|
showSuggestions: context.showSuggestions
|
|
12463
12465
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, {
|
|
12464
12466
|
id: suggestionsDescriptionId,
|
|
12465
|
-
children: t(texts$
|
|
12467
|
+
children: t(texts$4.useArrowKeys)
|
|
12466
12468
|
})] }),
|
|
12467
12469
|
hasValue && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClearButton, {
|
|
12468
12470
|
size: componentSize,
|
|
12469
|
-
"aria-label": t(texts$
|
|
12471
|
+
"aria-label": t(texts$4.clearSearch),
|
|
12470
12472
|
onClick: clearInput
|
|
12471
12473
|
})
|
|
12472
12474
|
]
|
|
@@ -12485,7 +12487,7 @@ const Search$1 = ({ componentSize = "medium", buttonProps, showIcon = true, name
|
|
|
12485
12487
|
size: componentSize,
|
|
12486
12488
|
onClick,
|
|
12487
12489
|
...otherButtonProps,
|
|
12488
|
-
children: buttonLabel ?? t(texts$
|
|
12490
|
+
children: buttonLabel ?? t(texts$4.search)
|
|
12489
12491
|
})]
|
|
12490
12492
|
}) : inputGroup, renderInputMessage({
|
|
12491
12493
|
tip,
|
|
@@ -12493,7 +12495,7 @@ const Search$1 = ({ componentSize = "medium", buttonProps, showIcon = true, name
|
|
|
12493
12495
|
})] })] });
|
|
12494
12496
|
};
|
|
12495
12497
|
Search$1.displayName = "Search";
|
|
12496
|
-
const texts$
|
|
12498
|
+
const texts$4 = createTexts({
|
|
12497
12499
|
clearSearch: {
|
|
12498
12500
|
nb: "Tøm søk",
|
|
12499
12501
|
no: "Tøm søk",
|
|
@@ -12656,7 +12658,7 @@ const SplitButton = ({ size, primaryAction, secondaryActions, purpose = "primary
|
|
|
12656
12658
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
12657
12659
|
...buttonStyleProps,
|
|
12658
12660
|
icon: isOpen ? ChevronUpIcon : ChevronDownIcon,
|
|
12659
|
-
"aria-label": t(texts$
|
|
12661
|
+
"aria-label": t(texts$3.moreActions),
|
|
12660
12662
|
purpose,
|
|
12661
12663
|
className: cn(SplitButton_module_default.option, purpose === "primary" && SplitButton_module_default["option--primary"]),
|
|
12662
12664
|
type: "button"
|
|
@@ -12671,7 +12673,7 @@ const SplitButton = ({ size, primaryAction, secondaryActions, purpose = "primary
|
|
|
12671
12673
|
});
|
|
12672
12674
|
};
|
|
12673
12675
|
SplitButton.displayName = "SplitButton";
|
|
12674
|
-
const texts$
|
|
12676
|
+
const texts$3 = createTexts({ moreActions: {
|
|
12675
12677
|
nb: "Flere handlinger",
|
|
12676
12678
|
no: "Flere handlinger",
|
|
12677
12679
|
nn: "Fleire handlingar",
|
|
@@ -12729,6 +12731,60 @@ const Cell = ({ children, type: _type, layout = "left", collapseKey, className,
|
|
|
12729
12731
|
};
|
|
12730
12732
|
Cell.displayName = "Table.Cell";
|
|
12731
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
|
|
12732
12788
|
//#region src/components/Table/Foot.tsx
|
|
12733
12789
|
const Foot = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tfoot", { ...props });
|
|
12734
12790
|
Foot.displayName = "Table.Foot";
|
|
@@ -12936,6 +12992,7 @@ Table.Head = Head;
|
|
|
12936
12992
|
Table.Body = Body;
|
|
12937
12993
|
Table.Cell = Cell;
|
|
12938
12994
|
Table.SortCell = SortCell;
|
|
12995
|
+
Table.FilterCell = FilterCell;
|
|
12939
12996
|
Table.Row = Row;
|
|
12940
12997
|
Table.Foot = Foot;
|
|
12941
12998
|
//#endregion
|
|
@@ -13839,6 +13896,7 @@ exports.TabPanels = TabPanels;
|
|
|
13839
13896
|
exports.Table = Table;
|
|
13840
13897
|
exports.TableBody = Body;
|
|
13841
13898
|
exports.TableCell = Cell;
|
|
13899
|
+
exports.TableFilterCell = FilterCell;
|
|
13842
13900
|
exports.TableFoot = Foot;
|
|
13843
13901
|
exports.TableHead = Head;
|
|
13844
13902
|
exports.TableRow = Row;
|