@vygruppen/spor-react 12.4.3 → 12.4.5

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.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { useSlotRecipe, Accordion as Accordion$1, Stack, Box, HStack, Progress, defineRecipe, chakra, Text, useRecipe, Circle, Skeleton as Skeleton$1, Button as Button$1, Group as Group$1, Badge as Badge$1, Code as Code$1, Clipboard as Clipboard$1, IconButton as IconButton$1, useDisclosure, Alert as Alert$1, Span, Flex, Breadcrumb as Breadcrumb$1, ClientOnly as ClientOnly$1, Field, defineStyle, defineSlotRecipe, PopoverAnchor, useFieldContext, Popover as Popover$1, Portal, Dialog, createContext as createContext$1, Drawer as Drawer$1, Grid, GridItem, usePopoverContext, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCard, Fieldset as Fieldset$1, Input as Input$1, InputElement, NativeSelect as NativeSelect$1, useControllableState, createListCollection, RadioGroup as RadioGroup$1, Select as Select$1, useSelectContext, Switch as Switch$1, Textarea as Textarea$1, RadioCard as RadioCard$1, Separator as Separator$1, Link, List as List$1, Center, Pagination as Pagination$1, usePaginationContext, createToaster, Tabs as Tabs$1, Table as Table$1, defineSemanticTokens, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, VisuallyHidden, defineConfig, ListItem, ChakraProvider, Toaster as Toaster$1, Toast, Icon } from '@chakra-ui/react';
1
+ import { useSlotRecipe, Accordion as Accordion$1, Stack, Box, HStack, Progress, defineRecipe, chakra, Text, useRecipe, Circle, Skeleton as Skeleton$1, Button as Button$1, Group as Group$1, Badge as Badge$1, Code as Code$1, Clipboard as Clipboard$1, IconButton as IconButton$1, useDisclosure, Alert as Alert$1, Span, Flex, Breadcrumb as Breadcrumb$1, ClientOnly as ClientOnly$1, Field, defineStyle, defineSlotRecipe, PopoverAnchor, useFieldContext, Popover as Popover$1, Portal, Dialog, createContext as createContext$1, Drawer as Drawer$1, Grid, GridItem, usePopoverContext, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCard, Fieldset as Fieldset$1, Input as Input$1, InputElement, NativeSelect as NativeSelect$1, useControllableState, createListCollection, RadioGroup as RadioGroup$1, Select as Select$1, useSelectContext, Switch as Switch$1, Textarea as Textarea$1, RadioCard as RadioCard$1, Separator as Separator$1, Link, List as List$1, Center, PopoverCloseTrigger, Pagination as Pagination$1, usePaginationContext, createToaster, Tabs as Tabs$1, Table as Table$1, defineSemanticTokens, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, VisuallyHidden, defineConfig, ListItem, ChakraProvider, Toaster as Toaster$1, Toast, Icon } from '@chakra-ui/react';
2
2
  export { Box, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, Collapsible, Container, Em, Flex, For, FormatByte, FormatNumber, Grid, GridItem, HStack, Image, Kbd, LocaleProvider, Portal, Show, SimpleGrid, Spacer, Span, Stack, TableBody, TableCaption, TableCell, TableColumn, TableColumnHeader, TableFooter, TableHeader, TableRoot, TableRow, VStack, VisuallyHidden, createListCollection, createSystem, defineConfig, defineRecipe, defineStyle, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useToken } from '@chakra-ui/react';
3
3
  import { DropdownDownFill24Icon, CopyOutline18Icon, CheckmarkFill18Icon, CloseFill18Icon, CloseFill30Icon, CloseFill24Icon, ServiceFill24Icon, QuestionFill24Icon, ErrorOutline24Icon, ErrorFill24Icon, AltTransportFill24Icon, WarningFill24Icon, SuccessFill24Icon, InformationFill24Icon, DropdownDownFill18Icon, DropdownRightFill18Icon, CalendarOutline24Icon, ArrowLeftFill24Icon, CloseOutline24Icon, SearchOutline24Icon, InformationFill18Icon, WarningFill18Icon, ErrorFill18Icon, Forward15MediaControllerFill30Icon, Backward15MediaControllerFill30Icon, PauseMediaControllerFill24Icon, PlayMediaControllerFill24Icon, NextMediaControllerFill30Icon, PreviousMediaControllerFill30Icon, ArrowRightFill18Icon, DropdownLeftOutline18Icon, DropdownRightOutline18Icon, WalkFill30Icon, WalkFill24Icon, WalkFill18Icon, AltTransportFill30Icon, AltTransportFill18Icon, TramFill30Icon, TramFill24Icon, TramFill18Icon, SubwayFill30Icon, SubwayFill24Icon, SubwayFill18Icon, FerryFill30Icon, FerryFill24Icon, FerryFill18Icon, BusFill30Icon, BusFill24Icon, BusFill18Icon, ExpressBusFill30Icon, ExpressBusFill24Icon, ExpressBusFill18Icon, TrainFill30Icon, TrainFill24Icon, TrainFill18Icon, LinkOutOutline24Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, DropdownLeftFill18Icon, SuccessFill18Icon } from '@vygruppen/spor-icon-react';
4
4
  import * as React28 from 'react';
@@ -18,17 +18,11 @@ import { popoverAnatomy as popoverAnatomy$1 } from '@ark-ui/react/popover';
18
18
  import { GregorianCalendar, createCalendar, getLocalTimeZone, endOfMonth, getWeeksInMonth, isSameMonth, isToday, parseTime } from '@internationalized/date';
19
19
  export { Time } from '@internationalized/date';
20
20
  import { getSupportedCallingCodes } from 'awesome-phonenumber';
21
- import tokens20__default from '@vygruppen/spor-design-tokens';
22
- import * as tokens20 from '@vygruppen/spor-design-tokens';
23
- export { tokens20 as tokens };
24
- import { usePopoverContext as usePopoverContext$1, PopoverCloseTrigger } from '@ark-ui/react';
21
+ import tokens23__default from '@vygruppen/spor-design-tokens';
22
+ import * as tokens23 from '@vygruppen/spor-design-tokens';
23
+ export { tokens23 as tokens };
25
24
  import { Global } from '@emotion/react';
26
- import cargonetJson from '@vygruppen/spor-design-tokens/tokens/color/cargonet.json' assert { type: 'json' };
27
- import vyDigitalJson from '@vygruppen/spor-design-tokens/tokens/color/vy-digital.json' assert { type: 'json' };
28
- import VyUtviklingJson from '@vygruppen/spor-design-tokens/tokens/color/vy-utvikling.json' assert { type: 'json' };
29
- import aliasJson from '@vygruppen/spor-design-tokens/tokens/color/alias.json' assert { type: 'json' };
30
- import linjetagJson from '@vygruppen/spor-design-tokens/tokens/color/linjetag.json' assert { type: 'json' };
31
- import paletteJson from '@vygruppen/spor-design-tokens/tokens/color/palette.json' assert { type: 'json' };
25
+ import tokens4 from '@vygruppen/spor-design-tokens/raw-tokens';
32
26
 
33
27
  // src/accordion/Accordion.tsx
34
28
 
