@norges-domstoler/dds-components 21.17.2 → 21.19.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 +92 -46
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +84 -43
- package/dist/index.d.ts +84 -43
- package/dist/index.js +852 -564
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +885 -607
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -160,6 +160,16 @@ __export(index_exports, {
|
|
|
160
160
|
FooterLogo: () => FooterLogo,
|
|
161
161
|
FooterSocialsGroup: () => FooterSocialsGroup,
|
|
162
162
|
FooterSocialsList: () => FooterSocialsList,
|
|
163
|
+
FormSummary: () => FormSummary,
|
|
164
|
+
FormSummaryEditButton: () => FormSummaryEditButton,
|
|
165
|
+
FormSummaryEmptyValue: () => FormSummaryEmptyValue,
|
|
166
|
+
FormSummaryError: () => FormSummaryError,
|
|
167
|
+
FormSummaryField: () => FormSummaryField,
|
|
168
|
+
FormSummaryFields: () => FormSummaryFields,
|
|
169
|
+
FormSummaryHeader: () => FormSummaryHeader,
|
|
170
|
+
FormSummaryHeading: () => FormSummaryHeading,
|
|
171
|
+
FormSummaryLabel: () => FormSummaryLabel,
|
|
172
|
+
FormSummaryValue: () => FormSummaryValue,
|
|
163
173
|
FullscreenExitIcon: () => FullscreenExitIcon,
|
|
164
174
|
FullscreenIcon: () => FullscreenIcon,
|
|
165
175
|
GavelIcon: () => GavelIcon,
|
|
@@ -619,7 +629,8 @@ var combineHandlers = (handler1, handler2) => {
|
|
|
619
629
|
|
|
620
630
|
// src/utils/dom.ts
|
|
621
631
|
function cn(...classNames) {
|
|
622
|
-
|
|
632
|
+
const filtered = classNames.filter(Boolean).join(" ");
|
|
633
|
+
return filtered || void 0;
|
|
623
634
|
}
|
|
624
635
|
function convertCamelToHyphen(value) {
|
|
625
636
|
return value.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([a-z])([0-9])/g, "$1-$2").toLowerCase();
|
|
@@ -1433,6 +1444,7 @@ var layout_default = {
|
|
|
1433
1444
|
"dds-o-y": "layout_dds-o-y",
|
|
1434
1445
|
"dds-display": "layout_dds-display",
|
|
1435
1446
|
"dds-text-align": "layout_dds-text-align",
|
|
1447
|
+
"dds-word-break": "layout_dds-word-break",
|
|
1436
1448
|
"dds-flex-dir": "layout_dds-flex-dir",
|
|
1437
1449
|
"dds-gap": "layout_dds-gap",
|
|
1438
1450
|
"dds-c-gap": "layout_dds-c-gap",
|
|
@@ -3275,8 +3287,8 @@ function useTranslation() {
|
|
|
3275
3287
|
const t = (text) => text[lang];
|
|
3276
3288
|
return { t, lang };
|
|
3277
3289
|
}
|
|
3278
|
-
function createTexts(
|
|
3279
|
-
return
|
|
3290
|
+
function createTexts(texts30) {
|
|
3291
|
+
return texts30;
|
|
3280
3292
|
}
|
|
3281
3293
|
|
|
3282
3294
|
// src/DdsProvider/DdsProvider.tsx
|
|
@@ -4056,7 +4068,8 @@ var texts = createTexts({
|
|
|
4056
4068
|
nb: "G\xE5 tilbake",
|
|
4057
4069
|
no: "G\xE5 tilbake",
|
|
4058
4070
|
nn: "G\xE5 tilbake",
|
|
4059
|
-
en: "Go back"
|
|
4071
|
+
en: "Go back",
|
|
4072
|
+
se: "Mana ruovttoluotta"
|
|
4060
4073
|
}
|
|
4061
4074
|
});
|
|
4062
4075
|
|
|
@@ -4127,25 +4140,29 @@ var commonTexts = createTexts({
|
|
|
4127
4140
|
no: "T\xF8m nedtrekksliste",
|
|
4128
4141
|
nb: "T\xF8m nedtrekksliste",
|
|
4129
4142
|
nn: "T\xF8m nedtrekksliste",
|
|
4130
|
-
en: "Clear selection"
|
|
4143
|
+
en: "Clear selection",
|
|
4144
|
+
se: "Gidde v\xE1lljemiid"
|
|
4131
4145
|
},
|
|
4132
4146
|
close: {
|
|
4133
4147
|
nb: "Lukk",
|
|
4134
4148
|
no: "Lukk",
|
|
4135
4149
|
nn: "Lukk",
|
|
4136
|
-
en: "Close"
|
|
4150
|
+
en: "Close",
|
|
4151
|
+
se: "Gidde"
|
|
4137
4152
|
},
|
|
4138
4153
|
closeMessage: {
|
|
4139
4154
|
nb: "Lukk melding",
|
|
4140
4155
|
no: "Lukk melding",
|
|
4141
4156
|
nn: "Lukk melding",
|
|
4142
|
-
en: "Close message"
|
|
4157
|
+
en: "Close message",
|
|
4158
|
+
se: "Gidde die\u0111u"
|
|
4143
4159
|
},
|
|
4144
4160
|
loading: {
|
|
4145
4161
|
nb: "Innlastning p\xE5g\xE5r",
|
|
4146
4162
|
no: "Innlastning p\xE5g\xE5r",
|
|
4147
4163
|
nn: "Innlastning p\xE5g\xE5r",
|
|
4148
|
-
en: "Loading"
|
|
4164
|
+
en: "Loading",
|
|
4165
|
+
se: "Vie\u017E\u017Eamin"
|
|
4149
4166
|
}
|
|
4150
4167
|
});
|
|
4151
4168
|
|
|
@@ -4231,8 +4248,8 @@ var Button = ({
|
|
|
4231
4248
|
iconPosition = "left",
|
|
4232
4249
|
href,
|
|
4233
4250
|
target,
|
|
4234
|
-
loading
|
|
4235
|
-
loadingTooltip
|
|
4251
|
+
loading,
|
|
4252
|
+
loadingTooltip,
|
|
4236
4253
|
fullWidth = false,
|
|
4237
4254
|
icon,
|
|
4238
4255
|
onClick,
|
|
@@ -4336,7 +4353,8 @@ var texts2 = createTexts({
|
|
|
4336
4353
|
no: "Lagring p\xE5g\xE5r",
|
|
4337
4354
|
nb: "Lagring p\xE5g\xE5r",
|
|
4338
4355
|
nn: "Lagring p\xE5g\xE5r",
|
|
4339
|
-
en: "Saving"
|
|
4356
|
+
en: "Saving",
|
|
4357
|
+
se: "Vurkemin"
|
|
4340
4358
|
}
|
|
4341
4359
|
});
|
|
4342
4360
|
|
|
@@ -4849,19 +4867,22 @@ var texts3 = createTexts({
|
|
|
4849
4867
|
nb: "Br\xF8dsmulesti",
|
|
4850
4868
|
no: "Br\xF8dsmulesti",
|
|
4851
4869
|
nn: "Br\xF8dsmulesti",
|
|
4852
|
-
en: "Breadcrumbs"
|
|
4870
|
+
en: "Breadcrumbs",
|
|
4871
|
+
se: "L\xE1ibemoallob\xE1lggis"
|
|
4853
4872
|
},
|
|
4854
4873
|
showHiddenTo: (to) => ({
|
|
4855
4874
|
nb: `Vis br\xF8dsmule 2 til ${to}`,
|
|
4856
4875
|
no: `Vis br\xF8dsmule 2 til ${to}`,
|
|
4857
4876
|
nn: `Vis br\xF8dsmule 2 til ${to}`,
|
|
4858
|
-
en: `Show breadcrumb 2 to ${to}
|
|
4877
|
+
en: `Show breadcrumb 2 to ${to}`,
|
|
4878
|
+
se: `\u010C\xE1jet l\xE1ibemoalu 2 ${to}`
|
|
4859
4879
|
}),
|
|
4860
4880
|
showHidden: {
|
|
4861
4881
|
nb: "Vis br\xF8dsmule 2",
|
|
4862
4882
|
no: "Vis br\xF8dsmule 2",
|
|
4863
4883
|
nn: "Vis br\xF8dsmule 2",
|
|
4864
|
-
en: "Show breadcrumb 2"
|
|
4884
|
+
en: "Show breadcrumb 2",
|
|
4885
|
+
se: "\u010C\xE1jet l\xE1ibemoalu 2"
|
|
4865
4886
|
}
|
|
4866
4887
|
});
|
|
4867
4888
|
|
|
@@ -5324,7 +5345,6 @@ function convertBooleanishToBoolean(value) {
|
|
|
5324
5345
|
// src/components/InputMessage/InputMessage.module.css
|
|
5325
5346
|
var InputMessage_default = {
|
|
5326
5347
|
container: "InputMessage_container",
|
|
5327
|
-
"container--error": "InputMessage_container--error",
|
|
5328
5348
|
icon: "InputMessage_icon"
|
|
5329
5349
|
};
|
|
5330
5350
|
|
|
@@ -5336,44 +5356,76 @@ var InputMessage = ({
|
|
|
5336
5356
|
id,
|
|
5337
5357
|
className,
|
|
5338
5358
|
htmlProps,
|
|
5359
|
+
children,
|
|
5339
5360
|
...rest
|
|
5340
5361
|
}) => {
|
|
5341
5362
|
const isError = messageType === "error";
|
|
5342
|
-
|
|
5343
|
-
"
|
|
5363
|
+
const commonProps = {
|
|
5364
|
+
display: "flex",
|
|
5365
|
+
width: "fit-content",
|
|
5366
|
+
maxWidth: "100%",
|
|
5367
|
+
wordBreak: "break-word",
|
|
5368
|
+
...getBaseHTMLProps(id, cn(className, InputMessage_default.container), htmlProps, rest)
|
|
5369
|
+
};
|
|
5370
|
+
const tgCommonProps = {
|
|
5371
|
+
as: "span",
|
|
5372
|
+
children: message != null ? message : children
|
|
5373
|
+
};
|
|
5374
|
+
return isError ? /* @__PURE__ */ (0, import_jsx_runtime213.jsxs)(
|
|
5375
|
+
Paper,
|
|
5344
5376
|
{
|
|
5345
|
-
...
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
),
|
|
5377
|
+
...commonProps,
|
|
5378
|
+
gap: "x0.25",
|
|
5379
|
+
padding: "x0.25 x0.5",
|
|
5380
|
+
background: "surface-danger-default",
|
|
5381
|
+
borderRadius: "surface",
|
|
5351
5382
|
children: [
|
|
5352
|
-
|
|
5383
|
+
/* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
5384
|
+
Icon,
|
|
5385
|
+
{
|
|
5386
|
+
icon: ErrorIcon,
|
|
5387
|
+
iconSize: "small",
|
|
5388
|
+
className: InputMessage_default.icon,
|
|
5389
|
+
color: "icon-on-danger-default"
|
|
5390
|
+
}
|
|
5391
|
+
),
|
|
5353
5392
|
/* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
5354
5393
|
Typography,
|
|
5355
5394
|
{
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
children: message
|
|
5395
|
+
...tgCommonProps,
|
|
5396
|
+
typographyType: "bodySmall",
|
|
5397
|
+
color: "textDefault"
|
|
5360
5398
|
}
|
|
5361
5399
|
)
|
|
5362
5400
|
]
|
|
5363
5401
|
}
|
|
5364
|
-
)
|
|
5402
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(Box, { ...commonProps, children: /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
5403
|
+
Typography,
|
|
5404
|
+
{
|
|
5405
|
+
...tgCommonProps,
|
|
5406
|
+
typographyType: "bodyXsmall",
|
|
5407
|
+
color: "textSubtle"
|
|
5408
|
+
}
|
|
5409
|
+
) });
|
|
5365
5410
|
};
|
|
5366
5411
|
InputMessage.displayName = "InputMessage";
|
|
5367
|
-
var renderInputMessage = (
|
|
5368
|
-
|
|
5412
|
+
var renderInputMessage = ({
|
|
5413
|
+
tip,
|
|
5414
|
+
tipId,
|
|
5415
|
+
errorMessage,
|
|
5416
|
+
errorMessageId,
|
|
5417
|
+
noSpacing
|
|
5418
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime213.jsxs)(import_jsx_runtime213.Fragment, { children: [
|
|
5419
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
5369
5420
|
InputMessage,
|
|
5370
5421
|
{
|
|
5371
5422
|
message: errorMessage,
|
|
5372
5423
|
messageType: "error",
|
|
5373
|
-
id: errorMessageId
|
|
5424
|
+
id: errorMessageId,
|
|
5425
|
+
marginBlock: !noSpacing ? "x0.125 0" : void 0
|
|
5374
5426
|
}
|
|
5375
5427
|
),
|
|
5376
|
-
tip &&
|
|
5428
|
+
tip && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(InputMessage, { message: tip, messageType: "tip", id: tipId })
|
|
5377
5429
|
] });
|
|
5378
5430
|
|
|
5379
5431
|
// src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
@@ -5425,7 +5477,7 @@ var CheckboxGroup = (props) => {
|
|
|
5425
5477
|
readOnly,
|
|
5426
5478
|
showRequiredStyling
|
|
5427
5479
|
}),
|
|
5428
|
-
renderInputMessage(tip, tipId),
|
|
5480
|
+
renderInputMessage({ tip, tipId }),
|
|
5429
5481
|
/* @__PURE__ */ (0, import_jsx_runtime214.jsx)(CheckboxGroupContext, { value: { ...contextProps }, children: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
|
|
5430
5482
|
"div",
|
|
5431
5483
|
{
|
|
@@ -5436,7 +5488,7 @@ var CheckboxGroup = (props) => {
|
|
|
5436
5488
|
children
|
|
5437
5489
|
}
|
|
5438
5490
|
) }),
|
|
5439
|
-
renderInputMessage(
|
|
5491
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5440
5492
|
]
|
|
5441
5493
|
}
|
|
5442
5494
|
);
|
|
@@ -5617,7 +5669,7 @@ var RadioButtonGroup = ({
|
|
|
5617
5669
|
readOnly,
|
|
5618
5670
|
showRequiredStyling
|
|
5619
5671
|
}),
|
|
5620
|
-
renderInputMessage(tip, tipId),
|
|
5672
|
+
renderInputMessage({ tip, tipId }),
|
|
5621
5673
|
/* @__PURE__ */ (0, import_jsx_runtime216.jsx)(RadioButtonGroupContext, { value: { ...contextProps }, children: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
5622
5674
|
"div",
|
|
5623
5675
|
{
|
|
@@ -5629,7 +5681,7 @@ var RadioButtonGroup = ({
|
|
|
5629
5681
|
children
|
|
5630
5682
|
}
|
|
5631
5683
|
) }),
|
|
5632
|
-
renderInputMessage(
|
|
5684
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5633
5685
|
]
|
|
5634
5686
|
}
|
|
5635
5687
|
);
|
|
@@ -5779,7 +5831,7 @@ var CardSelectableGroup = ({
|
|
|
5779
5831
|
);
|
|
5780
5832
|
return hasErrorMessage ? /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("div", { children: [
|
|
5781
5833
|
mainContent,
|
|
5782
|
-
renderInputMessage(
|
|
5834
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5783
5835
|
] }) : mainContent;
|
|
5784
5836
|
};
|
|
5785
5837
|
CardSelectableGroup.displayName = "CardSelectableGroup";
|
|
@@ -5840,7 +5892,8 @@ var texts4 = createTexts({
|
|
|
5840
5892
|
nb: "Fjern merkelapp",
|
|
5841
5893
|
no: "Fjern merkelapp",
|
|
5842
5894
|
nn: "Fjern merkelapp",
|
|
5843
|
-
en: "Remove chip"
|
|
5895
|
+
en: "Remove chip",
|
|
5896
|
+
se: "Sihku lihppu"
|
|
5844
5897
|
}
|
|
5845
5898
|
});
|
|
5846
5899
|
|
|
@@ -6001,7 +6054,8 @@ var texts5 = createTexts({
|
|
|
6001
6054
|
nb: "Utvid samtykke for bruk av informasjonskapsler",
|
|
6002
6055
|
no: "Utvid samtykke for bruk av informasjonskapsler",
|
|
6003
6056
|
nn: "Utvid samtykke for bruk av informasjonskapslar",
|
|
6004
|
-
en: "Expand consent for the use of cookies"
|
|
6057
|
+
en: "Expand consent for the use of cookies",
|
|
6058
|
+
se: "Viiddit mie\u0111\xE1husa diehto\u010Doahkuid geavaheapm\xE1i"
|
|
6005
6059
|
}
|
|
6006
6060
|
});
|
|
6007
6061
|
|
|
@@ -6035,9 +6089,8 @@ var DateInput_default = {
|
|
|
6035
6089
|
"segment__placeholder--invisible": "DateInput_segment__placeholder--invisible",
|
|
6036
6090
|
"clear-button": "DateInput_clear-button",
|
|
6037
6091
|
"clear-button--inactive": "DateInput_clear-button--inactive",
|
|
6038
|
-
icon: "DateInput_icon",
|
|
6039
|
-
"popover-button": "DateInput_popover-button",
|
|
6040
6092
|
"icon-wrapper--disabled": "DateInput_icon-wrapper--disabled",
|
|
6093
|
+
"popover-button": "DateInput_popover-button",
|
|
6041
6094
|
"icon-wrapper--readonly": "DateInput_icon-wrapper--readonly",
|
|
6042
6095
|
"popover-button--readonly": "DateInput_popover-button--readonly",
|
|
6043
6096
|
popover: "DateInput_popover",
|
|
@@ -6060,7 +6113,8 @@ var LOCALE = {
|
|
|
6060
6113
|
nb: "nb-NO",
|
|
6061
6114
|
no: "no-NO",
|
|
6062
6115
|
nn: "nn-NO",
|
|
6063
|
-
en: "en-GB"
|
|
6116
|
+
en: "en-GB",
|
|
6117
|
+
se: "se-NO"
|
|
6064
6118
|
};
|
|
6065
6119
|
var timezone = "Europe/Oslo";
|
|
6066
6120
|
|
|
@@ -6383,91 +6437,106 @@ var texts6 = createTexts({
|
|
|
6383
6437
|
nb: "Ukenummer",
|
|
6384
6438
|
no: "Ukenummer",
|
|
6385
6439
|
nn: "Vekenummer",
|
|
6386
|
-
en: "Week number"
|
|
6440
|
+
en: "Week number",
|
|
6441
|
+
se: "Vahkkonummir"
|
|
6387
6442
|
},
|
|
6388
6443
|
mo: {
|
|
6389
6444
|
nb: "Ma",
|
|
6390
6445
|
no: "Ma",
|
|
6391
6446
|
nn: "M\xE5",
|
|
6392
|
-
en: "Mo"
|
|
6447
|
+
en: "Mo",
|
|
6448
|
+
se: "Vuos"
|
|
6393
6449
|
},
|
|
6394
6450
|
tu: {
|
|
6395
6451
|
nb: "Ti",
|
|
6396
6452
|
no: "Ti",
|
|
6397
6453
|
nn: "Ty",
|
|
6398
|
-
en: "Tu"
|
|
6454
|
+
en: "Tu",
|
|
6455
|
+
se: "Ma\u014B"
|
|
6399
6456
|
},
|
|
6400
6457
|
we: {
|
|
6401
6458
|
nb: "On",
|
|
6402
6459
|
no: "On",
|
|
6403
6460
|
nn: "On",
|
|
6404
|
-
en: "We"
|
|
6461
|
+
en: "We",
|
|
6462
|
+
se: "Gask"
|
|
6405
6463
|
},
|
|
6406
6464
|
th: {
|
|
6407
6465
|
nb: "To",
|
|
6408
6466
|
no: "To",
|
|
6409
6467
|
nn: "To",
|
|
6410
|
-
en: "Th"
|
|
6468
|
+
en: "Th",
|
|
6469
|
+
se: "Duo"
|
|
6411
6470
|
},
|
|
6412
6471
|
fr: {
|
|
6413
6472
|
nb: "Fr",
|
|
6414
6473
|
no: "Fr",
|
|
6415
6474
|
nn: "Fr",
|
|
6416
|
-
en: "Fr"
|
|
6475
|
+
en: "Fr",
|
|
6476
|
+
se: "Bea"
|
|
6417
6477
|
},
|
|
6418
6478
|
sa: {
|
|
6419
6479
|
nb: "L\xF8",
|
|
6420
6480
|
no: "L\xF8",
|
|
6421
6481
|
nn: "La",
|
|
6422
|
-
en: "Sa"
|
|
6482
|
+
en: "Sa",
|
|
6483
|
+
se: "L\xE1v"
|
|
6423
6484
|
},
|
|
6424
6485
|
su: {
|
|
6425
6486
|
nb: "S\xF8",
|
|
6426
6487
|
no: "S\xF8",
|
|
6427
6488
|
nn: "Su",
|
|
6428
|
-
en: "Su"
|
|
6489
|
+
en: "Su",
|
|
6490
|
+
se: "Sotn"
|
|
6429
6491
|
},
|
|
6430
6492
|
monday: {
|
|
6431
6493
|
nb: "Mandag",
|
|
6432
6494
|
no: "Mandag",
|
|
6433
6495
|
nn: "M\xE5ndag",
|
|
6434
|
-
en: "Monday"
|
|
6496
|
+
en: "Monday",
|
|
6497
|
+
se: "Vuoss\xE1rga"
|
|
6435
6498
|
},
|
|
6436
6499
|
tuesday: {
|
|
6437
6500
|
nb: "Tirsdag",
|
|
6438
6501
|
no: "Tirsdag",
|
|
6439
6502
|
nn: "Tysdag",
|
|
6440
|
-
en: "Tuesday"
|
|
6503
|
+
en: "Tuesday",
|
|
6504
|
+
se: "Ma\u014B\u014Beb\xE1rga"
|
|
6441
6505
|
},
|
|
6442
6506
|
wednesday: {
|
|
6443
6507
|
nb: "Onsdag",
|
|
6444
6508
|
no: "Onsdag",
|
|
6445
6509
|
nn: "Onsdag",
|
|
6446
|
-
en: "Wednesday"
|
|
6510
|
+
en: "Wednesday",
|
|
6511
|
+
se: "Gaskavahkku"
|
|
6447
6512
|
},
|
|
6448
6513
|
thursday: {
|
|
6449
6514
|
nb: "Torsdag",
|
|
6450
6515
|
no: "Torsdag",
|
|
6451
6516
|
nn: "Torsdag",
|
|
6452
|
-
en: "Thursday"
|
|
6517
|
+
en: "Thursday",
|
|
6518
|
+
se: "Duorastat"
|
|
6453
6519
|
},
|
|
6454
6520
|
friday: {
|
|
6455
6521
|
nb: "Fredag",
|
|
6456
6522
|
no: "Fredag",
|
|
6457
6523
|
nn: "Fredag",
|
|
6458
|
-
en: "Friday"
|
|
6524
|
+
en: "Friday",
|
|
6525
|
+
se: "Bearjadat"
|
|
6459
6526
|
},
|
|
6460
6527
|
saturday: {
|
|
6461
6528
|
nb: "L\xF8rdag",
|
|
6462
6529
|
no: "L\xF8rdag",
|
|
6463
6530
|
nn: "Laurdag",
|
|
6464
|
-
en: "Saturday"
|
|
6531
|
+
en: "Saturday",
|
|
6532
|
+
se: "L\xE1vvardat"
|
|
6465
6533
|
},
|
|
6466
6534
|
sunday: {
|
|
6467
6535
|
nb: "S\xF8ndag",
|
|
6468
6536
|
no: "S\xF8ndag",
|
|
6469
6537
|
nn: "Sundag",
|
|
6470
|
-
en: "Sunday"
|
|
6538
|
+
en: "Sunday",
|
|
6539
|
+
se: "Sotnabeaivi"
|
|
6471
6540
|
}
|
|
6472
6541
|
});
|
|
6473
6542
|
|
|
@@ -6550,26 +6619,28 @@ var texts7 = createTexts({
|
|
|
6550
6619
|
nb: "Neste m\xE5ned",
|
|
6551
6620
|
no: "Neste m\xE5ned",
|
|
6552
6621
|
nn: "Neste m\xE5nad",
|
|
6553
|
-
en: "Next month"
|
|
6622
|
+
en: "Next month",
|
|
6623
|
+
se: "Boahte m\xE1nu"
|
|
6554
6624
|
},
|
|
6555
6625
|
previousMonth: {
|
|
6556
6626
|
nb: "Forrige m\xE5ned",
|
|
6557
6627
|
no: "Forrige m\xE5ned",
|
|
6558
6628
|
nn: "F\xF8rre m\xE5nad",
|
|
6559
|
-
en: "Previous month"
|
|
6629
|
+
en: "Previous month",
|
|
6630
|
+
se: "Ovddit m\xE1nu"
|
|
6560
6631
|
}
|
|
6561
6632
|
});
|
|
6562
6633
|
|
|
6563
6634
|
// src/components/date-inputs/DatePicker/DatePicker.tsx
|
|
6564
6635
|
var import_datepicker4 = require("@react-aria/datepicker");
|
|
6565
|
-
var
|
|
6636
|
+
var import_i18n17 = require("@react-aria/i18n");
|
|
6566
6637
|
var import_datepicker5 = require("@react-stately/datepicker");
|
|
6567
6638
|
var import_react47 = require("react");
|
|
6568
6639
|
|
|
6569
6640
|
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
6570
6641
|
var import_date5 = require("@internationalized/date");
|
|
6571
6642
|
var import_datepicker2 = require("@react-aria/datepicker");
|
|
6572
|
-
var
|
|
6643
|
+
var import_i18n15 = require("@react-aria/i18n");
|
|
6573
6644
|
var import_datepicker3 = require("@react-stately/datepicker");
|
|
6574
6645
|
var import_react45 = require("react");
|
|
6575
6646
|
|
|
@@ -6600,6 +6671,36 @@ var InlineIconButton = ({
|
|
|
6600
6671
|
);
|
|
6601
6672
|
InlineIconButton.displayName = "InlineIconButton";
|
|
6602
6673
|
|
|
6674
|
+
// src/components/helpers/Input/Input.module.css
|
|
6675
|
+
var Input_default = {
|
|
6676
|
+
container: "Input_container",
|
|
6677
|
+
"input-group": "Input_input-group",
|
|
6678
|
+
input: "Input_input",
|
|
6679
|
+
disabled: "Input_disabled",
|
|
6680
|
+
"read-only": "Input_read-only",
|
|
6681
|
+
"input--stateful": "Input_input--stateful",
|
|
6682
|
+
"input--hover": "Input_input--hover",
|
|
6683
|
+
"input--stateful-danger": "Input_input--stateful-danger",
|
|
6684
|
+
"input--large": "Input_input--large",
|
|
6685
|
+
"input--medium": "Input_input--medium",
|
|
6686
|
+
"input--small": "Input_input--small",
|
|
6687
|
+
"input--xsmall": "Input_input--xsmall",
|
|
6688
|
+
"input-with-icon--large": "Input_input-with-icon--large",
|
|
6689
|
+
"input-with-icon--medium": "Input_input-with-icon--medium",
|
|
6690
|
+
"input-with-icon--small": "Input_input-with-icon--small",
|
|
6691
|
+
"input-with-icon--xsmall": "Input_input-with-icon--xsmall",
|
|
6692
|
+
"input-with-el-right--large": "Input_input-with-el-right--large",
|
|
6693
|
+
"input-with-el-right--medium": "Input_input-with-el-right--medium",
|
|
6694
|
+
"input-with-el-right--small": "Input_input-with-el-right--small",
|
|
6695
|
+
"input-with-el-right--xsmall": "Input_input-with-el-right--xsmall",
|
|
6696
|
+
"input--with-affix": "Input_input--with-affix",
|
|
6697
|
+
"input-group__absolute-el": "Input_input-group__absolute-el",
|
|
6698
|
+
"input-group__absolute-el--large": "Input_input-group__absolute-el--large",
|
|
6699
|
+
"input-group__absolute-el--medium": "Input_input-group__absolute-el--medium",
|
|
6700
|
+
"input-group__absolute-el--small": "Input_input-group__absolute-el--small",
|
|
6701
|
+
"input-group__absolute-el--xsmall": "Input_input-group__absolute-el--xsmall"
|
|
6702
|
+
};
|
|
6703
|
+
|
|
6603
6704
|
// src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
|
|
6604
6705
|
var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
6605
6706
|
function CalendarButton({
|
|
@@ -6619,7 +6720,9 @@ function CalendarButton({
|
|
|
6619
6720
|
buttonProps.className,
|
|
6620
6721
|
DateInput_default["popover-button"],
|
|
6621
6722
|
isReadOnly && DateInput_default["popover-button--readonly"],
|
|
6622
|
-
!props.isDisabled && focusable
|
|
6723
|
+
!props.isDisabled && focusable,
|
|
6724
|
+
Input_default["input-group__absolute-el"],
|
|
6725
|
+
Input_default[`input-group__absolute-el--${componentSize}`]
|
|
6623
6726
|
),
|
|
6624
6727
|
icon: CalendarIcon,
|
|
6625
6728
|
size: getFormInputIconSize(componentSize)
|
|
@@ -6629,6 +6732,7 @@ function CalendarButton({
|
|
|
6629
6732
|
|
|
6630
6733
|
// src/components/date-inputs/DatePicker/DateField/DateField.utils.tsx
|
|
6631
6734
|
function formatDateFieldSegments(segments) {
|
|
6735
|
+
const { t } = useTranslation();
|
|
6632
6736
|
const daySegment = segments.find((segment) => segment.type === "day");
|
|
6633
6737
|
const monthSegment = segments.find((segment) => segment.type === "month");
|
|
6634
6738
|
const yearSegment = segments.find((segment) => segment.type === "year");
|
|
@@ -6639,16 +6743,16 @@ function formatDateFieldSegments(segments) {
|
|
|
6639
6743
|
const formattedDaySegment = {
|
|
6640
6744
|
...daySegment,
|
|
6641
6745
|
text: daySegment.text.padStart(2, "0"),
|
|
6642
|
-
placeholder:
|
|
6746
|
+
placeholder: t(texts8.dayPlaceholder)
|
|
6643
6747
|
};
|
|
6644
6748
|
const formattedMonthSegment = {
|
|
6645
6749
|
...monthSegment,
|
|
6646
6750
|
text: monthSegment.text.padStart(2, "0"),
|
|
6647
|
-
placeholder:
|
|
6751
|
+
placeholder: t(texts8.monthPlaceholder)
|
|
6648
6752
|
};
|
|
6649
6753
|
const formattedYearSegment = {
|
|
6650
6754
|
...yearSegment,
|
|
6651
|
-
placeholder:
|
|
6755
|
+
placeholder: t(texts8.yearPlaceholder)
|
|
6652
6756
|
};
|
|
6653
6757
|
const formattedSeparatorSegment = { ...separatorSegment, text: "." };
|
|
6654
6758
|
return [
|
|
@@ -6659,6 +6763,29 @@ function formatDateFieldSegments(segments) {
|
|
|
6659
6763
|
formattedYearSegment
|
|
6660
6764
|
];
|
|
6661
6765
|
}
|
|
6766
|
+
var texts8 = createTexts({
|
|
6767
|
+
dayPlaceholder: {
|
|
6768
|
+
nb: "dd",
|
|
6769
|
+
no: "dd",
|
|
6770
|
+
nn: "dd",
|
|
6771
|
+
en: "dd",
|
|
6772
|
+
se: "jj"
|
|
6773
|
+
},
|
|
6774
|
+
monthPlaceholder: {
|
|
6775
|
+
nb: "mm",
|
|
6776
|
+
no: "mm",
|
|
6777
|
+
nn: "mm",
|
|
6778
|
+
en: "mm",
|
|
6779
|
+
se: "mm"
|
|
6780
|
+
},
|
|
6781
|
+
yearPlaceholder: {
|
|
6782
|
+
nb: "\xE5\xE5\xE5\xE5",
|
|
6783
|
+
no: "\xE5\xE5\xE5\xE5",
|
|
6784
|
+
nn: "\xE5\xE5\xE5\xE5",
|
|
6785
|
+
en: "yyyy",
|
|
6786
|
+
se: "jjjj"
|
|
6787
|
+
}
|
|
6788
|
+
});
|
|
6662
6789
|
|
|
6663
6790
|
// src/components/date-inputs/DatePicker/DateField/DateSegment.tsx
|
|
6664
6791
|
var import_datepicker = require("@react-aria/datepicker");
|
|
@@ -6672,7 +6799,9 @@ var typographyTypes = {
|
|
|
6672
6799
|
function DateSegment({
|
|
6673
6800
|
segment,
|
|
6674
6801
|
state,
|
|
6675
|
-
componentSize
|
|
6802
|
+
componentSize,
|
|
6803
|
+
errorMessageId,
|
|
6804
|
+
tipId
|
|
6676
6805
|
}) {
|
|
6677
6806
|
const ref = (0, import_react43.useRef)(null);
|
|
6678
6807
|
const { segmentProps } = (0, import_datepicker.useDateSegment)(segment, state, ref);
|
|
@@ -6680,6 +6809,10 @@ function DateSegment({
|
|
|
6680
6809
|
"div",
|
|
6681
6810
|
{
|
|
6682
6811
|
...segmentProps,
|
|
6812
|
+
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
6813
|
+
errorMessageId ? errorMessageId : void 0,
|
|
6814
|
+
tipId ? tipId : void 0
|
|
6815
|
+
]),
|
|
6683
6816
|
ref,
|
|
6684
6817
|
className: cn(
|
|
6685
6818
|
segmentProps.className,
|
|
@@ -6730,23 +6863,6 @@ ClearButton.displayName = "ClearButton";
|
|
|
6730
6863
|
// src/components/date-inputs/common/DateInput.tsx
|
|
6731
6864
|
var import_react44 = require("react");
|
|
6732
6865
|
|
|
6733
|
-
// src/components/helpers/Input/Input.module.css
|
|
6734
|
-
var Input_default = {
|
|
6735
|
-
container: "Input_container",
|
|
6736
|
-
"input-group": "Input_input-group",
|
|
6737
|
-
input: "Input_input",
|
|
6738
|
-
disabled: "Input_disabled",
|
|
6739
|
-
"read-only": "Input_read-only",
|
|
6740
|
-
"input--stateful": "Input_input--stateful",
|
|
6741
|
-
"input--hover": "Input_input--hover",
|
|
6742
|
-
"input--stateful-danger": "Input_input--stateful-danger",
|
|
6743
|
-
"input--medium": "Input_input--medium",
|
|
6744
|
-
"input--small": "Input_input--small",
|
|
6745
|
-
"input--xsmall": "Input_input--xsmall",
|
|
6746
|
-
"input--with-affix": "Input_input--with-affix",
|
|
6747
|
-
"input-group__absolute-element": "Input_input-group__absolute-element"
|
|
6748
|
-
};
|
|
6749
|
-
|
|
6750
6866
|
// src/components/helpers/Input/Input.tsx
|
|
6751
6867
|
var import_jsx_runtime233 = require("react/jsx-runtime");
|
|
6752
6868
|
var Input = ({
|
|
@@ -6830,12 +6946,11 @@ function DateInput({
|
|
|
6830
6946
|
clearable,
|
|
6831
6947
|
ref,
|
|
6832
6948
|
afterLabelContent,
|
|
6949
|
+
tipId,
|
|
6950
|
+
errorMessageId,
|
|
6833
6951
|
...props
|
|
6834
6952
|
}) {
|
|
6835
|
-
var _a;
|
|
6836
6953
|
const hasErrorMessage = !!errorMessage;
|
|
6837
|
-
const hasTip = !!tip;
|
|
6838
|
-
const hasMessage = hasErrorMessage || hasTip;
|
|
6839
6954
|
const { isOpen } = (0, import_react44.useContext)(CalendarPopoverContext);
|
|
6840
6955
|
return /* @__PURE__ */ (0, import_jsx_runtime235.jsxs)(
|
|
6841
6956
|
"div",
|
|
@@ -6861,6 +6976,7 @@ function DateInput({
|
|
|
6861
6976
|
Input_default["input--stateful"],
|
|
6862
6977
|
Input_default["input--hover"],
|
|
6863
6978
|
Input_default[`input--${componentSize}`],
|
|
6979
|
+
Input_default[`input-with-icon--${componentSize}`],
|
|
6864
6980
|
hasErrorMessage && Input_default["input--stateful-danger"],
|
|
6865
6981
|
DateInput_default["date-input"],
|
|
6866
6982
|
clearable && DateInput_default[`date-input--${componentSize}--clearable`],
|
|
@@ -6887,13 +7003,7 @@ function DateInput({
|
|
|
6887
7003
|
]
|
|
6888
7004
|
}
|
|
6889
7005
|
),
|
|
6890
|
-
|
|
6891
|
-
InputMessage,
|
|
6892
|
-
{
|
|
6893
|
-
messageType: hasErrorMessage ? "error" : "tip",
|
|
6894
|
-
message: (_a = errorMessage != null ? errorMessage : tip) != null ? _a : ""
|
|
6895
|
-
}
|
|
6896
|
-
)
|
|
7006
|
+
renderInputMessage({ tip, errorMessage, tipId, errorMessageId })
|
|
6897
7007
|
]
|
|
6898
7008
|
}
|
|
6899
7009
|
);
|
|
@@ -6908,9 +7018,11 @@ function DateField({
|
|
|
6908
7018
|
groupProps,
|
|
6909
7019
|
ref,
|
|
6910
7020
|
clearable,
|
|
7021
|
+
errorMessageId,
|
|
7022
|
+
tipId,
|
|
6911
7023
|
...props
|
|
6912
7024
|
}) {
|
|
6913
|
-
const { locale } = (0,
|
|
7025
|
+
const { locale } = (0, import_i18n15.useLocale)();
|
|
6914
7026
|
const { t } = useTranslation();
|
|
6915
7027
|
const state = (0, import_datepicker3.useDateFieldState)({
|
|
6916
7028
|
...props,
|
|
@@ -6941,6 +7053,8 @@ function DateField({
|
|
|
6941
7053
|
required: props.isRequired,
|
|
6942
7054
|
clearable,
|
|
6943
7055
|
ref,
|
|
7056
|
+
tipId,
|
|
7057
|
+
errorMessageId,
|
|
6944
7058
|
internalRef,
|
|
6945
7059
|
readOnly: props.isReadOnly,
|
|
6946
7060
|
prefix: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
|
|
@@ -6956,7 +7070,7 @@ function DateField({
|
|
|
6956
7070
|
ClearButton,
|
|
6957
7071
|
{
|
|
6958
7072
|
absolute: false,
|
|
6959
|
-
"aria-label": t(
|
|
7073
|
+
"aria-label": t(texts9.clearDate),
|
|
6960
7074
|
"aria-hidden": !hasValue,
|
|
6961
7075
|
className: cn(
|
|
6962
7076
|
DateInput_default["clear-button"],
|
|
@@ -6973,6 +7087,8 @@ function DateField({
|
|
|
6973
7087
|
{
|
|
6974
7088
|
"aria-readonly": props.isReadOnly,
|
|
6975
7089
|
componentSize,
|
|
7090
|
+
errorMessageId,
|
|
7091
|
+
tipId,
|
|
6976
7092
|
segment,
|
|
6977
7093
|
state
|
|
6978
7094
|
},
|
|
@@ -6982,12 +7098,13 @@ function DateField({
|
|
|
6982
7098
|
);
|
|
6983
7099
|
}
|
|
6984
7100
|
DateField.displayName = "DateField";
|
|
6985
|
-
var
|
|
7101
|
+
var texts9 = createTexts({
|
|
6986
7102
|
clearDate: {
|
|
6987
7103
|
en: "Clear date",
|
|
6988
7104
|
nb: "T\xF8m dato",
|
|
6989
7105
|
no: "T\xF8m dato",
|
|
6990
|
-
nn: "T\xF8m dato"
|
|
7106
|
+
nn: "T\xF8m dato",
|
|
7107
|
+
se: "Gurre d\xE1htona"
|
|
6991
7108
|
}
|
|
6992
7109
|
});
|
|
6993
7110
|
|
|
@@ -7029,6 +7146,7 @@ function DatePicker({
|
|
|
7029
7146
|
ref,
|
|
7030
7147
|
...props
|
|
7031
7148
|
}) {
|
|
7149
|
+
var _a;
|
|
7032
7150
|
const lang = useLanguage();
|
|
7033
7151
|
if (!lang) {
|
|
7034
7152
|
throw new Error("DatePicker must be used within a DdsProvider");
|
|
@@ -7042,7 +7160,12 @@ function DatePicker({
|
|
|
7042
7160
|
state,
|
|
7043
7161
|
internalRef
|
|
7044
7162
|
);
|
|
7045
|
-
|
|
7163
|
+
const hasErrorMessage = !!errorMessage;
|
|
7164
|
+
const hasTip = !!tip;
|
|
7165
|
+
const uniqueId = (_a = props.id) != null ? _a : (0, import_react47.useId)();
|
|
7166
|
+
const errorMessageId = hasErrorMessage ? `${uniqueId}-errorMessage` : void 0;
|
|
7167
|
+
const tipId = hasTip ? `${uniqueId}-tip` : void 0;
|
|
7168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(import_i18n17.I18nProvider, { locale: LOCALE[lang], children: /* @__PURE__ */ (0, import_jsx_runtime237.jsxs)(
|
|
7046
7169
|
CalendarPopover,
|
|
7047
7170
|
{
|
|
7048
7171
|
isOpen: state.isOpen,
|
|
@@ -7057,8 +7180,11 @@ function DatePicker({
|
|
|
7057
7180
|
ref: combinedRef,
|
|
7058
7181
|
componentSize,
|
|
7059
7182
|
tip,
|
|
7183
|
+
id: uniqueId,
|
|
7060
7184
|
label: props.label,
|
|
7061
7185
|
errorMessage,
|
|
7186
|
+
errorMessageId,
|
|
7187
|
+
tipId,
|
|
7062
7188
|
buttonProps,
|
|
7063
7189
|
style,
|
|
7064
7190
|
width,
|
|
@@ -7113,6 +7239,7 @@ function TimePicker({
|
|
|
7113
7239
|
ref,
|
|
7114
7240
|
...props
|
|
7115
7241
|
}) {
|
|
7242
|
+
var _a;
|
|
7116
7243
|
const lang = useLanguage();
|
|
7117
7244
|
if (!lang) {
|
|
7118
7245
|
throw new Error("TimePicker must be used within a DdsProvider");
|
|
@@ -7127,6 +7254,11 @@ function TimePicker({
|
|
|
7127
7254
|
state,
|
|
7128
7255
|
internalRef
|
|
7129
7256
|
);
|
|
7257
|
+
const hasErrorMessage = !!props.errorMessage;
|
|
7258
|
+
const hasTip = !!props.tip;
|
|
7259
|
+
const uniqueId = (_a = props.id) != null ? _a : (0, import_react48.useId)();
|
|
7260
|
+
const errorMessageId = hasErrorMessage ? `${uniqueId}-errorMessage` : void 0;
|
|
7261
|
+
const tipId = hasTip ? `${uniqueId}-tip` : void 0;
|
|
7130
7262
|
const iconSize = componentSize === "xsmall" ? "small" : "medium";
|
|
7131
7263
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
7132
7264
|
const formattedSegments = formatTimeSegments(state.segments);
|
|
@@ -7134,6 +7266,8 @@ function TimePicker({
|
|
|
7134
7266
|
DateInput,
|
|
7135
7267
|
{
|
|
7136
7268
|
...props,
|
|
7269
|
+
errorMessageId,
|
|
7270
|
+
tipId,
|
|
7137
7271
|
width,
|
|
7138
7272
|
disabled,
|
|
7139
7273
|
required: props.isRequired,
|
|
@@ -7149,7 +7283,8 @@ function TimePicker({
|
|
|
7149
7283
|
icon: TimeIcon,
|
|
7150
7284
|
iconSize,
|
|
7151
7285
|
className: cn(
|
|
7152
|
-
|
|
7286
|
+
Input_default["input-group__absolute-el"],
|
|
7287
|
+
Input_default[`input-group__absolute-el--${componentSize}`],
|
|
7153
7288
|
disabled && DateInput_default["icon-wrapper--disabled"],
|
|
7154
7289
|
props.isReadOnly && DateInput_default["icon-wrapper--readonly"]
|
|
7155
7290
|
)
|
|
@@ -7158,6 +7293,8 @@ function TimePicker({
|
|
|
7158
7293
|
children: formattedSegments.map((segment, i) => /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
7159
7294
|
DateSegment,
|
|
7160
7295
|
{
|
|
7296
|
+
errorMessageId,
|
|
7297
|
+
tipId,
|
|
7161
7298
|
componentSize,
|
|
7162
7299
|
segment,
|
|
7163
7300
|
state
|
|
@@ -7698,7 +7835,7 @@ var FavStar = ({
|
|
|
7698
7835
|
checked,
|
|
7699
7836
|
onChange: (e) => setChecked(e.target.checked),
|
|
7700
7837
|
type: "checkbox",
|
|
7701
|
-
"aria-label": (_a = props["aria-label"]) != null ? _a : t(
|
|
7838
|
+
"aria-label": (_a = props["aria-label"]) != null ? _a : t(texts10.favourite)
|
|
7702
7839
|
}
|
|
7703
7840
|
),
|
|
7704
7841
|
/* @__PURE__ */ (0, import_jsx_runtime250.jsx)(Icon, { iconSize: size2, icon: StarIcon, className: FavStar_default.icon }),
|
|
@@ -7715,12 +7852,13 @@ var FavStar = ({
|
|
|
7715
7852
|
);
|
|
7716
7853
|
};
|
|
7717
7854
|
FavStar.displayName = "FavStar";
|
|
7718
|
-
var
|
|
7855
|
+
var texts10 = createTexts({
|
|
7719
7856
|
favourite: {
|
|
7720
7857
|
nb: "Stjernemarker",
|
|
7721
7858
|
no: "Stjernemarker",
|
|
7722
7859
|
nn: "Stjernemerk",
|
|
7723
|
-
en: "Mark as favourite"
|
|
7860
|
+
en: "Mark as favourite",
|
|
7861
|
+
se: "Merke favorihta"
|
|
7724
7862
|
}
|
|
7725
7863
|
});
|
|
7726
7864
|
|
|
@@ -7775,7 +7913,7 @@ function CharCounter(props) {
|
|
|
7775
7913
|
"/",
|
|
7776
7914
|
max
|
|
7777
7915
|
] }),
|
|
7778
|
-
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(VisuallyHidden, { children: t(
|
|
7916
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(VisuallyHidden, { children: t(texts11.charsWritten(current, max, max - current)) })
|
|
7779
7917
|
]
|
|
7780
7918
|
}
|
|
7781
7919
|
);
|
|
@@ -7784,12 +7922,13 @@ var renderCharCounter = (id, isShown, textLength, maxLength) => {
|
|
|
7784
7922
|
if (!!maxLength && Number.isInteger(maxLength) && maxLength > 0 && isShown)
|
|
7785
7923
|
return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(CharCounter, { id, max: maxLength, current: textLength });
|
|
7786
7924
|
};
|
|
7787
|
-
var
|
|
7925
|
+
var texts11 = createTexts({
|
|
7788
7926
|
charsWritten: (current, max, remain) => ({
|
|
7789
7927
|
nb: `${current} av ${max} tegn skrevet. ${remain} igjen.`,
|
|
7790
7928
|
no: `${current} av ${max} tegn skrevet. ${remain} igjen.`,
|
|
7791
7929
|
nn: `${current} av ${max} teikn skrivne. ${remain} att.`,
|
|
7792
|
-
en: `${current} of ${max} characters used. ${remain} remaining
|
|
7930
|
+
en: `${current} of ${max} characters used. ${remain} remaining.`,
|
|
7931
|
+
se: `${current} ${max} mearkabust\xE1va leat ${max} \u010D\xE1llon ${remain}.`
|
|
7793
7932
|
})
|
|
7794
7933
|
});
|
|
7795
7934
|
|
|
@@ -7885,7 +8024,7 @@ var TextArea = ({
|
|
|
7885
8024
|
justifyContent: withCharacterCounter ? hasMessage ? "space-between" : "flex-end" : void 0,
|
|
7886
8025
|
width: withCharacterCounter ? inputWidth : void 0,
|
|
7887
8026
|
children: [
|
|
7888
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId),
|
|
8027
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId }),
|
|
7889
8028
|
renderCharCounter(
|
|
7890
8029
|
characterCounterId,
|
|
7891
8030
|
withCharacterCounter,
|
|
@@ -7948,17 +8087,18 @@ var CommentComponent = ({
|
|
|
7948
8087
|
size: "small",
|
|
7949
8088
|
onClick: handleSubmit,
|
|
7950
8089
|
loading,
|
|
7951
|
-
children: t(
|
|
8090
|
+
children: t(texts12.send)
|
|
7952
8091
|
}
|
|
7953
8092
|
)
|
|
7954
8093
|
] });
|
|
7955
8094
|
};
|
|
7956
|
-
var
|
|
8095
|
+
var texts12 = createTexts({
|
|
7957
8096
|
send: {
|
|
7958
8097
|
nb: "Send inn",
|
|
7959
8098
|
no: "Send inn",
|
|
7960
8099
|
nn: "Send inn",
|
|
7961
|
-
en: "Send"
|
|
8100
|
+
en: "Send",
|
|
8101
|
+
se: "S\xE1dde"
|
|
7962
8102
|
}
|
|
7963
8103
|
});
|
|
7964
8104
|
|
|
@@ -8154,7 +8294,7 @@ var RatingComponent = ({
|
|
|
8154
8294
|
),
|
|
8155
8295
|
children: [
|
|
8156
8296
|
/* @__PURE__ */ (0, import_jsx_runtime255.jsx)("h2", { className: typographyStyles_default["label-medium"], children: ratingLabel }),
|
|
8157
|
-
loading ? /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(Spinner, { tooltip: t(
|
|
8297
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(Spinner, { tooltip: t(texts13.uploadingFeedback) }) : /* @__PURE__ */ (0, import_jsx_runtime255.jsxs)(HStack, { gap: "x1", children: [
|
|
8158
8298
|
/* @__PURE__ */ (0, import_jsx_runtime255.jsx)(Tooltip, { text: thumbUpTooltip, children: button("positive", layout, thumbUpTooltip) }),
|
|
8159
8299
|
/* @__PURE__ */ (0, import_jsx_runtime255.jsx)(Tooltip, { text: thumbDownTooltip, children: /* @__PURE__ */ (0, import_jsx_runtime255.jsx)("div", { children: button("negative", layout, thumbDownTooltip) }) })
|
|
8160
8300
|
] })
|
|
@@ -8162,12 +8302,13 @@ var RatingComponent = ({
|
|
|
8162
8302
|
}
|
|
8163
8303
|
);
|
|
8164
8304
|
};
|
|
8165
|
-
var
|
|
8305
|
+
var texts13 = createTexts({
|
|
8166
8306
|
uploadingFeedback: {
|
|
8167
8307
|
nb: "Laster opp tilbakemelding...",
|
|
8168
8308
|
no: "Laster opp tilbakemelding...",
|
|
8169
8309
|
nn: "Lastar opp tilbakemelding...",
|
|
8170
|
-
en: "Uploading feedback..."
|
|
8310
|
+
en: "Uploading feedback...",
|
|
8311
|
+
se: "Vie\u017E\u017Eamin ruovttoluottadie\u0111uid..."
|
|
8171
8312
|
}
|
|
8172
8313
|
});
|
|
8173
8314
|
|
|
@@ -8196,14 +8337,14 @@ var Feedback = ({
|
|
|
8196
8337
|
const [rating, setRating] = (0, import_react57.useState)(null);
|
|
8197
8338
|
const [feedbackText, setFeedbackText] = (0, import_react57.useState)();
|
|
8198
8339
|
const [isFeedbackSubmitted, setIsFeedbackSubmitted] = (0, import_react57.useState)(false);
|
|
8199
|
-
const tRatingLabel = ratingLabel != null ? ratingLabel : t(
|
|
8200
|
-
const tPositiveFeedbackLabel = positiveFeedbackLabel != null ? positiveFeedbackLabel : t(
|
|
8201
|
-
const tNegativeFeedbackLabel = negativeFeedbackLabel != null ? negativeFeedbackLabel : t(
|
|
8202
|
-
const tRatingSubmittedTitle = ratingSubmittedTitle != null ? ratingSubmittedTitle : t(
|
|
8203
|
-
const tSubmittedTitle = submittedTitle != null ? submittedTitle : t(
|
|
8204
|
-
const tTextAreaTip = textAreaTip != null ? textAreaTip : t(
|
|
8205
|
-
const tThumbUpTooltip = thumbUpTooltip != null ? thumbUpTooltip : t(
|
|
8206
|
-
const tThumbDownTooltip = thumbDownTooltip != null ? thumbDownTooltip : t(
|
|
8340
|
+
const tRatingLabel = ratingLabel != null ? ratingLabel : t(texts14.ratingQuestion);
|
|
8341
|
+
const tPositiveFeedbackLabel = positiveFeedbackLabel != null ? positiveFeedbackLabel : t(texts14.improvalQuestion);
|
|
8342
|
+
const tNegativeFeedbackLabel = negativeFeedbackLabel != null ? negativeFeedbackLabel : t(texts14.improvalQuestion);
|
|
8343
|
+
const tRatingSubmittedTitle = ratingSubmittedTitle != null ? ratingSubmittedTitle : t(texts14.thanks);
|
|
8344
|
+
const tSubmittedTitle = submittedTitle != null ? submittedTitle : t(texts14.thanks);
|
|
8345
|
+
const tTextAreaTip = textAreaTip != null ? textAreaTip : t(texts14.sensitiveInfo);
|
|
8346
|
+
const tThumbUpTooltip = thumbUpTooltip != null ? thumbUpTooltip : t(texts14.good);
|
|
8347
|
+
const tThumbDownTooltip = thumbDownTooltip != null ? thumbDownTooltip : t(texts14.bad);
|
|
8207
8348
|
(0, import_react57.useEffect)(() => {
|
|
8208
8349
|
if (ratingProp !== void 0) setRating(ratingProp);
|
|
8209
8350
|
}, [ratingProp]);
|
|
@@ -8258,42 +8399,48 @@ var Feedback = ({
|
|
|
8258
8399
|
}
|
|
8259
8400
|
return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(Paragraph, { children: tSubmittedTitle });
|
|
8260
8401
|
};
|
|
8261
|
-
var
|
|
8402
|
+
var texts14 = createTexts({
|
|
8262
8403
|
ratingQuestion: {
|
|
8263
8404
|
nb: "Hva syns du om tjenesten?",
|
|
8264
8405
|
no: "Hva syns du om tjenesten?",
|
|
8265
8406
|
nn: "Kva synest du om tenesta?",
|
|
8266
|
-
en: "What do you think about the service?"
|
|
8407
|
+
en: "What do you think about the service?",
|
|
8408
|
+
se: "Maid oaivvildat b\xE1lvalusa birra?"
|
|
8267
8409
|
},
|
|
8268
8410
|
improvalQuestion: {
|
|
8269
8411
|
nb: "Hva kan vi forbedre? (valgfritt)",
|
|
8270
8412
|
no: "Hva kan vi forbedre? (valgfritt)",
|
|
8271
8413
|
nn: "Kva kan vi forbetre? (valfritt)",
|
|
8272
|
-
en: "What can we improve? (optional)"
|
|
8414
|
+
en: "What can we improve? (optional)",
|
|
8415
|
+
se: "Maid s\xE1httit buoridit? (eavttola\u0161)"
|
|
8273
8416
|
},
|
|
8274
8417
|
thanks: {
|
|
8275
8418
|
nb: "Tusen takk! Tilbakemeldingen din hjelper oss \xE5 forbedre l\xF8sningen",
|
|
8276
8419
|
no: "Tusen takk! Tilbakemeldingen din hjelper oss \xE5 forbedre l\xF8sningen",
|
|
8277
8420
|
nn: "Tusen takk! Tilbakemeldinga di hjelper oss \xE5 forbetre l\xF8ysinga",
|
|
8278
|
-
en: "Thank you! Your feedback helps us improve the service"
|
|
8421
|
+
en: "Thank you! Your feedback helps us improve the service",
|
|
8422
|
+
se: "Giitu! Du m\xE1hcahat veahkeha min buoridit \u010Dovdosa"
|
|
8279
8423
|
},
|
|
8280
8424
|
sensitiveInfo: {
|
|
8281
8425
|
nb: "Ikke send inn personopplysninger eller annen sensitiv informasjon",
|
|
8282
8426
|
no: "Ikke send inn personopplysninger eller annen sensitiv informasjon",
|
|
8283
8427
|
nn: "Ikkje send inn personopplysningar eller annan sensitiv informasjon",
|
|
8284
|
-
en: "Do not submit personal data or other sensitive information"
|
|
8428
|
+
en: "Do not submit personal data or other sensitive information",
|
|
8429
|
+
se: "Ale s\xE1dde persuvdnadie\u0111uid dahje ear\xE1 sensitiiva die\u0111uid"
|
|
8285
8430
|
},
|
|
8286
8431
|
good: {
|
|
8287
8432
|
nb: "Bra",
|
|
8288
8433
|
no: "Bra",
|
|
8289
8434
|
nn: "Bra",
|
|
8290
|
-
en: "Good"
|
|
8435
|
+
en: "Good",
|
|
8436
|
+
se: "Buorre"
|
|
8291
8437
|
},
|
|
8292
8438
|
bad: {
|
|
8293
8439
|
nb: "D\xE5rlig",
|
|
8294
8440
|
no: "D\xE5rlig",
|
|
8295
8441
|
nn: "D\xE5rleg",
|
|
8296
|
-
en: "Bad"
|
|
8442
|
+
en: "Bad",
|
|
8443
|
+
se: "Heajos"
|
|
8297
8444
|
}
|
|
8298
8445
|
});
|
|
8299
8446
|
|
|
@@ -8336,14 +8483,10 @@ var ErrorList = (props) => {
|
|
|
8336
8483
|
return null;
|
|
8337
8484
|
}
|
|
8338
8485
|
if (errors.length === 1) {
|
|
8339
|
-
return
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
message: errors[0].message,
|
|
8344
|
-
messageType: "error"
|
|
8345
|
-
}
|
|
8346
|
-
);
|
|
8486
|
+
return renderInputMessage({
|
|
8487
|
+
errorMessage: errors[0].message,
|
|
8488
|
+
errorMessageId: errors[0].id
|
|
8489
|
+
});
|
|
8347
8490
|
}
|
|
8348
8491
|
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StylelessList, { children: errors.map(({ id, message }) => {
|
|
8349
8492
|
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
|
|
@@ -8428,9 +8571,9 @@ var File = (props) => {
|
|
|
8428
8571
|
onClick: removeFile,
|
|
8429
8572
|
icon: CloseIcon,
|
|
8430
8573
|
htmlProps: {
|
|
8431
|
-
"aria-label": t(
|
|
8574
|
+
"aria-label": t(texts15.removeFile(stateFile.file.name)),
|
|
8432
8575
|
"aria-invalid": !isValid ? true : void 0,
|
|
8433
|
-
"aria-errormessage": !isValid ? t(
|
|
8576
|
+
"aria-errormessage": !isValid ? t(texts15.invalidFile) : void 0,
|
|
8434
8577
|
"aria-describedby": spaceSeparatedIdListGenerator(
|
|
8435
8578
|
errorsList.map((e) => e.id)
|
|
8436
8579
|
)
|
|
@@ -8444,18 +8587,20 @@ var File = (props) => {
|
|
|
8444
8587
|
/* @__PURE__ */ (0, import_jsx_runtime260.jsx)(ErrorList, { errors: errorsList })
|
|
8445
8588
|
] });
|
|
8446
8589
|
};
|
|
8447
|
-
var
|
|
8590
|
+
var texts15 = createTexts({
|
|
8448
8591
|
removeFile: (file) => ({
|
|
8449
8592
|
nb: `Fjern fil ${file}`,
|
|
8450
8593
|
no: `Fjern fil ${file}`,
|
|
8451
8594
|
nn: `Fjern fil ${file}`,
|
|
8452
|
-
en: `Remove file ${file}
|
|
8595
|
+
en: `Remove file ${file}`,
|
|
8596
|
+
se: `Sihku filla ${file}`
|
|
8453
8597
|
}),
|
|
8454
8598
|
invalidFile: {
|
|
8455
8599
|
nb: "Ugyldig fil",
|
|
8456
8600
|
no: "Ugyldig fil",
|
|
8457
8601
|
nn: "Ugyldig fil",
|
|
8458
|
-
en: "Invalid file"
|
|
8602
|
+
en: "Invalid file",
|
|
8603
|
+
se: "F\xE1mohis fiila"
|
|
8459
8604
|
}
|
|
8460
8605
|
});
|
|
8461
8606
|
|
|
@@ -8578,7 +8723,7 @@ var useFileUploader = (props) => {
|
|
|
8578
8723
|
isFileDialogActive: false,
|
|
8579
8724
|
isDragActive: false,
|
|
8580
8725
|
rootErrors: calcRootErrors(
|
|
8581
|
-
t(
|
|
8726
|
+
t(texts16.invalidFileAmount),
|
|
8582
8727
|
initialFileUploaderFiles,
|
|
8583
8728
|
maxFiles,
|
|
8584
8729
|
errorMessage
|
|
@@ -8591,7 +8736,7 @@ var useFileUploader = (props) => {
|
|
|
8591
8736
|
const accepted = isFileAccepted(file, accept);
|
|
8592
8737
|
return {
|
|
8593
8738
|
file,
|
|
8594
|
-
errors: accepted ? [] : [t(
|
|
8739
|
+
errors: accepted ? [] : [t(texts16.invalidFileType)]
|
|
8595
8740
|
};
|
|
8596
8741
|
});
|
|
8597
8742
|
dispatch({
|
|
@@ -8604,7 +8749,7 @@ var useFileUploader = (props) => {
|
|
|
8604
8749
|
dispatch({
|
|
8605
8750
|
type: "setRootErrors",
|
|
8606
8751
|
payload: calcRootErrors(
|
|
8607
|
-
t(
|
|
8752
|
+
t(texts16.invalidFileAmount),
|
|
8608
8753
|
stateFiles,
|
|
8609
8754
|
maxFiles,
|
|
8610
8755
|
errorMessage
|
|
@@ -8658,7 +8803,7 @@ var useFileUploader = (props) => {
|
|
|
8658
8803
|
const accepted = isFileAccepted(file, accept);
|
|
8659
8804
|
return {
|
|
8660
8805
|
file,
|
|
8661
|
-
errors: accepted ? [] : [t(
|
|
8806
|
+
errors: accepted ? [] : [t(texts16.invalidFileType)]
|
|
8662
8807
|
};
|
|
8663
8808
|
}).concat(stateFiles);
|
|
8664
8809
|
onChange(newFiles.map((f) => f.file));
|
|
@@ -8750,18 +8895,20 @@ var useFileUploader = (props) => {
|
|
|
8750
8895
|
removeFile
|
|
8751
8896
|
};
|
|
8752
8897
|
};
|
|
8753
|
-
var
|
|
8898
|
+
var texts16 = createTexts({
|
|
8754
8899
|
invalidFileType: {
|
|
8755
8900
|
nb: "Ugyldig filtype",
|
|
8756
8901
|
no: "Ugyldig filtype",
|
|
8757
8902
|
nn: "Ugyldig filtype",
|
|
8758
|
-
en: "Invalid file type"
|
|
8903
|
+
en: "Invalid file type",
|
|
8904
|
+
se: "F\xE1mohis fila\u0161ladja"
|
|
8759
8905
|
},
|
|
8760
8906
|
invalidFileAmount: {
|
|
8761
8907
|
nb: "For mange filer. Maksimalt antall er ",
|
|
8762
8908
|
no: "For mange filer. Maksimalt antall er ",
|
|
8763
8909
|
nn: "For mange filer. Maksimalt antall er ",
|
|
8764
|
-
en: "Too many files. The maximum allowed is "
|
|
8910
|
+
en: "Too many files. The maximum allowed is ",
|
|
8911
|
+
se: "Menddo ollu fiillat. Maksim\xE1la lohku lea "
|
|
8765
8912
|
}
|
|
8766
8913
|
});
|
|
8767
8914
|
|
|
@@ -8772,7 +8919,7 @@ var FileUploader = (props) => {
|
|
|
8772
8919
|
id,
|
|
8773
8920
|
label,
|
|
8774
8921
|
dropAreaLabel,
|
|
8775
|
-
btnLabel
|
|
8922
|
+
btnLabel,
|
|
8776
8923
|
tip,
|
|
8777
8924
|
required = false,
|
|
8778
8925
|
withDragAndDrop = true,
|
|
@@ -8792,7 +8939,8 @@ var FileUploader = (props) => {
|
|
|
8792
8939
|
...rest
|
|
8793
8940
|
} = props;
|
|
8794
8941
|
const { t } = useTranslation();
|
|
8795
|
-
const tDropAreaLabel = dropAreaLabel != null ? dropAreaLabel : t(
|
|
8942
|
+
const tDropAreaLabel = dropAreaLabel != null ? dropAreaLabel : t(texts17.dragAndDropOr);
|
|
8943
|
+
const tBtnLabel = btnLabel != null ? btnLabel : t(texts17.selectFile);
|
|
8796
8944
|
const generatedId = (0, import_react59.useId)();
|
|
8797
8945
|
const uniqueId = id != null ? id : `${generatedId}-fileUploader`;
|
|
8798
8946
|
const {
|
|
@@ -8857,7 +9005,7 @@ var FileUploader = (props) => {
|
|
|
8857
9005
|
...rootErrorsList.map((e) => e.id)
|
|
8858
9006
|
])
|
|
8859
9007
|
},
|
|
8860
|
-
children:
|
|
9008
|
+
children: tBtnLabel
|
|
8861
9009
|
}
|
|
8862
9010
|
);
|
|
8863
9011
|
const input = /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
@@ -8886,7 +9034,7 @@ var FileUploader = (props) => {
|
|
|
8886
9034
|
readOnly,
|
|
8887
9035
|
afterLabelContent
|
|
8888
9036
|
}),
|
|
8889
|
-
|
|
9037
|
+
renderInputMessage({ tip, tipId }),
|
|
8890
9038
|
inactive ? input : withDragAndDrop ? /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(
|
|
8891
9039
|
VStack,
|
|
8892
9040
|
{
|
|
@@ -8901,7 +9049,7 @@ var FileUploader = (props) => {
|
|
|
8901
9049
|
children: [
|
|
8902
9050
|
input,
|
|
8903
9051
|
tDropAreaLabel,
|
|
8904
|
-
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(VisuallyHidden, { children: t(
|
|
9052
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(VisuallyHidden, { children: t(texts17.uploadFileWithButton) }),
|
|
8905
9053
|
button
|
|
8906
9054
|
]
|
|
8907
9055
|
}
|
|
@@ -8919,14 +9067,14 @@ var FileUploader = (props) => {
|
|
|
8919
9067
|
readOnly && FileUploader_default["readonly--file-list"]
|
|
8920
9068
|
),
|
|
8921
9069
|
children: [
|
|
8922
|
-
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(VisuallyHidden, { id: fileListNameId, children: t(
|
|
9070
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(VisuallyHidden, { id: fileListNameId, children: t(texts17.uploadedFiles) }),
|
|
8923
9071
|
inactive && fileListElements.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
8924
9072
|
Typography,
|
|
8925
9073
|
{
|
|
8926
9074
|
italic: true,
|
|
8927
9075
|
as: "span",
|
|
8928
9076
|
color: disabled ? "text-subtle" : "text-medium",
|
|
8929
|
-
children: t(
|
|
9077
|
+
children: t(texts17.noFiles)
|
|
8930
9078
|
}
|
|
8931
9079
|
) : /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(StylelessList, { "aria-labelledby": fileListNameId, children: fileListElements })
|
|
8932
9080
|
]
|
|
@@ -8937,30 +9085,41 @@ var FileUploader = (props) => {
|
|
|
8937
9085
|
);
|
|
8938
9086
|
};
|
|
8939
9087
|
FileUploader.displayName = "FileUploader";
|
|
8940
|
-
var
|
|
9088
|
+
var texts17 = createTexts({
|
|
8941
9089
|
dragAndDropOr: {
|
|
8942
9090
|
nb: "Dra og slipp filer her eller",
|
|
8943
9091
|
no: "Dra og slipp filer her eller",
|
|
8944
9092
|
nn: "Dra og slepp filer her eller",
|
|
8945
|
-
en: "Drag and drop files here or"
|
|
9093
|
+
en: "Drag and drop files here or",
|
|
9094
|
+
se: "Sirdde fiillaid d\xE1sa dahje"
|
|
9095
|
+
},
|
|
9096
|
+
selectFile: {
|
|
9097
|
+
nb: "Velg fil",
|
|
9098
|
+
no: "Velg fil",
|
|
9099
|
+
nn: "Velg fil",
|
|
9100
|
+
en: "Sekect file",
|
|
9101
|
+
se: "V\xE1llje fiilla"
|
|
8946
9102
|
},
|
|
8947
9103
|
uploadFileWithButton: {
|
|
8948
9104
|
nb: "last opp en fil med den p\xE5f\xF8lgende knappen",
|
|
8949
9105
|
no: "last opp en fil med den p\xE5f\xF8lgende knappen",
|
|
8950
9106
|
nn: "last opp ei fil med den p\xE5f\xF8lgjande knappen",
|
|
8951
|
-
en: "upload using the following button"
|
|
9107
|
+
en: "upload using the following button",
|
|
9108
|
+
se: "vie\u010D\u010Da fiilla \u010Duovvova\u0161 boaluin"
|
|
8952
9109
|
},
|
|
8953
9110
|
noFiles: {
|
|
8954
9111
|
nb: "Ingen filer.",
|
|
8955
9112
|
no: "Ingen filer.",
|
|
8956
9113
|
nn: "Ingen filer.",
|
|
8957
|
-
en: "No files."
|
|
9114
|
+
en: "No files.",
|
|
9115
|
+
se: "Eai leat fiillat."
|
|
8958
9116
|
},
|
|
8959
9117
|
uploadedFiles: {
|
|
8960
9118
|
nb: "Opplastede filer",
|
|
8961
9119
|
no: "Opplastede filer",
|
|
8962
9120
|
nn: "Opplasta filer",
|
|
8963
|
-
en: "Uploaded files"
|
|
9121
|
+
en: "Uploaded files",
|
|
9122
|
+
se: "Vi\u017E\u017Eon fiillat"
|
|
8964
9123
|
}
|
|
8965
9124
|
});
|
|
8966
9125
|
|
|
@@ -9036,6 +9195,91 @@ var FooterListGroup = ({
|
|
|
9036
9195
|
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
9037
9196
|
var FooterLeft = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime269.jsx)("div", { className: cn(className, Footer_default["left"]), ...rest });
|
|
9038
9197
|
|
|
9198
|
+
// src/components/FormSummary/FormSummary.tsx
|
|
9199
|
+
var import_jsx_runtime270 = require("react/jsx-runtime");
|
|
9200
|
+
var FormSummary = (props) => {
|
|
9201
|
+
const { children } = props;
|
|
9202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(Paper, { border: "border-subtle", padding: "x0.5 x0.5 x1 x0.75", ...props, children });
|
|
9203
|
+
};
|
|
9204
|
+
|
|
9205
|
+
// src/components/FormSummary/FormSummary.module.css
|
|
9206
|
+
var FormSummary_default = {
|
|
9207
|
+
dd: "FormSummary_dd",
|
|
9208
|
+
field: "FormSummary_field"
|
|
9209
|
+
};
|
|
9210
|
+
|
|
9211
|
+
// src/components/FormSummary/FormSummary.components.tsx
|
|
9212
|
+
var import_jsx_runtime271 = require("react/jsx-runtime");
|
|
9213
|
+
function FormSummaryHeader({ ...props }) {
|
|
9214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
|
|
9215
|
+
HStack,
|
|
9216
|
+
{
|
|
9217
|
+
...props,
|
|
9218
|
+
justifyContent: "space-between",
|
|
9219
|
+
flexWrap: "wrap",
|
|
9220
|
+
alignItems: "center",
|
|
9221
|
+
gap: "x0.75",
|
|
9222
|
+
marginBlock: "0 x0.75"
|
|
9223
|
+
}
|
|
9224
|
+
);
|
|
9225
|
+
}
|
|
9226
|
+
function FormSummaryHeading({
|
|
9227
|
+
level = 2,
|
|
9228
|
+
...props
|
|
9229
|
+
}) {
|
|
9230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(Heading, { level, ...props });
|
|
9231
|
+
}
|
|
9232
|
+
function FormSummaryEditButton({
|
|
9233
|
+
purpose = "secondary",
|
|
9234
|
+
...props
|
|
9235
|
+
}) {
|
|
9236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(Button, { icon: EditIcon, purpose, size: "xsmall", ...props });
|
|
9237
|
+
}
|
|
9238
|
+
function FormSummaryFields({ ...props }) {
|
|
9239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(DescriptionList, { ...props });
|
|
9240
|
+
}
|
|
9241
|
+
function FormSummaryField({
|
|
9242
|
+
className,
|
|
9243
|
+
...props
|
|
9244
|
+
}) {
|
|
9245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)("div", { ...props, className: cn(FormSummary_default.field, className) });
|
|
9246
|
+
}
|
|
9247
|
+
function FormSummaryLabel(props) {
|
|
9248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(DescriptionListTerm, { ...props });
|
|
9249
|
+
}
|
|
9250
|
+
function FormSummaryValue({
|
|
9251
|
+
className,
|
|
9252
|
+
isLoading,
|
|
9253
|
+
children,
|
|
9254
|
+
...props
|
|
9255
|
+
}) {
|
|
9256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(DescriptionListDesc, { ...props, className: cn(className, FormSummary_default.dd), children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(Spinner, { size: "1.5em" }) : children });
|
|
9257
|
+
}
|
|
9258
|
+
function FormSummaryEmptyValue() {
|
|
9259
|
+
const { t } = useTranslation();
|
|
9260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsxs)("span", { children: [
|
|
9261
|
+
/* @__PURE__ */ (0, import_jsx_runtime271.jsx)("span", { "aria-hidden": true, children: "-" }),
|
|
9262
|
+
" ",
|
|
9263
|
+
/* @__PURE__ */ (0, import_jsx_runtime271.jsxs)(VisuallyHidden, { children: [
|
|
9264
|
+
" ",
|
|
9265
|
+
t(texts18.noValue),
|
|
9266
|
+
" "
|
|
9267
|
+
] })
|
|
9268
|
+
] });
|
|
9269
|
+
}
|
|
9270
|
+
function FormSummaryError({ ...props }) {
|
|
9271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(Box, { marginBlock: "x0.25 0", children: /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(InputMessage, { ...props, messageType: "error" }) });
|
|
9272
|
+
}
|
|
9273
|
+
var texts18 = createTexts({
|
|
9274
|
+
noValue: {
|
|
9275
|
+
nb: "Ikke fylt ut",
|
|
9276
|
+
no: "Ikke fylt ut",
|
|
9277
|
+
nn: "Ikkje fylt ut",
|
|
9278
|
+
en: "Not filled out",
|
|
9279
|
+
se: "Ii leat bidjan"
|
|
9280
|
+
}
|
|
9281
|
+
});
|
|
9282
|
+
|
|
9039
9283
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
9040
9284
|
var import_react60 = require("react");
|
|
9041
9285
|
|
|
@@ -9051,7 +9295,7 @@ var GlobalMessage_default = {
|
|
|
9051
9295
|
};
|
|
9052
9296
|
|
|
9053
9297
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
9054
|
-
var
|
|
9298
|
+
var import_jsx_runtime272 = require("react/jsx-runtime");
|
|
9055
9299
|
var icons = {
|
|
9056
9300
|
info: InfoIcon,
|
|
9057
9301
|
danger: ErrorIcon,
|
|
@@ -9070,7 +9314,7 @@ var GlobalMessage = ({
|
|
|
9070
9314
|
}) => {
|
|
9071
9315
|
const { t } = useTranslation();
|
|
9072
9316
|
const [isClosed, setClosed] = (0, import_react60.useState)(false);
|
|
9073
|
-
return !isClosed ? /* @__PURE__ */ (0,
|
|
9317
|
+
return !isClosed ? /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(
|
|
9074
9318
|
"div",
|
|
9075
9319
|
{
|
|
9076
9320
|
...getBaseHTMLProps(
|
|
@@ -9085,17 +9329,17 @@ var GlobalMessage = ({
|
|
|
9085
9329
|
rest
|
|
9086
9330
|
),
|
|
9087
9331
|
children: [
|
|
9088
|
-
/* @__PURE__ */ (0,
|
|
9332
|
+
/* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(
|
|
9089
9333
|
"div",
|
|
9090
9334
|
{
|
|
9091
9335
|
className: cn(GlobalMessage_default.content, closable && GlobalMessage_default["content--closable"]),
|
|
9092
9336
|
children: [
|
|
9093
|
-
/* @__PURE__ */ (0,
|
|
9094
|
-
children != null ? children : /* @__PURE__ */ (0,
|
|
9337
|
+
/* @__PURE__ */ (0, import_jsx_runtime272.jsx)(Icon, { icon: icons[purpose], className: GlobalMessage_default.icon }),
|
|
9338
|
+
children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("span", { children: message })
|
|
9095
9339
|
]
|
|
9096
9340
|
}
|
|
9097
9341
|
),
|
|
9098
|
-
closable && /* @__PURE__ */ (0,
|
|
9342
|
+
closable && /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
|
|
9099
9343
|
Button,
|
|
9100
9344
|
{
|
|
9101
9345
|
icon: CloseIcon,
|
|
@@ -9120,14 +9364,14 @@ var InlineButton_default = {
|
|
|
9120
9364
|
};
|
|
9121
9365
|
|
|
9122
9366
|
// src/components/InlineButton/InlineButton.tsx
|
|
9123
|
-
var
|
|
9367
|
+
var import_jsx_runtime273 = require("react/jsx-runtime");
|
|
9124
9368
|
var InlineButton = ({
|
|
9125
9369
|
className,
|
|
9126
9370
|
color,
|
|
9127
9371
|
icon,
|
|
9128
9372
|
children,
|
|
9129
9373
|
...rest
|
|
9130
|
-
}) => /* @__PURE__ */ (0,
|
|
9374
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
|
|
9131
9375
|
StylelessButton,
|
|
9132
9376
|
{
|
|
9133
9377
|
className: cn(
|
|
@@ -9138,7 +9382,7 @@ var InlineButton = ({
|
|
|
9138
9382
|
getColorCn(color)
|
|
9139
9383
|
),
|
|
9140
9384
|
...rest,
|
|
9141
|
-
children: icon ? /* @__PURE__ */ (0,
|
|
9385
|
+
children: icon ? /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(Icon, { icon, iconSize: "inherit" }) : children
|
|
9142
9386
|
}
|
|
9143
9387
|
);
|
|
9144
9388
|
|
|
@@ -9147,7 +9391,7 @@ var import_react63 = require("react");
|
|
|
9147
9391
|
|
|
9148
9392
|
// src/components/InlineEdit/InlineEdit.context.tsx
|
|
9149
9393
|
var import_react61 = require("react");
|
|
9150
|
-
var
|
|
9394
|
+
var import_jsx_runtime274 = require("react/jsx-runtime");
|
|
9151
9395
|
var InlineEditContext = (0, import_react61.createContext)(
|
|
9152
9396
|
{}
|
|
9153
9397
|
);
|
|
@@ -9191,7 +9435,7 @@ var InlineEditContextProvider = (props) => {
|
|
|
9191
9435
|
useOnKeyDown(["Enter"], () => onExitHandler());
|
|
9192
9436
|
useOnKeyDown(["Escape"], () => onExitHandler());
|
|
9193
9437
|
useOnClickOutside(inputRef == null ? void 0 : inputRef.current, () => onExitHandler());
|
|
9194
|
-
return /* @__PURE__ */ (0,
|
|
9438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
|
|
9195
9439
|
InlineEditContext,
|
|
9196
9440
|
{
|
|
9197
9441
|
value: {
|
|
@@ -9226,26 +9470,29 @@ var InlineEdit_default = {
|
|
|
9226
9470
|
};
|
|
9227
9471
|
|
|
9228
9472
|
// src/components/InlineEdit/InlineEdit.utils.tsx
|
|
9229
|
-
var
|
|
9473
|
+
var import_jsx_runtime275 = require("react/jsx-runtime");
|
|
9230
9474
|
var inlineEditVisuallyHidden = (id, clearable) => {
|
|
9231
9475
|
const { t } = useTranslation();
|
|
9232
|
-
return /* @__PURE__ */ (0,
|
|
9233
|
-
t(
|
|
9234
|
-
|
|
9476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime275.jsxs)(VisuallyHidden, { id, children: [
|
|
9477
|
+
t(texts19.inlineEditInfo),
|
|
9478
|
+
" ",
|
|
9479
|
+
!clearable && t(texts19.notClearable)
|
|
9235
9480
|
] });
|
|
9236
9481
|
};
|
|
9237
|
-
var
|
|
9482
|
+
var texts19 = createTexts({
|
|
9238
9483
|
inlineEditInfo: {
|
|
9239
9484
|
nb: "Escape, Enter eller Tab for \xE5 lagre.",
|
|
9240
9485
|
no: "Escape, Enter eller Tab for \xE5 lagre.",
|
|
9241
9486
|
nn: "Escape, Enter eller Tab for \xE5 lagra.",
|
|
9242
|
-
en: "Escape, Enter or Tab to save."
|
|
9487
|
+
en: "Escape, Enter or Tab to save.",
|
|
9488
|
+
se: "Escape, Enter dahje Tab go \xE1iggut vurket"
|
|
9243
9489
|
},
|
|
9244
9490
|
notClearable: {
|
|
9245
|
-
nb: "
|
|
9246
|
-
no: "
|
|
9247
|
-
nn: "
|
|
9248
|
-
en: "
|
|
9491
|
+
nb: "Innskrivingsfeltet kan ikke t\xF8mmes.",
|
|
9492
|
+
no: "Innskrivingsfeltet kan ikke t\xF8mmes.",
|
|
9493
|
+
nn: "Innskrivingsfeltet kan ikkje t\xF8mmast.",
|
|
9494
|
+
en: "Input field cannot be cleared.",
|
|
9495
|
+
se: "\u010C\xE1llinb\xE1ikki ii s\xE1hte sihkut"
|
|
9249
9496
|
}
|
|
9250
9497
|
});
|
|
9251
9498
|
var inlineEditCns = (hasErrorState, showEditingIcon) => [
|
|
@@ -9295,7 +9542,7 @@ function createClearChangeEvent(elementId) {
|
|
|
9295
9542
|
}
|
|
9296
9543
|
|
|
9297
9544
|
// src/components/InlineEdit/InlineField.tsx
|
|
9298
|
-
var
|
|
9545
|
+
var import_jsx_runtime276 = require("react/jsx-runtime");
|
|
9299
9546
|
function InlineField(props) {
|
|
9300
9547
|
const {
|
|
9301
9548
|
elementType,
|
|
@@ -9341,7 +9588,7 @@ function InlineField(props) {
|
|
|
9341
9588
|
const cnArgs = [hasErrorState, !isEditing && !hideIcon];
|
|
9342
9589
|
const iconSize = "small";
|
|
9343
9590
|
function makeIcon(icon, className2) {
|
|
9344
|
-
return /* @__PURE__ */ (0,
|
|
9591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
|
|
9345
9592
|
Icon,
|
|
9346
9593
|
{
|
|
9347
9594
|
iconSize,
|
|
@@ -9356,7 +9603,7 @@ function InlineField(props) {
|
|
|
9356
9603
|
const renderElement = () => {
|
|
9357
9604
|
switch (elementType) {
|
|
9358
9605
|
case "input":
|
|
9359
|
-
return /* @__PURE__ */ (0,
|
|
9606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
|
|
9360
9607
|
"input",
|
|
9361
9608
|
{
|
|
9362
9609
|
...rest,
|
|
@@ -9366,7 +9613,7 @@ function InlineField(props) {
|
|
|
9366
9613
|
}
|
|
9367
9614
|
);
|
|
9368
9615
|
case "textarea":
|
|
9369
|
-
return /* @__PURE__ */ (0,
|
|
9616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
|
|
9370
9617
|
"textarea",
|
|
9371
9618
|
{
|
|
9372
9619
|
...rest,
|
|
@@ -9376,8 +9623,8 @@ function InlineField(props) {
|
|
|
9376
9623
|
}
|
|
9377
9624
|
);
|
|
9378
9625
|
case "select":
|
|
9379
|
-
return /* @__PURE__ */ (0,
|
|
9380
|
-
/* @__PURE__ */ (0,
|
|
9626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(import_jsx_runtime276.Fragment, { children: [
|
|
9627
|
+
/* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
|
|
9381
9628
|
"select",
|
|
9382
9629
|
{
|
|
9383
9630
|
...rest,
|
|
@@ -9386,7 +9633,7 @@ function InlineField(props) {
|
|
|
9386
9633
|
className: cn(className, ...inlineSelectCns(...cnArgs, hasValue))
|
|
9387
9634
|
}
|
|
9388
9635
|
),
|
|
9389
|
-
hasValue && emptiable && /* @__PURE__ */ (0,
|
|
9636
|
+
hasValue && emptiable && /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
|
|
9390
9637
|
ClearButton,
|
|
9391
9638
|
{
|
|
9392
9639
|
"aria-label": t(commonTexts.clearSelect),
|
|
@@ -9401,18 +9648,18 @@ function InlineField(props) {
|
|
|
9401
9648
|
return null;
|
|
9402
9649
|
}
|
|
9403
9650
|
};
|
|
9404
|
-
return /* @__PURE__ */ (0,
|
|
9405
|
-
/* @__PURE__ */ (0,
|
|
9651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(Box, { position: "relative", width, children: [
|
|
9652
|
+
/* @__PURE__ */ (0, import_jsx_runtime276.jsxs)("div", { className: Input_default["input-group"], children: [
|
|
9406
9653
|
!isEditing && !hideIcon && makeIcon(EditIcon, InlineEdit_default["edit-icon"]),
|
|
9407
9654
|
renderElement()
|
|
9408
9655
|
] }),
|
|
9409
9656
|
inlineEditVisuallyHidden(descId, emptiable),
|
|
9410
|
-
renderInputMessage(
|
|
9657
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
9411
9658
|
] });
|
|
9412
9659
|
}
|
|
9413
9660
|
|
|
9414
9661
|
// src/components/InlineEdit/InlineEditTextArea/InlineEditTextArea.tsx
|
|
9415
|
-
var
|
|
9662
|
+
var import_jsx_runtime277 = require("react/jsx-runtime");
|
|
9416
9663
|
var InlineEditTextArea = ({
|
|
9417
9664
|
onSetValue,
|
|
9418
9665
|
emptiable,
|
|
@@ -9425,7 +9672,7 @@ var InlineEditTextArea = ({
|
|
|
9425
9672
|
}) => {
|
|
9426
9673
|
const textareaRef = (0, import_react63.useRef)(null);
|
|
9427
9674
|
const combinedRef = useCombinedRef(ref, textareaRef);
|
|
9428
|
-
return /* @__PURE__ */ (0,
|
|
9675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
|
|
9429
9676
|
InlineEditContextProvider,
|
|
9430
9677
|
{
|
|
9431
9678
|
onSetValue,
|
|
@@ -9435,14 +9682,14 @@ var InlineEditTextArea = ({
|
|
|
9435
9682
|
onFocus,
|
|
9436
9683
|
onChange,
|
|
9437
9684
|
onBlur,
|
|
9438
|
-
children: /* @__PURE__ */ (0,
|
|
9685
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(InlineField, { elementType: "textarea", ...rest, ref: combinedRef })
|
|
9439
9686
|
}
|
|
9440
9687
|
);
|
|
9441
9688
|
};
|
|
9442
9689
|
|
|
9443
9690
|
// src/components/InlineEdit/InlineEditInput/InlineEditInput.tsx
|
|
9444
9691
|
var import_react64 = require("react");
|
|
9445
|
-
var
|
|
9692
|
+
var import_jsx_runtime278 = require("react/jsx-runtime");
|
|
9446
9693
|
var InlineEditInput = ({
|
|
9447
9694
|
onSetValue,
|
|
9448
9695
|
emptiable,
|
|
@@ -9455,7 +9702,7 @@ var InlineEditInput = ({
|
|
|
9455
9702
|
}) => {
|
|
9456
9703
|
const inputRef = (0, import_react64.useRef)(null);
|
|
9457
9704
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
9458
|
-
return /* @__PURE__ */ (0,
|
|
9705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
|
|
9459
9706
|
InlineEditContextProvider,
|
|
9460
9707
|
{
|
|
9461
9708
|
onSetValue,
|
|
@@ -9465,14 +9712,14 @@ var InlineEditInput = ({
|
|
|
9465
9712
|
onFocus,
|
|
9466
9713
|
onChange,
|
|
9467
9714
|
onBlur,
|
|
9468
|
-
children: /* @__PURE__ */ (0,
|
|
9715
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(InlineField, { elementType: "input", ...rest, ref: combinedRef })
|
|
9469
9716
|
}
|
|
9470
9717
|
);
|
|
9471
9718
|
};
|
|
9472
9719
|
|
|
9473
9720
|
// src/components/InlineEdit/InlineEditSelect/InlineEditSelect.tsx
|
|
9474
9721
|
var import_react65 = require("react");
|
|
9475
|
-
var
|
|
9722
|
+
var import_jsx_runtime279 = require("react/jsx-runtime");
|
|
9476
9723
|
var InlineEditSelect = ({
|
|
9477
9724
|
onSetValue,
|
|
9478
9725
|
emptiable,
|
|
@@ -9485,7 +9732,7 @@ var InlineEditSelect = ({
|
|
|
9485
9732
|
}) => {
|
|
9486
9733
|
const inputRef = (0, import_react65.useRef)(null);
|
|
9487
9734
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
9488
|
-
return /* @__PURE__ */ (0,
|
|
9735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
|
|
9489
9736
|
InlineEditContextProvider,
|
|
9490
9737
|
{
|
|
9491
9738
|
onSetValue,
|
|
@@ -9495,7 +9742,7 @@ var InlineEditSelect = ({
|
|
|
9495
9742
|
onFocus,
|
|
9496
9743
|
onChange,
|
|
9497
9744
|
onBlur,
|
|
9498
|
-
children: /* @__PURE__ */ (0,
|
|
9745
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(InlineField, { elementType: "select", ...rest, ref: combinedRef })
|
|
9499
9746
|
}
|
|
9500
9747
|
);
|
|
9501
9748
|
};
|
|
@@ -9517,8 +9764,8 @@ var InternalHeader_default = {
|
|
|
9517
9764
|
};
|
|
9518
9765
|
|
|
9519
9766
|
// src/components/InternalHeader/NavigationItem.tsx
|
|
9520
|
-
var
|
|
9521
|
-
var NavigationItem = ({ isCurrent, ...rest }) => /* @__PURE__ */ (0,
|
|
9767
|
+
var import_jsx_runtime280 = require("react/jsx-runtime");
|
|
9768
|
+
var NavigationItem = ({ isCurrent, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
|
|
9522
9769
|
"a",
|
|
9523
9770
|
{
|
|
9524
9771
|
...rest,
|
|
@@ -9533,7 +9780,7 @@ var NavigationItem = ({ isCurrent, ...rest }) => /* @__PURE__ */ (0, import_jsx_
|
|
|
9533
9780
|
);
|
|
9534
9781
|
|
|
9535
9782
|
// src/components/InternalHeader/InternalHeader.tsx
|
|
9536
|
-
var
|
|
9783
|
+
var import_jsx_runtime281 = require("react/jsx-runtime");
|
|
9537
9784
|
var import_react67 = require("react");
|
|
9538
9785
|
var InternalHeader = (props) => {
|
|
9539
9786
|
const {
|
|
@@ -9563,7 +9810,7 @@ var InternalHeader = (props) => {
|
|
|
9563
9810
|
const hasContextMenuElements = !!contextMenuItems && contextMenuItems.length > 0;
|
|
9564
9811
|
const hasSmallScreenBreakpoint = !!smallScreenBreakpoint;
|
|
9565
9812
|
const hasNavInContextMenu = hasSmallScreenBreakpoint && hasNavigationElements;
|
|
9566
|
-
const navigation = hasNavigationElements ? /* @__PURE__ */ (0,
|
|
9813
|
+
const navigation = hasNavigationElements ? /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("nav", { "aria-label": t(texts20.siteNavigation), children: /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
9567
9814
|
ShowHide,
|
|
9568
9815
|
{
|
|
9569
9816
|
as: StylelessList,
|
|
@@ -9572,7 +9819,7 @@ var InternalHeader = (props) => {
|
|
|
9572
9819
|
children: navItems.map((item, i) => {
|
|
9573
9820
|
const { href, ...rest2 } = item;
|
|
9574
9821
|
const isCurrent = href === currentPage;
|
|
9575
|
-
return /* @__PURE__ */ (0,
|
|
9822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("li", { className: InternalHeader_default["nav-list__item"], children: /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
9576
9823
|
NavigationItem,
|
|
9577
9824
|
{
|
|
9578
9825
|
href,
|
|
@@ -9586,7 +9833,7 @@ var InternalHeader = (props) => {
|
|
|
9586
9833
|
) }) : null;
|
|
9587
9834
|
const hasContextMenu = hasContextMenuElements || !!user || hasNavInContextMenu;
|
|
9588
9835
|
const hasContextMenuLargeScreen = hasContextMenuElements || !!user;
|
|
9589
|
-
return /* @__PURE__ */ (0,
|
|
9836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(
|
|
9590
9837
|
Box,
|
|
9591
9838
|
{
|
|
9592
9839
|
display: "flex",
|
|
@@ -9604,7 +9851,7 @@ var InternalHeader = (props) => {
|
|
|
9604
9851
|
rest
|
|
9605
9852
|
),
|
|
9606
9853
|
children: [
|
|
9607
|
-
/* @__PURE__ */ (0,
|
|
9854
|
+
/* @__PURE__ */ (0, import_jsx_runtime281.jsx)(Typography, { typographyType: "headingSmall", bold: true, as: "span", children: applicationHref ? /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
9608
9855
|
"a",
|
|
9609
9856
|
{
|
|
9610
9857
|
href: applicationHref,
|
|
@@ -9613,42 +9860,42 @@ var InternalHeader = (props) => {
|
|
|
9613
9860
|
children: applicationName
|
|
9614
9861
|
}
|
|
9615
9862
|
) : applicationName }),
|
|
9616
|
-
/* @__PURE__ */ (0,
|
|
9617
|
-
(hasContextMenu || navigation !== null) && /* @__PURE__ */ (0,
|
|
9863
|
+
/* @__PURE__ */ (0, import_jsx_runtime281.jsx)(Typography, { typographyType: "bodyMedium", as: "span", children: applicationDesc }),
|
|
9864
|
+
(hasContextMenu || navigation !== null) && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("div", { className: InternalHeader_default["bar-separator"] }),
|
|
9618
9865
|
navigation,
|
|
9619
|
-
hasContextMenu && /* @__PURE__ */ (0,
|
|
9866
|
+
hasContextMenu && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
9620
9867
|
ShowHide,
|
|
9621
9868
|
{
|
|
9622
9869
|
showBelow: !hasContextMenuLargeScreen && hasSmallScreenBreakpoint ? smallScreenBreakpoint : void 0,
|
|
9623
9870
|
className: cn(InternalHeader_default["context-menu-group"]),
|
|
9624
|
-
children: /* @__PURE__ */ (0,
|
|
9625
|
-
/* @__PURE__ */ (0,
|
|
9871
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(OverflowMenuGroup, { children: [
|
|
9872
|
+
/* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
9626
9873
|
Button,
|
|
9627
9874
|
{
|
|
9628
9875
|
icon: hasNavInContextMenu ? MenuIcon : MoreVerticalIcon,
|
|
9629
9876
|
purpose: "tertiary",
|
|
9630
|
-
"aria-label": t(
|
|
9877
|
+
"aria-label": t(texts20.openMenu)
|
|
9631
9878
|
}
|
|
9632
9879
|
),
|
|
9633
|
-
/* @__PURE__ */ (0,
|
|
9634
|
-
user && /* @__PURE__ */ (0,
|
|
9635
|
-
hasNavInContextMenu && /* @__PURE__ */ (0,
|
|
9880
|
+
/* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(OverflowMenu, { className: InternalHeader_default["context-menu"], children: [
|
|
9881
|
+
user && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(OverflowMenuList, { children: user.href ? /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(OverflowMenuLink, { icon: PersonIcon, ...user }) : /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(OverflowMenuSpan, { icon: PersonIcon, ...user }) }),
|
|
9882
|
+
hasNavInContextMenu && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
9636
9883
|
ShowHide,
|
|
9637
9884
|
{
|
|
9638
9885
|
as: "nav",
|
|
9639
|
-
"aria-label": t(
|
|
9886
|
+
"aria-label": t(texts20.siteNavigation),
|
|
9640
9887
|
showBelow: smallScreenBreakpoint,
|
|
9641
|
-
children: /* @__PURE__ */ (0,
|
|
9888
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(OverflowMenuList, { children: navItems.map((item, i) => /* @__PURE__ */ (0, import_react67.createElement)(OverflowMenuLink, { ...item, key: `nav-${i}` })) })
|
|
9642
9889
|
}
|
|
9643
9890
|
),
|
|
9644
|
-
hasNavInContextMenu && hasContextMenuElements && /* @__PURE__ */ (0,
|
|
9891
|
+
hasNavInContextMenu && hasContextMenuElements && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
9645
9892
|
ShowHide,
|
|
9646
9893
|
{
|
|
9647
9894
|
as: OverflowMenuDivider,
|
|
9648
9895
|
showBelow: smallScreenBreakpoint
|
|
9649
9896
|
}
|
|
9650
9897
|
),
|
|
9651
|
-
hasContextMenuElements && /* @__PURE__ */ (0,
|
|
9898
|
+
hasContextMenuElements && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(OverflowMenuList, { children: contextMenuItems.map((item, i) => {
|
|
9652
9899
|
return item.href ? /* @__PURE__ */ (0, import_react67.createElement)(
|
|
9653
9900
|
OverflowMenuLink,
|
|
9654
9901
|
{
|
|
@@ -9672,18 +9919,20 @@ var InternalHeader = (props) => {
|
|
|
9672
9919
|
);
|
|
9673
9920
|
};
|
|
9674
9921
|
InternalHeader.displayName = "InternalHeader";
|
|
9675
|
-
var
|
|
9922
|
+
var texts20 = createTexts({
|
|
9676
9923
|
openMenu: {
|
|
9677
9924
|
nb: "\xC5pne meny",
|
|
9678
9925
|
no: "\xC5pne meny",
|
|
9679
9926
|
nn: "Opna meny",
|
|
9680
|
-
en: "Open menu"
|
|
9927
|
+
en: "Open menu",
|
|
9928
|
+
se: "Rabas f\xE1llu"
|
|
9681
9929
|
},
|
|
9682
9930
|
siteNavigation: {
|
|
9683
9931
|
nb: "Sidenavigasjon",
|
|
9684
9932
|
no: "Sidenavigasjon",
|
|
9685
9933
|
nn: "Sidenavigasjon",
|
|
9686
|
-
en: "Site navigation"
|
|
9934
|
+
en: "Site navigation",
|
|
9935
|
+
se: "Siidu navig\xE1\u0161uvdna"
|
|
9687
9936
|
}
|
|
9688
9937
|
});
|
|
9689
9938
|
|
|
@@ -9697,7 +9946,7 @@ var List_default = {
|
|
|
9697
9946
|
};
|
|
9698
9947
|
|
|
9699
9948
|
// src/components/List/List.tsx
|
|
9700
|
-
var
|
|
9949
|
+
var import_jsx_runtime282 = require("react/jsx-runtime");
|
|
9701
9950
|
var List = ({
|
|
9702
9951
|
listType = "unordered",
|
|
9703
9952
|
typographyType = "inherit",
|
|
@@ -9708,7 +9957,7 @@ var List = ({
|
|
|
9708
9957
|
...rest
|
|
9709
9958
|
}) => {
|
|
9710
9959
|
const List2 = listType === "ordered" ? "ol" : "ul";
|
|
9711
|
-
return /* @__PURE__ */ (0,
|
|
9960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
|
|
9712
9961
|
List2,
|
|
9713
9962
|
{
|
|
9714
9963
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
@@ -9724,8 +9973,8 @@ var List = ({
|
|
|
9724
9973
|
List.displayName = "List";
|
|
9725
9974
|
|
|
9726
9975
|
// src/components/List/ListItem.tsx
|
|
9727
|
-
var
|
|
9728
|
-
var ListItem = ({ className, ...rest }) => /* @__PURE__ */ (0,
|
|
9976
|
+
var import_jsx_runtime283 = require("react/jsx-runtime");
|
|
9977
|
+
var ListItem = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("li", { ...rest, className: cn(className, List_default.li) });
|
|
9729
9978
|
ListItem.displayName = "ListItem";
|
|
9730
9979
|
|
|
9731
9980
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
@@ -9750,7 +9999,7 @@ var LocalMessage_default = {
|
|
|
9750
9999
|
};
|
|
9751
10000
|
|
|
9752
10001
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
9753
|
-
var
|
|
10002
|
+
var import_jsx_runtime284 = require("react/jsx-runtime");
|
|
9754
10003
|
var icons2 = {
|
|
9755
10004
|
info: InfoIcon,
|
|
9756
10005
|
danger: ErrorIcon,
|
|
@@ -9774,9 +10023,9 @@ var LocalMessage = ({
|
|
|
9774
10023
|
const { t } = useTranslation();
|
|
9775
10024
|
const [isClosed, setClosed] = (0, import_react68.useState)(false);
|
|
9776
10025
|
if (isClosed) {
|
|
9777
|
-
return /* @__PURE__ */ (0,
|
|
10026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(import_jsx_runtime284.Fragment, {});
|
|
9778
10027
|
}
|
|
9779
|
-
return /* @__PURE__ */ (0,
|
|
10028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime284.jsxs)(
|
|
9780
10029
|
Box,
|
|
9781
10030
|
{
|
|
9782
10031
|
...getBaseHTMLProps(
|
|
@@ -9797,15 +10046,15 @@ var LocalMessage = ({
|
|
|
9797
10046
|
padding: "x0.75 x0.75 x0.75 x0.5",
|
|
9798
10047
|
gap: "x0.5",
|
|
9799
10048
|
children: [
|
|
9800
|
-
/* @__PURE__ */ (0,
|
|
10049
|
+
/* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
|
|
9801
10050
|
Icon,
|
|
9802
10051
|
{
|
|
9803
10052
|
icon: icons2[purpose],
|
|
9804
10053
|
className: cn(LocalMessage_default.icon, LocalMessage_default.container__icon)
|
|
9805
10054
|
}
|
|
9806
10055
|
),
|
|
9807
|
-
/* @__PURE__ */ (0,
|
|
9808
|
-
closable && /* @__PURE__ */ (0,
|
|
10056
|
+
/* @__PURE__ */ (0, import_jsx_runtime284.jsx)("div", { className: LocalMessage_default.container__text, children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime284.jsx)("span", { children: message }) }),
|
|
10057
|
+
closable && /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
|
|
9809
10058
|
Button,
|
|
9810
10059
|
{
|
|
9811
10060
|
icon: CloseIcon,
|
|
@@ -9840,7 +10089,7 @@ var Modal_default = {
|
|
|
9840
10089
|
};
|
|
9841
10090
|
|
|
9842
10091
|
// src/components/Modal/Modal.tsx
|
|
9843
|
-
var
|
|
10092
|
+
var import_jsx_runtime285 = require("react/jsx-runtime");
|
|
9844
10093
|
var Modal = ({
|
|
9845
10094
|
isOpen = false,
|
|
9846
10095
|
parentElement,
|
|
@@ -9891,14 +10140,14 @@ var Modal = ({
|
|
|
9891
10140
|
useOnKeyDown(["Escape", "Esc"], () => handleClose());
|
|
9892
10141
|
const hasTransitionedIn = useMountTransition(isOpen, 200);
|
|
9893
10142
|
return (isOpen || hasTransitionedIn) && portalTarget ? (0, import_react_dom4.createPortal)(
|
|
9894
|
-
/* @__PURE__ */ (0,
|
|
10143
|
+
/* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
|
|
9895
10144
|
Backdrop,
|
|
9896
10145
|
{
|
|
9897
10146
|
zIndex: "modal",
|
|
9898
10147
|
isMounted: isOpen && hasTransitionedIn,
|
|
9899
10148
|
ref: backdropRef,
|
|
9900
10149
|
onClick: onBackdropClick,
|
|
9901
|
-
children: /* @__PURE__ */ (0,
|
|
10150
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(
|
|
9902
10151
|
Paper,
|
|
9903
10152
|
{
|
|
9904
10153
|
display: "flex",
|
|
@@ -9925,7 +10174,7 @@ var Modal = ({
|
|
|
9925
10174
|
id: modalId,
|
|
9926
10175
|
elevation: 4,
|
|
9927
10176
|
children: [
|
|
9928
|
-
/* @__PURE__ */ (0,
|
|
10177
|
+
/* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(
|
|
9929
10178
|
HStack,
|
|
9930
10179
|
{
|
|
9931
10180
|
paddingBlock: "0 x0.75",
|
|
@@ -9935,8 +10184,8 @@ var Modal = ({
|
|
|
9935
10184
|
width: "100%",
|
|
9936
10185
|
className: Modal_default["header-container"],
|
|
9937
10186
|
children: [
|
|
9938
|
-
!!header && /* @__PURE__ */ (0,
|
|
9939
|
-
onClose && /* @__PURE__ */ (0,
|
|
10187
|
+
!!header && /* @__PURE__ */ (0, import_jsx_runtime285.jsx)("div", { id: headerId, children: typeof header === "string" ? /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(Heading, { level: 2, typographyType: "headingLarge", children: header }) : header }),
|
|
10188
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
|
|
9940
10189
|
Button,
|
|
9941
10190
|
{
|
|
9942
10191
|
size: "small",
|
|
@@ -9950,7 +10199,7 @@ var Modal = ({
|
|
|
9950
10199
|
]
|
|
9951
10200
|
}
|
|
9952
10201
|
),
|
|
9953
|
-
/* @__PURE__ */ (0,
|
|
10202
|
+
/* @__PURE__ */ (0, import_jsx_runtime285.jsx)(Box, { display: "grid", gap: "x1", children })
|
|
9954
10203
|
]
|
|
9955
10204
|
}
|
|
9956
10205
|
)
|
|
@@ -9962,7 +10211,7 @@ var Modal = ({
|
|
|
9962
10211
|
Modal.displayName = "Modal";
|
|
9963
10212
|
|
|
9964
10213
|
// src/components/Modal/ModalBody.tsx
|
|
9965
|
-
var
|
|
10214
|
+
var import_jsx_runtime286 = require("react/jsx-runtime");
|
|
9966
10215
|
var ModalBody = ({
|
|
9967
10216
|
children,
|
|
9968
10217
|
id,
|
|
@@ -9972,7 +10221,7 @@ var ModalBody = ({
|
|
|
9972
10221
|
height,
|
|
9973
10222
|
...rest
|
|
9974
10223
|
}) => {
|
|
9975
|
-
return /* @__PURE__ */ (0,
|
|
10224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
|
|
9976
10225
|
"div",
|
|
9977
10226
|
{
|
|
9978
10227
|
...getBaseHTMLProps(
|
|
@@ -9994,8 +10243,8 @@ var ModalBody = ({
|
|
|
9994
10243
|
ModalBody.displayName = "ModalBody";
|
|
9995
10244
|
|
|
9996
10245
|
// src/components/Modal/ModalActions.tsx
|
|
9997
|
-
var
|
|
9998
|
-
var ModalActions = (props) => /* @__PURE__ */ (0,
|
|
10246
|
+
var import_jsx_runtime287 = require("react/jsx-runtime");
|
|
10247
|
+
var ModalActions = (props) => /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(Box, { display: "flex", flexWrap: "wrap", gap: "x1", ...props });
|
|
9999
10248
|
ModalActions.displayName = "ModalActions";
|
|
10000
10249
|
|
|
10001
10250
|
// src/components/Pagination/Pagination.tsx
|
|
@@ -10108,7 +10357,7 @@ var control = {
|
|
|
10108
10357
|
...optionTypography.medium
|
|
10109
10358
|
},
|
|
10110
10359
|
hasIcon: {
|
|
10111
|
-
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-
|
|
10360
|
+
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-md-icon-text-gap))"
|
|
10112
10361
|
}
|
|
10113
10362
|
},
|
|
10114
10363
|
small: {
|
|
@@ -10118,7 +10367,7 @@ var control = {
|
|
|
10118
10367
|
...optionTypography.small
|
|
10119
10368
|
},
|
|
10120
10369
|
hasIcon: {
|
|
10121
|
-
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-
|
|
10370
|
+
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-sm-icon-text-gap))"
|
|
10122
10371
|
}
|
|
10123
10372
|
},
|
|
10124
10373
|
xsmall: {
|
|
@@ -10128,7 +10377,7 @@ var control = {
|
|
|
10128
10377
|
...optionTypography.xsmall
|
|
10129
10378
|
},
|
|
10130
10379
|
hasIcon: {
|
|
10131
|
-
paddingLeft: "calc(var(--dds-spacing-x0-5) + var(--dds-icon-size-small) + var(--dds-spacing-
|
|
10380
|
+
paddingLeft: "calc(var(--dds-spacing-x0-5) + var(--dds-icon-size-small) + var(--dds-spacing-xs-icon-text-gap))"
|
|
10132
10381
|
}
|
|
10133
10382
|
}
|
|
10134
10383
|
};
|
|
@@ -10326,7 +10575,7 @@ var getCustomStyles = (size2, hasError, hasIcon, isReadOnly) => ({
|
|
|
10326
10575
|
// src/components/Select/SelectComponents.tsx
|
|
10327
10576
|
var import_react70 = __toESM(require("react"));
|
|
10328
10577
|
var import_react_select = require("react-select");
|
|
10329
|
-
var
|
|
10578
|
+
var import_jsx_runtime288 = require("react/jsx-runtime");
|
|
10330
10579
|
var {
|
|
10331
10580
|
Option,
|
|
10332
10581
|
NoOptionsMessage,
|
|
@@ -10349,30 +10598,30 @@ var getIndicatorIconSize = (componentSize) => {
|
|
|
10349
10598
|
};
|
|
10350
10599
|
var DDSOption = ({
|
|
10351
10600
|
...props
|
|
10352
|
-
}) => /* @__PURE__ */ (0,
|
|
10353
|
-
props.isSelected && /* @__PURE__ */ (0,
|
|
10601
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime288.jsxs)(Option, { ...props, children: [
|
|
10602
|
+
props.isSelected && /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Icon, { icon: CheckIcon, iconSize: "small" }),
|
|
10354
10603
|
props.children
|
|
10355
10604
|
] });
|
|
10356
|
-
var CustomOption = (props) => /* @__PURE__ */ (0,
|
|
10605
|
+
var CustomOption = (props) => /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Option, { ...props, children: import_react70.default.createElement(props.customElement, props) });
|
|
10357
10606
|
var CustomSingleValue = ({
|
|
10358
10607
|
id,
|
|
10359
10608
|
Element,
|
|
10360
10609
|
...props
|
|
10361
|
-
}) => /* @__PURE__ */ (0,
|
|
10362
|
-
var DDSNoOptionsMessage = (props) => /* @__PURE__ */ (0,
|
|
10610
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(SingleValue, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime288.jsx)("div", { id, className: Select_default["inner-single-value"], children: Element ? /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Element, { ...props }) : props.children }) });
|
|
10611
|
+
var DDSNoOptionsMessage = (props) => /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(NoOptionsMessage, { ...props, children: "Ingen treff" });
|
|
10363
10612
|
var DDSClearIndicator = ({
|
|
10364
10613
|
size: size2,
|
|
10365
10614
|
...props
|
|
10366
|
-
}) => /* @__PURE__ */ (0,
|
|
10367
|
-
var DDSMultiValueRemove = (props) => /* @__PURE__ */ (0,
|
|
10615
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(ClearIndicator, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Icon, { icon: CloseSmallIcon, iconSize: getIndicatorIconSize(size2) }) });
|
|
10616
|
+
var DDSMultiValueRemove = (props) => /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(MultiValueRemove, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Icon, { icon: CloseSmallIcon, iconSize: "small" }) });
|
|
10368
10617
|
var DDSDropdownIndicator = (props) => {
|
|
10369
10618
|
const { className, componentSize, ...rest } = props;
|
|
10370
|
-
return /* @__PURE__ */ (0,
|
|
10619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
|
|
10371
10620
|
DropdownIndicator,
|
|
10372
10621
|
{
|
|
10373
10622
|
...rest,
|
|
10374
10623
|
className: cn(className, Select_default["dropdown-indicator"]),
|
|
10375
|
-
children: /* @__PURE__ */ (0,
|
|
10624
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
|
|
10376
10625
|
Icon,
|
|
10377
10626
|
{
|
|
10378
10627
|
icon: ChevronDownIcon,
|
|
@@ -10386,7 +10635,7 @@ var DDSInput = ({
|
|
|
10386
10635
|
ariaInvalid,
|
|
10387
10636
|
ariaDescribedby,
|
|
10388
10637
|
...props
|
|
10389
|
-
}) => /* @__PURE__ */ (0,
|
|
10638
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
|
|
10390
10639
|
Input2,
|
|
10391
10640
|
{
|
|
10392
10641
|
...props,
|
|
@@ -10405,7 +10654,7 @@ function DDSControl(props) {
|
|
|
10405
10654
|
innerProps,
|
|
10406
10655
|
...rest
|
|
10407
10656
|
} = props;
|
|
10408
|
-
return /* @__PURE__ */ (0,
|
|
10657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime288.jsxs)(
|
|
10409
10658
|
Control,
|
|
10410
10659
|
{
|
|
10411
10660
|
...rest,
|
|
@@ -10420,13 +10669,13 @@ function DDSControl(props) {
|
|
|
10420
10669
|
readOnly && Select_default["control--readonly"]
|
|
10421
10670
|
),
|
|
10422
10671
|
children: [
|
|
10423
|
-
icon && /* @__PURE__ */ (0,
|
|
10672
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
|
|
10424
10673
|
Icon,
|
|
10425
10674
|
{
|
|
10426
10675
|
icon,
|
|
10427
10676
|
iconSize: getFormInputIconSize(componentSize),
|
|
10428
10677
|
className: cn(
|
|
10429
|
-
Input_default["input-group__absolute-
|
|
10678
|
+
Input_default["input-group__absolute-el"],
|
|
10430
10679
|
Select_default[`icon--${componentSize}`]
|
|
10431
10680
|
)
|
|
10432
10681
|
}
|
|
@@ -10438,7 +10687,7 @@ function DDSControl(props) {
|
|
|
10438
10687
|
}
|
|
10439
10688
|
|
|
10440
10689
|
// src/components/Select/Select.tsx
|
|
10441
|
-
var
|
|
10690
|
+
var import_jsx_runtime289 = require("react/jsx-runtime");
|
|
10442
10691
|
function Select({
|
|
10443
10692
|
id,
|
|
10444
10693
|
label,
|
|
@@ -10488,7 +10737,7 @@ function Select({
|
|
|
10488
10737
|
componentSize === "xsmall" && "var(--dds-input-default-width-xsmall)"
|
|
10489
10738
|
);
|
|
10490
10739
|
const customInput = (0, import_react71.useCallback)(
|
|
10491
|
-
(props) => /* @__PURE__ */ (0,
|
|
10740
|
+
(props) => /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
|
|
10492
10741
|
DDSInput,
|
|
10493
10742
|
{
|
|
10494
10743
|
...props,
|
|
@@ -10506,7 +10755,7 @@ function Select({
|
|
|
10506
10755
|
[]
|
|
10507
10756
|
);
|
|
10508
10757
|
const customSingleValue = (0, import_react71.useCallback)(
|
|
10509
|
-
(props) => /* @__PURE__ */ (0,
|
|
10758
|
+
(props) => /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
|
|
10510
10759
|
CustomSingleValue,
|
|
10511
10760
|
{
|
|
10512
10761
|
...props,
|
|
@@ -10517,15 +10766,15 @@ function Select({
|
|
|
10517
10766
|
[]
|
|
10518
10767
|
);
|
|
10519
10768
|
const customClearIndicator = (0, import_react71.useCallback)(
|
|
10520
|
-
(props) => /* @__PURE__ */ (0,
|
|
10769
|
+
(props) => /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(DDSClearIndicator, { ...props, size: componentSize }),
|
|
10521
10770
|
[componentSize]
|
|
10522
10771
|
);
|
|
10523
10772
|
const customDropdownIndicator = (0, import_react71.useCallback)(
|
|
10524
|
-
(props) => /* @__PURE__ */ (0,
|
|
10773
|
+
(props) => /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(DDSDropdownIndicator, { ...props, componentSize }),
|
|
10525
10774
|
[componentSize]
|
|
10526
10775
|
);
|
|
10527
10776
|
const customControl = (0, import_react71.useCallback)(
|
|
10528
|
-
(props) => /* @__PURE__ */ (0,
|
|
10777
|
+
(props) => /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
|
|
10529
10778
|
DDSControl,
|
|
10530
10779
|
{
|
|
10531
10780
|
...props,
|
|
@@ -10540,9 +10789,9 @@ function Select({
|
|
|
10540
10789
|
const customOptionComponent = (0, import_react71.useCallback)(
|
|
10541
10790
|
(props) => {
|
|
10542
10791
|
if (customOptionElement) {
|
|
10543
|
-
return /* @__PURE__ */ (0,
|
|
10792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(CustomOption, { ...props, customElement: customOptionElement });
|
|
10544
10793
|
} else {
|
|
10545
|
-
return /* @__PURE__ */ (0,
|
|
10794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(DDSOption, { ...props });
|
|
10546
10795
|
}
|
|
10547
10796
|
},
|
|
10548
10797
|
[customOptionElement, componentSize]
|
|
@@ -10586,7 +10835,7 @@ function Select({
|
|
|
10586
10835
|
openMenuOnClick: readOnly ? false : openMenuOnClick ? openMenuOnClick : void 0,
|
|
10587
10836
|
...rest
|
|
10588
10837
|
};
|
|
10589
|
-
return /* @__PURE__ */ (0,
|
|
10838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime289.jsxs)(
|
|
10590
10839
|
Box,
|
|
10591
10840
|
{
|
|
10592
10841
|
width: inputWidth,
|
|
@@ -10606,8 +10855,8 @@ function Select({
|
|
|
10606
10855
|
readOnly,
|
|
10607
10856
|
afterLabelContent
|
|
10608
10857
|
}),
|
|
10609
|
-
/* @__PURE__ */ (0,
|
|
10610
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
10858
|
+
/* @__PURE__ */ (0, import_jsx_runtime289.jsx)(import_react_select2.default, { ...reactSelectProps, ref }),
|
|
10859
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
10611
10860
|
]
|
|
10612
10861
|
}
|
|
10613
10862
|
);
|
|
@@ -10633,7 +10882,7 @@ var NativeSelect_default = {
|
|
|
10633
10882
|
};
|
|
10634
10883
|
|
|
10635
10884
|
// src/components/Select/NativeSelect/NativeSelect.tsx
|
|
10636
|
-
var
|
|
10885
|
+
var import_jsx_runtime290 = require("react/jsx-runtime");
|
|
10637
10886
|
var NativeSelect = ({
|
|
10638
10887
|
ref,
|
|
10639
10888
|
id,
|
|
@@ -10655,6 +10904,7 @@ var NativeSelect = ({
|
|
|
10655
10904
|
clearable,
|
|
10656
10905
|
afterLabelContent,
|
|
10657
10906
|
onChange,
|
|
10907
|
+
icon,
|
|
10658
10908
|
...rest
|
|
10659
10909
|
}) => {
|
|
10660
10910
|
const { t } = useTranslation();
|
|
@@ -10700,7 +10950,8 @@ var NativeSelect = ({
|
|
|
10700
10950
|
};
|
|
10701
10951
|
const iconSize = componentSize === "medium" ? "medium" : "small";
|
|
10702
10952
|
const showClearButton = clearable && hasValue && !readOnly && !rest.disabled;
|
|
10703
|
-
|
|
10953
|
+
const hasIcon = !!icon;
|
|
10954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime290.jsxs)("div", { className, style, children: [
|
|
10704
10955
|
renderLabel({
|
|
10705
10956
|
label,
|
|
10706
10957
|
htmlFor: uniqueId,
|
|
@@ -10708,8 +10959,19 @@ var NativeSelect = ({
|
|
|
10708
10959
|
readOnly,
|
|
10709
10960
|
afterLabelContent
|
|
10710
10961
|
}),
|
|
10711
|
-
/* @__PURE__ */ (0,
|
|
10712
|
-
/* @__PURE__ */ (0,
|
|
10962
|
+
/* @__PURE__ */ (0, import_jsx_runtime290.jsxs)(Box, { position: "relative", width: inputWidth, children: [
|
|
10963
|
+
hasIcon && /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
|
|
10964
|
+
Icon,
|
|
10965
|
+
{
|
|
10966
|
+
icon,
|
|
10967
|
+
className: cn(
|
|
10968
|
+
Input_default["input-group__absolute-el"],
|
|
10969
|
+
Input_default[`input-group__absolute-el--${componentSize}`]
|
|
10970
|
+
),
|
|
10971
|
+
iconSize: getFormInputIconSize(componentSize)
|
|
10972
|
+
}
|
|
10973
|
+
),
|
|
10974
|
+
/* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
|
|
10713
10975
|
"select",
|
|
10714
10976
|
{
|
|
10715
10977
|
ref: useCombinedRef(ref, selectRef),
|
|
@@ -10720,6 +10982,7 @@ var NativeSelect = ({
|
|
|
10720
10982
|
readOnly && NativeSelect_default["select--readonly"],
|
|
10721
10983
|
Input_default.input,
|
|
10722
10984
|
Input_default[`input--${componentSize}`],
|
|
10985
|
+
hasIcon && Input_default[`input-with-icon--${componentSize}`],
|
|
10723
10986
|
NativeSelect_default[`select--${componentSize}`],
|
|
10724
10987
|
scrollbar,
|
|
10725
10988
|
focusable,
|
|
@@ -10743,7 +11006,7 @@ var NativeSelect = ({
|
|
|
10743
11006
|
children
|
|
10744
11007
|
}
|
|
10745
11008
|
),
|
|
10746
|
-
showClearButton && /* @__PURE__ */ (0,
|
|
11009
|
+
showClearButton && /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
|
|
10747
11010
|
ClearButton,
|
|
10748
11011
|
{
|
|
10749
11012
|
"aria-label": t(commonTexts.clearSelect),
|
|
@@ -10752,7 +11015,7 @@ var NativeSelect = ({
|
|
|
10752
11015
|
className: NativeSelect_default[`clear-button--${iconSize}`]
|
|
10753
11016
|
}
|
|
10754
11017
|
),
|
|
10755
|
-
!multiple && /* @__PURE__ */ (0,
|
|
11018
|
+
!multiple && /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
|
|
10756
11019
|
Icon,
|
|
10757
11020
|
{
|
|
10758
11021
|
icon: ChevronDownIcon,
|
|
@@ -10761,21 +11024,21 @@ var NativeSelect = ({
|
|
|
10761
11024
|
}
|
|
10762
11025
|
)
|
|
10763
11026
|
] }),
|
|
10764
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
11027
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
10765
11028
|
] });
|
|
10766
11029
|
};
|
|
10767
11030
|
var NativeSelectPlaceholder = ({
|
|
10768
11031
|
children = "-- Velg fra listen --",
|
|
10769
11032
|
value,
|
|
10770
11033
|
...rest
|
|
10771
|
-
}) => /* @__PURE__ */ (0,
|
|
11034
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime290.jsx)("option", { value: value != null ? value : "", selected: true, ...rest, children });
|
|
10772
11035
|
NativeSelectPlaceholder.displayName = "NativeSelectPlaceholder";
|
|
10773
11036
|
|
|
10774
11037
|
// src/components/Select/utils.ts
|
|
10775
11038
|
var createSelectOptions = (...args) => args.map((v) => ({ label: v, value: v }));
|
|
10776
11039
|
|
|
10777
11040
|
// src/components/Pagination/Pagination.tsx
|
|
10778
|
-
var
|
|
11041
|
+
var import_jsx_runtime291 = require("react/jsx-runtime");
|
|
10779
11042
|
var Pagination = ({
|
|
10780
11043
|
itemsAmount,
|
|
10781
11044
|
defaultItemsPerPage = 10,
|
|
@@ -10784,12 +11047,7 @@ var Pagination = ({
|
|
|
10784
11047
|
withPagination = true,
|
|
10785
11048
|
withCounter,
|
|
10786
11049
|
withSelect,
|
|
10787
|
-
selectOptions
|
|
10788
|
-
{ label: "10", value: 10 },
|
|
10789
|
-
{ label: "25", value: 25 },
|
|
10790
|
-
{ label: "50", value: 50 },
|
|
10791
|
-
{ label: "Alle", value: itemsAmount }
|
|
10792
|
-
],
|
|
11050
|
+
selectOptions,
|
|
10793
11051
|
smallScreenBreakpoint,
|
|
10794
11052
|
onChange,
|
|
10795
11053
|
onSelectOptionChange,
|
|
@@ -10800,7 +11058,13 @@ var Pagination = ({
|
|
|
10800
11058
|
...rest
|
|
10801
11059
|
}) => {
|
|
10802
11060
|
const { t } = useTranslation();
|
|
10803
|
-
|
|
11061
|
+
const tSelectOptions = selectOptions && selectOptions.length > 0 ? selectOptions : [
|
|
11062
|
+
{ label: "10", value: 10 },
|
|
11063
|
+
{ label: "25", value: 25 },
|
|
11064
|
+
{ label: "50", value: 50 },
|
|
11065
|
+
{ label: t(texts21.all), value: itemsAmount }
|
|
11066
|
+
];
|
|
11067
|
+
if (withSelect && !tSelectOptions.some((o) => o.value === defaultItemsPerPage)) {
|
|
10804
11068
|
console.warn(
|
|
10805
11069
|
`[Pagination] defaultItemsPerPage prop value (${defaultItemsPerPage}) is not included in customOptions prop. Please add it to ensure it appears in the dropdown.`
|
|
10806
11070
|
);
|
|
@@ -10828,7 +11092,7 @@ var Pagination = ({
|
|
|
10828
11092
|
};
|
|
10829
11093
|
const listItems = items.length > 0 ? items.map((item, i) => {
|
|
10830
11094
|
const isActive = item === activePage;
|
|
10831
|
-
return /* @__PURE__ */ (0,
|
|
11095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime291.jsx)("li", { className: Pagination_default.list__item, children: item !== "truncator" && typeof item === "number" ? /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
10832
11096
|
Button,
|
|
10833
11097
|
{
|
|
10834
11098
|
purpose: isActive ? "primary" : "secondary",
|
|
@@ -10836,10 +11100,10 @@ var Pagination = ({
|
|
|
10836
11100
|
onClick: (event) => {
|
|
10837
11101
|
onPageChange(event, item);
|
|
10838
11102
|
},
|
|
10839
|
-
"aria-label": isActive ? t(
|
|
11103
|
+
"aria-label": isActive ? t(texts21.currentPage(item)) : t(texts21.page(item)),
|
|
10840
11104
|
children: item
|
|
10841
11105
|
}
|
|
10842
|
-
) : /* @__PURE__ */ (0,
|
|
11106
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
10843
11107
|
Icon,
|
|
10844
11108
|
{
|
|
10845
11109
|
icon: MoreHorizontalIcon,
|
|
@@ -10847,7 +11111,7 @@ var Pagination = ({
|
|
|
10847
11111
|
}
|
|
10848
11112
|
) }, `pagination-item-${i}`);
|
|
10849
11113
|
}) : void 0;
|
|
10850
|
-
const previousPageButton = /* @__PURE__ */ (0,
|
|
11114
|
+
const previousPageButton = /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
10851
11115
|
Button,
|
|
10852
11116
|
{
|
|
10853
11117
|
purpose: "secondary",
|
|
@@ -10856,10 +11120,10 @@ var Pagination = ({
|
|
|
10856
11120
|
onClick: (event) => {
|
|
10857
11121
|
onPageChange(event, activePage - 1);
|
|
10858
11122
|
},
|
|
10859
|
-
"aria-label": t(
|
|
11123
|
+
"aria-label": t(texts21.previousPage)
|
|
10860
11124
|
}
|
|
10861
11125
|
);
|
|
10862
|
-
const nextPageButton = /* @__PURE__ */ (0,
|
|
11126
|
+
const nextPageButton = /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
10863
11127
|
Button,
|
|
10864
11128
|
{
|
|
10865
11129
|
purpose: "secondary",
|
|
@@ -10868,31 +11132,31 @@ var Pagination = ({
|
|
|
10868
11132
|
onClick: (event) => {
|
|
10869
11133
|
onPageChange(event, activePage + 1);
|
|
10870
11134
|
},
|
|
10871
|
-
"aria-label": t(
|
|
11135
|
+
"aria-label": t(texts21.nextPage)
|
|
10872
11136
|
}
|
|
10873
11137
|
);
|
|
10874
11138
|
const isOnFirstPage = activePage === 1;
|
|
10875
11139
|
const isOnLastPage = activePage === pagesLength;
|
|
10876
|
-
const navigation = withPagination ? /* @__PURE__ */ (0,
|
|
11140
|
+
const navigation = withPagination ? /* @__PURE__ */ (0, import_jsx_runtime291.jsxs)(
|
|
10877
11141
|
Box,
|
|
10878
11142
|
{
|
|
10879
11143
|
as: "nav",
|
|
10880
11144
|
ref,
|
|
10881
|
-
"aria-label": t(
|
|
11145
|
+
"aria-label": t(texts21.pagination),
|
|
10882
11146
|
display: "flex",
|
|
10883
11147
|
alignItems: "center",
|
|
10884
11148
|
...!withSelect && !withCounter && {
|
|
10885
11149
|
...getBaseHTMLProps(id, className, htmlProps, rest)
|
|
10886
11150
|
},
|
|
10887
11151
|
children: [
|
|
10888
|
-
/* @__PURE__ */ (0,
|
|
11152
|
+
/* @__PURE__ */ (0, import_jsx_runtime291.jsxs)(
|
|
10889
11153
|
ShowHide,
|
|
10890
11154
|
{
|
|
10891
11155
|
as: "ol",
|
|
10892
11156
|
hideBelow: smallScreenBreakpoint,
|
|
10893
11157
|
className: Pagination_default.list,
|
|
10894
11158
|
children: [
|
|
10895
|
-
/* @__PURE__ */ (0,
|
|
11159
|
+
/* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
10896
11160
|
"li",
|
|
10897
11161
|
{
|
|
10898
11162
|
className: cn(
|
|
@@ -10904,7 +11168,7 @@ var Pagination = ({
|
|
|
10904
11168
|
}
|
|
10905
11169
|
),
|
|
10906
11170
|
listItems,
|
|
10907
|
-
/* @__PURE__ */ (0,
|
|
11171
|
+
/* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
10908
11172
|
"li",
|
|
10909
11173
|
{
|
|
10910
11174
|
className: cn(
|
|
@@ -10918,14 +11182,14 @@ var Pagination = ({
|
|
|
10918
11182
|
]
|
|
10919
11183
|
}
|
|
10920
11184
|
),
|
|
10921
|
-
!!smallScreenBreakpoint && /* @__PURE__ */ (0,
|
|
11185
|
+
!!smallScreenBreakpoint && /* @__PURE__ */ (0, import_jsx_runtime291.jsxs)(
|
|
10922
11186
|
ShowHide,
|
|
10923
11187
|
{
|
|
10924
11188
|
as: "ol",
|
|
10925
11189
|
showBelow: smallScreenBreakpoint,
|
|
10926
11190
|
className: Pagination_default.list,
|
|
10927
11191
|
children: [
|
|
10928
|
-
/* @__PURE__ */ (0,
|
|
11192
|
+
/* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
10929
11193
|
"li",
|
|
10930
11194
|
{
|
|
10931
11195
|
className: cn(
|
|
@@ -10933,7 +11197,7 @@ var Pagination = ({
|
|
|
10933
11197
|
isOnFirstPage && Pagination_default["list__item--hidden"]
|
|
10934
11198
|
),
|
|
10935
11199
|
"aria-hidden": isOnFirstPage,
|
|
10936
|
-
children: /* @__PURE__ */ (0,
|
|
11200
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
10937
11201
|
Button,
|
|
10938
11202
|
{
|
|
10939
11203
|
purpose: "secondary",
|
|
@@ -10942,12 +11206,12 @@ var Pagination = ({
|
|
|
10942
11206
|
onClick: (event) => {
|
|
10943
11207
|
onPageChange(event, 1);
|
|
10944
11208
|
},
|
|
10945
|
-
"aria-label": t(
|
|
11209
|
+
"aria-label": t(texts21.firstPage)
|
|
10946
11210
|
}
|
|
10947
11211
|
)
|
|
10948
11212
|
}
|
|
10949
11213
|
),
|
|
10950
|
-
/* @__PURE__ */ (0,
|
|
11214
|
+
/* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
10951
11215
|
"li",
|
|
10952
11216
|
{
|
|
10953
11217
|
className: cn(
|
|
@@ -10958,7 +11222,7 @@ var Pagination = ({
|
|
|
10958
11222
|
children: previousPageButton
|
|
10959
11223
|
}
|
|
10960
11224
|
),
|
|
10961
|
-
/* @__PURE__ */ (0,
|
|
11225
|
+
/* @__PURE__ */ (0, import_jsx_runtime291.jsx)("li", { className: Pagination_default.list__item, children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
10962
11226
|
Button,
|
|
10963
11227
|
{
|
|
10964
11228
|
size: "small",
|
|
@@ -10968,7 +11232,7 @@ var Pagination = ({
|
|
|
10968
11232
|
children: activePage
|
|
10969
11233
|
}
|
|
10970
11234
|
) }),
|
|
10971
|
-
/* @__PURE__ */ (0,
|
|
11235
|
+
/* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
10972
11236
|
"li",
|
|
10973
11237
|
{
|
|
10974
11238
|
className: cn(
|
|
@@ -10979,7 +11243,7 @@ var Pagination = ({
|
|
|
10979
11243
|
children: nextPageButton
|
|
10980
11244
|
}
|
|
10981
11245
|
),
|
|
10982
|
-
/* @__PURE__ */ (0,
|
|
11246
|
+
/* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
10983
11247
|
"li",
|
|
10984
11248
|
{
|
|
10985
11249
|
className: cn(
|
|
@@ -10987,7 +11251,7 @@ var Pagination = ({
|
|
|
10987
11251
|
isOnLastPage && Pagination_default["list__item--hidden"]
|
|
10988
11252
|
),
|
|
10989
11253
|
"aria-hidden": isOnLastPage,
|
|
10990
|
-
children: /* @__PURE__ */ (0,
|
|
11254
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
10991
11255
|
Button,
|
|
10992
11256
|
{
|
|
10993
11257
|
purpose: "secondary",
|
|
@@ -10996,7 +11260,7 @@ var Pagination = ({
|
|
|
10996
11260
|
onClick: (event) => {
|
|
10997
11261
|
onPageChange(event, pagesLength);
|
|
10998
11262
|
},
|
|
10999
|
-
"aria-label": t(
|
|
11263
|
+
"aria-label": t(texts21.lastPage)
|
|
11000
11264
|
}
|
|
11001
11265
|
)
|
|
11002
11266
|
}
|
|
@@ -11009,7 +11273,7 @@ var Pagination = ({
|
|
|
11009
11273
|
) : null;
|
|
11010
11274
|
const activePageFirstItem = activePage === 1 ? 1 : activePage * itemsPerPage - itemsPerPage + 1;
|
|
11011
11275
|
const activePageLastItem = activePage === pagesLength ? itemsAmount : activePage * itemsPerPage;
|
|
11012
|
-
return !withCounter && !withSelect ? navigation : /* @__PURE__ */ (0,
|
|
11276
|
+
return !withCounter && !withSelect ? navigation : /* @__PURE__ */ (0, import_jsx_runtime291.jsxs)(
|
|
11013
11277
|
Box,
|
|
11014
11278
|
{
|
|
11015
11279
|
display: "flex",
|
|
@@ -11020,11 +11284,11 @@ var Pagination = ({
|
|
|
11020
11284
|
alignItems: styleUpToBreakpoint("center", smallScreenBreakpoint),
|
|
11021
11285
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
11022
11286
|
children: [
|
|
11023
|
-
/* @__PURE__ */ (0,
|
|
11024
|
-
withSelect && /* @__PURE__ */ (0,
|
|
11287
|
+
/* @__PURE__ */ (0, import_jsx_runtime291.jsxs)("div", { className: Pagination_default.indicators, children: [
|
|
11288
|
+
withSelect && /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
11025
11289
|
Select,
|
|
11026
11290
|
{
|
|
11027
|
-
options:
|
|
11291
|
+
options: tSelectOptions,
|
|
11028
11292
|
isSearchable: false,
|
|
11029
11293
|
width: "90px",
|
|
11030
11294
|
defaultValue: {
|
|
@@ -11034,11 +11298,11 @@ var Pagination = ({
|
|
|
11034
11298
|
isClearable: false,
|
|
11035
11299
|
onChange: handleSelectChange,
|
|
11036
11300
|
componentSize: "small",
|
|
11037
|
-
"aria-label": t(
|
|
11301
|
+
"aria-label": t(texts21.itemsPerPage)
|
|
11038
11302
|
}
|
|
11039
11303
|
),
|
|
11040
|
-
withCounter && /* @__PURE__ */ (0,
|
|
11041
|
-
|
|
11304
|
+
withCounter && /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(Paragraph, { children: t(
|
|
11305
|
+
texts21.showsAmountOfTotalItems(
|
|
11042
11306
|
activePageFirstItem,
|
|
11043
11307
|
activePageLastItem,
|
|
11044
11308
|
itemsAmount
|
|
@@ -11051,61 +11315,77 @@ var Pagination = ({
|
|
|
11051
11315
|
);
|
|
11052
11316
|
};
|
|
11053
11317
|
Pagination.displayName = "Pagination";
|
|
11054
|
-
var
|
|
11318
|
+
var texts21 = createTexts({
|
|
11055
11319
|
pagination: {
|
|
11056
11320
|
nb: "Paginering",
|
|
11057
11321
|
no: "Paginering",
|
|
11058
11322
|
nn: "Paginering",
|
|
11059
|
-
en: "Pagination"
|
|
11323
|
+
en: "Pagination",
|
|
11324
|
+
se: "Pagineren"
|
|
11060
11325
|
},
|
|
11061
11326
|
itemsPerPage: {
|
|
11062
11327
|
nb: "Elementer per side",
|
|
11063
11328
|
no: "Elementer per side",
|
|
11064
11329
|
nn: "Element per side",
|
|
11065
|
-
en: "Items per page"
|
|
11330
|
+
en: "Items per page",
|
|
11331
|
+
se: "Elementat juohki siidui"
|
|
11066
11332
|
},
|
|
11067
11333
|
nextPage: {
|
|
11068
11334
|
nb: "Neste side",
|
|
11069
11335
|
no: "Neste side",
|
|
11070
11336
|
nn: "Neste side",
|
|
11071
|
-
en: "Next page"
|
|
11337
|
+
en: "Next page",
|
|
11338
|
+
se: "Boahte siidu"
|
|
11072
11339
|
},
|
|
11073
11340
|
previousPage: {
|
|
11074
11341
|
nb: "Forrige side",
|
|
11075
11342
|
no: "Forrige side",
|
|
11076
11343
|
nn: "F\xF8rre side",
|
|
11077
|
-
en: "Previous page"
|
|
11344
|
+
en: "Previous page",
|
|
11345
|
+
se: "Ovddit siidu"
|
|
11078
11346
|
},
|
|
11079
11347
|
firstPage: {
|
|
11080
11348
|
nb: "F\xF8rste side",
|
|
11081
11349
|
no: "F\xF8rste side",
|
|
11082
11350
|
nn: "Fyrste side",
|
|
11083
|
-
en: "First page"
|
|
11351
|
+
en: "First page",
|
|
11352
|
+
se: "Vustta\u0161 siidu"
|
|
11084
11353
|
},
|
|
11085
11354
|
lastPage: {
|
|
11086
11355
|
nb: "Siste side",
|
|
11087
11356
|
no: "Siste side",
|
|
11088
11357
|
nn: "Siste side",
|
|
11089
|
-
en: "Last page"
|
|
11358
|
+
en: "Last page",
|
|
11359
|
+
se: "Ma\u014Bimu\u0161 siidu"
|
|
11090
11360
|
},
|
|
11091
11361
|
currentPage: (page) => ({
|
|
11092
11362
|
nb: `N\xE5v\xE6rende side (${page})`,
|
|
11093
11363
|
no: `N\xE5v\xE6rende side (${page})`,
|
|
11094
11364
|
nn: `Noverande side (${page})`,
|
|
11095
|
-
en: `Current page (${page})
|
|
11365
|
+
en: `Current page (${page})`,
|
|
11366
|
+
se: `D\xE1la siidu (${page})`
|
|
11096
11367
|
}),
|
|
11097
11368
|
page: (page) => ({
|
|
11098
11369
|
nb: `Side ${page}`,
|
|
11099
11370
|
no: `Side ${page}`,
|
|
11100
11371
|
nn: `Side ${page}`,
|
|
11101
|
-
en: `Page ${page}
|
|
11372
|
+
en: `Page ${page}`,
|
|
11373
|
+
se: `Siidu ${page}`
|
|
11102
11374
|
}),
|
|
11103
11375
|
showsAmountOfTotalItems: (first, last, total) => ({
|
|
11104
11376
|
nb: `Viser ${first}-${last} av ${total}`,
|
|
11105
11377
|
no: `Viser ${first}-${last} av ${total}`,
|
|
11106
11378
|
nn: `Viser ${first}-${last} av ${total}`,
|
|
11107
|
-
en: `Shows ${first}-${last} of ${total}
|
|
11108
|
-
|
|
11379
|
+
en: `Shows ${first}-${last} of ${total}`,
|
|
11380
|
+
se: `\u010C\xE1jeha ${first}-${last} ${total} gaskkas`
|
|
11381
|
+
}),
|
|
11382
|
+
all: {
|
|
11383
|
+
nb: "Alle",
|
|
11384
|
+
no: "Alle",
|
|
11385
|
+
nn: "Alle",
|
|
11386
|
+
en: "All",
|
|
11387
|
+
se: "Buot"
|
|
11388
|
+
}
|
|
11109
11389
|
});
|
|
11110
11390
|
|
|
11111
11391
|
// src/components/PhoneInput/PhoneInput.tsx
|
|
@@ -11509,7 +11789,7 @@ var PhoneInput_default = {
|
|
|
11509
11789
|
};
|
|
11510
11790
|
|
|
11511
11791
|
// src/components/PhoneInput/PhoneInput.tsx
|
|
11512
|
-
var
|
|
11792
|
+
var import_jsx_runtime292 = require("react/jsx-runtime");
|
|
11513
11793
|
var prioritizedCountries = [
|
|
11514
11794
|
COUNTRIES.NO,
|
|
11515
11795
|
COUNTRIES.SE,
|
|
@@ -11556,21 +11836,21 @@ var PhoneInput = ({
|
|
|
11556
11836
|
className,
|
|
11557
11837
|
style,
|
|
11558
11838
|
value,
|
|
11559
|
-
selectLabel
|
|
11839
|
+
selectLabel,
|
|
11560
11840
|
selectRef,
|
|
11561
11841
|
onChange,
|
|
11562
11842
|
defaultValue,
|
|
11563
11843
|
"aria-required": ariaRequired,
|
|
11564
11844
|
"aria-describedby": ariaDescribedby,
|
|
11565
|
-
groupLabel
|
|
11845
|
+
groupLabel,
|
|
11566
11846
|
afterLabelContent,
|
|
11567
11847
|
ref,
|
|
11568
11848
|
...props
|
|
11569
11849
|
}) => {
|
|
11570
11850
|
var _a;
|
|
11571
11851
|
const { t } = useTranslation();
|
|
11572
|
-
const tGroupLabel = groupLabel != null ? groupLabel : t(
|
|
11573
|
-
const tSelectLabel = selectLabel != null ? selectLabel : t(
|
|
11852
|
+
const tGroupLabel = groupLabel != null ? groupLabel : t(texts22.countryCodeAndPhoneNumber);
|
|
11853
|
+
const tSelectLabel = selectLabel != null ? selectLabel : t(texts22.countryCode);
|
|
11574
11854
|
const generatedId = (0, import_react74.useId)();
|
|
11575
11855
|
const uniqueId = (_a = props.id) != null ? _a : generatedId;
|
|
11576
11856
|
const phoneInputId = `${uniqueId}-phone-input`;
|
|
@@ -11647,7 +11927,7 @@ var PhoneInput = ({
|
|
|
11647
11927
|
const showRequiredStyling = !!(required || ariaRequired);
|
|
11648
11928
|
const bp = props.smallScreenBreakpoint;
|
|
11649
11929
|
const widthDefault = componentSize === "xsmall" && "var(--dds-input-default-width-xsmall)";
|
|
11650
|
-
return /* @__PURE__ */ (0,
|
|
11930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime292.jsxs)("div", { className: cn(className, Input_default.container), style, children: [
|
|
11651
11931
|
renderLabel({
|
|
11652
11932
|
label,
|
|
11653
11933
|
htmlFor: phoneNumberId,
|
|
@@ -11655,7 +11935,7 @@ var PhoneInput = ({
|
|
|
11655
11935
|
readOnly,
|
|
11656
11936
|
afterLabelContent
|
|
11657
11937
|
}),
|
|
11658
|
-
/* @__PURE__ */ (0,
|
|
11938
|
+
/* @__PURE__ */ (0, import_jsx_runtime292.jsxs)(
|
|
11659
11939
|
Box,
|
|
11660
11940
|
{
|
|
11661
11941
|
display: "flex",
|
|
@@ -11668,8 +11948,8 @@ var PhoneInput = ({
|
|
|
11668
11948
|
role: "group",
|
|
11669
11949
|
"aria-label": tGroupLabel,
|
|
11670
11950
|
children: [
|
|
11671
|
-
/* @__PURE__ */ (0,
|
|
11672
|
-
/* @__PURE__ */ (0,
|
|
11951
|
+
/* @__PURE__ */ (0, import_jsx_runtime292.jsx)("label", { className: utilStyles_default["visually-hidden"], htmlFor: selectId, children: tSelectLabel }),
|
|
11952
|
+
/* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
|
|
11673
11953
|
NativeSelect,
|
|
11674
11954
|
{
|
|
11675
11955
|
width: styleUpToBreakpoint(
|
|
@@ -11690,23 +11970,23 @@ var PhoneInput = ({
|
|
|
11690
11970
|
hasTip ? tipId : void 0,
|
|
11691
11971
|
ariaDescribedby
|
|
11692
11972
|
]),
|
|
11693
|
-
children: countryOptions.map((item, index) => /* @__PURE__ */ (0,
|
|
11973
|
+
children: countryOptions.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime292.jsx)("option", { value: item.countryCode, children: item.label }, index))
|
|
11694
11974
|
}
|
|
11695
11975
|
),
|
|
11696
|
-
/* @__PURE__ */ (0,
|
|
11697
|
-
/* @__PURE__ */ (0,
|
|
11976
|
+
/* @__PURE__ */ (0, import_jsx_runtime292.jsxs)(Box, { width: "100%", className: Input_default["input-group"], children: [
|
|
11977
|
+
/* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
|
|
11698
11978
|
"span",
|
|
11699
11979
|
{
|
|
11700
11980
|
className: cn(
|
|
11701
11981
|
typographyStyles_default[`body-${componentSize}`],
|
|
11702
|
-
Input_default["input-group__absolute-
|
|
11982
|
+
Input_default["input-group__absolute-el"],
|
|
11703
11983
|
PhoneInput_default["calling-code"]
|
|
11704
11984
|
),
|
|
11705
11985
|
ref: callingCodeRef,
|
|
11706
11986
|
children: callingCode
|
|
11707
11987
|
}
|
|
11708
11988
|
),
|
|
11709
|
-
/* @__PURE__ */ (0,
|
|
11989
|
+
/* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
|
|
11710
11990
|
Box,
|
|
11711
11991
|
{
|
|
11712
11992
|
as: StatefulInput,
|
|
@@ -11736,7 +12016,7 @@ var PhoneInput = ({
|
|
|
11736
12016
|
]
|
|
11737
12017
|
}
|
|
11738
12018
|
),
|
|
11739
|
-
hasMessage && renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
12019
|
+
hasMessage && renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
11740
12020
|
] });
|
|
11741
12021
|
};
|
|
11742
12022
|
PhoneInput.displayName = "PhoneInput";
|
|
@@ -11744,18 +12024,20 @@ var getCallingCode = (s) => {
|
|
|
11744
12024
|
var _a;
|
|
11745
12025
|
return (_a = s.substring(s.indexOf("+"), s.length)) != null ? _a : "";
|
|
11746
12026
|
};
|
|
11747
|
-
var
|
|
12027
|
+
var texts22 = createTexts({
|
|
11748
12028
|
countryCode: {
|
|
11749
12029
|
nb: "Landskode",
|
|
11750
12030
|
no: "Landskode",
|
|
11751
12031
|
nn: "Landskode",
|
|
11752
|
-
en: "Country code"
|
|
12032
|
+
en: "Country code",
|
|
12033
|
+
se: "Riikkakoda"
|
|
11753
12034
|
},
|
|
11754
12035
|
countryCodeAndPhoneNumber: {
|
|
11755
12036
|
nb: "Landskode og telefonnummer",
|
|
11756
12037
|
no: "Landskode og telefonnummer",
|
|
11757
12038
|
nn: "Landskode og telefonnummer",
|
|
11758
|
-
en: "Country code and phone number"
|
|
12039
|
+
en: "Country code and phone number",
|
|
12040
|
+
se: "Riikkakoda ja telefovnndanummir"
|
|
11759
12041
|
}
|
|
11760
12042
|
});
|
|
11761
12043
|
|
|
@@ -11777,7 +12059,7 @@ var PopoverContext = (0, import_react75.createContext)({});
|
|
|
11777
12059
|
var usePopoverContext = () => (0, import_react75.useContext)(PopoverContext);
|
|
11778
12060
|
|
|
11779
12061
|
// src/components/Popover/Popover.tsx
|
|
11780
|
-
var
|
|
12062
|
+
var import_jsx_runtime293 = require("react/jsx-runtime");
|
|
11781
12063
|
var Popover = ({
|
|
11782
12064
|
id,
|
|
11783
12065
|
header,
|
|
@@ -11865,7 +12147,7 @@ var Popover = ({
|
|
|
11865
12147
|
});
|
|
11866
12148
|
const hasTitle = !!header;
|
|
11867
12149
|
const openCn = hasTransitionedIn && isOpen ? "open" : "closed";
|
|
11868
|
-
const popover = /* @__PURE__ */ (0,
|
|
12150
|
+
const popover = /* @__PURE__ */ (0, import_jsx_runtime293.jsxs)(
|
|
11869
12151
|
Paper,
|
|
11870
12152
|
{
|
|
11871
12153
|
...getBaseHTMLProps(
|
|
@@ -11896,15 +12178,15 @@ var Popover = ({
|
|
|
11896
12178
|
elevation: 3,
|
|
11897
12179
|
border: "border-subtle",
|
|
11898
12180
|
children: [
|
|
11899
|
-
header && /* @__PURE__ */ (0,
|
|
11900
|
-
/* @__PURE__ */ (0,
|
|
12181
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime293.jsx)("div", { className: Popover_default.header, children: typeof header === "string" ? /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(Heading, { level: 2, typographyType: "headingMedium", children: header }) : header }),
|
|
12182
|
+
/* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
|
|
11901
12183
|
"div",
|
|
11902
12184
|
{
|
|
11903
12185
|
className: !hasTitle && withCloseButton ? Popover_default["content--closable--no-header"] : "",
|
|
11904
12186
|
children
|
|
11905
12187
|
}
|
|
11906
12188
|
),
|
|
11907
|
-
withCloseButton && /* @__PURE__ */ (0,
|
|
12189
|
+
withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
|
|
11908
12190
|
Button,
|
|
11909
12191
|
{
|
|
11910
12192
|
icon: CloseIcon,
|
|
@@ -11924,7 +12206,7 @@ Popover.displayName = "Popover";
|
|
|
11924
12206
|
|
|
11925
12207
|
// src/components/Popover/PopoverGroup.tsx
|
|
11926
12208
|
var import_react77 = require("react");
|
|
11927
|
-
var
|
|
12209
|
+
var import_jsx_runtime294 = require("react/jsx-runtime");
|
|
11928
12210
|
var PopoverGroup = ({
|
|
11929
12211
|
isOpen: propIsOpen,
|
|
11930
12212
|
setIsOpen: propSetIsOpen,
|
|
@@ -11985,7 +12267,7 @@ var PopoverGroup = ({
|
|
|
11985
12267
|
ref: combinedAnchorRef
|
|
11986
12268
|
}) : child);
|
|
11987
12269
|
});
|
|
11988
|
-
return /* @__PURE__ */ (0,
|
|
12270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
11989
12271
|
PopoverContext,
|
|
11990
12272
|
{
|
|
11991
12273
|
value: {
|
|
@@ -12036,7 +12318,7 @@ var ProgressTracker_default = {
|
|
|
12036
12318
|
|
|
12037
12319
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
12038
12320
|
var import_react79 = require("react");
|
|
12039
|
-
var
|
|
12321
|
+
var import_jsx_runtime295 = require("react/jsx-runtime");
|
|
12040
12322
|
var toItemState = (active, completed, disabled) => {
|
|
12041
12323
|
if (disabled) {
|
|
12042
12324
|
return "disabled";
|
|
@@ -12080,10 +12362,10 @@ var ProgressTrackerItem = (props) => {
|
|
|
12080
12362
|
};
|
|
12081
12363
|
const stepNumberContent = (0, import_react79.useMemo)(() => {
|
|
12082
12364
|
if (completed) {
|
|
12083
|
-
return /* @__PURE__ */ (0,
|
|
12365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(Icon, { icon: CheckIcon, iconSize: "small" });
|
|
12084
12366
|
}
|
|
12085
12367
|
if (icon !== void 0) {
|
|
12086
|
-
return /* @__PURE__ */ (0,
|
|
12368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(Icon, { icon, iconSize: "small" });
|
|
12087
12369
|
}
|
|
12088
12370
|
return stepNumber;
|
|
12089
12371
|
}, [completed, icon, index]);
|
|
@@ -12092,8 +12374,8 @@ var ProgressTrackerItem = (props) => {
|
|
|
12092
12374
|
if (active) return "text-action-resting";
|
|
12093
12375
|
}
|
|
12094
12376
|
const isInactiveLink = disabled || active;
|
|
12095
|
-
const stepContent = /* @__PURE__ */ (0,
|
|
12096
|
-
/* @__PURE__ */ (0,
|
|
12377
|
+
const stepContent = /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)(import_jsx_runtime295.Fragment, { children: [
|
|
12378
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
12097
12379
|
Box,
|
|
12098
12380
|
{
|
|
12099
12381
|
display: "flex",
|
|
@@ -12108,7 +12390,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
12108
12390
|
children: stepNumberContent
|
|
12109
12391
|
}
|
|
12110
12392
|
),
|
|
12111
|
-
/* @__PURE__ */ (0,
|
|
12393
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
12112
12394
|
Typography,
|
|
12113
12395
|
{
|
|
12114
12396
|
as: "div",
|
|
@@ -12122,15 +12404,15 @@ var ProgressTrackerItem = (props) => {
|
|
|
12122
12404
|
}
|
|
12123
12405
|
)
|
|
12124
12406
|
] });
|
|
12125
|
-
const ariaLabel = props["aria-label"] ? props["aria-label"] : `${children}, ${stepNumber}. ${completed ? t(
|
|
12126
|
-
return /* @__PURE__ */ (0,
|
|
12407
|
+
const ariaLabel = props["aria-label"] ? props["aria-label"] : `${children}, ${stepNumber}. ${completed ? t(texts23.completed) : t(texts23.uncompleted)}`;
|
|
12408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
12127
12409
|
Box,
|
|
12128
12410
|
{
|
|
12129
12411
|
as: "li",
|
|
12130
12412
|
display: direction === "row" ? "flex" : void 0,
|
|
12131
12413
|
"aria-current": active ? "step" : void 0,
|
|
12132
12414
|
className: cn(ProgressTracker_default["list-item"], ProgressTracker_default[`list-item--${direction}`]),
|
|
12133
|
-
children: handleStepChange ? /* @__PURE__ */ (0,
|
|
12415
|
+
children: handleStepChange ? /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
12134
12416
|
Box,
|
|
12135
12417
|
{
|
|
12136
12418
|
as: StylelessButton,
|
|
@@ -12154,7 +12436,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
12154
12436
|
disabled,
|
|
12155
12437
|
children: stepContent
|
|
12156
12438
|
}
|
|
12157
|
-
) : /* @__PURE__ */ (0,
|
|
12439
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
12158
12440
|
"div",
|
|
12159
12441
|
{
|
|
12160
12442
|
...getBaseHTMLProps(
|
|
@@ -12171,23 +12453,25 @@ var ProgressTrackerItem = (props) => {
|
|
|
12171
12453
|
);
|
|
12172
12454
|
};
|
|
12173
12455
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
12174
|
-
var
|
|
12456
|
+
var texts23 = createTexts({
|
|
12175
12457
|
uncompleted: {
|
|
12176
12458
|
nb: "trinn ikke ferdig",
|
|
12177
12459
|
no: "trinn ikke ferdig",
|
|
12178
12460
|
nn: "trinn ikkje ferdig",
|
|
12179
|
-
en: "step uncompleted"
|
|
12461
|
+
en: "step uncompleted",
|
|
12462
|
+
se: "ceahkki ii g\xE1rvvis"
|
|
12180
12463
|
},
|
|
12181
12464
|
completed: {
|
|
12182
12465
|
nb: "trinn ferdig",
|
|
12183
12466
|
no: "trinn ferdig",
|
|
12184
12467
|
nn: "trinn ferdig",
|
|
12185
|
-
en: "step completed"
|
|
12468
|
+
en: "step completed",
|
|
12469
|
+
se: "ceahkki g\xE1rv\xE1"
|
|
12186
12470
|
}
|
|
12187
12471
|
});
|
|
12188
12472
|
|
|
12189
12473
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
12190
|
-
var
|
|
12474
|
+
var import_jsx_runtime296 = require("react/jsx-runtime");
|
|
12191
12475
|
var ProgressTracker = (() => {
|
|
12192
12476
|
const Res = ({
|
|
12193
12477
|
id,
|
|
@@ -12217,7 +12501,7 @@ var ProgressTracker = (() => {
|
|
|
12217
12501
|
}, [children]);
|
|
12218
12502
|
const isRow = direction === "row";
|
|
12219
12503
|
const { "aria-label": ariaLabel } = htmlProps;
|
|
12220
|
-
return /* @__PURE__ */ (0,
|
|
12504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
12221
12505
|
ProgressTrackerContext,
|
|
12222
12506
|
{
|
|
12223
12507
|
value: {
|
|
@@ -12225,12 +12509,12 @@ var ProgressTracker = (() => {
|
|
|
12225
12509
|
handleStepChange: handleChange,
|
|
12226
12510
|
direction
|
|
12227
12511
|
},
|
|
12228
|
-
children: /* @__PURE__ */ (0,
|
|
12512
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
12229
12513
|
"nav",
|
|
12230
12514
|
{
|
|
12231
|
-
"aria-label": ariaLabel != null ? ariaLabel : t(
|
|
12515
|
+
"aria-label": ariaLabel != null ? ariaLabel : t(texts24.stepProgression),
|
|
12232
12516
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
12233
|
-
children: /* @__PURE__ */ (0,
|
|
12517
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
12234
12518
|
Box,
|
|
12235
12519
|
{
|
|
12236
12520
|
as: StylelessOList,
|
|
@@ -12266,12 +12550,13 @@ function passIndexPropToProgressTrackerItem(children) {
|
|
|
12266
12550
|
})
|
|
12267
12551
|
);
|
|
12268
12552
|
}
|
|
12269
|
-
var
|
|
12553
|
+
var texts24 = createTexts({
|
|
12270
12554
|
stepProgression: {
|
|
12271
12555
|
nb: "Trinnprogresjon",
|
|
12272
12556
|
no: "Trinnprogresjon",
|
|
12273
12557
|
nn: "Trinnprogresjon",
|
|
12274
|
-
en: "Step progression"
|
|
12558
|
+
en: "Step progression",
|
|
12559
|
+
se: "Ceahkkeprogre\u0161uvdna"
|
|
12275
12560
|
}
|
|
12276
12561
|
});
|
|
12277
12562
|
|
|
@@ -12289,7 +12574,7 @@ var ProgressBar_default = {
|
|
|
12289
12574
|
};
|
|
12290
12575
|
|
|
12291
12576
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
12292
|
-
var
|
|
12577
|
+
var import_jsx_runtime297 = require("react/jsx-runtime");
|
|
12293
12578
|
var PROGRESS_BAR_SIZES = createSizes("small", "medium");
|
|
12294
12579
|
var ProgressBar = ({
|
|
12295
12580
|
label,
|
|
@@ -12315,9 +12600,9 @@ var ProgressBar = ({
|
|
|
12315
12600
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
12316
12601
|
const fillPrecentage = hasValidValue && value / (max != null ? max : 1) * 100 + "%";
|
|
12317
12602
|
const isIndeterminate = !hasValidValue && !hasErrorMessage;
|
|
12318
|
-
return /* @__PURE__ */ (0,
|
|
12603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(Box, { width: "100%", className, style, children: [
|
|
12319
12604
|
renderLabel({ label, htmlFor: uniqueId }),
|
|
12320
|
-
/* @__PURE__ */ (0,
|
|
12605
|
+
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
12321
12606
|
"progress",
|
|
12322
12607
|
{
|
|
12323
12608
|
id: uniqueId,
|
|
@@ -12333,13 +12618,13 @@ var ProgressBar = ({
|
|
|
12333
12618
|
children: fillPrecentage
|
|
12334
12619
|
}
|
|
12335
12620
|
),
|
|
12336
|
-
/* @__PURE__ */ (0,
|
|
12621
|
+
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
12337
12622
|
Box,
|
|
12338
12623
|
{
|
|
12339
12624
|
width: getInputWidth(width),
|
|
12340
12625
|
height: size2 === "small" ? "x0.75" : "x1.5",
|
|
12341
12626
|
className: cn(ProgressBar_default.progress),
|
|
12342
|
-
children: /* @__PURE__ */ (0,
|
|
12627
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
12343
12628
|
Box,
|
|
12344
12629
|
{
|
|
12345
12630
|
height: "100%",
|
|
@@ -12354,7 +12639,7 @@ var ProgressBar = ({
|
|
|
12354
12639
|
)
|
|
12355
12640
|
}
|
|
12356
12641
|
),
|
|
12357
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
12642
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
12358
12643
|
] });
|
|
12359
12644
|
};
|
|
12360
12645
|
ProgressBar.displayName = "ProgressBar";
|
|
@@ -12373,7 +12658,6 @@ var useAutocompleteSearch = () => {
|
|
|
12373
12658
|
var Search_default = {
|
|
12374
12659
|
"with-button-container": "Search_with-button-container",
|
|
12375
12660
|
input: "Search_input",
|
|
12376
|
-
"search-icon": "Search_search-icon",
|
|
12377
12661
|
"clear-button": "Search_clear-button",
|
|
12378
12662
|
suggestions: "Search_suggestions"
|
|
12379
12663
|
};
|
|
@@ -12388,7 +12672,7 @@ var typographyTypes2 = {
|
|
|
12388
12672
|
|
|
12389
12673
|
// src/components/Search/SearchSuggestionItem.tsx
|
|
12390
12674
|
var import_react83 = require("react");
|
|
12391
|
-
var
|
|
12675
|
+
var import_jsx_runtime298 = require("react/jsx-runtime");
|
|
12392
12676
|
var SearchSuggestionItem = ({
|
|
12393
12677
|
focus,
|
|
12394
12678
|
className,
|
|
@@ -12403,7 +12687,7 @@ var SearchSuggestionItem = ({
|
|
|
12403
12687
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
12404
12688
|
}
|
|
12405
12689
|
}, [focus]);
|
|
12406
|
-
return /* @__PURE__ */ (0,
|
|
12690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
12407
12691
|
StylelessButton,
|
|
12408
12692
|
{
|
|
12409
12693
|
ref: combinedRef,
|
|
@@ -12421,7 +12705,7 @@ var SearchSuggestionItem = ({
|
|
|
12421
12705
|
SearchSuggestionItem.displayName = "SearchSuggestionItem";
|
|
12422
12706
|
|
|
12423
12707
|
// src/components/Search/SearchSuggestions.tsx
|
|
12424
|
-
var
|
|
12708
|
+
var import_jsx_runtime299 = require("react/jsx-runtime");
|
|
12425
12709
|
var SearchSuggestions = ({
|
|
12426
12710
|
id,
|
|
12427
12711
|
searchId,
|
|
@@ -12441,7 +12725,7 @@ var SearchSuggestions = ({
|
|
|
12441
12725
|
const { t } = useTranslation();
|
|
12442
12726
|
const [focus] = useRoveFocus(suggestions == null ? void 0 : suggestions.length, showSuggestions);
|
|
12443
12727
|
const suggestionsToRender = maxSuggestions ? suggestions == null ? void 0 : suggestions.slice(maxSuggestions) : suggestions;
|
|
12444
|
-
return /* @__PURE__ */ (0,
|
|
12728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(
|
|
12445
12729
|
Paper,
|
|
12446
12730
|
{
|
|
12447
12731
|
...getBaseHTMLProps(
|
|
@@ -12465,23 +12749,23 @@ var SearchSuggestions = ({
|
|
|
12465
12749
|
overflowY: "scroll",
|
|
12466
12750
|
marginBlock: "x0.25 0",
|
|
12467
12751
|
children: [
|
|
12468
|
-
/* @__PURE__ */ (0,
|
|
12752
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
12469
12753
|
Box,
|
|
12470
12754
|
{
|
|
12471
12755
|
as: "h2",
|
|
12472
12756
|
paddingInline: "0 x1",
|
|
12473
12757
|
id: suggestionsHeaderId,
|
|
12474
12758
|
className: typographyStyles_default["body-xsmall"],
|
|
12475
|
-
children:
|
|
12759
|
+
children: t(texts25.searchSuggestions)
|
|
12476
12760
|
}
|
|
12477
12761
|
),
|
|
12478
|
-
/* @__PURE__ */ (0,
|
|
12479
|
-
return /* @__PURE__ */ (0,
|
|
12762
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(StylelessList, { role: "listbox", "aria-labelledby": suggestionsHeaderId, children: suggestionsToRender.map((suggestion, index) => {
|
|
12763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("li", { role: "option", children: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
12480
12764
|
SearchSuggestionItem,
|
|
12481
12765
|
{
|
|
12482
12766
|
index,
|
|
12483
12767
|
focus: focus === index && showSuggestions,
|
|
12484
|
-
"aria-label": t(
|
|
12768
|
+
"aria-label": t(texts25.search(suggestion)),
|
|
12485
12769
|
onClick: onSuggestionClick,
|
|
12486
12770
|
"aria-setsize": suggestionsToRender.length,
|
|
12487
12771
|
"aria-posinset": index,
|
|
@@ -12495,45 +12779,34 @@ var SearchSuggestions = ({
|
|
|
12495
12779
|
);
|
|
12496
12780
|
};
|
|
12497
12781
|
SearchSuggestions.displayName = "SearchSuggestions";
|
|
12498
|
-
var
|
|
12782
|
+
var texts25 = createTexts({
|
|
12499
12783
|
search: (suggestion) => ({
|
|
12500
12784
|
no: `${suggestion} s\xF8k`,
|
|
12501
12785
|
nb: `${suggestion} s\xF8k`,
|
|
12502
12786
|
nn: `${suggestion} s\xF8k`,
|
|
12503
|
-
en: `${suggestion} search
|
|
12504
|
-
|
|
12787
|
+
en: `${suggestion} search`,
|
|
12788
|
+
se: `${suggestion} ohcan`
|
|
12789
|
+
}),
|
|
12790
|
+
searchSuggestions: {
|
|
12791
|
+
no: "S\xF8keforslag",
|
|
12792
|
+
nb: "S\xF8keforslag",
|
|
12793
|
+
nn: "S\xF8keforslag",
|
|
12794
|
+
en: "Search suggestions",
|
|
12795
|
+
se: "Ozanf\xE1laldagat"
|
|
12796
|
+
}
|
|
12505
12797
|
});
|
|
12506
12798
|
|
|
12507
12799
|
// src/components/Search/Search.tsx
|
|
12508
|
-
var
|
|
12800
|
+
var import_jsx_runtime300 = require("react/jsx-runtime");
|
|
12509
12801
|
var getIconSize2 = (size2) => {
|
|
12510
12802
|
switch (size2) {
|
|
12511
12803
|
case "large":
|
|
12512
12804
|
return "medium";
|
|
12513
12805
|
case "medium":
|
|
12514
|
-
return "medium";
|
|
12515
12806
|
case "small":
|
|
12516
|
-
return
|
|
12807
|
+
return getFormInputIconSize(size2);
|
|
12517
12808
|
}
|
|
12518
12809
|
};
|
|
12519
|
-
var getPadding = (size2, showIcon) => {
|
|
12520
|
-
const paddingRight = (textSize) => `calc(
|
|
12521
|
-
var(--dds-spacing-x1) + ${textSize} * 1.5 + var(--dds-spacing-x0-5)
|
|
12522
|
-
)`;
|
|
12523
|
-
const paddingLeft = (iconSize) => `calc(
|
|
12524
|
-
var(--dds-spacing-x0-75) + ${iconSize} + var(--dds-spacing-x0-5)
|
|
12525
|
-
)`;
|
|
12526
|
-
const pRSmallButton = paddingRight("0.875rem");
|
|
12527
|
-
const pRMediumButton = paddingRight("1rem");
|
|
12528
|
-
const pLSmallIcon = paddingLeft("var(--dds-icon-size-small)");
|
|
12529
|
-
const pLMediumIcon = paddingLeft("var(--dds-icon-size-medium)");
|
|
12530
|
-
const paddingMap = {
|
|
12531
|
-
large: `x1 ${pRMediumButton} x1 ${showIcon ? pLMediumIcon : "x0.75"}`,
|
|
12532
|
-
medium: `x0.75 ${pRSmallButton} x0.75 ${showIcon ? pLMediumIcon : "x0.75"}`,
|
|
12533
|
-
small: `x0.5 ${pRSmallButton} x0.5 ${showIcon ? pLSmallIcon : "x0.75"}`
|
|
12534
|
-
};
|
|
12535
|
-
return paddingMap[size2];
|
|
12536
|
-
};
|
|
12537
12810
|
var Search = ({
|
|
12538
12811
|
componentSize = "medium",
|
|
12539
12812
|
buttonProps,
|
|
@@ -12581,25 +12854,25 @@ var Search = ({
|
|
|
12581
12854
|
} = buttonProps != null ? buttonProps : {};
|
|
12582
12855
|
const hasSuggestions = !!context.suggestions;
|
|
12583
12856
|
const showSearchButton = !!buttonProps && !!onClick;
|
|
12584
|
-
const inputGroup = /* @__PURE__ */ (0,
|
|
12857
|
+
const inputGroup = /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(
|
|
12585
12858
|
HStack,
|
|
12586
12859
|
{
|
|
12587
12860
|
position: "relative",
|
|
12588
12861
|
width: !showSearchButton ? width : void 0,
|
|
12589
12862
|
className: !showSearchButton ? className : void 0,
|
|
12590
12863
|
children: [
|
|
12591
|
-
showIcon && /* @__PURE__ */ (0,
|
|
12864
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
12592
12865
|
Icon,
|
|
12593
12866
|
{
|
|
12594
12867
|
icon: SearchIcon,
|
|
12595
12868
|
iconSize: getIconSize2(componentSize),
|
|
12596
12869
|
className: cn(
|
|
12597
|
-
Input_default["input-group__absolute-
|
|
12598
|
-
|
|
12870
|
+
Input_default["input-group__absolute-el"],
|
|
12871
|
+
Input_default[`input-group__absolute-el--${componentSize}`]
|
|
12599
12872
|
)
|
|
12600
12873
|
}
|
|
12601
12874
|
),
|
|
12602
|
-
/* @__PURE__ */ (0,
|
|
12875
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
12603
12876
|
Box,
|
|
12604
12877
|
{
|
|
12605
12878
|
as: Input,
|
|
@@ -12621,15 +12894,17 @@ var Search = ({
|
|
|
12621
12894
|
"aria-expanded": context.showSuggestions,
|
|
12622
12895
|
role: hasSuggestions ? "combobox" : void 0,
|
|
12623
12896
|
width: "100%",
|
|
12624
|
-
padding: getPadding(componentSize, showIcon),
|
|
12625
12897
|
className: cn(
|
|
12626
12898
|
Search_default.input,
|
|
12899
|
+
Input_default[`input--${componentSize}`],
|
|
12900
|
+
showIcon && Input_default[`input-with-icon--${componentSize}`],
|
|
12901
|
+
Input_default[`input-with-el-right--${componentSize}`],
|
|
12627
12902
|
typographyStyles_default[getTypographyCn(typographyTypes2[componentSize])]
|
|
12628
12903
|
)
|
|
12629
12904
|
}
|
|
12630
12905
|
),
|
|
12631
|
-
hasSuggestions && /* @__PURE__ */ (0,
|
|
12632
|
-
/* @__PURE__ */ (0,
|
|
12906
|
+
hasSuggestions && /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(import_jsx_runtime300.Fragment, { children: [
|
|
12907
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
12633
12908
|
SearchSuggestions,
|
|
12634
12909
|
{
|
|
12635
12910
|
id: suggestionsId,
|
|
@@ -12641,13 +12916,13 @@ var Search = ({
|
|
|
12641
12916
|
componentSize
|
|
12642
12917
|
}
|
|
12643
12918
|
),
|
|
12644
|
-
/* @__PURE__ */ (0,
|
|
12919
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(VisuallyHidden, { id: suggestionsDescriptionId, children: t(texts26.useArrowKeys) })
|
|
12645
12920
|
] }),
|
|
12646
|
-
hasValue && /* @__PURE__ */ (0,
|
|
12921
|
+
hasValue && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
12647
12922
|
ClearButton,
|
|
12648
12923
|
{
|
|
12649
12924
|
size: getIconSize2(componentSize),
|
|
12650
|
-
"aria-label": t(
|
|
12925
|
+
"aria-label": t(texts26.clearSearch),
|
|
12651
12926
|
onClick: clearInput,
|
|
12652
12927
|
className: Search_default["clear-button"]
|
|
12653
12928
|
}
|
|
@@ -12655,10 +12930,10 @@ var Search = ({
|
|
|
12655
12930
|
]
|
|
12656
12931
|
}
|
|
12657
12932
|
);
|
|
12658
|
-
return /* @__PURE__ */ (0,
|
|
12933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { children: [
|
|
12659
12934
|
renderLabel({ htmlFor: uniqueId, label }),
|
|
12660
|
-
/* @__PURE__ */ (0,
|
|
12661
|
-
showSearchButton ? /* @__PURE__ */ (0,
|
|
12935
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { children: [
|
|
12936
|
+
showSearchButton ? /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(
|
|
12662
12937
|
Grid,
|
|
12663
12938
|
{
|
|
12664
12939
|
className,
|
|
@@ -12670,47 +12945,50 @@ var Search = ({
|
|
|
12670
12945
|
style,
|
|
12671
12946
|
children: [
|
|
12672
12947
|
inputGroup,
|
|
12673
|
-
/* @__PURE__ */ (0,
|
|
12948
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
12674
12949
|
Button,
|
|
12675
12950
|
{
|
|
12676
12951
|
size: componentSize,
|
|
12677
12952
|
onClick,
|
|
12678
12953
|
...otherButtonProps,
|
|
12679
|
-
children: buttonLabel != null ? buttonLabel : t(
|
|
12954
|
+
children: buttonLabel != null ? buttonLabel : t(texts26.search)
|
|
12680
12955
|
}
|
|
12681
12956
|
)
|
|
12682
12957
|
]
|
|
12683
12958
|
}
|
|
12684
12959
|
) : inputGroup,
|
|
12685
|
-
renderInputMessage(tip, tipId)
|
|
12960
|
+
renderInputMessage({ tip, tipId })
|
|
12686
12961
|
] })
|
|
12687
12962
|
] });
|
|
12688
12963
|
};
|
|
12689
12964
|
Search.displayName = "Search";
|
|
12690
|
-
var
|
|
12965
|
+
var texts26 = createTexts({
|
|
12691
12966
|
clearSearch: {
|
|
12692
12967
|
nb: "T\xF8m s\xF8k",
|
|
12693
12968
|
no: "T\xF8m s\xF8k",
|
|
12694
12969
|
nn: "T\xF8m s\xF8k",
|
|
12695
|
-
en: "Clear search"
|
|
12970
|
+
en: "Clear search",
|
|
12971
|
+
se: "Gurre ohcama"
|
|
12696
12972
|
},
|
|
12697
12973
|
search: {
|
|
12698
12974
|
nb: "S\xF8k",
|
|
12699
12975
|
no: "S\xF8k",
|
|
12700
12976
|
nn: "S\xF8k",
|
|
12701
|
-
en: "Search"
|
|
12977
|
+
en: "Search",
|
|
12978
|
+
se: "Ohcan"
|
|
12702
12979
|
},
|
|
12703
12980
|
useArrowKeys: {
|
|
12704
12981
|
nb: "Bruk piltastene for \xE5 navigere i forslagene n\xE5r listen er utvidet",
|
|
12705
12982
|
no: "Bruk piltastene for \xE5 navigere i forslagene n\xE5r listen er utvidet",
|
|
12706
12983
|
nn: "Bruk piltastane for \xE5 navigere i forslaga n\xE5r lista er utvida",
|
|
12707
|
-
en: "Use the arrow keys to navigate suggestions when the list is expanded"
|
|
12984
|
+
en: "Use the arrow keys to navigate suggestions when the list is expanded",
|
|
12985
|
+
se: "Deatte njuollaboalu ohccat \xE1rvalusaid listtus mii lea viiddiduvvon"
|
|
12708
12986
|
}
|
|
12709
12987
|
});
|
|
12710
12988
|
|
|
12711
12989
|
// src/components/Search/SearchAutocompleteWrapper.tsx
|
|
12712
12990
|
var import_react85 = require("react");
|
|
12713
|
-
var
|
|
12991
|
+
var import_jsx_runtime301 = require("react/jsx-runtime");
|
|
12714
12992
|
var SearchAutocompleteWrapper = (props) => {
|
|
12715
12993
|
const {
|
|
12716
12994
|
value,
|
|
@@ -12786,7 +13064,7 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
12786
13064
|
inputValue,
|
|
12787
13065
|
onSugggestionClick: handleSuggestionClick
|
|
12788
13066
|
};
|
|
12789
|
-
return /* @__PURE__ */ (0,
|
|
13067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(AutocompleteSearchContext, { value: contextProps, children });
|
|
12790
13068
|
};
|
|
12791
13069
|
SearchAutocompleteWrapper.displayName = "SearchAutocompleteWrapper";
|
|
12792
13070
|
|
|
@@ -12802,7 +13080,7 @@ var Skeleton_default = {
|
|
|
12802
13080
|
};
|
|
12803
13081
|
|
|
12804
13082
|
// src/components/Skeleton/Skeleton.tsx
|
|
12805
|
-
var
|
|
13083
|
+
var import_jsx_runtime302 = require("react/jsx-runtime");
|
|
12806
13084
|
var Skeleton = ({
|
|
12807
13085
|
width,
|
|
12808
13086
|
height,
|
|
@@ -12812,7 +13090,7 @@ var Skeleton = ({
|
|
|
12812
13090
|
ref,
|
|
12813
13091
|
...rest
|
|
12814
13092
|
}) => {
|
|
12815
|
-
return /* @__PURE__ */ (0,
|
|
13093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
12816
13094
|
Box,
|
|
12817
13095
|
{
|
|
12818
13096
|
width,
|
|
@@ -12832,7 +13110,7 @@ var SkipToContent_default = {
|
|
|
12832
13110
|
};
|
|
12833
13111
|
|
|
12834
13112
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
12835
|
-
var
|
|
13113
|
+
var import_jsx_runtime303 = require("react/jsx-runtime");
|
|
12836
13114
|
var SkipToContent = ({
|
|
12837
13115
|
text = "Til hovedinnhold",
|
|
12838
13116
|
top = 0,
|
|
@@ -12842,12 +13120,12 @@ var SkipToContent = ({
|
|
|
12842
13120
|
...rest
|
|
12843
13121
|
}) => {
|
|
12844
13122
|
const { className: htmlPropsClassName, style, ...restHtmlProps } = htmlProps;
|
|
12845
|
-
return /* @__PURE__ */ (0,
|
|
13123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
12846
13124
|
Contrast,
|
|
12847
13125
|
{
|
|
12848
13126
|
className: cn(className, htmlPropsClassName, SkipToContent_default.wrapper),
|
|
12849
13127
|
style: { ...style, top },
|
|
12850
|
-
children: /* @__PURE__ */ (0,
|
|
13128
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(Link, { ...getBaseHTMLProps(id, restHtmlProps, rest), children: text })
|
|
12851
13129
|
}
|
|
12852
13130
|
);
|
|
12853
13131
|
};
|
|
@@ -12865,7 +13143,7 @@ var SplitButton_default = {
|
|
|
12865
13143
|
};
|
|
12866
13144
|
|
|
12867
13145
|
// src/components/SplitButton/SplitButton.tsx
|
|
12868
|
-
var
|
|
13146
|
+
var import_jsx_runtime304 = require("react/jsx-runtime");
|
|
12869
13147
|
var SplitButton = ({
|
|
12870
13148
|
size: size2,
|
|
12871
13149
|
primaryAction,
|
|
@@ -12880,8 +13158,8 @@ var SplitButton = ({
|
|
|
12880
13158
|
purpose,
|
|
12881
13159
|
size: size2
|
|
12882
13160
|
};
|
|
12883
|
-
return /* @__PURE__ */ (0,
|
|
12884
|
-
/* @__PURE__ */ (0,
|
|
13161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime304.jsxs)("div", { className: cn(className, SplitButton_default.container), ...rest, children: [
|
|
13162
|
+
/* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
|
|
12885
13163
|
Button,
|
|
12886
13164
|
{
|
|
12887
13165
|
...buttonStyleProps,
|
|
@@ -12890,13 +13168,13 @@ var SplitButton = ({
|
|
|
12890
13168
|
className: SplitButton_default.main
|
|
12891
13169
|
}
|
|
12892
13170
|
),
|
|
12893
|
-
/* @__PURE__ */ (0,
|
|
12894
|
-
/* @__PURE__ */ (0,
|
|
13171
|
+
/* @__PURE__ */ (0, import_jsx_runtime304.jsxs)(OverflowMenuGroup, { isOpen, setIsOpen, children: [
|
|
13172
|
+
/* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
|
|
12895
13173
|
Button,
|
|
12896
13174
|
{
|
|
12897
13175
|
...buttonStyleProps,
|
|
12898
13176
|
icon: isOpen ? ChevronUpIcon : ChevronDownIcon,
|
|
12899
|
-
"aria-label": t(
|
|
13177
|
+
"aria-label": t(texts27.moreActions),
|
|
12900
13178
|
purpose,
|
|
12901
13179
|
className: cn(
|
|
12902
13180
|
SplitButton_default.option,
|
|
@@ -12905,17 +13183,18 @@ var SplitButton = ({
|
|
|
12905
13183
|
type: "button"
|
|
12906
13184
|
}
|
|
12907
13185
|
),
|
|
12908
|
-
/* @__PURE__ */ (0,
|
|
13186
|
+
/* @__PURE__ */ (0, import_jsx_runtime304.jsx)(OverflowMenu, { placement: "bottom-end", children: /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(OverflowMenuList, { children: secondaryActions.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(OverflowMenuButton, { ...item, children: item.children }, index)) }) })
|
|
12909
13187
|
] })
|
|
12910
13188
|
] });
|
|
12911
13189
|
};
|
|
12912
13190
|
SplitButton.displayName = "SplitButton";
|
|
12913
|
-
var
|
|
13191
|
+
var texts27 = createTexts({
|
|
12914
13192
|
moreActions: {
|
|
12915
13193
|
nb: "Flere handlinger",
|
|
12916
13194
|
no: "Flere handlinger",
|
|
12917
13195
|
nn: "Fleire handlingar",
|
|
12918
|
-
en: "More actions"
|
|
13196
|
+
en: "More actions",
|
|
13197
|
+
se: "Eanet doaimmat"
|
|
12919
13198
|
}
|
|
12920
13199
|
});
|
|
12921
13200
|
|
|
@@ -12931,14 +13210,14 @@ var CollapsibleTableContext = (0, import_react87.createContext)({
|
|
|
12931
13210
|
var useCollapsibleTableContext = () => (0, import_react87.useContext)(CollapsibleTableContext);
|
|
12932
13211
|
|
|
12933
13212
|
// src/components/Table/normal/Body.tsx
|
|
12934
|
-
var
|
|
12935
|
-
var Body = (props) => /* @__PURE__ */ (0,
|
|
13213
|
+
var import_jsx_runtime305 = require("react/jsx-runtime");
|
|
13214
|
+
var Body = (props) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("tbody", { ...props });
|
|
12936
13215
|
Body.displayName = "Table.Body";
|
|
12937
13216
|
|
|
12938
13217
|
// src/components/Table/normal/Head.tsx
|
|
12939
13218
|
var import_react88 = require("react");
|
|
12940
|
-
var
|
|
12941
|
-
var Head = ({ children, ...rest }) => /* @__PURE__ */ (0,
|
|
13219
|
+
var import_jsx_runtime306 = require("react/jsx-runtime");
|
|
13220
|
+
var Head = ({ children, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("thead", { ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(HeadContext, { value: true, children }) });
|
|
12942
13221
|
var HeadContext = (0, import_react88.createContext)(false);
|
|
12943
13222
|
function useIsInTableHead() {
|
|
12944
13223
|
const isInTableHead = (0, import_react88.useContext)(HeadContext);
|
|
@@ -12971,7 +13250,7 @@ var Table_default = {
|
|
|
12971
13250
|
};
|
|
12972
13251
|
|
|
12973
13252
|
// src/components/Table/normal/Cell.tsx
|
|
12974
|
-
var
|
|
13253
|
+
var import_jsx_runtime307 = require("react/jsx-runtime");
|
|
12975
13254
|
var Cell = ({
|
|
12976
13255
|
children,
|
|
12977
13256
|
type: _type,
|
|
@@ -12984,7 +13263,7 @@ var Cell = ({
|
|
|
12984
13263
|
const type = _type != null ? _type : isInHead ? "head" : "data";
|
|
12985
13264
|
const { isCollapsibleChild } = collapsibleProps != null ? collapsibleProps : {};
|
|
12986
13265
|
const isComplexLayout = layout === "text and icon";
|
|
12987
|
-
return isCollapsibleChild ? /* @__PURE__ */ (0,
|
|
13266
|
+
return isCollapsibleChild ? /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(DescriptionListDesc, { children }) : type === "head" ? /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
|
|
12988
13267
|
"th",
|
|
12989
13268
|
{
|
|
12990
13269
|
...rest,
|
|
@@ -12993,26 +13272,26 @@ var Cell = ({
|
|
|
12993
13272
|
!isComplexLayout && Table_default[`cell--${layout}`],
|
|
12994
13273
|
Table_default["cell--head"]
|
|
12995
13274
|
),
|
|
12996
|
-
children: isComplexLayout ? /* @__PURE__ */ (0,
|
|
13275
|
+
children: isComplexLayout ? /* @__PURE__ */ (0, import_jsx_runtime307.jsx)("div", { className: Table_default.cell__inner, children }) : children
|
|
12997
13276
|
}
|
|
12998
|
-
) : /* @__PURE__ */ (0,
|
|
13277
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
|
|
12999
13278
|
"td",
|
|
13000
13279
|
{
|
|
13001
13280
|
...rest,
|
|
13002
13281
|
className: cn(className, !isComplexLayout && Table_default[`cell--${layout}`]),
|
|
13003
|
-
children: isComplexLayout ? /* @__PURE__ */ (0,
|
|
13282
|
+
children: isComplexLayout ? /* @__PURE__ */ (0, import_jsx_runtime307.jsx)("div", { className: Table_default.cell__inner, children }) : children
|
|
13004
13283
|
}
|
|
13005
13284
|
);
|
|
13006
13285
|
};
|
|
13007
13286
|
Cell.displayName = "Table.Cell";
|
|
13008
13287
|
|
|
13009
13288
|
// src/components/Table/normal/Foot.tsx
|
|
13010
|
-
var
|
|
13011
|
-
var Foot = (props) => /* @__PURE__ */ (0,
|
|
13289
|
+
var import_jsx_runtime308 = require("react/jsx-runtime");
|
|
13290
|
+
var Foot = (props) => /* @__PURE__ */ (0, import_jsx_runtime308.jsx)("tfoot", { ...props });
|
|
13012
13291
|
Foot.displayName = "Table.Foot";
|
|
13013
13292
|
|
|
13014
13293
|
// src/components/Table/normal/Row.tsx
|
|
13015
|
-
var
|
|
13294
|
+
var import_jsx_runtime309 = require("react/jsx-runtime");
|
|
13016
13295
|
var Row = ({
|
|
13017
13296
|
type: _type,
|
|
13018
13297
|
mode = "normal",
|
|
@@ -13023,7 +13302,7 @@ var Row = ({
|
|
|
13023
13302
|
}) => {
|
|
13024
13303
|
const isInHeader = useIsInTableHead();
|
|
13025
13304
|
const type = _type != null ? _type : isInHeader ? "head" : "body";
|
|
13026
|
-
return /* @__PURE__ */ (0,
|
|
13305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
13027
13306
|
"tr",
|
|
13028
13307
|
{
|
|
13029
13308
|
className: cn(
|
|
@@ -13043,12 +13322,12 @@ var Row = ({
|
|
|
13043
13322
|
Row.displayName = "Table.Row";
|
|
13044
13323
|
|
|
13045
13324
|
// src/components/Table/normal/SortCell.tsx
|
|
13046
|
-
var
|
|
13325
|
+
var import_jsx_runtime310 = require("react/jsx-runtime");
|
|
13047
13326
|
var makeSortIcon = (isSorted, sortOrder) => {
|
|
13048
13327
|
if (!isSorted || !sortOrder) {
|
|
13049
|
-
return /* @__PURE__ */ (0,
|
|
13328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(Icon, { icon: UnfoldMoreIcon, iconSize: "inherit" });
|
|
13050
13329
|
}
|
|
13051
|
-
return sortOrder === "ascending" ? /* @__PURE__ */ (0,
|
|
13330
|
+
return sortOrder === "ascending" ? /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(Icon, { icon: ChevronDownIcon, iconSize: "inherit" }) : /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(Icon, { icon: ChevronUpIcon, iconSize: "inherit" });
|
|
13052
13331
|
};
|
|
13053
13332
|
var SortCell = ({
|
|
13054
13333
|
isSorted,
|
|
@@ -13058,17 +13337,17 @@ var SortCell = ({
|
|
|
13058
13337
|
...rest
|
|
13059
13338
|
}) => {
|
|
13060
13339
|
const { t } = useTranslation();
|
|
13061
|
-
return /* @__PURE__ */ (0,
|
|
13340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
|
|
13062
13341
|
Cell,
|
|
13063
13342
|
{
|
|
13064
13343
|
type: "head",
|
|
13065
13344
|
"aria-sort": isSorted && sortOrder ? sortOrder : void 0,
|
|
13066
13345
|
...rest,
|
|
13067
|
-
children: /* @__PURE__ */ (0,
|
|
13346
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(
|
|
13068
13347
|
StylelessButton,
|
|
13069
13348
|
{
|
|
13070
13349
|
onClick,
|
|
13071
|
-
"aria-description": t(
|
|
13350
|
+
"aria-description": t(texts28.changeSort),
|
|
13072
13351
|
className: cn(Table_default["sort-button"], focusable),
|
|
13073
13352
|
children: [
|
|
13074
13353
|
children,
|
|
@@ -13081,17 +13360,18 @@ var SortCell = ({
|
|
|
13081
13360
|
);
|
|
13082
13361
|
};
|
|
13083
13362
|
SortCell.displayName = "Table.SortCell";
|
|
13084
|
-
var
|
|
13363
|
+
var texts28 = createTexts({
|
|
13085
13364
|
changeSort: {
|
|
13086
13365
|
nb: "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
|
|
13087
13366
|
no: "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
|
|
13088
13367
|
nn: "Aktiver for \xE5 endre sorteringsrekkjef\xF8lgje",
|
|
13089
|
-
en: "Activate to change sort order"
|
|
13368
|
+
en: "Activate to change sort order",
|
|
13369
|
+
se: "Aktivere rievdadit sorterenortnega"
|
|
13090
13370
|
}
|
|
13091
13371
|
});
|
|
13092
13372
|
|
|
13093
13373
|
// src/components/Table/normal/Table.tsx
|
|
13094
|
-
var
|
|
13374
|
+
var import_jsx_runtime311 = require("react/jsx-runtime");
|
|
13095
13375
|
var Table = ({
|
|
13096
13376
|
size: size2 = "medium",
|
|
13097
13377
|
stickyHeader,
|
|
@@ -13099,7 +13379,7 @@ var Table = ({
|
|
|
13099
13379
|
className,
|
|
13100
13380
|
children,
|
|
13101
13381
|
...rest
|
|
13102
|
-
}) => /* @__PURE__ */ (0,
|
|
13382
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
13103
13383
|
"table",
|
|
13104
13384
|
{
|
|
13105
13385
|
...rest,
|
|
@@ -13118,7 +13398,7 @@ Table.displayName = "Table";
|
|
|
13118
13398
|
|
|
13119
13399
|
// src/components/Table/normal/TableWrapper.tsx
|
|
13120
13400
|
var import_react89 = require("react");
|
|
13121
|
-
var
|
|
13401
|
+
var import_jsx_runtime312 = require("react/jsx-runtime");
|
|
13122
13402
|
var TableWrapper = ({ className, ...rest }) => {
|
|
13123
13403
|
const themeContext = (0, import_react89.useContext)(ThemeContext);
|
|
13124
13404
|
const container2 = themeContext == null ? void 0 : themeContext.el;
|
|
@@ -13143,7 +13423,7 @@ var TableWrapper = ({ className, ...rest }) => {
|
|
|
13143
13423
|
window.addEventListener("resize", handleResize);
|
|
13144
13424
|
return () => window.removeEventListener("resize", handleResize);
|
|
13145
13425
|
});
|
|
13146
|
-
return /* @__PURE__ */ (0,
|
|
13426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
13147
13427
|
"div",
|
|
13148
13428
|
{
|
|
13149
13429
|
ref: wrapperRef,
|
|
@@ -13170,7 +13450,7 @@ Table2.Row = Row;
|
|
|
13170
13450
|
Table2.Foot = Foot;
|
|
13171
13451
|
|
|
13172
13452
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
13173
|
-
var
|
|
13453
|
+
var import_jsx_runtime313 = require("react/jsx-runtime");
|
|
13174
13454
|
var CollapsibleRow = ({
|
|
13175
13455
|
type: _type,
|
|
13176
13456
|
className,
|
|
@@ -13213,40 +13493,40 @@ var CollapsibleRow = ({
|
|
|
13213
13493
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
13214
13494
|
const id = derivativeIdGenerator(prefix2, index.toString());
|
|
13215
13495
|
collapsibleIds.push(id);
|
|
13216
|
-
return /* @__PURE__ */ (0,
|
|
13217
|
-
/* @__PURE__ */ (0,
|
|
13496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)(import_react90.Fragment, { children: [
|
|
13497
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
13218
13498
|
(0, import_react90.isValidElement)(child) && (0, import_react90.cloneElement)(child, {
|
|
13219
13499
|
collapsibleProps: { isCollapsibleChild: true }
|
|
13220
13500
|
})
|
|
13221
13501
|
] }, `DL-${index}`);
|
|
13222
13502
|
}) : null;
|
|
13223
|
-
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ (0,
|
|
13503
|
+
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Row, { ...rowProps(), children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Cell, { colSpan: definingColumnIndex.length + 1, children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(DescriptionList, { children: collapsedRenderedChildren }) }) }) : null;
|
|
13224
13504
|
const definingColumnCells = childrenArray.slice().filter((column, index) => definingColumnIndex.indexOf(index) > -1).sort((a, b) => {
|
|
13225
13505
|
return definingColumnIndex.indexOf(childrenArray.indexOf(a)) - definingColumnIndex.indexOf(childrenArray.indexOf(b));
|
|
13226
13506
|
});
|
|
13227
13507
|
const headerRow = () => {
|
|
13228
13508
|
if (type !== "head" || !isCollapsed) return null;
|
|
13229
|
-
return /* @__PURE__ */ (0,
|
|
13509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Row, { ref, ...rowProps(), children: /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)(import_jsx_runtime313.Fragment, { children: [
|
|
13230
13510
|
definingColumnCells,
|
|
13231
|
-
/* @__PURE__ */ (0,
|
|
13232
|
-
t(
|
|
13233
|
-
/* @__PURE__ */ (0,
|
|
13511
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsxs)(Table2.Cell, { type: "head", layout: "center", children: [
|
|
13512
|
+
t(texts29.expand),
|
|
13513
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)(VisuallyHidden, { children: t(texts29.row) })
|
|
13234
13514
|
] })
|
|
13235
13515
|
] }) });
|
|
13236
13516
|
};
|
|
13237
13517
|
const idList = spaceSeparatedIdListGenerator(collapsibleIds);
|
|
13238
13518
|
const rowWithChevron = () => {
|
|
13239
13519
|
if (type !== "body" || !isCollapsed) return null;
|
|
13240
|
-
return /* @__PURE__ */ (0,
|
|
13520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)(Row, { ref, ...rowProps(!childrenCollapsed && true), children: [
|
|
13241
13521
|
definingColumnCells,
|
|
13242
|
-
/* @__PURE__ */ (0,
|
|
13522
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Table2.Cell, { children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
|
|
13243
13523
|
StylelessButton,
|
|
13244
13524
|
{
|
|
13245
13525
|
onClick: () => setChildrenCollapsed(!childrenCollapsed),
|
|
13246
13526
|
"aria-expanded": !childrenCollapsed,
|
|
13247
13527
|
"aria-controls": idList,
|
|
13248
13528
|
className: cn(Table_default["collapse-button"], focusable),
|
|
13249
|
-
children: /* @__PURE__ */ (0,
|
|
13529
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
|
|
13250
13530
|
AnimatedChevronUpDown,
|
|
13251
13531
|
{
|
|
13252
13532
|
isUp: childrenCollapsed ? false : true,
|
|
@@ -13258,39 +13538,41 @@ var CollapsibleRow = ({
|
|
|
13258
13538
|
) })
|
|
13259
13539
|
] });
|
|
13260
13540
|
};
|
|
13261
|
-
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ (0,
|
|
13541
|
+
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)(import_jsx_runtime313.Fragment, { children: [
|
|
13262
13542
|
headerRow(),
|
|
13263
|
-
type === "body" && /* @__PURE__ */ (0,
|
|
13543
|
+
type === "body" && /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)(import_jsx_runtime313.Fragment, { children: [
|
|
13264
13544
|
rowWithChevron(),
|
|
13265
13545
|
childrenCollapsed ? null : collapsedRows
|
|
13266
13546
|
] })
|
|
13267
|
-
] }) : /* @__PURE__ */ (0,
|
|
13547
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Row, { ref, ...rowProps(), children });
|
|
13268
13548
|
};
|
|
13269
13549
|
CollapsibleRow.displayName = "CollapsibleTable.Row";
|
|
13270
|
-
var
|
|
13550
|
+
var texts29 = createTexts({
|
|
13271
13551
|
expand: {
|
|
13272
13552
|
nb: "Utvid",
|
|
13273
13553
|
no: "Utvid",
|
|
13274
13554
|
nn: "Utvid",
|
|
13275
|
-
en: "Expand"
|
|
13555
|
+
en: "Expand",
|
|
13556
|
+
se: "Viiddit"
|
|
13276
13557
|
},
|
|
13277
13558
|
row: {
|
|
13278
13559
|
nb: "raden",
|
|
13279
13560
|
no: "raden",
|
|
13280
13561
|
nn: "rada",
|
|
13281
|
-
en: "row"
|
|
13562
|
+
en: "row",
|
|
13563
|
+
se: "gurgadus"
|
|
13282
13564
|
}
|
|
13283
13565
|
});
|
|
13284
13566
|
|
|
13285
13567
|
// src/components/Table/collapsible/CollapsibleTable.tsx
|
|
13286
|
-
var
|
|
13568
|
+
var import_jsx_runtime314 = require("react/jsx-runtime");
|
|
13287
13569
|
var CollapsibleTable = ({
|
|
13288
13570
|
isCollapsed,
|
|
13289
13571
|
headerValues,
|
|
13290
13572
|
definingColumnIndex = [0],
|
|
13291
13573
|
...rest
|
|
13292
13574
|
}) => {
|
|
13293
|
-
return /* @__PURE__ */ (0,
|
|
13575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
13294
13576
|
CollapsibleTableContext,
|
|
13295
13577
|
{
|
|
13296
13578
|
value: {
|
|
@@ -13298,7 +13580,7 @@ var CollapsibleTable = ({
|
|
|
13298
13580
|
headerValues,
|
|
13299
13581
|
definingColumnIndex
|
|
13300
13582
|
},
|
|
13301
|
-
children: /* @__PURE__ */ (0,
|
|
13583
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(Table2, { ...rest })
|
|
13302
13584
|
}
|
|
13303
13585
|
);
|
|
13304
13586
|
};
|
|
@@ -13344,13 +13626,13 @@ var Tabs_default = {
|
|
|
13344
13626
|
|
|
13345
13627
|
// src/components/Tabs/TabWidthContext.tsx
|
|
13346
13628
|
var import_react92 = require("react");
|
|
13347
|
-
var
|
|
13629
|
+
var import_jsx_runtime315 = require("react/jsx-runtime");
|
|
13348
13630
|
var TabContext = (0, import_react92.createContext)(null);
|
|
13349
13631
|
function TabWidthContextProvider({
|
|
13350
13632
|
children,
|
|
13351
13633
|
onChangeWidths
|
|
13352
13634
|
}) {
|
|
13353
|
-
return /* @__PURE__ */ (0,
|
|
13635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
13354
13636
|
TabContext,
|
|
13355
13637
|
{
|
|
13356
13638
|
value: {
|
|
@@ -13382,7 +13664,7 @@ function useSetTabWidth(index, width) {
|
|
|
13382
13664
|
}
|
|
13383
13665
|
|
|
13384
13666
|
// src/components/Tabs/AddTabButton.tsx
|
|
13385
|
-
var
|
|
13667
|
+
var import_jsx_runtime316 = require("react/jsx-runtime");
|
|
13386
13668
|
var AddTabButton = ({
|
|
13387
13669
|
ref,
|
|
13388
13670
|
children,
|
|
@@ -13395,7 +13677,7 @@ var AddTabButton = ({
|
|
|
13395
13677
|
const buttonRef = (0, import_react93.useRef)(null);
|
|
13396
13678
|
const combinedRef = useCombinedRef(ref, buttonRef);
|
|
13397
13679
|
const { tabContentDirection, size: size2 } = useTabsContext();
|
|
13398
|
-
return /* @__PURE__ */ (0,
|
|
13680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)(
|
|
13399
13681
|
"button",
|
|
13400
13682
|
{
|
|
13401
13683
|
...rest,
|
|
@@ -13408,8 +13690,8 @@ var AddTabButton = ({
|
|
|
13408
13690
|
focus_default["focusable--inset"]
|
|
13409
13691
|
),
|
|
13410
13692
|
children: [
|
|
13411
|
-
/* @__PURE__ */ (0,
|
|
13412
|
-
/* @__PURE__ */ (0,
|
|
13693
|
+
/* @__PURE__ */ (0, import_jsx_runtime316.jsx)(Icon, { icon: PlusIcon, iconSize: "inherit" }),
|
|
13694
|
+
/* @__PURE__ */ (0, import_jsx_runtime316.jsx)("span", { children })
|
|
13413
13695
|
]
|
|
13414
13696
|
}
|
|
13415
13697
|
);
|
|
@@ -13418,7 +13700,7 @@ AddTabButton.displayName = "AddTabButton";
|
|
|
13418
13700
|
|
|
13419
13701
|
// src/components/Tabs/Tabs.tsx
|
|
13420
13702
|
var import_react94 = require("react");
|
|
13421
|
-
var
|
|
13703
|
+
var import_jsx_runtime317 = require("react/jsx-runtime");
|
|
13422
13704
|
var TABS_SIZES = createSizes("small", "medium");
|
|
13423
13705
|
var Tabs = ({
|
|
13424
13706
|
id,
|
|
@@ -13448,7 +13730,7 @@ var Tabs = ({
|
|
|
13448
13730
|
setActiveTab(activeTab);
|
|
13449
13731
|
}
|
|
13450
13732
|
}, [activeTab, thisActiveTab]);
|
|
13451
|
-
return /* @__PURE__ */ (0,
|
|
13733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
|
|
13452
13734
|
TabsContext,
|
|
13453
13735
|
{
|
|
13454
13736
|
value: {
|
|
@@ -13463,7 +13745,7 @@ var Tabs = ({
|
|
|
13463
13745
|
tabContentDirection,
|
|
13464
13746
|
addTabButtonProps
|
|
13465
13747
|
},
|
|
13466
|
-
children: /* @__PURE__ */ (0,
|
|
13748
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
|
|
13467
13749
|
Box,
|
|
13468
13750
|
{
|
|
13469
13751
|
...getBaseHTMLProps(uniqueId, className, htmlProps, rest),
|
|
@@ -13478,7 +13760,7 @@ Tabs.displayName = "Tabs";
|
|
|
13478
13760
|
|
|
13479
13761
|
// src/components/Tabs/Tab.tsx
|
|
13480
13762
|
var import_react95 = require("react");
|
|
13481
|
-
var
|
|
13763
|
+
var import_jsx_runtime318 = require("react/jsx-runtime");
|
|
13482
13764
|
var Tab = ({
|
|
13483
13765
|
active = false,
|
|
13484
13766
|
icon,
|
|
@@ -13520,7 +13802,7 @@ var Tab = ({
|
|
|
13520
13802
|
handleSelect();
|
|
13521
13803
|
onKeyDown == null ? void 0 : onKeyDown(e);
|
|
13522
13804
|
};
|
|
13523
|
-
return /* @__PURE__ */ (0,
|
|
13805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime318.jsxs)(
|
|
13524
13806
|
"button",
|
|
13525
13807
|
{
|
|
13526
13808
|
...getBaseHTMLProps(
|
|
@@ -13544,8 +13826,8 @@ var Tab = ({
|
|
|
13544
13826
|
onKeyDown: handleOnKeyDown,
|
|
13545
13827
|
tabIndex: focus ? 0 : -1,
|
|
13546
13828
|
children: [
|
|
13547
|
-
icon && /* @__PURE__ */ (0,
|
|
13548
|
-
/* @__PURE__ */ (0,
|
|
13829
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(Icon, { icon, iconSize: "inherit" }),
|
|
13830
|
+
/* @__PURE__ */ (0, import_jsx_runtime318.jsx)("span", { children })
|
|
13549
13831
|
]
|
|
13550
13832
|
}
|
|
13551
13833
|
);
|
|
@@ -13554,7 +13836,7 @@ Tab.displayName = "Tab";
|
|
|
13554
13836
|
|
|
13555
13837
|
// src/components/Tabs/TabList.tsx
|
|
13556
13838
|
var import_react96 = require("react");
|
|
13557
|
-
var
|
|
13839
|
+
var import_jsx_runtime319 = require("react/jsx-runtime");
|
|
13558
13840
|
var TabList = ({
|
|
13559
13841
|
children,
|
|
13560
13842
|
id,
|
|
@@ -13612,7 +13894,7 @@ var TabList = ({
|
|
|
13612
13894
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13613
13895
|
["--dds-tab-widths"]: widths.join(" ")
|
|
13614
13896
|
};
|
|
13615
|
-
return /* @__PURE__ */ (0,
|
|
13897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(
|
|
13616
13898
|
"div",
|
|
13617
13899
|
{
|
|
13618
13900
|
...rest,
|
|
@@ -13632,7 +13914,7 @@ var TabList = ({
|
|
|
13632
13914
|
style: { ...style, ...customWidths },
|
|
13633
13915
|
children: [
|
|
13634
13916
|
tabListChildren,
|
|
13635
|
-
hasButton && /* @__PURE__ */ (0,
|
|
13917
|
+
hasButton && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
13636
13918
|
AddTabButton,
|
|
13637
13919
|
{
|
|
13638
13920
|
index: tabListChildren ? tabListChildren.length : 0,
|
|
@@ -13646,7 +13928,7 @@ var TabList = ({
|
|
|
13646
13928
|
TabList.displayName = "TabList";
|
|
13647
13929
|
|
|
13648
13930
|
// src/components/Tabs/TabPanel.tsx
|
|
13649
|
-
var
|
|
13931
|
+
var import_jsx_runtime320 = require("react/jsx-runtime");
|
|
13650
13932
|
var TabPanel = ({
|
|
13651
13933
|
active = false,
|
|
13652
13934
|
children,
|
|
@@ -13655,7 +13937,7 @@ var TabPanel = ({
|
|
|
13655
13937
|
htmlProps,
|
|
13656
13938
|
padding = "x0.25",
|
|
13657
13939
|
...rest
|
|
13658
|
-
}) => /* @__PURE__ */ (0,
|
|
13940
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
|
|
13659
13941
|
Box,
|
|
13660
13942
|
{
|
|
13661
13943
|
padding,
|
|
@@ -13670,7 +13952,7 @@ TabPanel.displayName = "TabPanel";
|
|
|
13670
13952
|
|
|
13671
13953
|
// src/components/Tabs/TabPanels.tsx
|
|
13672
13954
|
var import_react97 = require("react");
|
|
13673
|
-
var
|
|
13955
|
+
var import_jsx_runtime321 = require("react/jsx-runtime");
|
|
13674
13956
|
var TabPanels = ({ children, ref, ...rest }) => {
|
|
13675
13957
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
13676
13958
|
const combinedRef = useCombinedRef(ref, tabPanelsRef);
|
|
@@ -13685,7 +13967,7 @@ var TabPanels = ({ children, ref, ...rest }) => {
|
|
|
13685
13967
|
}
|
|
13686
13968
|
});
|
|
13687
13969
|
});
|
|
13688
|
-
return /* @__PURE__ */ (0,
|
|
13970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(Box, { ref: combinedRef, ...rest, children: panelChildren });
|
|
13689
13971
|
};
|
|
13690
13972
|
TabPanels.displayName = "TabPanels";
|
|
13691
13973
|
|
|
@@ -13706,7 +13988,7 @@ var Tag_default = {
|
|
|
13706
13988
|
};
|
|
13707
13989
|
|
|
13708
13990
|
// src/components/Tag/Tag.tsx
|
|
13709
|
-
var
|
|
13991
|
+
var import_jsx_runtime322 = require("react/jsx-runtime");
|
|
13710
13992
|
var icons3 = {
|
|
13711
13993
|
info: InfoIcon,
|
|
13712
13994
|
danger: ErrorIcon,
|
|
@@ -13726,7 +14008,7 @@ var Tag = ({
|
|
|
13726
14008
|
...rest
|
|
13727
14009
|
}) => {
|
|
13728
14010
|
const icon = icons3[purpose];
|
|
13729
|
-
return /* @__PURE__ */ (0,
|
|
14011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(
|
|
13730
14012
|
TextOverflowEllipsisWrapper,
|
|
13731
14013
|
{
|
|
13732
14014
|
...getBaseHTMLProps(
|
|
@@ -13742,8 +14024,8 @@ var Tag = ({
|
|
|
13742
14024
|
rest
|
|
13743
14025
|
),
|
|
13744
14026
|
children: [
|
|
13745
|
-
withIcon && icon && /* @__PURE__ */ (0,
|
|
13746
|
-
/* @__PURE__ */ (0,
|
|
14027
|
+
withIcon && icon && /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(Icon, { icon, iconSize: "small" }),
|
|
14028
|
+
/* @__PURE__ */ (0, import_jsx_runtime322.jsx)(TextOverflowEllipsisInner, { children: children != null ? children : text })
|
|
13747
14029
|
]
|
|
13748
14030
|
}
|
|
13749
14031
|
);
|
|
@@ -13758,10 +14040,6 @@ var TextInput_default = {
|
|
|
13758
14040
|
container: "TextInput_container",
|
|
13759
14041
|
"container--readonly": "TextInput_container--readonly",
|
|
13760
14042
|
"container--disabled": "TextInput_container--disabled",
|
|
13761
|
-
input: "TextInput_input",
|
|
13762
|
-
"with-icon--medium": "TextInput_with-icon--medium",
|
|
13763
|
-
"with-icon--small": "TextInput_with-icon--small",
|
|
13764
|
-
"with-icon--xsmall": "TextInput_with-icon--xsmall",
|
|
13765
14043
|
"input--extended": "TextInput_input--extended",
|
|
13766
14044
|
"icon--medium": "TextInput_icon--medium",
|
|
13767
14045
|
"icon--small": "TextInput_icon--small",
|
|
@@ -13773,7 +14051,7 @@ var TextInput_default = {
|
|
|
13773
14051
|
};
|
|
13774
14052
|
|
|
13775
14053
|
// src/components/TextInput/TextInput.tsx
|
|
13776
|
-
var
|
|
14054
|
+
var import_jsx_runtime323 = require("react/jsx-runtime");
|
|
13777
14055
|
var TextInput = ({
|
|
13778
14056
|
label,
|
|
13779
14057
|
afterLabelContent,
|
|
@@ -13868,24 +14146,24 @@ var TextInput = ({
|
|
|
13868
14146
|
const suffixPaddingInlineEnd = suffixLength ? `calc(var(--dds-spacing-x1) + ${suffixLength}px)` : void 0;
|
|
13869
14147
|
let extendedInput = null;
|
|
13870
14148
|
if (hasIcon) {
|
|
13871
|
-
extendedInput = /* @__PURE__ */ (0,
|
|
13872
|
-
/* @__PURE__ */ (0,
|
|
14149
|
+
extendedInput = /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(Box, { className: Input_default["input-group"], width: inputWidth, children: [
|
|
14150
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
13873
14151
|
Icon,
|
|
13874
14152
|
{
|
|
13875
14153
|
icon,
|
|
13876
14154
|
iconSize: getFormInputIconSize(componentSize),
|
|
13877
14155
|
className: cn(
|
|
13878
|
-
Input_default["input-group__absolute-
|
|
14156
|
+
Input_default["input-group__absolute-el"],
|
|
14157
|
+
Input_default[`input-group__absolute-el--${componentSize}`],
|
|
13879
14158
|
TextInput_default[`icon--${componentSize}`]
|
|
13880
14159
|
)
|
|
13881
14160
|
}
|
|
13882
14161
|
),
|
|
13883
|
-
/* @__PURE__ */ (0,
|
|
14162
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
13884
14163
|
StatefulInput,
|
|
13885
14164
|
{
|
|
13886
14165
|
className: cn(
|
|
13887
|
-
|
|
13888
|
-
TextInput_default[`with-icon--${componentSize}`],
|
|
14166
|
+
Input_default[`input-with-icon--${componentSize}`],
|
|
13889
14167
|
TextInput_default["input--extended"]
|
|
13890
14168
|
),
|
|
13891
14169
|
...generalInputProps
|
|
@@ -13893,7 +14171,7 @@ var TextInput = ({
|
|
|
13893
14171
|
)
|
|
13894
14172
|
] });
|
|
13895
14173
|
} else if (hasAffix) {
|
|
13896
|
-
extendedInput = /* @__PURE__ */ (0,
|
|
14174
|
+
extendedInput = /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(
|
|
13897
14175
|
Box,
|
|
13898
14176
|
{
|
|
13899
14177
|
position: "relative",
|
|
@@ -13901,7 +14179,7 @@ var TextInput = ({
|
|
|
13901
14179
|
alignItems: "center",
|
|
13902
14180
|
width: inputWidth,
|
|
13903
14181
|
children: [
|
|
13904
|
-
prefix2 && /* @__PURE__ */ (0,
|
|
14182
|
+
prefix2 && /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
13905
14183
|
"span",
|
|
13906
14184
|
{
|
|
13907
14185
|
ref: prefixRef,
|
|
@@ -13914,7 +14192,7 @@ var TextInput = ({
|
|
|
13914
14192
|
children: prefix2
|
|
13915
14193
|
}
|
|
13916
14194
|
),
|
|
13917
|
-
/* @__PURE__ */ (0,
|
|
14195
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
13918
14196
|
StatefulInput,
|
|
13919
14197
|
{
|
|
13920
14198
|
style: {
|
|
@@ -13925,7 +14203,7 @@ var TextInput = ({
|
|
|
13925
14203
|
...generalInputProps
|
|
13926
14204
|
}
|
|
13927
14205
|
),
|
|
13928
|
-
suffix && /* @__PURE__ */ (0,
|
|
14206
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
13929
14207
|
"span",
|
|
13930
14208
|
{
|
|
13931
14209
|
ref: suffixRef,
|
|
@@ -13942,7 +14220,7 @@ var TextInput = ({
|
|
|
13942
14220
|
}
|
|
13943
14221
|
);
|
|
13944
14222
|
}
|
|
13945
|
-
return /* @__PURE__ */ (0,
|
|
14223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(
|
|
13946
14224
|
"div",
|
|
13947
14225
|
{
|
|
13948
14226
|
className: cn(
|
|
@@ -13961,8 +14239,8 @@ var TextInput = ({
|
|
|
13961
14239
|
readOnly,
|
|
13962
14240
|
afterLabelContent
|
|
13963
14241
|
}),
|
|
13964
|
-
extendedInput ? extendedInput : /* @__PURE__ */ (0,
|
|
13965
|
-
hasBottomContainer && /* @__PURE__ */ (0,
|
|
14242
|
+
extendedInput ? extendedInput : /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(Box, { as: StatefulInput, width: inputWidth, ...generalInputProps }),
|
|
14243
|
+
hasBottomContainer && /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(
|
|
13966
14244
|
Box,
|
|
13967
14245
|
{
|
|
13968
14246
|
display: "flex",
|
|
@@ -13970,7 +14248,7 @@ var TextInput = ({
|
|
|
13970
14248
|
gap: "x0.5",
|
|
13971
14249
|
width: withCharacterCounter ? inputWidth : void 0,
|
|
13972
14250
|
children: [
|
|
13973
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId),
|
|
14251
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId }),
|
|
13974
14252
|
renderCharCounter(
|
|
13975
14253
|
characterCounterId,
|
|
13976
14254
|
withCharacterCounter,
|
|
@@ -14005,7 +14283,7 @@ var Toggle_default = {
|
|
|
14005
14283
|
};
|
|
14006
14284
|
|
|
14007
14285
|
// src/components/Toggle/Toggle.tsx
|
|
14008
|
-
var
|
|
14286
|
+
var import_jsx_runtime324 = require("react/jsx-runtime");
|
|
14009
14287
|
var TOGGLE_SIZES = createSizes("medium", "large");
|
|
14010
14288
|
var Toggle = ({
|
|
14011
14289
|
id,
|
|
@@ -14030,7 +14308,7 @@ var Toggle = ({
|
|
|
14030
14308
|
defaultValue: defaultChecked != null ? defaultChecked : false,
|
|
14031
14309
|
onChange
|
|
14032
14310
|
});
|
|
14033
|
-
return /* @__PURE__ */ (0,
|
|
14311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(
|
|
14034
14312
|
"label",
|
|
14035
14313
|
{
|
|
14036
14314
|
htmlFor: uniqueId,
|
|
@@ -14042,7 +14320,7 @@ var Toggle = ({
|
|
|
14042
14320
|
readOnly && Toggle_default["label--read-only"]
|
|
14043
14321
|
),
|
|
14044
14322
|
children: [
|
|
14045
|
-
/* @__PURE__ */ (0,
|
|
14323
|
+
/* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
14046
14324
|
HiddenInput,
|
|
14047
14325
|
{
|
|
14048
14326
|
...getBaseHTMLProps(
|
|
@@ -14064,7 +14342,7 @@ var Toggle = ({
|
|
|
14064
14342
|
onClick: readOnlyClickHandler(readOnly || isLoading, htmlProps.onClick)
|
|
14065
14343
|
}
|
|
14066
14344
|
),
|
|
14067
|
-
/* @__PURE__ */ (0,
|
|
14345
|
+
/* @__PURE__ */ (0, import_jsx_runtime324.jsx)("span", { className: cn(Toggle_default.track, focus_default["focus-styled-sibling"]), children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("span", { className: Toggle_default.thumb, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(Spinner, { size: `var(--dds-icon-size-${size2})` }) : /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
14068
14346
|
Icon,
|
|
14069
14347
|
{
|
|
14070
14348
|
className: Toggle_default.checkmark,
|
|
@@ -14072,8 +14350,8 @@ var Toggle = ({
|
|
|
14072
14350
|
iconSize
|
|
14073
14351
|
}
|
|
14074
14352
|
) }) }),
|
|
14075
|
-
/* @__PURE__ */ (0,
|
|
14076
|
-
readOnly && /* @__PURE__ */ (0,
|
|
14353
|
+
/* @__PURE__ */ (0, import_jsx_runtime324.jsxs)("span", { className: cn(readOnly && Toggle_default["labeltext--readonly"]), children: [
|
|
14354
|
+
readOnly && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
14077
14355
|
Icon,
|
|
14078
14356
|
{
|
|
14079
14357
|
icon: LockIcon,
|
|
@@ -14083,7 +14361,7 @@ var Toggle = ({
|
|
|
14083
14361
|
),
|
|
14084
14362
|
children,
|
|
14085
14363
|
" ",
|
|
14086
|
-
isLoading && /* @__PURE__ */ (0,
|
|
14364
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(VisuallyHidden, { children: t(commonTexts.loading) })
|
|
14087
14365
|
] })
|
|
14088
14366
|
]
|
|
14089
14367
|
}
|
|
@@ -14117,7 +14395,7 @@ var ToggleBar_default = {
|
|
|
14117
14395
|
};
|
|
14118
14396
|
|
|
14119
14397
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
14120
|
-
var
|
|
14398
|
+
var import_jsx_runtime325 = require("react/jsx-runtime");
|
|
14121
14399
|
var ToggleBar = (props) => {
|
|
14122
14400
|
const {
|
|
14123
14401
|
children,
|
|
@@ -14140,7 +14418,7 @@ var ToggleBar = (props) => {
|
|
|
14140
14418
|
(e) => onChange && onChange(e, e.target.value)
|
|
14141
14419
|
);
|
|
14142
14420
|
const labelId = label && `${uniqueId}-label`;
|
|
14143
|
-
return /* @__PURE__ */ (0,
|
|
14421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
|
|
14144
14422
|
ToggleBarContext,
|
|
14145
14423
|
{
|
|
14146
14424
|
value: {
|
|
@@ -14149,7 +14427,7 @@ var ToggleBar = (props) => {
|
|
|
14149
14427
|
name,
|
|
14150
14428
|
value: groupValue
|
|
14151
14429
|
},
|
|
14152
|
-
children: /* @__PURE__ */ (0,
|
|
14430
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)(
|
|
14153
14431
|
VStack,
|
|
14154
14432
|
{
|
|
14155
14433
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
@@ -14158,8 +14436,8 @@ var ToggleBar = (props) => {
|
|
|
14158
14436
|
role: "radiogroup",
|
|
14159
14437
|
"aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
|
|
14160
14438
|
children: [
|
|
14161
|
-
label && /* @__PURE__ */ (0,
|
|
14162
|
-
/* @__PURE__ */ (0,
|
|
14439
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(Typography, { id: labelId, as: "span", typographyType: "labelMedium", children: label }),
|
|
14440
|
+
/* @__PURE__ */ (0, import_jsx_runtime325.jsx)("div", { className: ToggleBar_default.bar, children })
|
|
14163
14441
|
]
|
|
14164
14442
|
}
|
|
14165
14443
|
)
|
|
@@ -14170,7 +14448,7 @@ ToggleBar.displayName = "ToggleBar";
|
|
|
14170
14448
|
|
|
14171
14449
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
14172
14450
|
var import_react102 = require("react");
|
|
14173
|
-
var
|
|
14451
|
+
var import_jsx_runtime326 = require("react/jsx-runtime");
|
|
14174
14452
|
var typographyTypes3 = {
|
|
14175
14453
|
large: "bodyLarge",
|
|
14176
14454
|
medium: "bodyMedium",
|
|
@@ -14210,8 +14488,8 @@ var ToggleRadio = ({
|
|
|
14210
14488
|
(_a = group == null ? void 0 : group.onChange) == null ? void 0 : _a.call(group, event);
|
|
14211
14489
|
};
|
|
14212
14490
|
const contentTypeCn = label ? "with-text" : "just-icon";
|
|
14213
|
-
return /* @__PURE__ */ (0,
|
|
14214
|
-
/* @__PURE__ */ (0,
|
|
14491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)("label", { htmlFor: uniqueId, className: ToggleBar_default.label, children: [
|
|
14492
|
+
/* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
|
|
14215
14493
|
HiddenInput,
|
|
14216
14494
|
{
|
|
14217
14495
|
...getBaseHTMLProps(
|
|
@@ -14229,7 +14507,7 @@ var ToggleRadio = ({
|
|
|
14229
14507
|
"aria-labelledby": ariaLabelledBy
|
|
14230
14508
|
}
|
|
14231
14509
|
),
|
|
14232
|
-
/* @__PURE__ */ (0,
|
|
14510
|
+
/* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(
|
|
14233
14511
|
Typography,
|
|
14234
14512
|
{
|
|
14235
14513
|
as: "span",
|
|
@@ -14240,8 +14518,8 @@ var ToggleRadio = ({
|
|
|
14240
14518
|
focus_default["focus-styled-sibling"]
|
|
14241
14519
|
),
|
|
14242
14520
|
children: [
|
|
14243
|
-
icon && /* @__PURE__ */ (0,
|
|
14244
|
-
label && /* @__PURE__ */ (0,
|
|
14521
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(Icon, { icon, iconSize: "inherit" }),
|
|
14522
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("span", { children: label })
|
|
14245
14523
|
]
|
|
14246
14524
|
}
|
|
14247
14525
|
)
|
|
@@ -14261,7 +14539,7 @@ var ToggleButton_default = {
|
|
|
14261
14539
|
};
|
|
14262
14540
|
|
|
14263
14541
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
14264
|
-
var
|
|
14542
|
+
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
14265
14543
|
var ToggleButton = ({
|
|
14266
14544
|
id,
|
|
14267
14545
|
label,
|
|
@@ -14274,8 +14552,8 @@ var ToggleButton = ({
|
|
|
14274
14552
|
const generatedId = (0, import_react103.useId)();
|
|
14275
14553
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
14276
14554
|
const hasIcon = !!icon;
|
|
14277
|
-
return /* @__PURE__ */ (0,
|
|
14278
|
-
/* @__PURE__ */ (0,
|
|
14555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(Box, { as: "label", htmlFor: uniqueId, width: "fit-content", children: [
|
|
14556
|
+
/* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
14279
14557
|
HiddenInput,
|
|
14280
14558
|
{
|
|
14281
14559
|
...getBaseHTMLProps(
|
|
@@ -14287,7 +14565,7 @@ var ToggleButton = ({
|
|
|
14287
14565
|
type: "checkbox"
|
|
14288
14566
|
}
|
|
14289
14567
|
),
|
|
14290
|
-
/* @__PURE__ */ (0,
|
|
14568
|
+
/* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(
|
|
14291
14569
|
"span",
|
|
14292
14570
|
{
|
|
14293
14571
|
className: cn(
|
|
@@ -14298,7 +14576,7 @@ var ToggleButton = ({
|
|
|
14298
14576
|
focus_default["focus-styled-sibling"]
|
|
14299
14577
|
),
|
|
14300
14578
|
children: [
|
|
14301
|
-
hasIcon && /* @__PURE__ */ (0,
|
|
14579
|
+
hasIcon && /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(Icon, { icon, iconSize: "inherit" }),
|
|
14302
14580
|
" ",
|
|
14303
14581
|
label
|
|
14304
14582
|
]
|
|
@@ -14310,7 +14588,7 @@ ToggleButton.displayName = "ToggleButton";
|
|
|
14310
14588
|
|
|
14311
14589
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
14312
14590
|
var import_react104 = require("react");
|
|
14313
|
-
var
|
|
14591
|
+
var import_jsx_runtime328 = require("react/jsx-runtime");
|
|
14314
14592
|
var ToggleButtonGroup = (props) => {
|
|
14315
14593
|
const {
|
|
14316
14594
|
children,
|
|
@@ -14324,7 +14602,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
14324
14602
|
} = props;
|
|
14325
14603
|
const generatedId = (0, import_react104.useId)();
|
|
14326
14604
|
const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
|
|
14327
|
-
return /* @__PURE__ */ (0,
|
|
14605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)(
|
|
14328
14606
|
"div",
|
|
14329
14607
|
{
|
|
14330
14608
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
@@ -14332,7 +14610,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
14332
14610
|
"aria-labelledby": label ? uniqueLabelId : void 0,
|
|
14333
14611
|
children: [
|
|
14334
14612
|
renderGroupLabel({ label, id: uniqueLabelId }),
|
|
14335
|
-
/* @__PURE__ */ (0,
|
|
14613
|
+
/* @__PURE__ */ (0, import_jsx_runtime328.jsx)(Box, { display: "flex", flexWrap: "wrap", gap: "x0.75", flexDirection: direction, children })
|
|
14336
14614
|
]
|
|
14337
14615
|
}
|
|
14338
14616
|
);
|
|
@@ -14469,6 +14747,16 @@ ToggleButtonGroup.displayName = "ToggleButtonGroup";
|
|
|
14469
14747
|
FooterLogo,
|
|
14470
14748
|
FooterSocialsGroup,
|
|
14471
14749
|
FooterSocialsList,
|
|
14750
|
+
FormSummary,
|
|
14751
|
+
FormSummaryEditButton,
|
|
14752
|
+
FormSummaryEmptyValue,
|
|
14753
|
+
FormSummaryError,
|
|
14754
|
+
FormSummaryField,
|
|
14755
|
+
FormSummaryFields,
|
|
14756
|
+
FormSummaryHeader,
|
|
14757
|
+
FormSummaryHeading,
|
|
14758
|
+
FormSummaryLabel,
|
|
14759
|
+
FormSummaryValue,
|
|
14472
14760
|
FullscreenExitIcon,
|
|
14473
14761
|
FullscreenIcon,
|
|
14474
14762
|
GavelIcon,
|