@vygruppen/spor-react 13.0.1 → 13.0.2
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/.turbo/turbo-build.log +10 -10
- package/.turbo/turbo-postinstall.log +3 -4
- package/CHANGELOG.md +9 -0
- package/dist/index.cjs +97 -134
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +97 -134
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/alert/AlertIcon.tsx +0 -56
- package/src/input/Switch.tsx +9 -1
- package/src/layout/Separator.tsx +1 -1
- package/src/theme/recipes/link.ts +1 -0
- package/src/toast/toast.tsx +5 -2
package/dist/index.mjs
CHANGED
|
@@ -208,8 +208,8 @@ function useTranslation() {
|
|
|
208
208
|
};
|
|
209
209
|
return { t, language };
|
|
210
210
|
}
|
|
211
|
-
function createTexts(
|
|
212
|
-
return
|
|
211
|
+
function createTexts(texts27) {
|
|
212
|
+
return texts27;
|
|
213
213
|
}
|
|
214
214
|
function Lottie({ animationData }) {
|
|
215
215
|
return /* @__PURE__ */ jsx(ReactLottie, { animationData });
|
|
@@ -1081,11 +1081,7 @@ var AlertIcon = ({
|
|
|
1081
1081
|
variant,
|
|
1082
1082
|
customIcon: CustomAlertIcon
|
|
1083
1083
|
}) => {
|
|
1084
|
-
|
|
1085
|
-
return /* @__PURE__ */ jsxs(Box, { ref, children: [
|
|
1086
|
-
/* @__PURE__ */ jsx(VisuallyHidden$1, { children: t(texts5[variant]) }),
|
|
1087
|
-
CustomAlertIcon ? /* @__PURE__ */ jsx(CustomAlertIcon, { color: `alert.${variant}.icon` }) : /* @__PURE__ */ jsx(BaseAlertIcon, { variant })
|
|
1088
|
-
] });
|
|
1084
|
+
return /* @__PURE__ */ jsx(Box, { ref, children: CustomAlertIcon ? /* @__PURE__ */ jsx(CustomAlertIcon, { color: `alert.${variant}.icon` }) : /* @__PURE__ */ jsx(BaseAlertIcon, { variant }) });
|
|
1089
1085
|
};
|
|
1090
1086
|
var BaseAlertIcon = ({
|
|
1091
1087
|
variant
|
|
@@ -1128,56 +1124,6 @@ var BaseAlertIcon = ({
|
|
|
1128
1124
|
}
|
|
1129
1125
|
}
|
|
1130
1126
|
};
|
|
1131
|
-
var texts5 = createTexts({
|
|
1132
|
-
info: {
|
|
1133
|
-
nb: "Informasjon",
|
|
1134
|
-
nn: "Informasjon",
|
|
1135
|
-
sv: "Information",
|
|
1136
|
-
en: "Information"
|
|
1137
|
-
},
|
|
1138
|
-
success: {
|
|
1139
|
-
nb: "Suksess",
|
|
1140
|
-
nn: "Suksess",
|
|
1141
|
-
sv: "Succ\xE9",
|
|
1142
|
-
en: "Success"
|
|
1143
|
-
},
|
|
1144
|
-
important: {
|
|
1145
|
-
nb: "Viktig",
|
|
1146
|
-
nn: "Viktig",
|
|
1147
|
-
sv: "Viktig",
|
|
1148
|
-
en: "Important"
|
|
1149
|
-
},
|
|
1150
|
-
alt: {
|
|
1151
|
-
nb: "Alternativ",
|
|
1152
|
-
nn: "Alternativ",
|
|
1153
|
-
sv: "Alternativ",
|
|
1154
|
-
en: "Alternative"
|
|
1155
|
-
},
|
|
1156
|
-
error: {
|
|
1157
|
-
nb: "Feil",
|
|
1158
|
-
nn: "Feil",
|
|
1159
|
-
sv: "Fel",
|
|
1160
|
-
en: "Error"
|
|
1161
|
-
},
|
|
1162
|
-
"error-secondary": {
|
|
1163
|
-
nb: "Feil",
|
|
1164
|
-
nn: "Feil",
|
|
1165
|
-
sv: "Fel",
|
|
1166
|
-
en: "Error"
|
|
1167
|
-
},
|
|
1168
|
-
neutral: {
|
|
1169
|
-
nb: "N\xF8ytral",
|
|
1170
|
-
nn: "N\xF8ytral",
|
|
1171
|
-
sv: "Neutral",
|
|
1172
|
-
en: "Neutral"
|
|
1173
|
-
},
|
|
1174
|
-
service: {
|
|
1175
|
-
nb: "Service",
|
|
1176
|
-
nn: "Service",
|
|
1177
|
-
sv: "Service",
|
|
1178
|
-
en: "Service"
|
|
1179
|
-
}
|
|
1180
|
-
});
|
|
1181
1127
|
var Alert = ({
|
|
1182
1128
|
ref,
|
|
1183
1129
|
...props
|
|
@@ -1343,7 +1289,7 @@ var ServiceAlert = ({
|
|
|
1343
1289
|
maxWidth: contentWidth,
|
|
1344
1290
|
children: [
|
|
1345
1291
|
/* @__PURE__ */ jsxs(HStack, { as: headingLevel, alignItems: "center", gap: "1", children: [
|
|
1346
|
-
variant === "service" ? /* @__PURE__ */ jsx(ServiceFill24Icon, { "aria-label": t(
|
|
1292
|
+
variant === "service" ? /* @__PURE__ */ jsx(ServiceFill24Icon, { "aria-label": t(texts5.service) }) : /* @__PURE__ */ jsx(WarningFill24Icon, { "aria-label": t(texts5["global-deviation"]) }),
|
|
1347
1293
|
/* @__PURE__ */ jsx(
|
|
1348
1294
|
Span,
|
|
1349
1295
|
{
|
|
@@ -1360,7 +1306,7 @@ var ServiceAlert = ({
|
|
|
1360
1306
|
)
|
|
1361
1307
|
] }),
|
|
1362
1308
|
/* @__PURE__ */ jsxs(Flex, { alignItems: "center", gap: [0.5, null, null, 1], children: [
|
|
1363
|
-
notification && /* @__PURE__ */ jsx(Text, { css: styles.notificationText, children: t(
|
|
1309
|
+
notification && /* @__PURE__ */ jsx(Text, { css: styles.notificationText, children: t(texts5.notification(notification)) }),
|
|
1364
1310
|
/* @__PURE__ */ jsx(Accordion$1.ItemIndicator, { children: /* @__PURE__ */ jsx(DropdownDownFill24Icon, { color: "icon.inverted" }) })
|
|
1365
1311
|
] })
|
|
1366
1312
|
]
|
|
@@ -1371,7 +1317,7 @@ var ServiceAlert = ({
|
|
|
1371
1317
|
}
|
|
1372
1318
|
);
|
|
1373
1319
|
};
|
|
1374
|
-
var
|
|
1320
|
+
var texts5 = createTexts({
|
|
1375
1321
|
notification: (notification) => {
|
|
1376
1322
|
const numberNotification = Number(notification);
|
|
1377
1323
|
return {
|
|
@@ -1638,7 +1584,7 @@ var Separator = ({
|
|
|
1638
1584
|
ref,
|
|
1639
1585
|
...props
|
|
1640
1586
|
}) => {
|
|
1641
|
-
return /* @__PURE__ */ jsx(Separator$1, { ...props, ref, "data-": true });
|
|
1587
|
+
return /* @__PURE__ */ jsx(Separator$1, { "aria-hidden": "true", ...props, ref, "data-": true });
|
|
1642
1588
|
};
|
|
1643
1589
|
var StaticCard = ({
|
|
1644
1590
|
ref,
|
|
@@ -1831,7 +1777,7 @@ function CalendarHeader({ dualView }) {
|
|
|
1831
1777
|
variant: "ghost",
|
|
1832
1778
|
marginLeft: 1,
|
|
1833
1779
|
disabled: prevButtonProps.isDisabled,
|
|
1834
|
-
"aria-label": t(
|
|
1780
|
+
"aria-label": t(texts6.previousMonth),
|
|
1835
1781
|
icon: /* @__PURE__ */ jsx(icons_exports.DropdownLeftFill24Icon, {})
|
|
1836
1782
|
}
|
|
1837
1783
|
),
|
|
@@ -1873,7 +1819,7 @@ function CalendarHeader({ dualView }) {
|
|
|
1873
1819
|
marginRight: 1,
|
|
1874
1820
|
variant: "ghost",
|
|
1875
1821
|
disabled: nextButtonProps.isDisabled,
|
|
1876
|
-
"aria-label": t(
|
|
1822
|
+
"aria-label": t(texts6.nextMonth),
|
|
1877
1823
|
icon: /* @__PURE__ */ jsx(icons_exports.DropdownRightFill24Icon, {})
|
|
1878
1824
|
}
|
|
1879
1825
|
)
|
|
@@ -1881,7 +1827,7 @@ function CalendarHeader({ dualView }) {
|
|
|
1881
1827
|
}
|
|
1882
1828
|
);
|
|
1883
1829
|
}
|
|
1884
|
-
var
|
|
1830
|
+
var texts6 = createTexts({
|
|
1885
1831
|
previousMonth: {
|
|
1886
1832
|
nb: "Forrige m\xE5ned",
|
|
1887
1833
|
nn: "F\xF8rre m\xE5nad",
|
|
@@ -2366,7 +2312,7 @@ var CalendarNavigator = ({
|
|
|
2366
2312
|
onPress: onPrevious,
|
|
2367
2313
|
isDisabled: isPreviousDisabled,
|
|
2368
2314
|
icon: /* @__PURE__ */ jsx(ArrowLeftOutline24Icon, {}),
|
|
2369
|
-
"aria-label": `${t(
|
|
2315
|
+
"aria-label": `${t(texts7.previous)} ${t(texts7[unit])}`
|
|
2370
2316
|
}
|
|
2371
2317
|
),
|
|
2372
2318
|
/* @__PURE__ */ jsx(
|
|
@@ -2387,12 +2333,12 @@ var CalendarNavigator = ({
|
|
|
2387
2333
|
onPress: onNext,
|
|
2388
2334
|
isDisabled: isNextDisabled,
|
|
2389
2335
|
icon: /* @__PURE__ */ jsx(ArrowRightOutline24Icon, {}),
|
|
2390
|
-
"aria-label": `${t(
|
|
2336
|
+
"aria-label": `${t(texts7.next)} ${t(texts7[unit])}`
|
|
2391
2337
|
}
|
|
2392
2338
|
)
|
|
2393
2339
|
] });
|
|
2394
2340
|
};
|
|
2395
|
-
var
|
|
2341
|
+
var texts7 = createTexts({
|
|
2396
2342
|
previous: {
|
|
2397
2343
|
nb: "Forrige",
|
|
2398
2344
|
nn: "Forrige",
|
|
@@ -2437,7 +2383,7 @@ function Calendar2({
|
|
|
2437
2383
|
const styles = recipe({ variant });
|
|
2438
2384
|
const { calendarProps } = useCalendar$1(props, state);
|
|
2439
2385
|
const calendarAriaLabel = calendarProps["aria-label"];
|
|
2440
|
-
const ariaLabel = t(
|
|
2386
|
+
const ariaLabel = t(texts8.calendar) + (calendarAriaLabel ? ` ${calendarAriaLabel}` : "");
|
|
2441
2387
|
return /* @__PURE__ */ jsxs(
|
|
2442
2388
|
Box,
|
|
2443
2389
|
{
|
|
@@ -2451,7 +2397,7 @@ function Calendar2({
|
|
|
2451
2397
|
}
|
|
2452
2398
|
);
|
|
2453
2399
|
}
|
|
2454
|
-
var
|
|
2400
|
+
var texts8 = createTexts({
|
|
2455
2401
|
calendar: {
|
|
2456
2402
|
nb: "Kalender",
|
|
2457
2403
|
nn: "Kalender",
|
|
@@ -2477,14 +2423,14 @@ var CalendarTriggerButton = ({
|
|
|
2477
2423
|
IconButton,
|
|
2478
2424
|
{
|
|
2479
2425
|
icon: /* @__PURE__ */ jsx(CalendarOutline24Icon, {}),
|
|
2480
|
-
"aria-label": t(
|
|
2426
|
+
"aria-label": t(texts9.openCalendar),
|
|
2481
2427
|
css: styles.calendarTriggerButton,
|
|
2482
2428
|
variant: "ghost",
|
|
2483
2429
|
disabled
|
|
2484
2430
|
}
|
|
2485
2431
|
) });
|
|
2486
2432
|
};
|
|
2487
|
-
var
|
|
2433
|
+
var texts9 = createTexts({
|
|
2488
2434
|
openCalendar: {
|
|
2489
2435
|
nb: "\xC5pne kalender",
|
|
2490
2436
|
nn: "\xC5pne kalendar",
|
|
@@ -2593,7 +2539,7 @@ var DateField = ({
|
|
|
2593
2539
|
)
|
|
2594
2540
|
] });
|
|
2595
2541
|
};
|
|
2596
|
-
var
|
|
2542
|
+
var texts10 = createTexts({
|
|
2597
2543
|
day: {
|
|
2598
2544
|
nb: "Velg dag",
|
|
2599
2545
|
nn: "Vel dag",
|
|
@@ -2616,16 +2562,16 @@ var texts11 = createTexts({
|
|
|
2616
2562
|
var getAriaLabel = (segmentType) => {
|
|
2617
2563
|
switch (segmentType) {
|
|
2618
2564
|
case "day": {
|
|
2619
|
-
return
|
|
2565
|
+
return texts10.day;
|
|
2620
2566
|
}
|
|
2621
2567
|
case "month": {
|
|
2622
|
-
return
|
|
2568
|
+
return texts10.month;
|
|
2623
2569
|
}
|
|
2624
2570
|
case "year": {
|
|
2625
|
-
return
|
|
2571
|
+
return texts10.year;
|
|
2626
2572
|
}
|
|
2627
2573
|
default: {
|
|
2628
|
-
return
|
|
2574
|
+
return texts10.day;
|
|
2629
2575
|
}
|
|
2630
2576
|
}
|
|
2631
2577
|
};
|
|
@@ -2960,7 +2906,7 @@ var TimePicker = ({
|
|
|
2960
2906
|
const isDisabled = isDisabledExternally ?? fieldDisabled ?? false;
|
|
2961
2907
|
const { t } = useTranslation();
|
|
2962
2908
|
const locale = useCurrentLocale();
|
|
2963
|
-
const label = externalLabel ?? t(
|
|
2909
|
+
const label = externalLabel ?? t(texts11.time);
|
|
2964
2910
|
const state = useTimeFieldState({
|
|
2965
2911
|
value,
|
|
2966
2912
|
defaultValue,
|
|
@@ -2993,15 +2939,15 @@ var TimePicker = ({
|
|
|
2993
2939
|
})
|
|
2994
2940
|
);
|
|
2995
2941
|
};
|
|
2996
|
-
const backwardsLabel = `${t(
|
|
2997
|
-
|
|
2942
|
+
const backwardsLabel = `${t(texts11.backwards)} ${minuteInterval} ${t(
|
|
2943
|
+
texts11.minutes
|
|
2998
2944
|
)}`;
|
|
2999
|
-
const forwardsLabel = `${t(
|
|
3000
|
-
|
|
2945
|
+
const forwardsLabel = `${t(texts11.forwards)} ${minuteInterval} ${t(
|
|
2946
|
+
texts11.minutes
|
|
3001
2947
|
)}`;
|
|
3002
|
-
const inputLabel = label ?? t(
|
|
2948
|
+
const inputLabel = label ?? t(texts11.time);
|
|
3003
2949
|
const ariaLabel = `${inputLabel} \u2013 ${t(
|
|
3004
|
-
|
|
2950
|
+
texts11.selectedTimeIs(`${(dateTime == null ? void 0 : dateTime.hour) ?? 0} ${(dateTime == null ? void 0 : dateTime.minute) ?? 0}`)
|
|
3005
2951
|
)}`;
|
|
3006
2952
|
return /* @__PURE__ */ jsx(Field3, { as: "time", ...boxProps, children: /* @__PURE__ */ jsxs(
|
|
3007
2953
|
StyledField,
|
|
@@ -3054,7 +3000,7 @@ var TimePicker = ({
|
|
|
3054
3000
|
}
|
|
3055
3001
|
) });
|
|
3056
3002
|
};
|
|
3057
|
-
var
|
|
3003
|
+
var texts11 = createTexts({
|
|
3058
3004
|
selectedTimeIs: (time) => ({
|
|
3059
3005
|
nb: `Valgt tidspunkt er ${time}`,
|
|
3060
3006
|
nn: `Valt tidspunkt er ${time}`,
|
|
@@ -3195,7 +3141,7 @@ var DrawerCloseTrigger = function DrawerCloseTrigger2({
|
|
|
3195
3141
|
{
|
|
3196
3142
|
variant: "ghost",
|
|
3197
3143
|
icon: /* @__PURE__ */ jsx(CloseFill24Icon, {}),
|
|
3198
|
-
label: t(
|
|
3144
|
+
label: t(texts12.close)
|
|
3199
3145
|
}
|
|
3200
3146
|
) : /* @__PURE__ */ jsx(CloseButton, { size: "md" }) });
|
|
3201
3147
|
};
|
|
@@ -3209,7 +3155,7 @@ var DrawerBackTrigger = ({
|
|
|
3209
3155
|
{
|
|
3210
3156
|
variant: "ghost",
|
|
3211
3157
|
icon: /* @__PURE__ */ jsx(ArrowLeftFill24Icon, {}),
|
|
3212
|
-
label: t(
|
|
3158
|
+
label: t(texts12.back)
|
|
3213
3159
|
}
|
|
3214
3160
|
) });
|
|
3215
3161
|
};
|
|
@@ -3241,7 +3187,7 @@ var DrawerBackdrop = Drawer$1.Backdrop;
|
|
|
3241
3187
|
var DrawerTitle = Drawer$1.Title;
|
|
3242
3188
|
var DrawerActionTrigger = Drawer$1.ActionTrigger;
|
|
3243
3189
|
var DrawerHeader = Drawer$1.Header;
|
|
3244
|
-
var
|
|
3190
|
+
var texts12 = createTexts({
|
|
3245
3191
|
back: {
|
|
3246
3192
|
en: "Back",
|
|
3247
3193
|
nb: "Tilbake",
|
|
@@ -3557,10 +3503,10 @@ function Autocomplete({
|
|
|
3557
3503
|
}
|
|
3558
3504
|
}
|
|
3559
3505
|
) }),
|
|
3560
|
-
/* @__PURE__ */ jsx(Combobox.IndicatorGroup, { children: /* @__PURE__ */ jsx(Combobox.ClearTrigger, { asChild: true, "aria-label": t(
|
|
3506
|
+
/* @__PURE__ */ jsx(Combobox.IndicatorGroup, { children: /* @__PURE__ */ jsx(Combobox.ClearTrigger, { asChild: true, "aria-label": t(texts13.clearValue), children: /* @__PURE__ */ jsx(CloseButton, { size: "xs", tabIndex: 0 }) }) })
|
|
3561
3507
|
] }),
|
|
3562
3508
|
/* @__PURE__ */ jsx(Combobox.Positioner, { children: /* @__PURE__ */ jsxs(Combobox.Content, { children: [
|
|
3563
|
-
!loading && /* @__PURE__ */ jsx(Combobox.Empty, { children: emptyLabel ?? t(
|
|
3509
|
+
!loading && /* @__PURE__ */ jsx(Combobox.Empty, { children: emptyLabel ?? t(texts13.noItemsFound) }),
|
|
3564
3510
|
loading ? /* @__PURE__ */ jsx(ColorSpinner, { width: "1.5rem", p: "2" }) : filteredChildren
|
|
3565
3511
|
] }) })
|
|
3566
3512
|
] });
|
|
@@ -3619,7 +3565,7 @@ var extractItemsFromChildren = (children) => {
|
|
|
3619
3565
|
});
|
|
3620
3566
|
return items;
|
|
3621
3567
|
};
|
|
3622
|
-
var
|
|
3568
|
+
var texts13 = createTexts({
|
|
3623
3569
|
noItemsFound: {
|
|
3624
3570
|
nb: "Ingen resultater",
|
|
3625
3571
|
nn: "Ingen resultat",
|
|
@@ -4358,7 +4304,7 @@ var NumericStepper = ({
|
|
|
4358
4304
|
{
|
|
4359
4305
|
icon: /* @__PURE__ */ jsx(SubtractIcon, { stepLabel: clampedStepSize }),
|
|
4360
4306
|
"aria-label": t(
|
|
4361
|
-
|
|
4307
|
+
texts14.decrementButtonAriaLabel(
|
|
4362
4308
|
clampedStepSize,
|
|
4363
4309
|
stepSize === 1 ? ariaLabelContext.singular : ariaLabelContext.plural
|
|
4364
4310
|
)
|
|
@@ -4385,7 +4331,7 @@ var NumericStepper = ({
|
|
|
4385
4331
|
css: styles.input,
|
|
4386
4332
|
width: `${Math.max(value.toString().length + 1, 3)}ch`,
|
|
4387
4333
|
"aria-live": "assertive",
|
|
4388
|
-
"aria-label": ariaLabelContext.plural === "" ? "" : t(
|
|
4334
|
+
"aria-label": ariaLabelContext.plural === "" ? "" : t(texts14.currentNumberAriaLabel(ariaLabelContext.plural)),
|
|
4389
4335
|
onChange: (event) => {
|
|
4390
4336
|
const numericInput = Number(event.target.value);
|
|
4391
4337
|
if (Number.isNaN(numericInput)) {
|
|
@@ -4403,7 +4349,7 @@ var NumericStepper = ({
|
|
|
4403
4349
|
{
|
|
4404
4350
|
"aria-live": "assertive",
|
|
4405
4351
|
paddingX: "0.95rem",
|
|
4406
|
-
"aria-label": ariaLabelContext.plural === "" ? "" : t(
|
|
4352
|
+
"aria-label": ariaLabelContext.plural === "" ? "" : t(texts14.currentNumberAriaLabel(ariaLabelContext.plural)),
|
|
4407
4353
|
children: value
|
|
4408
4354
|
}
|
|
4409
4355
|
),
|
|
@@ -4413,7 +4359,7 @@ var NumericStepper = ({
|
|
|
4413
4359
|
ref: addButtonRef,
|
|
4414
4360
|
icon: /* @__PURE__ */ jsx(AddIcon, { stepLabel: clampedStepSize }),
|
|
4415
4361
|
"aria-label": t(
|
|
4416
|
-
|
|
4362
|
+
texts14.incrementButtonAriaLabel(
|
|
4417
4363
|
clampedStepSize,
|
|
4418
4364
|
stepSize === 1 ? ariaLabelContext.singular : ariaLabelContext.plural
|
|
4419
4365
|
)
|
|
@@ -4487,7 +4433,7 @@ var AddIcon = ({ stepLabel }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
|
4487
4433
|
] }),
|
|
4488
4434
|
stepLabel > 1 && /* @__PURE__ */ jsx(chakra.span, { paddingRight: "1", children: stepLabel.toString() })
|
|
4489
4435
|
] });
|
|
4490
|
-
var
|
|
4436
|
+
var texts14 = createTexts({
|
|
4491
4437
|
currentNumberAriaLabel(ariaContext) {
|
|
4492
4438
|
return {
|
|
4493
4439
|
nb: `Valgt antall ${ariaContext}`,
|
|
@@ -4551,7 +4497,7 @@ var PasswordInput = ({
|
|
|
4551
4497
|
event.preventDefault();
|
|
4552
4498
|
setVisible(!visible);
|
|
4553
4499
|
},
|
|
4554
|
-
children: visible ? t(
|
|
4500
|
+
children: visible ? t(texts15.hidePassword) : t(texts15.showPassword)
|
|
4555
4501
|
}
|
|
4556
4502
|
),
|
|
4557
4503
|
...rest
|
|
@@ -4576,7 +4522,7 @@ var VisibilityTrigger = ({
|
|
|
4576
4522
|
}
|
|
4577
4523
|
);
|
|
4578
4524
|
};
|
|
4579
|
-
var
|
|
4525
|
+
var texts15 = createTexts({
|
|
4580
4526
|
showPassword: {
|
|
4581
4527
|
nb: "Vis",
|
|
4582
4528
|
nn: "Vis",
|
|
@@ -4628,14 +4574,14 @@ var CountryCodeSelect = ({
|
|
|
4628
4574
|
positioning: { placement: "bottom", flip: false },
|
|
4629
4575
|
collection: filteredCallingCodes,
|
|
4630
4576
|
lazyMount: true,
|
|
4631
|
-
"aria-label": t(
|
|
4577
|
+
"aria-label": t(texts16.countryCode),
|
|
4632
4578
|
sideRadiusVariant: "rightSideSquare",
|
|
4633
4579
|
role: "combobox",
|
|
4634
4580
|
children: filteredCallingCodes.items.map((code) => /* @__PURE__ */ jsx(SelectItem, { item: code, children: code.label }, code.label))
|
|
4635
4581
|
}
|
|
4636
4582
|
);
|
|
4637
4583
|
};
|
|
4638
|
-
var
|
|
4584
|
+
var texts16 = createTexts({
|
|
4639
4585
|
countryCode: {
|
|
4640
4586
|
nb: "Landkode",
|
|
4641
4587
|
nn: "Landskode",
|
|
@@ -4658,7 +4604,7 @@ var PhoneNumberInput = ({
|
|
|
4658
4604
|
errorText
|
|
4659
4605
|
} = props;
|
|
4660
4606
|
const { t } = useTranslation();
|
|
4661
|
-
const label = externalLabel ?? (optional ? t(
|
|
4607
|
+
const label = externalLabel ?? (optional ? t(texts17.phoneNumberOptional) : t(texts17.phoneNumber));
|
|
4662
4608
|
const [value, onChange] = useControllableState({
|
|
4663
4609
|
value: externalValue,
|
|
4664
4610
|
onChange: externalOnChange,
|
|
@@ -4713,7 +4659,7 @@ var PhoneNumberInput = ({
|
|
|
4713
4659
|
)
|
|
4714
4660
|
] });
|
|
4715
4661
|
};
|
|
4716
|
-
var
|
|
4662
|
+
var texts17 = createTexts({
|
|
4717
4663
|
phoneNumber: {
|
|
4718
4664
|
nb: "Telefonnummer",
|
|
4719
4665
|
nn: "Telefonnummer",
|
|
@@ -4765,16 +4711,16 @@ var SearchInput = ({
|
|
|
4765
4711
|
variant: "ghost",
|
|
4766
4712
|
type: "button",
|
|
4767
4713
|
size: "sm",
|
|
4768
|
-
"aria-label": t(
|
|
4714
|
+
"aria-label": t(texts18.reset),
|
|
4769
4715
|
icon: /* @__PURE__ */ jsx(CloseOutline24Icon, {}),
|
|
4770
4716
|
onClick: onReset
|
|
4771
4717
|
}
|
|
4772
4718
|
),
|
|
4773
|
-
label: label ?? t(
|
|
4719
|
+
label: label ?? t(texts18.label)
|
|
4774
4720
|
}
|
|
4775
4721
|
);
|
|
4776
4722
|
};
|
|
4777
|
-
var
|
|
4723
|
+
var texts18 = createTexts({
|
|
4778
4724
|
label: {
|
|
4779
4725
|
nb: "S\xF8k",
|
|
4780
4726
|
nn: "S\xF8k",
|
|
@@ -4950,6 +4896,9 @@ var Switch = ({
|
|
|
4950
4896
|
errorText,
|
|
4951
4897
|
helperText,
|
|
4952
4898
|
css,
|
|
4899
|
+
"aria-label": ariaLabel,
|
|
4900
|
+
"aria-labelledby": ariaLabelledby,
|
|
4901
|
+
"aria-describedby": ariaDescribedby,
|
|
4953
4902
|
...rest
|
|
4954
4903
|
} = props;
|
|
4955
4904
|
const recipe = useSlotRecipe({ key: "switch" });
|
|
@@ -4972,7 +4921,15 @@ var Switch = ({
|
|
|
4972
4921
|
checked: props.checked,
|
|
4973
4922
|
css: styles.root,
|
|
4974
4923
|
children: [
|
|
4975
|
-
/* @__PURE__ */ jsx(
|
|
4924
|
+
/* @__PURE__ */ jsx(
|
|
4925
|
+
Switch$1.HiddenInput,
|
|
4926
|
+
{
|
|
4927
|
+
ref,
|
|
4928
|
+
"aria-label": ariaLabel,
|
|
4929
|
+
"aria-labelledby": ariaLabelledby,
|
|
4930
|
+
"aria-describedby": ariaDescribedby
|
|
4931
|
+
}
|
|
4932
|
+
),
|
|
4976
4933
|
/* @__PURE__ */ jsx(Switch$1.Control, { css: styles.control, children: /* @__PURE__ */ jsx(Switch$1.Thumb, {}) }),
|
|
4977
4934
|
label && /* @__PURE__ */ jsx(Switch$1.Label, { children: label })
|
|
4978
4935
|
]
|
|
@@ -5297,7 +5254,7 @@ var TextLink = ({
|
|
|
5297
5254
|
}) => {
|
|
5298
5255
|
const { t } = useTranslation();
|
|
5299
5256
|
const isExternal = external ?? Boolean((href == null ? void 0 : href.startsWith("http://")) || (href == null ? void 0 : href.startsWith("https://")));
|
|
5300
|
-
const externalLabel = t ? t(
|
|
5257
|
+
const externalLabel = t ? t(texts19.externalLink) : texts19.externalLink.en;
|
|
5301
5258
|
if (props.asChild && isValidElement(children)) {
|
|
5302
5259
|
return /* @__PURE__ */ jsx(
|
|
5303
5260
|
Link,
|
|
@@ -5336,7 +5293,7 @@ var TextLink = ({
|
|
|
5336
5293
|
}
|
|
5337
5294
|
);
|
|
5338
5295
|
};
|
|
5339
|
-
var
|
|
5296
|
+
var texts19 = createTexts({
|
|
5340
5297
|
externalLink: {
|
|
5341
5298
|
nb: "Ekstern lenke",
|
|
5342
5299
|
nn: "Ekstern lenke",
|
|
@@ -5853,14 +5810,14 @@ var JumpButton = ({
|
|
|
5853
5810
|
as: "button",
|
|
5854
5811
|
ref,
|
|
5855
5812
|
css: styles.root,
|
|
5856
|
-
"aria-label": direction === "forward" ? t(
|
|
5813
|
+
"aria-label": direction === "forward" ? t(texts20.forward) : t(texts20.backward),
|
|
5857
5814
|
disabled,
|
|
5858
5815
|
...props,
|
|
5859
5816
|
children: direction === "forward" ? /* @__PURE__ */ jsx(Forward15MediaControllerFill30Icon, { css: styles.icon }) : /* @__PURE__ */ jsx(Backward15MediaControllerFill30Icon, { css: styles.icon })
|
|
5860
5817
|
}
|
|
5861
5818
|
);
|
|
5862
5819
|
};
|
|
5863
|
-
var
|
|
5820
|
+
var texts20 = createTexts({
|
|
5864
5821
|
forward: {
|
|
5865
5822
|
nb: "15 sekunder frem",
|
|
5866
5823
|
nn: "15 sekunder fram",
|
|
@@ -5888,14 +5845,14 @@ var PlayPauseButton = ({
|
|
|
5888
5845
|
ref,
|
|
5889
5846
|
as: "button",
|
|
5890
5847
|
css: styles.root,
|
|
5891
|
-
"aria-label": playing ? t(
|
|
5848
|
+
"aria-label": playing ? t(texts21.pause) : t(texts21.play),
|
|
5892
5849
|
disabled,
|
|
5893
5850
|
...props,
|
|
5894
5851
|
children: playing ? /* @__PURE__ */ jsx(PauseMediaControllerFill24Icon, { css: styles.icon }) : /* @__PURE__ */ jsx(PlayMediaControllerFill24Icon, { css: styles.icon })
|
|
5895
5852
|
}
|
|
5896
5853
|
);
|
|
5897
5854
|
};
|
|
5898
|
-
var
|
|
5855
|
+
var texts21 = createTexts({
|
|
5899
5856
|
pause: {
|
|
5900
5857
|
nb: "Pause",
|
|
5901
5858
|
nn: "Pause",
|
|
@@ -5923,14 +5880,14 @@ var SkipButton = ({
|
|
|
5923
5880
|
ref,
|
|
5924
5881
|
as: "button",
|
|
5925
5882
|
css: styles.root,
|
|
5926
|
-
"aria-label": direction === "forward" ? t(
|
|
5883
|
+
"aria-label": direction === "forward" ? t(texts22.next) : t(texts22.previous),
|
|
5927
5884
|
disabled,
|
|
5928
5885
|
...props,
|
|
5929
5886
|
children: direction === "forward" ? /* @__PURE__ */ jsx(NextMediaControllerFill30Icon, { css: styles.icon }) : /* @__PURE__ */ jsx(PreviousMediaControllerFill30Icon, { css: styles.icon })
|
|
5930
5887
|
}
|
|
5931
5888
|
);
|
|
5932
5889
|
};
|
|
5933
|
-
var
|
|
5890
|
+
var texts22 = createTexts({
|
|
5934
5891
|
next: {
|
|
5935
5892
|
nb: "Neste",
|
|
5936
5893
|
nn: "Neste",
|
|
@@ -6045,7 +6002,7 @@ var NudgeActions = ({ ...props }) => {
|
|
|
6045
6002
|
var NextButton = ({ isLastStep, onNext }) => {
|
|
6046
6003
|
const { t } = useTranslation();
|
|
6047
6004
|
if (isLastStep)
|
|
6048
|
-
return /* @__PURE__ */ jsx(PopoverCloseTrigger, { children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", size: "xs", children: t(
|
|
6005
|
+
return /* @__PURE__ */ jsx(PopoverCloseTrigger, { children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", size: "xs", children: t(texts23.close) }) });
|
|
6049
6006
|
return /* @__PURE__ */ jsx(
|
|
6050
6007
|
Button,
|
|
6051
6008
|
{
|
|
@@ -6053,11 +6010,11 @@ var NextButton = ({ isLastStep, onNext }) => {
|
|
|
6053
6010
|
size: "xs",
|
|
6054
6011
|
rightIcon: /* @__PURE__ */ jsx(ArrowRightFill18Icon, {}),
|
|
6055
6012
|
onClick: onNext,
|
|
6056
|
-
children: t(
|
|
6013
|
+
children: t(texts23.nextStep)
|
|
6057
6014
|
}
|
|
6058
6015
|
);
|
|
6059
6016
|
};
|
|
6060
|
-
var
|
|
6017
|
+
var texts23 = createTexts({
|
|
6061
6018
|
nextStep: {
|
|
6062
6019
|
nb: "Neste",
|
|
6063
6020
|
nn: "Neste",
|
|
@@ -6133,7 +6090,7 @@ var PaginationItem = ({
|
|
|
6133
6090
|
to: rootProps.getHref(props.value)
|
|
6134
6091
|
},
|
|
6135
6092
|
ref,
|
|
6136
|
-
"aria-label": t(
|
|
6093
|
+
"aria-label": t(texts24.pageOf(props.value, totalPages)),
|
|
6137
6094
|
...props,
|
|
6138
6095
|
children: props.value
|
|
6139
6096
|
}
|
|
@@ -6144,7 +6101,7 @@ var PaginationItem = ({
|
|
|
6144
6101
|
{
|
|
6145
6102
|
as: props.as ?? "button",
|
|
6146
6103
|
ref,
|
|
6147
|
-
"aria-label": t(
|
|
6104
|
+
"aria-label": t(texts24.pageOf(props.value, totalPages)),
|
|
6148
6105
|
"aria-current": page === props.value,
|
|
6149
6106
|
...props,
|
|
6150
6107
|
children: props.value
|
|
@@ -6174,7 +6131,7 @@ var PaginationPrevTrigger = ({
|
|
|
6174
6131
|
},
|
|
6175
6132
|
ref,
|
|
6176
6133
|
css: styles.item,
|
|
6177
|
-
"aria-label": t(
|
|
6134
|
+
"aria-label": t(texts24.previousPage),
|
|
6178
6135
|
...props,
|
|
6179
6136
|
children: /* @__PURE__ */ jsx(DropdownLeftOutline18Icon, {})
|
|
6180
6137
|
}
|
|
@@ -6185,7 +6142,7 @@ var PaginationPrevTrigger = ({
|
|
|
6185
6142
|
{
|
|
6186
6143
|
ref,
|
|
6187
6144
|
asChild: true,
|
|
6188
|
-
"aria-label": t(
|
|
6145
|
+
"aria-label": t(texts24.previousPage),
|
|
6189
6146
|
as: props.as || "button",
|
|
6190
6147
|
css: styles.item,
|
|
6191
6148
|
...props,
|
|
@@ -6214,7 +6171,7 @@ var PaginationNextTrigger = ({
|
|
|
6214
6171
|
to: rootProps.getHref(props.value)
|
|
6215
6172
|
},
|
|
6216
6173
|
css: styles.item,
|
|
6217
|
-
"aria-label": t(
|
|
6174
|
+
"aria-label": t(texts24.nextPage),
|
|
6218
6175
|
...props,
|
|
6219
6176
|
children: /* @__PURE__ */ jsx(DropdownRightOutline18Icon, {})
|
|
6220
6177
|
}
|
|
@@ -6225,7 +6182,7 @@ var PaginationNextTrigger = ({
|
|
|
6225
6182
|
{
|
|
6226
6183
|
ref,
|
|
6227
6184
|
css: styles.item,
|
|
6228
|
-
"aria-label": t(
|
|
6185
|
+
"aria-label": t(texts24.nextPage),
|
|
6229
6186
|
as: props.as || "button",
|
|
6230
6187
|
...props,
|
|
6231
6188
|
children: /* @__PURE__ */ jsx(DropdownRightOutline18Icon, {})
|
|
@@ -6252,7 +6209,7 @@ var PaginationItems = (props) => {
|
|
|
6252
6209
|
);
|
|
6253
6210
|
}) });
|
|
6254
6211
|
};
|
|
6255
|
-
var
|
|
6212
|
+
var texts24 = createTexts({
|
|
6256
6213
|
previousPage: {
|
|
6257
6214
|
nb: "Forrige side",
|
|
6258
6215
|
nn: "F\xF8rre side",
|
|
@@ -6343,7 +6300,7 @@ var ProgressIndicator = ({
|
|
|
6343
6300
|
"aria-valuemin": 1,
|
|
6344
6301
|
"aria-valuemax": numberOfSteps,
|
|
6345
6302
|
"aria-valuenow": activeStep,
|
|
6346
|
-
"aria-valuetext": t(
|
|
6303
|
+
"aria-valuetext": t(texts25.stepsOf(activeStep, numberOfSteps)),
|
|
6347
6304
|
ref,
|
|
6348
6305
|
children: /* @__PURE__ */ jsx(Box, { css: { ...styles.container, ...css }, children: Array.from({ length: numberOfSteps }, (_, index) => /* @__PURE__ */ jsx(
|
|
6349
6306
|
Box,
|
|
@@ -6362,7 +6319,7 @@ var ProgressIndicator = ({
|
|
|
6362
6319
|
}
|
|
6363
6320
|
);
|
|
6364
6321
|
};
|
|
6365
|
-
var
|
|
6322
|
+
var texts25 = createTexts({
|
|
6366
6323
|
stepsOf: (activeStep, numberOfSteps) => ({
|
|
6367
6324
|
nb: `Steg ${activeStep} av ${numberOfSteps}`,
|
|
6368
6325
|
nn: `Steg ${activeStep} av ${numberOfSteps}`,
|
|
@@ -6452,18 +6409,23 @@ var createToast = ({
|
|
|
6452
6409
|
text,
|
|
6453
6410
|
variant,
|
|
6454
6411
|
id,
|
|
6455
|
-
duration = 6e3
|
|
6412
|
+
duration = 6e3,
|
|
6413
|
+
width = "sm"
|
|
6456
6414
|
}) => toaster.create({
|
|
6457
6415
|
description: text,
|
|
6458
6416
|
type: variant,
|
|
6459
6417
|
id: id ?? crypto.randomUUID(),
|
|
6460
|
-
duration
|
|
6418
|
+
duration,
|
|
6419
|
+
meta: { width }
|
|
6461
6420
|
});
|
|
6462
6421
|
var Toaster = () => {
|
|
6463
|
-
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Toaster$1, { toaster, insetInline: { mdDown: "4" }, children: (toast) =>
|
|
6464
|
-
|
|
6465
|
-
/* @__PURE__ */
|
|
6466
|
-
|
|
6422
|
+
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Toaster$1, { toaster, insetInline: { mdDown: "4" }, children: (toast) => {
|
|
6423
|
+
var _a6;
|
|
6424
|
+
return /* @__PURE__ */ jsxs(Toast.Root, { width: { md: (_a6 = toast.meta) == null ? void 0 : _a6.width }, role: "alert", children: [
|
|
6425
|
+
/* @__PURE__ */ jsx(AlertIcon, { variant: toast.type }),
|
|
6426
|
+
/* @__PURE__ */ jsx(Stack, { gap: "1", flex: "1", maxWidth: "100%", children: /* @__PURE__ */ jsx(Toast.Description, { children: toast.description }) })
|
|
6427
|
+
] });
|
|
6428
|
+
} }) });
|
|
6467
6429
|
};
|
|
6468
6430
|
var SporProvider = ({
|
|
6469
6431
|
language = "nb" /* NorwegianBokmal */,
|
|
@@ -6543,7 +6505,7 @@ var Stepper = function Stepper2({
|
|
|
6543
6505
|
/* @__PURE__ */ jsx(
|
|
6544
6506
|
IconButton,
|
|
6545
6507
|
{
|
|
6546
|
-
"aria-label": t(
|
|
6508
|
+
"aria-label": t(texts26.back),
|
|
6547
6509
|
icon: /* @__PURE__ */ jsx(ArrowLeftFill24Icon, {}),
|
|
6548
6510
|
variant: "ghost",
|
|
6549
6511
|
size: "sm",
|
|
@@ -6567,7 +6529,7 @@ var Stepper = function Stepper2({
|
|
|
6567
6529
|
children: heading
|
|
6568
6530
|
}
|
|
6569
6531
|
),
|
|
6570
|
-
/* @__PURE__ */ jsx(Box, { css: style.stepCounter, "data-part": "step-counter", children: t(
|
|
6532
|
+
/* @__PURE__ */ jsx(Box, { css: style.stepCounter, "data-part": "step-counter", children: t(texts26.stepsOf(activeStep, numberOfSteps)) })
|
|
6571
6533
|
]
|
|
6572
6534
|
}
|
|
6573
6535
|
) }),
|
|
@@ -6586,7 +6548,7 @@ var Stepper = function Stepper2({
|
|
|
6586
6548
|
}
|
|
6587
6549
|
) });
|
|
6588
6550
|
};
|
|
6589
|
-
var
|
|
6551
|
+
var texts26 = createTexts({
|
|
6590
6552
|
stepsOf: (activeStep, numberOfSteps) => ({
|
|
6591
6553
|
nb: `Steg ${activeStep}/${numberOfSteps}`,
|
|
6592
6554
|
nn: `Steg ${activeStep}/${numberOfSteps}`,
|
|
@@ -7175,6 +7137,7 @@ var linkRecipe = defineRecipe({
|
|
|
7175
7137
|
paddingX: "0.5",
|
|
7176
7138
|
whiteSpace: "normal",
|
|
7177
7139
|
wordBreak: "break-word",
|
|
7140
|
+
paddingInline: 0,
|
|
7178
7141
|
_hover: {
|
|
7179
7142
|
textDecoration: "none"
|
|
7180
7143
|
},
|