@norges-domstoler/dds-components 21.17.1 → 21.18.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 +16 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +49 -19
- package/dist/index.d.ts +49 -19
- package/dist/index.js +724 -485
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +706 -477
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -224,7 +224,8 @@ var combineHandlers = (handler1, handler2) => {
|
|
|
224
224
|
|
|
225
225
|
// src/utils/dom.ts
|
|
226
226
|
function cn(...classNames) {
|
|
227
|
-
|
|
227
|
+
const filtered = classNames.filter(Boolean).join(" ");
|
|
228
|
+
return filtered || void 0;
|
|
228
229
|
}
|
|
229
230
|
function convertCamelToHyphen(value) {
|
|
230
231
|
return value.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([a-z])([0-9])/g, "$1-$2").toLowerCase();
|
|
@@ -2899,8 +2900,8 @@ function useTranslation() {
|
|
|
2899
2900
|
const t = (text) => text[lang];
|
|
2900
2901
|
return { t, lang };
|
|
2901
2902
|
}
|
|
2902
|
-
function createTexts(
|
|
2903
|
-
return
|
|
2903
|
+
function createTexts(texts30) {
|
|
2904
|
+
return texts30;
|
|
2904
2905
|
}
|
|
2905
2906
|
|
|
2906
2907
|
// src/DdsProvider/DdsProvider.tsx
|
|
@@ -3690,7 +3691,8 @@ var texts = createTexts({
|
|
|
3690
3691
|
nb: "G\xE5 tilbake",
|
|
3691
3692
|
no: "G\xE5 tilbake",
|
|
3692
3693
|
nn: "G\xE5 tilbake",
|
|
3693
|
-
en: "Go back"
|
|
3694
|
+
en: "Go back",
|
|
3695
|
+
se: "Mana ruovttoluotta"
|
|
3694
3696
|
}
|
|
3695
3697
|
});
|
|
3696
3698
|
|
|
@@ -3761,25 +3763,29 @@ var commonTexts = createTexts({
|
|
|
3761
3763
|
no: "T\xF8m nedtrekksliste",
|
|
3762
3764
|
nb: "T\xF8m nedtrekksliste",
|
|
3763
3765
|
nn: "T\xF8m nedtrekksliste",
|
|
3764
|
-
en: "Clear selection"
|
|
3766
|
+
en: "Clear selection",
|
|
3767
|
+
se: "Gidde v\xE1lljemiid"
|
|
3765
3768
|
},
|
|
3766
3769
|
close: {
|
|
3767
3770
|
nb: "Lukk",
|
|
3768
3771
|
no: "Lukk",
|
|
3769
3772
|
nn: "Lukk",
|
|
3770
|
-
en: "Close"
|
|
3773
|
+
en: "Close",
|
|
3774
|
+
se: "Gidde"
|
|
3771
3775
|
},
|
|
3772
3776
|
closeMessage: {
|
|
3773
3777
|
nb: "Lukk melding",
|
|
3774
3778
|
no: "Lukk melding",
|
|
3775
3779
|
nn: "Lukk melding",
|
|
3776
|
-
en: "Close message"
|
|
3780
|
+
en: "Close message",
|
|
3781
|
+
se: "Gidde die\u0111u"
|
|
3777
3782
|
},
|
|
3778
3783
|
loading: {
|
|
3779
3784
|
nb: "Innlastning p\xE5g\xE5r",
|
|
3780
3785
|
no: "Innlastning p\xE5g\xE5r",
|
|
3781
3786
|
nn: "Innlastning p\xE5g\xE5r",
|
|
3782
|
-
en: "Loading"
|
|
3787
|
+
en: "Loading",
|
|
3788
|
+
se: "Vie\u017E\u017Eamin"
|
|
3783
3789
|
}
|
|
3784
3790
|
});
|
|
3785
3791
|
|
|
@@ -3865,8 +3871,8 @@ var Button = ({
|
|
|
3865
3871
|
iconPosition = "left",
|
|
3866
3872
|
href,
|
|
3867
3873
|
target,
|
|
3868
|
-
loading
|
|
3869
|
-
loadingTooltip
|
|
3874
|
+
loading,
|
|
3875
|
+
loadingTooltip,
|
|
3870
3876
|
fullWidth = false,
|
|
3871
3877
|
icon,
|
|
3872
3878
|
onClick,
|
|
@@ -3879,6 +3885,8 @@ var Button = ({
|
|
|
3879
3885
|
...rest
|
|
3880
3886
|
}) => {
|
|
3881
3887
|
const { purpose: groupPurpose, size: groupSize } = useButtonGroupContext();
|
|
3888
|
+
const { t } = useTranslation();
|
|
3889
|
+
const spinnerTooltip = loadingTooltip != null ? loadingTooltip : t(texts2.saving);
|
|
3882
3890
|
const hasLabel = !!children;
|
|
3883
3891
|
const hasIcon = !!icon;
|
|
3884
3892
|
const hasLabelAndIcon = hasIcon && hasLabel;
|
|
@@ -3919,7 +3927,7 @@ var Button = ({
|
|
|
3919
3927
|
{
|
|
3920
3928
|
size: "1em",
|
|
3921
3929
|
color: purpose === "primary" || purpose === "danger" ? "iconOnAction" : "iconDefault",
|
|
3922
|
-
tooltip:
|
|
3930
|
+
tooltip: spinnerTooltip,
|
|
3923
3931
|
className: Button_default.icon
|
|
3924
3932
|
}
|
|
3925
3933
|
) })
|
|
@@ -3963,6 +3971,15 @@ var Button = ({
|
|
|
3963
3971
|
);
|
|
3964
3972
|
};
|
|
3965
3973
|
Button.displayName = "Button";
|
|
3974
|
+
var texts2 = createTexts({
|
|
3975
|
+
saving: {
|
|
3976
|
+
no: "Lagring p\xE5g\xE5r",
|
|
3977
|
+
nb: "Lagring p\xE5g\xE5r",
|
|
3978
|
+
nn: "Lagring p\xE5g\xE5r",
|
|
3979
|
+
en: "Saving",
|
|
3980
|
+
se: "Vurkemin"
|
|
3981
|
+
}
|
|
3982
|
+
});
|
|
3966
3983
|
|
|
3967
3984
|
// src/components/OverflowMenu/OverflowMenu.tsx
|
|
3968
3985
|
import { useEffect as useEffect15 } from "react";
|
|
@@ -4442,7 +4459,7 @@ var Breadcrumbs = ({
|
|
|
4442
4459
|
size: "xsmall",
|
|
4443
4460
|
icon: MoreHorizontalIcon,
|
|
4444
4461
|
purpose: "tertiary",
|
|
4445
|
-
"aria-label": bChildrenTruncated.length > 1 ? t(
|
|
4462
|
+
"aria-label": bChildrenTruncated.length > 1 ? t(texts3.showHiddenTo(bChildren.length - 1)) : t(texts3.showHidden)
|
|
4446
4463
|
}
|
|
4447
4464
|
),
|
|
4448
4465
|
/* @__PURE__ */ jsx205(OverflowMenu, { children: /* @__PURE__ */ jsx205(OverflowMenuList, { children: bChildrenTruncated }) })
|
|
@@ -4464,7 +4481,7 @@ var Breadcrumbs = ({
|
|
|
4464
4481
|
"nav",
|
|
4465
4482
|
{
|
|
4466
4483
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
4467
|
-
"aria-label": t(
|
|
4484
|
+
"aria-label": t(texts3.breadcrumbs),
|
|
4468
4485
|
children: [
|
|
4469
4486
|
/* @__PURE__ */ jsx205(
|
|
4470
4487
|
HStack,
|
|
@@ -4480,24 +4497,27 @@ var Breadcrumbs = ({
|
|
|
4480
4497
|
);
|
|
4481
4498
|
};
|
|
4482
4499
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
4483
|
-
var
|
|
4500
|
+
var texts3 = createTexts({
|
|
4484
4501
|
breadcrumbs: {
|
|
4485
4502
|
nb: "Br\xF8dsmulesti",
|
|
4486
4503
|
no: "Br\xF8dsmulesti",
|
|
4487
4504
|
nn: "Br\xF8dsmulesti",
|
|
4488
|
-
en: "Breadcrumbs"
|
|
4505
|
+
en: "Breadcrumbs",
|
|
4506
|
+
se: "L\xE1ibemoallob\xE1lggis"
|
|
4489
4507
|
},
|
|
4490
4508
|
showHiddenTo: (to) => ({
|
|
4491
4509
|
nb: `Vis br\xF8dsmule 2 til ${to}`,
|
|
4492
4510
|
no: `Vis br\xF8dsmule 2 til ${to}`,
|
|
4493
4511
|
nn: `Vis br\xF8dsmule 2 til ${to}`,
|
|
4494
|
-
en: `Show breadcrumb 2 to ${to}
|
|
4512
|
+
en: `Show breadcrumb 2 to ${to}`,
|
|
4513
|
+
se: `\u010C\xE1jet l\xE1ibemoalu 2 ${to}`
|
|
4495
4514
|
}),
|
|
4496
4515
|
showHidden: {
|
|
4497
4516
|
nb: "Vis br\xF8dsmule 2",
|
|
4498
4517
|
no: "Vis br\xF8dsmule 2",
|
|
4499
4518
|
nn: "Vis br\xF8dsmule 2",
|
|
4500
|
-
en: "Show breadcrumb 2"
|
|
4519
|
+
en: "Show breadcrumb 2",
|
|
4520
|
+
se: "\u010C\xE1jet l\xE1ibemoalu 2"
|
|
4501
4521
|
}
|
|
4502
4522
|
});
|
|
4503
4523
|
|
|
@@ -4972,6 +4992,7 @@ var InputMessage = ({
|
|
|
4972
4992
|
id,
|
|
4973
4993
|
className,
|
|
4974
4994
|
htmlProps,
|
|
4995
|
+
children,
|
|
4975
4996
|
...rest
|
|
4976
4997
|
}) => {
|
|
4977
4998
|
const isError = messageType === "error";
|
|
@@ -4992,7 +5013,7 @@ var InputMessage = ({
|
|
|
4992
5013
|
typographyType: isError ? "bodySmall" : "bodyXsmall",
|
|
4993
5014
|
color: isError ? "textDefault" : "textSubtle",
|
|
4994
5015
|
as: "span",
|
|
4995
|
-
children: message
|
|
5016
|
+
children: message != null ? message : children
|
|
4996
5017
|
}
|
|
4997
5018
|
)
|
|
4998
5019
|
]
|
|
@@ -5463,7 +5484,7 @@ var Chip = ({
|
|
|
5463
5484
|
icon: CloseSmallIcon,
|
|
5464
5485
|
purpose: "tertiary",
|
|
5465
5486
|
onClick,
|
|
5466
|
-
"aria-label": ariaLabel != null ? ariaLabel : t(
|
|
5487
|
+
"aria-label": ariaLabel != null ? ariaLabel : t(texts4.removeChip) + (text ? ` ${text}` : "")
|
|
5467
5488
|
}
|
|
5468
5489
|
)
|
|
5469
5490
|
]
|
|
@@ -5471,12 +5492,13 @@ var Chip = ({
|
|
|
5471
5492
|
) : null;
|
|
5472
5493
|
};
|
|
5473
5494
|
Chip.displayName = "Chip";
|
|
5474
|
-
var
|
|
5495
|
+
var texts4 = createTexts({
|
|
5475
5496
|
removeChip: {
|
|
5476
5497
|
nb: "Fjern merkelapp",
|
|
5477
5498
|
no: "Fjern merkelapp",
|
|
5478
5499
|
nn: "Fjern merkelapp",
|
|
5479
|
-
en: "Remove chip"
|
|
5500
|
+
en: "Remove chip",
|
|
5501
|
+
se: "Sihku lihppu"
|
|
5480
5502
|
}
|
|
5481
5503
|
});
|
|
5482
5504
|
|
|
@@ -5598,7 +5620,7 @@ function CookieBanner({
|
|
|
5598
5620
|
{
|
|
5599
5621
|
as: Button,
|
|
5600
5622
|
showBelow: collapsedBreakpoint,
|
|
5601
|
-
"aria-label": t(
|
|
5623
|
+
"aria-label": t(texts5.expandConsent),
|
|
5602
5624
|
purpose: "tertiary",
|
|
5603
5625
|
icon: ExpandIcon,
|
|
5604
5626
|
onClick: () => setIsCollapsedOnBreakpoint(false),
|
|
@@ -5632,12 +5654,13 @@ function CookieBanner({
|
|
|
5632
5654
|
);
|
|
5633
5655
|
}
|
|
5634
5656
|
CookieBanner.displayName = "CookieBanner";
|
|
5635
|
-
var
|
|
5657
|
+
var texts5 = createTexts({
|
|
5636
5658
|
expandConsent: {
|
|
5637
5659
|
nb: "Utvid samtykke for bruk av informasjonskapsler",
|
|
5638
5660
|
no: "Utvid samtykke for bruk av informasjonskapsler",
|
|
5639
5661
|
nn: "Utvid samtykke for bruk av informasjonskapslar",
|
|
5640
|
-
en: "Expand consent for the use of cookies"
|
|
5662
|
+
en: "Expand consent for the use of cookies",
|
|
5663
|
+
se: "Viiddit mie\u0111\xE1husa diehto\u010Doahkuid geavaheapm\xE1i"
|
|
5641
5664
|
}
|
|
5642
5665
|
});
|
|
5643
5666
|
|
|
@@ -5704,7 +5727,8 @@ var LOCALE = {
|
|
|
5704
5727
|
nb: "nb-NO",
|
|
5705
5728
|
no: "no-NO",
|
|
5706
5729
|
nn: "nn-NO",
|
|
5707
|
-
en: "en-GB"
|
|
5730
|
+
en: "en-GB",
|
|
5731
|
+
se: "se-NO"
|
|
5708
5732
|
};
|
|
5709
5733
|
var timezone = "Europe/Oslo";
|
|
5710
5734
|
|
|
@@ -5956,13 +5980,13 @@ function CalendarGrid({ state, ...props }) {
|
|
|
5956
5980
|
} = useCalendarGrid(props, state);
|
|
5957
5981
|
const weeksInMonth = getWeeksInMonth(state.visibleRange.start, locale);
|
|
5958
5982
|
const weekDays = [
|
|
5959
|
-
{ short: t(
|
|
5960
|
-
{ short: t(
|
|
5961
|
-
{ short: t(
|
|
5962
|
-
{ short: t(
|
|
5963
|
-
{ short: t(
|
|
5964
|
-
{ short: t(
|
|
5965
|
-
{ short: t(
|
|
5983
|
+
{ short: t(texts6.mo), full: t(texts6.monday) },
|
|
5984
|
+
{ short: t(texts6.tu), full: t(texts6.tuesday) },
|
|
5985
|
+
{ short: t(texts6.we), full: t(texts6.wednesday) },
|
|
5986
|
+
{ short: t(texts6.th), full: t(texts6.thursday) },
|
|
5987
|
+
{ short: t(texts6.fr), full: t(texts6.friday) },
|
|
5988
|
+
{ short: t(texts6.sa), full: t(texts6.saturday) },
|
|
5989
|
+
{ short: t(texts6.su), full: t(texts6.sunday) }
|
|
5966
5990
|
];
|
|
5967
5991
|
const { showWeekNumbers, onClose } = useContext10(CalendarPopoverContext);
|
|
5968
5992
|
const typographyCn = [
|
|
@@ -5988,7 +6012,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
5988
6012
|
className: cn(DateInput_default["calendar__grid-element"], ...typographyCn),
|
|
5989
6013
|
children: [
|
|
5990
6014
|
/* @__PURE__ */ jsx227("span", { "aria-hidden": true, children: "#" }),
|
|
5991
|
-
/* @__PURE__ */ jsx227(VisuallyHidden, { children: t(
|
|
6015
|
+
/* @__PURE__ */ jsx227(VisuallyHidden, { children: t(texts6.weekNumber) })
|
|
5992
6016
|
]
|
|
5993
6017
|
}
|
|
5994
6018
|
),
|
|
@@ -6031,96 +6055,111 @@ function CalendarGrid({ state, ...props }) {
|
|
|
6031
6055
|
);
|
|
6032
6056
|
}
|
|
6033
6057
|
CalendarGrid.displayName = "CalendarGrid";
|
|
6034
|
-
var
|
|
6058
|
+
var texts6 = createTexts({
|
|
6035
6059
|
weekNumber: {
|
|
6036
6060
|
nb: "Ukenummer",
|
|
6037
6061
|
no: "Ukenummer",
|
|
6038
6062
|
nn: "Vekenummer",
|
|
6039
|
-
en: "Week number"
|
|
6063
|
+
en: "Week number",
|
|
6064
|
+
se: "Vahkkonummir"
|
|
6040
6065
|
},
|
|
6041
6066
|
mo: {
|
|
6042
6067
|
nb: "Ma",
|
|
6043
6068
|
no: "Ma",
|
|
6044
6069
|
nn: "M\xE5",
|
|
6045
|
-
en: "Mo"
|
|
6070
|
+
en: "Mo",
|
|
6071
|
+
se: "Vuos"
|
|
6046
6072
|
},
|
|
6047
6073
|
tu: {
|
|
6048
6074
|
nb: "Ti",
|
|
6049
6075
|
no: "Ti",
|
|
6050
6076
|
nn: "Ty",
|
|
6051
|
-
en: "Tu"
|
|
6077
|
+
en: "Tu",
|
|
6078
|
+
se: "Ma\u014B"
|
|
6052
6079
|
},
|
|
6053
6080
|
we: {
|
|
6054
6081
|
nb: "On",
|
|
6055
6082
|
no: "On",
|
|
6056
6083
|
nn: "On",
|
|
6057
|
-
en: "We"
|
|
6084
|
+
en: "We",
|
|
6085
|
+
se: "Gask"
|
|
6058
6086
|
},
|
|
6059
6087
|
th: {
|
|
6060
6088
|
nb: "To",
|
|
6061
6089
|
no: "To",
|
|
6062
6090
|
nn: "To",
|
|
6063
|
-
en: "Th"
|
|
6091
|
+
en: "Th",
|
|
6092
|
+
se: "Duo"
|
|
6064
6093
|
},
|
|
6065
6094
|
fr: {
|
|
6066
6095
|
nb: "Fr",
|
|
6067
6096
|
no: "Fr",
|
|
6068
6097
|
nn: "Fr",
|
|
6069
|
-
en: "Fr"
|
|
6098
|
+
en: "Fr",
|
|
6099
|
+
se: "Bea"
|
|
6070
6100
|
},
|
|
6071
6101
|
sa: {
|
|
6072
6102
|
nb: "L\xF8",
|
|
6073
6103
|
no: "L\xF8",
|
|
6074
6104
|
nn: "La",
|
|
6075
|
-
en: "Sa"
|
|
6105
|
+
en: "Sa",
|
|
6106
|
+
se: "L\xE1v"
|
|
6076
6107
|
},
|
|
6077
6108
|
su: {
|
|
6078
6109
|
nb: "S\xF8",
|
|
6079
6110
|
no: "S\xF8",
|
|
6080
6111
|
nn: "Su",
|
|
6081
|
-
en: "Su"
|
|
6112
|
+
en: "Su",
|
|
6113
|
+
se: "Sotn"
|
|
6082
6114
|
},
|
|
6083
6115
|
monday: {
|
|
6084
6116
|
nb: "Mandag",
|
|
6085
6117
|
no: "Mandag",
|
|
6086
6118
|
nn: "M\xE5ndag",
|
|
6087
|
-
en: "Monday"
|
|
6119
|
+
en: "Monday",
|
|
6120
|
+
se: "Vuoss\xE1rga"
|
|
6088
6121
|
},
|
|
6089
6122
|
tuesday: {
|
|
6090
6123
|
nb: "Tirsdag",
|
|
6091
6124
|
no: "Tirsdag",
|
|
6092
6125
|
nn: "Tysdag",
|
|
6093
|
-
en: "Tuesday"
|
|
6126
|
+
en: "Tuesday",
|
|
6127
|
+
se: "Ma\u014B\u014Beb\xE1rga"
|
|
6094
6128
|
},
|
|
6095
6129
|
wednesday: {
|
|
6096
6130
|
nb: "Onsdag",
|
|
6097
6131
|
no: "Onsdag",
|
|
6098
6132
|
nn: "Onsdag",
|
|
6099
|
-
en: "Wednesday"
|
|
6133
|
+
en: "Wednesday",
|
|
6134
|
+
se: "Gaskavahkku"
|
|
6100
6135
|
},
|
|
6101
6136
|
thursday: {
|
|
6102
6137
|
nb: "Torsdag",
|
|
6103
6138
|
no: "Torsdag",
|
|
6104
6139
|
nn: "Torsdag",
|
|
6105
|
-
en: "Thursday"
|
|
6140
|
+
en: "Thursday",
|
|
6141
|
+
se: "Duorastat"
|
|
6106
6142
|
},
|
|
6107
6143
|
friday: {
|
|
6108
6144
|
nb: "Fredag",
|
|
6109
6145
|
no: "Fredag",
|
|
6110
6146
|
nn: "Fredag",
|
|
6111
|
-
en: "Friday"
|
|
6147
|
+
en: "Friday",
|
|
6148
|
+
se: "Bearjadat"
|
|
6112
6149
|
},
|
|
6113
6150
|
saturday: {
|
|
6114
6151
|
nb: "L\xF8rdag",
|
|
6115
6152
|
no: "L\xF8rdag",
|
|
6116
6153
|
nn: "Laurdag",
|
|
6117
|
-
en: "Saturday"
|
|
6154
|
+
en: "Saturday",
|
|
6155
|
+
se: "L\xE1vvardat"
|
|
6118
6156
|
},
|
|
6119
6157
|
sunday: {
|
|
6120
6158
|
nb: "S\xF8ndag",
|
|
6121
6159
|
no: "S\xF8ndag",
|
|
6122
6160
|
nn: "Sundag",
|
|
6123
|
-
en: "Sunday"
|
|
6161
|
+
en: "Sunday",
|
|
6162
|
+
se: "Sotnabeaivi"
|
|
6124
6163
|
}
|
|
6125
6164
|
});
|
|
6126
6165
|
|
|
@@ -6163,7 +6202,7 @@ function Calendar(props) {
|
|
|
6163
6202
|
Button,
|
|
6164
6203
|
{
|
|
6165
6204
|
type: "button",
|
|
6166
|
-
"aria-label": t(
|
|
6205
|
+
"aria-label": t(texts7.previousMonth),
|
|
6167
6206
|
onClick: (e) => onPrev == null ? void 0 : onPrev(e),
|
|
6168
6207
|
size: "small",
|
|
6169
6208
|
purpose: "tertiary",
|
|
@@ -6185,7 +6224,7 @@ function Calendar(props) {
|
|
|
6185
6224
|
Button,
|
|
6186
6225
|
{
|
|
6187
6226
|
type: "button",
|
|
6188
|
-
"aria-label": t(
|
|
6227
|
+
"aria-label": t(texts7.nextMonth),
|
|
6189
6228
|
onClick: (e) => onNext == null ? void 0 : onNext(e),
|
|
6190
6229
|
size: "small",
|
|
6191
6230
|
purpose: "tertiary",
|
|
@@ -6198,18 +6237,20 @@ function Calendar(props) {
|
|
|
6198
6237
|
] });
|
|
6199
6238
|
}
|
|
6200
6239
|
Calendar.displayName = "Calendar";
|
|
6201
|
-
var
|
|
6240
|
+
var texts7 = createTexts({
|
|
6202
6241
|
nextMonth: {
|
|
6203
6242
|
nb: "Neste m\xE5ned",
|
|
6204
6243
|
no: "Neste m\xE5ned",
|
|
6205
6244
|
nn: "Neste m\xE5nad",
|
|
6206
|
-
en: "Next month"
|
|
6245
|
+
en: "Next month",
|
|
6246
|
+
se: "Boahte m\xE1nu"
|
|
6207
6247
|
},
|
|
6208
6248
|
previousMonth: {
|
|
6209
6249
|
nb: "Forrige m\xE5ned",
|
|
6210
6250
|
no: "Forrige m\xE5ned",
|
|
6211
6251
|
nn: "F\xF8rre m\xE5nad",
|
|
6212
|
-
en: "Previous month"
|
|
6252
|
+
en: "Previous month",
|
|
6253
|
+
se: "Ovddit m\xE1nu"
|
|
6213
6254
|
}
|
|
6214
6255
|
});
|
|
6215
6256
|
|
|
@@ -6286,6 +6327,7 @@ function CalendarButton({
|
|
|
6286
6327
|
|
|
6287
6328
|
// src/components/date-inputs/DatePicker/DateField/DateField.utils.tsx
|
|
6288
6329
|
function formatDateFieldSegments(segments) {
|
|
6330
|
+
const { t } = useTranslation();
|
|
6289
6331
|
const daySegment = segments.find((segment) => segment.type === "day");
|
|
6290
6332
|
const monthSegment = segments.find((segment) => segment.type === "month");
|
|
6291
6333
|
const yearSegment = segments.find((segment) => segment.type === "year");
|
|
@@ -6296,16 +6338,16 @@ function formatDateFieldSegments(segments) {
|
|
|
6296
6338
|
const formattedDaySegment = {
|
|
6297
6339
|
...daySegment,
|
|
6298
6340
|
text: daySegment.text.padStart(2, "0"),
|
|
6299
|
-
placeholder:
|
|
6341
|
+
placeholder: t(texts8.dayPlaceholder)
|
|
6300
6342
|
};
|
|
6301
6343
|
const formattedMonthSegment = {
|
|
6302
6344
|
...monthSegment,
|
|
6303
6345
|
text: monthSegment.text.padStart(2, "0"),
|
|
6304
|
-
placeholder:
|
|
6346
|
+
placeholder: t(texts8.monthPlaceholder)
|
|
6305
6347
|
};
|
|
6306
6348
|
const formattedYearSegment = {
|
|
6307
6349
|
...yearSegment,
|
|
6308
|
-
placeholder:
|
|
6350
|
+
placeholder: t(texts8.yearPlaceholder)
|
|
6309
6351
|
};
|
|
6310
6352
|
const formattedSeparatorSegment = { ...separatorSegment, text: "." };
|
|
6311
6353
|
return [
|
|
@@ -6316,6 +6358,29 @@ function formatDateFieldSegments(segments) {
|
|
|
6316
6358
|
formattedYearSegment
|
|
6317
6359
|
];
|
|
6318
6360
|
}
|
|
6361
|
+
var texts8 = createTexts({
|
|
6362
|
+
dayPlaceholder: {
|
|
6363
|
+
nb: "dd",
|
|
6364
|
+
no: "dd",
|
|
6365
|
+
nn: "dd",
|
|
6366
|
+
en: "dd",
|
|
6367
|
+
se: "jj"
|
|
6368
|
+
},
|
|
6369
|
+
monthPlaceholder: {
|
|
6370
|
+
nb: "mm",
|
|
6371
|
+
no: "mm",
|
|
6372
|
+
nn: "mm",
|
|
6373
|
+
en: "mm",
|
|
6374
|
+
se: "mm"
|
|
6375
|
+
},
|
|
6376
|
+
yearPlaceholder: {
|
|
6377
|
+
nb: "\xE5\xE5\xE5\xE5",
|
|
6378
|
+
no: "\xE5\xE5\xE5\xE5",
|
|
6379
|
+
nn: "\xE5\xE5\xE5\xE5",
|
|
6380
|
+
en: "yyyy",
|
|
6381
|
+
se: "jjjj"
|
|
6382
|
+
}
|
|
6383
|
+
});
|
|
6319
6384
|
|
|
6320
6385
|
// src/components/date-inputs/DatePicker/DateField/DateSegment.tsx
|
|
6321
6386
|
import { useDateSegment } from "@react-aria/datepicker";
|
|
@@ -6613,7 +6678,7 @@ function DateField({
|
|
|
6613
6678
|
ClearButton,
|
|
6614
6679
|
{
|
|
6615
6680
|
absolute: false,
|
|
6616
|
-
"aria-label": t(
|
|
6681
|
+
"aria-label": t(texts9.clearDate),
|
|
6617
6682
|
"aria-hidden": !hasValue,
|
|
6618
6683
|
className: cn(
|
|
6619
6684
|
DateInput_default["clear-button"],
|
|
@@ -6639,12 +6704,13 @@ function DateField({
|
|
|
6639
6704
|
);
|
|
6640
6705
|
}
|
|
6641
6706
|
DateField.displayName = "DateField";
|
|
6642
|
-
var
|
|
6707
|
+
var texts9 = createTexts({
|
|
6643
6708
|
clearDate: {
|
|
6644
6709
|
en: "Clear date",
|
|
6645
6710
|
nb: "T\xF8m dato",
|
|
6646
6711
|
no: "T\xF8m dato",
|
|
6647
|
-
nn: "T\xF8m dato"
|
|
6712
|
+
nn: "T\xF8m dato",
|
|
6713
|
+
se: "Gurre d\xE1htona"
|
|
6648
6714
|
}
|
|
6649
6715
|
});
|
|
6650
6716
|
|
|
@@ -7370,7 +7436,7 @@ var FavStar = ({
|
|
|
7370
7436
|
checked,
|
|
7371
7437
|
onChange: (e) => setChecked(e.target.checked),
|
|
7372
7438
|
type: "checkbox",
|
|
7373
|
-
"aria-label": (_a = props["aria-label"]) != null ? _a : t(
|
|
7439
|
+
"aria-label": (_a = props["aria-label"]) != null ? _a : t(texts10.favourite)
|
|
7374
7440
|
}
|
|
7375
7441
|
),
|
|
7376
7442
|
/* @__PURE__ */ jsx250(Icon, { iconSize: size2, icon: StarIcon, className: FavStar_default.icon }),
|
|
@@ -7387,12 +7453,13 @@ var FavStar = ({
|
|
|
7387
7453
|
);
|
|
7388
7454
|
};
|
|
7389
7455
|
FavStar.displayName = "FavStar";
|
|
7390
|
-
var
|
|
7456
|
+
var texts10 = createTexts({
|
|
7391
7457
|
favourite: {
|
|
7392
|
-
nb: "
|
|
7393
|
-
no: "
|
|
7394
|
-
nn: "
|
|
7395
|
-
en: "
|
|
7458
|
+
nb: "Stjernemarker",
|
|
7459
|
+
no: "Stjernemarker",
|
|
7460
|
+
nn: "Stjernemerk",
|
|
7461
|
+
en: "Mark as favourite",
|
|
7462
|
+
se: "Merke favorihta"
|
|
7396
7463
|
}
|
|
7397
7464
|
});
|
|
7398
7465
|
|
|
@@ -7452,7 +7519,7 @@ function CharCounter(props) {
|
|
|
7452
7519
|
"/",
|
|
7453
7520
|
max
|
|
7454
7521
|
] }),
|
|
7455
|
-
/* @__PURE__ */ jsx251(VisuallyHidden, { children: t(
|
|
7522
|
+
/* @__PURE__ */ jsx251(VisuallyHidden, { children: t(texts11.charsWritten(current, max, max - current)) })
|
|
7456
7523
|
]
|
|
7457
7524
|
}
|
|
7458
7525
|
);
|
|
@@ -7461,12 +7528,13 @@ var renderCharCounter = (id, isShown, textLength, maxLength) => {
|
|
|
7461
7528
|
if (!!maxLength && Number.isInteger(maxLength) && maxLength > 0 && isShown)
|
|
7462
7529
|
return /* @__PURE__ */ jsx251(CharCounter, { id, max: maxLength, current: textLength });
|
|
7463
7530
|
};
|
|
7464
|
-
var
|
|
7531
|
+
var texts11 = createTexts({
|
|
7465
7532
|
charsWritten: (current, max, remain) => ({
|
|
7466
7533
|
nb: `${current} av ${max} tegn skrevet. ${remain} igjen.`,
|
|
7467
7534
|
no: `${current} av ${max} tegn skrevet. ${remain} igjen.`,
|
|
7468
7535
|
nn: `${current} av ${max} teikn skrivne. ${remain} att.`,
|
|
7469
|
-
en: `${current} of ${max} characters used. ${remain} remaining
|
|
7536
|
+
en: `${current} of ${max} characters used. ${remain} remaining.`,
|
|
7537
|
+
se: `${current} ${max} mearkabust\xE1va leat ${max} \u010D\xE1llon ${remain}.`
|
|
7470
7538
|
})
|
|
7471
7539
|
});
|
|
7472
7540
|
|
|
@@ -7625,17 +7693,18 @@ var CommentComponent = ({
|
|
|
7625
7693
|
size: "small",
|
|
7626
7694
|
onClick: handleSubmit,
|
|
7627
7695
|
loading,
|
|
7628
|
-
children: t(
|
|
7696
|
+
children: t(texts12.send)
|
|
7629
7697
|
}
|
|
7630
7698
|
)
|
|
7631
7699
|
] });
|
|
7632
7700
|
};
|
|
7633
|
-
var
|
|
7701
|
+
var texts12 = createTexts({
|
|
7634
7702
|
send: {
|
|
7635
7703
|
nb: "Send inn",
|
|
7636
7704
|
no: "Send inn",
|
|
7637
7705
|
nn: "Send inn",
|
|
7638
|
-
en: "Send"
|
|
7706
|
+
en: "Send",
|
|
7707
|
+
se: "S\xE1dde"
|
|
7639
7708
|
}
|
|
7640
7709
|
});
|
|
7641
7710
|
|
|
@@ -7838,7 +7907,7 @@ var RatingComponent = ({
|
|
|
7838
7907
|
),
|
|
7839
7908
|
children: [
|
|
7840
7909
|
/* @__PURE__ */ jsx255("h2", { className: typographyStyles_default["label-medium"], children: ratingLabel }),
|
|
7841
|
-
loading ? /* @__PURE__ */ jsx255(Spinner, { tooltip: t(
|
|
7910
|
+
loading ? /* @__PURE__ */ jsx255(Spinner, { tooltip: t(texts13.uploadingFeedback) }) : /* @__PURE__ */ jsxs57(HStack, { gap: "x1", children: [
|
|
7842
7911
|
/* @__PURE__ */ jsx255(Tooltip, { text: thumbUpTooltip, children: button("positive", layout, thumbUpTooltip) }),
|
|
7843
7912
|
/* @__PURE__ */ jsx255(Tooltip, { text: thumbDownTooltip, children: /* @__PURE__ */ jsx255("div", { children: button("negative", layout, thumbDownTooltip) }) })
|
|
7844
7913
|
] })
|
|
@@ -7846,12 +7915,13 @@ var RatingComponent = ({
|
|
|
7846
7915
|
}
|
|
7847
7916
|
);
|
|
7848
7917
|
};
|
|
7849
|
-
var
|
|
7918
|
+
var texts13 = createTexts({
|
|
7850
7919
|
uploadingFeedback: {
|
|
7851
7920
|
nb: "Laster opp tilbakemelding...",
|
|
7852
7921
|
no: "Laster opp tilbakemelding...",
|
|
7853
7922
|
nn: "Lastar opp tilbakemelding...",
|
|
7854
|
-
en: "Uploading feedback..."
|
|
7923
|
+
en: "Uploading feedback...",
|
|
7924
|
+
se: "Vie\u017E\u017Eamin ruovttoluottadie\u0111uid..."
|
|
7855
7925
|
}
|
|
7856
7926
|
});
|
|
7857
7927
|
|
|
@@ -7880,14 +7950,14 @@ var Feedback = ({
|
|
|
7880
7950
|
const [rating, setRating] = useState16(null);
|
|
7881
7951
|
const [feedbackText, setFeedbackText] = useState16();
|
|
7882
7952
|
const [isFeedbackSubmitted, setIsFeedbackSubmitted] = useState16(false);
|
|
7883
|
-
const tRatingLabel = ratingLabel != null ? ratingLabel : t(
|
|
7884
|
-
const tPositiveFeedbackLabel = positiveFeedbackLabel != null ? positiveFeedbackLabel : t(
|
|
7885
|
-
const tNegativeFeedbackLabel = negativeFeedbackLabel != null ? negativeFeedbackLabel : t(
|
|
7886
|
-
const tRatingSubmittedTitle = ratingSubmittedTitle != null ? ratingSubmittedTitle : t(
|
|
7887
|
-
const tSubmittedTitle = submittedTitle != null ? submittedTitle : t(
|
|
7888
|
-
const tTextAreaTip = textAreaTip != null ? textAreaTip : t(
|
|
7889
|
-
const tThumbUpTooltip = thumbUpTooltip != null ? thumbUpTooltip : t(
|
|
7890
|
-
const tThumbDownTooltip = thumbDownTooltip != null ? thumbDownTooltip : t(
|
|
7953
|
+
const tRatingLabel = ratingLabel != null ? ratingLabel : t(texts14.ratingQuestion);
|
|
7954
|
+
const tPositiveFeedbackLabel = positiveFeedbackLabel != null ? positiveFeedbackLabel : t(texts14.improvalQuestion);
|
|
7955
|
+
const tNegativeFeedbackLabel = negativeFeedbackLabel != null ? negativeFeedbackLabel : t(texts14.improvalQuestion);
|
|
7956
|
+
const tRatingSubmittedTitle = ratingSubmittedTitle != null ? ratingSubmittedTitle : t(texts14.thanks);
|
|
7957
|
+
const tSubmittedTitle = submittedTitle != null ? submittedTitle : t(texts14.thanks);
|
|
7958
|
+
const tTextAreaTip = textAreaTip != null ? textAreaTip : t(texts14.sensitiveInfo);
|
|
7959
|
+
const tThumbUpTooltip = thumbUpTooltip != null ? thumbUpTooltip : t(texts14.good);
|
|
7960
|
+
const tThumbDownTooltip = thumbDownTooltip != null ? thumbDownTooltip : t(texts14.bad);
|
|
7891
7961
|
useEffect22(() => {
|
|
7892
7962
|
if (ratingProp !== void 0) setRating(ratingProp);
|
|
7893
7963
|
}, [ratingProp]);
|
|
@@ -7942,42 +8012,48 @@ var Feedback = ({
|
|
|
7942
8012
|
}
|
|
7943
8013
|
return /* @__PURE__ */ jsx256(Paragraph, { children: tSubmittedTitle });
|
|
7944
8014
|
};
|
|
7945
|
-
var
|
|
8015
|
+
var texts14 = createTexts({
|
|
7946
8016
|
ratingQuestion: {
|
|
7947
8017
|
nb: "Hva syns du om tjenesten?",
|
|
7948
8018
|
no: "Hva syns du om tjenesten?",
|
|
7949
8019
|
nn: "Kva synest du om tenesta?",
|
|
7950
|
-
en: "What do you think about the service?"
|
|
8020
|
+
en: "What do you think about the service?",
|
|
8021
|
+
se: "Maid oaivvildat b\xE1lvalusa birra?"
|
|
7951
8022
|
},
|
|
7952
8023
|
improvalQuestion: {
|
|
7953
8024
|
nb: "Hva kan vi forbedre? (valgfritt)",
|
|
7954
8025
|
no: "Hva kan vi forbedre? (valgfritt)",
|
|
7955
8026
|
nn: "Kva kan vi forbetre? (valfritt)",
|
|
7956
|
-
en: "What can we improve? (optional)"
|
|
8027
|
+
en: "What can we improve? (optional)",
|
|
8028
|
+
se: "Maid s\xE1httit buoridit? (eavttola\u0161)"
|
|
7957
8029
|
},
|
|
7958
8030
|
thanks: {
|
|
7959
8031
|
nb: "Tusen takk! Tilbakemeldingen din hjelper oss \xE5 forbedre l\xF8sningen",
|
|
7960
8032
|
no: "Tusen takk! Tilbakemeldingen din hjelper oss \xE5 forbedre l\xF8sningen",
|
|
7961
8033
|
nn: "Tusen takk! Tilbakemeldinga di hjelper oss \xE5 forbetre l\xF8ysinga",
|
|
7962
|
-
en: "Thank you! Your feedback helps us improve the service"
|
|
8034
|
+
en: "Thank you! Your feedback helps us improve the service",
|
|
8035
|
+
se: "Giitu! Du m\xE1hcahat veahkeha min buoridit \u010Dovdosa"
|
|
7963
8036
|
},
|
|
7964
8037
|
sensitiveInfo: {
|
|
7965
8038
|
nb: "Ikke send inn personopplysninger eller annen sensitiv informasjon",
|
|
7966
8039
|
no: "Ikke send inn personopplysninger eller annen sensitiv informasjon",
|
|
7967
8040
|
nn: "Ikkje send inn personopplysningar eller annan sensitiv informasjon",
|
|
7968
|
-
en: "Do not submit personal data or other sensitive information"
|
|
8041
|
+
en: "Do not submit personal data or other sensitive information",
|
|
8042
|
+
se: "Ale s\xE1dde persuvdnadie\u0111uid dahje ear\xE1 sensitiiva die\u0111uid"
|
|
7969
8043
|
},
|
|
7970
8044
|
good: {
|
|
7971
8045
|
nb: "Bra",
|
|
7972
8046
|
no: "Bra",
|
|
7973
8047
|
nn: "Bra",
|
|
7974
|
-
en: "Good"
|
|
8048
|
+
en: "Good",
|
|
8049
|
+
se: "Buorre"
|
|
7975
8050
|
},
|
|
7976
8051
|
bad: {
|
|
7977
8052
|
nb: "D\xE5rlig",
|
|
7978
8053
|
no: "D\xE5rlig",
|
|
7979
8054
|
nn: "D\xE5rleg",
|
|
7980
|
-
en: "Bad"
|
|
8055
|
+
en: "Bad",
|
|
8056
|
+
se: "Heajos"
|
|
7981
8057
|
}
|
|
7982
8058
|
});
|
|
7983
8059
|
|
|
@@ -8112,9 +8188,9 @@ var File = (props) => {
|
|
|
8112
8188
|
onClick: removeFile,
|
|
8113
8189
|
icon: CloseIcon,
|
|
8114
8190
|
htmlProps: {
|
|
8115
|
-
"aria-label": t(
|
|
8191
|
+
"aria-label": t(texts15.removeFile(stateFile.file.name)),
|
|
8116
8192
|
"aria-invalid": !isValid ? true : void 0,
|
|
8117
|
-
"aria-errormessage": !isValid ? t(
|
|
8193
|
+
"aria-errormessage": !isValid ? t(texts15.invalidFile) : void 0,
|
|
8118
8194
|
"aria-describedby": spaceSeparatedIdListGenerator(
|
|
8119
8195
|
errorsList.map((e) => e.id)
|
|
8120
8196
|
)
|
|
@@ -8128,18 +8204,20 @@ var File = (props) => {
|
|
|
8128
8204
|
/* @__PURE__ */ jsx260(ErrorList, { errors: errorsList })
|
|
8129
8205
|
] });
|
|
8130
8206
|
};
|
|
8131
|
-
var
|
|
8207
|
+
var texts15 = createTexts({
|
|
8132
8208
|
removeFile: (file) => ({
|
|
8133
8209
|
nb: `Fjern fil ${file}`,
|
|
8134
8210
|
no: `Fjern fil ${file}`,
|
|
8135
8211
|
nn: `Fjern fil ${file}`,
|
|
8136
|
-
en: `Remove file ${file}
|
|
8212
|
+
en: `Remove file ${file}`,
|
|
8213
|
+
se: `Sihku filla ${file}`
|
|
8137
8214
|
}),
|
|
8138
8215
|
invalidFile: {
|
|
8139
8216
|
nb: "Ugyldig fil",
|
|
8140
8217
|
no: "Ugyldig fil",
|
|
8141
8218
|
nn: "Ugyldig fil",
|
|
8142
|
-
en: "Invalid file"
|
|
8219
|
+
en: "Invalid file",
|
|
8220
|
+
se: "F\xE1mohis fiila"
|
|
8143
8221
|
}
|
|
8144
8222
|
});
|
|
8145
8223
|
|
|
@@ -8264,7 +8342,7 @@ var useFileUploader = (props) => {
|
|
|
8264
8342
|
isFileDialogActive: false,
|
|
8265
8343
|
isDragActive: false,
|
|
8266
8344
|
rootErrors: calcRootErrors(
|
|
8267
|
-
t(
|
|
8345
|
+
t(texts16.invalidFileAmount),
|
|
8268
8346
|
initialFileUploaderFiles,
|
|
8269
8347
|
maxFiles,
|
|
8270
8348
|
errorMessage
|
|
@@ -8277,7 +8355,7 @@ var useFileUploader = (props) => {
|
|
|
8277
8355
|
const accepted = isFileAccepted(file, accept);
|
|
8278
8356
|
return {
|
|
8279
8357
|
file,
|
|
8280
|
-
errors: accepted ? [] : [t(
|
|
8358
|
+
errors: accepted ? [] : [t(texts16.invalidFileType)]
|
|
8281
8359
|
};
|
|
8282
8360
|
});
|
|
8283
8361
|
dispatch({
|
|
@@ -8290,7 +8368,7 @@ var useFileUploader = (props) => {
|
|
|
8290
8368
|
dispatch({
|
|
8291
8369
|
type: "setRootErrors",
|
|
8292
8370
|
payload: calcRootErrors(
|
|
8293
|
-
t(
|
|
8371
|
+
t(texts16.invalidFileAmount),
|
|
8294
8372
|
stateFiles,
|
|
8295
8373
|
maxFiles,
|
|
8296
8374
|
errorMessage
|
|
@@ -8344,7 +8422,7 @@ var useFileUploader = (props) => {
|
|
|
8344
8422
|
const accepted = isFileAccepted(file, accept);
|
|
8345
8423
|
return {
|
|
8346
8424
|
file,
|
|
8347
|
-
errors: accepted ? [] : [t(
|
|
8425
|
+
errors: accepted ? [] : [t(texts16.invalidFileType)]
|
|
8348
8426
|
};
|
|
8349
8427
|
}).concat(stateFiles);
|
|
8350
8428
|
onChange(newFiles.map((f) => f.file));
|
|
@@ -8436,18 +8514,20 @@ var useFileUploader = (props) => {
|
|
|
8436
8514
|
removeFile
|
|
8437
8515
|
};
|
|
8438
8516
|
};
|
|
8439
|
-
var
|
|
8517
|
+
var texts16 = createTexts({
|
|
8440
8518
|
invalidFileType: {
|
|
8441
8519
|
nb: "Ugyldig filtype",
|
|
8442
8520
|
no: "Ugyldig filtype",
|
|
8443
8521
|
nn: "Ugyldig filtype",
|
|
8444
|
-
en: "Invalid file type"
|
|
8522
|
+
en: "Invalid file type",
|
|
8523
|
+
se: "F\xE1mohis fila\u0161ladja"
|
|
8445
8524
|
},
|
|
8446
8525
|
invalidFileAmount: {
|
|
8447
8526
|
nb: "For mange filer. Maksimalt antall er ",
|
|
8448
8527
|
no: "For mange filer. Maksimalt antall er ",
|
|
8449
8528
|
nn: "For mange filer. Maksimalt antall er ",
|
|
8450
|
-
en: "Too many files. The maximum allowed is "
|
|
8529
|
+
en: "Too many files. The maximum allowed is ",
|
|
8530
|
+
se: "Menddo ollu fiillat. Maksim\xE1la lohku lea "
|
|
8451
8531
|
}
|
|
8452
8532
|
});
|
|
8453
8533
|
|
|
@@ -8458,7 +8538,7 @@ var FileUploader = (props) => {
|
|
|
8458
8538
|
id,
|
|
8459
8539
|
label,
|
|
8460
8540
|
dropAreaLabel,
|
|
8461
|
-
btnLabel
|
|
8541
|
+
btnLabel,
|
|
8462
8542
|
tip,
|
|
8463
8543
|
required = false,
|
|
8464
8544
|
withDragAndDrop = true,
|
|
@@ -8478,7 +8558,8 @@ var FileUploader = (props) => {
|
|
|
8478
8558
|
...rest
|
|
8479
8559
|
} = props;
|
|
8480
8560
|
const { t } = useTranslation();
|
|
8481
|
-
const tDropAreaLabel = dropAreaLabel != null ? dropAreaLabel : t(
|
|
8561
|
+
const tDropAreaLabel = dropAreaLabel != null ? dropAreaLabel : t(texts17.dragAndDropOr);
|
|
8562
|
+
const tBtnLabel = btnLabel != null ? btnLabel : t(texts17.selectFile);
|
|
8482
8563
|
const generatedId = useId15();
|
|
8483
8564
|
const uniqueId = id != null ? id : `${generatedId}-fileUploader`;
|
|
8484
8565
|
const {
|
|
@@ -8543,7 +8624,7 @@ var FileUploader = (props) => {
|
|
|
8543
8624
|
...rootErrorsList.map((e) => e.id)
|
|
8544
8625
|
])
|
|
8545
8626
|
},
|
|
8546
|
-
children:
|
|
8627
|
+
children: tBtnLabel
|
|
8547
8628
|
}
|
|
8548
8629
|
);
|
|
8549
8630
|
const input = /* @__PURE__ */ jsx261(
|
|
@@ -8587,7 +8668,7 @@ var FileUploader = (props) => {
|
|
|
8587
8668
|
children: [
|
|
8588
8669
|
input,
|
|
8589
8670
|
tDropAreaLabel,
|
|
8590
|
-
/* @__PURE__ */ jsx261(VisuallyHidden, { children: t(
|
|
8671
|
+
/* @__PURE__ */ jsx261(VisuallyHidden, { children: t(texts17.uploadFileWithButton) }),
|
|
8591
8672
|
button
|
|
8592
8673
|
]
|
|
8593
8674
|
}
|
|
@@ -8605,14 +8686,14 @@ var FileUploader = (props) => {
|
|
|
8605
8686
|
readOnly && FileUploader_default["readonly--file-list"]
|
|
8606
8687
|
),
|
|
8607
8688
|
children: [
|
|
8608
|
-
/* @__PURE__ */ jsx261(VisuallyHidden, { id: fileListNameId, children: t(
|
|
8689
|
+
/* @__PURE__ */ jsx261(VisuallyHidden, { id: fileListNameId, children: t(texts17.uploadedFiles) }),
|
|
8609
8690
|
inactive && fileListElements.length === 0 ? /* @__PURE__ */ jsx261(
|
|
8610
8691
|
Typography,
|
|
8611
8692
|
{
|
|
8612
8693
|
italic: true,
|
|
8613
8694
|
as: "span",
|
|
8614
8695
|
color: disabled ? "text-subtle" : "text-medium",
|
|
8615
|
-
children: t(
|
|
8696
|
+
children: t(texts17.noFiles)
|
|
8616
8697
|
}
|
|
8617
8698
|
) : /* @__PURE__ */ jsx261(StylelessList, { "aria-labelledby": fileListNameId, children: fileListElements })
|
|
8618
8699
|
]
|
|
@@ -8623,30 +8704,41 @@ var FileUploader = (props) => {
|
|
|
8623
8704
|
);
|
|
8624
8705
|
};
|
|
8625
8706
|
FileUploader.displayName = "FileUploader";
|
|
8626
|
-
var
|
|
8707
|
+
var texts17 = createTexts({
|
|
8627
8708
|
dragAndDropOr: {
|
|
8628
8709
|
nb: "Dra og slipp filer her eller",
|
|
8629
8710
|
no: "Dra og slipp filer her eller",
|
|
8630
8711
|
nn: "Dra og slepp filer her eller",
|
|
8631
|
-
en: "Drag and drop files here or"
|
|
8712
|
+
en: "Drag and drop files here or",
|
|
8713
|
+
se: "Sirdde fiillaid d\xE1sa dahje"
|
|
8714
|
+
},
|
|
8715
|
+
selectFile: {
|
|
8716
|
+
nb: "Velg fil",
|
|
8717
|
+
no: "Velg fil",
|
|
8718
|
+
nn: "Velg fil",
|
|
8719
|
+
en: "Sekect file",
|
|
8720
|
+
se: "V\xE1llje fiilla"
|
|
8632
8721
|
},
|
|
8633
8722
|
uploadFileWithButton: {
|
|
8634
8723
|
nb: "last opp en fil med den p\xE5f\xF8lgende knappen",
|
|
8635
8724
|
no: "last opp en fil med den p\xE5f\xF8lgende knappen",
|
|
8636
8725
|
nn: "last opp ei fil med den p\xE5f\xF8lgjande knappen",
|
|
8637
|
-
en: "upload using the following button"
|
|
8726
|
+
en: "upload using the following button",
|
|
8727
|
+
se: "vie\u010D\u010Da fiilla \u010Duovvova\u0161 boaluin"
|
|
8638
8728
|
},
|
|
8639
8729
|
noFiles: {
|
|
8640
8730
|
nb: "Ingen filer.",
|
|
8641
8731
|
no: "Ingen filer.",
|
|
8642
8732
|
nn: "Ingen filer.",
|
|
8643
|
-
en: "No files."
|
|
8733
|
+
en: "No files.",
|
|
8734
|
+
se: "Eai leat fiillat."
|
|
8644
8735
|
},
|
|
8645
8736
|
uploadedFiles: {
|
|
8646
8737
|
nb: "Opplastede filer",
|
|
8647
8738
|
no: "Opplastede filer",
|
|
8648
8739
|
nn: "Opplasta filer",
|
|
8649
|
-
en: "Uploaded files"
|
|
8740
|
+
en: "Uploaded files",
|
|
8741
|
+
se: "Vi\u017E\u017Eon fiillat"
|
|
8650
8742
|
}
|
|
8651
8743
|
});
|
|
8652
8744
|
|
|
@@ -8722,6 +8814,91 @@ var FooterListGroup = ({
|
|
|
8722
8814
|
import { jsx as jsx269 } from "react/jsx-runtime";
|
|
8723
8815
|
var FooterLeft = ({ className, ...rest }) => /* @__PURE__ */ jsx269("div", { className: cn(className, Footer_default["left"]), ...rest });
|
|
8724
8816
|
|
|
8817
|
+
// src/components/FormSummary/FormSummary.tsx
|
|
8818
|
+
import { jsx as jsx270 } from "react/jsx-runtime";
|
|
8819
|
+
var FormSummary = (props) => {
|
|
8820
|
+
const { children } = props;
|
|
8821
|
+
return /* @__PURE__ */ jsx270(Paper, { border: "border-subtle", padding: "x0.5 x0.5 x1 x0.75", ...props, children });
|
|
8822
|
+
};
|
|
8823
|
+
|
|
8824
|
+
// src/components/FormSummary/FormSummary.module.css
|
|
8825
|
+
var FormSummary_default = {
|
|
8826
|
+
dd: "FormSummary_dd",
|
|
8827
|
+
field: "FormSummary_field"
|
|
8828
|
+
};
|
|
8829
|
+
|
|
8830
|
+
// src/components/FormSummary/FormSummary.components.tsx
|
|
8831
|
+
import { jsx as jsx271, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
8832
|
+
function FormSummaryHeader({ ...props }) {
|
|
8833
|
+
return /* @__PURE__ */ jsx271(
|
|
8834
|
+
HStack,
|
|
8835
|
+
{
|
|
8836
|
+
...props,
|
|
8837
|
+
justifyContent: "space-between",
|
|
8838
|
+
flexWrap: "wrap",
|
|
8839
|
+
alignItems: "center",
|
|
8840
|
+
gap: "x0.75",
|
|
8841
|
+
marginBlock: "0 x0.75"
|
|
8842
|
+
}
|
|
8843
|
+
);
|
|
8844
|
+
}
|
|
8845
|
+
function FormSummaryHeading({
|
|
8846
|
+
level = 2,
|
|
8847
|
+
...props
|
|
8848
|
+
}) {
|
|
8849
|
+
return /* @__PURE__ */ jsx271(Heading, { level, ...props });
|
|
8850
|
+
}
|
|
8851
|
+
function FormSummaryEditButton({
|
|
8852
|
+
purpose = "secondary",
|
|
8853
|
+
...props
|
|
8854
|
+
}) {
|
|
8855
|
+
return /* @__PURE__ */ jsx271(Button, { icon: EditIcon, purpose, size: "xsmall", ...props });
|
|
8856
|
+
}
|
|
8857
|
+
function FormSummaryFields({ ...props }) {
|
|
8858
|
+
return /* @__PURE__ */ jsx271(DescriptionList, { ...props });
|
|
8859
|
+
}
|
|
8860
|
+
function FormSummaryField({
|
|
8861
|
+
className,
|
|
8862
|
+
...props
|
|
8863
|
+
}) {
|
|
8864
|
+
return /* @__PURE__ */ jsx271("div", { ...props, className: cn(FormSummary_default.field, className) });
|
|
8865
|
+
}
|
|
8866
|
+
function FormSummaryLabel(props) {
|
|
8867
|
+
return /* @__PURE__ */ jsx271(DescriptionListTerm, { ...props });
|
|
8868
|
+
}
|
|
8869
|
+
function FormSummaryValue({
|
|
8870
|
+
className,
|
|
8871
|
+
isLoading,
|
|
8872
|
+
children,
|
|
8873
|
+
...props
|
|
8874
|
+
}) {
|
|
8875
|
+
return /* @__PURE__ */ jsx271(DescriptionListDesc, { ...props, className: cn(className, FormSummary_default.dd), children: isLoading ? /* @__PURE__ */ jsx271(Spinner, { size: "1.5em" }) : children });
|
|
8876
|
+
}
|
|
8877
|
+
function FormSummaryEmptyValue() {
|
|
8878
|
+
const { t } = useTranslation();
|
|
8879
|
+
return /* @__PURE__ */ jsxs60("span", { children: [
|
|
8880
|
+
/* @__PURE__ */ jsx271("span", { "aria-hidden": true, children: "-" }),
|
|
8881
|
+
" ",
|
|
8882
|
+
/* @__PURE__ */ jsxs60(VisuallyHidden, { children: [
|
|
8883
|
+
" ",
|
|
8884
|
+
t(texts18.noValue),
|
|
8885
|
+
" "
|
|
8886
|
+
] })
|
|
8887
|
+
] });
|
|
8888
|
+
}
|
|
8889
|
+
function FormSummaryError({ ...props }) {
|
|
8890
|
+
return /* @__PURE__ */ jsx271(Box, { marginBlock: "x0.25 0", children: /* @__PURE__ */ jsx271(InputMessage, { ...props, messageType: "error" }) });
|
|
8891
|
+
}
|
|
8892
|
+
var texts18 = createTexts({
|
|
8893
|
+
noValue: {
|
|
8894
|
+
nb: "Ikke fylt ut",
|
|
8895
|
+
no: "Ikke fylt ut",
|
|
8896
|
+
nn: "Ikkje fylt ut",
|
|
8897
|
+
en: "Not filled out",
|
|
8898
|
+
se: "Ii leat bidjan"
|
|
8899
|
+
}
|
|
8900
|
+
});
|
|
8901
|
+
|
|
8725
8902
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
8726
8903
|
import { useState as useState17 } from "react";
|
|
8727
8904
|
|
|
@@ -8737,7 +8914,7 @@ var GlobalMessage_default = {
|
|
|
8737
8914
|
};
|
|
8738
8915
|
|
|
8739
8916
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
8740
|
-
import { jsx as
|
|
8917
|
+
import { jsx as jsx272, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
8741
8918
|
var icons = {
|
|
8742
8919
|
info: InfoIcon,
|
|
8743
8920
|
danger: ErrorIcon,
|
|
@@ -8756,7 +8933,7 @@ var GlobalMessage = ({
|
|
|
8756
8933
|
}) => {
|
|
8757
8934
|
const { t } = useTranslation();
|
|
8758
8935
|
const [isClosed, setClosed] = useState17(false);
|
|
8759
|
-
return !isClosed ? /* @__PURE__ */
|
|
8936
|
+
return !isClosed ? /* @__PURE__ */ jsxs61(
|
|
8760
8937
|
"div",
|
|
8761
8938
|
{
|
|
8762
8939
|
...getBaseHTMLProps(
|
|
@@ -8771,17 +8948,17 @@ var GlobalMessage = ({
|
|
|
8771
8948
|
rest
|
|
8772
8949
|
),
|
|
8773
8950
|
children: [
|
|
8774
|
-
/* @__PURE__ */
|
|
8951
|
+
/* @__PURE__ */ jsxs61(
|
|
8775
8952
|
"div",
|
|
8776
8953
|
{
|
|
8777
8954
|
className: cn(GlobalMessage_default.content, closable && GlobalMessage_default["content--closable"]),
|
|
8778
8955
|
children: [
|
|
8779
|
-
/* @__PURE__ */
|
|
8780
|
-
children != null ? children : /* @__PURE__ */
|
|
8956
|
+
/* @__PURE__ */ jsx272(Icon, { icon: icons[purpose], className: GlobalMessage_default.icon }),
|
|
8957
|
+
children != null ? children : /* @__PURE__ */ jsx272("span", { children: message })
|
|
8781
8958
|
]
|
|
8782
8959
|
}
|
|
8783
8960
|
),
|
|
8784
|
-
closable && /* @__PURE__ */
|
|
8961
|
+
closable && /* @__PURE__ */ jsx272(
|
|
8785
8962
|
Button,
|
|
8786
8963
|
{
|
|
8787
8964
|
icon: CloseIcon,
|
|
@@ -8806,14 +8983,14 @@ var InlineButton_default = {
|
|
|
8806
8983
|
};
|
|
8807
8984
|
|
|
8808
8985
|
// src/components/InlineButton/InlineButton.tsx
|
|
8809
|
-
import { jsx as
|
|
8986
|
+
import { jsx as jsx273 } from "react/jsx-runtime";
|
|
8810
8987
|
var InlineButton = ({
|
|
8811
8988
|
className,
|
|
8812
8989
|
color,
|
|
8813
8990
|
icon,
|
|
8814
8991
|
children,
|
|
8815
8992
|
...rest
|
|
8816
|
-
}) => /* @__PURE__ */
|
|
8993
|
+
}) => /* @__PURE__ */ jsx273(
|
|
8817
8994
|
StylelessButton,
|
|
8818
8995
|
{
|
|
8819
8996
|
className: cn(
|
|
@@ -8824,7 +9001,7 @@ var InlineButton = ({
|
|
|
8824
9001
|
getColorCn(color)
|
|
8825
9002
|
),
|
|
8826
9003
|
...rest,
|
|
8827
|
-
children: icon ? /* @__PURE__ */
|
|
9004
|
+
children: icon ? /* @__PURE__ */ jsx273(Icon, { icon, iconSize: "inherit" }) : children
|
|
8828
9005
|
}
|
|
8829
9006
|
);
|
|
8830
9007
|
|
|
@@ -8837,7 +9014,7 @@ import {
|
|
|
8837
9014
|
useContext as useContext16,
|
|
8838
9015
|
useState as useState18
|
|
8839
9016
|
} from "react";
|
|
8840
|
-
import { jsx as
|
|
9017
|
+
import { jsx as jsx274 } from "react/jsx-runtime";
|
|
8841
9018
|
var InlineEditContext = createContext12(
|
|
8842
9019
|
{}
|
|
8843
9020
|
);
|
|
@@ -8881,7 +9058,7 @@ var InlineEditContextProvider = (props) => {
|
|
|
8881
9058
|
useOnKeyDown(["Enter"], () => onExitHandler());
|
|
8882
9059
|
useOnKeyDown(["Escape"], () => onExitHandler());
|
|
8883
9060
|
useOnClickOutside(inputRef == null ? void 0 : inputRef.current, () => onExitHandler());
|
|
8884
|
-
return /* @__PURE__ */
|
|
9061
|
+
return /* @__PURE__ */ jsx274(
|
|
8885
9062
|
InlineEditContext,
|
|
8886
9063
|
{
|
|
8887
9064
|
value: {
|
|
@@ -8916,26 +9093,29 @@ var InlineEdit_default = {
|
|
|
8916
9093
|
};
|
|
8917
9094
|
|
|
8918
9095
|
// src/components/InlineEdit/InlineEdit.utils.tsx
|
|
8919
|
-
import { jsxs as
|
|
9096
|
+
import { jsxs as jsxs62 } from "react/jsx-runtime";
|
|
8920
9097
|
var inlineEditVisuallyHidden = (id, clearable) => {
|
|
8921
9098
|
const { t } = useTranslation();
|
|
8922
|
-
return /* @__PURE__ */
|
|
8923
|
-
t(
|
|
8924
|
-
|
|
9099
|
+
return /* @__PURE__ */ jsxs62(VisuallyHidden, { id, children: [
|
|
9100
|
+
t(texts19.inlineEditInfo),
|
|
9101
|
+
" ",
|
|
9102
|
+
!clearable && t(texts19.notClearable)
|
|
8925
9103
|
] });
|
|
8926
9104
|
};
|
|
8927
|
-
var
|
|
9105
|
+
var texts19 = createTexts({
|
|
8928
9106
|
inlineEditInfo: {
|
|
8929
9107
|
nb: "Escape, Enter eller Tab for \xE5 lagre.",
|
|
8930
9108
|
no: "Escape, Enter eller Tab for \xE5 lagre.",
|
|
8931
9109
|
nn: "Escape, Enter eller Tab for \xE5 lagra.",
|
|
8932
|
-
en: "Escape, Enter or Tab to save."
|
|
9110
|
+
en: "Escape, Enter or Tab to save.",
|
|
9111
|
+
se: "Escape, Enter dahje Tab go \xE1iggut vurket"
|
|
8933
9112
|
},
|
|
8934
9113
|
notClearable: {
|
|
8935
|
-
nb: "
|
|
8936
|
-
no: "
|
|
8937
|
-
nn: "
|
|
8938
|
-
en: "
|
|
9114
|
+
nb: "Innskrivingsfeltet kan ikke t\xF8mmes.",
|
|
9115
|
+
no: "Innskrivingsfeltet kan ikke t\xF8mmes.",
|
|
9116
|
+
nn: "Innskrivingsfeltet kan ikkje t\xF8mmast.",
|
|
9117
|
+
en: "Input field cannot be cleared.",
|
|
9118
|
+
se: "\u010C\xE1llinb\xE1ikki ii s\xE1hte sihkut"
|
|
8939
9119
|
}
|
|
8940
9120
|
});
|
|
8941
9121
|
var inlineEditCns = (hasErrorState, showEditingIcon) => [
|
|
@@ -8985,7 +9165,7 @@ function createClearChangeEvent(elementId) {
|
|
|
8985
9165
|
}
|
|
8986
9166
|
|
|
8987
9167
|
// src/components/InlineEdit/InlineField.tsx
|
|
8988
|
-
import { Fragment as Fragment8, jsx as
|
|
9168
|
+
import { Fragment as Fragment8, jsx as jsx275, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
8989
9169
|
function InlineField(props) {
|
|
8990
9170
|
const {
|
|
8991
9171
|
elementType,
|
|
@@ -9031,7 +9211,7 @@ function InlineField(props) {
|
|
|
9031
9211
|
const cnArgs = [hasErrorState, !isEditing && !hideIcon];
|
|
9032
9212
|
const iconSize = "small";
|
|
9033
9213
|
function makeIcon(icon, className2) {
|
|
9034
|
-
return /* @__PURE__ */
|
|
9214
|
+
return /* @__PURE__ */ jsx275(
|
|
9035
9215
|
Icon,
|
|
9036
9216
|
{
|
|
9037
9217
|
iconSize,
|
|
@@ -9046,7 +9226,7 @@ function InlineField(props) {
|
|
|
9046
9226
|
const renderElement = () => {
|
|
9047
9227
|
switch (elementType) {
|
|
9048
9228
|
case "input":
|
|
9049
|
-
return /* @__PURE__ */
|
|
9229
|
+
return /* @__PURE__ */ jsx275(
|
|
9050
9230
|
"input",
|
|
9051
9231
|
{
|
|
9052
9232
|
...rest,
|
|
@@ -9056,7 +9236,7 @@ function InlineField(props) {
|
|
|
9056
9236
|
}
|
|
9057
9237
|
);
|
|
9058
9238
|
case "textarea":
|
|
9059
|
-
return /* @__PURE__ */
|
|
9239
|
+
return /* @__PURE__ */ jsx275(
|
|
9060
9240
|
"textarea",
|
|
9061
9241
|
{
|
|
9062
9242
|
...rest,
|
|
@@ -9066,8 +9246,8 @@ function InlineField(props) {
|
|
|
9066
9246
|
}
|
|
9067
9247
|
);
|
|
9068
9248
|
case "select":
|
|
9069
|
-
return /* @__PURE__ */
|
|
9070
|
-
/* @__PURE__ */
|
|
9249
|
+
return /* @__PURE__ */ jsxs63(Fragment8, { children: [
|
|
9250
|
+
/* @__PURE__ */ jsx275(
|
|
9071
9251
|
"select",
|
|
9072
9252
|
{
|
|
9073
9253
|
...rest,
|
|
@@ -9076,7 +9256,7 @@ function InlineField(props) {
|
|
|
9076
9256
|
className: cn(className, ...inlineSelectCns(...cnArgs, hasValue))
|
|
9077
9257
|
}
|
|
9078
9258
|
),
|
|
9079
|
-
hasValue && emptiable && /* @__PURE__ */
|
|
9259
|
+
hasValue && emptiable && /* @__PURE__ */ jsx275(
|
|
9080
9260
|
ClearButton,
|
|
9081
9261
|
{
|
|
9082
9262
|
"aria-label": t(commonTexts.clearSelect),
|
|
@@ -9091,8 +9271,8 @@ function InlineField(props) {
|
|
|
9091
9271
|
return null;
|
|
9092
9272
|
}
|
|
9093
9273
|
};
|
|
9094
|
-
return /* @__PURE__ */
|
|
9095
|
-
/* @__PURE__ */
|
|
9274
|
+
return /* @__PURE__ */ jsxs63(Box, { position: "relative", width, children: [
|
|
9275
|
+
/* @__PURE__ */ jsxs63("div", { className: Input_default["input-group"], children: [
|
|
9096
9276
|
!isEditing && !hideIcon && makeIcon(EditIcon, InlineEdit_default["edit-icon"]),
|
|
9097
9277
|
renderElement()
|
|
9098
9278
|
] }),
|
|
@@ -9102,7 +9282,7 @@ function InlineField(props) {
|
|
|
9102
9282
|
}
|
|
9103
9283
|
|
|
9104
9284
|
// src/components/InlineEdit/InlineEditTextArea/InlineEditTextArea.tsx
|
|
9105
|
-
import { jsx as
|
|
9285
|
+
import { jsx as jsx276 } from "react/jsx-runtime";
|
|
9106
9286
|
var InlineEditTextArea = ({
|
|
9107
9287
|
onSetValue,
|
|
9108
9288
|
emptiable,
|
|
@@ -9115,7 +9295,7 @@ var InlineEditTextArea = ({
|
|
|
9115
9295
|
}) => {
|
|
9116
9296
|
const textareaRef = useRef25(null);
|
|
9117
9297
|
const combinedRef = useCombinedRef(ref, textareaRef);
|
|
9118
|
-
return /* @__PURE__ */
|
|
9298
|
+
return /* @__PURE__ */ jsx276(
|
|
9119
9299
|
InlineEditContextProvider,
|
|
9120
9300
|
{
|
|
9121
9301
|
onSetValue,
|
|
@@ -9125,14 +9305,14 @@ var InlineEditTextArea = ({
|
|
|
9125
9305
|
onFocus,
|
|
9126
9306
|
onChange,
|
|
9127
9307
|
onBlur,
|
|
9128
|
-
children: /* @__PURE__ */
|
|
9308
|
+
children: /* @__PURE__ */ jsx276(InlineField, { elementType: "textarea", ...rest, ref: combinedRef })
|
|
9129
9309
|
}
|
|
9130
9310
|
);
|
|
9131
9311
|
};
|
|
9132
9312
|
|
|
9133
9313
|
// src/components/InlineEdit/InlineEditInput/InlineEditInput.tsx
|
|
9134
9314
|
import { useRef as useRef26 } from "react";
|
|
9135
|
-
import { jsx as
|
|
9315
|
+
import { jsx as jsx277 } from "react/jsx-runtime";
|
|
9136
9316
|
var InlineEditInput = ({
|
|
9137
9317
|
onSetValue,
|
|
9138
9318
|
emptiable,
|
|
@@ -9145,7 +9325,7 @@ var InlineEditInput = ({
|
|
|
9145
9325
|
}) => {
|
|
9146
9326
|
const inputRef = useRef26(null);
|
|
9147
9327
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
9148
|
-
return /* @__PURE__ */
|
|
9328
|
+
return /* @__PURE__ */ jsx277(
|
|
9149
9329
|
InlineEditContextProvider,
|
|
9150
9330
|
{
|
|
9151
9331
|
onSetValue,
|
|
@@ -9155,14 +9335,14 @@ var InlineEditInput = ({
|
|
|
9155
9335
|
onFocus,
|
|
9156
9336
|
onChange,
|
|
9157
9337
|
onBlur,
|
|
9158
|
-
children: /* @__PURE__ */
|
|
9338
|
+
children: /* @__PURE__ */ jsx277(InlineField, { elementType: "input", ...rest, ref: combinedRef })
|
|
9159
9339
|
}
|
|
9160
9340
|
);
|
|
9161
9341
|
};
|
|
9162
9342
|
|
|
9163
9343
|
// src/components/InlineEdit/InlineEditSelect/InlineEditSelect.tsx
|
|
9164
9344
|
import { useRef as useRef27 } from "react";
|
|
9165
|
-
import { jsx as
|
|
9345
|
+
import { jsx as jsx278 } from "react/jsx-runtime";
|
|
9166
9346
|
var InlineEditSelect = ({
|
|
9167
9347
|
onSetValue,
|
|
9168
9348
|
emptiable,
|
|
@@ -9175,7 +9355,7 @@ var InlineEditSelect = ({
|
|
|
9175
9355
|
}) => {
|
|
9176
9356
|
const inputRef = useRef27(null);
|
|
9177
9357
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
9178
|
-
return /* @__PURE__ */
|
|
9358
|
+
return /* @__PURE__ */ jsx278(
|
|
9179
9359
|
InlineEditContextProvider,
|
|
9180
9360
|
{
|
|
9181
9361
|
onSetValue,
|
|
@@ -9185,7 +9365,7 @@ var InlineEditSelect = ({
|
|
|
9185
9365
|
onFocus,
|
|
9186
9366
|
onChange,
|
|
9187
9367
|
onBlur,
|
|
9188
|
-
children: /* @__PURE__ */
|
|
9368
|
+
children: /* @__PURE__ */ jsx278(InlineField, { elementType: "select", ...rest, ref: combinedRef })
|
|
9189
9369
|
}
|
|
9190
9370
|
);
|
|
9191
9371
|
};
|
|
@@ -9207,8 +9387,8 @@ var InternalHeader_default = {
|
|
|
9207
9387
|
};
|
|
9208
9388
|
|
|
9209
9389
|
// src/components/InternalHeader/NavigationItem.tsx
|
|
9210
|
-
import { jsx as
|
|
9211
|
-
var NavigationItem = ({ isCurrent, ...rest }) => /* @__PURE__ */
|
|
9390
|
+
import { jsx as jsx279 } from "react/jsx-runtime";
|
|
9391
|
+
var NavigationItem = ({ isCurrent, ...rest }) => /* @__PURE__ */ jsx279(
|
|
9212
9392
|
"a",
|
|
9213
9393
|
{
|
|
9214
9394
|
...rest,
|
|
@@ -9223,7 +9403,7 @@ var NavigationItem = ({ isCurrent, ...rest }) => /* @__PURE__ */ jsx277(
|
|
|
9223
9403
|
);
|
|
9224
9404
|
|
|
9225
9405
|
// src/components/InternalHeader/InternalHeader.tsx
|
|
9226
|
-
import { jsx as
|
|
9406
|
+
import { jsx as jsx280, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
9227
9407
|
import { createElement as createElement2 } from "react";
|
|
9228
9408
|
var InternalHeader = (props) => {
|
|
9229
9409
|
const {
|
|
@@ -9253,7 +9433,7 @@ var InternalHeader = (props) => {
|
|
|
9253
9433
|
const hasContextMenuElements = !!contextMenuItems && contextMenuItems.length > 0;
|
|
9254
9434
|
const hasSmallScreenBreakpoint = !!smallScreenBreakpoint;
|
|
9255
9435
|
const hasNavInContextMenu = hasSmallScreenBreakpoint && hasNavigationElements;
|
|
9256
|
-
const navigation = hasNavigationElements ? /* @__PURE__ */
|
|
9436
|
+
const navigation = hasNavigationElements ? /* @__PURE__ */ jsx280("nav", { "aria-label": t(texts20.siteNavigation), children: /* @__PURE__ */ jsx280(
|
|
9257
9437
|
ShowHide,
|
|
9258
9438
|
{
|
|
9259
9439
|
as: StylelessList,
|
|
@@ -9262,7 +9442,7 @@ var InternalHeader = (props) => {
|
|
|
9262
9442
|
children: navItems.map((item, i) => {
|
|
9263
9443
|
const { href, ...rest2 } = item;
|
|
9264
9444
|
const isCurrent = href === currentPage;
|
|
9265
|
-
return /* @__PURE__ */
|
|
9445
|
+
return /* @__PURE__ */ jsx280("li", { className: InternalHeader_default["nav-list__item"], children: /* @__PURE__ */ jsx280(
|
|
9266
9446
|
NavigationItem,
|
|
9267
9447
|
{
|
|
9268
9448
|
href,
|
|
@@ -9276,7 +9456,7 @@ var InternalHeader = (props) => {
|
|
|
9276
9456
|
) }) : null;
|
|
9277
9457
|
const hasContextMenu = hasContextMenuElements || !!user || hasNavInContextMenu;
|
|
9278
9458
|
const hasContextMenuLargeScreen = hasContextMenuElements || !!user;
|
|
9279
|
-
return /* @__PURE__ */
|
|
9459
|
+
return /* @__PURE__ */ jsxs64(
|
|
9280
9460
|
Box,
|
|
9281
9461
|
{
|
|
9282
9462
|
display: "flex",
|
|
@@ -9294,7 +9474,7 @@ var InternalHeader = (props) => {
|
|
|
9294
9474
|
rest
|
|
9295
9475
|
),
|
|
9296
9476
|
children: [
|
|
9297
|
-
/* @__PURE__ */
|
|
9477
|
+
/* @__PURE__ */ jsx280(Typography, { typographyType: "headingSmall", bold: true, as: "span", children: applicationHref ? /* @__PURE__ */ jsx280(
|
|
9298
9478
|
"a",
|
|
9299
9479
|
{
|
|
9300
9480
|
href: applicationHref,
|
|
@@ -9303,42 +9483,42 @@ var InternalHeader = (props) => {
|
|
|
9303
9483
|
children: applicationName
|
|
9304
9484
|
}
|
|
9305
9485
|
) : applicationName }),
|
|
9306
|
-
/* @__PURE__ */
|
|
9307
|
-
(hasContextMenu || navigation !== null) && /* @__PURE__ */
|
|
9486
|
+
/* @__PURE__ */ jsx280(Typography, { typographyType: "bodyMedium", as: "span", children: applicationDesc }),
|
|
9487
|
+
(hasContextMenu || navigation !== null) && /* @__PURE__ */ jsx280("div", { className: InternalHeader_default["bar-separator"] }),
|
|
9308
9488
|
navigation,
|
|
9309
|
-
hasContextMenu && /* @__PURE__ */
|
|
9489
|
+
hasContextMenu && /* @__PURE__ */ jsx280(
|
|
9310
9490
|
ShowHide,
|
|
9311
9491
|
{
|
|
9312
9492
|
showBelow: !hasContextMenuLargeScreen && hasSmallScreenBreakpoint ? smallScreenBreakpoint : void 0,
|
|
9313
9493
|
className: cn(InternalHeader_default["context-menu-group"]),
|
|
9314
|
-
children: /* @__PURE__ */
|
|
9315
|
-
/* @__PURE__ */
|
|
9494
|
+
children: /* @__PURE__ */ jsxs64(OverflowMenuGroup, { children: [
|
|
9495
|
+
/* @__PURE__ */ jsx280(
|
|
9316
9496
|
Button,
|
|
9317
9497
|
{
|
|
9318
9498
|
icon: hasNavInContextMenu ? MenuIcon : MoreVerticalIcon,
|
|
9319
9499
|
purpose: "tertiary",
|
|
9320
|
-
"aria-label": t(
|
|
9500
|
+
"aria-label": t(texts20.openMenu)
|
|
9321
9501
|
}
|
|
9322
9502
|
),
|
|
9323
|
-
/* @__PURE__ */
|
|
9324
|
-
user && /* @__PURE__ */
|
|
9325
|
-
hasNavInContextMenu && /* @__PURE__ */
|
|
9503
|
+
/* @__PURE__ */ jsxs64(OverflowMenu, { className: InternalHeader_default["context-menu"], children: [
|
|
9504
|
+
user && /* @__PURE__ */ jsx280(OverflowMenuList, { children: user.href ? /* @__PURE__ */ jsx280(OverflowMenuLink, { icon: PersonIcon, ...user }) : /* @__PURE__ */ jsx280(OverflowMenuSpan, { icon: PersonIcon, ...user }) }),
|
|
9505
|
+
hasNavInContextMenu && /* @__PURE__ */ jsx280(
|
|
9326
9506
|
ShowHide,
|
|
9327
9507
|
{
|
|
9328
9508
|
as: "nav",
|
|
9329
|
-
"aria-label": t(
|
|
9509
|
+
"aria-label": t(texts20.siteNavigation),
|
|
9330
9510
|
showBelow: smallScreenBreakpoint,
|
|
9331
|
-
children: /* @__PURE__ */
|
|
9511
|
+
children: /* @__PURE__ */ jsx280(OverflowMenuList, { children: navItems.map((item, i) => /* @__PURE__ */ createElement2(OverflowMenuLink, { ...item, key: `nav-${i}` })) })
|
|
9332
9512
|
}
|
|
9333
9513
|
),
|
|
9334
|
-
hasNavInContextMenu && hasContextMenuElements && /* @__PURE__ */
|
|
9514
|
+
hasNavInContextMenu && hasContextMenuElements && /* @__PURE__ */ jsx280(
|
|
9335
9515
|
ShowHide,
|
|
9336
9516
|
{
|
|
9337
9517
|
as: OverflowMenuDivider,
|
|
9338
9518
|
showBelow: smallScreenBreakpoint
|
|
9339
9519
|
}
|
|
9340
9520
|
),
|
|
9341
|
-
hasContextMenuElements && /* @__PURE__ */
|
|
9521
|
+
hasContextMenuElements && /* @__PURE__ */ jsx280(OverflowMenuList, { children: contextMenuItems.map((item, i) => {
|
|
9342
9522
|
return item.href ? /* @__PURE__ */ createElement2(
|
|
9343
9523
|
OverflowMenuLink,
|
|
9344
9524
|
{
|
|
@@ -9362,18 +9542,20 @@ var InternalHeader = (props) => {
|
|
|
9362
9542
|
);
|
|
9363
9543
|
};
|
|
9364
9544
|
InternalHeader.displayName = "InternalHeader";
|
|
9365
|
-
var
|
|
9545
|
+
var texts20 = createTexts({
|
|
9366
9546
|
openMenu: {
|
|
9367
9547
|
nb: "\xC5pne meny",
|
|
9368
9548
|
no: "\xC5pne meny",
|
|
9369
9549
|
nn: "Opna meny",
|
|
9370
|
-
en: "Open menu"
|
|
9550
|
+
en: "Open menu",
|
|
9551
|
+
se: "Rabas f\xE1llu"
|
|
9371
9552
|
},
|
|
9372
9553
|
siteNavigation: {
|
|
9373
9554
|
nb: "Sidenavigasjon",
|
|
9374
9555
|
no: "Sidenavigasjon",
|
|
9375
9556
|
nn: "Sidenavigasjon",
|
|
9376
|
-
en: "Site navigation"
|
|
9557
|
+
en: "Site navigation",
|
|
9558
|
+
se: "Siidu navig\xE1\u0161uvdna"
|
|
9377
9559
|
}
|
|
9378
9560
|
});
|
|
9379
9561
|
|
|
@@ -9387,7 +9569,7 @@ var List_default = {
|
|
|
9387
9569
|
};
|
|
9388
9570
|
|
|
9389
9571
|
// src/components/List/List.tsx
|
|
9390
|
-
import { jsx as
|
|
9572
|
+
import { jsx as jsx281 } from "react/jsx-runtime";
|
|
9391
9573
|
var List = ({
|
|
9392
9574
|
listType = "unordered",
|
|
9393
9575
|
typographyType = "inherit",
|
|
@@ -9398,7 +9580,7 @@ var List = ({
|
|
|
9398
9580
|
...rest
|
|
9399
9581
|
}) => {
|
|
9400
9582
|
const List2 = listType === "ordered" ? "ol" : "ul";
|
|
9401
|
-
return /* @__PURE__ */
|
|
9583
|
+
return /* @__PURE__ */ jsx281(
|
|
9402
9584
|
List2,
|
|
9403
9585
|
{
|
|
9404
9586
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
@@ -9414,8 +9596,8 @@ var List = ({
|
|
|
9414
9596
|
List.displayName = "List";
|
|
9415
9597
|
|
|
9416
9598
|
// src/components/List/ListItem.tsx
|
|
9417
|
-
import { jsx as
|
|
9418
|
-
var ListItem = ({ className, ...rest }) => /* @__PURE__ */
|
|
9599
|
+
import { jsx as jsx282 } from "react/jsx-runtime";
|
|
9600
|
+
var ListItem = ({ className, ...rest }) => /* @__PURE__ */ jsx282("li", { ...rest, className: cn(className, List_default.li) });
|
|
9419
9601
|
ListItem.displayName = "ListItem";
|
|
9420
9602
|
|
|
9421
9603
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
@@ -9440,7 +9622,7 @@ var LocalMessage_default = {
|
|
|
9440
9622
|
};
|
|
9441
9623
|
|
|
9442
9624
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
9443
|
-
import { Fragment as Fragment9, jsx as
|
|
9625
|
+
import { Fragment as Fragment9, jsx as jsx283, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
9444
9626
|
var icons2 = {
|
|
9445
9627
|
info: InfoIcon,
|
|
9446
9628
|
danger: ErrorIcon,
|
|
@@ -9464,9 +9646,9 @@ var LocalMessage = ({
|
|
|
9464
9646
|
const { t } = useTranslation();
|
|
9465
9647
|
const [isClosed, setClosed] = useState20(false);
|
|
9466
9648
|
if (isClosed) {
|
|
9467
|
-
return /* @__PURE__ */
|
|
9649
|
+
return /* @__PURE__ */ jsx283(Fragment9, {});
|
|
9468
9650
|
}
|
|
9469
|
-
return /* @__PURE__ */
|
|
9651
|
+
return /* @__PURE__ */ jsxs65(
|
|
9470
9652
|
Box,
|
|
9471
9653
|
{
|
|
9472
9654
|
...getBaseHTMLProps(
|
|
@@ -9487,15 +9669,15 @@ var LocalMessage = ({
|
|
|
9487
9669
|
padding: "x0.75 x0.75 x0.75 x0.5",
|
|
9488
9670
|
gap: "x0.5",
|
|
9489
9671
|
children: [
|
|
9490
|
-
/* @__PURE__ */
|
|
9672
|
+
/* @__PURE__ */ jsx283(
|
|
9491
9673
|
Icon,
|
|
9492
9674
|
{
|
|
9493
9675
|
icon: icons2[purpose],
|
|
9494
9676
|
className: cn(LocalMessage_default.icon, LocalMessage_default.container__icon)
|
|
9495
9677
|
}
|
|
9496
9678
|
),
|
|
9497
|
-
/* @__PURE__ */
|
|
9498
|
-
closable && /* @__PURE__ */
|
|
9679
|
+
/* @__PURE__ */ jsx283("div", { className: LocalMessage_default.container__text, children: children != null ? children : /* @__PURE__ */ jsx283("span", { children: message }) }),
|
|
9680
|
+
closable && /* @__PURE__ */ jsx283(
|
|
9499
9681
|
Button,
|
|
9500
9682
|
{
|
|
9501
9683
|
icon: CloseIcon,
|
|
@@ -9535,7 +9717,7 @@ var Modal_default = {
|
|
|
9535
9717
|
};
|
|
9536
9718
|
|
|
9537
9719
|
// src/components/Modal/Modal.tsx
|
|
9538
|
-
import { jsx as
|
|
9720
|
+
import { jsx as jsx284, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
9539
9721
|
var Modal = ({
|
|
9540
9722
|
isOpen = false,
|
|
9541
9723
|
parentElement,
|
|
@@ -9586,14 +9768,14 @@ var Modal = ({
|
|
|
9586
9768
|
useOnKeyDown(["Escape", "Esc"], () => handleClose());
|
|
9587
9769
|
const hasTransitionedIn = useMountTransition(isOpen, 200);
|
|
9588
9770
|
return (isOpen || hasTransitionedIn) && portalTarget ? createPortal3(
|
|
9589
|
-
/* @__PURE__ */
|
|
9771
|
+
/* @__PURE__ */ jsx284(
|
|
9590
9772
|
Backdrop,
|
|
9591
9773
|
{
|
|
9592
9774
|
zIndex: "modal",
|
|
9593
9775
|
isMounted: isOpen && hasTransitionedIn,
|
|
9594
9776
|
ref: backdropRef,
|
|
9595
9777
|
onClick: onBackdropClick,
|
|
9596
|
-
children: /* @__PURE__ */
|
|
9778
|
+
children: /* @__PURE__ */ jsxs66(
|
|
9597
9779
|
Paper,
|
|
9598
9780
|
{
|
|
9599
9781
|
display: "flex",
|
|
@@ -9620,7 +9802,7 @@ var Modal = ({
|
|
|
9620
9802
|
id: modalId,
|
|
9621
9803
|
elevation: 4,
|
|
9622
9804
|
children: [
|
|
9623
|
-
/* @__PURE__ */
|
|
9805
|
+
/* @__PURE__ */ jsxs66(
|
|
9624
9806
|
HStack,
|
|
9625
9807
|
{
|
|
9626
9808
|
paddingBlock: "0 x0.75",
|
|
@@ -9630,8 +9812,8 @@ var Modal = ({
|
|
|
9630
9812
|
width: "100%",
|
|
9631
9813
|
className: Modal_default["header-container"],
|
|
9632
9814
|
children: [
|
|
9633
|
-
!!header && /* @__PURE__ */
|
|
9634
|
-
onClose && /* @__PURE__ */
|
|
9815
|
+
!!header && /* @__PURE__ */ jsx284("div", { id: headerId, children: typeof header === "string" ? /* @__PURE__ */ jsx284(Heading, { level: 2, typographyType: "headingLarge", children: header }) : header }),
|
|
9816
|
+
onClose && /* @__PURE__ */ jsx284(
|
|
9635
9817
|
Button,
|
|
9636
9818
|
{
|
|
9637
9819
|
size: "small",
|
|
@@ -9645,7 +9827,7 @@ var Modal = ({
|
|
|
9645
9827
|
]
|
|
9646
9828
|
}
|
|
9647
9829
|
),
|
|
9648
|
-
/* @__PURE__ */
|
|
9830
|
+
/* @__PURE__ */ jsx284(Box, { display: "grid", gap: "x1", children })
|
|
9649
9831
|
]
|
|
9650
9832
|
}
|
|
9651
9833
|
)
|
|
@@ -9657,7 +9839,7 @@ var Modal = ({
|
|
|
9657
9839
|
Modal.displayName = "Modal";
|
|
9658
9840
|
|
|
9659
9841
|
// src/components/Modal/ModalBody.tsx
|
|
9660
|
-
import { jsx as
|
|
9842
|
+
import { jsx as jsx285 } from "react/jsx-runtime";
|
|
9661
9843
|
var ModalBody = ({
|
|
9662
9844
|
children,
|
|
9663
9845
|
id,
|
|
@@ -9667,7 +9849,7 @@ var ModalBody = ({
|
|
|
9667
9849
|
height,
|
|
9668
9850
|
...rest
|
|
9669
9851
|
}) => {
|
|
9670
|
-
return /* @__PURE__ */
|
|
9852
|
+
return /* @__PURE__ */ jsx285(
|
|
9671
9853
|
"div",
|
|
9672
9854
|
{
|
|
9673
9855
|
...getBaseHTMLProps(
|
|
@@ -9689,8 +9871,8 @@ var ModalBody = ({
|
|
|
9689
9871
|
ModalBody.displayName = "ModalBody";
|
|
9690
9872
|
|
|
9691
9873
|
// src/components/Modal/ModalActions.tsx
|
|
9692
|
-
import { jsx as
|
|
9693
|
-
var ModalActions = (props) => /* @__PURE__ */
|
|
9874
|
+
import { jsx as jsx286 } from "react/jsx-runtime";
|
|
9875
|
+
var ModalActions = (props) => /* @__PURE__ */ jsx286(Box, { display: "flex", flexWrap: "wrap", gap: "x1", ...props });
|
|
9694
9876
|
ModalActions.displayName = "ModalActions";
|
|
9695
9877
|
|
|
9696
9878
|
// src/components/Pagination/Pagination.tsx
|
|
@@ -10029,7 +10211,7 @@ import React from "react";
|
|
|
10029
10211
|
import {
|
|
10030
10212
|
components
|
|
10031
10213
|
} from "react-select";
|
|
10032
|
-
import { jsx as
|
|
10214
|
+
import { jsx as jsx287, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
10033
10215
|
var {
|
|
10034
10216
|
Option,
|
|
10035
10217
|
NoOptionsMessage,
|
|
@@ -10052,30 +10234,30 @@ var getIndicatorIconSize = (componentSize) => {
|
|
|
10052
10234
|
};
|
|
10053
10235
|
var DDSOption = ({
|
|
10054
10236
|
...props
|
|
10055
|
-
}) => /* @__PURE__ */
|
|
10056
|
-
props.isSelected && /* @__PURE__ */
|
|
10237
|
+
}) => /* @__PURE__ */ jsxs67(Option, { ...props, children: [
|
|
10238
|
+
props.isSelected && /* @__PURE__ */ jsx287(Icon, { icon: CheckIcon, iconSize: "small" }),
|
|
10057
10239
|
props.children
|
|
10058
10240
|
] });
|
|
10059
|
-
var CustomOption = (props) => /* @__PURE__ */
|
|
10241
|
+
var CustomOption = (props) => /* @__PURE__ */ jsx287(Option, { ...props, children: React.createElement(props.customElement, props) });
|
|
10060
10242
|
var CustomSingleValue = ({
|
|
10061
10243
|
id,
|
|
10062
10244
|
Element,
|
|
10063
10245
|
...props
|
|
10064
|
-
}) => /* @__PURE__ */
|
|
10065
|
-
var DDSNoOptionsMessage = (props) => /* @__PURE__ */
|
|
10246
|
+
}) => /* @__PURE__ */ jsx287(SingleValue, { ...props, children: /* @__PURE__ */ jsx287("div", { id, className: Select_default["inner-single-value"], children: Element ? /* @__PURE__ */ jsx287(Element, { ...props }) : props.children }) });
|
|
10247
|
+
var DDSNoOptionsMessage = (props) => /* @__PURE__ */ jsx287(NoOptionsMessage, { ...props, children: "Ingen treff" });
|
|
10066
10248
|
var DDSClearIndicator = ({
|
|
10067
10249
|
size: size2,
|
|
10068
10250
|
...props
|
|
10069
|
-
}) => /* @__PURE__ */
|
|
10070
|
-
var DDSMultiValueRemove = (props) => /* @__PURE__ */
|
|
10251
|
+
}) => /* @__PURE__ */ jsx287(ClearIndicator, { ...props, children: /* @__PURE__ */ jsx287(Icon, { icon: CloseSmallIcon, iconSize: getIndicatorIconSize(size2) }) });
|
|
10252
|
+
var DDSMultiValueRemove = (props) => /* @__PURE__ */ jsx287(MultiValueRemove, { ...props, children: /* @__PURE__ */ jsx287(Icon, { icon: CloseSmallIcon, iconSize: "small" }) });
|
|
10071
10253
|
var DDSDropdownIndicator = (props) => {
|
|
10072
10254
|
const { className, componentSize, ...rest } = props;
|
|
10073
|
-
return /* @__PURE__ */
|
|
10255
|
+
return /* @__PURE__ */ jsx287(
|
|
10074
10256
|
DropdownIndicator,
|
|
10075
10257
|
{
|
|
10076
10258
|
...rest,
|
|
10077
10259
|
className: cn(className, Select_default["dropdown-indicator"]),
|
|
10078
|
-
children: /* @__PURE__ */
|
|
10260
|
+
children: /* @__PURE__ */ jsx287(
|
|
10079
10261
|
Icon,
|
|
10080
10262
|
{
|
|
10081
10263
|
icon: ChevronDownIcon,
|
|
@@ -10089,7 +10271,7 @@ var DDSInput = ({
|
|
|
10089
10271
|
ariaInvalid,
|
|
10090
10272
|
ariaDescribedby,
|
|
10091
10273
|
...props
|
|
10092
|
-
}) => /* @__PURE__ */
|
|
10274
|
+
}) => /* @__PURE__ */ jsx287(
|
|
10093
10275
|
Input2,
|
|
10094
10276
|
{
|
|
10095
10277
|
...props,
|
|
@@ -10108,7 +10290,7 @@ function DDSControl(props) {
|
|
|
10108
10290
|
innerProps,
|
|
10109
10291
|
...rest
|
|
10110
10292
|
} = props;
|
|
10111
|
-
return /* @__PURE__ */
|
|
10293
|
+
return /* @__PURE__ */ jsxs67(
|
|
10112
10294
|
Control,
|
|
10113
10295
|
{
|
|
10114
10296
|
...rest,
|
|
@@ -10123,7 +10305,7 @@ function DDSControl(props) {
|
|
|
10123
10305
|
readOnly && Select_default["control--readonly"]
|
|
10124
10306
|
),
|
|
10125
10307
|
children: [
|
|
10126
|
-
icon && /* @__PURE__ */
|
|
10308
|
+
icon && /* @__PURE__ */ jsx287(
|
|
10127
10309
|
Icon,
|
|
10128
10310
|
{
|
|
10129
10311
|
icon,
|
|
@@ -10141,7 +10323,7 @@ function DDSControl(props) {
|
|
|
10141
10323
|
}
|
|
10142
10324
|
|
|
10143
10325
|
// src/components/Select/Select.tsx
|
|
10144
|
-
import { jsx as
|
|
10326
|
+
import { jsx as jsx288, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
10145
10327
|
function Select({
|
|
10146
10328
|
id,
|
|
10147
10329
|
label,
|
|
@@ -10191,7 +10373,7 @@ function Select({
|
|
|
10191
10373
|
componentSize === "xsmall" && "var(--dds-input-default-width-xsmall)"
|
|
10192
10374
|
);
|
|
10193
10375
|
const customInput = useCallback7(
|
|
10194
|
-
(props) => /* @__PURE__ */
|
|
10376
|
+
(props) => /* @__PURE__ */ jsx288(
|
|
10195
10377
|
DDSInput,
|
|
10196
10378
|
{
|
|
10197
10379
|
...props,
|
|
@@ -10209,7 +10391,7 @@ function Select({
|
|
|
10209
10391
|
[]
|
|
10210
10392
|
);
|
|
10211
10393
|
const customSingleValue = useCallback7(
|
|
10212
|
-
(props) => /* @__PURE__ */
|
|
10394
|
+
(props) => /* @__PURE__ */ jsx288(
|
|
10213
10395
|
CustomSingleValue,
|
|
10214
10396
|
{
|
|
10215
10397
|
...props,
|
|
@@ -10220,15 +10402,15 @@ function Select({
|
|
|
10220
10402
|
[]
|
|
10221
10403
|
);
|
|
10222
10404
|
const customClearIndicator = useCallback7(
|
|
10223
|
-
(props) => /* @__PURE__ */
|
|
10405
|
+
(props) => /* @__PURE__ */ jsx288(DDSClearIndicator, { ...props, size: componentSize }),
|
|
10224
10406
|
[componentSize]
|
|
10225
10407
|
);
|
|
10226
10408
|
const customDropdownIndicator = useCallback7(
|
|
10227
|
-
(props) => /* @__PURE__ */
|
|
10409
|
+
(props) => /* @__PURE__ */ jsx288(DDSDropdownIndicator, { ...props, componentSize }),
|
|
10228
10410
|
[componentSize]
|
|
10229
10411
|
);
|
|
10230
10412
|
const customControl = useCallback7(
|
|
10231
|
-
(props) => /* @__PURE__ */
|
|
10413
|
+
(props) => /* @__PURE__ */ jsx288(
|
|
10232
10414
|
DDSControl,
|
|
10233
10415
|
{
|
|
10234
10416
|
...props,
|
|
@@ -10243,9 +10425,9 @@ function Select({
|
|
|
10243
10425
|
const customOptionComponent = useCallback7(
|
|
10244
10426
|
(props) => {
|
|
10245
10427
|
if (customOptionElement) {
|
|
10246
|
-
return /* @__PURE__ */
|
|
10428
|
+
return /* @__PURE__ */ jsx288(CustomOption, { ...props, customElement: customOptionElement });
|
|
10247
10429
|
} else {
|
|
10248
|
-
return /* @__PURE__ */
|
|
10430
|
+
return /* @__PURE__ */ jsx288(DDSOption, { ...props });
|
|
10249
10431
|
}
|
|
10250
10432
|
},
|
|
10251
10433
|
[customOptionElement, componentSize]
|
|
@@ -10289,7 +10471,7 @@ function Select({
|
|
|
10289
10471
|
openMenuOnClick: readOnly ? false : openMenuOnClick ? openMenuOnClick : void 0,
|
|
10290
10472
|
...rest
|
|
10291
10473
|
};
|
|
10292
|
-
return /* @__PURE__ */
|
|
10474
|
+
return /* @__PURE__ */ jsxs68(
|
|
10293
10475
|
Box,
|
|
10294
10476
|
{
|
|
10295
10477
|
width: inputWidth,
|
|
@@ -10309,7 +10491,7 @@ function Select({
|
|
|
10309
10491
|
readOnly,
|
|
10310
10492
|
afterLabelContent
|
|
10311
10493
|
}),
|
|
10312
|
-
/* @__PURE__ */
|
|
10494
|
+
/* @__PURE__ */ jsx288(ReactSelect, { ...reactSelectProps, ref }),
|
|
10313
10495
|
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
10314
10496
|
]
|
|
10315
10497
|
}
|
|
@@ -10336,7 +10518,7 @@ var NativeSelect_default = {
|
|
|
10336
10518
|
};
|
|
10337
10519
|
|
|
10338
10520
|
// src/components/Select/NativeSelect/NativeSelect.tsx
|
|
10339
|
-
import { jsx as
|
|
10521
|
+
import { jsx as jsx289, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
10340
10522
|
var NativeSelect = ({
|
|
10341
10523
|
ref,
|
|
10342
10524
|
id,
|
|
@@ -10403,7 +10585,7 @@ var NativeSelect = ({
|
|
|
10403
10585
|
};
|
|
10404
10586
|
const iconSize = componentSize === "medium" ? "medium" : "small";
|
|
10405
10587
|
const showClearButton = clearable && hasValue && !readOnly && !rest.disabled;
|
|
10406
|
-
return /* @__PURE__ */
|
|
10588
|
+
return /* @__PURE__ */ jsxs69("div", { className, style, children: [
|
|
10407
10589
|
renderLabel({
|
|
10408
10590
|
label,
|
|
10409
10591
|
htmlFor: uniqueId,
|
|
@@ -10411,8 +10593,8 @@ var NativeSelect = ({
|
|
|
10411
10593
|
readOnly,
|
|
10412
10594
|
afterLabelContent
|
|
10413
10595
|
}),
|
|
10414
|
-
/* @__PURE__ */
|
|
10415
|
-
/* @__PURE__ */
|
|
10596
|
+
/* @__PURE__ */ jsxs69(Box, { position: "relative", width: inputWidth, children: [
|
|
10597
|
+
/* @__PURE__ */ jsx289(
|
|
10416
10598
|
"select",
|
|
10417
10599
|
{
|
|
10418
10600
|
ref: useCombinedRef(ref, selectRef),
|
|
@@ -10446,7 +10628,7 @@ var NativeSelect = ({
|
|
|
10446
10628
|
children
|
|
10447
10629
|
}
|
|
10448
10630
|
),
|
|
10449
|
-
showClearButton && /* @__PURE__ */
|
|
10631
|
+
showClearButton && /* @__PURE__ */ jsx289(
|
|
10450
10632
|
ClearButton,
|
|
10451
10633
|
{
|
|
10452
10634
|
"aria-label": t(commonTexts.clearSelect),
|
|
@@ -10455,7 +10637,7 @@ var NativeSelect = ({
|
|
|
10455
10637
|
className: NativeSelect_default[`clear-button--${iconSize}`]
|
|
10456
10638
|
}
|
|
10457
10639
|
),
|
|
10458
|
-
!multiple && /* @__PURE__ */
|
|
10640
|
+
!multiple && /* @__PURE__ */ jsx289(
|
|
10459
10641
|
Icon,
|
|
10460
10642
|
{
|
|
10461
10643
|
icon: ChevronDownIcon,
|
|
@@ -10471,14 +10653,14 @@ var NativeSelectPlaceholder = ({
|
|
|
10471
10653
|
children = "-- Velg fra listen --",
|
|
10472
10654
|
value,
|
|
10473
10655
|
...rest
|
|
10474
|
-
}) => /* @__PURE__ */
|
|
10656
|
+
}) => /* @__PURE__ */ jsx289("option", { value: value != null ? value : "", selected: true, ...rest, children });
|
|
10475
10657
|
NativeSelectPlaceholder.displayName = "NativeSelectPlaceholder";
|
|
10476
10658
|
|
|
10477
10659
|
// src/components/Select/utils.ts
|
|
10478
10660
|
var createSelectOptions = (...args) => args.map((v) => ({ label: v, value: v }));
|
|
10479
10661
|
|
|
10480
10662
|
// src/components/Pagination/Pagination.tsx
|
|
10481
|
-
import { jsx as
|
|
10663
|
+
import { jsx as jsx290, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
10482
10664
|
var Pagination = ({
|
|
10483
10665
|
itemsAmount,
|
|
10484
10666
|
defaultItemsPerPage = 10,
|
|
@@ -10487,12 +10669,7 @@ var Pagination = ({
|
|
|
10487
10669
|
withPagination = true,
|
|
10488
10670
|
withCounter,
|
|
10489
10671
|
withSelect,
|
|
10490
|
-
selectOptions
|
|
10491
|
-
{ label: "10", value: 10 },
|
|
10492
|
-
{ label: "25", value: 25 },
|
|
10493
|
-
{ label: "50", value: 50 },
|
|
10494
|
-
{ label: "Alle", value: itemsAmount }
|
|
10495
|
-
],
|
|
10672
|
+
selectOptions,
|
|
10496
10673
|
smallScreenBreakpoint,
|
|
10497
10674
|
onChange,
|
|
10498
10675
|
onSelectOptionChange,
|
|
@@ -10503,7 +10680,13 @@ var Pagination = ({
|
|
|
10503
10680
|
...rest
|
|
10504
10681
|
}) => {
|
|
10505
10682
|
const { t } = useTranslation();
|
|
10506
|
-
|
|
10683
|
+
const tSelectOptions = selectOptions && selectOptions.length > 0 ? selectOptions : [
|
|
10684
|
+
{ label: "10", value: 10 },
|
|
10685
|
+
{ label: "25", value: 25 },
|
|
10686
|
+
{ label: "50", value: 50 },
|
|
10687
|
+
{ label: t(texts21.all), value: itemsAmount }
|
|
10688
|
+
];
|
|
10689
|
+
if (withSelect && !tSelectOptions.some((o) => o.value === defaultItemsPerPage)) {
|
|
10507
10690
|
console.warn(
|
|
10508
10691
|
`[Pagination] defaultItemsPerPage prop value (${defaultItemsPerPage}) is not included in customOptions prop. Please add it to ensure it appears in the dropdown.`
|
|
10509
10692
|
);
|
|
@@ -10531,7 +10714,7 @@ var Pagination = ({
|
|
|
10531
10714
|
};
|
|
10532
10715
|
const listItems = items.length > 0 ? items.map((item, i) => {
|
|
10533
10716
|
const isActive = item === activePage;
|
|
10534
|
-
return /* @__PURE__ */
|
|
10717
|
+
return /* @__PURE__ */ jsx290("li", { className: Pagination_default.list__item, children: item !== "truncator" && typeof item === "number" ? /* @__PURE__ */ jsx290(
|
|
10535
10718
|
Button,
|
|
10536
10719
|
{
|
|
10537
10720
|
purpose: isActive ? "primary" : "secondary",
|
|
@@ -10539,10 +10722,10 @@ var Pagination = ({
|
|
|
10539
10722
|
onClick: (event) => {
|
|
10540
10723
|
onPageChange(event, item);
|
|
10541
10724
|
},
|
|
10542
|
-
"aria-label": isActive ? t(
|
|
10725
|
+
"aria-label": isActive ? t(texts21.currentPage(item)) : t(texts21.page(item)),
|
|
10543
10726
|
children: item
|
|
10544
10727
|
}
|
|
10545
|
-
) : /* @__PURE__ */
|
|
10728
|
+
) : /* @__PURE__ */ jsx290(
|
|
10546
10729
|
Icon,
|
|
10547
10730
|
{
|
|
10548
10731
|
icon: MoreHorizontalIcon,
|
|
@@ -10550,7 +10733,7 @@ var Pagination = ({
|
|
|
10550
10733
|
}
|
|
10551
10734
|
) }, `pagination-item-${i}`);
|
|
10552
10735
|
}) : void 0;
|
|
10553
|
-
const previousPageButton = /* @__PURE__ */
|
|
10736
|
+
const previousPageButton = /* @__PURE__ */ jsx290(
|
|
10554
10737
|
Button,
|
|
10555
10738
|
{
|
|
10556
10739
|
purpose: "secondary",
|
|
@@ -10559,10 +10742,10 @@ var Pagination = ({
|
|
|
10559
10742
|
onClick: (event) => {
|
|
10560
10743
|
onPageChange(event, activePage - 1);
|
|
10561
10744
|
},
|
|
10562
|
-
"aria-label": t(
|
|
10745
|
+
"aria-label": t(texts21.previousPage)
|
|
10563
10746
|
}
|
|
10564
10747
|
);
|
|
10565
|
-
const nextPageButton = /* @__PURE__ */
|
|
10748
|
+
const nextPageButton = /* @__PURE__ */ jsx290(
|
|
10566
10749
|
Button,
|
|
10567
10750
|
{
|
|
10568
10751
|
purpose: "secondary",
|
|
@@ -10571,31 +10754,31 @@ var Pagination = ({
|
|
|
10571
10754
|
onClick: (event) => {
|
|
10572
10755
|
onPageChange(event, activePage + 1);
|
|
10573
10756
|
},
|
|
10574
|
-
"aria-label": t(
|
|
10757
|
+
"aria-label": t(texts21.nextPage)
|
|
10575
10758
|
}
|
|
10576
10759
|
);
|
|
10577
10760
|
const isOnFirstPage = activePage === 1;
|
|
10578
10761
|
const isOnLastPage = activePage === pagesLength;
|
|
10579
|
-
const navigation = withPagination ? /* @__PURE__ */
|
|
10762
|
+
const navigation = withPagination ? /* @__PURE__ */ jsxs70(
|
|
10580
10763
|
Box,
|
|
10581
10764
|
{
|
|
10582
10765
|
as: "nav",
|
|
10583
10766
|
ref,
|
|
10584
|
-
"aria-label": t(
|
|
10767
|
+
"aria-label": t(texts21.pagination),
|
|
10585
10768
|
display: "flex",
|
|
10586
10769
|
alignItems: "center",
|
|
10587
10770
|
...!withSelect && !withCounter && {
|
|
10588
10771
|
...getBaseHTMLProps(id, className, htmlProps, rest)
|
|
10589
10772
|
},
|
|
10590
10773
|
children: [
|
|
10591
|
-
/* @__PURE__ */
|
|
10774
|
+
/* @__PURE__ */ jsxs70(
|
|
10592
10775
|
ShowHide,
|
|
10593
10776
|
{
|
|
10594
10777
|
as: "ol",
|
|
10595
10778
|
hideBelow: smallScreenBreakpoint,
|
|
10596
10779
|
className: Pagination_default.list,
|
|
10597
10780
|
children: [
|
|
10598
|
-
/* @__PURE__ */
|
|
10781
|
+
/* @__PURE__ */ jsx290(
|
|
10599
10782
|
"li",
|
|
10600
10783
|
{
|
|
10601
10784
|
className: cn(
|
|
@@ -10607,7 +10790,7 @@ var Pagination = ({
|
|
|
10607
10790
|
}
|
|
10608
10791
|
),
|
|
10609
10792
|
listItems,
|
|
10610
|
-
/* @__PURE__ */
|
|
10793
|
+
/* @__PURE__ */ jsx290(
|
|
10611
10794
|
"li",
|
|
10612
10795
|
{
|
|
10613
10796
|
className: cn(
|
|
@@ -10621,14 +10804,14 @@ var Pagination = ({
|
|
|
10621
10804
|
]
|
|
10622
10805
|
}
|
|
10623
10806
|
),
|
|
10624
|
-
!!smallScreenBreakpoint && /* @__PURE__ */
|
|
10807
|
+
!!smallScreenBreakpoint && /* @__PURE__ */ jsxs70(
|
|
10625
10808
|
ShowHide,
|
|
10626
10809
|
{
|
|
10627
10810
|
as: "ol",
|
|
10628
10811
|
showBelow: smallScreenBreakpoint,
|
|
10629
10812
|
className: Pagination_default.list,
|
|
10630
10813
|
children: [
|
|
10631
|
-
/* @__PURE__ */
|
|
10814
|
+
/* @__PURE__ */ jsx290(
|
|
10632
10815
|
"li",
|
|
10633
10816
|
{
|
|
10634
10817
|
className: cn(
|
|
@@ -10636,7 +10819,7 @@ var Pagination = ({
|
|
|
10636
10819
|
isOnFirstPage && Pagination_default["list__item--hidden"]
|
|
10637
10820
|
),
|
|
10638
10821
|
"aria-hidden": isOnFirstPage,
|
|
10639
|
-
children: /* @__PURE__ */
|
|
10822
|
+
children: /* @__PURE__ */ jsx290(
|
|
10640
10823
|
Button,
|
|
10641
10824
|
{
|
|
10642
10825
|
purpose: "secondary",
|
|
@@ -10645,12 +10828,12 @@ var Pagination = ({
|
|
|
10645
10828
|
onClick: (event) => {
|
|
10646
10829
|
onPageChange(event, 1);
|
|
10647
10830
|
},
|
|
10648
|
-
"aria-label": t(
|
|
10831
|
+
"aria-label": t(texts21.firstPage)
|
|
10649
10832
|
}
|
|
10650
10833
|
)
|
|
10651
10834
|
}
|
|
10652
10835
|
),
|
|
10653
|
-
/* @__PURE__ */
|
|
10836
|
+
/* @__PURE__ */ jsx290(
|
|
10654
10837
|
"li",
|
|
10655
10838
|
{
|
|
10656
10839
|
className: cn(
|
|
@@ -10661,7 +10844,7 @@ var Pagination = ({
|
|
|
10661
10844
|
children: previousPageButton
|
|
10662
10845
|
}
|
|
10663
10846
|
),
|
|
10664
|
-
/* @__PURE__ */
|
|
10847
|
+
/* @__PURE__ */ jsx290("li", { className: Pagination_default.list__item, children: /* @__PURE__ */ jsx290(
|
|
10665
10848
|
Button,
|
|
10666
10849
|
{
|
|
10667
10850
|
size: "small",
|
|
@@ -10671,7 +10854,7 @@ var Pagination = ({
|
|
|
10671
10854
|
children: activePage
|
|
10672
10855
|
}
|
|
10673
10856
|
) }),
|
|
10674
|
-
/* @__PURE__ */
|
|
10857
|
+
/* @__PURE__ */ jsx290(
|
|
10675
10858
|
"li",
|
|
10676
10859
|
{
|
|
10677
10860
|
className: cn(
|
|
@@ -10682,7 +10865,7 @@ var Pagination = ({
|
|
|
10682
10865
|
children: nextPageButton
|
|
10683
10866
|
}
|
|
10684
10867
|
),
|
|
10685
|
-
/* @__PURE__ */
|
|
10868
|
+
/* @__PURE__ */ jsx290(
|
|
10686
10869
|
"li",
|
|
10687
10870
|
{
|
|
10688
10871
|
className: cn(
|
|
@@ -10690,7 +10873,7 @@ var Pagination = ({
|
|
|
10690
10873
|
isOnLastPage && Pagination_default["list__item--hidden"]
|
|
10691
10874
|
),
|
|
10692
10875
|
"aria-hidden": isOnLastPage,
|
|
10693
|
-
children: /* @__PURE__ */
|
|
10876
|
+
children: /* @__PURE__ */ jsx290(
|
|
10694
10877
|
Button,
|
|
10695
10878
|
{
|
|
10696
10879
|
purpose: "secondary",
|
|
@@ -10699,7 +10882,7 @@ var Pagination = ({
|
|
|
10699
10882
|
onClick: (event) => {
|
|
10700
10883
|
onPageChange(event, pagesLength);
|
|
10701
10884
|
},
|
|
10702
|
-
"aria-label": t(
|
|
10885
|
+
"aria-label": t(texts21.lastPage)
|
|
10703
10886
|
}
|
|
10704
10887
|
)
|
|
10705
10888
|
}
|
|
@@ -10712,7 +10895,7 @@ var Pagination = ({
|
|
|
10712
10895
|
) : null;
|
|
10713
10896
|
const activePageFirstItem = activePage === 1 ? 1 : activePage * itemsPerPage - itemsPerPage + 1;
|
|
10714
10897
|
const activePageLastItem = activePage === pagesLength ? itemsAmount : activePage * itemsPerPage;
|
|
10715
|
-
return !withCounter && !withSelect ? navigation : /* @__PURE__ */
|
|
10898
|
+
return !withCounter && !withSelect ? navigation : /* @__PURE__ */ jsxs70(
|
|
10716
10899
|
Box,
|
|
10717
10900
|
{
|
|
10718
10901
|
display: "flex",
|
|
@@ -10723,11 +10906,11 @@ var Pagination = ({
|
|
|
10723
10906
|
alignItems: styleUpToBreakpoint("center", smallScreenBreakpoint),
|
|
10724
10907
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
10725
10908
|
children: [
|
|
10726
|
-
/* @__PURE__ */
|
|
10727
|
-
withSelect && /* @__PURE__ */
|
|
10909
|
+
/* @__PURE__ */ jsxs70("div", { className: Pagination_default.indicators, children: [
|
|
10910
|
+
withSelect && /* @__PURE__ */ jsx290(
|
|
10728
10911
|
Select,
|
|
10729
10912
|
{
|
|
10730
|
-
options:
|
|
10913
|
+
options: tSelectOptions,
|
|
10731
10914
|
isSearchable: false,
|
|
10732
10915
|
width: "90px",
|
|
10733
10916
|
defaultValue: {
|
|
@@ -10737,11 +10920,11 @@ var Pagination = ({
|
|
|
10737
10920
|
isClearable: false,
|
|
10738
10921
|
onChange: handleSelectChange,
|
|
10739
10922
|
componentSize: "small",
|
|
10740
|
-
"aria-label": t(
|
|
10923
|
+
"aria-label": t(texts21.itemsPerPage)
|
|
10741
10924
|
}
|
|
10742
10925
|
),
|
|
10743
|
-
withCounter && /* @__PURE__ */
|
|
10744
|
-
|
|
10926
|
+
withCounter && /* @__PURE__ */ jsx290(Paragraph, { children: t(
|
|
10927
|
+
texts21.showsAmountOfTotalItems(
|
|
10745
10928
|
activePageFirstItem,
|
|
10746
10929
|
activePageLastItem,
|
|
10747
10930
|
itemsAmount
|
|
@@ -10754,61 +10937,77 @@ var Pagination = ({
|
|
|
10754
10937
|
);
|
|
10755
10938
|
};
|
|
10756
10939
|
Pagination.displayName = "Pagination";
|
|
10757
|
-
var
|
|
10940
|
+
var texts21 = createTexts({
|
|
10758
10941
|
pagination: {
|
|
10759
10942
|
nb: "Paginering",
|
|
10760
10943
|
no: "Paginering",
|
|
10761
10944
|
nn: "Paginering",
|
|
10762
|
-
en: "Pagination"
|
|
10945
|
+
en: "Pagination",
|
|
10946
|
+
se: "Pagineren"
|
|
10763
10947
|
},
|
|
10764
10948
|
itemsPerPage: {
|
|
10765
10949
|
nb: "Elementer per side",
|
|
10766
10950
|
no: "Elementer per side",
|
|
10767
10951
|
nn: "Element per side",
|
|
10768
|
-
en: "Items per page"
|
|
10952
|
+
en: "Items per page",
|
|
10953
|
+
se: "Elementat juohki siidui"
|
|
10769
10954
|
},
|
|
10770
10955
|
nextPage: {
|
|
10771
10956
|
nb: "Neste side",
|
|
10772
10957
|
no: "Neste side",
|
|
10773
10958
|
nn: "Neste side",
|
|
10774
|
-
en: "Next page"
|
|
10959
|
+
en: "Next page",
|
|
10960
|
+
se: "Boahte siidu"
|
|
10775
10961
|
},
|
|
10776
10962
|
previousPage: {
|
|
10777
10963
|
nb: "Forrige side",
|
|
10778
10964
|
no: "Forrige side",
|
|
10779
10965
|
nn: "F\xF8rre side",
|
|
10780
|
-
en: "Previous page"
|
|
10966
|
+
en: "Previous page",
|
|
10967
|
+
se: "Ovddit siidu"
|
|
10781
10968
|
},
|
|
10782
10969
|
firstPage: {
|
|
10783
10970
|
nb: "F\xF8rste side",
|
|
10784
10971
|
no: "F\xF8rste side",
|
|
10785
10972
|
nn: "Fyrste side",
|
|
10786
|
-
en: "First page"
|
|
10973
|
+
en: "First page",
|
|
10974
|
+
se: "Vustta\u0161 siidu"
|
|
10787
10975
|
},
|
|
10788
10976
|
lastPage: {
|
|
10789
10977
|
nb: "Siste side",
|
|
10790
10978
|
no: "Siste side",
|
|
10791
10979
|
nn: "Siste side",
|
|
10792
|
-
en: "Last page"
|
|
10980
|
+
en: "Last page",
|
|
10981
|
+
se: "Ma\u014Bimu\u0161 siidu"
|
|
10793
10982
|
},
|
|
10794
10983
|
currentPage: (page) => ({
|
|
10795
10984
|
nb: `N\xE5v\xE6rende side (${page})`,
|
|
10796
10985
|
no: `N\xE5v\xE6rende side (${page})`,
|
|
10797
10986
|
nn: `Noverande side (${page})`,
|
|
10798
|
-
en: `Current page (${page})
|
|
10987
|
+
en: `Current page (${page})`,
|
|
10988
|
+
se: `D\xE1la siidu (${page})`
|
|
10799
10989
|
}),
|
|
10800
10990
|
page: (page) => ({
|
|
10801
10991
|
nb: `Side ${page}`,
|
|
10802
10992
|
no: `Side ${page}`,
|
|
10803
10993
|
nn: `Side ${page}`,
|
|
10804
|
-
en: `Page ${page}
|
|
10994
|
+
en: `Page ${page}`,
|
|
10995
|
+
se: `Siidu ${page}`
|
|
10805
10996
|
}),
|
|
10806
10997
|
showsAmountOfTotalItems: (first, last, total) => ({
|
|
10807
10998
|
nb: `Viser ${first}-${last} av ${total}`,
|
|
10808
10999
|
no: `Viser ${first}-${last} av ${total}`,
|
|
10809
11000
|
nn: `Viser ${first}-${last} av ${total}`,
|
|
10810
|
-
en: `Shows ${first}-${last} of ${total}
|
|
10811
|
-
|
|
11001
|
+
en: `Shows ${first}-${last} of ${total}`,
|
|
11002
|
+
se: `\u010C\xE1jeha ${first}-${last} ${total} gaskkas`
|
|
11003
|
+
}),
|
|
11004
|
+
all: {
|
|
11005
|
+
nb: "Alle",
|
|
11006
|
+
no: "Alle",
|
|
11007
|
+
nn: "Alle",
|
|
11008
|
+
en: "All",
|
|
11009
|
+
se: "Buot"
|
|
11010
|
+
}
|
|
10812
11011
|
});
|
|
10813
11012
|
|
|
10814
11013
|
// src/components/PhoneInput/PhoneInput.tsx
|
|
@@ -11218,7 +11417,7 @@ var PhoneInput_default = {
|
|
|
11218
11417
|
};
|
|
11219
11418
|
|
|
11220
11419
|
// src/components/PhoneInput/PhoneInput.tsx
|
|
11221
|
-
import { jsx as
|
|
11420
|
+
import { jsx as jsx291, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
11222
11421
|
var prioritizedCountries = [
|
|
11223
11422
|
COUNTRIES.NO,
|
|
11224
11423
|
COUNTRIES.SE,
|
|
@@ -11265,21 +11464,21 @@ var PhoneInput = ({
|
|
|
11265
11464
|
className,
|
|
11266
11465
|
style,
|
|
11267
11466
|
value,
|
|
11268
|
-
selectLabel
|
|
11467
|
+
selectLabel,
|
|
11269
11468
|
selectRef,
|
|
11270
11469
|
onChange,
|
|
11271
11470
|
defaultValue,
|
|
11272
11471
|
"aria-required": ariaRequired,
|
|
11273
11472
|
"aria-describedby": ariaDescribedby,
|
|
11274
|
-
groupLabel
|
|
11473
|
+
groupLabel,
|
|
11275
11474
|
afterLabelContent,
|
|
11276
11475
|
ref,
|
|
11277
11476
|
...props
|
|
11278
11477
|
}) => {
|
|
11279
11478
|
var _a;
|
|
11280
11479
|
const { t } = useTranslation();
|
|
11281
|
-
const tGroupLabel = groupLabel != null ? groupLabel : t(
|
|
11282
|
-
const tSelectLabel = selectLabel != null ? selectLabel : t(
|
|
11480
|
+
const tGroupLabel = groupLabel != null ? groupLabel : t(texts22.countryCodeAndPhoneNumber);
|
|
11481
|
+
const tSelectLabel = selectLabel != null ? selectLabel : t(texts22.countryCode);
|
|
11283
11482
|
const generatedId = useId20();
|
|
11284
11483
|
const uniqueId = (_a = props.id) != null ? _a : generatedId;
|
|
11285
11484
|
const phoneInputId = `${uniqueId}-phone-input`;
|
|
@@ -11356,7 +11555,7 @@ var PhoneInput = ({
|
|
|
11356
11555
|
const showRequiredStyling = !!(required || ariaRequired);
|
|
11357
11556
|
const bp = props.smallScreenBreakpoint;
|
|
11358
11557
|
const widthDefault = componentSize === "xsmall" && "var(--dds-input-default-width-xsmall)";
|
|
11359
|
-
return /* @__PURE__ */
|
|
11558
|
+
return /* @__PURE__ */ jsxs71("div", { className: cn(className, Input_default.container), style, children: [
|
|
11360
11559
|
renderLabel({
|
|
11361
11560
|
label,
|
|
11362
11561
|
htmlFor: phoneNumberId,
|
|
@@ -11364,7 +11563,7 @@ var PhoneInput = ({
|
|
|
11364
11563
|
readOnly,
|
|
11365
11564
|
afterLabelContent
|
|
11366
11565
|
}),
|
|
11367
|
-
/* @__PURE__ */
|
|
11566
|
+
/* @__PURE__ */ jsxs71(
|
|
11368
11567
|
Box,
|
|
11369
11568
|
{
|
|
11370
11569
|
display: "flex",
|
|
@@ -11377,8 +11576,8 @@ var PhoneInput = ({
|
|
|
11377
11576
|
role: "group",
|
|
11378
11577
|
"aria-label": tGroupLabel,
|
|
11379
11578
|
children: [
|
|
11380
|
-
/* @__PURE__ */
|
|
11381
|
-
/* @__PURE__ */
|
|
11579
|
+
/* @__PURE__ */ jsx291("label", { className: utilStyles_default["visually-hidden"], htmlFor: selectId, children: tSelectLabel }),
|
|
11580
|
+
/* @__PURE__ */ jsx291(
|
|
11382
11581
|
NativeSelect,
|
|
11383
11582
|
{
|
|
11384
11583
|
width: styleUpToBreakpoint(
|
|
@@ -11399,11 +11598,11 @@ var PhoneInput = ({
|
|
|
11399
11598
|
hasTip ? tipId : void 0,
|
|
11400
11599
|
ariaDescribedby
|
|
11401
11600
|
]),
|
|
11402
|
-
children: countryOptions.map((item, index) => /* @__PURE__ */
|
|
11601
|
+
children: countryOptions.map((item, index) => /* @__PURE__ */ jsx291("option", { value: item.countryCode, children: item.label }, index))
|
|
11403
11602
|
}
|
|
11404
11603
|
),
|
|
11405
|
-
/* @__PURE__ */
|
|
11406
|
-
/* @__PURE__ */
|
|
11604
|
+
/* @__PURE__ */ jsxs71(Box, { width: "100%", className: Input_default["input-group"], children: [
|
|
11605
|
+
/* @__PURE__ */ jsx291(
|
|
11407
11606
|
"span",
|
|
11408
11607
|
{
|
|
11409
11608
|
className: cn(
|
|
@@ -11415,7 +11614,7 @@ var PhoneInput = ({
|
|
|
11415
11614
|
children: callingCode
|
|
11416
11615
|
}
|
|
11417
11616
|
),
|
|
11418
|
-
/* @__PURE__ */
|
|
11617
|
+
/* @__PURE__ */ jsx291(
|
|
11419
11618
|
Box,
|
|
11420
11619
|
{
|
|
11421
11620
|
as: StatefulInput,
|
|
@@ -11453,18 +11652,20 @@ var getCallingCode = (s) => {
|
|
|
11453
11652
|
var _a;
|
|
11454
11653
|
return (_a = s.substring(s.indexOf("+"), s.length)) != null ? _a : "";
|
|
11455
11654
|
};
|
|
11456
|
-
var
|
|
11655
|
+
var texts22 = createTexts({
|
|
11457
11656
|
countryCode: {
|
|
11458
11657
|
nb: "Landskode",
|
|
11459
11658
|
no: "Landskode",
|
|
11460
11659
|
nn: "Landskode",
|
|
11461
|
-
en: "Country code"
|
|
11660
|
+
en: "Country code",
|
|
11661
|
+
se: "Riikkakoda"
|
|
11462
11662
|
},
|
|
11463
11663
|
countryCodeAndPhoneNumber: {
|
|
11464
11664
|
nb: "Landskode og telefonnummer",
|
|
11465
11665
|
no: "Landskode og telefonnummer",
|
|
11466
11666
|
nn: "Landskode og telefonnummer",
|
|
11467
|
-
en: "Country code and phone number"
|
|
11667
|
+
en: "Country code and phone number",
|
|
11668
|
+
se: "Riikkakoda ja telefovnndanummir"
|
|
11468
11669
|
}
|
|
11469
11670
|
});
|
|
11470
11671
|
|
|
@@ -11493,7 +11694,7 @@ var PopoverContext = createContext13({});
|
|
|
11493
11694
|
var usePopoverContext = () => useContext19(PopoverContext);
|
|
11494
11695
|
|
|
11495
11696
|
// src/components/Popover/Popover.tsx
|
|
11496
|
-
import { jsx as
|
|
11697
|
+
import { jsx as jsx292, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
11497
11698
|
var Popover = ({
|
|
11498
11699
|
id,
|
|
11499
11700
|
header,
|
|
@@ -11581,7 +11782,7 @@ var Popover = ({
|
|
|
11581
11782
|
});
|
|
11582
11783
|
const hasTitle = !!header;
|
|
11583
11784
|
const openCn = hasTransitionedIn && isOpen ? "open" : "closed";
|
|
11584
|
-
const popover = /* @__PURE__ */
|
|
11785
|
+
const popover = /* @__PURE__ */ jsxs72(
|
|
11585
11786
|
Paper,
|
|
11586
11787
|
{
|
|
11587
11788
|
...getBaseHTMLProps(
|
|
@@ -11612,15 +11813,15 @@ var Popover = ({
|
|
|
11612
11813
|
elevation: 3,
|
|
11613
11814
|
border: "border-subtle",
|
|
11614
11815
|
children: [
|
|
11615
|
-
header && /* @__PURE__ */
|
|
11616
|
-
/* @__PURE__ */
|
|
11816
|
+
header && /* @__PURE__ */ jsx292("div", { className: Popover_default.header, children: typeof header === "string" ? /* @__PURE__ */ jsx292(Heading, { level: 2, typographyType: "headingMedium", children: header }) : header }),
|
|
11817
|
+
/* @__PURE__ */ jsx292(
|
|
11617
11818
|
"div",
|
|
11618
11819
|
{
|
|
11619
11820
|
className: !hasTitle && withCloseButton ? Popover_default["content--closable--no-header"] : "",
|
|
11620
11821
|
children
|
|
11621
11822
|
}
|
|
11622
11823
|
),
|
|
11623
|
-
withCloseButton && /* @__PURE__ */
|
|
11824
|
+
withCloseButton && /* @__PURE__ */ jsx292(
|
|
11624
11825
|
Button,
|
|
11625
11826
|
{
|
|
11626
11827
|
icon: CloseIcon,
|
|
@@ -11647,7 +11848,7 @@ import {
|
|
|
11647
11848
|
useRef as useRef31,
|
|
11648
11849
|
useState as useState24
|
|
11649
11850
|
} from "react";
|
|
11650
|
-
import { jsx as
|
|
11851
|
+
import { jsx as jsx293 } from "react/jsx-runtime";
|
|
11651
11852
|
var PopoverGroup = ({
|
|
11652
11853
|
isOpen: propIsOpen,
|
|
11653
11854
|
setIsOpen: propSetIsOpen,
|
|
@@ -11708,7 +11909,7 @@ var PopoverGroup = ({
|
|
|
11708
11909
|
ref: combinedAnchorRef
|
|
11709
11910
|
}) : child);
|
|
11710
11911
|
});
|
|
11711
|
-
return /* @__PURE__ */
|
|
11912
|
+
return /* @__PURE__ */ jsx293(
|
|
11712
11913
|
PopoverContext,
|
|
11713
11914
|
{
|
|
11714
11915
|
value: {
|
|
@@ -11766,7 +11967,7 @@ var ProgressTracker_default = {
|
|
|
11766
11967
|
|
|
11767
11968
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
11768
11969
|
import { useMemo as useMemo2 } from "react";
|
|
11769
|
-
import { Fragment as Fragment10, jsx as
|
|
11970
|
+
import { Fragment as Fragment10, jsx as jsx294, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
11770
11971
|
var toItemState = (active, completed, disabled) => {
|
|
11771
11972
|
if (disabled) {
|
|
11772
11973
|
return "disabled";
|
|
@@ -11810,10 +12011,10 @@ var ProgressTrackerItem = (props) => {
|
|
|
11810
12011
|
};
|
|
11811
12012
|
const stepNumberContent = useMemo2(() => {
|
|
11812
12013
|
if (completed) {
|
|
11813
|
-
return /* @__PURE__ */
|
|
12014
|
+
return /* @__PURE__ */ jsx294(Icon, { icon: CheckIcon, iconSize: "small" });
|
|
11814
12015
|
}
|
|
11815
12016
|
if (icon !== void 0) {
|
|
11816
|
-
return /* @__PURE__ */
|
|
12017
|
+
return /* @__PURE__ */ jsx294(Icon, { icon, iconSize: "small" });
|
|
11817
12018
|
}
|
|
11818
12019
|
return stepNumber;
|
|
11819
12020
|
}, [completed, icon, index]);
|
|
@@ -11822,8 +12023,8 @@ var ProgressTrackerItem = (props) => {
|
|
|
11822
12023
|
if (active) return "text-action-resting";
|
|
11823
12024
|
}
|
|
11824
12025
|
const isInactiveLink = disabled || active;
|
|
11825
|
-
const stepContent = /* @__PURE__ */
|
|
11826
|
-
/* @__PURE__ */
|
|
12026
|
+
const stepContent = /* @__PURE__ */ jsxs73(Fragment10, { children: [
|
|
12027
|
+
/* @__PURE__ */ jsx294(
|
|
11827
12028
|
Box,
|
|
11828
12029
|
{
|
|
11829
12030
|
display: "flex",
|
|
@@ -11838,7 +12039,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11838
12039
|
children: stepNumberContent
|
|
11839
12040
|
}
|
|
11840
12041
|
),
|
|
11841
|
-
/* @__PURE__ */
|
|
12042
|
+
/* @__PURE__ */ jsx294(
|
|
11842
12043
|
Typography,
|
|
11843
12044
|
{
|
|
11844
12045
|
as: "div",
|
|
@@ -11852,15 +12053,15 @@ var ProgressTrackerItem = (props) => {
|
|
|
11852
12053
|
}
|
|
11853
12054
|
)
|
|
11854
12055
|
] });
|
|
11855
|
-
const ariaLabel = props["aria-label"] ? props["aria-label"] : `${children}, ${stepNumber}. ${completed ? t(
|
|
11856
|
-
return /* @__PURE__ */
|
|
12056
|
+
const ariaLabel = props["aria-label"] ? props["aria-label"] : `${children}, ${stepNumber}. ${completed ? t(texts23.completed) : t(texts23.uncompleted)}`;
|
|
12057
|
+
return /* @__PURE__ */ jsx294(
|
|
11857
12058
|
Box,
|
|
11858
12059
|
{
|
|
11859
12060
|
as: "li",
|
|
11860
12061
|
display: direction === "row" ? "flex" : void 0,
|
|
11861
12062
|
"aria-current": active ? "step" : void 0,
|
|
11862
12063
|
className: cn(ProgressTracker_default["list-item"], ProgressTracker_default[`list-item--${direction}`]),
|
|
11863
|
-
children: handleStepChange ? /* @__PURE__ */
|
|
12064
|
+
children: handleStepChange ? /* @__PURE__ */ jsx294(
|
|
11864
12065
|
Box,
|
|
11865
12066
|
{
|
|
11866
12067
|
as: StylelessButton,
|
|
@@ -11884,7 +12085,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11884
12085
|
disabled,
|
|
11885
12086
|
children: stepContent
|
|
11886
12087
|
}
|
|
11887
|
-
) : /* @__PURE__ */
|
|
12088
|
+
) : /* @__PURE__ */ jsx294(
|
|
11888
12089
|
"div",
|
|
11889
12090
|
{
|
|
11890
12091
|
...getBaseHTMLProps(
|
|
@@ -11901,23 +12102,25 @@ var ProgressTrackerItem = (props) => {
|
|
|
11901
12102
|
);
|
|
11902
12103
|
};
|
|
11903
12104
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
11904
|
-
var
|
|
12105
|
+
var texts23 = createTexts({
|
|
11905
12106
|
uncompleted: {
|
|
11906
12107
|
nb: "trinn ikke ferdig",
|
|
11907
12108
|
no: "trinn ikke ferdig",
|
|
11908
12109
|
nn: "trinn ikkje ferdig",
|
|
11909
|
-
en: "step uncompleted"
|
|
12110
|
+
en: "step uncompleted",
|
|
12111
|
+
se: "ceahkki ii g\xE1rvvis"
|
|
11910
12112
|
},
|
|
11911
12113
|
completed: {
|
|
11912
12114
|
nb: "trinn ferdig",
|
|
11913
12115
|
no: "trinn ferdig",
|
|
11914
12116
|
nn: "trinn ferdig",
|
|
11915
|
-
en: "step completed"
|
|
12117
|
+
en: "step completed",
|
|
12118
|
+
se: "ceahkki g\xE1rv\xE1"
|
|
11916
12119
|
}
|
|
11917
12120
|
});
|
|
11918
12121
|
|
|
11919
12122
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
11920
|
-
import { jsx as
|
|
12123
|
+
import { jsx as jsx295 } from "react/jsx-runtime";
|
|
11921
12124
|
var ProgressTracker = (() => {
|
|
11922
12125
|
const Res = ({
|
|
11923
12126
|
id,
|
|
@@ -11947,7 +12150,7 @@ var ProgressTracker = (() => {
|
|
|
11947
12150
|
}, [children]);
|
|
11948
12151
|
const isRow = direction === "row";
|
|
11949
12152
|
const { "aria-label": ariaLabel } = htmlProps;
|
|
11950
|
-
return /* @__PURE__ */
|
|
12153
|
+
return /* @__PURE__ */ jsx295(
|
|
11951
12154
|
ProgressTrackerContext,
|
|
11952
12155
|
{
|
|
11953
12156
|
value: {
|
|
@@ -11955,12 +12158,12 @@ var ProgressTracker = (() => {
|
|
|
11955
12158
|
handleStepChange: handleChange,
|
|
11956
12159
|
direction
|
|
11957
12160
|
},
|
|
11958
|
-
children: /* @__PURE__ */
|
|
12161
|
+
children: /* @__PURE__ */ jsx295(
|
|
11959
12162
|
"nav",
|
|
11960
12163
|
{
|
|
11961
|
-
"aria-label": ariaLabel != null ? ariaLabel : t(
|
|
12164
|
+
"aria-label": ariaLabel != null ? ariaLabel : t(texts24.stepProgression),
|
|
11962
12165
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
11963
|
-
children: /* @__PURE__ */
|
|
12166
|
+
children: /* @__PURE__ */ jsx295(
|
|
11964
12167
|
Box,
|
|
11965
12168
|
{
|
|
11966
12169
|
as: StylelessOList,
|
|
@@ -11996,12 +12199,13 @@ function passIndexPropToProgressTrackerItem(children) {
|
|
|
11996
12199
|
})
|
|
11997
12200
|
);
|
|
11998
12201
|
}
|
|
11999
|
-
var
|
|
12202
|
+
var texts24 = createTexts({
|
|
12000
12203
|
stepProgression: {
|
|
12001
|
-
nb: "
|
|
12002
|
-
no: "
|
|
12003
|
-
nn: "
|
|
12004
|
-
en: "Step progression"
|
|
12204
|
+
nb: "Trinnprogresjon",
|
|
12205
|
+
no: "Trinnprogresjon",
|
|
12206
|
+
nn: "Trinnprogresjon",
|
|
12207
|
+
en: "Step progression",
|
|
12208
|
+
se: "Ceahkkeprogre\u0161uvdna"
|
|
12005
12209
|
}
|
|
12006
12210
|
});
|
|
12007
12211
|
|
|
@@ -12019,7 +12223,7 @@ var ProgressBar_default = {
|
|
|
12019
12223
|
};
|
|
12020
12224
|
|
|
12021
12225
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
12022
|
-
import { jsx as
|
|
12226
|
+
import { jsx as jsx296, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
12023
12227
|
var PROGRESS_BAR_SIZES = createSizes("small", "medium");
|
|
12024
12228
|
var ProgressBar = ({
|
|
12025
12229
|
label,
|
|
@@ -12045,9 +12249,9 @@ var ProgressBar = ({
|
|
|
12045
12249
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
12046
12250
|
const fillPrecentage = hasValidValue && value / (max != null ? max : 1) * 100 + "%";
|
|
12047
12251
|
const isIndeterminate = !hasValidValue && !hasErrorMessage;
|
|
12048
|
-
return /* @__PURE__ */
|
|
12252
|
+
return /* @__PURE__ */ jsxs74(Box, { width: "100%", className, style, children: [
|
|
12049
12253
|
renderLabel({ label, htmlFor: uniqueId }),
|
|
12050
|
-
/* @__PURE__ */
|
|
12254
|
+
/* @__PURE__ */ jsx296(
|
|
12051
12255
|
"progress",
|
|
12052
12256
|
{
|
|
12053
12257
|
id: uniqueId,
|
|
@@ -12063,13 +12267,13 @@ var ProgressBar = ({
|
|
|
12063
12267
|
children: fillPrecentage
|
|
12064
12268
|
}
|
|
12065
12269
|
),
|
|
12066
|
-
/* @__PURE__ */
|
|
12270
|
+
/* @__PURE__ */ jsx296(
|
|
12067
12271
|
Box,
|
|
12068
12272
|
{
|
|
12069
12273
|
width: getInputWidth(width),
|
|
12070
12274
|
height: size2 === "small" ? "x0.75" : "x1.5",
|
|
12071
12275
|
className: cn(ProgressBar_default.progress),
|
|
12072
|
-
children: /* @__PURE__ */
|
|
12276
|
+
children: /* @__PURE__ */ jsx296(
|
|
12073
12277
|
Box,
|
|
12074
12278
|
{
|
|
12075
12279
|
height: "100%",
|
|
@@ -12124,7 +12328,7 @@ var typographyTypes2 = {
|
|
|
12124
12328
|
|
|
12125
12329
|
// src/components/Search/SearchSuggestionItem.tsx
|
|
12126
12330
|
import { useEffect as useEffect29, useRef as useRef32 } from "react";
|
|
12127
|
-
import { jsx as
|
|
12331
|
+
import { jsx as jsx297 } from "react/jsx-runtime";
|
|
12128
12332
|
var SearchSuggestionItem = ({
|
|
12129
12333
|
focus,
|
|
12130
12334
|
className,
|
|
@@ -12139,7 +12343,7 @@ var SearchSuggestionItem = ({
|
|
|
12139
12343
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
12140
12344
|
}
|
|
12141
12345
|
}, [focus]);
|
|
12142
|
-
return /* @__PURE__ */
|
|
12346
|
+
return /* @__PURE__ */ jsx297(
|
|
12143
12347
|
StylelessButton,
|
|
12144
12348
|
{
|
|
12145
12349
|
ref: combinedRef,
|
|
@@ -12157,7 +12361,7 @@ var SearchSuggestionItem = ({
|
|
|
12157
12361
|
SearchSuggestionItem.displayName = "SearchSuggestionItem";
|
|
12158
12362
|
|
|
12159
12363
|
// src/components/Search/SearchSuggestions.tsx
|
|
12160
|
-
import { jsx as
|
|
12364
|
+
import { jsx as jsx298, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
12161
12365
|
var SearchSuggestions = ({
|
|
12162
12366
|
id,
|
|
12163
12367
|
searchId,
|
|
@@ -12177,7 +12381,7 @@ var SearchSuggestions = ({
|
|
|
12177
12381
|
const { t } = useTranslation();
|
|
12178
12382
|
const [focus] = useRoveFocus(suggestions == null ? void 0 : suggestions.length, showSuggestions);
|
|
12179
12383
|
const suggestionsToRender = maxSuggestions ? suggestions == null ? void 0 : suggestions.slice(maxSuggestions) : suggestions;
|
|
12180
|
-
return /* @__PURE__ */
|
|
12384
|
+
return /* @__PURE__ */ jsxs75(
|
|
12181
12385
|
Paper,
|
|
12182
12386
|
{
|
|
12183
12387
|
...getBaseHTMLProps(
|
|
@@ -12201,23 +12405,23 @@ var SearchSuggestions = ({
|
|
|
12201
12405
|
overflowY: "scroll",
|
|
12202
12406
|
marginBlock: "x0.25 0",
|
|
12203
12407
|
children: [
|
|
12204
|
-
/* @__PURE__ */
|
|
12408
|
+
/* @__PURE__ */ jsx298(
|
|
12205
12409
|
Box,
|
|
12206
12410
|
{
|
|
12207
12411
|
as: "h2",
|
|
12208
12412
|
paddingInline: "0 x1",
|
|
12209
12413
|
id: suggestionsHeaderId,
|
|
12210
12414
|
className: typographyStyles_default["body-xsmall"],
|
|
12211
|
-
children:
|
|
12415
|
+
children: t(texts25.searchSuggestions)
|
|
12212
12416
|
}
|
|
12213
12417
|
),
|
|
12214
|
-
/* @__PURE__ */
|
|
12215
|
-
return /* @__PURE__ */
|
|
12418
|
+
/* @__PURE__ */ jsx298(StylelessList, { role: "listbox", "aria-labelledby": suggestionsHeaderId, children: suggestionsToRender.map((suggestion, index) => {
|
|
12419
|
+
return /* @__PURE__ */ jsx298("li", { role: "option", children: /* @__PURE__ */ jsx298(
|
|
12216
12420
|
SearchSuggestionItem,
|
|
12217
12421
|
{
|
|
12218
12422
|
index,
|
|
12219
12423
|
focus: focus === index && showSuggestions,
|
|
12220
|
-
"aria-label": t(
|
|
12424
|
+
"aria-label": t(texts25.search(suggestion)),
|
|
12221
12425
|
onClick: onSuggestionClick,
|
|
12222
12426
|
"aria-setsize": suggestionsToRender.length,
|
|
12223
12427
|
"aria-posinset": index,
|
|
@@ -12231,17 +12435,25 @@ var SearchSuggestions = ({
|
|
|
12231
12435
|
);
|
|
12232
12436
|
};
|
|
12233
12437
|
SearchSuggestions.displayName = "SearchSuggestions";
|
|
12234
|
-
var
|
|
12438
|
+
var texts25 = createTexts({
|
|
12235
12439
|
search: (suggestion) => ({
|
|
12236
12440
|
no: `${suggestion} s\xF8k`,
|
|
12237
12441
|
nb: `${suggestion} s\xF8k`,
|
|
12238
12442
|
nn: `${suggestion} s\xF8k`,
|
|
12239
|
-
en: `${suggestion} search
|
|
12240
|
-
|
|
12443
|
+
en: `${suggestion} search`,
|
|
12444
|
+
se: `${suggestion} ohcan`
|
|
12445
|
+
}),
|
|
12446
|
+
searchSuggestions: {
|
|
12447
|
+
no: "S\xF8keforslag",
|
|
12448
|
+
nb: "S\xF8keforslag",
|
|
12449
|
+
nn: "S\xF8keforslag",
|
|
12450
|
+
en: "Search suggestions",
|
|
12451
|
+
se: "Ozanf\xE1laldagat"
|
|
12452
|
+
}
|
|
12241
12453
|
});
|
|
12242
12454
|
|
|
12243
12455
|
// src/components/Search/Search.tsx
|
|
12244
|
-
import { Fragment as Fragment11, jsx as
|
|
12456
|
+
import { Fragment as Fragment11, jsx as jsx299, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
12245
12457
|
var getIconSize2 = (size2) => {
|
|
12246
12458
|
switch (size2) {
|
|
12247
12459
|
case "large":
|
|
@@ -12317,14 +12529,14 @@ var Search = ({
|
|
|
12317
12529
|
} = buttonProps != null ? buttonProps : {};
|
|
12318
12530
|
const hasSuggestions = !!context.suggestions;
|
|
12319
12531
|
const showSearchButton = !!buttonProps && !!onClick;
|
|
12320
|
-
const inputGroup = /* @__PURE__ */
|
|
12532
|
+
const inputGroup = /* @__PURE__ */ jsxs76(
|
|
12321
12533
|
HStack,
|
|
12322
12534
|
{
|
|
12323
12535
|
position: "relative",
|
|
12324
12536
|
width: !showSearchButton ? width : void 0,
|
|
12325
12537
|
className: !showSearchButton ? className : void 0,
|
|
12326
12538
|
children: [
|
|
12327
|
-
showIcon && /* @__PURE__ */
|
|
12539
|
+
showIcon && /* @__PURE__ */ jsx299(
|
|
12328
12540
|
Icon,
|
|
12329
12541
|
{
|
|
12330
12542
|
icon: SearchIcon,
|
|
@@ -12335,7 +12547,7 @@ var Search = ({
|
|
|
12335
12547
|
)
|
|
12336
12548
|
}
|
|
12337
12549
|
),
|
|
12338
|
-
/* @__PURE__ */
|
|
12550
|
+
/* @__PURE__ */ jsx299(
|
|
12339
12551
|
Box,
|
|
12340
12552
|
{
|
|
12341
12553
|
as: Input,
|
|
@@ -12364,8 +12576,8 @@ var Search = ({
|
|
|
12364
12576
|
)
|
|
12365
12577
|
}
|
|
12366
12578
|
),
|
|
12367
|
-
hasSuggestions && /* @__PURE__ */
|
|
12368
|
-
/* @__PURE__ */
|
|
12579
|
+
hasSuggestions && /* @__PURE__ */ jsxs76(Fragment11, { children: [
|
|
12580
|
+
/* @__PURE__ */ jsx299(
|
|
12369
12581
|
SearchSuggestions,
|
|
12370
12582
|
{
|
|
12371
12583
|
id: suggestionsId,
|
|
@@ -12377,13 +12589,13 @@ var Search = ({
|
|
|
12377
12589
|
componentSize
|
|
12378
12590
|
}
|
|
12379
12591
|
),
|
|
12380
|
-
/* @__PURE__ */
|
|
12592
|
+
/* @__PURE__ */ jsx299(VisuallyHidden, { id: suggestionsDescriptionId, children: t(texts26.useArrowKeys) })
|
|
12381
12593
|
] }),
|
|
12382
|
-
hasValue && /* @__PURE__ */
|
|
12594
|
+
hasValue && /* @__PURE__ */ jsx299(
|
|
12383
12595
|
ClearButton,
|
|
12384
12596
|
{
|
|
12385
12597
|
size: getIconSize2(componentSize),
|
|
12386
|
-
"aria-label": t(
|
|
12598
|
+
"aria-label": t(texts26.clearSearch),
|
|
12387
12599
|
onClick: clearInput,
|
|
12388
12600
|
className: Search_default["clear-button"]
|
|
12389
12601
|
}
|
|
@@ -12391,10 +12603,10 @@ var Search = ({
|
|
|
12391
12603
|
]
|
|
12392
12604
|
}
|
|
12393
12605
|
);
|
|
12394
|
-
return /* @__PURE__ */
|
|
12606
|
+
return /* @__PURE__ */ jsxs76("div", { children: [
|
|
12395
12607
|
renderLabel({ htmlFor: uniqueId, label }),
|
|
12396
|
-
/* @__PURE__ */
|
|
12397
|
-
showSearchButton ? /* @__PURE__ */
|
|
12608
|
+
/* @__PURE__ */ jsxs76("div", { children: [
|
|
12609
|
+
showSearchButton ? /* @__PURE__ */ jsxs76(
|
|
12398
12610
|
Grid,
|
|
12399
12611
|
{
|
|
12400
12612
|
className,
|
|
@@ -12406,13 +12618,13 @@ var Search = ({
|
|
|
12406
12618
|
style,
|
|
12407
12619
|
children: [
|
|
12408
12620
|
inputGroup,
|
|
12409
|
-
/* @__PURE__ */
|
|
12621
|
+
/* @__PURE__ */ jsx299(
|
|
12410
12622
|
Button,
|
|
12411
12623
|
{
|
|
12412
12624
|
size: componentSize,
|
|
12413
12625
|
onClick,
|
|
12414
12626
|
...otherButtonProps,
|
|
12415
|
-
children: buttonLabel != null ? buttonLabel : t(
|
|
12627
|
+
children: buttonLabel != null ? buttonLabel : t(texts26.search)
|
|
12416
12628
|
}
|
|
12417
12629
|
)
|
|
12418
12630
|
]
|
|
@@ -12423,24 +12635,27 @@ var Search = ({
|
|
|
12423
12635
|
] });
|
|
12424
12636
|
};
|
|
12425
12637
|
Search.displayName = "Search";
|
|
12426
|
-
var
|
|
12638
|
+
var texts26 = createTexts({
|
|
12427
12639
|
clearSearch: {
|
|
12428
12640
|
nb: "T\xF8m s\xF8k",
|
|
12429
12641
|
no: "T\xF8m s\xF8k",
|
|
12430
12642
|
nn: "T\xF8m s\xF8k",
|
|
12431
|
-
en: "Clear search"
|
|
12643
|
+
en: "Clear search",
|
|
12644
|
+
se: "Gurre ohcama"
|
|
12432
12645
|
},
|
|
12433
12646
|
search: {
|
|
12434
12647
|
nb: "S\xF8k",
|
|
12435
12648
|
no: "S\xF8k",
|
|
12436
12649
|
nn: "S\xF8k",
|
|
12437
|
-
en: "Search"
|
|
12650
|
+
en: "Search",
|
|
12651
|
+
se: "Ohcan"
|
|
12438
12652
|
},
|
|
12439
12653
|
useArrowKeys: {
|
|
12440
12654
|
nb: "Bruk piltastene for \xE5 navigere i forslagene n\xE5r listen er utvidet",
|
|
12441
12655
|
no: "Bruk piltastene for \xE5 navigere i forslagene n\xE5r listen er utvidet",
|
|
12442
12656
|
nn: "Bruk piltastane for \xE5 navigere i forslaga n\xE5r lista er utvida",
|
|
12443
|
-
en: "Use the arrow keys to navigate suggestions when the list is expanded"
|
|
12657
|
+
en: "Use the arrow keys to navigate suggestions when the list is expanded",
|
|
12658
|
+
se: "Deatte njuollaboalu ohccat \xE1rvalusaid listtus mii lea viiddiduvvon"
|
|
12444
12659
|
}
|
|
12445
12660
|
});
|
|
12446
12661
|
|
|
@@ -12450,7 +12665,7 @@ import {
|
|
|
12450
12665
|
useRef as useRef33,
|
|
12451
12666
|
useState as useState27
|
|
12452
12667
|
} from "react";
|
|
12453
|
-
import { jsx as
|
|
12668
|
+
import { jsx as jsx300 } from "react/jsx-runtime";
|
|
12454
12669
|
var SearchAutocompleteWrapper = (props) => {
|
|
12455
12670
|
const {
|
|
12456
12671
|
value,
|
|
@@ -12526,7 +12741,7 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
12526
12741
|
inputValue,
|
|
12527
12742
|
onSugggestionClick: handleSuggestionClick
|
|
12528
12743
|
};
|
|
12529
|
-
return /* @__PURE__ */
|
|
12744
|
+
return /* @__PURE__ */ jsx300(AutocompleteSearchContext, { value: contextProps, children });
|
|
12530
12745
|
};
|
|
12531
12746
|
SearchAutocompleteWrapper.displayName = "SearchAutocompleteWrapper";
|
|
12532
12747
|
|
|
@@ -12542,7 +12757,7 @@ var Skeleton_default = {
|
|
|
12542
12757
|
};
|
|
12543
12758
|
|
|
12544
12759
|
// src/components/Skeleton/Skeleton.tsx
|
|
12545
|
-
import { jsx as
|
|
12760
|
+
import { jsx as jsx301 } from "react/jsx-runtime";
|
|
12546
12761
|
var Skeleton = ({
|
|
12547
12762
|
width,
|
|
12548
12763
|
height,
|
|
@@ -12552,7 +12767,7 @@ var Skeleton = ({
|
|
|
12552
12767
|
ref,
|
|
12553
12768
|
...rest
|
|
12554
12769
|
}) => {
|
|
12555
|
-
return /* @__PURE__ */
|
|
12770
|
+
return /* @__PURE__ */ jsx301(
|
|
12556
12771
|
Box,
|
|
12557
12772
|
{
|
|
12558
12773
|
width,
|
|
@@ -12572,7 +12787,7 @@ var SkipToContent_default = {
|
|
|
12572
12787
|
};
|
|
12573
12788
|
|
|
12574
12789
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
12575
|
-
import { jsx as
|
|
12790
|
+
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
12576
12791
|
var SkipToContent = ({
|
|
12577
12792
|
text = "Til hovedinnhold",
|
|
12578
12793
|
top = 0,
|
|
@@ -12582,12 +12797,12 @@ var SkipToContent = ({
|
|
|
12582
12797
|
...rest
|
|
12583
12798
|
}) => {
|
|
12584
12799
|
const { className: htmlPropsClassName, style, ...restHtmlProps } = htmlProps;
|
|
12585
|
-
return /* @__PURE__ */
|
|
12800
|
+
return /* @__PURE__ */ jsx302(
|
|
12586
12801
|
Contrast,
|
|
12587
12802
|
{
|
|
12588
12803
|
className: cn(className, htmlPropsClassName, SkipToContent_default.wrapper),
|
|
12589
12804
|
style: { ...style, top },
|
|
12590
|
-
children: /* @__PURE__ */
|
|
12805
|
+
children: /* @__PURE__ */ jsx302(Link, { ...getBaseHTMLProps(id, restHtmlProps, rest), children: text })
|
|
12591
12806
|
}
|
|
12592
12807
|
);
|
|
12593
12808
|
};
|
|
@@ -12605,7 +12820,7 @@ var SplitButton_default = {
|
|
|
12605
12820
|
};
|
|
12606
12821
|
|
|
12607
12822
|
// src/components/SplitButton/SplitButton.tsx
|
|
12608
|
-
import { jsx as
|
|
12823
|
+
import { jsx as jsx303, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
12609
12824
|
var SplitButton = ({
|
|
12610
12825
|
size: size2,
|
|
12611
12826
|
primaryAction,
|
|
@@ -12620,8 +12835,8 @@ var SplitButton = ({
|
|
|
12620
12835
|
purpose,
|
|
12621
12836
|
size: size2
|
|
12622
12837
|
};
|
|
12623
|
-
return /* @__PURE__ */
|
|
12624
|
-
/* @__PURE__ */
|
|
12838
|
+
return /* @__PURE__ */ jsxs77("div", { className: cn(className, SplitButton_default.container), ...rest, children: [
|
|
12839
|
+
/* @__PURE__ */ jsx303(
|
|
12625
12840
|
Button,
|
|
12626
12841
|
{
|
|
12627
12842
|
...buttonStyleProps,
|
|
@@ -12630,13 +12845,13 @@ var SplitButton = ({
|
|
|
12630
12845
|
className: SplitButton_default.main
|
|
12631
12846
|
}
|
|
12632
12847
|
),
|
|
12633
|
-
/* @__PURE__ */
|
|
12634
|
-
/* @__PURE__ */
|
|
12848
|
+
/* @__PURE__ */ jsxs77(OverflowMenuGroup, { isOpen, setIsOpen, children: [
|
|
12849
|
+
/* @__PURE__ */ jsx303(
|
|
12635
12850
|
Button,
|
|
12636
12851
|
{
|
|
12637
12852
|
...buttonStyleProps,
|
|
12638
12853
|
icon: isOpen ? ChevronUpIcon : ChevronDownIcon,
|
|
12639
|
-
"aria-label": t(
|
|
12854
|
+
"aria-label": t(texts27.moreActions),
|
|
12640
12855
|
purpose,
|
|
12641
12856
|
className: cn(
|
|
12642
12857
|
SplitButton_default.option,
|
|
@@ -12645,17 +12860,18 @@ var SplitButton = ({
|
|
|
12645
12860
|
type: "button"
|
|
12646
12861
|
}
|
|
12647
12862
|
),
|
|
12648
|
-
/* @__PURE__ */
|
|
12863
|
+
/* @__PURE__ */ jsx303(OverflowMenu, { placement: "bottom-end", children: /* @__PURE__ */ jsx303(OverflowMenuList, { children: secondaryActions.map((item, index) => /* @__PURE__ */ jsx303(OverflowMenuButton, { ...item, children: item.children }, index)) }) })
|
|
12649
12864
|
] })
|
|
12650
12865
|
] });
|
|
12651
12866
|
};
|
|
12652
12867
|
SplitButton.displayName = "SplitButton";
|
|
12653
|
-
var
|
|
12868
|
+
var texts27 = createTexts({
|
|
12654
12869
|
moreActions: {
|
|
12655
12870
|
nb: "Flere handlinger",
|
|
12656
12871
|
no: "Flere handlinger",
|
|
12657
12872
|
nn: "Fleire handlingar",
|
|
12658
|
-
en: "More actions"
|
|
12873
|
+
en: "More actions",
|
|
12874
|
+
se: "Eanet doaimmat"
|
|
12659
12875
|
}
|
|
12660
12876
|
});
|
|
12661
12877
|
|
|
@@ -12678,14 +12894,14 @@ var CollapsibleTableContext = createContext16({
|
|
|
12678
12894
|
var useCollapsibleTableContext = () => useContext23(CollapsibleTableContext);
|
|
12679
12895
|
|
|
12680
12896
|
// src/components/Table/normal/Body.tsx
|
|
12681
|
-
import { jsx as
|
|
12682
|
-
var Body = (props) => /* @__PURE__ */
|
|
12897
|
+
import { jsx as jsx304 } from "react/jsx-runtime";
|
|
12898
|
+
var Body = (props) => /* @__PURE__ */ jsx304("tbody", { ...props });
|
|
12683
12899
|
Body.displayName = "Table.Body";
|
|
12684
12900
|
|
|
12685
12901
|
// src/components/Table/normal/Head.tsx
|
|
12686
12902
|
import { createContext as createContext17, useContext as useContext24 } from "react";
|
|
12687
|
-
import { jsx as
|
|
12688
|
-
var Head = ({ children, ...rest }) => /* @__PURE__ */
|
|
12903
|
+
import { jsx as jsx305 } from "react/jsx-runtime";
|
|
12904
|
+
var Head = ({ children, ...rest }) => /* @__PURE__ */ jsx305("thead", { ...rest, children: /* @__PURE__ */ jsx305(HeadContext, { value: true, children }) });
|
|
12689
12905
|
var HeadContext = createContext17(false);
|
|
12690
12906
|
function useIsInTableHead() {
|
|
12691
12907
|
const isInTableHead = useContext24(HeadContext);
|
|
@@ -12718,7 +12934,7 @@ var Table_default = {
|
|
|
12718
12934
|
};
|
|
12719
12935
|
|
|
12720
12936
|
// src/components/Table/normal/Cell.tsx
|
|
12721
|
-
import { jsx as
|
|
12937
|
+
import { jsx as jsx306 } from "react/jsx-runtime";
|
|
12722
12938
|
var Cell = ({
|
|
12723
12939
|
children,
|
|
12724
12940
|
type: _type,
|
|
@@ -12731,7 +12947,7 @@ var Cell = ({
|
|
|
12731
12947
|
const type = _type != null ? _type : isInHead ? "head" : "data";
|
|
12732
12948
|
const { isCollapsibleChild } = collapsibleProps != null ? collapsibleProps : {};
|
|
12733
12949
|
const isComplexLayout = layout === "text and icon";
|
|
12734
|
-
return isCollapsibleChild ? /* @__PURE__ */
|
|
12950
|
+
return isCollapsibleChild ? /* @__PURE__ */ jsx306(DescriptionListDesc, { children }) : type === "head" ? /* @__PURE__ */ jsx306(
|
|
12735
12951
|
"th",
|
|
12736
12952
|
{
|
|
12737
12953
|
...rest,
|
|
@@ -12740,26 +12956,26 @@ var Cell = ({
|
|
|
12740
12956
|
!isComplexLayout && Table_default[`cell--${layout}`],
|
|
12741
12957
|
Table_default["cell--head"]
|
|
12742
12958
|
),
|
|
12743
|
-
children: isComplexLayout ? /* @__PURE__ */
|
|
12959
|
+
children: isComplexLayout ? /* @__PURE__ */ jsx306("div", { className: Table_default.cell__inner, children }) : children
|
|
12744
12960
|
}
|
|
12745
|
-
) : /* @__PURE__ */
|
|
12961
|
+
) : /* @__PURE__ */ jsx306(
|
|
12746
12962
|
"td",
|
|
12747
12963
|
{
|
|
12748
12964
|
...rest,
|
|
12749
12965
|
className: cn(className, !isComplexLayout && Table_default[`cell--${layout}`]),
|
|
12750
|
-
children: isComplexLayout ? /* @__PURE__ */
|
|
12966
|
+
children: isComplexLayout ? /* @__PURE__ */ jsx306("div", { className: Table_default.cell__inner, children }) : children
|
|
12751
12967
|
}
|
|
12752
12968
|
);
|
|
12753
12969
|
};
|
|
12754
12970
|
Cell.displayName = "Table.Cell";
|
|
12755
12971
|
|
|
12756
12972
|
// src/components/Table/normal/Foot.tsx
|
|
12757
|
-
import { jsx as
|
|
12758
|
-
var Foot = (props) => /* @__PURE__ */
|
|
12973
|
+
import { jsx as jsx307 } from "react/jsx-runtime";
|
|
12974
|
+
var Foot = (props) => /* @__PURE__ */ jsx307("tfoot", { ...props });
|
|
12759
12975
|
Foot.displayName = "Table.Foot";
|
|
12760
12976
|
|
|
12761
12977
|
// src/components/Table/normal/Row.tsx
|
|
12762
|
-
import { jsx as
|
|
12978
|
+
import { jsx as jsx308 } from "react/jsx-runtime";
|
|
12763
12979
|
var Row = ({
|
|
12764
12980
|
type: _type,
|
|
12765
12981
|
mode = "normal",
|
|
@@ -12770,7 +12986,7 @@ var Row = ({
|
|
|
12770
12986
|
}) => {
|
|
12771
12987
|
const isInHeader = useIsInTableHead();
|
|
12772
12988
|
const type = _type != null ? _type : isInHeader ? "head" : "body";
|
|
12773
|
-
return /* @__PURE__ */
|
|
12989
|
+
return /* @__PURE__ */ jsx308(
|
|
12774
12990
|
"tr",
|
|
12775
12991
|
{
|
|
12776
12992
|
className: cn(
|
|
@@ -12790,12 +13006,12 @@ var Row = ({
|
|
|
12790
13006
|
Row.displayName = "Table.Row";
|
|
12791
13007
|
|
|
12792
13008
|
// src/components/Table/normal/SortCell.tsx
|
|
12793
|
-
import { jsx as
|
|
13009
|
+
import { jsx as jsx309, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
12794
13010
|
var makeSortIcon = (isSorted, sortOrder) => {
|
|
12795
13011
|
if (!isSorted || !sortOrder) {
|
|
12796
|
-
return /* @__PURE__ */
|
|
13012
|
+
return /* @__PURE__ */ jsx309(Icon, { icon: UnfoldMoreIcon, iconSize: "inherit" });
|
|
12797
13013
|
}
|
|
12798
|
-
return sortOrder === "ascending" ? /* @__PURE__ */
|
|
13014
|
+
return sortOrder === "ascending" ? /* @__PURE__ */ jsx309(Icon, { icon: ChevronDownIcon, iconSize: "inherit" }) : /* @__PURE__ */ jsx309(Icon, { icon: ChevronUpIcon, iconSize: "inherit" });
|
|
12799
13015
|
};
|
|
12800
13016
|
var SortCell = ({
|
|
12801
13017
|
isSorted,
|
|
@@ -12805,17 +13021,17 @@ var SortCell = ({
|
|
|
12805
13021
|
...rest
|
|
12806
13022
|
}) => {
|
|
12807
13023
|
const { t } = useTranslation();
|
|
12808
|
-
return /* @__PURE__ */
|
|
13024
|
+
return /* @__PURE__ */ jsx309(
|
|
12809
13025
|
Cell,
|
|
12810
13026
|
{
|
|
12811
13027
|
type: "head",
|
|
12812
13028
|
"aria-sort": isSorted && sortOrder ? sortOrder : void 0,
|
|
12813
13029
|
...rest,
|
|
12814
|
-
children: /* @__PURE__ */
|
|
13030
|
+
children: /* @__PURE__ */ jsxs78(
|
|
12815
13031
|
StylelessButton,
|
|
12816
13032
|
{
|
|
12817
13033
|
onClick,
|
|
12818
|
-
"aria-description": t(
|
|
13034
|
+
"aria-description": t(texts28.changeSort),
|
|
12819
13035
|
className: cn(Table_default["sort-button"], focusable),
|
|
12820
13036
|
children: [
|
|
12821
13037
|
children,
|
|
@@ -12828,17 +13044,18 @@ var SortCell = ({
|
|
|
12828
13044
|
);
|
|
12829
13045
|
};
|
|
12830
13046
|
SortCell.displayName = "Table.SortCell";
|
|
12831
|
-
var
|
|
13047
|
+
var texts28 = createTexts({
|
|
12832
13048
|
changeSort: {
|
|
12833
13049
|
nb: "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
|
|
12834
13050
|
no: "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
|
|
12835
13051
|
nn: "Aktiver for \xE5 endre sorteringsrekkjef\xF8lgje",
|
|
12836
|
-
en: "Activate to change sort order"
|
|
13052
|
+
en: "Activate to change sort order",
|
|
13053
|
+
se: "Aktivere rievdadit sorterenortnega"
|
|
12837
13054
|
}
|
|
12838
13055
|
});
|
|
12839
13056
|
|
|
12840
13057
|
// src/components/Table/normal/Table.tsx
|
|
12841
|
-
import { jsx as
|
|
13058
|
+
import { jsx as jsx310 } from "react/jsx-runtime";
|
|
12842
13059
|
var Table = ({
|
|
12843
13060
|
size: size2 = "medium",
|
|
12844
13061
|
stickyHeader,
|
|
@@ -12846,7 +13063,7 @@ var Table = ({
|
|
|
12846
13063
|
className,
|
|
12847
13064
|
children,
|
|
12848
13065
|
...rest
|
|
12849
|
-
}) => /* @__PURE__ */
|
|
13066
|
+
}) => /* @__PURE__ */ jsx310(
|
|
12850
13067
|
"table",
|
|
12851
13068
|
{
|
|
12852
13069
|
...rest,
|
|
@@ -12870,7 +13087,7 @@ import {
|
|
|
12870
13087
|
useRef as useRef34,
|
|
12871
13088
|
useState as useState29
|
|
12872
13089
|
} from "react";
|
|
12873
|
-
import { jsx as
|
|
13090
|
+
import { jsx as jsx311 } from "react/jsx-runtime";
|
|
12874
13091
|
var TableWrapper = ({ className, ...rest }) => {
|
|
12875
13092
|
const themeContext = useContext25(ThemeContext);
|
|
12876
13093
|
const container2 = themeContext == null ? void 0 : themeContext.el;
|
|
@@ -12895,7 +13112,7 @@ var TableWrapper = ({ className, ...rest }) => {
|
|
|
12895
13112
|
window.addEventListener("resize", handleResize);
|
|
12896
13113
|
return () => window.removeEventListener("resize", handleResize);
|
|
12897
13114
|
});
|
|
12898
|
-
return /* @__PURE__ */
|
|
13115
|
+
return /* @__PURE__ */ jsx311(
|
|
12899
13116
|
"div",
|
|
12900
13117
|
{
|
|
12901
13118
|
ref: wrapperRef,
|
|
@@ -12922,7 +13139,7 @@ Table2.Row = Row;
|
|
|
12922
13139
|
Table2.Foot = Foot;
|
|
12923
13140
|
|
|
12924
13141
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
12925
|
-
import { Fragment as Fragment13, jsx as
|
|
13142
|
+
import { Fragment as Fragment13, jsx as jsx312, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
12926
13143
|
var CollapsibleRow = ({
|
|
12927
13144
|
type: _type,
|
|
12928
13145
|
className,
|
|
@@ -12965,40 +13182,40 @@ var CollapsibleRow = ({
|
|
|
12965
13182
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
12966
13183
|
const id = derivativeIdGenerator(prefix2, index.toString());
|
|
12967
13184
|
collapsibleIds.push(id);
|
|
12968
|
-
return /* @__PURE__ */
|
|
12969
|
-
/* @__PURE__ */
|
|
13185
|
+
return /* @__PURE__ */ jsxs79(Fragment12, { children: [
|
|
13186
|
+
/* @__PURE__ */ jsx312(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
12970
13187
|
isValidElement6(child) && cloneElement6(child, {
|
|
12971
13188
|
collapsibleProps: { isCollapsibleChild: true }
|
|
12972
13189
|
})
|
|
12973
13190
|
] }, `DL-${index}`);
|
|
12974
13191
|
}) : null;
|
|
12975
|
-
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */
|
|
13192
|
+
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsx312(Row, { ...rowProps(), children: /* @__PURE__ */ jsx312(Cell, { colSpan: definingColumnIndex.length + 1, children: /* @__PURE__ */ jsx312(DescriptionList, { children: collapsedRenderedChildren }) }) }) : null;
|
|
12976
13193
|
const definingColumnCells = childrenArray.slice().filter((column, index) => definingColumnIndex.indexOf(index) > -1).sort((a, b) => {
|
|
12977
13194
|
return definingColumnIndex.indexOf(childrenArray.indexOf(a)) - definingColumnIndex.indexOf(childrenArray.indexOf(b));
|
|
12978
13195
|
});
|
|
12979
13196
|
const headerRow = () => {
|
|
12980
13197
|
if (type !== "head" || !isCollapsed) return null;
|
|
12981
|
-
return /* @__PURE__ */
|
|
13198
|
+
return /* @__PURE__ */ jsx312(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs79(Fragment13, { children: [
|
|
12982
13199
|
definingColumnCells,
|
|
12983
|
-
/* @__PURE__ */
|
|
12984
|
-
t(
|
|
12985
|
-
/* @__PURE__ */
|
|
13200
|
+
/* @__PURE__ */ jsxs79(Table2.Cell, { type: "head", layout: "center", children: [
|
|
13201
|
+
t(texts29.expand),
|
|
13202
|
+
/* @__PURE__ */ jsx312(VisuallyHidden, { children: t(texts29.row) })
|
|
12986
13203
|
] })
|
|
12987
13204
|
] }) });
|
|
12988
13205
|
};
|
|
12989
13206
|
const idList = spaceSeparatedIdListGenerator(collapsibleIds);
|
|
12990
13207
|
const rowWithChevron = () => {
|
|
12991
13208
|
if (type !== "body" || !isCollapsed) return null;
|
|
12992
|
-
return /* @__PURE__ */
|
|
13209
|
+
return /* @__PURE__ */ jsxs79(Row, { ref, ...rowProps(!childrenCollapsed && true), children: [
|
|
12993
13210
|
definingColumnCells,
|
|
12994
|
-
/* @__PURE__ */
|
|
13211
|
+
/* @__PURE__ */ jsx312(Table2.Cell, { children: /* @__PURE__ */ jsx312(
|
|
12995
13212
|
StylelessButton,
|
|
12996
13213
|
{
|
|
12997
13214
|
onClick: () => setChildrenCollapsed(!childrenCollapsed),
|
|
12998
13215
|
"aria-expanded": !childrenCollapsed,
|
|
12999
13216
|
"aria-controls": idList,
|
|
13000
13217
|
className: cn(Table_default["collapse-button"], focusable),
|
|
13001
|
-
children: /* @__PURE__ */
|
|
13218
|
+
children: /* @__PURE__ */ jsx312(
|
|
13002
13219
|
AnimatedChevronUpDown,
|
|
13003
13220
|
{
|
|
13004
13221
|
isUp: childrenCollapsed ? false : true,
|
|
@@ -13010,39 +13227,41 @@ var CollapsibleRow = ({
|
|
|
13010
13227
|
) })
|
|
13011
13228
|
] });
|
|
13012
13229
|
};
|
|
13013
|
-
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */
|
|
13230
|
+
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs79(Fragment13, { children: [
|
|
13014
13231
|
headerRow(),
|
|
13015
|
-
type === "body" && /* @__PURE__ */
|
|
13232
|
+
type === "body" && /* @__PURE__ */ jsxs79(Fragment13, { children: [
|
|
13016
13233
|
rowWithChevron(),
|
|
13017
13234
|
childrenCollapsed ? null : collapsedRows
|
|
13018
13235
|
] })
|
|
13019
|
-
] }) : /* @__PURE__ */
|
|
13236
|
+
] }) : /* @__PURE__ */ jsx312(Row, { ref, ...rowProps(), children });
|
|
13020
13237
|
};
|
|
13021
13238
|
CollapsibleRow.displayName = "CollapsibleTable.Row";
|
|
13022
|
-
var
|
|
13239
|
+
var texts29 = createTexts({
|
|
13023
13240
|
expand: {
|
|
13024
13241
|
nb: "Utvid",
|
|
13025
13242
|
no: "Utvid",
|
|
13026
13243
|
nn: "Utvid",
|
|
13027
|
-
en: "Expand"
|
|
13244
|
+
en: "Expand",
|
|
13245
|
+
se: "Viiddit"
|
|
13028
13246
|
},
|
|
13029
13247
|
row: {
|
|
13030
13248
|
nb: "raden",
|
|
13031
13249
|
no: "raden",
|
|
13032
13250
|
nn: "rada",
|
|
13033
|
-
en: "row"
|
|
13251
|
+
en: "row",
|
|
13252
|
+
se: "gurgadus"
|
|
13034
13253
|
}
|
|
13035
13254
|
});
|
|
13036
13255
|
|
|
13037
13256
|
// src/components/Table/collapsible/CollapsibleTable.tsx
|
|
13038
|
-
import { jsx as
|
|
13257
|
+
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
13039
13258
|
var CollapsibleTable = ({
|
|
13040
13259
|
isCollapsed,
|
|
13041
13260
|
headerValues,
|
|
13042
13261
|
definingColumnIndex = [0],
|
|
13043
13262
|
...rest
|
|
13044
13263
|
}) => {
|
|
13045
|
-
return /* @__PURE__ */
|
|
13264
|
+
return /* @__PURE__ */ jsx313(
|
|
13046
13265
|
CollapsibleTableContext,
|
|
13047
13266
|
{
|
|
13048
13267
|
value: {
|
|
@@ -13050,7 +13269,7 @@ var CollapsibleTable = ({
|
|
|
13050
13269
|
headerValues,
|
|
13051
13270
|
definingColumnIndex
|
|
13052
13271
|
},
|
|
13053
|
-
children: /* @__PURE__ */
|
|
13272
|
+
children: /* @__PURE__ */ jsx313(Table2, { ...rest })
|
|
13054
13273
|
}
|
|
13055
13274
|
);
|
|
13056
13275
|
};
|
|
@@ -13100,13 +13319,13 @@ import {
|
|
|
13100
13319
|
useContext as useContext27,
|
|
13101
13320
|
useLayoutEffect as useLayoutEffect3
|
|
13102
13321
|
} from "react";
|
|
13103
|
-
import { jsx as
|
|
13322
|
+
import { jsx as jsx314 } from "react/jsx-runtime";
|
|
13104
13323
|
var TabContext = createContext19(null);
|
|
13105
13324
|
function TabWidthContextProvider({
|
|
13106
13325
|
children,
|
|
13107
13326
|
onChangeWidths
|
|
13108
13327
|
}) {
|
|
13109
|
-
return /* @__PURE__ */
|
|
13328
|
+
return /* @__PURE__ */ jsx314(
|
|
13110
13329
|
TabContext,
|
|
13111
13330
|
{
|
|
13112
13331
|
value: {
|
|
@@ -13138,7 +13357,7 @@ function useSetTabWidth(index, width) {
|
|
|
13138
13357
|
}
|
|
13139
13358
|
|
|
13140
13359
|
// src/components/Tabs/AddTabButton.tsx
|
|
13141
|
-
import { jsx as
|
|
13360
|
+
import { jsx as jsx315, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
13142
13361
|
var AddTabButton = ({
|
|
13143
13362
|
ref,
|
|
13144
13363
|
children,
|
|
@@ -13151,7 +13370,7 @@ var AddTabButton = ({
|
|
|
13151
13370
|
const buttonRef = useRef35(null);
|
|
13152
13371
|
const combinedRef = useCombinedRef(ref, buttonRef);
|
|
13153
13372
|
const { tabContentDirection, size: size2 } = useTabsContext();
|
|
13154
|
-
return /* @__PURE__ */
|
|
13373
|
+
return /* @__PURE__ */ jsxs80(
|
|
13155
13374
|
"button",
|
|
13156
13375
|
{
|
|
13157
13376
|
...rest,
|
|
@@ -13164,8 +13383,8 @@ var AddTabButton = ({
|
|
|
13164
13383
|
focus_default["focusable--inset"]
|
|
13165
13384
|
),
|
|
13166
13385
|
children: [
|
|
13167
|
-
/* @__PURE__ */
|
|
13168
|
-
/* @__PURE__ */
|
|
13386
|
+
/* @__PURE__ */ jsx315(Icon, { icon: PlusIcon, iconSize: "inherit" }),
|
|
13387
|
+
/* @__PURE__ */ jsx315("span", { children })
|
|
13169
13388
|
]
|
|
13170
13389
|
}
|
|
13171
13390
|
);
|
|
@@ -13174,7 +13393,7 @@ AddTabButton.displayName = "AddTabButton";
|
|
|
13174
13393
|
|
|
13175
13394
|
// src/components/Tabs/Tabs.tsx
|
|
13176
13395
|
import { useEffect as useEffect33, useId as useId25, useRef as useRef36, useState as useState31 } from "react";
|
|
13177
|
-
import { jsx as
|
|
13396
|
+
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
13178
13397
|
var TABS_SIZES = createSizes("small", "medium");
|
|
13179
13398
|
var Tabs = ({
|
|
13180
13399
|
id,
|
|
@@ -13204,7 +13423,7 @@ var Tabs = ({
|
|
|
13204
13423
|
setActiveTab(activeTab);
|
|
13205
13424
|
}
|
|
13206
13425
|
}, [activeTab, thisActiveTab]);
|
|
13207
|
-
return /* @__PURE__ */
|
|
13426
|
+
return /* @__PURE__ */ jsx316(
|
|
13208
13427
|
TabsContext,
|
|
13209
13428
|
{
|
|
13210
13429
|
value: {
|
|
@@ -13219,7 +13438,7 @@ var Tabs = ({
|
|
|
13219
13438
|
tabContentDirection,
|
|
13220
13439
|
addTabButtonProps
|
|
13221
13440
|
},
|
|
13222
|
-
children: /* @__PURE__ */
|
|
13441
|
+
children: /* @__PURE__ */ jsx316(
|
|
13223
13442
|
Box,
|
|
13224
13443
|
{
|
|
13225
13444
|
...getBaseHTMLProps(uniqueId, className, htmlProps, rest),
|
|
@@ -13238,7 +13457,7 @@ import {
|
|
|
13238
13457
|
useEffect as useEffect34,
|
|
13239
13458
|
useRef as useRef37
|
|
13240
13459
|
} from "react";
|
|
13241
|
-
import { jsx as
|
|
13460
|
+
import { jsx as jsx317, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
13242
13461
|
var Tab = ({
|
|
13243
13462
|
active = false,
|
|
13244
13463
|
icon,
|
|
@@ -13280,7 +13499,7 @@ var Tab = ({
|
|
|
13280
13499
|
handleSelect();
|
|
13281
13500
|
onKeyDown == null ? void 0 : onKeyDown(e);
|
|
13282
13501
|
};
|
|
13283
|
-
return /* @__PURE__ */
|
|
13502
|
+
return /* @__PURE__ */ jsxs81(
|
|
13284
13503
|
"button",
|
|
13285
13504
|
{
|
|
13286
13505
|
...getBaseHTMLProps(
|
|
@@ -13304,8 +13523,8 @@ var Tab = ({
|
|
|
13304
13523
|
onKeyDown: handleOnKeyDown,
|
|
13305
13524
|
tabIndex: focus ? 0 : -1,
|
|
13306
13525
|
children: [
|
|
13307
|
-
icon && /* @__PURE__ */
|
|
13308
|
-
/* @__PURE__ */
|
|
13526
|
+
icon && /* @__PURE__ */ jsx317(Icon, { icon, iconSize: "inherit" }),
|
|
13527
|
+
/* @__PURE__ */ jsx317("span", { children })
|
|
13309
13528
|
]
|
|
13310
13529
|
}
|
|
13311
13530
|
);
|
|
@@ -13319,7 +13538,7 @@ import {
|
|
|
13319
13538
|
isValidElement as isValidElement7,
|
|
13320
13539
|
useState as useState32
|
|
13321
13540
|
} from "react";
|
|
13322
|
-
import { jsx as
|
|
13541
|
+
import { jsx as jsx318, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
13323
13542
|
var TabList = ({
|
|
13324
13543
|
children,
|
|
13325
13544
|
id,
|
|
@@ -13377,7 +13596,7 @@ var TabList = ({
|
|
|
13377
13596
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13378
13597
|
["--dds-tab-widths"]: widths.join(" ")
|
|
13379
13598
|
};
|
|
13380
|
-
return /* @__PURE__ */
|
|
13599
|
+
return /* @__PURE__ */ jsx318(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ jsxs82(
|
|
13381
13600
|
"div",
|
|
13382
13601
|
{
|
|
13383
13602
|
...rest,
|
|
@@ -13397,7 +13616,7 @@ var TabList = ({
|
|
|
13397
13616
|
style: { ...style, ...customWidths },
|
|
13398
13617
|
children: [
|
|
13399
13618
|
tabListChildren,
|
|
13400
|
-
hasButton && /* @__PURE__ */
|
|
13619
|
+
hasButton && /* @__PURE__ */ jsx318(
|
|
13401
13620
|
AddTabButton,
|
|
13402
13621
|
{
|
|
13403
13622
|
index: tabListChildren ? tabListChildren.length : 0,
|
|
@@ -13411,7 +13630,7 @@ var TabList = ({
|
|
|
13411
13630
|
TabList.displayName = "TabList";
|
|
13412
13631
|
|
|
13413
13632
|
// src/components/Tabs/TabPanel.tsx
|
|
13414
|
-
import { jsx as
|
|
13633
|
+
import { jsx as jsx319 } from "react/jsx-runtime";
|
|
13415
13634
|
var TabPanel = ({
|
|
13416
13635
|
active = false,
|
|
13417
13636
|
children,
|
|
@@ -13420,7 +13639,7 @@ var TabPanel = ({
|
|
|
13420
13639
|
htmlProps,
|
|
13421
13640
|
padding = "x0.25",
|
|
13422
13641
|
...rest
|
|
13423
|
-
}) => /* @__PURE__ */
|
|
13642
|
+
}) => /* @__PURE__ */ jsx319(
|
|
13424
13643
|
Box,
|
|
13425
13644
|
{
|
|
13426
13645
|
padding,
|
|
@@ -13439,7 +13658,7 @@ import {
|
|
|
13439
13658
|
cloneElement as cloneElement8,
|
|
13440
13659
|
isValidElement as isValidElement8
|
|
13441
13660
|
} from "react";
|
|
13442
|
-
import { jsx as
|
|
13661
|
+
import { jsx as jsx320 } from "react/jsx-runtime";
|
|
13443
13662
|
var TabPanels = ({ children, ref, ...rest }) => {
|
|
13444
13663
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
13445
13664
|
const combinedRef = useCombinedRef(ref, tabPanelsRef);
|
|
@@ -13454,7 +13673,7 @@ var TabPanels = ({ children, ref, ...rest }) => {
|
|
|
13454
13673
|
}
|
|
13455
13674
|
});
|
|
13456
13675
|
});
|
|
13457
|
-
return /* @__PURE__ */
|
|
13676
|
+
return /* @__PURE__ */ jsx320(Box, { ref: combinedRef, ...rest, children: panelChildren });
|
|
13458
13677
|
};
|
|
13459
13678
|
TabPanels.displayName = "TabPanels";
|
|
13460
13679
|
|
|
@@ -13475,7 +13694,7 @@ var Tag_default = {
|
|
|
13475
13694
|
};
|
|
13476
13695
|
|
|
13477
13696
|
// src/components/Tag/Tag.tsx
|
|
13478
|
-
import { jsx as
|
|
13697
|
+
import { jsx as jsx321, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
13479
13698
|
var icons3 = {
|
|
13480
13699
|
info: InfoIcon,
|
|
13481
13700
|
danger: ErrorIcon,
|
|
@@ -13495,7 +13714,7 @@ var Tag = ({
|
|
|
13495
13714
|
...rest
|
|
13496
13715
|
}) => {
|
|
13497
13716
|
const icon = icons3[purpose];
|
|
13498
|
-
return /* @__PURE__ */
|
|
13717
|
+
return /* @__PURE__ */ jsxs83(
|
|
13499
13718
|
TextOverflowEllipsisWrapper,
|
|
13500
13719
|
{
|
|
13501
13720
|
...getBaseHTMLProps(
|
|
@@ -13511,8 +13730,8 @@ var Tag = ({
|
|
|
13511
13730
|
rest
|
|
13512
13731
|
),
|
|
13513
13732
|
children: [
|
|
13514
|
-
withIcon && icon && /* @__PURE__ */
|
|
13515
|
-
/* @__PURE__ */
|
|
13733
|
+
withIcon && icon && /* @__PURE__ */ jsx321(Icon, { icon, iconSize: "small" }),
|
|
13734
|
+
/* @__PURE__ */ jsx321(TextOverflowEllipsisInner, { children: children != null ? children : text })
|
|
13516
13735
|
]
|
|
13517
13736
|
}
|
|
13518
13737
|
);
|
|
@@ -13542,7 +13761,7 @@ var TextInput_default = {
|
|
|
13542
13761
|
};
|
|
13543
13762
|
|
|
13544
13763
|
// src/components/TextInput/TextInput.tsx
|
|
13545
|
-
import { jsx as
|
|
13764
|
+
import { jsx as jsx322, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
13546
13765
|
var TextInput = ({
|
|
13547
13766
|
label,
|
|
13548
13767
|
afterLabelContent,
|
|
@@ -13637,8 +13856,8 @@ var TextInput = ({
|
|
|
13637
13856
|
const suffixPaddingInlineEnd = suffixLength ? `calc(var(--dds-spacing-x1) + ${suffixLength}px)` : void 0;
|
|
13638
13857
|
let extendedInput = null;
|
|
13639
13858
|
if (hasIcon) {
|
|
13640
|
-
extendedInput = /* @__PURE__ */
|
|
13641
|
-
/* @__PURE__ */
|
|
13859
|
+
extendedInput = /* @__PURE__ */ jsxs84(Box, { className: Input_default["input-group"], width: inputWidth, children: [
|
|
13860
|
+
/* @__PURE__ */ jsx322(
|
|
13642
13861
|
Icon,
|
|
13643
13862
|
{
|
|
13644
13863
|
icon,
|
|
@@ -13649,7 +13868,7 @@ var TextInput = ({
|
|
|
13649
13868
|
)
|
|
13650
13869
|
}
|
|
13651
13870
|
),
|
|
13652
|
-
/* @__PURE__ */
|
|
13871
|
+
/* @__PURE__ */ jsx322(
|
|
13653
13872
|
StatefulInput,
|
|
13654
13873
|
{
|
|
13655
13874
|
className: cn(
|
|
@@ -13662,7 +13881,7 @@ var TextInput = ({
|
|
|
13662
13881
|
)
|
|
13663
13882
|
] });
|
|
13664
13883
|
} else if (hasAffix) {
|
|
13665
|
-
extendedInput = /* @__PURE__ */
|
|
13884
|
+
extendedInput = /* @__PURE__ */ jsxs84(
|
|
13666
13885
|
Box,
|
|
13667
13886
|
{
|
|
13668
13887
|
position: "relative",
|
|
@@ -13670,7 +13889,7 @@ var TextInput = ({
|
|
|
13670
13889
|
alignItems: "center",
|
|
13671
13890
|
width: inputWidth,
|
|
13672
13891
|
children: [
|
|
13673
|
-
prefix2 && /* @__PURE__ */
|
|
13892
|
+
prefix2 && /* @__PURE__ */ jsx322(
|
|
13674
13893
|
"span",
|
|
13675
13894
|
{
|
|
13676
13895
|
ref: prefixRef,
|
|
@@ -13683,7 +13902,7 @@ var TextInput = ({
|
|
|
13683
13902
|
children: prefix2
|
|
13684
13903
|
}
|
|
13685
13904
|
),
|
|
13686
|
-
/* @__PURE__ */
|
|
13905
|
+
/* @__PURE__ */ jsx322(
|
|
13687
13906
|
StatefulInput,
|
|
13688
13907
|
{
|
|
13689
13908
|
style: {
|
|
@@ -13694,7 +13913,7 @@ var TextInput = ({
|
|
|
13694
13913
|
...generalInputProps
|
|
13695
13914
|
}
|
|
13696
13915
|
),
|
|
13697
|
-
suffix && /* @__PURE__ */
|
|
13916
|
+
suffix && /* @__PURE__ */ jsx322(
|
|
13698
13917
|
"span",
|
|
13699
13918
|
{
|
|
13700
13919
|
ref: suffixRef,
|
|
@@ -13711,7 +13930,7 @@ var TextInput = ({
|
|
|
13711
13930
|
}
|
|
13712
13931
|
);
|
|
13713
13932
|
}
|
|
13714
|
-
return /* @__PURE__ */
|
|
13933
|
+
return /* @__PURE__ */ jsxs84(
|
|
13715
13934
|
"div",
|
|
13716
13935
|
{
|
|
13717
13936
|
className: cn(
|
|
@@ -13730,8 +13949,8 @@ var TextInput = ({
|
|
|
13730
13949
|
readOnly,
|
|
13731
13950
|
afterLabelContent
|
|
13732
13951
|
}),
|
|
13733
|
-
extendedInput ? extendedInput : /* @__PURE__ */
|
|
13734
|
-
hasBottomContainer && /* @__PURE__ */
|
|
13952
|
+
extendedInput ? extendedInput : /* @__PURE__ */ jsx322(Box, { as: StatefulInput, width: inputWidth, ...generalInputProps }),
|
|
13953
|
+
hasBottomContainer && /* @__PURE__ */ jsxs84(
|
|
13735
13954
|
Box,
|
|
13736
13955
|
{
|
|
13737
13956
|
display: "flex",
|
|
@@ -13774,7 +13993,7 @@ var Toggle_default = {
|
|
|
13774
13993
|
};
|
|
13775
13994
|
|
|
13776
13995
|
// src/components/Toggle/Toggle.tsx
|
|
13777
|
-
import { jsx as
|
|
13996
|
+
import { jsx as jsx323, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
13778
13997
|
var TOGGLE_SIZES = createSizes("medium", "large");
|
|
13779
13998
|
var Toggle = ({
|
|
13780
13999
|
id,
|
|
@@ -13799,7 +14018,7 @@ var Toggle = ({
|
|
|
13799
14018
|
defaultValue: defaultChecked != null ? defaultChecked : false,
|
|
13800
14019
|
onChange
|
|
13801
14020
|
});
|
|
13802
|
-
return /* @__PURE__ */
|
|
14021
|
+
return /* @__PURE__ */ jsxs85(
|
|
13803
14022
|
"label",
|
|
13804
14023
|
{
|
|
13805
14024
|
htmlFor: uniqueId,
|
|
@@ -13811,7 +14030,7 @@ var Toggle = ({
|
|
|
13811
14030
|
readOnly && Toggle_default["label--read-only"]
|
|
13812
14031
|
),
|
|
13813
14032
|
children: [
|
|
13814
|
-
/* @__PURE__ */
|
|
14033
|
+
/* @__PURE__ */ jsx323(
|
|
13815
14034
|
HiddenInput,
|
|
13816
14035
|
{
|
|
13817
14036
|
...getBaseHTMLProps(
|
|
@@ -13833,7 +14052,7 @@ var Toggle = ({
|
|
|
13833
14052
|
onClick: readOnlyClickHandler(readOnly || isLoading, htmlProps.onClick)
|
|
13834
14053
|
}
|
|
13835
14054
|
),
|
|
13836
|
-
/* @__PURE__ */
|
|
14055
|
+
/* @__PURE__ */ jsx323("span", { className: cn(Toggle_default.track, focus_default["focus-styled-sibling"]), children: /* @__PURE__ */ jsx323("span", { className: Toggle_default.thumb, children: isLoading ? /* @__PURE__ */ jsx323(Spinner, { size: `var(--dds-icon-size-${size2})` }) : /* @__PURE__ */ jsx323(
|
|
13837
14056
|
Icon,
|
|
13838
14057
|
{
|
|
13839
14058
|
className: Toggle_default.checkmark,
|
|
@@ -13841,8 +14060,8 @@ var Toggle = ({
|
|
|
13841
14060
|
iconSize
|
|
13842
14061
|
}
|
|
13843
14062
|
) }) }),
|
|
13844
|
-
/* @__PURE__ */
|
|
13845
|
-
readOnly && /* @__PURE__ */
|
|
14063
|
+
/* @__PURE__ */ jsxs85("span", { className: cn(readOnly && Toggle_default["labeltext--readonly"]), children: [
|
|
14064
|
+
readOnly && /* @__PURE__ */ jsx323(
|
|
13846
14065
|
Icon,
|
|
13847
14066
|
{
|
|
13848
14067
|
icon: LockIcon,
|
|
@@ -13852,7 +14071,7 @@ var Toggle = ({
|
|
|
13852
14071
|
),
|
|
13853
14072
|
children,
|
|
13854
14073
|
" ",
|
|
13855
|
-
isLoading && /* @__PURE__ */
|
|
14074
|
+
isLoading && /* @__PURE__ */ jsx323(VisuallyHidden, { children: t(commonTexts.loading) })
|
|
13856
14075
|
] })
|
|
13857
14076
|
]
|
|
13858
14077
|
}
|
|
@@ -13886,7 +14105,7 @@ var ToggleBar_default = {
|
|
|
13886
14105
|
};
|
|
13887
14106
|
|
|
13888
14107
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
13889
|
-
import { jsx as
|
|
14108
|
+
import { jsx as jsx324, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
13890
14109
|
var ToggleBar = (props) => {
|
|
13891
14110
|
const {
|
|
13892
14111
|
children,
|
|
@@ -13909,7 +14128,7 @@ var ToggleBar = (props) => {
|
|
|
13909
14128
|
(e) => onChange && onChange(e, e.target.value)
|
|
13910
14129
|
);
|
|
13911
14130
|
const labelId = label && `${uniqueId}-label`;
|
|
13912
|
-
return /* @__PURE__ */
|
|
14131
|
+
return /* @__PURE__ */ jsx324(
|
|
13913
14132
|
ToggleBarContext,
|
|
13914
14133
|
{
|
|
13915
14134
|
value: {
|
|
@@ -13918,7 +14137,7 @@ var ToggleBar = (props) => {
|
|
|
13918
14137
|
name,
|
|
13919
14138
|
value: groupValue
|
|
13920
14139
|
},
|
|
13921
|
-
children: /* @__PURE__ */
|
|
14140
|
+
children: /* @__PURE__ */ jsxs86(
|
|
13922
14141
|
VStack,
|
|
13923
14142
|
{
|
|
13924
14143
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
@@ -13927,8 +14146,8 @@ var ToggleBar = (props) => {
|
|
|
13927
14146
|
role: "radiogroup",
|
|
13928
14147
|
"aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
|
|
13929
14148
|
children: [
|
|
13930
|
-
label && /* @__PURE__ */
|
|
13931
|
-
/* @__PURE__ */
|
|
14149
|
+
label && /* @__PURE__ */ jsx324(Typography, { id: labelId, as: "span", typographyType: "labelMedium", children: label }),
|
|
14150
|
+
/* @__PURE__ */ jsx324("div", { className: ToggleBar_default.bar, children })
|
|
13932
14151
|
]
|
|
13933
14152
|
}
|
|
13934
14153
|
)
|
|
@@ -13939,7 +14158,7 @@ ToggleBar.displayName = "ToggleBar";
|
|
|
13939
14158
|
|
|
13940
14159
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
13941
14160
|
import { useId as useId29 } from "react";
|
|
13942
|
-
import { jsx as
|
|
14161
|
+
import { jsx as jsx325, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
13943
14162
|
var typographyTypes3 = {
|
|
13944
14163
|
large: "bodyLarge",
|
|
13945
14164
|
medium: "bodyMedium",
|
|
@@ -13979,8 +14198,8 @@ var ToggleRadio = ({
|
|
|
13979
14198
|
(_a = group == null ? void 0 : group.onChange) == null ? void 0 : _a.call(group, event);
|
|
13980
14199
|
};
|
|
13981
14200
|
const contentTypeCn = label ? "with-text" : "just-icon";
|
|
13982
|
-
return /* @__PURE__ */
|
|
13983
|
-
/* @__PURE__ */
|
|
14201
|
+
return /* @__PURE__ */ jsxs87("label", { htmlFor: uniqueId, className: ToggleBar_default.label, children: [
|
|
14202
|
+
/* @__PURE__ */ jsx325(
|
|
13984
14203
|
HiddenInput,
|
|
13985
14204
|
{
|
|
13986
14205
|
...getBaseHTMLProps(
|
|
@@ -13998,7 +14217,7 @@ var ToggleRadio = ({
|
|
|
13998
14217
|
"aria-labelledby": ariaLabelledBy
|
|
13999
14218
|
}
|
|
14000
14219
|
),
|
|
14001
|
-
/* @__PURE__ */
|
|
14220
|
+
/* @__PURE__ */ jsxs87(
|
|
14002
14221
|
Typography,
|
|
14003
14222
|
{
|
|
14004
14223
|
as: "span",
|
|
@@ -14009,8 +14228,8 @@ var ToggleRadio = ({
|
|
|
14009
14228
|
focus_default["focus-styled-sibling"]
|
|
14010
14229
|
),
|
|
14011
14230
|
children: [
|
|
14012
|
-
icon && /* @__PURE__ */
|
|
14013
|
-
label && /* @__PURE__ */
|
|
14231
|
+
icon && /* @__PURE__ */ jsx325(Icon, { icon, iconSize: "inherit" }),
|
|
14232
|
+
label && /* @__PURE__ */ jsx325("span", { children: label })
|
|
14014
14233
|
]
|
|
14015
14234
|
}
|
|
14016
14235
|
)
|
|
@@ -14030,7 +14249,7 @@ var ToggleButton_default = {
|
|
|
14030
14249
|
};
|
|
14031
14250
|
|
|
14032
14251
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
14033
|
-
import { jsx as
|
|
14252
|
+
import { jsx as jsx326, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
14034
14253
|
var ToggleButton = ({
|
|
14035
14254
|
id,
|
|
14036
14255
|
label,
|
|
@@ -14043,8 +14262,8 @@ var ToggleButton = ({
|
|
|
14043
14262
|
const generatedId = useId30();
|
|
14044
14263
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
14045
14264
|
const hasIcon = !!icon;
|
|
14046
|
-
return /* @__PURE__ */
|
|
14047
|
-
/* @__PURE__ */
|
|
14265
|
+
return /* @__PURE__ */ jsxs88(Box, { as: "label", htmlFor: uniqueId, width: "fit-content", children: [
|
|
14266
|
+
/* @__PURE__ */ jsx326(
|
|
14048
14267
|
HiddenInput,
|
|
14049
14268
|
{
|
|
14050
14269
|
...getBaseHTMLProps(
|
|
@@ -14056,7 +14275,7 @@ var ToggleButton = ({
|
|
|
14056
14275
|
type: "checkbox"
|
|
14057
14276
|
}
|
|
14058
14277
|
),
|
|
14059
|
-
/* @__PURE__ */
|
|
14278
|
+
/* @__PURE__ */ jsxs88(
|
|
14060
14279
|
"span",
|
|
14061
14280
|
{
|
|
14062
14281
|
className: cn(
|
|
@@ -14067,7 +14286,7 @@ var ToggleButton = ({
|
|
|
14067
14286
|
focus_default["focus-styled-sibling"]
|
|
14068
14287
|
),
|
|
14069
14288
|
children: [
|
|
14070
|
-
hasIcon && /* @__PURE__ */
|
|
14289
|
+
hasIcon && /* @__PURE__ */ jsx326(Icon, { icon, iconSize: "inherit" }),
|
|
14071
14290
|
" ",
|
|
14072
14291
|
label
|
|
14073
14292
|
]
|
|
@@ -14079,7 +14298,7 @@ ToggleButton.displayName = "ToggleButton";
|
|
|
14079
14298
|
|
|
14080
14299
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
14081
14300
|
import { useId as useId31 } from "react";
|
|
14082
|
-
import { jsx as
|
|
14301
|
+
import { jsx as jsx327, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
14083
14302
|
var ToggleButtonGroup = (props) => {
|
|
14084
14303
|
const {
|
|
14085
14304
|
children,
|
|
@@ -14093,7 +14312,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
14093
14312
|
} = props;
|
|
14094
14313
|
const generatedId = useId31();
|
|
14095
14314
|
const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
|
|
14096
|
-
return /* @__PURE__ */
|
|
14315
|
+
return /* @__PURE__ */ jsxs89(
|
|
14097
14316
|
"div",
|
|
14098
14317
|
{
|
|
14099
14318
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
@@ -14101,7 +14320,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
14101
14320
|
"aria-labelledby": label ? uniqueLabelId : void 0,
|
|
14102
14321
|
children: [
|
|
14103
14322
|
renderGroupLabel({ label, id: uniqueLabelId }),
|
|
14104
|
-
/* @__PURE__ */
|
|
14323
|
+
/* @__PURE__ */ jsx327(Box, { display: "flex", flexWrap: "wrap", gap: "x0.75", flexDirection: direction, children })
|
|
14105
14324
|
]
|
|
14106
14325
|
}
|
|
14107
14326
|
);
|
|
@@ -14237,6 +14456,16 @@ export {
|
|
|
14237
14456
|
FooterLogo,
|
|
14238
14457
|
FooterSocialsGroup,
|
|
14239
14458
|
FooterSocialsList,
|
|
14459
|
+
FormSummary,
|
|
14460
|
+
FormSummaryEditButton,
|
|
14461
|
+
FormSummaryEmptyValue,
|
|
14462
|
+
FormSummaryError,
|
|
14463
|
+
FormSummaryField,
|
|
14464
|
+
FormSummaryFields,
|
|
14465
|
+
FormSummaryHeader,
|
|
14466
|
+
FormSummaryHeading,
|
|
14467
|
+
FormSummaryLabel,
|
|
14468
|
+
FormSummaryValue,
|
|
14240
14469
|
FullscreenExitIcon,
|
|
14241
14470
|
FullscreenIcon,
|
|
14242
14471
|
GavelIcon,
|