@@ -36,8 +30,9 @@ import paletteJson from '@vygruppen/spor-design-tokens/tokens/color/palette.json
36
30
  var warnAboutMismatchingIcon = ({
37
31
  icon
38
32
  }) => {
33
+ var _a5, _b4;
39
34
  if (process.env.NODE_ENV !== "production") {
40
- const displayName = icon?.type?.render?.displayName;
35
+ const displayName = (_b4 = (_a5 = icon == null ? void 0 : icon.type) == null ? void 0 : _a5.render) == null ? void 0 : _b4.displayName;
41
36
  if (!displayName) {
42
37
  return;
43
38
  }
@@ -803,6 +798,7 @@ var badgeRecipie = defineRecipe({
803
798
  });
804
799
 
805
800
  // src/theme/recipes/code.ts
801
+ var _a;
806
802
  var codeRecipie = defineRecipe({
807
803
  base: {
808
804
  fontFamily: "monospace",
@@ -811,7 +807,7 @@ var codeRecipie = defineRecipe({
811
807
  paddingX: 1
812
808
  },
813
809
  variants: {
814
- colorPalette: badgeRecipie.variants?.colorPalette ?? {}
810
+ colorPalette: ((_a = badgeRecipie.variants) == null ? void 0 : _a.colorPalette) ?? {}
815
811
  }
816
812
  });
817
813
  var StyledCode = chakra(Code$1, codeRecipie);
@@ -1128,7 +1124,7 @@ var Alert = forwardRef((props, ref) => {
1128
1124
  const { open, onClose } = useDisclosure({ defaultOpen: true });
1129
1125
  const handleAlertClose = () => {
1130
1126
  onClose();
1131
- onAlertClose?.();
1127
+ onAlertClose == null ? void 0 : onAlertClose();
1132
1128
  };
1133
1129
  const recipe = useSlotRecipe({ key: "alert" });
1134
1130
  const styles = recipe({ variant: props.variant });
@@ -1964,7 +1960,8 @@ function CalendarCell({
1964
1960
  stateProps["data-unavailable"] = true;
1965
1961
  }
1966
1962
  useEffect(() => {
1967
- ref.current?.addEventListener(
1963
+ var _a5;
1964
+ (_a5 = ref.current) == null ? void 0 : _a5.addEventListener(
1968
1965
  "touchend",
1969
1966
  (event) => {
1970
1967
  event.preventDefault();
@@ -2010,7 +2007,7 @@ var getCurrentTime = () => {
2010
2007
  return parseTime(now.toTimeString().split(" ")[0]);
2011
2008
  };
2012
2009
  var getTimestampFromTime = (time) => {
2013
- return `${time?.hour ?? 0}:${time?.minute ?? 0}`;
2010
+ return `${(time == null ? void 0 : time.hour) ?? 0}:${(time == null ? void 0 : time.minute) ?? 0}`;
2014
2011
  };
2015
2012
  var weekDays = {
2016
2013
  nb: ["Ma", "Ti", "On", "To", "Fr", "L\xF8", "S\xF8"],
@@ -2314,6 +2311,7 @@ function createCalendar2(identifier) {
2314
2311
  }
2315
2312
  var DateField = forwardRef(
2316
2313
  ({ labelId, ...props }, externalRef) => {
2314
+ var _a5;
2317
2315
  const locale = useCurrentLocale();
2318
2316
  const recipe = useSlotRecipe({
2319
2317
  key: "datePicker",
@@ -2359,7 +2357,7 @@ var DateField = forwardRef(
2359
2357
  "input",
2360
2358
  {
2361
2359
  type: "hidden",
2362
- value: state.value?.toString() ?? "",
2360
+ value: ((_a5 = state.value) == null ? void 0 : _a5.toString()) ?? "",
2363
2361
  name: props.name
2364
2362
  }
2365
2363
  )
@@ -2445,8 +2443,8 @@ var DatePicker = forwardRef(
2445
2443
  ...props,
2446
2444
  shouldCloseOnSelect: true,
2447
2445
  errorMessage: errorText,
2448
- isRequired: props.isRequired ?? chakraFieldProps?.required,
2449
- validationState: chakraFieldProps?.invalid ? "invalid" : "valid"
2446
+ isRequired: props.isRequired ?? (chakraFieldProps == null ? void 0 : chakraFieldProps.required),
2447
+ validationState: (chakraFieldProps == null ? void 0 : chakraFieldProps.invalid) ? "invalid" : "valid"
2450
2448
  });
2451
2449
  const internalRef = useRef(null);
2452
2450
  const ref = externalRef ?? internalRef;
@@ -2582,8 +2580,8 @@ function DateRangePicker({
2582
2580
  shouldCloseOnSelect: true,
2583
2581
  isInvalid: invalid,
2584
2582
  errorMessage: errorText,
2585
- isRequired: props.required ?? fieldContextPRops?.required,
2586
- validationState: fieldContextPRops?.invalid ? "invalid" : "valid"
2583
+ isRequired: props.required ?? (fieldContextPRops == null ? void 0 : fieldContextPRops.required),
2584
+ validationState: (fieldContextPRops == null ? void 0 : fieldContextPRops.invalid) ? "invalid" : "valid"
2587
2585
  });
2588
2586
  const ref = useRef(null);
2589
2587
  const uniqueId = useId$1();
@@ -2759,7 +2757,7 @@ var TimePicker = ({
2759
2757
  )}`;
2760
2758
  const inputLabel = label ?? t(texts11.time);
2761
2759
  const ariaLabel = `${inputLabel} \u2013 ${t(
2762
- texts11.selectedTimeIs(`${dateTime?.hour ?? 0} ${dateTime?.minute ?? 0}`)
2760
+ texts11.selectedTimeIs(`${(dateTime == null ? void 0 : dateTime.hour) ?? 0} ${(dateTime == null ? void 0 : dateTime.minute) ?? 0}`)
2763
2761
  )}`;
2764
2762
  return /* @__PURE__ */ jsx(Field3, { as: "time", ...boxProps, children: /* @__PURE__ */ jsxs(
2765
2763
  StyledField,
@@ -3107,6 +3105,7 @@ var Popover = forwardRef(
3107
3105
  hasBackdrop = true,
3108
3106
  containerPadding = 12
3109
3107
  }, ref) => {
3108
+ var _a5;
3110
3109
  const internalRef = useRef(null);
3111
3110
  const popoverRef = ref ?? internalRef;
3112
3111
  const { popoverProps, underlayProps } = usePopover(
@@ -3127,7 +3126,7 @@ var Popover = forwardRef(
3127
3126
  {
3128
3127
  ...popoverProps,
3129
3128
  ref: popoverRef,
3130
- minWidth: triggerRef.current?.clientWidth ?? "auto",
3129
+ minWidth: ((_a5 = triggerRef.current) == null ? void 0 : _a5.clientWidth) ?? "auto",
3131
3130
  children: [
3132
3131
  /* @__PURE__ */ jsx(DismissButton, { onDismiss: state.close }),
3133
3132
  children,
@@ -3509,7 +3508,8 @@ function Option({ item, state }) {
3509
3508
  dataFields["data-focus-visible"] = true;
3510
3509
  }
3511
3510
  useEffect(() => {
3512
- ref?.current?.addEventListener(
3511
+ var _a5;
3512
+ (_a5 = ref == null ? void 0 : ref.current) == null ? void 0 : _a5.addEventListener(
3513
3513
  "touchend",
3514
3514
  (event) => {
3515
3515
  event.preventDefault();
@@ -3527,6 +3527,7 @@ var useOptionContext = () => {
3527
3527
  return useContext(OptionContext);
3528
3528
  };
3529
3529
  function ListBoxSection({ section, state }) {
3530
+ var _a5, _b4;
3530
3531
  const { itemProps, headingProps, groupProps } = useListBoxSection({
3531
3532
  heading: section.rendered,
3532
3533
  "aria-label": section["aria-label"]
@@ -3548,146 +3549,12 @@ function ListBoxSection({ section, state }) {
3548
3549
  children: section.rendered
3549
3550
  }
3550
3551
  ),
3551
- /* @__PURE__ */ jsx(List, { ...groupProps, padding: 0, listStyleType: "none", children: [...state.collection.getChildren?.(section.key) ?? []].map(
3552
+ /* @__PURE__ */ jsx(List, { ...groupProps, padding: 0, listStyleType: "none", children: [...((_b4 = (_a5 = state.collection).getChildren) == null ? void 0 : _b4.call(_a5, section.key)) ?? []].map(
3552
3553
  (item) => /* @__PURE__ */ jsx(Option, { item, state }, item.key)
3553
3554
  ) })
3554
3555
  ] }) });
3555
3556
  }
3556
-
3557
- // src/theme/utils/brand-utils.ts
3558
- function brandBackground(state) {
3559
- switch (state) {
3560
- case "active": {
3561
- return {
3562
- backgroundColor: "brand.surface.active"
3563
- };
3564
- }
3565
- case "hover": {
3566
- return {
3567
- backgroundColor: "brand.surface.hover"
3568
- };
3569
- }
3570
- default: {
3571
- return {
3572
- backgroundColor: "brand.surface"
3573
- };
3574
- }
3575
- }
3576
- }
3577
- function brandText() {
3578
- return {
3579
- color: "brand.text"
3580
- };
3581
- }
3582
-
3583
- // src/theme/utils/surface-utils.ts
3584
- var surface = (surface2) => {
3585
- switch (surface2) {
3586
- case "default": {
3587
- return {
3588
- backgroundColor: "surface"
3589
- };
3590
- }
3591
- case "secondary": {
3592
- return {
3593
- backgroundColor: "surface.secondary"
3594
- };
3595
- }
3596
- case "tertiary": {
3597
- return {
3598
- backgroundColor: "surface.tertiary"
3599
- };
3600
- }
3601
- case "disabled": {
3602
- return {
3603
- backgroundColor: "surface.disabled"
3604
- };
3605
- }
3606
- }
3607
- };
3608
-
3609
- // src/theme/utils/core-utils.ts
3610
- function coreBackground(state) {
3611
- switch (state) {
3612
- case "active": {
3613
- return brandBackground("active");
3614
- }
3615
- case "selected": {
3616
- return brandBackground("default");
3617
- }
3618
- case "disabled": {
3619
- return surface("disabled");
3620
- }
3621
- default: {
3622
- return { backgroundColor: "transparent" };
3623
- }
3624
- }
3625
- }
3626
- function coreBorder(state) {
3627
- switch (state) {
3628
- case "hover": {
3629
- return {
3630
- outline: "2px solid",
3631
- outlineColor: "core.outline"
3632
- };
3633
- }
3634
- case "disabled": {
3635
- return {
3636
- outline: "1px solid",
3637
- outlineColor: "outline.disabled"
3638
- };
3639
- }
3640
- case "active": {
3641
- return {
3642
- outline: "1px solid",
3643
- outlineColor: "core.outline"
3644
- };
3645
- }
3646
- case "invalid": {
3647
- return {
3648
- outline: "2px solid",
3649
- outlineColor: "outline.error"
3650
- };
3651
- }
3652
- default: {
3653
- return {
3654
- outline: "1px solid",
3655
- outlineColor: "core.outline"
3656
- };
3657
- }
3658
- }
3659
- }
3660
- function coreText(state) {
3661
- switch (state) {
3662
- case "selected": {
3663
- return {
3664
- color: "brand.text"
3665
- };
3666
- }
3667
- case "active": {
3668
- return {
3669
- color: "brand.text"
3670
- };
3671
- }
3672
- case "highlight": {
3673
- return {
3674
- color: "text.highlight"
3675
- };
3676
- }
3677
- case "disabled": {
3678
- return {
3679
- color: "text.disabled"
3680
- };
3681
- }
3682
- default: {
3683
- return {
3684
- color: "core.text"
3685
- };
3686
- }
3687
- }
3688
- }
3689
-
3690
- // src/theme/slot-recipes/native-select.ts
3557
+ var _a2, _b;
3691
3558
  var nativeSelectSlotRecipe = defineSlotRecipe({
3692
3559
  slots: NativeSelectAnatomy.keys(),
3693
3560
  className: "spor-nativeSelect",
@@ -3718,7 +3585,7 @@ var nativeSelectSlotRecipe = defineSlotRecipe({
3718
3585
  color: "currentColor",
3719
3586
  fontSize: "sm",
3720
3587
  _disabled: {
3721
- ...coreText("disabled")
3588
+ color: "text.disabled"
3722
3589
  }
3723
3590
  }
3724
3591
  },
@@ -3726,12 +3593,12 @@ var nativeSelectSlotRecipe = defineSlotRecipe({
3726
3593
  variant: {
3727
3594
  core: {
3728
3595
  field: {
3729
- ...inputRecipe.variants?.variant.core
3596
+ ...(_a2 = inputRecipe.variants) == null ? void 0 : _a2.variant.core
3730
3597
  }
3731
3598
  },
3732
3599
  floating: {
3733
3600
  field: {
3734
- ...inputRecipe.variants?.variant.floating
3601
+ ...(_b = inputRecipe.variants) == null ? void 0 : _b.variant.floating
3735
3602
  }
3736
3603
  }
3737
3604
  }
@@ -3874,7 +3741,8 @@ var NumericStepper = React28__default.forwardRef((props, ref) => {
3874
3741
  });
3875
3742
  const clampedStepSize = Math.max(Math.min(stepSize, 10), 1);
3876
3743
  const focusOnAddButton = () => {
3877
- addButtonRef.current?.focus();
3744
+ var _a5;
3745
+ (_a5 = addButtonRef.current) == null ? void 0 : _a5.focus();
3878
3746
  };
3879
3747
  return /* @__PURE__ */ jsxs(Field3, { css: styles.root, width: "auto", ...rest, ref, children: [
3880
3748
  /* @__PURE__ */ jsx(
@@ -4131,7 +3999,10 @@ var CountryCodeSelect = forwardRef((props, ref) => {
4131
3999
  const { t } = useTranslation();
4132
4000
  if (props.allowedCountryCodes) {
4133
4001
  callingCodes.items = callingCodes.items.filter(
4134
- (callingCode) => props.allowedCountryCodes?.some((code) => code === callingCode.label)
4002
+ (callingCode) => {
4003
+ var _a5;
4004
+ return (_a5 = props.allowedCountryCodes) == null ? void 0 : _a5.some((code) => code === callingCode.label);
4005
+ }
4135
4006
  );
4136
4007
  }
4137
4008
  return /* @__PURE__ */ jsx(
@@ -4570,16 +4441,16 @@ var pressableCardRecipe = defineRecipe({
4570
4441
  },
4571
4442
  core: {
4572
4443
  outlineColor: "core.outline",
4573
- outlineWidth: tokens20__default.size.stroke.sm,
4444
+ outlineWidth: tokens23__default.size.stroke.sm,
4574
4445
  outlineStyle: "solid",
4575
4446
  backgroundColor: "core.surface",
4576
4447
  _hover: {
4577
4448
  outlineColor: "core.outline.hover",
4578
- outlineWidth: tokens20__default.size.stroke.md,
4449
+ outlineWidth: tokens23__default.size.stroke.md,
4579
4450
  outlineStyle: "solid",
4580
4451
  _active: {
4581
4452
  backgroundColor: "core.surface.active",
4582
- outlineWidth: tokens20__default.size.stroke.sm
4453
+ outlineWidth: tokens23__default.size.stroke.sm
4583
4454
  }
4584
4455
  }
4585
4456
  },
@@ -4835,7 +4706,8 @@ var icons = {
4835
4706
  walk: { sm: WalkFill18Icon, md: WalkFill24Icon, lg: WalkFill30Icon }
4836
4707
  };
4837
4708
  var getCorrectIcon = ({ variant, size }) => {
4838
- return icons[variant]?.[size] ?? Box;
4709
+ var _a5;
4710
+ return ((_a5 = icons[variant]) == null ? void 0 : _a5[size]) ?? Box;
4839
4711
  };
4840
4712
  var LineIcon = forwardRef(
4841
4713
  function LineIcon2({
@@ -4993,7 +4865,7 @@ var ExternalIcon = ({ label }) => /* @__PURE__ */ jsxs(Fragment, { children: [
4993
4865
  var TextLink = forwardRef(
4994
4866
  ({ children, external, href, ...props }, ref) => {
4995
4867
  const { t } = useTranslation();
4996
- const isExternal = external ?? Boolean(href?.startsWith("http://") || href?.startsWith("https://"));
4868
+ const isExternal = external ?? Boolean((href == null ? void 0 : href.startsWith("http://")) || (href == null ? void 0 : href.startsWith("https://")));
4997
4869
  const externalLabel = t ? t(texts18.externalLink) : texts18.externalLink.en;
4998
4870
  if (props.asChild && isValidElement(children)) {
4999
4871
  return /* @__PURE__ */ jsx(Link, { href, ...props, ref, children: cloneElement(children, {
@@ -5648,7 +5520,7 @@ var NudgeContent = forwardRef(
5648
5520
  ({ showCloseButton = true, children, ...props }, ref) => {
5649
5521
  const [currentStep, setCurrentStep] = useState(1);
5650
5522
  const childrenArray = React28__default.Children.toArray(children);
5651
- const { open } = usePopoverContext$1();
5523
+ const { open } = usePopoverContext();
5652
5524
  useEffect(() => {
5653
5525
  setCurrentStep(1);
5654
5526
  }, [children, open]);
@@ -6009,7 +5881,7 @@ var texts24 = createTexts({
6009
5881
  });
6010
5882
  var fontFaces = `
6011
5883
  @font-face {
6012
- font-family: ${tokens20__default.asset.font["vy-sans"]["light"].name};
5884
+ font-family: ${tokens23__default.asset.font["vy-sans"]["light"].name};
6013
5885
  src: url("https://www.vy.no/styles/font/VySans-Light.woff2") format("woff2"),
6014
5886
  url("https://www.vy.no/styles/font/VySans-Light.woff") format("woff");
6015
5887
  font-style: normal;
@@ -6017,7 +5889,7 @@ var fontFaces = `
6017
5889
  font-display: swap
6018
5890
  }
6019
5891
  @font-face {
6020
- font-family: ${tokens20__default.asset.font["vy-sans"]["light-italic"].name};
5892
+ font-family: ${tokens23__default.asset.font["vy-sans"]["light-italic"].name};
6021
5893
  src: url("https://www.vy.no/styles/font/VySans-LightItalic.woff2")
6022
5894
  format("woff2"),
6023
5895
  url("https://www.vy.no/styles/font/VySans-LightItalic.woff") format("woff");
@@ -6026,7 +5898,7 @@ var fontFaces = `
6026
5898
  font-display: swap
6027
5899
  }
6028
5900
  @font-face {
6029
- font-family: ${tokens20__default.asset.font["vy-sans"]["medium"].name};
5901
+ font-family: ${tokens23__default.asset.font["vy-sans"]["medium"].name};
6030
5902
  src: url("https://www.vy.no/styles/font/VySans-Regular.woff2") format("woff2"),
6031
5903
  url("https://www.vy.no/styles/font/VySans-Regular.woff") format("woff");
6032
5904
  font-style: normal;
@@ -6034,7 +5906,7 @@ var fontFaces = `
6034
5906
  font-display: swap
6035
5907
  }
6036
5908
  @font-face {
6037
- font-family: ${tokens20__default.asset.font["vy-sans"]["medium-italic"].name};
5909
+ font-family: ${tokens23__default.asset.font["vy-sans"]["medium-italic"].name};
6038
5910
  src: url("https://www.vy.no/styles/font/VySans-RegularItalic.woff2")
6039
5911
  format("woff2"),
6040
5912
  url("https://www.vy.no/styles/font/VySans-RegularItalic.woff")
@@ -6044,7 +5916,7 @@ var fontFaces = `
6044
5916
  font-display: swap
6045
5917
  }
6046
5918
  @font-face {
6047
- font-family: ${tokens20__default.asset.font["vy-sans"]["bold"].name};
5919
+ font-family: ${tokens23__default.asset.font["vy-sans"]["bold"].name};
6048
5920
  src: url("https://www.vy.no/styles/font/VySans-Bold.woff2") format("woff2"),
6049
5921
  url("https://www.vy.no/styles/font/VySans-Bold.woff") format("woff");
6050
5922
  font-style: normal;
@@ -6052,7 +5924,7 @@ var fontFaces = `
6052
5924
  font-display: swap
6053
5925
  }
6054
5926
  @font-face {
6055
- font-family: ${tokens20__default.asset.font["vy-sans"]["bold-italic"].name};
5927
+ font-family: ${tokens23__default.asset.font["vy-sans"]["bold-italic"].name};
6056
5928
  src: url("https://www.vy.no/styles/font/VySans-BoldItalic.woff2")
6057
5929
  format("woff2"),
6058
5930
  url("https://www.vy.no/styles/font/VySans-BoldItalic.woff") format("woff");
@@ -6061,7 +5933,7 @@ var fontFaces = `
6061
5933
  font-display: swap
6062
5934
  }
6063
5935
  @font-face {
6064
- font-family: ${tokens20__default.asset.font["vy-display"].name};
5936
+ font-family: ${tokens23__default.asset.font["vy-display"].name};
6065
5937
  src: url("https://www.vy.no/styles/font/VyDisplay-Medium.woff2")
6066
5938
  format("woff2"),
6067
5939
  url("https://www.vy.no/styles/font/VyDisplay-Medium.woff") format("woff");
@@ -6093,7 +5965,7 @@ var createToast = ({
6093
5965
  }) => toaster.create({
6094
5966
  description: text,
6095
5967
  type: variant,
6096
- id,
5968
+ id: id ?? crypto.randomUUID(),
6097
5969
  duration
6098
5970
  });
6099
5971
  var Toaster = () => {
@@ -6570,7 +6442,7 @@ var buttonRecipe = defineRecipe({
6570
6442
  background: "surface.disabled"
6571
6443
  },
6572
6444
  _focus: {
6573
- outlineOffset: tokens20__default.size.stroke.md
6445
+ outlineOffset: tokens23__default.size.stroke.md
6574
6446
  }
6575
6447
  },
6576
6448
  variants: {
@@ -6598,19 +6470,19 @@ var buttonRecipe = defineRecipe({
6598
6470
  tertiary: {
6599
6471
  color: "core.text",
6600
6472
  outline: "solid",
6601
- outlineWidth: tokens20__default.size.stroke.sm,
6473
+ outlineWidth: tokens23__default.size.stroke.sm,
6602
6474
  outlineColor: "core.outline",
6603
6475
  _hover: {
6604
- outlineWidth: tokens20__default.size.stroke.md,
6476
+ outlineWidth: tokens23__default.size.stroke.md,
6605
6477
  outlineColor: "core.outline.hover",
6606
6478
  _active: {
6607
6479
  background: "core.surface.active",
6608
- outlineWidth: tokens20__default.size.stroke.sm,
6480
+ outlineWidth: tokens23__default.size.stroke.sm,
6609
6481
  outlineColor: "core.outline"
6610
6482
  }
6611
6483
  },
6612
6484
  _focus: {
6613
- outlineWidth: tokens20__default.size.stroke.sm
6485
+ outlineWidth: tokens23__default.size.stroke.sm
6614
6486
  }
6615
6487
  },
6616
6488
  ghost: {
@@ -6670,34 +6542,6 @@ var buttonRecipe = defineRecipe({
6670
6542
  size: "md"
6671
6543
  }
6672
6544
  });
6673
-
6674
- // src/theme/utils/ghost-utils.ts
6675
- function ghostBackground(state) {
6676
- switch (state) {
6677
- case "hover": {
6678
- return {
6679
- backgroundColor: "ghost.surface.hover"
6680
- };
6681
- }
6682
- case "active": {
6683
- return {
6684
- backgroundColor: "ghost.surface.active"
6685
- };
6686
- }
6687
- case "selected": {
6688
- return {
6689
- backgroundColor: "ghost.surface.selected"
6690
- };
6691
- }
6692
- case "default": {
6693
- return {
6694
- backgroundColor: "transparent"
6695
- };
6696
- }
6697
- }
6698
- }
6699
-
6700
- // src/theme/recipes/close-button.ts
6701
6545
  var closeButtonRecipe = defineRecipe({
6702
6546
  base: {
6703
6547
  transitionProperty: "common",
@@ -6707,12 +6551,12 @@ var closeButtonRecipe = defineRecipe({
6707
6551
  color: "darkGrey",
6708
6552
  fontWeight: "normal",
6709
6553
  _hover: {
6710
- ...ghostBackground("hover"),
6554
+ background: "ghost.surface.hover",
6711
6555
  _disabled: {
6712
6556
  color: "dimGrey"
6713
6557
  },
6714
6558
  _active: {
6715
- ...ghostBackground("active")
6559
+ background: "ghost.surface.active"
6716
6560
  }
6717
6561
  }
6718
6562
  },
@@ -6774,7 +6618,7 @@ var linkRecipe = defineRecipe({
6774
6618
  variants: {
6775
6619
  variant: {
6776
6620
  primary: {
6777
- ...coreText("default"),
6621
+ color: "core.text",
6778
6622
  _hover: {
6779
6623
  color: "text.default",
6780
6624
  _active: {
@@ -6783,10 +6627,10 @@ var linkRecipe = defineRecipe({
6783
6627
  }
6784
6628
  },
6785
6629
  secondary: {
6786
- ...coreText("highlight"),
6630
+ color: "text.hightlight",
6787
6631
  padding: "2px",
6788
6632
  _hover: {
6789
- ...coreText("highlight"),
6633
+ color: "text.hightlight",
6790
6634
  _active: {
6791
6635
  color: "text.disabled"
6792
6636
  }
@@ -6795,6 +6639,7 @@ var linkRecipe = defineRecipe({
6795
6639
  }
6796
6640
  }
6797
6641
  });
6642
+ var _a3, _b2;
6798
6643
  var textareaRecipe = defineRecipe({
6799
6644
  className: "spor-textarea",
6800
6645
  base: {
@@ -6811,10 +6656,10 @@ var textareaRecipe = defineRecipe({
6811
6656
  variants: {
6812
6657
  variant: {
6813
6658
  core: {
6814
- ...inputRecipe.variants?.variant.core
6659
+ ...(_a3 = inputRecipe.variants) == null ? void 0 : _a3.variant.core
6815
6660
  },
6816
6661
  floating: {
6817
- ...inputRecipe.variants?.variant.floating
6662
+ ...(_b2 = inputRecipe.variants) == null ? void 0 : _b2.variant.floating
6818
6663
  }
6819
6664
  }
6820
6665
  }
@@ -6837,23 +6682,23 @@ var recipes = {
6837
6682
  textarea: textareaRecipe
6838
6683
  };
6839
6684
  var vyDigitalColors = defineSemanticTokens.colors({
6840
- ...vyDigitalJson.color.vyDigital
6685
+ ...tokens4.color["vy-digital"].color.vyDigital
6841
6686
  });
6842
6687
  var vyUtviklingColors = defineSemanticTokens.colors({
6843
- ...VyUtviklingJson.color.vyUtvikling
6688
+ ...tokens4.color["vy-utvikling"].color.vyUtvikling
6844
6689
  });
6845
6690
  var cargonetColors = defineSemanticTokens.colors({
6846
- ...cargonetJson.color.cargonet
6691
+ ...tokens4.color.cargonet.color.cargonet
6847
6692
  });
6848
6693
  var radii = defineSemanticTokens.radii({
6849
- none: { value: tokens20__default.size["border-radius"].none },
6850
- xxs: { value: tokens20__default.size["border-radius"].xxs },
6851
- xs: { value: tokens20__default.size["border-radius"].xs },
6852
- sm: { value: tokens20__default.size["border-radius"].sm },
6853
- md: { value: tokens20__default.size["border-radius"].md },
6854
- lg: { value: tokens20__default.size["border-radius"].lg },
6855
- xl: { value: tokens20__default.size["border-radius"].xl },
6856
- "2xl": { value: tokens20__default.size["border-radius"]["2xl"] },
6694
+ none: { value: tokens23__default.size["border-radius"].none },
6695
+ xxs: { value: tokens23__default.size["border-radius"].xxs },
6696
+ xs: { value: tokens23__default.size["border-radius"].xs },
6697
+ sm: { value: tokens23__default.size["border-radius"].sm },
6698
+ md: { value: tokens23__default.size["border-radius"].md },
6699
+ lg: { value: tokens23__default.size["border-radius"].lg },
6700
+ xl: { value: tokens23__default.size["border-radius"].xl },
6701
+ "2xl": { value: tokens23__default.size["border-radius"]["2xl"] },
6857
6702
  round: { value: "50%" }
6858
6703
  });
6859
6704
  var shadows = defineSemanticTokens.shadows({
@@ -6861,13 +6706,13 @@ var shadows = defineSemanticTokens.shadows({
6861
6706
  value: "none"
6862
6707
  },
6863
6708
  sm: {
6864
- value: tokens20__default.depth.shadow.sm.value
6709
+ value: tokens23__default.depth.shadow.sm.value
6865
6710
  },
6866
6711
  md: {
6867
- value: tokens20__default.depth.shadow.md.value
6712
+ value: tokens23__default.depth.shadow.md.value
6868
6713
  },
6869
6714
  lg: {
6870
- value: tokens20__default.depth.shadow.lg.value
6715
+ value: tokens23__default.depth.shadow.lg.value
6871
6716
  }
6872
6717
  });
6873
6718
 
@@ -6890,66 +6735,6 @@ var semanticTokens = {
6890
6735
  colors: vyDigitalColors
6891
6736
  }
6892
6737
  };
6893
-
6894
- // src/theme/utils/floating-utils.ts
6895
- function floatingBackground(state) {
6896
- switch (state) {
6897
- case "focus": {
6898
- return brandBackground("default");
6899
- }
6900
- case "active": {
6901
- return {
6902
- backgroundColor: "floating.surface.active"
6903
- };
6904
- }
6905
- case "hover": {
6906
- return {
6907
- backgroundColor: {
6908
- _light: "floating.surface.hover",
6909
- _dark: `color-mix(in srgb, white 10%, var(--spor-colors-bg))`
6910
- }
6911
- };
6912
- }
6913
- case "default": {
6914
- return {
6915
- backgroundColor: {
6916
- _light: "bg",
6917
- _dark: `color-mix(in srgb, white 10%, var(--spor-colors-bg))`
6918
- }
6919
- };
6920
- }
6921
- }
6922
- }
6923
- function floatingBorder(state) {
6924
- switch (state) {
6925
- case "hover": {
6926
- return {
6927
- outline: "1px solid",
6928
- outlineColor: "floating.outline.hover"
6929
- };
6930
- }
6931
- case "focus": {
6932
- return {
6933
- outline: "1px solid",
6934
- outlineColor: "outline.focus"
6935
- };
6936
- }
6937
- case "active": {
6938
- return {
6939
- outline: "1px solid",
6940
- outlineColor: "floating.outline.active"
6941
- };
6942
- }
6943
- default: {
6944
- return {
6945
- outline: "1px solid",
6946
- outlineColor: "floating.outline"
6947
- };
6948
- }
6949
- }
6950
- }
6951
-
6952
- // src/theme/slot-recipes/accordion.ts
6953
6738
  var accordionSlotRecipe = defineSlotRecipe({
6954
6739
  className: "spor-accordion",
6955
6740
  slots: accordionAnatomy.keys(),
@@ -6965,7 +6750,7 @@ var accordionSlotRecipe = defineSlotRecipe({
6965
6750
  borderRadius: "sm",
6966
6751
  display: "flex",
6967
6752
  justifyContent: "space-between",
6968
- ...coreText("default"),
6753
+ color: "core.text",
6969
6754
  textAlign: "left",
6970
6755
  width: "full",
6971
6756
  alignItems: "center",
@@ -7016,58 +6801,63 @@ var accordionSlotRecipe = defineSlotRecipe({
7016
6801
  variants: {
7017
6802
  variant: {
7018
6803
  ghost: {
7019
- root: {
6804
+ item: {
7020
6805
  outline: "none"
7021
6806
  },
7022
6807
  itemTrigger: {
7023
6808
  "&:hover": {
7024
- ...ghostBackground("hover")
6809
+ background: "ghost.surface.hover"
7025
6810
  },
7026
6811
  "&:active": {
7027
- ...ghostBackground("active")
6812
+ backgroundColor: "ghost.surface.active"
7028
6813
  }
7029
6814
  }
7030
6815
  },
7031
6816
  core: {
7032
6817
  item: {
7033
- ...coreBorder("default")
6818
+ outline: "solid",
6819
+ outlineWidth: tokens23__default.size.stroke.sm,
6820
+ outlineColor: "core.outline"
7034
6821
  },
7035
6822
  itemTrigger: {
7036
6823
  _expanded: {
7037
6824
  borderBottomRadius: "none"
7038
6825
  },
7039
6826
  "&:hover": {
7040
- ...coreBorder("hover"),
6827
+ outlineWidth: tokens23__default.size.stroke.md,
6828
+ outlineColor: "core.outline.hover",
6829
+ outline: "solid",
7041
6830
  outlineOffset: 0
7042
6831
  },
7043
6832
  "&:active": {
7044
6833
  backgroundColor: "core.surface.active",
7045
- ...coreBorder("default")
6834
+ outlineWidth: tokens23__default.size.stroke.sm,
6835
+ outlineColor: "core.outline.active",
6836
+ outline: "solid"
7046
6837
  }
7047
6838
  }
7048
6839
  },
7049
6840
  floating: {
7050
6841
  item: {
7051
- ...floatingBackground("default"),
7052
- ...floatingBorder("default"),
7053
- boxShadow: "sm"
6842
+ outline: "solid",
6843
+ outlineWidth: tokens23__default.size.stroke.sm,
6844
+ outlineColor: "core.outline"
7054
6845
  },
7055
6846
  itemTrigger: {
7056
6847
  _expanded: {
7057
6848
  borderBottomRadius: "none"
7058
6849
  },
7059
6850
  "&:hover": {
7060
- outlineOffset: 1,
7061
- ...floatingBackground("hover"),
7062
- ...floatingBorder("hover"),
7063
- "&:active": {
7064
- backgroundColor: "floating.surface.active",
7065
- ...floatingBorder("default")
7066
- }
6851
+ outlineWidth: tokens23__default.size.stroke.md,
6852
+ outlineColor: "floating.outline.hover",
6853
+ outline: "solid",
6854
+ outlineOffset: 0
7067
6855
  },
7068
6856
  "&:active": {
7069
6857
  backgroundColor: "floating.surface.active",
7070
- ...floatingBorder("default")
6858
+ outlineWidth: tokens23__default.size.stroke.sm,
6859
+ outlineColor: "floating.outline.active",
6860
+ outline: "solid"
7071
6861
  }
7072
6862
  }
7073
6863
  }
@@ -7370,7 +7160,7 @@ var breadcrumbSlotRecipe = defineSlotRecipe({
7370
7160
  link: {
7371
7161
  _hover: {
7372
7162
  outlineColor: "core.outline.hover",
7373
- outlineWidth: tokens20__default.size.stroke.md,
7163
+ outlineWidth: tokens23__default.size.stroke.md,
7374
7164
  outlineStyle: "solid",
7375
7165
  _active: {
7376
7166
  backgroundColor: "core.surface.active",
@@ -7404,12 +7194,10 @@ var checkboxSlotRecipe = defineSlotRecipe({
7404
7194
  gap: 1.5,
7405
7195
  _hover: {
7406
7196
  "& > input:enabled:not([aria-invalid]) + .spor-checkbox__control": {
7407
- ...coreBackground("hover"),
7408
- borderColor: brandBackground("hover").backgroundColor
7197
+ borderColor: "core.outline.hover"
7409
7198
  },
7410
7199
  "& > input:enabled:checked:not([aria-invalid]) + .spor-checkbox__control": {
7411
- ...brandBackground("hover"),
7412
- borderColor: brandBackground("hover").backgroundColor
7200
+ background: "brand.surface.hover"
7413
7201
  }
7414
7202
  }
7415
7203
  },
@@ -7433,17 +7221,16 @@ var checkboxSlotRecipe = defineSlotRecipe({
7433
7221
  border: "2px solid",
7434
7222
  borderColor: "core.outline",
7435
7223
  borderRadius: "xs",
7436
- ...coreBackground("default"),
7437
7224
  _checked: {
7438
- ...brandText(),
7439
- ...brandBackground("default"),
7440
- borderColor: brandBackground("default").backgroundColor,
7225
+ color: "brand.icon",
7226
+ borderColor: "brand.surface",
7227
+ background: "brand.surface",
7441
7228
  _focus: {
7442
7229
  borderColor: "brand.surface.active"
7443
7230
  },
7444
7231
  _disabled: {
7445
- ...coreBackground("disabled"),
7446
- ...coreText("disabled"),
7232
+ background: "surface.disabled",
7233
+ color: "text.disabled",
7447
7234
  borderColor: "currentColor"
7448
7235
  },
7449
7236
  _invalid: {
@@ -7452,20 +7239,19 @@ var checkboxSlotRecipe = defineSlotRecipe({
7452
7239
  }
7453
7240
  },
7454
7241
  _disabled: {
7455
- ...coreBackground("disabled"),
7456
- borderColor: coreText("disabled").color
7242
+ // borderColor: coreText("disabled").color,
7243
+ borderColor: "text.disabled"
7457
7244
  },
7458
7245
  _invalid: {
7459
- ...coreBackground("default"),
7460
7246
  borderColor: "outline.error"
7461
7247
  },
7462
7248
  _focus: {
7463
7249
  outlineStyle: "solid",
7464
7250
  outlineColor: "outline.focus",
7465
- outlineOffset: tokens20__default.size.stroke.md,
7466
- outlineWidth: tokens20__default.size.stroke.md,
7251
+ outlineOffset: tokens23__default.size.stroke.md,
7252
+ outlineWidth: tokens23__default.size.stroke.md,
7467
7253
  borderColor: "core.outline",
7468
- borderWidth: tokens20__default.size.stroke.md
7254
+ borderWidth: tokens23__default.size.stroke.md
7469
7255
  }
7470
7256
  },
7471
7257
  label: {
@@ -8119,7 +7905,7 @@ var floatingActionButtonSlotRecipe = defineSlotRecipe({
8119
7905
  position: "fixed",
8120
7906
  zIndex: "dropdown",
8121
7907
  _focus: {
8122
- outlineOffset: tokens20__default.size.stroke.lg,
7908
+ outlineOffset: tokens23__default.size.stroke.lg,
8123
7909
  outlineColor: "outline.focus"
8124
7910
  },
8125
7911
  _disabled: {
@@ -8419,6 +8205,7 @@ var travelTagSlotRecipe = defineSlotRecipe({
8419
8205
  });
8420
8206
 
8421
8207
  // src/theme/slot-recipes/info-tag.ts
8208
+ var _a4, _b3, _c, _d;
8422
8209
  var infoTagSlotRecipe = defineSlotRecipe({
8423
8210
  slots: infoTagAnatomy.keys(),
8424
8211
  className: "spor-info-tag",
@@ -8451,21 +8238,21 @@ var infoTagSlotRecipe = defineSlotRecipe({
8451
8238
  }
8452
8239
  },
8453
8240
  size: {
8454
- ...travelTagSlotRecipe.variants?.size,
8241
+ ...(_a4 = travelTagSlotRecipe.variants) == null ? void 0 : _a4.size,
8455
8242
  sm: {
8456
- ...travelTagSlotRecipe.variants?.size.sm,
8243
+ ...(_b3 = travelTagSlotRecipe.variants) == null ? void 0 : _b3.size.sm,
8457
8244
  iconContainer: {
8458
8245
  borderRadius: "0.375rem"
8459
8246
  }
8460
8247
  },
8461
8248
  md: {
8462
- ...travelTagSlotRecipe.variants?.size.md,
8249
+ ...(_c = travelTagSlotRecipe.variants) == null ? void 0 : _c.size.md,
8463
8250
  iconContainer: {
8464
8251
  borderRadius: "0.375rem"
8465
8252
  }
8466
8253
  },
8467
8254
  lg: {
8468
- ...travelTagSlotRecipe.variants?.size.lg,
8255
+ ...(_d = travelTagSlotRecipe.variants) == null ? void 0 : _d.size.lg,
8469
8256
  iconContainer: {
8470
8257
  borderRadius: "sm"
8471
8258
  }
@@ -8861,13 +8648,12 @@ var paginationSlotRecipe = defineSlotRecipe({
8861
8648
  width: "5",
8862
8649
  fontSize: "xs",
8863
8650
  borderRadius: "xl",
8864
- ...coreText("default"),
8651
+ color: "core.text",
8865
8652
  cursor: "pointer",
8866
- ...coreBackground("default"),
8867
8653
  _hover: {
8868
- ...ghostBackground("hover"),
8654
+ background: "ghost.surface.hover",
8869
8655
  _active: {
8870
- ...ghostBackground("active")
8656
+ background: "ghost.surface.active"
8871
8657
  }
8872
8658
  },
8873
8659
  _selected: {
@@ -9123,26 +8909,26 @@ var radioCardSlotRecipe = defineSlotRecipe({
9123
8909
  core: {
9124
8910
  item: {
9125
8911
  outlineColor: "core.outline",
9126
- outlineWidth: tokens20__default.size.stroke.sm,
8912
+ outlineWidth: tokens23__default.size.stroke.sm,
9127
8913
  outlineStyle: "solid",
9128
8914
  backgroundColor: "core.surface",
9129
8915
  _hover: {
9130
8916
  outlineColor: "core.outline.hover",
9131
- outlineWidth: tokens20__default.size.stroke.md,
8917
+ outlineWidth: tokens23__default.size.stroke.md,
9132
8918
  outlineStyle: "solid",
9133
8919
  _active: {
9134
8920
  backgroundColor: "core.surface.active",
9135
- outlineWidth: tokens20__default.size.stroke.sm
8921
+ outlineWidth: tokens23__default.size.stroke.sm
9136
8922
  }
9137
8923
  },
9138
8924
  _checked: {
9139
8925
  outlineColor: "outline.focus",
9140
- outlineWidth: tokens20__default.size.stroke.md,
8926
+ outlineWidth: tokens23__default.size.stroke.md,
9141
8927
  outlineStyle: "solid",
9142
8928
  backgroundColor: "core.surface.active",
9143
8929
  _focusVisible: {
9144
8930
  outlineStyle: "double",
9145
- outlineWidth: `calc(3 * ${tokens20__default.size.stroke.md})`
8931
+ outlineWidth: `calc(3 * ${tokens23__default.size.stroke.md})`
9146
8932
  // space for double outline
9147
8933
  }
9148
8934
  }
@@ -9167,12 +8953,12 @@ var radioCardSlotRecipe = defineSlotRecipe({
9167
8953
  },
9168
8954
  _checked: {
9169
8955
  outlineColor: "outline.focus",
9170
- outlineWidth: tokens20__default.size.stroke.md,
8956
+ outlineWidth: tokens23__default.size.stroke.md,
9171
8957
  outlineStyle: "solid",
9172
8958
  backgroundColor: "core.surface.active",
9173
8959
  _focusVisible: {
9174
8960
  outlineStyle: "double",
9175
- outlineWidth: `calc(3 * ${tokens20__default.size.stroke.md})`
8961
+ outlineWidth: `calc(3 * ${tokens23__default.size.stroke.md})`
9176
8962
  // space for double outline
9177
8963
  }
9178
8964
  }
@@ -9428,46 +9214,6 @@ var selectSlotRecipe = defineSlotRecipe({
9428
9214
  }
9429
9215
  }
9430
9216
  });
9431
-
9432
- // src/theme/utils/accent-utils.ts
9433
- function accentBackground(state) {
9434
- switch (state) {
9435
- case "selected": {
9436
- return brandBackground("default");
9437
- }
9438
- case "active": {
9439
- return {
9440
- backgroundColor: "accent.surface.active"
9441
- };
9442
- }
9443
- case "hover": {
9444
- return {
9445
- backgroundColor: "accent.surface.hover"
9446
- };
9447
- }
9448
- default: {
9449
- return {
9450
- backgroundColor: "accent.surface"
9451
- };
9452
- }
9453
- }
9454
- }
9455
- function accentText(state) {
9456
- switch (state) {
9457
- case "selected": {
9458
- return {
9459
- color: "brand.text"
9460
- };
9461
- }
9462
- default: {
9463
- return {
9464
- color: "accent.text"
9465
- };
9466
- }
9467
- }
9468
- }
9469
-
9470
- // src/theme/slot-recipes/stepper.ts
9471
9217
  var stepperSlotRecipe = defineSlotRecipe({
9472
9218
  slots: stepperAnatomy.keys(),
9473
9219
  className: "spor-stepper",
@@ -9533,13 +9279,13 @@ var stepperSlotRecipe = defineSlotRecipe({
9533
9279
  _dark: "whiteAlpha.900"
9534
9280
  },
9535
9281
  _disabled: {
9536
- color: coreText("disabled").color
9282
+ color: "core.text"
9537
9283
  },
9538
9284
  _currentStep: {
9539
- color: accentText("default").color
9285
+ color: "accent.text"
9540
9286
  },
9541
9287
  _hover: {
9542
- backgroundColor: accentBackground("hover").backgroundColor,
9288
+ backgroundColor: "accent.surface.hover",
9543
9289
  _disabled: {
9544
9290
  backgroundColor: "transparent"
9545
9291
  }
@@ -9547,7 +9293,7 @@ var stepperSlotRecipe = defineSlotRecipe({
9547
9293
  },
9548
9294
  backButton: {
9549
9295
  _hover: {
9550
- ...brandBackground("hover")
9296
+ backgroundColor: "brand.surface.hover"
9551
9297
  }
9552
9298
  }
9553
9299
  }
@@ -9637,7 +9383,7 @@ var switchSlotRecipe = defineSlotRecipe({
9637
9383
  backgroundColor: "brand.surface",
9638
9384
  _focusVisible: {
9639
9385
  outlineStyle: "double",
9640
- outlineWidth: `calc(3 * ${tokens20__default.size.stroke.md})`
9386
+ outlineWidth: `calc(3 * ${tokens23__default.size.stroke.md})`
9641
9387
  // space for double outline
9642
9388
  }
9643
9389
  },
@@ -10013,28 +9759,28 @@ var borders = defineTokens.borders({
10013
9759
  value: "0"
10014
9760
  },
10015
9761
  sm: {
10016
- value: `${tokens20__default.size.stroke.sm} solid`
9762
+ value: `${tokens23__default.size.stroke.sm} solid`
10017
9763
  },
10018
9764
  "sm-dashed": {
10019
- value: `${tokens20__default.size.stroke.sm} dashed`
9765
+ value: `${tokens23__default.size.stroke.sm} dashed`
10020
9766
  },
10021
9767
  md: {
10022
- value: `${tokens20__default.size.stroke.md} solid`
9768
+ value: `${tokens23__default.size.stroke.md} solid`
10023
9769
  },
10024
9770
  "md-dashed": {
10025
- value: `${tokens20__default.size.stroke.md} dashed`
9771
+ value: `${tokens23__default.size.stroke.md} dashed`
10026
9772
  },
10027
9773
  lg: {
10028
- value: `${tokens20__default.size.stroke.lg} solid`
9774
+ value: `${tokens23__default.size.stroke.lg} solid`
10029
9775
  },
10030
9776
  "lg-dashed": {
10031
- value: `${tokens20__default.size.stroke.lg} dashed`
9777
+ value: `${tokens23__default.size.stroke.lg} dashed`
10032
9778
  }
10033
9779
  });
10034
9780
  var colors = defineTokens.colors({
10035
- ...aliasJson.color.alias,
10036
- ...paletteJson.color.palette,
10037
- linjetag: linjetagJson.color.linjetag
9781
+ ...tokens4.color.alias.color.alias,
9782
+ ...tokens4.color.palette.color.palette,
9783
+ linjetag: tokens4.color.linjetag.color.linjetag
10038
9784
  });
10039
9785
  var cursor = defineTokens.cursor({
10040
9786
  button: {
@@ -10100,29 +9846,29 @@ var easings = defineTokens.easings({
10100
9846
  }
10101
9847
  });
10102
9848
  var fontSizes = defineTokens.fontSizes({
10103
- "2xs": { value: tokens20__default.size.font.xs.mobile },
10104
- xs: { value: tokens20__default.size.font.sm.mobile },
10105
- sm: { value: tokens20__default.size.font.md.mobile },
10106
- md: { value: tokens20__default.size.font.lg.mobile },
10107
- lg: { value: tokens20__default.size.font.xl.mobile },
10108
- xl: { value: tokens20__default.size.font.xxl.mobile },
10109
- "2xl": { value: tokens20__default.size.font.xl.desktop },
10110
- "3xl": { value: tokens20__default.size.font.xxl.desktop },
9849
+ "2xs": { value: tokens23__default.size.font.xs.mobile },
9850
+ xs: { value: tokens23__default.size.font.sm.mobile },
9851
+ sm: { value: tokens23__default.size.font.md.mobile },
9852
+ md: { value: tokens23__default.size.font.lg.mobile },
9853
+ lg: { value: tokens23__default.size.font.xl.mobile },
9854
+ xl: { value: tokens23__default.size.font.xxl.mobile },
9855
+ "2xl": { value: tokens23__default.size.font.xl.desktop },
9856
+ "3xl": { value: tokens23__default.size.font.xxl.desktop },
10111
9857
  mobile: {
10112
- xs: { value: tokens20__default.size.font.xs.mobile },
10113
- sm: { value: tokens20__default.size.font.sm.mobile },
10114
- md: { value: tokens20__default.size.font.md.mobile },
10115
- lg: { value: tokens20__default.size.font.lg.mobile },
10116
- xl: { value: tokens20__default.size.font.xl.mobile },
10117
- xxl: { value: tokens20__default.size.font.xxl.mobile }
9858
+ xs: { value: tokens23__default.size.font.xs.mobile },
9859
+ sm: { value: tokens23__default.size.font.sm.mobile },
9860
+ md: { value: tokens23__default.size.font.md.mobile },
9861
+ lg: { value: tokens23__default.size.font.lg.mobile },
9862
+ xl: { value: tokens23__default.size.font.xl.mobile },
9863
+ xxl: { value: tokens23__default.size.font.xxl.mobile }
10118
9864
  },
10119
9865
  desktop: {
10120
- xs: { value: tokens20__default.size.font.xs.desktop },
10121
- sm: { value: tokens20__default.size.font.sm.desktop },
10122
- md: { value: tokens20__default.size.font.md.desktop },
10123
- lg: { value: tokens20__default.size.font.lg.desktop },
10124
- xl: { value: tokens20__default.size.font.xl.desktop },
10125
- xxl: { value: tokens20__default.size.font.xxl.desktop }
9866
+ xs: { value: tokens23__default.size.font.xs.desktop },
9867
+ sm: { value: tokens23__default.size.font.sm.desktop },
9868
+ md: { value: tokens23__default.size.font.md.desktop },
9869
+ lg: { value: tokens23__default.size.font.lg.desktop },
9870
+ xl: { value: tokens23__default.size.font.xl.desktop },
9871
+ xxl: { value: tokens23__default.size.font.xxl.desktop }
10126
9872
  }
10127
9873
  });
10128
9874
  var fontWeights = defineTokens.fontWeights({
@@ -10155,9 +9901,9 @@ var fontWeights = defineTokens.fontWeights({
10155
9901
  }
10156
9902
  });
10157
9903
  var fonts = defineTokens.fonts({
10158
- body: { value: `${tokens20__default.font.family.body}, arial, sans-serif` },
10159
- heading: { value: `${tokens20__default.font.family.heading}, arial, sans-serif` },
10160
- mono: { value: `${tokens20__default.font.family.monospace}, monospace` }
9904
+ body: { value: `${tokens23__default.font.family.body}, arial, sans-serif` },
9905
+ heading: { value: `${tokens23__default.font.family.heading}, arial, sans-serif` },
9906
+ mono: { value: `${tokens23__default.font.family.monospace}, monospace` }
10161
9907
  });
10162
9908
  var letterSpacings = defineTokens.letterSpacings({
10163
9909
  tighter: {
@@ -10194,31 +9940,31 @@ var lineHeights = defineTokens.lineHeights({
10194
9940
  }
10195
9941
  });
10196
9942
  var radii2 = defineTokens.radii({
10197
- none: { value: tokens20__default.size["border-radius"].none },
10198
- xs: { value: tokens20__default.size["border-radius"].xs },
10199
- sm: { value: tokens20__default.size["border-radius"].sm },
10200
- md: { value: tokens20__default.size["border-radius"].md },
10201
- lg: { value: tokens20__default.size["border-radius"].lg },
10202
- xl: { value: tokens20__default.size["border-radius"].xl },
10203
- "2xl": { value: tokens20__default.size["border-radius"]["2xl"] },
9943
+ none: { value: tokens23__default.size["border-radius"].none },
9944
+ xs: { value: tokens23__default.size["border-radius"].xs },
9945
+ sm: { value: tokens23__default.size["border-radius"].sm },
9946
+ md: { value: tokens23__default.size["border-radius"].md },
9947
+ lg: { value: tokens23__default.size["border-radius"].lg },
9948
+ xl: { value: tokens23__default.size["border-radius"].xl },
9949
+ "2xl": { value: tokens23__default.size["border-radius"]["2xl"] },
10204
9950
  round: { value: "50%" }
10205
9951
  });
10206
9952
  var spacing = defineTokens.spacing({
10207
- 0: { value: tokens20__default.size.spacing["0"] },
10208
- 0.5: { value: tokens20__default.size.spacing["0.5"] },
10209
- 1: { value: tokens20__default.size.spacing["1"] },
10210
- 1.5: { value: tokens20__default.size.spacing["1.5"] },
10211
- 2: { value: tokens20__default.size.spacing["2"] },
10212
- 3: { value: tokens20__default.size.spacing["3"] },
10213
- 4: { value: tokens20__default.size.spacing["4"] },
10214
- 5: { value: tokens20__default.size.spacing["5"] },
10215
- 6: { value: tokens20__default.size.spacing["6"] },
10216
- 7: { value: tokens20__default.size.spacing["7"] },
10217
- 8: { value: tokens20__default.size.spacing["8"] },
10218
- 9: { value: tokens20__default.size.spacing["9"] },
10219
- 10: { value: tokens20__default.size.spacing["10"] },
10220
- 11: { value: tokens20__default.size.spacing["11"] },
10221
- 12: { value: tokens20__default.size.spacing["12"] }
9953
+ 0: { value: tokens23__default.size.spacing["0"] },
9954
+ 0.5: { value: tokens23__default.size.spacing["0.5"] },
9955
+ 1: { value: tokens23__default.size.spacing["1"] },
9956
+ 1.5: { value: tokens23__default.size.spacing["1.5"] },
9957
+ 2: { value: tokens23__default.size.spacing["2"] },
9958
+ 3: { value: tokens23__default.size.spacing["3"] },
9959
+ 4: { value: tokens23__default.size.spacing["4"] },
9960
+ 5: { value: tokens23__default.size.spacing["5"] },
9961
+ 6: { value: tokens23__default.size.spacing["6"] },
9962
+ 7: { value: tokens23__default.size.spacing["7"] },
9963
+ 8: { value: tokens23__default.size.spacing["8"] },
9964
+ 9: { value: tokens23__default.size.spacing["9"] },
9965
+ 10: { value: tokens23__default.size.spacing["10"] },
9966
+ 11: { value: tokens23__default.size.spacing["11"] },
9967
+ 12: { value: tokens23__default.size.spacing["12"] }
10222
9968
  });
10223
9969
 
10224
9970
  // src/theme/tokens/sizes.ts
@@ -10255,10 +10001,10 @@ var namedSizes = defineTokens.sizes({
10255
10001
  });
10256
10002
  var container = defineTokens.sizes({
10257
10003
  base: { value: 0 },
10258
- sm: { value: tokens20__default.size.breakpoint.sm },
10259
- md: { value: tokens20__default.size.breakpoint.md },
10260
- lg: { value: tokens20__default.size.breakpoint.lg },
10261
- xl: { value: tokens20__default.size.breakpoint.xl }
10004
+ sm: { value: tokens23__default.size.breakpoint.sm },
10005
+ md: { value: tokens23__default.size.breakpoint.md },
10006
+ lg: { value: tokens23__default.size.breakpoint.lg },
10007
+ xl: { value: tokens23__default.size.breakpoint.xl }
10262
10008
  });
10263
10009
  var sizes = {
10264
10010
  ...largeSizes,
@@ -10267,22 +10013,22 @@ var sizes = {
10267
10013
  container
10268
10014
  };
10269
10015
  var zIndex = defineTokens.zIndex({
10270
- hide: { value: tokens20__default.depth["z-index"].hide },
10016
+ hide: { value: tokens23__default.depth["z-index"].hide },
10271
10017
  auto: { value: "auto" },
10272
- base: { value: tokens20__default.depth["z-index"].base },
10273
- docked: { value: tokens20__default.depth["z-index"].docked },
10274
- dropdown: { value: tokens20__default.depth["z-index"].dropdown },
10275
- sticky: { value: tokens20__default.depth["z-index"].sticky },
10276
- banner: { value: tokens20__default.depth["z-index"].banner },
10277
- overlay: { value: tokens20__default.depth["z-index"].overlay },
10278
- modal: { value: tokens20__default.depth["z-index"].modal },
10279
- popover: { value: tokens20__default.depth["z-index"].popover },
10280
- skipLink: { value: tokens20__default.depth["z-index"].skipLink },
10281
- toast: { value: tokens20__default.depth["z-index"].toast }
10018
+ base: { value: tokens23__default.depth["z-index"].base },
10019
+ docked: { value: tokens23__default.depth["z-index"].docked },
10020
+ dropdown: { value: tokens23__default.depth["z-index"].dropdown },
10021
+ sticky: { value: tokens23__default.depth["z-index"].sticky },
10022
+ banner: { value: tokens23__default.depth["z-index"].banner },
10023
+ overlay: { value: tokens23__default.depth["z-index"].overlay },
10024
+ modal: { value: tokens23__default.depth["z-index"].modal },
10025
+ popover: { value: tokens23__default.depth["z-index"].popover },
10026
+ skipLink: { value: tokens23__default.depth["z-index"].skipLink },
10027
+ toast: { value: tokens23__default.depth["z-index"].toast }
10282
10028
  });
10283
10029
 
10284
10030
  // src/theme/tokens/index.ts
10285
- var tokens18 = {
10031
+ var tokens21 = {
10286
10032
  aspectRatios,
10287
10033
  animations,
10288
10034
  blurs,
@@ -10351,10 +10097,10 @@ var animationStyles = defineAnimationStyles({
10351
10097
  });
10352
10098
  var breakpoints = {
10353
10099
  base: "0px",
10354
- sm: tokens20__default.size.breakpoint.sm,
10355
- md: tokens20__default.size.breakpoint.md,
10356
- lg: tokens20__default.size.breakpoint.lg,
10357
- xl: tokens20__default.size.breakpoint.xl
10100
+ sm: tokens23__default.size.breakpoint.sm,
10101
+ md: tokens23__default.size.breakpoint.md,
10102
+ lg: tokens23__default.size.breakpoint.lg,
10103
+ xl: tokens23__default.size.breakpoint.xl
10358
10104
  };
10359
10105
 
10360
10106
  // src/theme/tokens/config.ts
@@ -10644,85 +10390,85 @@ var textStyles = defineTextStyles({
10644
10390
  xxl: {
10645
10391
  value: {
10646
10392
  fontSize: [
10647
- tokens20__default.font.style.xxl["font-size"].mobile,
10393
+ tokens23__default.font.style.xxl["font-size"].mobile,
10648
10394
  null,
10649
10395
  null,
10650
- tokens20__default.font.style.xxl["font-size"].desktop
10396
+ tokens23__default.font.style.xxl["font-size"].desktop
10651
10397
  ],
10652
- fontFamily: tokens20__default.font.style.xxl["font-family"],
10653
- lineHeight: tokens20__default.font.style.xxl["line-height"]
10398
+ fontFamily: tokens23__default.font.style.xxl["font-family"],
10399
+ lineHeight: tokens23__default.font.style.xxl["line-height"]
10654
10400
  }
10655
10401
  },
10656
10402
  "xl-display": {
10657
10403
  value: {
10658
10404
  fontSize: [
10659
- tokens20__default.font.style["xl-display"]["font-size"].mobile,
10405
+ tokens23__default.font.style["xl-display"]["font-size"].mobile,
10660
10406
  null,
10661
10407
  null,
10662
- tokens20__default.font.style["xl-display"]["font-size"].desktop
10408
+ tokens23__default.font.style["xl-display"]["font-size"].desktop
10663
10409
  ],
10664
- fontFamily: tokens20__default.font.style["xl-display"]["font-family"],
10665
- lineHeight: tokens20__default.font.style["xl-display"]["line-height"]
10410
+ fontFamily: tokens23__default.font.style["xl-display"]["font-family"],
10411
+ lineHeight: tokens23__default.font.style["xl-display"]["line-height"]
10666
10412
  }
10667
10413
  },
10668
10414
  "xl-sans": {
10669
10415
  value: {
10670
10416
  fontSize: [
10671
- tokens20__default.font.style["xl-sans"]["font-size"].mobile,
10417
+ tokens23__default.font.style["xl-sans"]["font-size"].mobile,
10672
10418
  null,
10673
10419
  null,
10674
- tokens20__default.font.style["xl-sans"]["font-size"].desktop
10420
+ tokens23__default.font.style["xl-sans"]["font-size"].desktop
10675
10421
  ],
10676
- fontFamily: tokens20__default.font.style["xl-sans"]["font-family"],
10677
- lineHeight: tokens20__default.font.style["xl-sans"]["line-height"]
10422
+ fontFamily: tokens23__default.font.style["xl-sans"]["font-family"],
10423
+ lineHeight: tokens23__default.font.style["xl-sans"]["line-height"]
10678
10424
  }
10679
10425
  },
10680
10426
  lg: {
10681
10427
  value: {
10682
10428
  fontSize: [
10683
- tokens20__default.font.style.lg["font-size"].mobile,
10429
+ tokens23__default.font.style.lg["font-size"].mobile,
10684
10430
  null,
10685
10431
  null,
10686
- tokens20__default.font.style.lg["font-size"].desktop
10432
+ tokens23__default.font.style.lg["font-size"].desktop
10687
10433
  ],
10688
- fontFamily: tokens20__default.font.style.lg["font-family"],
10689
- lineHeight: tokens20__default.font.style.lg["line-height"]
10434
+ fontFamily: tokens23__default.font.style.lg["font-family"],
10435
+ lineHeight: tokens23__default.font.style.lg["line-height"]
10690
10436
  }
10691
10437
  },
10692
10438
  md: {
10693
10439
  value: {
10694
10440
  fontSize: [
10695
- tokens20__default.font.style.md["font-size"].mobile,
10441
+ tokens23__default.font.style.md["font-size"].mobile,
10696
10442
  null,
10697
10443
  null,
10698
- tokens20__default.font.style.md["font-size"].desktop
10444
+ tokens23__default.font.style.md["font-size"].desktop
10699
10445
  ],
10700
- fontFamily: tokens20__default.font.style.md["font-family"],
10701
- lineHeight: tokens20__default.font.style.md["line-height"]
10446
+ fontFamily: tokens23__default.font.style.md["font-family"],
10447
+ lineHeight: tokens23__default.font.style.md["line-height"]
10702
10448
  }
10703
10449
  },
10704
10450
  sm: {
10705
10451
  value: {
10706
10452
  fontSize: [
10707
- tokens20__default.font.style.sm["font-size"].mobile,
10453
+ tokens23__default.font.style.sm["font-size"].mobile,
10708
10454
  null,
10709
10455
  null,
10710
- tokens20__default.font.style.sm["font-size"].desktop
10456
+ tokens23__default.font.style.sm["font-size"].desktop
10711
10457
  ],
10712
- fontFamily: tokens20__default.font.style.sm["font-family"],
10713
- lineHeight: tokens20__default.font.style.sm["line-height"]
10458
+ fontFamily: tokens23__default.font.style.sm["font-family"],
10459
+ lineHeight: tokens23__default.font.style.sm["line-height"]
10714
10460
  }
10715
10461
  },
10716
10462
  xs: {
10717
10463
  value: {
10718
10464
  fontSize: [
10719
- tokens20__default.font.style.xs["font-size"].mobile,
10465
+ tokens23__default.font.style.xs["font-size"].mobile,
10720
10466
  null,
10721
10467
  null,
10722
- tokens20__default.font.style.xs["font-size"].desktop
10468
+ tokens23__default.font.style.xs["font-size"].desktop
10723
10469
  ],
10724
- fontFamily: tokens20__default.font.style.xs["font-family"],
10725
- lineHeight: tokens20__default.font.style.xs["line-height"]
10470
+ fontFamily: tokens23__default.font.style.xs["font-family"],
10471
+ lineHeight: tokens23__default.font.style.xs["line-height"]
10726
10472
  }
10727
10473
  }
10728
10474
  });
@@ -10733,7 +10479,7 @@ var generateTheme = (brand) => {
10733
10479
  theme: {
10734
10480
  breakpoints,
10735
10481
  keyframes,
10736
- tokens: tokens18,
10482
+ tokens: tokens21,
10737
10483
  semanticTokens: semanticTokens[brand],
10738
10484
  recipes,
10739
10485
  slotRecipes,