@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/dist/index.cjs CHANGED
@@ -228,8 +228,8 @@ function useTranslation() {
228
228
  };
229
229
  return { t, language };
230
230
  }
231
- function createTexts(texts28) {
232
- return texts28;
231
+ function createTexts(texts27) {
232
+ return texts27;
233
233
  }
234
234
  function Lottie({ animationData }) {
235
235
  return /* @__PURE__ */ jsxRuntime.jsx(ReactLottie__default.default, { animationData });
@@ -1101,11 +1101,7 @@ var AlertIcon = ({
1101
1101
  variant,
1102
1102
  customIcon: CustomAlertIcon
1103
1103
  }) => {
1104
- const { t } = useTranslation();
1105
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { ref, children: [
1106
- /* @__PURE__ */ jsxRuntime.jsx(reactAria.VisuallyHidden, { children: t(texts5[variant]) }),
1107
- CustomAlertIcon ? /* @__PURE__ */ jsxRuntime.jsx(CustomAlertIcon, { color: `alert.${variant}.icon` }) : /* @__PURE__ */ jsxRuntime.jsx(BaseAlertIcon, { variant })
1108
- ] });
1104
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { ref, children: CustomAlertIcon ? /* @__PURE__ */ jsxRuntime.jsx(CustomAlertIcon, { color: `alert.${variant}.icon` }) : /* @__PURE__ */ jsxRuntime.jsx(BaseAlertIcon, { variant }) });
1109
1105
  };
1110
1106
  var BaseAlertIcon = ({
1111
1107
  variant
@@ -1148,56 +1144,6 @@ var BaseAlertIcon = ({
1148
1144
  }
1149
1145
  }
1150
1146
  };
1151
- var texts5 = createTexts({
1152
- info: {
1153
- nb: "Informasjon",
1154
- nn: "Informasjon",
1155
- sv: "Information",
1156
- en: "Information"
1157
- },
1158
- success: {
1159
- nb: "Suksess",
1160
- nn: "Suksess",
1161
- sv: "Succ\xE9",
1162
- en: "Success"
1163
- },
1164
- important: {
1165
- nb: "Viktig",
1166
- nn: "Viktig",
1167
- sv: "Viktig",
1168
- en: "Important"
1169
- },
1170
- alt: {
1171
- nb: "Alternativ",
1172
- nn: "Alternativ",
1173
- sv: "Alternativ",
1174
- en: "Alternative"
1175
- },
1176
- error: {
1177
- nb: "Feil",
1178
- nn: "Feil",
1179
- sv: "Fel",
1180
- en: "Error"
1181
- },
1182
- "error-secondary": {
1183
- nb: "Feil",
1184
- nn: "Feil",
1185
- sv: "Fel",
1186
- en: "Error"
1187
- },
1188
- neutral: {
1189
- nb: "N\xF8ytral",
1190
- nn: "N\xF8ytral",
1191
- sv: "Neutral",
1192
- en: "Neutral"
1193
- },
1194
- service: {
1195
- nb: "Service",
1196
- nn: "Service",
1197
- sv: "Service",
1198
- en: "Service"
1199
- }
1200
- });
1201
1147
  var Alert = ({
1202
1148
  ref,
1203
1149
  ...props
@@ -1363,7 +1309,7 @@ var ServiceAlert = ({
1363
1309
  maxWidth: contentWidth,
1364
1310
  children: [
1365
1311
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { as: headingLevel, alignItems: "center", gap: "1", children: [
1366
- variant === "service" ? /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.ServiceFill24Icon, { "aria-label": t(texts6.service) }) : /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.WarningFill24Icon, { "aria-label": t(texts6["global-deviation"]) }),
1312
+ variant === "service" ? /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.ServiceFill24Icon, { "aria-label": t(texts5.service) }) : /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.WarningFill24Icon, { "aria-label": t(texts5["global-deviation"]) }),
1367
1313
  /* @__PURE__ */ jsxRuntime.jsx(
1368
1314
  react.Span,
1369
1315
  {
@@ -1380,7 +1326,7 @@ var ServiceAlert = ({
1380
1326
  )
1381
1327
  ] }),
1382
1328
  /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { alignItems: "center", gap: [0.5, null, null, 1], children: [
1383
- notification && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { css: styles.notificationText, children: t(texts6.notification(notification)) }),
1329
+ notification && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { css: styles.notificationText, children: t(texts5.notification(notification)) }),
1384
1330
  /* @__PURE__ */ jsxRuntime.jsx(react.Accordion.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.DropdownDownFill24Icon, { color: "icon.inverted" }) })
1385
1331
  ] })
