@vygruppen/spor-react 13.2.0 → 13.3.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.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  var react = require('@chakra-ui/react');
4
4
  var spor_icon_react_star = require('@vygruppen/spor-icon-react');
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
- var React13 = require('react');
6
+ var React14 = require('react');
7
7
  var sporLoader = require('@vygruppen/spor-loader');
8
8
  var lottieReact = require('lottie-react');
9
9
  var usehooksTs = require('usehooks-ts');
@@ -43,7 +43,7 @@ function _interopNamespace(e) {
43
43
  }
44
44
 
45
45
  var spor_icon_react_star__namespace = /*#__PURE__*/_interopNamespace(spor_icon_react_star);
46
- var React13__namespace = /*#__PURE__*/_interopNamespace(React13);
46
+ var React14__namespace = /*#__PURE__*/_interopNamespace(React14);
47
47
  var tokens22__namespace = /*#__PURE__*/_interopNamespace(tokens22);
48
48
  var tokens4__default = /*#__PURE__*/_interopDefault(tokens4);
49
49
 
@@ -206,7 +206,7 @@ var Language = /* @__PURE__ */ ((Language4) => {
206
206
  Language4["English"] = "en";
207
207
  return Language4;
208
208
  })(Language || {});
209
- var LanguageContext = React13.createContext(void 0);
209
+ var LanguageContext = React14.createContext(void 0);
210
210
  function LanguageProvider({
211
211
  language,
212
212
  children
@@ -214,7 +214,7 @@ function LanguageProvider({
214
214
  return /* @__PURE__ */ jsxRuntime.jsx(LanguageContext.Provider, { value: language, children });
215
215
  }
216
216
  function useLanguage() {
217
- const language = React13.useContext(LanguageContext);
217
+ const language = React14.useContext(LanguageContext);
218
218
  if (!language) {
219
219
  throw new Error("Please wrap your application in a LanguageProvider");
220
220
  }
@@ -227,8 +227,8 @@ function useTranslation() {
227
227
  };
228
228
  return { t, language };
229
229
  }
230
- function createTexts(texts27) {
231
- return texts27;
230
+ function createTexts(texts28) {
231
+ return texts28;
232
232
  }
233
233
  function Lottie({ animationData }) {
234
234
  const { View } = lottieReact.useLottie({ animationData });
@@ -358,11 +358,11 @@ var useRotatingLabel = ({
358
358
  label,
359
359
  delay
360
360
  }) => {
361
- const loadingTextArray = React13.useMemo(
361
+ const loadingTextArray = React14.useMemo(
362
362
  () => Array.isArray(label) ? label : [label],
363
363
  [label]
364
364
  );
365
- const [currentLoadingTextIndex, setCurrentLoadingTextIndex] = React13.useState(0);
365
+ const [currentLoadingTextIndex, setCurrentLoadingTextIndex] = React14.useState(0);
366
366
  usehooksTs.useInterval(() => {
367
367
  setCurrentLoadingTextIndex(
368
368
  (previousIndex) => (previousIndex + 1) % loadingTextArray.length
@@ -424,9 +424,9 @@ var progressLoaderRecipe = react.defineRecipe({
424
424
  }
425
425
  });
426
426
  var usePathLength = (value) => {
427
- const pathRef = React13.useRef(null);
428
- const [pathLength, setPathLength] = React13.useState(0);
429
- React13.useEffect(() => {
427
+ const pathRef = React14.useRef(null);
428
+ const [pathLength, setPathLength] = React14.useState(0);
429
+ React14.useEffect(() => {
430
430
  if (pathRef.current) {
431
431
  const totalLength = pathRef.current.getTotalLength();
432
432
  setPathLength(totalLength);
@@ -460,7 +460,7 @@ var ProgressLoader = ({
460
460
  pathLength: progressPathLength,
461
461
  progressOffset
462
462
  } = usePathLength(value);
463
- const id = React13.useId();
463
+ const id = React14.useId();
464
464
  return /* @__PURE__ */ jsxRuntime.jsxs(
465
465
  ProgressLoaderWrapper,
466
466
  {
@@ -614,7 +614,7 @@ var LoadingContent = ({
614
614
  ] })
615
615
  ] });
616
616
  var getChildContent = (child) => {
617
- if (React13.isValidElement(child)) {
617
+ if (React14.isValidElement(child)) {
618
618
  return child.props.children;
619
619
  }
620
620
  return child;
@@ -652,7 +652,7 @@ var Button = ({
652
652
  variant,
653
653
  size,
654
654
  ...rest,
655
- children: rest.asChild && React13.isValidElement(children) ? React13.cloneElement(children, {
655
+ children: rest.asChild && React14.isValidElement(children) ? React14.cloneElement(children, {
656
656
  children: renderContent()
657
657
  }) : renderContent()
658
658
  }
@@ -751,25 +751,41 @@ var badgeRecipie = react.defineRecipe({
751
751
  "& svg": {
752
752
  color: "icon.critical"
753
753
  }
754
+ },
755
+ brightRed: {
756
+ backgroundColor: {
757
+ _light: "brightRed",
758
+ _dark: "brightRed"
759
+ },
760
+ color: {
761
+ _light: "pink",
762
+ _dark: "pink"
763
+ },
764
+ "& svg": {
765
+ color: {
766
+ _light: "pink",
767
+ _dark: "pink"
768
+ }
769
+ }
754
770
  }
755
771
  },
756
772
  size: {
757
773
  sm: {
758
- fontSize: "desktop.xs",
774
+ fontSize: "desktop.2xs",
759
775
  paddingX: "0.5",
760
776
  paddingY: "0",
761
777
  fontWeight: "normal",
762
778
  borderRadius: "xxs"
763
779
  },
764
780
  md: {
765
- fontSize: "desktop.xs",
781
+ fontSize: "desktop.2xs",
766
782
  paddingX: "1",
767
783
  paddingY: "0.5",
768
784
  fontWeight: "bold",
769
785
  borderRadius: "xs"
770
786
  },
771
787
  lg: {
772
- fontSize: "desktop.sm",
788
+ fontSize: "desktop.xs",
773
789
  paddingX: "1.5",
774
790
  paddingY: "0.5",
775
791
  fontWeight: "bold",
@@ -986,7 +1002,7 @@ var Heading = function Heading2({
986
1002
  id: externalId,
987
1003
  ...rest
988
1004
  } = props;
989
- const reactId = React13.useId();
1005
+ const reactId = React14.useId();
990
1006
  function getId() {
991
1007
  if (externalId !== void 0)
992
1008
  return externalId;
@@ -1162,11 +1178,11 @@ var FloatingActionButton = ({
1162
1178
  );
1163
1179
  };
1164
1180
  var useScrollDirection = () => {
1165
- const [scrollDirection, setScrollDirection] = React13__namespace.default.useState(null);
1166
- const lastScrollPosition = React13__namespace.default.useRef(
1181
+ const [scrollDirection, setScrollDirection] = React14__namespace.default.useState(null);
1182
+ const lastScrollPosition = React14__namespace.default.useRef(
1167
1183
  globalThis.window === void 0 ? 0 : window.scrollY
1168
1184
  );
1169
- React13__namespace.default.useEffect(() => {
1185
+ React14__namespace.default.useEffect(() => {
1170
1186
  const onScroll = () => {
1171
1187
  const delta = window.scrollY - lastScrollPosition.current;
1172
1188
  if (delta === 0) {
@@ -1243,15 +1259,27 @@ var Alert = ({
1243
1259
  children
1244
1260
  } = props;
1245
1261
  const { open, onClose } = react.useDisclosure({ defaultOpen: true });
1262
+ const { t } = useTranslation();
1246
1263
  const handleAlertClose = () => {
1247
1264
  onClose();
1248
1265
  onAlertClose == null ? void 0 : onAlertClose();
1249
1266
  };
1250
1267
  const recipe = react.useSlotRecipe({ key: "alert" });
1251
1268
  const styles = recipe({ variant: props.variant });
1269
+ const getAriaLabelText = () => {
1270
+ const variant = props.variant;
1271
+ if (variant === "important" || variant === "alt")
1272
+ return texts5.ariaLabelAlertWarning;
1273
+ if (variant === "error" || variant === "error-secondary")
1274
+ return texts5.ariaLabelAlertError;
1275
+ if (variant === "success")
1276
+ return texts5.ariaLabelAlertSuccess;
1277
+ return texts5.ariaLabelAlertInformative;
1278
+ };
1279
+ const ariaLabel = t(getAriaLabelText());
1252
1280
  if (!open)
1253
1281
  return null;
1254
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Alert.Root, { ref, ...props, children: [
1282
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Alert.Root, { ref, role: "alert", "aria-label": ariaLabel, ...props, children: [
1255
1283
  /* @__PURE__ */ jsxRuntime.jsxs(
1256
1284
  react.Alert.Content,
1257
1285
  {
@@ -1296,6 +1324,32 @@ var Alert = ({
1296
1324
  )
1297
1325
  ] });
1298
1326
  };
1327
+ var texts5 = createTexts({
1328
+ ariaLabelAlertInformative: {
1329
+ en: "Announcement",
1330
+ nb: "Kunngj\xF8ring",
1331
+ nn: "Kunngjering",
1332
+ sv: "Meddelande"
1333
+ },
1334
+ ariaLabelAlertWarning: {
1335
+ en: "Warning",
1336
+ nb: "Advarsel",
1337
+ nn: "Varsel",
1338
+ sv: "Varning"
1339
+ },
1340
+ ariaLabelAlertError: {
1341
+ en: "Error",
1342
+ nb: "Feil",
1343
+ nn: "Feil",
1344
+ sv: "Fel"
1345
+ },
1346
+ ariaLabelAlertSuccess: {
1347
+ en: "Success",
1348
+ nb: "Suksess",
1349
+ nn: "Suksess",
1350
+ sv: "Framg\xE5ng"
1351
+ }
1352
+ });
1299
1353
  var ExpandableAlert = ({
1300
1354
  ref,
1301
1355
  ...props
@@ -1396,7 +1450,7 @@ var ServiceAlert = ({
1396
1450
  maxWidth: contentWidth,
1397
1451
  children: [
1398
1452
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { as: headingLevel, alignItems: "center", gap: "1", children: [
1399
- 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"]) }),
1453
+ 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"]) }),
1400
1454
  /* @__PURE__ */ jsxRuntime.jsx(
1401
1455
  react.Span,
1402
1456
  {
@@ -1413,7 +1467,7 @@ var ServiceAlert = ({
1413
1467
  )
1414
1468
  ] }),
1415
1469
  /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { alignItems: "center", gap: [0.5, null, null, 1], children: [
1416
- notification && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { css: styles.notificationText, children: t(texts5.notification(notification)) }),
1470
+ notification && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { css: styles.notificationText, children: t(texts6.notification(notification)) }),
1417
1471
  /* @__PURE__ */ jsxRuntime.jsx(react.Accordion.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.DropdownDownFill24Icon, { color: "icon.brand" }) })
1418
1472
  ] })
1419
1473
  ]
@@ -1424,7 +1478,7 @@ var ServiceAlert = ({
1424
1478
  }
1425
1479
  );
1426
1480
  };
1427
- var texts5 = createTexts({
1481
+ var texts6 = createTexts({
1428
1482
  notification: (notification) => {
1429
1483
  const numberNotification = Number(notification);
1430
1484
  return {
@@ -1453,12 +1507,12 @@ var Breadcrumb = ({
1453
1507
  css,
1454
1508
  ...props
1455
1509
  }) => {
1456
- const validChildren = React13__namespace.default.Children.toArray(children).filter(
1457
- (element) => React13__namespace.default.isValidElement(element)
1510
+ const validChildren = React14__namespace.default.Children.toArray(children).filter(
1511
+ (element) => React14__namespace.default.isValidElement(element)
1458
1512
  );
1459
1513
  return /* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.Root, { ref, css, ...props, children: /* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.List, { "data-part": "list", children: validChildren.map((child, index) => {
1460
1514
  const isLast = index === validChildren.length - 1;
1461
- return /* @__PURE__ */ jsxRuntime.jsxs(React13__namespace.default.Fragment, { children: [
1515
+ return /* @__PURE__ */ jsxRuntime.jsxs(React14__namespace.default.Fragment, { children: [
1462
1516
  /* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.Item, { "data-part": "item", children: child }),
1463
1517
  !isLast && /* @__PURE__ */ jsxRuntime.jsx(
1464
1518
  react.Breadcrumb.Separator,
@@ -1513,16 +1567,16 @@ var getCurrentTime = () => {
1513
1567
  var getTimestampFromTime = (time) => {
1514
1568
  return `${(time == null ? void 0 : time.hour) ?? 0}:${(time == null ? void 0 : time.minute) ?? 0}`;
1515
1569
  };
1516
- var CalendarContext = React13.createContext(null);
1570
+ var CalendarContext = React14.createContext(null);
1517
1571
  function useCalendar() {
1518
- const context = React13.useContext(CalendarContext);
1572
+ const context = React14.useContext(CalendarContext);
1519
1573
  if (!context)
1520
1574
  throw new Error("useCalendar must be used within CalendarProvider");
1521
1575
  return context;
1522
1576
  }
1523
1577
  function CalendarProvider(props) {
1524
1578
  const locale = useCurrentLocale();
1525
- const ref = React13.useRef(null);
1579
+ const ref = React14.useRef(null);
1526
1580
  const {
1527
1581
  mode = "single",
1528
1582
  onChange,
@@ -1643,7 +1697,7 @@ var RadioCard = ({
1643
1697
  ...props
1644
1698
  }) => {
1645
1699
  const { inputProps, children } = props;
1646
- const uniqueId = React13.useId();
1700
+ const uniqueId = React14.useId();
1647
1701
  const itemControlId = `radio-card-item-control-${uniqueId}`;
1648
1702
  const inputHasAriaLabel = (inputProps == null ? void 0 : inputProps["aria-labelledby"]) || (inputProps == null ? void 0 : inputProps["aria-label"]);
1649
1703
  return /* @__PURE__ */ jsxRuntime.jsxs(react.RadioCard.Item, { ...props, children: [
@@ -1710,7 +1764,7 @@ function isPhantomPointer(event) {
1710
1764
  function CalendarCell({ date: date$1, currentMonth }) {
1711
1765
  var _a6, _b5;
1712
1766
  const { mode, state } = useCalendar();
1713
- const ref = React13.useRef(null);
1767
+ const ref = React14.useRef(null);
1714
1768
  const { cellProps, buttonProps, isSelected, isDisabled, formattedDate } = reactAria.useCalendarCell({ date: date$1 }, state, ref);
1715
1769
  const isOutsideMonth = !date.isSameMonth(currentMonth, date$1);
1716
1770
  const isSelectionStart = mode === "range" && ((_a6 = state.highlightedRange) == null ? void 0 : _a6.start) ? date.isSameDay(date$1, state.highlightedRange.start) : false;
@@ -1884,7 +1938,7 @@ function CalendarHeader({ dualView }) {
1884
1938
  variant: "ghost",
1885
1939
  marginLeft: 1,
1886
1940
  disabled: prevButtonProps.isDisabled,
1887
- "aria-label": t(texts6.previousMonth),
1941
+ "aria-label": t(texts7.previousMonth),
1888
1942
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.DropdownLeftFill24Icon, {})
1889
1943
  }
1890
1944
  ),
@@ -1926,7 +1980,7 @@ function CalendarHeader({ dualView }) {
1926
1980
  marginRight: 1,
1927
1981
  variant: "ghost",
1928
1982
  disabled: nextButtonProps.isDisabled,
1929
- "aria-label": t(texts6.nextMonth),
1983
+ "aria-label": t(texts7.nextMonth),
1930
1984
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.DropdownRightFill24Icon, {})
1931
1985
  }
1932
1986
  )
@@ -1934,7 +1988,7 @@ function CalendarHeader({ dualView }) {
1934
1988
  }
1935
1989
  );
1936
1990
  }
1937
- var texts6 = createTexts({
1991
+ var texts7 = createTexts({
1938
1992
  previousMonth: {
1939
1993
  nb: "Forrige m\xE5ned",
1940
1994
  nn: "F\xF8rre m\xE5nad",
@@ -1977,8 +2031,8 @@ function Calendar({ dualView, css }) {
1977
2031
  }
1978
2032
  function ScrollCalendar(boxProps) {
1979
2033
  const { state, calendarProps, ref, startValue } = useCalendar();
1980
- const monthReferences = React13.useRef([]);
1981
- const hasScrolledRef = React13.useRef(false);
2034
+ const monthReferences = React14.useRef([]);
2035
+ const hasScrolledRef = React14.useRef(false);
1982
2036
  const startMonth = state.visibleRange.start.year * 12 + state.visibleRange.start.month;
1983
2037
  const endMonth = state.visibleRange.end.year * 12 + state.visibleRange.end.month;
1984
2038
  const monthCount = endMonth - startMonth + 1;
@@ -1987,7 +2041,7 @@ function ScrollCalendar(boxProps) {
1987
2041
  year: "numeric",
1988
2042
  timeZone: state.timeZone
1989
2043
  });
1990
- React13.useEffect(
2044
+ React14.useEffect(
1991
2045
  function scrollFocusedMonthIntoView() {
1992
2046
  const targetDate = startValue || state.focusedDate;
1993
2047
  if (hasScrolledRef.current || !targetDate)
@@ -2129,13 +2183,13 @@ var labelStyles = react.defineStyle({
2129
2183
  }
2130
2184
  });
2131
2185
  function renderLabelWithIndicator(label, labelAsChild) {
2132
- if (!labelAsChild || !React13__namespace.isValidElement(label)) {
2186
+ if (!labelAsChild || !React14__namespace.isValidElement(label)) {
2133
2187
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2134
2188
  label,
2135
2189
  /* @__PURE__ */ jsxRuntime.jsx(react.Field.RequiredIndicator, {})
2136
2190
  ] });
2137
2191
  }
2138
- return React13__namespace.cloneElement(
2192
+ return React14__namespace.cloneElement(
2139
2193
  label,
2140
2194
  {},
2141
2195
  /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -2162,11 +2216,12 @@ var Field3 = ({
2162
2216
  id,
2163
2217
  shouldFloat,
2164
2218
  labelAsChild,
2219
+ gap,
2165
2220
  ...rest
2166
2221
  } = props;
2167
2222
  const recipe = react.useSlotRecipe({ key: "field" });
2168
2223
  const styles = recipe();
2169
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { gap: "2", ref, width: "100%", ...rest, children: [
2224
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { ref, width: "100%", ...rest, children: [
2170
2225
  /* @__PURE__ */ jsxRuntime.jsxs(
2171
2226
  react.Field.Root,
2172
2227
  {
@@ -2177,6 +2232,7 @@ var Field3 = ({
2177
2232
  css: styles.root,
2178
2233
  direction,
2179
2234
  id,
2235
+ gap,
2180
2236
  children: [
2181
2237
  label && !floatingLabel && /* @__PURE__ */ jsxRuntime.jsx(Label, { asChild: labelAsChild, "aria-hidden": true, children: renderLabelWithIndicator(label, labelAsChild) }),
2182
2238
  children,
@@ -2223,7 +2279,7 @@ function CalendarCell2({
2223
2279
  currentMonth,
2224
2280
  variant
2225
2281
  }) {
2226
- const ref = React13.useRef(null);
2282
+ const ref = React14.useRef(null);
2227
2283
  const {
2228
2284
  cellProps,
2229
2285
  buttonProps,
@@ -2250,7 +2306,7 @@ function CalendarCell2({
2250
2306
  if (isOutsideMonth) {
2251
2307
  stateProps["data-unavailable"] = true;
2252
2308
  }
2253
- React13.useEffect(() => {
2309
+ React14.useEffect(() => {
2254
2310
  var _a6;
2255
2311
  (_a6 = ref.current) == null ? void 0 : _a6.addEventListener(
2256
2312
  "touchend",
@@ -2334,7 +2390,7 @@ function CalendarNavigationButton({
2334
2390
  "aria-label": ariaLabel,
2335
2391
  ...rest
2336
2392
  }) {
2337
- const ref = React13.useRef(null);
2393
+ const ref = React14.useRef(null);
2338
2394
  const { buttonProps } = reactAria.useButton(rest, ref);
2339
2395
  return /* @__PURE__ */ jsxRuntime.jsx(
2340
2396
  IconButton,
@@ -2419,7 +2475,7 @@ var CalendarNavigator = ({
2419
2475
  onPress: onPrevious,
2420
2476
  isDisabled: isPreviousDisabled,
2421
2477
  icon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.ArrowLeftOutline24Icon, {}),
2422
- "aria-label": `${t(texts7.previous)} ${t(texts7[unit])}`
2478
+ "aria-label": `${t(texts8.previous)} ${t(texts8[unit])}`
2423
2479
  }
2424
2480
  ),
2425
2481
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2440,12 +2496,12 @@ var CalendarNavigator = ({
2440
2496
  onPress: onNext,
2441
2497
  isDisabled: isNextDisabled,
2442
2498
  icon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.ArrowRightOutline24Icon, {}),
2443
- "aria-label": `${t(texts7.next)} ${t(texts7[unit])}`
2499
+ "aria-label": `${t(texts8.next)} ${t(texts8[unit])}`
2444
2500
  }
2445
2501
  )
2446
2502
  ] });
2447
2503
  };
2448
- var texts7 = createTexts({
2504
+ var texts8 = createTexts({
2449
2505
  previous: {
2450
2506
  nb: "Forrige",
2451
2507
  nn: "Forrige",
@@ -2490,7 +2546,7 @@ function Calendar2({
2490
2546
  const styles = recipe({ variant });
2491
2547
  const { calendarProps } = reactAria.useCalendar(props, state);
2492
2548
  const calendarAriaLabel = calendarProps["aria-label"];
2493
- const ariaLabel = t(texts8.calendar) + (calendarAriaLabel ? ` ${calendarAriaLabel}` : "");
2549
+ const ariaLabel = t(texts9.calendar) + (calendarAriaLabel ? ` ${calendarAriaLabel}` : "");
2494
2550
  return /* @__PURE__ */ jsxRuntime.jsxs(
2495
2551
  react.Box,
2496
2552
  {
@@ -2504,7 +2560,7 @@ function Calendar2({
2504
2560
  }
2505
2561
  );
2506
2562
  }
2507
- var texts8 = createTexts({
2563
+ var texts9 = createTexts({
2508
2564
  calendar: {
2509
2565
  nb: "Kalender",
2510
2566
  nn: "Kalender",
@@ -2530,14 +2586,14 @@ var CalendarTriggerButton = ({
2530
2586
  IconButton,
2531
2587
  {
2532
2588
  icon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.CalendarOutline24Icon, {}),
2533
- "aria-label": t(texts9.openCalendar),
2589
+ "aria-label": t(texts10.openCalendar),
2534
2590
  css: styles.calendarTriggerButton,
2535
2591
  variant: "ghost",
2536
2592
  disabled
2537
2593
  }
2538
2594
  ) });
2539
2595
  };
2540
- var texts9 = createTexts({
2596
+ var texts10 = createTexts({
2541
2597
  openCalendar: {
2542
2598
  nb: "\xC5pne kalender",
2543
2599
  nn: "\xC5pne kalendar",
@@ -2553,7 +2609,7 @@ var DateTimeSegment = ({
2553
2609
  ariaDescription,
2554
2610
  variant
2555
2611
  }) => {
2556
- const internalRef = React13.useRef(null);
2612
+ const internalRef = React14.useRef(null);
2557
2613
  const ref = externalRef ?? internalRef;
2558
2614
  const { segmentProps } = reactAria.useDateSegment(
2559
2615
  segment,
@@ -2613,7 +2669,7 @@ var DateField = ({
2613
2669
  createCalendar: createCalendar3
2614
2670
  });
2615
2671
  const { t } = useTranslation();
2616
- const internalRef = React13.useRef(null);
2672
+ const internalRef = React14.useRef(null);
2617
2673
  const ref = externalRef ?? internalRef;
2618
2674
  const { fieldProps } = reactAria.useDateField(
2619
2675
  props,
@@ -2646,7 +2702,7 @@ var DateField = ({
2646
2702
  )
2647
2703
  ] });
2648
2704
  };
2649
- var texts10 = createTexts({
2705
+ var texts11 = createTexts({
2650
2706
  day: {
2651
2707
  nb: "Velg dag",
2652
2708
  nn: "Vel dag",
@@ -2669,16 +2725,16 @@ var texts10 = createTexts({
2669
2725
  var getAriaLabel = (segmentType) => {
2670
2726
  switch (segmentType) {
2671
2727
  case "day": {
2672
- return texts10.day;
2728
+ return texts11.day;
2673
2729
  }
2674
2730
  case "month": {
2675
- return texts10.month;
2731
+ return texts11.month;
2676
2732
  }
2677
2733
  case "year": {
2678
- return texts10.year;
2734
+ return texts11.year;
2679
2735
  }
2680
2736
  default: {
2681
- return texts10.day;
2737
+ return texts11.day;
2682
2738
  }
2683
2739
  }
2684
2740
  };
@@ -2740,10 +2796,10 @@ var DatePicker = ({
2740
2796
  isRequired: props.isRequired ?? (chakraFieldProps == null ? void 0 : chakraFieldProps.required),
2741
2797
  validationState: (chakraFieldProps == null ? void 0 : chakraFieldProps.invalid) ? "invalid" : "valid"
2742
2798
  });
2743
- const internalRef = React13.useRef(null);
2799
+ const internalRef = React14.useRef(null);
2744
2800
  const ref = externalRef ?? internalRef;
2745
2801
  const { labelProps, fieldProps, buttonProps, dialogProps, calendarProps } = reactAria.useDatePicker(props, state, ref);
2746
- const inputGroupId = `input-group-${React13.useId()}`;
2802
+ const inputGroupId = `input-group-${React14.useId()}`;
2747
2803
  const recipe = react.useSlotRecipe({
2748
2804
  key: "datePicker"
2749
2805
  });
@@ -2836,7 +2892,7 @@ function RangeCalendar(props) {
2836
2892
  key: "datePicker"
2837
2893
  });
2838
2894
  const styles = recipe({});
2839
- const ref = React13.useRef(null);
2895
+ const ref = React14.useRef(null);
2840
2896
  const { calendarProps, title } = reactAria.useRangeCalendar(props, state, ref);
2841
2897
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { ...calendarProps, ref, css: styles.rangeCalendarPopover, children: [
2842
2898
  /* @__PURE__ */ jsxRuntime.jsx(CalendarHeader2, { state, title }),
@@ -2875,7 +2931,7 @@ function DateRangePicker({
2875
2931
  isRequired: props.required ?? (fieldContextPRops == null ? void 0 : fieldContextPRops.required),
2876
2932
  validationState: (fieldContextPRops == null ? void 0 : fieldContextPRops.invalid) ? "invalid" : "valid"
2877
2933
  });
2878
- const ref = React13.useRef(null);
2934
+ const ref = React14.useRef(null);
2879
2935
  const uniqueId = reactAria.useId();
2880
2936
  const datePickerId = `date-range-picker-${uniqueId}`;
2881
2937
  const {
@@ -2964,7 +3020,7 @@ function DateRangePicker({
2964
3020
  ] }) });
2965
3021
  }
2966
3022
  var TimeField = ({ state, ...props }) => {
2967
- const ref = React13.useRef(null);
3023
+ const ref = React14.useRef(null);
2968
3024
  const { labelProps, fieldProps } = reactAria.useTimeField(props, state, ref);
2969
3025
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
2970
3026
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3013,7 +3069,7 @@ var TimePicker = ({
3013
3069
  const isDisabled = isDisabledExternally ?? fieldDisabled ?? false;
3014
3070
  const { t } = useTranslation();
3015
3071
  const locale = useCurrentLocale();
3016
- const label = externalLabel ?? t(texts11.time);
3072
+ const label = externalLabel ?? t(texts12.time);
3017
3073
  const state = reactStately.useTimeFieldState({
3018
3074
  value,
3019
3075
  defaultValue,
@@ -3046,15 +3102,15 @@ var TimePicker = ({
3046
3102
  })
3047
3103
  );
3048
3104
  };
3049
- const backwardsLabel = `${t(texts11.backwards)} ${minuteInterval} ${t(
3050
- texts11.minutes
3105
+ const backwardsLabel = `${t(texts12.backwards)} ${minuteInterval} ${t(
3106
+ texts12.minutes
3051
3107
  )}`;
3052
- const forwardsLabel = `${t(texts11.forwards)} ${minuteInterval} ${t(
3053
- texts11.minutes
3108
+ const forwardsLabel = `${t(texts12.forwards)} ${minuteInterval} ${t(
3109
+ texts12.minutes
3054
3110
  )}`;
3055
- const inputLabel = label ?? t(texts11.time);
3111
+ const inputLabel = label ?? t(texts12.time);
3056
3112
  const ariaLabel = `${inputLabel} \u2013 ${t(
3057
- texts11.selectedTimeIs(`${(dateTime == null ? void 0 : dateTime.hour) ?? 0} ${(dateTime == null ? void 0 : dateTime.minute) ?? 0}`)
3113
+ texts12.selectedTimeIs(`${(dateTime == null ? void 0 : dateTime.hour) ?? 0} ${(dateTime == null ? void 0 : dateTime.minute) ?? 0}`)
3058
3114
  )}`;
3059
3115
  return /* @__PURE__ */ jsxRuntime.jsx(Field3, { as: "time", ...boxProps, children: /* @__PURE__ */ jsxRuntime.jsxs(
3060
3116
  StyledField,
@@ -3107,7 +3163,7 @@ var TimePicker = ({
3107
3163
  }
3108
3164
  ) });
3109
3165
  };
3110
- var texts11 = createTexts({
3166
+ var texts12 = createTexts({
3111
3167
  selectedTimeIs: (time) => ({
3112
3168
  nb: `Valgt tidspunkt er ${time}`,
3113
3169
  nn: `Valt tidspunkt er ${time}`,
@@ -3248,7 +3304,7 @@ var DrawerCloseTrigger = function DrawerCloseTrigger2({
3248
3304
  {
3249
3305
  variant: "ghost",
3250
3306
  icon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.CloseFill24Icon, {}),
3251
- label: t(texts12.close)
3307
+ label: t(texts13.close)
3252
3308
  }
3253
3309
  ) : /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { size: "md" }) });
3254
3310
  };
@@ -3262,7 +3318,7 @@ var DrawerBackTrigger = ({
3262
3318
  {
3263
3319
  variant: "ghost",
3264
3320
  icon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.ArrowLeftFill24Icon, {}),
3265
- label: t(texts12.back)
3321
+ label: t(texts13.back)
3266
3322
  }
3267
3323
  ) });
3268
3324
  };
@@ -3294,7 +3350,7 @@ var DrawerBackdrop = react.Drawer.Backdrop;
3294
3350
  var DrawerTitle = react.Drawer.Title;
3295
3351
  var DrawerActionTrigger = react.Drawer.ActionTrigger;
3296
3352
  var DrawerHeader = react.Drawer.Header;
3297
- var texts12 = createTexts({
3353
+ var texts13 = createTexts({
3298
3354
  back: {
3299
3355
  en: "Back",
3300
3356
  nb: "Tilbake",
@@ -3308,6 +3364,124 @@ var texts12 = createTexts({
3308
3364
  sv: "St\xE4ng"
3309
3365
  }
3310
3366
  });
3367
+ var ExternalIcon = ({
3368
+ label,
3369
+ size
3370
+ }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3371
+ size === "lg" || size === "md" ? /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.LinkOutOutline24Icon, { "aria-hidden": true, display: "inline" }) : /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.LinkOutOutline18Icon, { "aria-hidden": true, display: "inline" }),
3372
+ /* @__PURE__ */ jsxRuntime.jsx(react.VisuallyHidden, { children: label })
3373
+ ] });
3374
+ var TextLink = ({
3375
+ ref,
3376
+ children,
3377
+ external,
3378
+ href,
3379
+ ...props
3380
+ }) => {
3381
+ const { t } = useTranslation();
3382
+ const isExternal = external ?? Boolean((href == null ? void 0 : href.startsWith("http://")) || (href == null ? void 0 : href.startsWith("https://")));
3383
+ const externalLabel = t ? t(texts14.externalLink) : texts14.externalLink.en;
3384
+ if (props.asChild && React14.isValidElement(children)) {
3385
+ return /* @__PURE__ */ jsxRuntime.jsx(
3386
+ react.Link,
3387
+ {
3388
+ href,
3389
+ ...props,
3390
+ ref,
3391
+ ...isExternal && {
3392
+ target: "_blank",
3393
+ rel: "noopener noreferrer"
3394
+ },
3395
+ children: React14.cloneElement(children, {
3396
+ ...children.props,
3397
+ children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3398
+ children.props.children,
3399
+ isExternal && /* @__PURE__ */ jsxRuntime.jsx(ExternalIcon, { label: externalLabel, size: props.size })
3400
+ ] })
3401
+ })
3402
+ }
3403
+ );
3404
+ }
3405
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3406
+ react.Link,
3407
+ {
3408
+ href,
3409
+ ...props,
3410
+ ref,
3411
+ ...isExternal && {
3412
+ target: "_blank",
3413
+ rel: "noopener noreferrer"
3414
+ },
3415
+ children: [
3416
+ children,
3417
+ isExternal && /* @__PURE__ */ jsxRuntime.jsx(ExternalIcon, { label: externalLabel, size: props.size })
3418
+ ]
3419
+ }
3420
+ );
3421
+ };
3422
+ var texts14 = createTexts({
3423
+ externalLink: {
3424
+ nb: "Ekstern lenke",
3425
+ nn: "Ekstern lenke",
3426
+ sv: "Extern l\xE4nk",
3427
+ en: "External link"
3428
+ }
3429
+ });
3430
+ var List = react.List.Root;
3431
+ var ListItem = react.List.Item;
3432
+ var ListIndicator = react.List.Indicator;
3433
+ var ErrorSummary = ({
3434
+ ref: externalRef,
3435
+ children,
3436
+ headingLevel = "h2",
3437
+ heading,
3438
+ ...rest
3439
+ }) => {
3440
+ const recipe = react.useSlotRecipe({ key: "errorSummary" });
3441
+ const styles = recipe();
3442
+ const wrapperRef = React14.useRef(null);
3443
+ const headingRef = React14.useRef(null);
3444
+ const ref = externalRef ?? wrapperRef;
3445
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3446
+ react.Box,
3447
+ {
3448
+ css: styles.container,
3449
+ ref,
3450
+ ...rest,
3451
+ "aria-labelledby": slugify(heading),
3452
+ tabIndex: -1,
3453
+ children: [
3454
+ heading && /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { css: styles.heading, children: [
3455
+ /* @__PURE__ */ jsxRuntime.jsx(
3456
+ spor_icon_react_star.ErrorFill24Icon,
3457
+ {
3458
+ css: {
3459
+ flexShrink: 0,
3460
+ "& path:first-of-type": {
3461
+ fill: `icon.critical`
3462
+ },
3463
+ "& path:not(:first-of-type)": {
3464
+ fill: `surface.critical`
3465
+ }
3466
+ }
3467
+ }
3468
+ ),
3469
+ /* @__PURE__ */ jsxRuntime.jsx(Heading, { as: headingLevel, variant: "md", autoId: true, ref: headingRef, children: heading })
3470
+ ] }),
3471
+ /* @__PURE__ */ jsxRuntime.jsx(List, { css: styles.list, gap: 2, children })
3472
+ ]
3473
+ }
3474
+ );
3475
+ };
3476
+ var ErrorSummaryItem = ({
3477
+ children,
3478
+ href,
3479
+ ...rest
3480
+ }) => {
3481
+ const recipe = react.useSlotRecipe({ key: "errorSummary" });
3482
+ const styles = recipe();
3483
+ return /* @__PURE__ */ jsxRuntime.jsx(ListItem, { css: styles.item, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(TextLink, { href, children }) });
3484
+ };
3311
3485
  var AttachedInputs = ({
3312
3486
  ref,
3313
3487
  ...props
@@ -3382,14 +3556,14 @@ function useFloatingInputState({
3382
3556
  onChange,
3383
3557
  inputRef
3384
3558
  }) {
3385
- const [focused, setFocused] = React13.useState(false);
3559
+ const [focused, setFocused] = React14.useState(false);
3386
3560
  const isControlled = value !== void 0;
3387
- const [uncontrolledValue, setUncontrolledValue] = React13.useState(
3561
+ const [uncontrolledValue, setUncontrolledValue] = React14.useState(
3388
3562
  defaultValue ? String(defaultValue) : ""
3389
3563
  );
3390
3564
  const inputValue = isControlled ? String(value ?? "") : uncontrolledValue;
3391
3565
  const shouldFloat = inputValue.length > 0 || focused;
3392
- const syncFromRef = React13__namespace.default.useCallback(() => {
3566
+ const syncFromRef = React14__namespace.default.useCallback(() => {
3393
3567
  if (!isControlled && (inputRef == null ? void 0 : inputRef.current)) {
3394
3568
  const v = inputRef.current.value;
3395
3569
  if (v !== uncontrolledValue) {
@@ -3397,7 +3571,7 @@ function useFloatingInputState({
3397
3571
  }
3398
3572
  }
3399
3573
  }, [isControlled, inputRef, uncontrolledValue]);
3400
- React13.useEffect(() => {
3574
+ React14.useEffect(() => {
3401
3575
  if (!isControlled && (inputRef == null ? void 0 : inputRef.current)) {
3402
3576
  const input = inputRef.current;
3403
3577
  syncFromRef();
@@ -3458,9 +3632,9 @@ var Input = ({
3458
3632
  const recipe = react.useRecipe({ key: "input" });
3459
3633
  const [recipeProps, restProps] = recipe.splitVariantProps(props);
3460
3634
  const styles = recipe(recipeProps);
3461
- const labelId = React13.useId();
3462
- const inputRef = React13.useRef(null);
3463
- React13.useImperativeHandle(ref, () => inputRef.current, []);
3635
+ const labelId = React14.useId();
3636
+ const inputRef = React14.useRef(null);
3637
+ React14.useImperativeHandle(ref, () => inputRef.current, []);
3464
3638
  const { shouldFloat, handleFocus, handleBlur, handleChange, isControlled } = useFloatingInputState({
3465
3639
  value: props.value,
3466
3640
  defaultValue: props.defaultValue,
@@ -3553,7 +3727,7 @@ function Autocomplete({
3553
3727
  }) {
3554
3728
  const { contains } = react.useFilter({ sensitivity: "base" });
3555
3729
  const { t } = useTranslation();
3556
- const extractedItems = React13__namespace.default.useMemo(
3730
+ const extractedItems = React14__namespace.default.useMemo(
3557
3731
  () => extractItemsFromChildren(children),
3558
3732
  [children]
3559
3733
  );
@@ -3561,11 +3735,11 @@ function Autocomplete({
3561
3735
  initialItems: extractedItems,
3562
3736
  filter: filteredExternally ? void 0 : contains
3563
3737
  });
3564
- React13__namespace.default.useEffect(() => {
3738
+ React14__namespace.default.useEffect(() => {
3565
3739
  if (filteredExternally)
3566
3740
  reset();
3567
3741
  }, [extractedItems, reset, filteredExternally]);
3568
- const filteredChildren = React13__namespace.default.useMemo(
3742
+ const filteredChildren = React14__namespace.default.useMemo(
3569
3743
  () => filterChildren(children, collection.items),
3570
3744
  [children, collection.items]
3571
3745
  );
@@ -3610,10 +3784,10 @@ function Autocomplete({
3610
3784
  }
3611
3785
  }
3612
3786
  ) }),
3613
- /* @__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 }) }) })
3787
+ /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.IndicatorGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.ClearTrigger, { asChild: true, "aria-label": t(texts15.clearValue), children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { size: "xs", tabIndex: 0 }) }) })
3614
3788
  ] }),
3615
3789
  /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Combobox.Content, { children: [
3616
- !loading && /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Empty, { children: emptyLabel ?? t(texts13.noItemsFound) }),
3790
+ !loading && /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Empty, { children: emptyLabel ?? t(texts15.noItemsFound) }),
3617
3791
  loading ? /* @__PURE__ */ jsxRuntime.jsx(ColorSpinner, { width: "1.5rem", p: "2" }) : filteredChildren
3618
3792
  ] }) })
3619
3793
  ] });
@@ -3629,9 +3803,9 @@ var AutocompleteItem = ({ children, ...props }) => {
3629
3803
  };
3630
3804
  var filterChildren = (children, collectionItems) => {
3631
3805
  const collectionValues = new Set(collectionItems.map((item) => item.value));
3632
- return React13__namespace.default.Children.toArray(children).map((child) => {
3806
+ return React14__namespace.default.Children.toArray(children).map((child) => {
3633
3807
  var _a6;
3634
- if (!React13__namespace.default.isValidElement(child))
3808
+ if (!React14__namespace.default.isValidElement(child))
3635
3809
  return null;
3636
3810
  if (child.type === AutocompleteItemGroup) {
3637
3811
  const groupProps = child.props;
@@ -3640,11 +3814,11 @@ var filterChildren = (children, collectionItems) => {
3640
3814
  collectionItems
3641
3815
  );
3642
3816
  const hasItems = filteredGroupChildren.some(
3643
- (groupChild) => React13__namespace.default.isValidElement(groupChild) && groupChild.type !== AutocompleteItemGroupLabel
3817
+ (groupChild) => React14__namespace.default.isValidElement(groupChild) && groupChild.type !== AutocompleteItemGroupLabel
3644
3818
  );
3645
3819
  if (!hasItems)
3646
3820
  return null;
3647
- return React13__namespace.default.cloneElement(child, groupProps, ...filteredGroupChildren);
3821
+ return React14__namespace.default.cloneElement(child, groupProps, ...filteredGroupChildren);
3648
3822
  }
3649
3823
  const itemProps = (_a6 = child.props) == null ? void 0 : _a6.item;
3650
3824
  if (itemProps) {
@@ -3655,8 +3829,8 @@ var filterChildren = (children, collectionItems) => {
3655
3829
  };
3656
3830
  var extractItemsFromChildren = (children) => {
3657
3831
  const items = [];
3658
- React13__namespace.default.Children.forEach(children, (child) => {
3659
- if (!React13__namespace.default.isValidElement(child))
3832
+ React14__namespace.default.Children.forEach(children, (child) => {
3833
+ if (!React14__namespace.default.isValidElement(child))
3660
3834
  return;
3661
3835
  if (child.type === AutocompleteItemGroup) {
3662
3836
  items.push(
@@ -3672,7 +3846,7 @@ var extractItemsFromChildren = (children) => {
3672
3846
  });
3673
3847
  return items;
3674
3848
  };
3675
- var texts13 = createTexts({
3849
+ var texts15 = createTexts({
3676
3850
  noItemsFound: {
3677
3851
  nb: "Ingen resultater",
3678
3852
  nn: "Ingen resultat",
@@ -3757,18 +3931,18 @@ var CheckboxGroup = (props) => {
3757
3931
  const { direction = "row", children, gap = 1, ...rest } = props;
3758
3932
  return /* @__PURE__ */ jsxRuntime.jsx(react.CheckboxGroup, { ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(react.Stack, { direction, gap, children }) });
3759
3933
  };
3760
- var ChoiceChipContext = React13.createContext({
3934
+ var ChoiceChipContext = React14.createContext({
3761
3935
  variant: "core",
3762
3936
  size: "sm"
3763
3937
  });
3764
- var useChoiceChipContext = () => React13.useContext(ChoiceChipContext);
3938
+ var useChoiceChipContext = () => React14.useContext(ChoiceChipContext);
3765
3939
  var ChoiceChip = ({
3766
3940
  ref,
3767
3941
  ...props
3768
3942
  }) => {
3769
3943
  const { children, inputProps, icon, variant, size, css, ...rest } = props;
3770
3944
  const { variant: contextVariant, size: contextSize } = useChoiceChipContext();
3771
- const uniqueId = React13.useId();
3945
+ const uniqueId = React14.useId();
3772
3946
  const itemControlId = `radio-card-item-control-${uniqueId}`;
3773
3947
  const inputHasAriaLabel = (inputProps == null ? void 0 : inputProps["aria-labelledby"]) || (inputProps == null ? void 0 : inputProps["aria-label"]);
3774
3948
  const finalVariant = variant ?? contextVariant;
@@ -3833,9 +4007,9 @@ var Popover = ({
3833
4007
  hasBackdrop = true,
3834
4008
  containerPadding = 12
3835
4009
  }) => {
3836
- const internalRef = React13.useRef(null);
4010
+ const internalRef = React14.useRef(null);
3837
4011
  const popoverRef = ref ?? internalRef;
3838
- React13.useLayoutEffect(() => {
4012
+ React14.useLayoutEffect(() => {
3839
4013
  var _a6;
3840
4014
  const element = typeof popoverRef === "object" ? popoverRef == null ? void 0 : popoverRef.current : null;
3841
4015
  if (element) {
@@ -3908,11 +4082,11 @@ var Combobox2 = (props) => {
3908
4082
  ...restProps
3909
4083
  } = props;
3910
4084
  const { contains } = reactAria.useFilter({ sensitivity: "base" });
3911
- const fallbackInputRef = React13.useRef(null);
4085
+ const fallbackInputRef = React14.useRef(null);
3912
4086
  const inputRef = externalInputRef ?? fallbackInputRef;
3913
- const listBoxRef = React13.useRef(null);
3914
- const popoverRef = React13.useRef(null);
3915
- const listboxId = React13.useId();
4087
+ const listBoxRef = React14.useRef(null);
4088
+ const popoverRef = React14.useRef(null);
4089
+ const listboxId = React14.useId();
3916
4090
  const inputWidth = useInputWidth(
3917
4091
  inputRef
3918
4092
  );
@@ -4044,8 +4218,8 @@ var Combobox2 = (props) => {
4044
4218
  ] });
4045
4219
  };
4046
4220
  var useInputWidth = (inputRef) => {
4047
- const [inputWidth, setInputWidth] = React13.useState("auto");
4048
- React13.useEffect(() => {
4221
+ const [inputWidth, setInputWidth] = React14.useState("auto");
4222
+ React14.useEffect(() => {
4049
4223
  const onResize = debounce(() => {
4050
4224
  if (inputRef.current) {
4051
4225
  setInputWidth(`${inputRef.current.offsetWidth}px`);
@@ -4157,7 +4331,7 @@ function ItemDescription({ children }) {
4157
4331
  );
4158
4332
  }
4159
4333
  function Option({ item, state }) {
4160
- const ref = React13.useRef(null);
4334
+ const ref = React14.useRef(null);
4161
4335
  const {
4162
4336
  optionProps,
4163
4337
  isSelected,
@@ -4182,7 +4356,7 @@ function Option({ item, state }) {
4182
4356
  if (isFocusVisible) {
4183
4357
  dataFields["data-focus-visible"] = true;
4184
4358
  }
4185
- React13.useEffect(() => {
4359
+ React14.useEffect(() => {
4186
4360
  var _a6;
4187
4361
  (_a6 = ref.current) == null ? void 0 : _a6.addEventListener(
4188
4362
  "touchend",
@@ -4205,12 +4379,12 @@ function Option({ item, state }) {
4205
4379
  }
4206
4380
  ) });
4207
4381
  }
4208
- var OptionContext = React13__namespace.default.createContext({
4382
+ var OptionContext = React14__namespace.default.createContext({
4209
4383
  labelProps: {},
4210
4384
  descriptionProps: {}
4211
4385
  });
4212
4386
  var useOptionContext = () => {
4213
- return React13.useContext(OptionContext);
4387
+ return React14.useContext(OptionContext);
4214
4388
  };
4215
4389
  function ListBoxSection({ section, state }) {
4216
4390
  var _a6, _b5;
@@ -4240,10 +4414,10 @@ function ListBoxSection({ section, state }) {
4240
4414
  ) })
4241
4415
  ] }) });
4242
4416
  }
4243
- var CustomMenuContext = React13.createContext({
4417
+ var CustomMenuContext = React14.createContext({
4244
4418
  variant: "core"
4245
4419
  });
4246
- var useMenuContext = () => React13.useContext(CustomMenuContext);
4420
+ var useMenuContext = () => React14.useContext(CustomMenuContext);
4247
4421
  var Menu = ({ children, ...props }) => {
4248
4422
  return /* @__PURE__ */ jsxRuntime.jsx(CustomMenuContext.Provider, { value: { variant: props.variant }, children: /* @__PURE__ */ jsxRuntime.jsx(react.Menu.Root, { ...props, children }) });
4249
4423
  };
@@ -4452,9 +4626,10 @@ var NumericStepper = ({
4452
4626
  label,
4453
4627
  helperText,
4454
4628
  errorText,
4629
+ gap,
4455
4630
  ...rest
4456
4631
  } = props;
4457
- const addButtonRef = React13.useRef(null);
4632
+ const addButtonRef = React14.useRef(null);
4458
4633
  const { t } = useTranslation();
4459
4634
  const recipe = react.useSlotRecipe({ key: "numericStepper" });
4460
4635
  const styles = recipe();
@@ -4480,13 +4655,14 @@ var NumericStepper = ({
4480
4655
  invalid,
4481
4656
  readOnly,
4482
4657
  required,
4658
+ gap,
4483
4659
  children: [
4484
4660
  /* @__PURE__ */ jsxRuntime.jsx(
4485
4661
  VerySmallButton,
4486
4662
  {
4487
4663
  icon: /* @__PURE__ */ jsxRuntime.jsx(SubtractIcon, { stepLabel: clampedStepSize }),
4488
4664
  "aria-label": t(
4489
- texts14.decrementButtonAriaLabel(
4665
+ texts16.decrementButtonAriaLabel(
4490
4666
  clampedStepSize,
4491
4667
  stepSize === 1 ? ariaLabelContext.singular : ariaLabelContext.plural
4492
4668
  )
@@ -4513,7 +4689,7 @@ var NumericStepper = ({
4513
4689
  css: styles.input,
4514
4690
  width: `${Math.max(value.toString().length + 1, 3)}ch`,
4515
4691
  "aria-live": "assertive",
4516
- "aria-label": ariaLabelContext.plural === "" ? "" : t(texts14.currentNumberAriaLabel(ariaLabelContext.plural)),
4692
+ "aria-label": ariaLabelContext.plural === "" ? "" : t(texts16.currentNumberAriaLabel(ariaLabelContext.plural)),
4517
4693
  onChange: (event) => {
4518
4694
  const numericInput = Number(event.target.value);
4519
4695
  if (Number.isNaN(numericInput)) {
@@ -4530,8 +4706,11 @@ var NumericStepper = ({
4530
4706
  Text3,
4531
4707
  {
4532
4708
  "aria-live": "assertive",
4533
- paddingX: "0.95rem",
4534
- "aria-label": ariaLabelContext.plural === "" ? "" : t(texts14.currentNumberAriaLabel(ariaLabelContext.plural)),
4709
+ width: `${Math.max(value.toString().length + 1, 3)}ch`,
4710
+ paddingX: 0.5,
4711
+ padding: 0,
4712
+ textAlign: "center",
4713
+ "aria-label": ariaLabelContext.plural === "" ? "" : t(texts16.currentNumberAriaLabel(ariaLabelContext.plural)),
4535
4714
  children: value
4536
4715
  }
4537
4716
  ),
@@ -4541,7 +4720,7 @@ var NumericStepper = ({
4541
4720
  ref: addButtonRef,
4542
4721
  icon: /* @__PURE__ */ jsxRuntime.jsx(AddIcon, { stepLabel: clampedStepSize }),
4543
4722
  "aria-label": t(
4544
- texts14.incrementButtonAriaLabel(
4723
+ texts16.incrementButtonAriaLabel(
4545
4724
  clampedStepSize,
4546
4725
  stepSize === 1 ? ariaLabelContext.singular : ariaLabelContext.plural
4547
4726
  )
@@ -4615,7 +4794,7 @@ var AddIcon = ({ stepLabel }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Frag
4615
4794
  ] }),
4616
4795
  stepLabel > 1 && /* @__PURE__ */ jsxRuntime.jsx(react.chakra.span, { paddingRight: "1", children: stepLabel.toString() })
4617
4796
  ] });
4618
- var texts14 = createTexts({
4797
+ var texts16 = createTexts({
4619
4798
  currentNumberAriaLabel(ariaContext) {
4620
4799
  return {
4621
4800
  nb: `Valgt antall ${ariaContext}`,
@@ -4679,7 +4858,7 @@ var PasswordInput = ({
4679
4858
  event.preventDefault();
4680
4859
  setVisible(!visible);
4681
4860
  },
4682
- children: visible ? t(texts15.hidePassword) : t(texts15.showPassword)
4861
+ children: visible ? t(texts17.hidePassword) : t(texts17.showPassword)
4683
4862
  }
4684
4863
  ),
4685
4864
  ...rest
@@ -4704,7 +4883,7 @@ var VisibilityTrigger = ({
4704
4883
  }
4705
4884
  );
4706
4885
  };
4707
- var texts15 = createTexts({
4886
+ var texts17 = createTexts({
4708
4887
  showPassword: {
4709
4888
  nb: "Vis",
4710
4889
  nn: "Vis",
@@ -4737,7 +4916,7 @@ var CountryCodeSelect = ({
4737
4916
  ...props
4738
4917
  }) => {
4739
4918
  const { t } = useTranslation();
4740
- const filteredCallingCodes = React13.useMemo(() => {
4919
+ const filteredCallingCodes = React14.useMemo(() => {
4741
4920
  if (!props.allowedCountryCodes)
4742
4921
  return allCallingCodes;
4743
4922
  const filteredItems = allCallingCodes.items.filter(
@@ -4756,14 +4935,14 @@ var CountryCodeSelect = ({
4756
4935
  positioning: { placement: "bottom", flip: false },
4757
4936
  collection: filteredCallingCodes,
4758
4937
  lazyMount: true,
4759
- "aria-label": t(texts16.countryCode),
4938
+ "aria-label": t(texts18.countryCode),
4760
4939
  sideRadiusVariant: "rightSideSquare",
4761
4940
  role: "combobox",
4762
4941
  children: filteredCallingCodes.items.map((code) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { item: code, children: code.label }, code.label))
4763
4942
  }
4764
4943
  );
4765
4944
  };
4766
- var texts16 = createTexts({
4945
+ var texts18 = createTexts({
4767
4946
  countryCode: {
4768
4947
  nb: "Landkode",
4769
4948
  nn: "Landskode",
@@ -4786,7 +4965,7 @@ var PhoneNumberInput = ({
4786
4965
  errorText
4787
4966
  } = props;
4788
4967
  const { t } = useTranslation();
4789
- const label = externalLabel ?? (optional ? t(texts17.phoneNumberOptional) : t(texts17.phoneNumber));
4968
+ const label = externalLabel ?? (optional ? t(texts19.phoneNumberOptional) : t(texts19.phoneNumber));
4790
4969
  const [value, onChange] = react.useControllableState({
4791
4970
  value: externalValue,
4792
4971
  onChange: externalOnChange,
@@ -4841,7 +5020,7 @@ var PhoneNumberInput = ({
4841
5020
  )
4842
5021
  ] });
4843
5022
  };
4844
- var texts17 = createTexts({
5023
+ var texts19 = createTexts({
4845
5024
  phoneNumber: {
4846
5025
  nb: "Telefonnummer",
4847
5026
  nn: "Telefonnummer",
@@ -4893,16 +5072,16 @@ var SearchInput = ({
4893
5072
  variant: "ghost",
4894
5073
  type: "button",
4895
5074
  size: "sm",
4896
- "aria-label": t(texts18.reset),
5075
+ "aria-label": t(texts20.reset),
4897
5076
  icon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.CloseOutline24Icon, {}),
4898
5077
  onClick: onReset
4899
5078
  }
4900
5079
  ),
4901
- label: label ?? t(texts18.label)
5080
+ label: label ?? t(texts20.label)
4902
5081
  }
4903
5082
  );
4904
5083
  };
4905
- var texts18 = createTexts({
5084
+ var texts20 = createTexts({
4906
5085
  label: {
4907
5086
  nb: "S\xF8k",
4908
5087
  nn: "S\xF8k",
@@ -5139,9 +5318,9 @@ var Switch = ({
5139
5318
  );
5140
5319
  };
5141
5320
  var useLabelHeight = (label) => {
5142
- const labelRef = React13.useRef(null);
5143
- const [labelHeight, setLabelHeight] = React13.useState(0);
5144
- React13.useLayoutEffect(() => {
5321
+ const labelRef = React14.useRef(null);
5322
+ const [labelHeight, setLabelHeight] = React14.useState(0);
5323
+ React14.useLayoutEffect(() => {
5145
5324
  const updateLabelHeight = () => {
5146
5325
  if (labelRef.current) {
5147
5326
  setLabelHeight(labelRef.current.offsetHeight);
@@ -5179,8 +5358,8 @@ var Textarea = ({
5179
5358
  const recipe = react.useRecipe({ key: "textarea" });
5180
5359
  const styles = recipe({ variant });
5181
5360
  const { labelRef, labelHeight } = useLabelHeight(label);
5182
- const inputRef = React13.useRef(null);
5183
- React13.useImperativeHandle(ref, () => inputRef.current, []);
5361
+ const inputRef = React14.useRef(null);
5362
+ React14.useImperativeHandle(ref, () => inputRef.current, []);
5184
5363
  const { shouldFloat, handleFocus, handleBlur, handleChange, isControlled } = useFloatingInputState({
5185
5364
  value: props.value,
5186
5365
  defaultValue: props.defaultValue,
@@ -5189,7 +5368,7 @@ var Textarea = ({
5189
5368
  onChange: props.onChange,
5190
5369
  inputRef
5191
5370
  });
5192
- const labelId = React13.useId();
5371
+ const labelId = React14.useId();
5193
5372
  return /* @__PURE__ */ jsxRuntime.jsx(
5194
5373
  Field3,
5195
5374
  {
@@ -5438,72 +5617,6 @@ var TravelTag = function TravelTag2({
5438
5617
  }
5439
5618
  );
5440
5619
  };
5441
- var ExternalIcon = ({
5442
- label,
5443
- size
5444
- }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5445
- size === "lg" || size === "md" ? /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.LinkOutOutline24Icon, { "aria-hidden": true, display: "inline" }) : /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.LinkOutOutline18Icon, { "aria-hidden": true, display: "inline" }),
5446
- /* @__PURE__ */ jsxRuntime.jsx(react.VisuallyHidden, { children: label })
5447
- ] });
5448
- var TextLink = ({
5449
- ref,
5450
- children,
5451
- external,
5452
- href,
5453
- ...props
5454
- }) => {
5455
- const { t } = useTranslation();
5456
- const isExternal = external ?? Boolean((href == null ? void 0 : href.startsWith("http://")) || (href == null ? void 0 : href.startsWith("https://")));
5457
- const externalLabel = t ? t(texts19.externalLink) : texts19.externalLink.en;
5458
- if (props.asChild && React13.isValidElement(children)) {
5459
- return /* @__PURE__ */ jsxRuntime.jsx(
5460
- react.Link,
5461
- {
5462
- href,
5463
- ...props,
5464
- ref,
5465
- ...isExternal && {
5466
- target: "_blank",
5467
- rel: "noopener noreferrer"
5468
- },
5469
- children: React13.cloneElement(children, {
5470
- ...children.props,
5471
- children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5472
- children.props.children,
5473
- isExternal && /* @__PURE__ */ jsxRuntime.jsx(ExternalIcon, { label: externalLabel, size: props.size })
5474
- ] })
5475
- })
5476
- }
5477
- );
5478
- }
5479
- return /* @__PURE__ */ jsxRuntime.jsxs(
5480
- react.Link,
5481
- {
5482
- href,
5483
- ...props,
5484
- ref,
5485
- ...isExternal && {
5486
- target: "_blank",
5487
- rel: "noopener noreferrer"
5488
- },
5489
- children: [
5490
- children,
5491
- isExternal && /* @__PURE__ */ jsxRuntime.jsx(ExternalIcon, { label: externalLabel, size: props.size })
5492
- ]
5493
- }
5494
- );
5495
- };
5496
- var texts19 = createTexts({
5497
- externalLink: {
5498
- nb: "Ekstern lenke",
5499
- nn: "Ekstern lenke",
5500
- sv: "Extern l\xE4nk",
5501
- en: "External link"
5502
- }
5503
- });
5504
- var List = react.List.Root;
5505
- var ListItem2 = react.List.Item;
5506
- var ListIndicator = react.List.Indicator;
5507
5620
  var CargonetLogo = ({
5508
5621
  ref,
5509
5622
  ...props
@@ -5662,7 +5775,7 @@ var VyLogo = ({
5662
5775
  variant = "default",
5663
5776
  ...props
5664
5777
  }) => {
5665
- const id = React13.useId();
5778
+ const id = React14.useId();
5666
5779
  const fillForAccent = variant === "mono" ? "main" : "accent";
5667
5780
  return /* @__PURE__ */ jsxRuntime.jsxs(SvgBox, { ref, viewBox: "0 0 107 54", ...props, children: [
5668
5781
  /* @__PURE__ */ jsxRuntime.jsx("title", { children: "Vy logo" }),
@@ -5815,7 +5928,7 @@ var VyLogoPride = ({
5815
5928
  const redColor = "#EA3323";
5816
5929
  const orangeColor = "#F09436";
5817
5930
  const yellowColor = "#FFFF54";
5818
- const id = React13.useId();
5931
+ const id = React14.useId();
5819
5932
  return (
5820
5933
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5821
5934
  /* @__PURE__ */ jsxRuntime.jsxs(SvgBox, { ref, viewBox: "0 0 107 54", ...props, children: [
@@ -6030,14 +6143,14 @@ var JumpButton = ({
6030
6143
  as: "button",
6031
6144
  ref,
6032
6145
  css: styles.root,
6033
- "aria-label": direction === "forward" ? t(texts20.forward) : t(texts20.backward),
6146
+ "aria-label": direction === "forward" ? t(texts21.forward) : t(texts21.backward),
6034
6147
  disabled,
6035
6148
  ...props,
6036
6149
  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 })
6037
6150
  }
6038
6151
  );
6039
6152
  };
6040
- var texts20 = createTexts({
6153
+ var texts21 = createTexts({
6041
6154
  forward: {
6042
6155
  nb: "15 sekunder frem",
6043
6156
  nn: "15 sekunder fram",
@@ -6065,14 +6178,14 @@ var PlayPauseButton = ({
6065
6178
  ref,
6066
6179
  as: "button",
6067
6180
  css: styles.root,
6068
- "aria-label": playing ? t(texts21.pause) : t(texts21.play),
6181
+ "aria-label": playing ? t(texts22.pause) : t(texts22.play),
6069
6182
  disabled,
6070
6183
  ...props,
6071
6184
  children: playing ? /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.PauseMediaControllerFill24Icon, { css: styles.icon }) : /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.PlayMediaControllerFill24Icon, { css: styles.icon })
6072
6185
  }
6073
6186
  );
6074
6187
  };
6075
- var texts21 = createTexts({
6188
+ var texts22 = createTexts({
6076
6189
  pause: {
6077
6190
  nb: "Pause",
6078
6191
  nn: "Pause",
@@ -6100,14 +6213,14 @@ var SkipButton = ({
6100
6213
  ref,
6101
6214
  as: "button",
6102
6215
  css: styles.root,
6103
- "aria-label": direction === "forward" ? t(texts22.next) : t(texts22.previous),
6216
+ "aria-label": direction === "forward" ? t(texts23.next) : t(texts23.previous),
6104
6217
  disabled,
6105
6218
  ...props,
6106
6219
  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 })
6107
6220
  }
6108
6221
  );
6109
6222
  };
6110
- var texts22 = createTexts({
6223
+ var texts23 = createTexts({
6111
6224
  next: {
6112
6225
  nb: "Neste",
6113
6226
  nn: "Neste",
@@ -6163,17 +6276,17 @@ var NudgeContent = ({
6163
6276
  children,
6164
6277
  ...props
6165
6278
  }) => {
6166
- const [currentStep, setCurrentStep] = React13.useState(1);
6167
- const childrenArray = React13__namespace.default.Children.toArray(children);
6279
+ const [currentStep, setCurrentStep] = React14.useState(1);
6280
+ const childrenArray = React14__namespace.default.Children.toArray(children);
6168
6281
  const { open } = react.usePopoverContext();
6169
- React13.useEffect(() => {
6282
+ React14.useEffect(() => {
6170
6283
  setCurrentStep(1);
6171
6284
  }, [children, open]);
6172
6285
  const wizardPages = childrenArray.filter(
6173
- (child) => React13__namespace.default.isValidElement(child) && child.type === NudgeWizardStep
6286
+ (child) => React14__namespace.default.isValidElement(child) && child.type === NudgeWizardStep
6174
6287
  );
6175
6288
  const restChildren = childrenArray.filter(
6176
- (child) => !React13__namespace.default.isValidElement(child) || child.type !== NudgeWizardStep
6289
+ (child) => !React14__namespace.default.isValidElement(child) || child.type !== NudgeWizardStep
6177
6290
  );
6178
6291
  const totalSteps = wizardPages.length;
6179
6292
  const isLastStep = totalSteps === currentStep;
@@ -6222,7 +6335,7 @@ var NudgeActions = ({ ...props }) => {
6222
6335
  var NextButton = ({ isLastStep, onNext }) => {
6223
6336
  const { t } = useTranslation();
6224
6337
  if (isLastStep)
6225
- return /* @__PURE__ */ jsxRuntime.jsx(react.PopoverCloseTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "tertiary", size: "xs", children: t(texts23.close) }) });
6338
+ return /* @__PURE__ */ jsxRuntime.jsx(react.PopoverCloseTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "tertiary", size: "xs", children: t(texts24.close) }) });
6226
6339
  return /* @__PURE__ */ jsxRuntime.jsx(
6227
6340
  Button,
6228
6341
  {
@@ -6230,11 +6343,11 @@ var NextButton = ({ isLastStep, onNext }) => {
6230
6343
  size: "xs",
6231
6344
  rightIcon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.ArrowRightFill18Icon, {}),
6232
6345
  onClick: onNext,
6233
- children: t(texts23.nextStep)
6346
+ children: t(texts24.nextStep)
6234
6347
  }
6235
6348
  );
6236
6349
  };
6237
- var texts23 = createTexts({
6350
+ var texts24 = createTexts({
6238
6351
  nextStep: {
6239
6352
  nb: "Neste",
6240
6353
  nn: "Neste",
@@ -6291,7 +6404,7 @@ var PaginationEllipsis = ({
6291
6404
  ref,
6292
6405
  ...props
6293
6406
  }) => {
6294
- return /* @__PURE__ */ jsxRuntime.jsx(ListItem2, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Pagination.Ellipsis, { ref, ...props, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { cursor: "default", children: "..." }) }) });
6407
+ return /* @__PURE__ */ jsxRuntime.jsx(ListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Pagination.Ellipsis, { ref, ...props, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { cursor: "default", children: "..." }) }) });
6295
6408
  };
6296
6409
  var PaginationItem = ({
6297
6410
  ref,
@@ -6301,7 +6414,7 @@ var PaginationItem = ({
6301
6414
  const { t } = useTranslation();
6302
6415
  const { page, totalPages } = react.usePaginationContext();
6303
6416
  if (rootProps.getHref) {
6304
- return /* @__PURE__ */ jsxRuntime.jsx(ListItem2, { children: /* @__PURE__ */ jsxRuntime.jsx(
6417
+ return /* @__PURE__ */ jsxRuntime.jsx(ListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
6305
6418
  react.Pagination.Item,
6306
6419
  {
6307
6420
  as: props.as ?? "a",
@@ -6310,18 +6423,18 @@ var PaginationItem = ({
6310
6423
  to: rootProps.getHref(props.value)
6311
6424
  },
6312
6425
  ref,
6313
- "aria-label": t(texts24.pageOf(props.value, totalPages)),
6426
+ "aria-label": t(texts25.pageOf(props.value, totalPages)),
6314
6427
  ...props,
6315
6428
  children: props.value
6316
6429
  }
6317
6430
  ) });
6318
6431
  }
6319
- return /* @__PURE__ */ jsxRuntime.jsx(ListItem2, { children: /* @__PURE__ */ jsxRuntime.jsx(
6432
+ return /* @__PURE__ */ jsxRuntime.jsx(ListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
6320
6433
  react.Pagination.Item,
6321
6434
  {
6322
6435
  as: props.as ?? "button",
6323
6436
  ref,
6324
- "aria-label": t(texts24.pageOf(props.value, totalPages)),
6437
+ "aria-label": t(texts25.pageOf(props.value, totalPages)),
6325
6438
  "aria-current": page === props.value,
6326
6439
  ...props,
6327
6440
  children: props.value
@@ -6340,7 +6453,7 @@ var PaginationPrevTrigger = ({
6340
6453
  if (page <= 1)
6341
6454
  return null;
6342
6455
  if (rootProps.getHref) {
6343
- return /* @__PURE__ */ jsxRuntime.jsx(ListItem2, { children: /* @__PURE__ */ jsxRuntime.jsx(
6456
+ return /* @__PURE__ */ jsxRuntime.jsx(ListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
6344
6457
  react.Pagination.PrevTrigger,
6345
6458
  {
6346
6459
  as: props.as ?? "a",
@@ -6351,18 +6464,18 @@ var PaginationPrevTrigger = ({
6351
6464
  },
6352
6465
  ref,
6353
6466
  css: styles.item,
6354
- "aria-label": t(texts24.previousPage),
6467
+ "aria-label": t(texts25.previousPage),
6355
6468
  ...props,
6356
6469
  children: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.DropdownLeftOutline18Icon, {})
6357
6470
  }
6358
6471
  ) });
6359
6472
  }
6360
- return /* @__PURE__ */ jsxRuntime.jsx(ListItem2, { children: /* @__PURE__ */ jsxRuntime.jsx(
6473
+ return /* @__PURE__ */ jsxRuntime.jsx(ListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
6361
6474
  react.Pagination.PrevTrigger,
6362
6475
  {
6363
6476
  ref,
6364
6477
  asChild: true,
6365
- "aria-label": t(texts24.previousPage),
6478
+ "aria-label": t(texts25.previousPage),
6366
6479
  as: props.as || "button",
6367
6480
  css: styles.item,
6368
6481
  ...props,
@@ -6382,7 +6495,7 @@ var PaginationNextTrigger = ({
6382
6495
  if (page >= totalPages)
6383
6496
  return null;
6384
6497
  if (rootProps.getHref) {
6385
- return /* @__PURE__ */ jsxRuntime.jsx(ListItem2, { children: /* @__PURE__ */ jsxRuntime.jsx(
6498
+ return /* @__PURE__ */ jsxRuntime.jsx(ListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
6386
6499
  react.Pagination.NextTrigger,
6387
6500
  {
6388
6501
  ref,
@@ -6391,18 +6504,18 @@ var PaginationNextTrigger = ({
6391
6504
  to: rootProps.getHref(props.value)
6392
6505
  },
6393
6506
  css: styles.item,
6394
- "aria-label": t(texts24.nextPage),
6507
+ "aria-label": t(texts25.nextPage),
6395
6508
  ...props,
6396
6509
  children: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.DropdownRightOutline18Icon, {})
6397
6510
  }
6398
6511
  ) });
6399
6512
  }
6400
- return /* @__PURE__ */ jsxRuntime.jsx(ListItem2, { children: /* @__PURE__ */ jsxRuntime.jsx(
6513
+ return /* @__PURE__ */ jsxRuntime.jsx(ListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
6401
6514
  react.Pagination.NextTrigger,
6402
6515
  {
6403
6516
  ref,
6404
6517
  css: styles.item,
6405
- "aria-label": t(texts24.nextPage),
6518
+ "aria-label": t(texts25.nextPage),
6406
6519
  as: props.as || "button",
6407
6520
  ...props,
6408
6521
  children: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.DropdownRightOutline18Icon, {})
@@ -6429,7 +6542,7 @@ var PaginationItems = (props) => {
6429
6542
  );
6430
6543
  }) });
6431
6544
  };
6432
- var texts24 = createTexts({
6545
+ var texts25 = createTexts({
6433
6546
  previousPage: {
6434
6547
  nb: "Forrige side",
6435
6548
  nn: "F\xF8rre side",
@@ -6476,9 +6589,9 @@ var PopoverContent = ({
6476
6589
  ...props
6477
6590
  }) => {
6478
6591
  const { colorMode } = useColorMode();
6479
- const closeButtonRef = React13__namespace.default.useRef(null);
6592
+ const closeButtonRef = React14__namespace.default.useRef(null);
6480
6593
  const { open } = react.usePopoverContext();
6481
- React13.useEffect(() => {
6594
+ React14.useEffect(() => {
6482
6595
  if (showCloseButton && open && closeButtonRef.current) {
6483
6596
  closeButtonRef.current.focus();
6484
6597
  }
@@ -6529,7 +6642,7 @@ var ProgressIndicator = ({
6529
6642
  "aria-valuemin": 1,
6530
6643
  "aria-valuemax": numberOfSteps,
6531
6644
  "aria-valuenow": activeStep,
6532
- "aria-valuetext": t(texts25.stepsOf(activeStep, numberOfSteps)),
6645
+ "aria-valuetext": t(texts26.stepsOf(activeStep, numberOfSteps)),
6533
6646
  ref,
6534
6647
  children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: { ...styles.container, ...css }, children: Array.from({ length: numberOfSteps }, (_, index) => /* @__PURE__ */ jsxRuntime.jsx(
6535
6648
  react.Box,
@@ -6548,7 +6661,7 @@ var ProgressIndicator = ({
6548
6661
  }
6549
6662
  );
6550
6663
  };
6551
- var texts25 = createTexts({
6664
+ var texts26 = createTexts({
6552
6665
  stepsOf: (activeStep, numberOfSteps) => ({
6553
6666
  nb: `Steg ${activeStep} av ${numberOfSteps}`,
6554
6667
  nn: `Steg ${activeStep} av ${numberOfSteps}`,
@@ -6678,7 +6791,7 @@ var SporProvider = ({
6678
6791
  children
6679
6792
  ] }) }) });
6680
6793
  };
6681
- var StepperContext = React13__namespace.default.createContext(null);
6794
+ var StepperContext = React14__namespace.default.createContext(null);
6682
6795
  var StepperProvider = ({
6683
6796
  activeStep,
6684
6797
  children,
@@ -6695,7 +6808,7 @@ var StepperProvider = ({
6695
6808
  );
6696
6809
  };
6697
6810
  var useStepper = () => {
6698
- const context = React13__namespace.default.useContext(StepperContext);
6811
+ const context = React14__namespace.default.useContext(StepperContext);
6699
6812
  if (!context) {
6700
6813
  throw new Error(
6701
6814
  "useStepper must be used within a StepperProvider. Most likely, you forgot to wrap your StepperStep in a Stepper component"
@@ -6744,7 +6857,7 @@ var Stepper = function Stepper2({
6744
6857
  /* @__PURE__ */ jsxRuntime.jsx(
6745
6858
  IconButton,
6746
6859
  {
6747
- "aria-label": t(texts26.back),
6860
+ "aria-label": t(texts27.back),
6748
6861
  icon: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.ArrowLeftFill24Icon, {}),
6749
6862
  variant: "ghost",
6750
6863
  size: "sm",
@@ -6768,7 +6881,7 @@ var Stepper = function Stepper2({
6768
6881
  children: heading
6769
6882
  }
6770
6883
  ),
6771
- /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: style.stepCounter, "data-part": "step-counter", children: t(texts26.stepsOf(activeStep, numberOfSteps)) })
6884
+ /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: style.stepCounter, "data-part": "step-counter", children: t(texts27.stepsOf(activeStep, numberOfSteps)) })
6772
6885
  ]
6773
6886
  }
6774
6887
  ) }),
@@ -6787,7 +6900,7 @@ var Stepper = function Stepper2({
6787
6900
  }
6788
6901
  ) });
6789
6902
  };
6790
- var texts26 = createTexts({
6903
+ var texts27 = createTexts({
6791
6904
  stepsOf: (activeStep, numberOfSteps) => ({
6792
6905
  nb: `Steg ${activeStep}/${numberOfSteps}`,
6793
6906
  nn: `Steg ${activeStep}/${numberOfSteps}`,
@@ -6910,13 +7023,13 @@ var captureRowOrder = (tbody) => (
6910
7023
  // eslint-disable-next-line unicorn/prefer-spread -- HTMLCollectionOf is not spreadable
6911
7024
  Array.from(tbody.rows)
6912
7025
  );
6913
- var SortContext = React13.createContext({
7026
+ var SortContext = React14.createContext({
6914
7027
  enabled: false,
6915
7028
  sortState: { direction: "asc", columnIndex: null },
6916
7029
  onSort: () => {
6917
7030
  }
6918
7031
  });
6919
- var useTableSort = () => React13.useContext(SortContext);
7032
+ var useTableSort = () => React14.useContext(SortContext);
6920
7033
  var Table = ({
6921
7034
  variant = "ghost",
6922
7035
  size,
@@ -6926,7 +7039,7 @@ var Table = ({
6926
7039
  ref,
6927
7040
  ...rest
6928
7041
  }) => {
6929
- const [sortState, setSortState] = React13.useState({
7042
+ const [sortState, setSortState] = React14.useState({
6930
7043
  direction: "asc",
6931
7044
  columnIndex: null
6932
7045
  });
@@ -6962,7 +7075,7 @@ var TableColumnHeader = ({
6962
7075
  ...rest
6963
7076
  }) => {
6964
7077
  const { enabled, sortState, onSort } = useTableSort();
6965
- const [columnIndex, setColumnIndex] = React13.useState(null);
7078
+ const [columnIndex, setColumnIndex] = React14.useState(null);
6966
7079
  const props = rest;
6967
7080
  const columnSortable = enabled && !("data-nosort" in props);
6968
7081
  const isActive = columnSortable && columnIndex != null && columnIndex === sortState.columnIndex;
@@ -7002,10 +7115,10 @@ var TableColumnHeader = ({
7002
7115
  };
7003
7116
  var TableBody = ({ children, ref, ...rest }) => {
7004
7117
  const { sortState } = useTableSort();
7005
- const tbodyRef = React13.useRef(null);
7006
- const originalOrder = React13.useRef([]);
7007
- const previousChildren = React13.useRef(children);
7008
- React13.useLayoutEffect(() => {
7118
+ const tbodyRef = React14.useRef(null);
7119
+ const originalOrder = React14.useRef([]);
7120
+ const previousChildren = React14.useRef(children);
7121
+ React14.useLayoutEffect(() => {
7009
7122
  const tbody = tbodyRef.current;
7010
7123
  if (!tbody)
7011
7124
  return;
@@ -7485,12 +7598,12 @@ var pressableCardRecipe = react.defineRecipe({
7485
7598
  accent: {
7486
7599
  boxShadow: "0px 1px 3px 0px var(--shadow-color)",
7487
7600
  shadowColor: "surface.disabled",
7488
- background: "surface.success",
7601
+ background: "surface.accent",
7489
7602
  _hover: {
7490
- background: "surface.success.hover",
7603
+ background: "surface.accent.hover",
7491
7604
  boxShadow: "0px 2px 6px 0px var(--shadow-color)",
7492
7605
  _active: {
7493
- background: "surface.success.active",
7606
+ background: "surface.accent.active",
7494
7607
  boxShadow: "none"
7495
7608
  }
7496
7609
  }
@@ -8023,6 +8136,12 @@ var menuAnatomy = anatomy.createAnatomy("menu").parts(
8023
8136
  "triggerItem",
8024
8137
  "checkboxItem"
8025
8138
  );
8139
+ var errorSummaryAnatomy = anatomy.createAnatomy("error-summary").parts(
8140
+ "container",
8141
+ "heading",
8142
+ "list",
8143
+ "item"
8144
+ );
8026
8145
 
8027
8146
  // src/theme/slot-recipes/accordion.ts
8028
8147
  var accordionSlotRecipe = react.defineSlotRecipe({
@@ -9559,6 +9678,34 @@ var drawerSlotRecipe = react.defineSlotRecipe({
9559
9678
  }
9560
9679
  }
9561
9680
  });
9681
+ var errorSummarySlotRecipe = react.defineSlotRecipe({
9682
+ slots: errorSummaryAnatomy.keys(),
9683
+ className: "spor-error-summary",
9684
+ base: {
9685
+ container: {
9686
+ display: "flex",
9687
+ flexDirection: "column",
9688
+ padding: [3, 5],
9689
+ backgroundColor: "surface.critical",
9690
+ borderRadius: "md"
9691
+ },
9692
+ heading: {
9693
+ fontSize: "md",
9694
+ fontWeight: "bold",
9695
+ color: "text.critical",
9696
+ gap: [1, 1.5],
9697
+ alignItems: "center"
9698
+ },
9699
+ list: {
9700
+ alignItems: "flex-start",
9701
+ paddingLeft: [4, 5]
9702
+ },
9703
+ item: {
9704
+ color: "text.critical.subtle",
9705
+ marginTop: [2, 1.5]
9706
+ }
9707
+ }
9708
+ });
9562
9709
  var fieldSlotRecipe = react.defineSlotRecipe({
9563
9710
  className: "spor-field",
9564
9711
  slots: fieldAnatomy.keys(),
@@ -10805,17 +10952,18 @@ var numericStepperRecipe = react.defineSlotRecipe({
10805
10952
  "& > div": {
10806
10953
  display: "flex",
10807
10954
  flexDirection: "row",
10808
- alignItems: "center"
10955
+ alignItems: "center",
10956
+ gap: 1
10809
10957
  }
10810
10958
  },
10811
10959
  input: {
10812
10960
  fontSize: "sm",
10813
10961
  fontWeight: "bold",
10814
- marginX: 0.5,
10815
10962
  padding: 0,
10816
10963
  paddingX: 0.5,
10817
10964
  borderRadius: "xs",
10818
- outline: "none",
10965
+ outline: "1px solid",
10966
+ outlineColor: "outline.core",
10819
10967
  height: "auto",
10820
10968
  textAlign: "center",
10821
10969
  transitionProperty: "common",
@@ -12107,7 +12255,8 @@ var slotRecipes = {
12107
12255
  tooltip: popoverSlotRecipe,
12108
12256
  tag: inputChipSlotRecipe,
12109
12257
  menu: menuSlotRecipe,
12110
- choiceChip: choiceChipSlotRecipe
12258
+ choiceChip: choiceChipSlotRecipe,
12259
+ errorSummary: errorSummarySlotRecipe
12111
12260
  };
12112
12261
  var animations = react.defineTokens.animations({
12113
12262
  spin: {
@@ -13273,6 +13422,8 @@ exports.DrawerFullScreenHeader = DrawerFullScreenHeader;
13273
13422
  exports.DrawerHeader = DrawerHeader;
13274
13423
  exports.DrawerTitle = DrawerTitle;
13275
13424
  exports.DrawerTrigger = DrawerTrigger;
13425
+ exports.ErrorSummary = ErrorSummary;
13426
+ exports.ErrorSummaryItem = ErrorSummaryItem;
13276
13427
  exports.Expandable = Expandable;
13277
13428
  exports.ExpandableAlert = ExpandableAlert;
13278
13429
  exports.ExpandableItem = ExpandableItem;
@@ -13303,7 +13454,7 @@ exports.LineIcon = LineIcon;
13303
13454
  exports.List = List;
13304
13455
  exports.ListBox = ListBox;
13305
13456
  exports.ListIndicator = ListIndicator;
13306
- exports.ListItem = ListItem2;
13457
+ exports.ListItem = ListItem;
13307
13458
  exports.Menu = Menu;
13308
13459
  exports.MenuCheckboxItem = MenuCheckboxItem;
13309
13460
  exports.MenuContent = MenuContent;