1386
1332
  ]
@@ -1391,7 +1337,7 @@ var ServiceAlert = ({
1391
1337
  }
1392
1338
  );
1393
1339
  };
1394
- var texts6 = createTexts({
1340
+ var texts5 = createTexts({
1395
1341
  notification: (notification) => {
1396
1342
  const numberNotification = Number(notification);
1397
1343
  return {
@@ -1658,7 +1604,7 @@ var Separator = ({
1658
1604
  ref,
1659
1605
  ...props
1660
1606
  }) => {
1661
- return /* @__PURE__ */ jsxRuntime.jsx(react.Separator, { ...props, ref, "data-": true });
1607
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Separator, { "aria-hidden": "true", ...props, ref, "data-": true });
1662
1608
  };
1663
1609
  var StaticCard = ({
1664
1610
  ref,
@@ -1851,7 +1797,7 @@ function CalendarHeader({ dualView }) {
1851
1797
  variant: "ghost",
1852
1798
  marginLeft: 1,
1853
1799
  disabled: prevButtonProps.isDisabled,
1854
- "aria-label": t(texts7.previousMonth),
1800
+ "aria-label": t(texts6.previousMonth),
1855
1801
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.DropdownLeftFill24Icon, {})
1856
1802
  }
1857
1803
  ),
@@ -1893,7 +1839,7 @@ function CalendarHeader({ dualView }) {
1893
1839
  marginRight: 1,
1894
1840
  variant: "ghost",
1895
1841
  disabled: nextButtonProps.isDisabled,
1896
- "aria-label": t(texts7.nextMonth),
1842
+ "aria-label": t(texts6.nextMonth),
1897
1843
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.DropdownRightFill24Icon, {})
1898
1844
  }
1899
1845
  )
@@ -1901,7 +1847,7 @@ function CalendarHeader({ dualView }) {
1901
1847
  }
1902
1848
  );
1903
1849
  }
1904
- var texts7 = createTexts({
1850
+ var texts6 = createTexts({
1905
1851
  previousMonth: {
1906
1852
  nb: "Forrige m\xE5ned",
1907
1853
  nn: "F\xF8rre m\xE5nad",
@@ -2386,7 +2332,7 @@ var CalendarNavigator = ({
2386
2332
  onPress: onPrevious,
2387
2333
  isDisabled: isPreviousDisabled,
2388
2334
  icon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.ArrowLeftOutline24Icon, {}),
2389
- "aria-label": `${t(texts8.previous)} ${t(texts8[unit])}`
2335
+ "aria-label": `${t(texts7.previous)} ${t(texts7[unit])}`
2390
2336
  }
2391
2337
  ),
2392
2338
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2407,12 +2353,12 @@ var CalendarNavigator = ({
2407
2353
  onPress: onNext,
2408
2354
  isDisabled: isNextDisabled,
2409
2355
  icon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.ArrowRightOutline24Icon, {}),
2410
- "aria-label": `${t(texts8.next)} ${t(texts8[unit])}`
2356
+ "aria-label": `${t(texts7.next)} ${t(texts7[unit])}`
2411
2357
  }
2412
2358
  )
2413
2359
  ] });
2414
2360
  };
2415
- var texts8 = createTexts({
2361
+ var texts7 = createTexts({
2416
2362
  previous: {
2417
2363
  nb: "Forrige",
2418
2364
  nn: "Forrige",
@@ -2457,7 +2403,7 @@ function Calendar2({
2457
2403
  const styles = recipe({ variant });
2458
2404
  const { calendarProps } = reactAria.useCalendar(props, state);
2459
2405
  const calendarAriaLabel = calendarProps["aria-label"];
2460
- const ariaLabel = t(texts9.calendar) + (calendarAriaLabel ? ` ${calendarAriaLabel}` : "");
2406
+ const ariaLabel = t(texts8.calendar) + (calendarAriaLabel ? ` ${calendarAriaLabel}` : "");
2461
2407
  return /* @__PURE__ */ jsxRuntime.jsxs(
2462
2408
  react.Box,
2463
2409
  {
@@ -2471,7 +2417,7 @@ function Calendar2({
2471
2417
  }
2472
2418
  );
2473
2419
  }
2474
- var texts9 = createTexts({
2420
+ var texts8 = createTexts({
2475
2421
  calendar: {
2476
2422
  nb: "Kalender",
2477
2423
  nn: "Kalender",
@@ -2497,14 +2443,14 @@ var CalendarTriggerButton = ({
2497
2443
  IconButton,
2498
2444
  {
2499
2445
  icon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.CalendarOutline24Icon, {}),
2500
- "aria-label": t(texts10.openCalendar),
2446
+ "aria-label": t(texts9.openCalendar),
2501
2447
  css: styles.calendarTriggerButton,
2502
2448
  variant: "ghost",
2503
2449
  disabled
2504
2450
  }
2505
2451
  ) });
2506
2452
  };
2507
- var texts10 = createTexts({
2453
+ var texts9 = createTexts({
2508
2454
  openCalendar: {
2509
2455
  nb: "\xC5pne kalender",
2510
2456
  nn: "\xC5pne kalendar",
@@ -2613,7 +2559,7 @@ var DateField = ({
2613
2559
  )
2614
2560
  ] });
2615
2561
  };
2616
- var texts11 = createTexts({
2562
+ var texts10 = createTexts({
2617
2563
  day: {
2618
2564
  nb: "Velg dag",
2619
2565
  nn: "Vel dag",
@@ -2636,16 +2582,16 @@ var texts11 = createTexts({
2636
2582
  var getAriaLabel = (segmentType) => {
2637
2583
  switch (segmentType) {
2638
2584
  case "day": {
2639
- return texts11.day;
2585
+ return texts10.day;
2640
2586
  }
2641
2587
  case "month": {
2642
- return texts11.month;
2588
+ return texts10.month;
2643
2589
  }
2644
2590
  case "year": {
2645
- return texts11.year;
2591
+ return texts10.year;
2646
2592
  }
2647
2593
  default: {
2648
- return texts11.day;
2594
+ return texts10.day;
2649
2595
  }
2650
2596
  }
2651
2597
  };
@@ -2980,7 +2926,7 @@ var TimePicker = ({
2980
2926
  const isDisabled = isDisabledExternally ?? fieldDisabled ?? false;
2981
2927
  const { t } = useTranslation();
2982
2928
  const locale = useCurrentLocale();
2983
- const label = externalLabel ?? t(texts12.time);
2929
+ const label = externalLabel ?? t(texts11.time);
2984
2930
  const state = reactStately.useTimeFieldState({
2985
2931
  value,
2986
2932
  defaultValue,
@@ -3013,15 +2959,15 @@ var TimePicker = ({
3013
2959
  })
3014
2960
  );
3015
2961
  };
3016
- const backwardsLabel = `${t(texts12.backwards)} ${minuteInterval} ${t(
3017
- texts12.minutes
2962
+ const backwardsLabel = `${t(texts11.backwards)} ${minuteInterval} ${t(
2963
+ texts11.minutes
3018
2964
  )}`;
3019
- const forwardsLabel = `${t(texts12.forwards)} ${minuteInterval} ${t(
3020
- texts12.minutes
2965
+ const forwardsLabel = `${t(texts11.forwards)} ${minuteInterval} ${t(
2966
+ texts11.minutes
3021
2967
  )}`;
3022
- const inputLabel = label ?? t(texts12.time);
2968
+ const inputLabel = label ?? t(texts11.time);
3023
2969
  const ariaLabel = `${inputLabel} \u2013 ${t(
3024
- texts12.selectedTimeIs(`${(dateTime == null ? void 0 : dateTime.hour) ?? 0} ${(dateTime == null ? void 0 : dateTime.minute) ?? 0}`)
2970
+ texts11.selectedTimeIs(`${(dateTime == null ? void 0 : dateTime.hour) ?? 0} ${(dateTime == null ? void 0 : dateTime.minute) ?? 0}`)
3025
2971
  )}`;
3026
2972
  return /* @__PURE__ */ jsxRuntime.jsx(Field3, { as: "time", ...boxProps, children: /* @__PURE__ */ jsxRuntime.jsxs(
3027
2973
  StyledField,
@@ -3074,7 +3020,7 @@ var TimePicker = ({
3074
3020
  }
3075
3021
  ) });
3076
3022
  };
3077
- var texts12 = createTexts({
3023
+ var texts11 = createTexts({
3078
3024
  selectedTimeIs: (time) => ({
3079
3025
  nb: `Valgt tidspunkt er ${time}`,
3080
3026
  nn: `Valt tidspunkt er ${time}`,
@@ -3215,7 +3161,7 @@ var DrawerCloseTrigger = function DrawerCloseTrigger2({
3215
3161
  {
3216
3162
  variant: "ghost",
3217
3163
  icon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.CloseFill24Icon, {}),
3218
- label: t(texts13.close)
3164
+ label: t(texts12.close)
3219
3165
  }
3220
3166
  ) : /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { size: "md" }) });
3221
3167
  };
@@ -3229,7 +3175,7 @@ var DrawerBackTrigger = ({
3229
3175
  {
3230
3176
  variant: "ghost",
3231
3177
  icon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.ArrowLeftFill24Icon, {}),
3232
- label: t(texts13.back)
3178
+ label: t(texts12.back)
3233
3179
  }
3234
3180
  ) });
3235
3181
  };
@@ -3261,7 +3207,7 @@ var DrawerBackdrop = react.Drawer.Backdrop;
3261
3207
  var DrawerTitle = react.Drawer.Title;
3262
3208
  var DrawerActionTrigger = react.Drawer.ActionTrigger;
3263
3209
  var DrawerHeader = react.Drawer.Header;
3264
- var texts13 = createTexts({
3210
+ var texts12 = createTexts({
3265
3211
  back: {
3266
3212
  en: "Back",
3267
3213
  nb: "Tilbake",
@@ -3577,10 +3523,10 @@ function Autocomplete({
3577
3523
  }
3578
3524
  }
3579
3525
  ) }),
3580
- /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.IndicatorGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.ClearTrigger, { asChild: true, "aria-label": t(texts14.clearValue), children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { size: "xs", tabIndex: 0 }) }) })
3526
+ /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.IndicatorGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.ClearTrigger, { asChild: true, "aria-label": t(texts13.clearValue), children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { size: "xs", tabIndex: 0 }) }) })
3581
3527
  ] }),
3582
3528
  /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Combobox.Content, { children: [
3583
- !loading && /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Empty, { children: emptyLabel ?? t(texts14.noItemsFound) }),
3529
+ !loading && /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Empty, { children: emptyLabel ?? t(texts13.noItemsFound) }),
3584
3530
  loading ? /* @__PURE__ */ jsxRuntime.jsx(ColorSpinner, { width: "1.5rem", p: "2" }) : filteredChildren
3585
3531
  ] }) })
3586
3532
  ] });
@@ -3639,7 +3585,7 @@ var extractItemsFromChildren = (children) => {
3639
3585
  });
3640
3586
  return items;
3641
3587
  };
3642
- var texts14 = createTexts({
3588
+ var texts13 = createTexts({
3643
3589
  noItemsFound: {
3644
3590
  nb: "Ingen resultater",
3645
3591
  nn: "Ingen resultat",
@@ -4378,7 +4324,7 @@ var NumericStepper = ({
4378
4324
  {
4379
4325
  icon: /* @__PURE__ */ jsxRuntime.jsx(SubtractIcon, { stepLabel: clampedStepSize }),
4380
4326
  "aria-label": t(
4381
- texts15.decrementButtonAriaLabel(
4327
+ texts14.decrementButtonAriaLabel(
4382
4328
  clampedStepSize,
4383
4329
  stepSize === 1 ? ariaLabelContext.singular : ariaLabelContext.plural
4384
4330
  )
@@ -4405,7 +4351,7 @@ var NumericStepper = ({
4405
4351
  css: styles.input,
4406
4352
  width: `${Math.max(value.toString().length + 1, 3)}ch`,
4407
4353
  "aria-live": "assertive",
4408
- "aria-label": ariaLabelContext.plural === "" ? "" : t(texts15.currentNumberAriaLabel(ariaLabelContext.plural)),
4354
+ "aria-label": ariaLabelContext.plural === "" ? "" : t(texts14.currentNumberAriaLabel(ariaLabelContext.plural)),
4409
4355
  onChange: (event) => {
4410
4356
  const numericInput = Number(event.target.value);
4411
4357
  if (Number.isNaN(numericInput)) {
@@ -4423,7 +4369,7 @@ var NumericStepper = ({
4423
4369
  {
4424
4370
  "aria-live": "assertive",
4425
4371
  paddingX: "0.95rem",
4426
- "aria-label": ariaLabelContext.plural === "" ? "" : t(texts15.currentNumberAriaLabel(ariaLabelContext.plural)),
4372
+ "aria-label": ariaLabelContext.plural === "" ? "" : t(texts14.currentNumberAriaLabel(ariaLabelContext.plural)),
4427
4373
  children: value
4428
4374
  }
4429
4375
  ),
@@ -4433,7 +4379,7 @@ var NumericStepper = ({
4433
4379
  ref: addButtonRef,
4434
4380
  icon: /* @__PURE__ */ jsxRuntime.jsx(AddIcon, { stepLabel: clampedStepSize }),
4435
4381
  "aria-label": t(
4436
- texts15.incrementButtonAriaLabel(
4382
+ texts14.incrementButtonAriaLabel(
4437
4383
  clampedStepSize,
4438
4384
  stepSize === 1 ? ariaLabelContext.singular : ariaLabelContext.plural
4439
4385
  )
@@ -4507,7 +4453,7 @@ var AddIcon = ({ stepLabel }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Frag
4507
4453
  ] }),
4508
4454
  stepLabel > 1 && /* @__PURE__ */ jsxRuntime.jsx(react.chakra.span, { paddingRight: "1", children: stepLabel.toString() })
4509
4455
  ] });
4510
- var texts15 = createTexts({
4456
+ var texts14 = createTexts({
4511
4457
  currentNumberAriaLabel(ariaContext) {
4512
4458
  return {
4513
4459
  nb: `Valgt antall ${ariaContext}`,
@@ -4571,7 +4517,7 @@ var PasswordInput = ({
4571
4517
  event.preventDefault();
4572
4518
  setVisible(!visible);
4573
4519
  },
4574
- children: visible ? t(texts16.hidePassword) : t(texts16.showPassword)
4520
+ children: visible ? t(texts15.hidePassword) : t(texts15.showPassword)
4575
4521
  }
4576
4522
  ),
4577
4523
  ...rest
@@ -4596,7 +4542,7 @@ var VisibilityTrigger = ({
4596
4542
  }
4597
4543
  );
4598
4544
  };
4599
- var texts16 = createTexts({
4545
+ var texts15 = createTexts({
4600
4546
  showPassword: {
4601
4547
  nb: "Vis",
4602
4548
  nn: "Vis",
@@ -4648,14 +4594,14 @@ var CountryCodeSelect = ({
4648
4594
  positioning: { placement: "bottom", flip: false },
4649
4595
  collection: filteredCallingCodes,
4650
4596
  lazyMount: true,
4651
- "aria-label": t(texts17.countryCode),
4597
+ "aria-label": t(texts16.countryCode),
4652
4598
  sideRadiusVariant: "rightSideSquare",
4653
4599
  role: "combobox",
4654
4600
  children: filteredCallingCodes.items.map((code) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { item: code, children: code.label }, code.label))
4655
4601
  }
4656
4602
  );
4657
4603
  };
4658
- var texts17 = createTexts({
4604
+ var texts16 = createTexts({
4659
4605
  countryCode: {
4660
4606
  nb: "Landkode",
4661
4607
  nn: "Landskode",
@@ -4678,7 +4624,7 @@ var PhoneNumberInput = ({
4678
4624
  errorText
4679
4625
  } = props;
4680
4626
  const { t } = useTranslation();
4681
- const label = externalLabel ?? (optional ? t(texts18.phoneNumberOptional) : t(texts18.phoneNumber));
4627
+ const label = externalLabel ?? (optional ? t(texts17.phoneNumberOptional) : t(texts17.phoneNumber));
4682
4628
  const [value, onChange] = react.useControllableState({
4683
4629
  value: externalValue,
4684
4630
  onChange: externalOnChange,
@@ -4733,7 +4679,7 @@ var PhoneNumberInput = ({
4733
4679
  )
4734
4680
  ] });
4735
4681
  };
4736
- var texts18 = createTexts({
4682
+ var texts17 = createTexts({
4737
4683
  phoneNumber: {
4738
4684
  nb: "Telefonnummer",
4739
4685
  nn: "Telefonnummer",
@@ -4785,16 +4731,16 @@ var SearchInput = ({
4785
4731
  variant: "ghost",
4786
4732
  type: "button",
4787
4733
  size: "sm",
4788
- "aria-label": t(texts19.reset),
4734
+ "aria-label": t(texts18.reset),
4789
4735
  icon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.CloseOutline24Icon, {}),
4790
4736
  onClick: onReset
4791
4737
  }
4792
4738
  ),
4793
- label: label ?? t(texts19.label)
4739
+ label: label ?? t(texts18.label)
4794
4740
  }
4795
4741
  );
4796
4742
  };
4797
- var texts19 = createTexts({
4743
+ var texts18 = createTexts({
4798
4744
  label: {
4799
4745
  nb: "S\xF8k",
4800
4746
  nn: "S\xF8k",
@@ -4970,6 +4916,9 @@ var Switch = ({
4970
4916
  errorText,
4971
4917
  helperText,
4972
4918
  css,
4919
+ "aria-label": ariaLabel,
4920
+ "aria-labelledby": ariaLabelledby,
4921
+ "aria-describedby": ariaDescribedby,
4973
4922
  ...rest
4974
4923
  } = props;
4975
4924
  const recipe = react.useSlotRecipe({ key: "switch" });
@@ -4992,7 +4941,15 @@ var Switch = ({
4992
4941
  checked: props.checked,
4993
4942
  css: styles.root,
4994
4943
  children: [
4995
- /* @__PURE__ */ jsxRuntime.jsx(react.Switch.HiddenInput, { ref }),
4944
+ /* @__PURE__ */ jsxRuntime.jsx(
4945
+ react.Switch.HiddenInput,
4946
+ {
4947
+ ref,
4948
+ "aria-label": ariaLabel,
4949
+ "aria-labelledby": ariaLabelledby,
4950
+ "aria-describedby": ariaDescribedby
4951
+ }
4952
+ ),
4996
4953
  /* @__PURE__ */ jsxRuntime.jsx(react.Switch.Control, { css: styles.control, children: /* @__PURE__ */ jsxRuntime.jsx(react.Switch.Thumb, {}) }),
4997
4954
  label && /* @__PURE__ */ jsxRuntime.jsx(react.Switch.Label, { children: label })
4998
4955
  ]
@@ -5317,7 +5274,7 @@ var TextLink = ({
5317
5274
  }) => {
5318
5275
  const { t } = useTranslation();
5319
5276
  const isExternal = external ?? Boolean((href == null ? void 0 : href.startsWith("http://")) || (href == null ? void 0 : href.startsWith("https://")));
5320
- const externalLabel = t ? t(texts20.externalLink) : texts20.externalLink.en;
5277
+ const externalLabel = t ? t(texts19.externalLink) : texts19.externalLink.en;
5321
5278
  if (props.asChild && React13.isValidElement(children)) {
5322
5279
  return /* @__PURE__ */ jsxRuntime.jsx(
5323
5280
  react.Link,
@@ -5356,7 +5313,7 @@ var TextLink = ({
5356
5313
  }
5357
5314
  );
5358
5315
  };
5359
- var texts20 = createTexts({
5316
+ var texts19 = createTexts({
5360
5317
  externalLink: {
5361
5318
  nb: "Ekstern lenke",
5362
5319
  nn: "Ekstern lenke",
@@ -5873,14 +5830,14 @@ var JumpButton = ({
5873
5830
  as: "button",
5874
5831
  ref,
5875
5832
  css: styles.root,
5876
- "aria-label": direction === "forward" ? t(texts21.forward) : t(texts21.backward),
5833
+ "aria-label": direction === "forward" ? t(texts20.forward) : t(texts20.backward),
5877
5834
  disabled,
5878
5835
  ...props,
5879
5836
  children: direction === "forward" ? /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.Forward15MediaControllerFill30Icon, { css: styles.icon }) : /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.Backward15MediaControllerFill30Icon, { css: styles.icon })
5880
5837
  }
5881
5838
  );
5882
5839
  };
5883
- var texts21 = createTexts({
5840
+ var texts20 = createTexts({
5884
5841
  forward: {
5885
5842
  nb: "15 sekunder frem",
5886
5843
  nn: "15 sekunder fram",
@@ -5908,14 +5865,14 @@ var PlayPauseButton = ({
5908
5865
  ref,
5909
5866
  as: "button",
5910
5867
  css: styles.root,
5911
- "aria-label": playing ? t(texts22.pause) : t(texts22.play),
5868
+ "aria-label": playing ? t(texts21.pause) : t(texts21.play),
5912
5869
  disabled,
5913
5870
  ...props,
5914
5871
  children: playing ? /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.PauseMediaControllerFill24Icon, { css: styles.icon }) : /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.PlayMediaControllerFill24Icon, { css: styles.icon })
5915
5872
  }
5916
5873
  );
5917
5874
  };
5918
- var texts22 = createTexts({
5875
+ var texts21 = createTexts({
5919
5876
  pause: {
5920
5877
  nb: "Pause",
5921
5878
  nn: "Pause",
@@ -5943,14 +5900,14 @@ var SkipButton = ({
5943
5900
  ref,
5944
5901
  as: "button",
5945
5902
  css: styles.root,
5946
- "aria-label": direction === "forward" ? t(texts23.next) : t(texts23.previous),
5903
+ "aria-label": direction === "forward" ? t(texts22.next) : t(texts22.previous),
5947
5904
  disabled,
5948
5905
  ...props,
5949
5906
  children: direction === "forward" ? /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.NextMediaControllerFill30Icon, { css: styles.icon }) : /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.PreviousMediaControllerFill30Icon, { css: styles.icon })
5950
5907
  }
5951
5908
  );
5952
5909
  };
5953
- var texts23 = createTexts({
5910
+ var texts22 = createTexts({
5954
5911
  next: {
5955
5912
  nb: "Neste",
5956
5913
  nn: "Neste",
@@ -6065,7 +6022,7 @@ var NudgeActions = ({ ...props }) => {
6065
6022
  var NextButton = ({ isLastStep, onNext }) => {
6066
6023
  const { t } = useTranslation();
6067
6024
  if (isLastStep)
6068
- return /* @__PURE__ */ jsxRuntime.jsx(react.PopoverCloseTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "tertiary", size: "xs", children: t(texts24.close) }) });
6025
+ return /* @__PURE__ */ jsxRuntime.jsx(react.PopoverCloseTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "tertiary", size: "xs", children: t(texts23.close) }) });
6069
6026
  return /* @__PURE__ */ jsxRuntime.jsx(
6070
6027
  Button,
6071
6028
  {
@@ -6073,11 +6030,11 @@ var NextButton = ({ isLastStep, onNext }) => {
6073
6030
  size: "xs",
6074
6031
  rightIcon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.ArrowRightFill18Icon, {}),
6075
6032
  onClick: onNext,
6076
- children: t(texts24.nextStep)
6033
+ children: t(texts23.nextStep)
6077
6034
  }
6078
6035
  );
6079
6036
  };
6080
- var texts24 = createTexts({
6037
+ var texts23 = createTexts({
6081
6038
  nextStep: {
6082
6039
  nb: "Neste",
6083
6040
  nn: "Neste",
@@ -6153,7 +6110,7 @@ var PaginationItem = ({
6153
6110
  to: rootProps.getHref(props.value)
6154
6111
  },
6155
6112
  ref,
6156
- "aria-label": t(texts25.pageOf(props.value, totalPages)),
6113
+ "aria-label": t(texts24.pageOf(props.value, totalPages)),
6157
6114
  ...props,
6158
6115
  children: props.value
6159
6116
  }
@@ -6164,7 +6121,7 @@ var PaginationItem = ({
6164
6121
  {
6165
6122
  as: props.as ?? "button",
6166
6123
  ref,
6167
- "aria-label": t(texts25.pageOf(props.value, totalPages)),
6124
+ "aria-label": t(texts24.pageOf(props.value, totalPages)),
6168
6125
  "aria-current": page === props.value,
6169
6126
  ...props,
6170
6127
  children: props.value
@@ -6194,7 +6151,7 @@ var PaginationPrevTrigger = ({
6194
6151
  },
6195
6152
  ref,
6196
6153
  css: styles.item,
6197
- "aria-label": t(texts25.previousPage),
6154
+ "aria-label": t(texts24.previousPage),
6198
6155
  ...props,
6199
6156
  children: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.DropdownLeftOutline18Icon, {})
6200
6157
  }
@@ -6205,7 +6162,7 @@ var PaginationPrevTrigger = ({
6205
6162
  {
6206
6163
  ref,
6207
6164
  asChild: true,
6208
- "aria-label": t(texts25.previousPage),
6165
+ "aria-label": t(texts24.previousPage),
6209
6166
  as: props.as || "button",
6210
6167
  css: styles.item,
6211
6168
  ...props,
@@ -6234,7 +6191,7 @@ var PaginationNextTrigger = ({
6234
6191
  to: rootProps.getHref(props.value)
6235
6192
  },
6236
6193
  css: styles.item,
6237
- "aria-label": t(texts25.nextPage),
6194
+ "aria-label": t(texts24.nextPage),
6238
6195
  ...props,
6239
6196
  children: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.DropdownRightOutline18Icon, {})
6240
6197
  }
@@ -6245,7 +6202,7 @@ var PaginationNextTrigger = ({
6245
6202
  {
6246
6203
  ref,
6247
6204
  css: styles.item,
6248
- "aria-label": t(texts25.nextPage),
6205
+ "aria-label": t(texts24.nextPage),
6249
6206
  as: props.as || "button",
6250
6207
  ...props,
6251
6208
  children: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.DropdownRightOutline18Icon, {})
@@ -6272,7 +6229,7 @@ var PaginationItems = (props) => {
6272
6229
  );
6273
6230
  }) });
6274
6231
  };
6275
- var texts25 = createTexts({
6232
+ var texts24 = createTexts({
6276
6233
  previousPage: {
6277
6234
  nb: "Forrige side",
6278
6235
  nn: "F\xF8rre side",
@@ -6363,7 +6320,7 @@ var ProgressIndicator = ({
6363
6320
  "aria-valuemin": 1,
6364
6321
  "aria-valuemax": numberOfSteps,
6365
6322
  "aria-valuenow": activeStep,
6366
- "aria-valuetext": t(texts26.stepsOf(activeStep, numberOfSteps)),
6323
+ "aria-valuetext": t(texts25.stepsOf(activeStep, numberOfSteps)),
6367
6324
  ref,
6368
6325
  children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: { ...styles.container, ...css }, children: Array.from({ length: numberOfSteps }, (_, index) => /* @__PURE__ */ jsxRuntime.jsx(
6369
6326
  react.Box,
@@ -6382,7 +6339,7 @@ var ProgressIndicator = ({
6382
6339
  }
6383
6340
  );
6384
6341
  };
6385
- var texts26 = createTexts({
6342
+ var texts25 = createTexts({
6386
6343
  stepsOf: (activeStep, numberOfSteps) => ({
6387
6344
  nb: `Steg ${activeStep} av ${numberOfSteps}`,
6388
6345
  nn: `Steg ${activeStep} av ${numberOfSteps}`,
@@ -6472,18 +6429,23 @@ var createToast = ({
6472
6429
  text,
6473
6430
  variant,
6474
6431
  id,
6475
- duration = 6e3
6432
+ duration = 6e3,
6433
+ width = "sm"
6476
6434
  }) => toaster.create({
6477
6435
  description: text,
6478
6436
  type: variant,
6479
6437
  id: id ?? crypto.randomUUID(),
6480
- duration
6438
+ duration,
6439
+ meta: { width }
6481
6440
  });
6482
6441
  var Toaster = () => {
6483
- return /* @__PURE__ */ jsxRuntime.jsx(react.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Toaster, { toaster, insetInline: { mdDown: "4" }, children: (toast) => /* @__PURE__ */ jsxRuntime.jsxs(react.Toast.Root, { width: { md: "sm" }, role: "alert", children: [
6484
- /* @__PURE__ */ jsxRuntime.jsx(AlertIcon, { variant: toast.type }),
6485
- /* @__PURE__ */ jsxRuntime.jsx(react.Stack, { gap: "1", flex: "1", maxWidth: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(react.Toast.Description, { children: toast.description }) })
6486
- ] }) }) });
6442
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Toaster, { toaster, insetInline: { mdDown: "4" }, children: (toast) => {
6443
+ var _a6;
6444
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Toast.Root, { width: { md: (_a6 = toast.meta) == null ? void 0 : _a6.width }, role: "alert", children: [
6445
+ /* @__PURE__ */ jsxRuntime.jsx(AlertIcon, { variant: toast.type }),
6446
+ /* @__PURE__ */ jsxRuntime.jsx(react.Stack, { gap: "1", flex: "1", maxWidth: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(react.Toast.Description, { children: toast.description }) })
6447
+ ] });
6448
+ } }) });
6487
6449
  };
6488
6450
  var SporProvider = ({
6489
6451
  language = "nb" /* NorwegianBokmal */,
@@ -6563,7 +6525,7 @@ var Stepper = function Stepper2({
6563
6525
  /* @__PURE__ */ jsxRuntime.jsx(
6564
6526
  IconButton,
6565
6527
  {
6566
- "aria-label": t(texts27.back),
6528
+ "aria-label": t(texts26.back),
6567
6529
  icon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.ArrowLeftFill24Icon, {}),
6568
6530
  variant: "ghost",
6569
6531
  size: "sm",
@@ -6587,7 +6549,7 @@ var Stepper = function Stepper2({
6587
6549
  children: heading
6588
6550
  }
6589
6551
  ),
6590
- /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: style.stepCounter, "data-part": "step-counter", children: t(texts27.stepsOf(activeStep, numberOfSteps)) })
6552
+ /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: style.stepCounter, "data-part": "step-counter", children: t(texts26.stepsOf(activeStep, numberOfSteps)) })
6591
6553
  ]
6592
6554
  }
6593
6555
  ) }),
@@ -6606,7 +6568,7 @@ var Stepper = function Stepper2({
6606
6568
  }
6607
6569
  ) });
6608
6570
  };
6609
- var texts27 = createTexts({
6571
+ var texts26 = createTexts({
6610
6572
  stepsOf: (activeStep, numberOfSteps) => ({
6611
6573
  nb: `Steg ${activeStep}/${numberOfSteps}`,
6612
6574
  nn: `Steg ${activeStep}/${numberOfSteps}`,
@@ -7195,6 +7157,7 @@ var linkRecipe = react.defineRecipe({
7195
7157
  paddingX: "0.5",
7196
7158
  whiteSpace: "normal",
7197
7159
  wordBreak: "break-word",
7160
+ paddingInline: 0,
7198
7161
  _hover: {
7199
7162
  textDecoration: "none"
7200
7163
  },